wangming 1 vuosi sitten
vanhempi
commit
9e3c993bb3

+ 34 - 15
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxInsideInspectionServiceImpl.java

@@ -1454,23 +1454,42 @@ public class ZhcxInsideInspectionServiceImpl extends ServiceImpl<ZhcxInsideInspe
                     .eq(ZhcxItpProjectNodeStateDo::getNodeid, itpDo.getInspectioncontentid());
             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.setIncompletetime(itpDoPa.getInspectioncomplatetime());
-                entity.setIntimes(itpDo.getInspectioncount());
-                entity.setCreatedate(new Date());
-                entity.setCreateuserid(currUser.getId());
-                entity.setCreateusername(currUser.getName());
-                updateNodeState(entity, operType);
-                itpProjectNodeStateService.save(entity);
+                stateDo = new ZhcxItpProjectNodeStateDo();
+                stateDo.setId(SecurityUtil.getUUID());
+                stateDo.setMathinecode(mn);
+                stateDo.setPrjid(itpDo.getProjectid());
+                stateDo.setNodeid(itpDo.getInspectioncontentid());
+                stateDo.setDeleted("0");
+//                entity.setIncompletetime(itpDoPa.getInspectioncomplatetime());
+
+                //接收
+                if("50".equals(operType)) {
+                    stateDo.setIncompletetime(itpDoPa.getInspectioncomplatetime());
+                }
+                //有条件接收
+                else if ("60".equals(operType)) {
+                    stateDo.setIncompletetime(itpDoPa.getInspectioncomplatetime());
+                }
+
+                stateDo.setIntimes(itpDo.getInspectioncount());
+                stateDo.setCreatedate(new Date());
+                stateDo.setCreateuserid(currUser.getId());
+                stateDo.setCreateusername(currUser.getName());
+                updateNodeState(stateDo, operType);
+                itpProjectNodeStateService.save(stateDo);
             } else {
-                stateDo.setIncompletetime(itpDoPa.getInspectioncomplatetime());
+//                stateDo.setIncompletetime(itpDoPa.getInspectioncomplatetime());
+
+                //接收
+                if("50".equals(operType)) {
+                    stateDo.setIncompletetime(itpDoPa.getInspectioncomplatetime());
+                }
+                //有条件接收
+                else if ("60".equals(operType)) {
+                    stateDo.setIncompletetime(itpDoPa.getInspectioncomplatetime());
+                }
+
                 stateDo.setIntimes(itpDo.getInspectioncount());
                 updateNodeState(stateDo, operType);
                 itpProjectNodeStateService.updateById(stateDo);