liuxm
2024-06-06 cda0faf3128ed97e7519d1ca04be079aea64dd93
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/AssemblySv.java
@@ -74,7 +74,7 @@
            throw new RuntimeException("计划名称不能重复");
        }
        PrProductionProcess process = processDao.selectByPrimaryKey(plan.processId);
        if(process == null || process.proId != plan.proId){
        if(process == null || !process.proId.equals(plan.proId)){
            throw new RuntimeException("产品与生产流程不匹配");
        }
        PrBatchNumber batch = new PrBatchNumber();
@@ -100,6 +100,10 @@
        //计划名称不能重复
        if(assemblyDao.exists(plan.name,plan.id)){
            throw new RuntimeException("计划名称不能重复");
        }
        PrProductionProcess process = processDao.selectByPrimaryKey(plan.processId);
        if(process == null || !process.proId.equals(plan.proId)){
            throw new RuntimeException("产品与生产流程不匹配");
        }
        PrAssemblyPlan origPlan = assemblyDao.selectByPrimaryKey(plan.id);
        PrBatchNumber batch = batchDao.selectByPrimaryKey(origPlan.batchId);
@@ -253,6 +257,6 @@
        PrAssemblyPlan param = new PrAssemblyPlan();
        param.id =plan.id;
        param.status = plan.status;
        return assemblyDao.updateByPrimaryKeySelective(plan);
        return assemblyDao.updateByPrimaryKeySelective(param);
    }
}