Fancy
2024-07-19 1d27648989e69042db607d14c474d9ea90f86d7b
lineName change
5个文件已修改
59 ■■■■ 已修改文件
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationSv.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/process/ProcessSv.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderSv.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationSv.java
@@ -85,12 +85,12 @@
        boolean flag = false;
        List<PltStation>  stations = dao.selectByName(station.getName());
        for (int i = 0; i < stations.size(); i++) {
            if(stations.get(i).getId().equals(station.getId())){
            if(!stations.get(i).getId().equals(station.getId())){
                flag = true;
                break;
            }
        }
        if(!flag){
        if(flag){
            throw new RuntimeException("工站名称("+station.getName()+")已存在,名称不允许重复添加,请变更");
        }
        int count = dao.updateByPrimaryKeySelective(station);
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/process/ProcessSv.java
@@ -107,11 +107,11 @@
        if (CollectionUtils.isNotEmpty(planList)) {
            if (planList.stream().anyMatch(plan -> plan.getInputNumber() > 0)) { //存在任务已经投入生产
                if (!originProductionProcess.getProId().equals(process.getProId())) {
                    throw new RuntimeException("存在已经投入生产绑定的任务,产品不能修改");
                    throw new RuntimeException("存在已经投入生产的绑定任务,产品不能修改");
                }
                //节点id不能删除
                if (!originProductionProcess.getNodes().stream().allMatch(node -> process.getNodes().stream().anyMatch(newNode ->  node.getId().equals(newNode.getId())))) {
                    throw new RuntimeException("存在已经投入生产绑定的任务,节点不能删除");
                    throw new RuntimeException("已有绑定的任务投入生产,节点不能删除");
                }
            } else if (CollectionUtils.isNotEmpty(onlinePlanList)) {
                //先将组装任务置为暂停状态
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java
@@ -45,7 +45,6 @@
    /**
     * 测试或品检都调用这个接口
     *
     * @param vo
     * @return
     */
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java
@@ -325,16 +325,6 @@
        }
        throw new RuntimeException("状态错误,无效的节点类型: " + workType);
    }
    public int repair(QueryVo vo) {
        long workId = Long.parseLong(vo.workId);
        StaAssemblyWorkLast workLast = assemblyWorkLastDao.selectByPrimaryKey(workId);
@@ -495,6 +485,7 @@
        map.put("proName", "");
        map.put("proType", "");
        map.put("proId", "");
        map.put("proCode", "");
        //判断是不是是本厂物料
        if(CollectionUtils.isEmpty(productList)){
            productList = productDao.selectAll(null);
@@ -509,10 +500,41 @@
            map.put("proType", product.getType());
            BigInteger proId = BigInteger.valueOf(product.getId());
            map.put("proId", proId.toString());
            map.put("proCode",product.getCode());
        }
        return map;
    }
   /* public PrAssemblyPlan queryPlanByDeviceNo(String deviceNo) {
        String proCode = "";
        String lotCode = "";
        if (StringUtils.isNotEmpty(deviceNo) && deviceNo.length() == 22) {
            proCode = deviceNo.substring(3,6);
            lotCode = deviceNo.substring(6,15);
        }
        Map<String, String> map = new HashMap<>();
        map.put("deviceNo", deviceNo);
        map.put("proName", "");
        map.put("proType", "");
        map.put("proId", "");
        map.put("proCode", "");
        //判断是不是是本厂物料
        if(CollectionUtils.isEmpty(productList)){
            productList = productDao.selectAll(null);
        }
        PltProduct product = null;
        if (product != null) {
            map.put("deviceNo", deviceNo);
            map.put("proName", product.getName());
            map.put("proType", product.getType());
            BigInteger proId = BigInteger.valueOf(product.getId());
            map.put("proId", proId.toString());
            map.put("proCode",product.getCode());
        }
        return map;
    }
*/
    public List<StaDeviceLife> queryLifeByDeviceNo(String deviceNo) {
        return deviceLifeDao.selectByDeviceNo(deviceNo);
    }
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderSv.java
@@ -34,6 +34,11 @@
    private static final int STATUS_REPAIR = 3;
    private static final int STATUS_WASTE = 4;
    private static final String WORK_TYPE_ASSEMBLY = "1";
    private static final String WORK_TYPE_TEST = "2";
    private static final String WORK_TYPE_INSPECTION = "3";
    private static final String WORK_TYPE_REPAIR = "4";
    private static final String USER_PREFIX = "101";
    private static final String STATION_PREFIX = "103";
@@ -186,6 +191,8 @@
        }
        BaUser userInfo = getUserInfo(result.getUserId().toString());
        PltStation stationInfo = getStationInfo(result.getStationId().toString());
        //如果是维修work_type 没有 planId processId nodeId
        if (WORK_TYPE_REPAIR.equals(result.getWorkType())) {
        //校验planId processId nodeId
        PrAssemblyPlan assyPlan = assemblyDao.selectByPrimaryKey(result.getPlanId());
        boolean hasNodeId = assyPlan.getProcess().getNodes().stream()
@@ -225,6 +232,7 @@
                result.setDevicePrefix(devicePrefix);
            }
        }
        }
        result.setStationId(stationInfo.getId());
        result.setStationName(stationInfo.getName());
        result.setLineId(stationInfo.getLineId());