| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.acs.framework.common.BaseRes; |
| | | import com.zy.acs.framework.common.Cools; |
| | | import com.zy.acs.framework.common.SnowflakeIdWorker; |
| | | import com.zy.acs.framework.exception.CoolException; |
| | | import com.zy.acs.manager.common.exception.BusinessException; |
| | | import com.zy.acs.manager.manager.entity.FuncSta; |
| | | import com.zy.acs.manager.manager.entity.Loc; |
| | |
| | | return this.baseMapper.selectStatByLastSevenDays(); |
| | | } |
| | | |
| | | @Override |
| | | public Boolean complete(Long taskId, Long userId) { |
| | | Task task = this.getById(taskId); |
| | | if (null == task) { |
| | | return Boolean.FALSE; |
| | | } |
| | | |
| | | task.setTaskSts(TaskStsType.COMPLETE.val()); |
| | | task.setUpdateTime(new Date()); |
| | | task.setUpdateBy(userId); |
| | | if (!this.updateById(task)) { |
| | | throw new CoolException(BaseRes.ERROR); |
| | | } |
| | | return Boolean.TRUE; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean cancel(Long taskId, Long userId) { |
| | | Task task = this.getById(taskId); |
| | | if (null == task) { |
| | | return Boolean.FALSE; |
| | | } |
| | | |
| | | task.setTaskSts(TaskStsType.CANCEL.val()); |
| | | task.setUpdateTime(new Date()); |
| | | task.setUpdateBy(userId); |
| | | if (!this.updateById(task)) { |
| | | throw new CoolException(BaseRes.ERROR); |
| | | } |
| | | return Boolean.TRUE; |
| | | } |
| | | |
| | | |
| | | } |