Fancy
2024-06-24 ee673c3e71b28598d45074a9df2a93ea057b6b65
debug edit
1个文件已修改
17 ■■■■■ 已修改文件
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderSv.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderSv.java
@@ -5,17 +5,14 @@
import com.dy.pmsGlobal.daoOth.OthFileMapper;
import com.dy.pmsGlobal.daoPlt.PltStationMapper;
import com.dy.pmsGlobal.daoPr.PrAssemblyPlanMapper;
import com.dy.pmsGlobal.daoPr.PrProductionNodeMapper;
import com.dy.pmsGlobal.daoPr.PrProductionProcessMapper;
import com.dy.pmsGlobal.daoPr.PrWorkingInstructionMapper;
import com.dy.pmsGlobal.daoSta.StaAssemblyWorkLastMapper;
import com.dy.pmsGlobal.dyFile.FileOperate;
import com.dy.pmsGlobal.dyFile.FileRestVo;
import com.dy.pmsGlobal.pojoBa.BaUser;
import com.dy.pmsGlobal.pojoOth.OthFile;
import com.dy.pmsGlobal.pojoPlt.PltProductionLine;
import com.dy.pmsGlobal.pojoPlt.PltStation;
import com.dy.pmsGlobal.pojoPr.PrAssemblyPlan;
import com.dy.pmsGlobal.pojoPr.PrProductionNode;
import com.dy.pmsGlobal.pojoPr.PrWorkingInstruction;
import com.dy.pmsGlobal.pojoSta.StaAssemblyWorkLast;
import lombok.extern.slf4j.Slf4j;
@@ -27,6 +24,7 @@
import java.util.Date;
import java.util.List;
import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.Collectors;
@Slf4j
@@ -143,6 +141,8 @@
                BeanUtils.copyProperties(userStationList.get(0),result);
            }
        }else{
            result.setUserId(userInfo.getId());
            result.setUserName(userInfo.getName());
            result.setStationId(stationInfo.getId());
            result.setStationName(stationInfo.getName());
            result.setLineId(stationInfo.getLineId());
@@ -159,9 +159,12 @@
        params.setId(last.getPlanId());
        params.setProcessId(last.getProcessId());
        List<PrAssemblyPlan> planList = selectAssyPlanList(params);
        planList.stream().forEach(process -> {
            process.nodes.stream().filter(node -> node.id == last.getNodeId());
        });
        boolean hasNodeId= planList.stream()
                .flatMap(process -> process.nodes.stream())
                .anyMatch(node -> node.id.equals(last.getNodeId()));
        if(!hasNodeId){
            throw new RuntimeException("节点信息有误或被其他人员修改,请重新选择节点信息");
        }
        last.setLineId(checkResult.getLineId());
        StaAssemblyWorkLast staLast = new StaAssemblyWorkLast();
        BeanUtils.copyProperties(last,staLast);