|
@@ -2357,56 +2357,62 @@ public class ZhcxInsideInspectionServiceImpl extends ServiceImpl<ZhcxInsideInspe
|
|
|
return ;
|
|
|
}
|
|
|
|
|
|
- ZhcxInsideInspectionDo itpDo = inOper.getInspection();
|
|
|
+ ZhcxInsideInspectionDo inside = inOper.getInspection();
|
|
|
String machineNo = inOper.getInspection().getMachineno();
|
|
|
if (StringUtils.isBlank(machineNo)) {
|
|
|
machineNo = inOper.getInspection().getStructuremachineno();
|
|
|
}
|
|
|
if (StringUtils.isBlank(machineNo)) {
|
|
|
- log.error("{}-{}:总装机号和结构机号都没有", itpDo.getId(), itpDo.getInspectioncode());
|
|
|
+ log.error("{}-{}:总装机号和结构机号都没有", inside.getId(), inside.getInspectioncode());
|
|
|
return;
|
|
|
}
|
|
|
- String[] machinenos = machineNo.split(",");
|
|
|
- for (String mn : machinenos) {
|
|
|
- LambdaQueryWrapper<ZhcxItpProjectNodeStateDo> queryWrapper = Wrappers.lambdaQuery();
|
|
|
- queryWrapper.eq(ZhcxItpProjectNodeStateDo::getPrjid, itpDo.getProjectid())
|
|
|
- .eq(ZhcxItpProjectNodeStateDo::getMathinecode, mn)
|
|
|
- .eq(ZhcxItpProjectNodeStateDo::getNodeid, itpDo.getInspectioncontentid());
|
|
|
- List<ZhcxItpProjectNodeStateDo> stateList = itpProjectNodeStateService.list(queryWrapper);
|
|
|
- ZhcxItpProjectNodeStateDo stateDo = BusinessFunUtils.getPrjNodeState(stateList);
|
|
|
-
|
|
|
- if(ObjectUtil.isNull(stateDo)) {
|
|
|
- stateDo = new ZhcxItpProjectNodeStateDo();
|
|
|
- stateDo.setId(SecurityUtil.getUUID());
|
|
|
- stateDo.setMathinecode(mn);
|
|
|
- stateDo.setPrjid(itpDo.getProjectid());
|
|
|
- stateDo.setNodeid(itpDo.getInspectioncontentid());
|
|
|
- stateDo.setDeleted("0");
|
|
|
-
|
|
|
- stateDo.setCreatedate(inOper.getOperTime());
|
|
|
- stateDo.setCreateuserid(inOper.getOperUser().getId());
|
|
|
- stateDo.setCreateusername(inOper.getOperUser().getName());
|
|
|
+ String[] machinenos = machineNo.split(","); //机号
|
|
|
+ final String[] nodeIds = inside.getInspectioncontentid().split(","); //报验点id
|
|
|
+
|
|
|
+ for(String nodeId : nodeIds) { // 报验点
|
|
|
+ for (String mn : machinenos) { // 机号
|
|
|
+
|
|
|
+ //查询报验点状态表中
|
|
|
+ LambdaQueryWrapper<ZhcxItpProjectNodeStateDo> queryWrapper = Wrappers.lambdaQuery();
|
|
|
+ queryWrapper.eq(ZhcxItpProjectNodeStateDo::getPrjid, inside.getProjectid())
|
|
|
+ .eq(ZhcxItpProjectNodeStateDo::getMathinecode, mn)
|
|
|
+ .eq(ZhcxItpProjectNodeStateDo::getNodeid, nodeId);
|
|
|
+ List<ZhcxItpProjectNodeStateDo> stateList = itpProjectNodeStateService.list(queryWrapper);
|
|
|
+ ZhcxItpProjectNodeStateDo stateDo = BusinessFunUtils.getPrjNodeState(stateList);
|
|
|
+
|
|
|
+ if(ObjectUtil.isNull(stateDo)) {
|
|
|
+ stateDo = new ZhcxItpProjectNodeStateDo();
|
|
|
+ stateDo.setId(SecurityUtil.getUUID());
|
|
|
+ stateDo.setMathinecode(mn);
|
|
|
+ stateDo.setPrjid(inside.getProjectid());
|
|
|
+ stateDo.setNodeid(nodeId);
|
|
|
+ stateDo.setDeleted("0");
|
|
|
+
|
|
|
+ stateDo.setCreatedate(inOper.getOperTime());
|
|
|
+ stateDo.setCreateuserid(inOper.getOperUser().getId());
|
|
|
+ stateDo.setCreateusername(inOper.getOperUser().getName());
|
|
|
// entity.setIncompletetime(itpDoPa.getInspectioncomplatetime());
|
|
|
- assembleUpdateNodeState(stateDo, inOper, complateTime, false);
|
|
|
+ assembleUpdateNodeState(stateDo, inOper, complateTime, false);
|
|
|
|
|
|
- nodeStateBo.getInsertList().add(stateDo);
|
|
|
- } else {
|
|
|
+ nodeStateBo.getInsertList().add(stateDo);
|
|
|
+ } else {
|
|
|
// stateDo.setIncompletetime(itpDoPa.getInspectioncomplatetime());
|
|
|
- assembleUpdateNodeState(stateDo, inOper, complateTime, true);
|
|
|
+ assembleUpdateNodeState(stateDo, inOper, complateTime, true);
|
|
|
|
|
|
- nodeStateBo.getUpdateList().add(stateDo);
|
|
|
- }
|
|
|
+ nodeStateBo.getUpdateList().add(stateDo);
|
|
|
+ }
|
|
|
|
|
|
- // 报验点-内部报验单
|
|
|
- ZhcxItpProjectNodeStateInsideDo stateInside = new ZhcxItpProjectNodeStateInsideDo();
|
|
|
- stateInside.setId(SecurityUtil.getUUID());
|
|
|
- stateInside.setDeleted("0");
|
|
|
- stateInside.setInsideid(itpDo.getId());
|
|
|
- stateInside.setStateid(stateDo.getId());
|
|
|
- stateInside.setInspectioncode(itpDo.getInspectioncode());
|
|
|
- stateInside.setLaunchtype(itpDo.getLaunchtype());
|
|
|
- stateInside.setStateid(stateDo.getId());
|
|
|
- nodeStateBo.getInsideStateList().add(stateInside);
|
|
|
+ // 报验点-内部报验单
|
|
|
+ ZhcxItpProjectNodeStateInsideDo stateInside = new ZhcxItpProjectNodeStateInsideDo();
|
|
|
+ stateInside.setId(SecurityUtil.getUUID());
|
|
|
+ stateInside.setDeleted("0");
|
|
|
+ stateInside.setInsideid(inside.getId());
|
|
|
+ stateInside.setStateid(stateDo.getId());
|
|
|
+ stateInside.setInspectioncode(inside.getInspectioncode());
|
|
|
+ stateInside.setLaunchtype(inside.getLaunchtype());
|
|
|
+ stateInside.setStateid(stateDo.getId());
|
|
|
+ nodeStateBo.getInsideStateList().add(stateInside);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|