| | |
| | | import org.activiti.engine.task.Task; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.activiti.entity.AssignFileStream; |
| | | import org.jeecg.modules.activiti.entity.ToEquipmentTask; |
| | |
| | | ExceptionCast.cast(CommonCode.INVALID_PARAM); |
| | | if(!ValidateUtil.validateString(stream.getDeviceId())) |
| | | ExceptionCast.cast(ActivitiCode.ACT_ASSIGN_DEVICE_NONE); |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | String userId = user.getId(); |
| | | if(!ValidateUtil.validateString(userId)) |
| | | ExceptionCast.cast(UcenterCode.UCENTER_ACCOUNT_NOT_EXIST); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<ActTaskExt> getUndoTaskList() { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | public IPage<ActTaskExt> getUndoTaskList(Integer pageNo,Integer pageSize) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | String userId = user.getId(); |
| | | if(!ValidateUtil.validateString(userId)) |
| | | return null; |
| | |
| | | ext.setAssignFileStream(streamDetail); |
| | | extList.add(ext); |
| | | }); |
| | | return extList; |
| | | //封装Page |
| | | IPage<ActTaskExt> page = new Page<>(pageNo,pageSize); |
| | | page.setRecords(extList); |
| | | return page; |
| | | } |
| | | |
| | | @Override |
| | |
| | | public boolean approveAssignFile(String taskId, String streamId, AssignFileStream stream) { |
| | | if(!ValidateUtil.validateString(taskId) || !ValidateUtil.validateString(streamId) || stream == null) |
| | | ExceptionCast.cast(CommonCode.INVALID_PARAM); |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | String userId = user.getId(); |
| | | if(!ValidateUtil.validateString(userId)) |
| | | ExceptionCast.cast(UcenterCode.UCENTER_ACCOUNT_NOT_EXIST); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public QueryPageResponseResult<AssignFileStreamExt> findPageList(int page, int size, AssignFileStreamQueryRequest request) { |
| | | public Result<?> findPageList(int page, int size, AssignFileStreamQueryRequest request) { |
| | | if(page < 1 || size < 1) { |
| | | ExceptionCast.cast(CommonCode.INVALID_PAGE); |
| | | } |
| | |
| | | } |
| | | } |
| | | IPage<AssignFileStreamExt> streamExtIPage = super.getBaseMapper().findByPage(pageData, lambdaQueryWrapper); |
| | | return new QueryPageResponseResult<>(CommonCode.SUCCESS, streamExtIPage); |
| | | return Result.ok(streamExtIPage); |
| | | } |
| | | |
| | | @Override |