|
@@ -13,6 +13,8 @@ import com.ruoyi.common.core.utils.StringUtils;
|
|
|
import com.ruoyi.common.core.utils.uuid.IdUtils;
|
|
|
import com.ruoyi.common.security.utils.SecurityUtils;
|
|
|
import com.ruoyi.organization.domain.YljgJcxx;
|
|
|
+import com.ruoyi.organization.validator.OrganizationJgScztVH;
|
|
|
+import com.ruoyi.organization.validator.OrganizationSqJgScztVH;
|
|
|
import com.ruoyi.system.api.RemoteUserService;
|
|
|
import com.ruoyi.system.api.enums.*;
|
|
|
import com.ruoyi.system.api.model.LoginUser;
|
|
@@ -22,6 +24,7 @@ import com.ruoyi.system.mapper.SysDeptJlMapper;
|
|
|
import com.ruoyi.system.mapper.SysDjpdzbJbpzMapper;
|
|
|
import com.ruoyi.system.mapper.TaskMapper;
|
|
|
import com.ruoyi.system.service.impl.ProcessDefinitionServiceImpl;
|
|
|
+import com.ruoyi.system.utils.SysUserTypeUtil;
|
|
|
import org.activiti.bpmn.model.BpmnModel;
|
|
|
import org.activiti.bpmn.model.EndEvent;
|
|
|
import org.activiti.bpmn.model.FlowNode;
|
|
@@ -91,10 +94,10 @@ public class DjpdSqServiceImpl implements IDjpdSqService
|
|
|
private RemoteUserService userService;
|
|
|
@Autowired
|
|
|
private ProcessDefinitionServiceImpl definitionService;
|
|
|
-// @Autowired
|
|
|
-// private BusinessJgVH checkJgSczt;
|
|
|
-// @Autowired
|
|
|
-// private BusinessSqJgVH checkSqJgSczt;
|
|
|
+ @Autowired
|
|
|
+ private OrganizationJgScztVH checkJgSczt;
|
|
|
+ @Autowired
|
|
|
+ private OrganizationSqJgScztVH checkSqJgSczt;
|
|
|
/**
|
|
|
* 查询等级评定申请
|
|
|
*
|
|
@@ -347,33 +350,46 @@ public class DjpdSqServiceImpl implements IDjpdSqService
|
|
|
}
|
|
|
}
|
|
|
List<DjpdSq> res = djpdSqMapper.selectList(lqw);
|
|
|
- res.forEach(r -> r.setSzxzqh(sysDeptJlMapper.getXzqhNames(r.getSzxzqhId())));
|
|
|
+ res.forEach(r -> {
|
|
|
+ r.setSzxzqh(sysDeptJlMapper.getXzqhNames(r.getSzxzqhId()));
|
|
|
+ r.setLy(SysUserTypeUtil.getSysUserType(r.getCreateUserType()));
|
|
|
+ });
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<DjpdSq> selectDjpdSlList(DjpdSq djpdSq) {
|
|
|
- return djpdSqMapper.selectDjpdSlList(djpdSq);
|
|
|
+ List<DjpdSq> res = djpdSqMapper.selectDjpdSlList(djpdSq);
|
|
|
+ res.forEach(r -> r.setLy(SysUserTypeUtil.getSysUserType(r.getCreateUserType())));
|
|
|
+ return res;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<DjpdSq> selectDjpdShList(DjpdSq djpdSq) {
|
|
|
- return djpdSqMapper.selectDjpdShList(djpdSq);
|
|
|
+ List<DjpdSq> res = djpdSqMapper.selectDjpdShList(djpdSq);
|
|
|
+ res.forEach(r -> r.setLy(SysUserTypeUtil.getSysUserType(r.getCreateUserType())));
|
|
|
+ return res;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<DjpdSq> selectDjpdCqList(DjpdSq djpdSq) {
|
|
|
- return djpdSqMapper.selectDjpdCqList(djpdSq);
|
|
|
+ List<DjpdSq> res = djpdSqMapper.selectDjpdCqList(djpdSq);
|
|
|
+ res.forEach(r -> r.setLy(SysUserTypeUtil.getSysUserType(r.getCreateUserType())));
|
|
|
+ return res;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<DjpdSq> selectDjpdGxList(DjpdSq djpdSq) {
|
|
|
- return djpdSqMapper.selectDjpdGxList(djpdSq);
|
|
|
+ List<DjpdSq> res = djpdSqMapper.selectDjpdGxList(djpdSq);
|
|
|
+ res.forEach(r -> r.setLy(SysUserTypeUtil.getSysUserType(r.getCreateUserType())));
|
|
|
+ return res;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<DjpdSq> selectPdjgGxList(DjpdSq djpdSq) {
|
|
|
- return djpdSqMapper.selectPdjgGxList(djpdSq);
|
|
|
+ List<DjpdSq> res = djpdSqMapper.selectPdjgGxList(djpdSq);
|
|
|
+ res.forEach(r -> r.setLy(SysUserTypeUtil.getSysUserType(r.getCreateUserType())));
|
|
|
+ return res;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -391,28 +407,17 @@ public class DjpdSqServiceImpl implements IDjpdSqService
|
|
|
r.setIsFhyq(WhetherStatus.NO.getCode());
|
|
|
}
|
|
|
r.setGslx(lastGs.getGslx());
|
|
|
-// if (StringUtils.equals(lastGs.getGslx(), AnnounceStatus.RES.getCode())) {
|
|
|
-// Map<String, Object> dept = sysDeptJlMapper.selectDeptByParams(lastGs.getCreateUnit());
|
|
|
-// if (ObjectUtils.isNotEmpty(dept)) {
|
|
|
-// if (dept.containsKey(SysDeptJlStatus.ANCESTORS.getCode())) {
|
|
|
-// if (Arrays.asList(dept.get(SysDeptJlStatus.ANCESTORS.getCode()).toString().split(","))
|
|
|
-// .size() >= Arrays.asList(SecurityUtils.getLoginUser().getSysUser().getDept()
|
|
|
-// .getAncestors().split(",")).size()) {
|
|
|
-// r.setIsFhyq(WhetherStatus.YES.getCode());
|
|
|
-// } else {
|
|
|
-// r.setIsFhyq(WhetherStatus.NO.getCode());
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
}
|
|
|
+ r.setLy(SysUserTypeUtil.getSysUserType(r.getCreateUserType()));
|
|
|
});
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<DjpdSq> selectDjpdZsPbList(DjpdSq djpdSq) {
|
|
|
- return djpdSqMapper.selectDjpdZsPbList(djpdSq);
|
|
|
+ List<DjpdSq> res = djpdSqMapper.selectDjpdZsPbList(djpdSq);
|
|
|
+ res.forEach(r -> r.setLy(SysUserTypeUtil.getSysUserType(r.getCreateUserType())));
|
|
|
+ return res;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -425,6 +430,7 @@ public class DjpdSqServiceImpl implements IDjpdSqService
|
|
|
if (ObjectUtils.isNotEmpty(zspb)) {
|
|
|
r.setId(zspb.getId());
|
|
|
r.setZsyxjsrq(zspb.getZsyxjsrq());
|
|
|
+ r.setLy(SysUserTypeUtil.getSysUserType(r.getCreateUserType()));
|
|
|
}
|
|
|
});
|
|
|
return res;
|
|
@@ -432,17 +438,23 @@ public class DjpdSqServiceImpl implements IDjpdSqService
|
|
|
|
|
|
@Override
|
|
|
public List<DjpdSq> selectDjpdJbtjList(DjpdSq djpdSq) {
|
|
|
- return djpdSqMapper.selectDjpdJbtjList(djpdSq);
|
|
|
+ List<DjpdSq> res = djpdSqMapper.selectDjpdJbtjList(djpdSq);
|
|
|
+ res.forEach(r -> r.setLy(SysUserTypeUtil.getSysUserType(r.getCreateUserType())));
|
|
|
+ return res;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<DjpdSq> selectDjpdTxList(DjpdSq djpdSq) {
|
|
|
- return djpdSqMapper.selectDjpdTxList(djpdSq);
|
|
|
+ List<DjpdSq> res = djpdSqMapper.selectDjpdTxList(djpdSq);
|
|
|
+ res.forEach(r -> r.setLy(SysUserTypeUtil.getSysUserType(r.getCreateUserType())));
|
|
|
+ return res;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<DjpdSq> selectDjpdXzpdList(DjpdSq djpdSq) {
|
|
|
- return djpdSqMapper.selectDjpdXzpdList(djpdSq);
|
|
|
+ List<DjpdSq> res = djpdSqMapper.selectDjpdXzpdList(djpdSq);
|
|
|
+ res.forEach(r -> r.setLy(SysUserTypeUtil.getSysUserType(r.getCreateUserType())));
|
|
|
+ return res;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -470,17 +482,6 @@ public class DjpdSqServiceImpl implements IDjpdSqService
|
|
|
DjpdGs gsxx = djpdGsMapper.selectOne(gsLqw);
|
|
|
if (ObjectUtils.isNotEmpty(gsxx)) {
|
|
|
if (checkTimeForGs(gsxx.getJsrq())) {
|
|
|
-// if (StringUtils.equals(sq.getSqzt(), ApplicationStatus.FPUB.getCode())) {
|
|
|
-// sq.setSqzt(ApplicationStatus.EXT.getCode());
|
|
|
-// djpdSqMapper.updateById(sq);
|
|
|
-// gsxx.setStatus(DataStatus.DELETE.getCode());
|
|
|
-// djpdGsMapper.updateById(gsxx);
|
|
|
-// } else {
|
|
|
-// sq.setSqzt(ApplicationStatus.ISS.getCode());
|
|
|
-// djpdSqMapper.updateById(sq);
|
|
|
-// gsxx.setStatus(DataStatus.DELETE.getCode());
|
|
|
-// djpdGsMapper.updateById(gsxx);
|
|
|
-// }
|
|
|
sq.setSqzt(definitionService.getDjpdSqztByInstanceId(sq.getInstanceId()));
|
|
|
djpdSqMapper.updateById(sq);
|
|
|
gsxx.setStatus(DataStatus.DELETE.getCode());
|
|
@@ -491,15 +492,16 @@ public class DjpdSqServiceImpl implements IDjpdSqService
|
|
|
logger.error(e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
-// LambdaQueryWrapper<DjpdSq> allLqw = new LambdaQueryWrapper<DjpdSq>();
|
|
|
-// List<DjpdSq> sqList = djpdSqMapper.selectList(allLqw);
|
|
|
-// for (DjpdSq sq: sqList) {
|
|
|
-// if (!checkJgSczt.check(sq.getJgId()) && !checkSqJgSczt.check(sq.getJgId())) {
|
|
|
-// stopRunProcessInstance(sq.getInstanceId());
|
|
|
-// sq.setState(StateStatus.DELETE.getCode());
|
|
|
-// djpdSqMapper.updateById(sq);
|
|
|
-// }
|
|
|
-// }
|
|
|
+ LambdaQueryWrapper<DjpdSq> allLqw = new LambdaQueryWrapper<DjpdSq>()
|
|
|
+ .eq(DjpdSq::getStatus, DataStatus.NORMAL.getCode());
|
|
|
+ List<DjpdSq> sqList = djpdSqMapper.selectList(allLqw);
|
|
|
+ for (DjpdSq sq: sqList) {
|
|
|
+ if (!checkJgSczt.check(sq.getJgId()) && !checkSqJgSczt.check(sq.getJgId())) {
|
|
|
+ stopRunProcessInstance(sq.getInstanceId());
|
|
|
+ sq.setStatus(DataStatus.DELETE.getCode());
|
|
|
+ djpdSqMapper.updateById(sq);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public void stopRunProcessInstance(String insId) {
|