|
|
@@ -17,6 +17,8 @@ import cn.iocoder.yudao.module.iscs.dal.dataobject.workdesign.WorkflowWorkNodeUs
|
|
|
import cn.iocoder.yudao.module.iscs.dal.mysql.workdesign.WorkflowWorkMapper;
|
|
|
import cn.iocoder.yudao.module.iscs.utils.MonthTimeUtil;
|
|
|
import cn.iocoder.yudao.module.iscs.utils.RandomCodeUtil;
|
|
|
+import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
|
|
+import cn.iocoder.yudao.module.system.service.user.AdminUserService;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
@@ -51,6 +53,8 @@ public class WorkflowWorkServiceImpl extends ServiceImpl<WorkflowWorkMapper, Wor
|
|
|
private WorkflowWorkNodeService workflowWorkNodeService;
|
|
|
@Resource
|
|
|
private WorkflowWorkNodeUserService workflowWorkNodeUserService;
|
|
|
+ @Resource
|
|
|
+ private AdminUserService adminUserService;
|
|
|
|
|
|
@Override
|
|
|
public Long createWorkflowWork(WorkflowWorkSaveReqVO createReqVO) {
|
|
|
@@ -186,9 +190,14 @@ public class WorkflowWorkServiceImpl extends ServiceImpl<WorkflowWorkMapper, Wor
|
|
|
List<WorkflowWorkNodeDO> list2 = list.stream().filter(o -> "isolation".equals(o.getType()) && StringUtils.isBlank(o.getIsolationPoints())).toList();
|
|
|
list2.forEach(o -> mes.add("节点[" + o.getNodeName() + "]:未选择隔离点"));
|
|
|
|
|
|
- // 3.检查isolation类型的隔离方式是否为空
|
|
|
+ // 2.1检查isolation类型的隔离方式是否为空
|
|
|
List<WorkflowWorkNodeDO> list3 = list.stream().filter(o -> "isolation".equals(o.getType()) && StringUtils.isBlank(o.getIsolationType())).toList();
|
|
|
list3.forEach(o -> mes.add("节点[" + o.getNodeName() + "]:未选择隔离方式"));
|
|
|
+
|
|
|
+ // 3.检查releaseIsolation类型的数据是否完整
|
|
|
+ List<WorkflowWorkNodeDO> list4 = list.stream().filter(o -> "releaseIsolation".equals(o.getType())
|
|
|
+ && StringUtils.isBlank(o.getIsolationNodeUuid())).toList();
|
|
|
+ list4.forEach(o -> mes.add("节点[" + o.getNodeName() + "]:未选择前置隔离节点"));
|
|
|
}
|
|
|
return mes;
|
|
|
}
|
|
|
@@ -252,6 +261,14 @@ public class WorkflowWorkServiceImpl extends ServiceImpl<WorkflowWorkMapper, Wor
|
|
|
public WorkflowWorkNodeRespVO getMyWorkNodeDetail(Long nodeId) {
|
|
|
WorkflowWorkNodeDO byId = workflowWorkNodeService.getById(nodeId);
|
|
|
WorkflowWorkNodeRespVO bean = BeanUtils.toBean(byId, WorkflowWorkNodeRespVO.class);
|
|
|
+ // 获取作业
|
|
|
+ WorkflowWorkDO workflowWorkDO = getById(byId.getWorkId());
|
|
|
+ AdminUserDO user = adminUserService.getUser(workflowWorkDO.getInitiatorId());
|
|
|
+ String phone = "";
|
|
|
+ if (user != null && StringUtils.isNotBlank(user.getMobile())) {
|
|
|
+ phone = "(" + user.getMobile() + ")";
|
|
|
+ }
|
|
|
+ bean.setInitiatorName(workflowWorkDO.getInitiatorName() + phone);
|
|
|
return bean;
|
|
|
}
|
|
|
|
|
|
@@ -319,6 +336,19 @@ public class WorkflowWorkServiceImpl extends ServiceImpl<WorkflowWorkMapper, Wor
|
|
|
|
|
|
// ------------------------------------android------------------------------------------
|
|
|
|
|
|
+ @Override
|
|
|
+ public PageResult<WorkflowWorkRespVO> getAppMyTicketPage(WorkflowWorkPageReqVO vo) {
|
|
|
+ Long loginUserId = getLoginUserId();
|
|
|
+ Assert.notNull(loginUserId, "请登录!");
|
|
|
+ vo.setLoginUserId(loginUserId);
|
|
|
+ Page page = new Page<>().setSize(vo.getPageSize()).setCurrent(vo.getPageNo());
|
|
|
+ Page<WorkflowWorkRespVO> myWorkPage = workflowWorkMapper.getAppMyTicketPage(page, vo);
|
|
|
+ PageResult<WorkflowWorkRespVO> respVOPageResult = new PageResult<>();
|
|
|
+ respVOPageResult.setList(myWorkPage.getRecords());
|
|
|
+ respVOPageResult.setTotal(myWorkPage.getTotal());
|
|
|
+ return respVOPageResult;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public PageResult<MyWorkRespVO> getAppMyWorkPage(MyWorkReqVO vo) {
|
|
|
Long loginUserId = getLoginUserId();
|