|
@@ -1406,6 +1406,7 @@ public class ZhcxInsideInspectionServiceImpl extends ServiceImpl<ZhcxInsideInspe
|
|
|
* @param operType 操作类型 10: 取消 20: 拒收 30: 派单 40: 转派 50: 接收 60: 有条件接收 70:修改检验开始结束时间
|
|
|
*/
|
|
|
private void saveResultToNodeState(ZhcxInsideInspectionDo itpDoPa, String operType) {
|
|
|
+ SysUserVo currUser = zhcxCommon.getCurrentUser();
|
|
|
ZhcxInsideInspectionDo itpDo = getById(itpDoPa.getId());
|
|
|
|
|
|
if("unitp".equals(itpDo.getLaunchtype())) {
|
|
@@ -1429,26 +1430,52 @@ public class ZhcxInsideInspectionServiceImpl extends ServiceImpl<ZhcxInsideInspe
|
|
|
ZhcxItpProjectNodeStateDo stateDo = itpProjectNodeStateService.getOne(queryWrapper);
|
|
|
|
|
|
ZhcxItpProjectNodeStateDo entity = new ZhcxItpProjectNodeStateDo();
|
|
|
+
|
|
|
if(ObjectUtil.isNull(stateDo)) {
|
|
|
entity.setId(SecurityUtil.getUUID());
|
|
|
entity.setMathinecode(mn);
|
|
|
entity.setPrjid(itpDo.getProjectid());
|
|
|
entity.setNodeid(itpDo.getInspectioncontentid());
|
|
|
entity.setDeleted("0");
|
|
|
- entity.setInstate(operType);
|
|
|
entity.setIncompletetime(itpDoPa.getInspectioncomplatetime());
|
|
|
entity.setIntimes(itpDo.getInspectioncount());
|
|
|
entity.setCreatedate(new Date());
|
|
|
- entity.setModifydate(new Date());
|
|
|
-// itpProjectNodeStateService.save(entity);
|
|
|
+ entity.setCreateuserid(currUser.getId());
|
|
|
+ entity.setCreateusername(currUser.getName());
|
|
|
+ updateNodeState(entity, operType);
|
|
|
+ itpProjectNodeStateService.save(entity);
|
|
|
} else {
|
|
|
- stateDo.setInstate(operType);
|
|
|
stateDo.setIncompletetime(itpDoPa.getInspectioncomplatetime());
|
|
|
stateDo.setIntimes(itpDo.getInspectioncount());
|
|
|
- stateDo.setModifydate(new Date());
|
|
|
-// itpProjectNodeStateService.updateById(stateDo);
|
|
|
+ updateNodeState(stateDo, operType);
|
|
|
+ itpProjectNodeStateService.updateById(stateDo);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private void updateNodeState(ZhcxItpProjectNodeStateDo entity, String operType) {
|
|
|
+ SysUserVo currUser = zhcxCommon.getCurrentUser();
|
|
|
+ entity.setModifydate(new Date());
|
|
|
+ entity.setModifyuserid(currUser.getId());
|
|
|
+ entity.setModifyusername(currUser.getName());
|
|
|
+ //取消
|
|
|
+ if("10".equals(operType)) {
|
|
|
+ entity.setInstate("40");
|
|
|
+ }
|
|
|
+ //拒收
|
|
|
+ if("20".equals(operType)) {
|
|
|
+ entity.setInstate("20");
|
|
|
+ }
|
|
|
+
|
|
|
+ //接收
|
|
|
+ if("50".equals(operType)) {
|
|
|
+ entity.setInstate("10");
|
|
|
+ }
|
|
|
+
|
|
|
+ //有条件接收
|
|
|
+ if ("60".equals(operType)) {
|
|
|
+ entity.setInstate("30");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|