From 2bc94fed189ef2da4112f9f836343a6a579b93c6 Mon Sep 17 00:00:00 2001 From: Fancy <Fancy.fx@outlook.com> Date: 星期三, 10 七月 2024 17:25:31 +0800 Subject: [PATCH] add a inputtime and outputtime --- pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/AssemblySv.java | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/AssemblySv.java b/pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/AssemblySv.java index 2739d45..8e318f6 100644 --- a/pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/AssemblySv.java +++ b/pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/AssemblySv.java @@ -106,7 +106,14 @@ if(process == null || !process.proId.equals(plan.proId)){ throw new RuntimeException("浜у搧涓庣敓浜ф祦绋嬩笉鍖归厤"); } + PrAssemblyPlan origPlan = assemblyDao.selectByPrimaryKey(plan.id); + PrBatchNumber batch = batchDao.selectByPrimaryKey(origPlan.batchId); //濡傛灉鏈夋姇鍏�,浜у搧鍜屾祦绋嬩笉鑳藉彉鏇� + if(origPlan.getInputNumber() > 0){ + if(!origPlan.proId.equals(plan.proId) || !origPlan.processId.equals(plan.processId)){ + throw new RuntimeException("璁″垝宸叉姇鍏�,浜у搧涓庣敓浜ф祦绋嬩笉鑳藉彉鏇�"); + } + } //Fancy add 2024/07/09 濡傛灉鐘舵�佷负鎵ц ,鍒欑粨鏉熸棩鏈熷繀椤诲ぇ浜庣瓑浜庡綋鍓嶆棩鏈� if(plan.status == PlanStatusEnum.NORMAL.getCode()){ String endDateStr = plan.getEndDate(); @@ -117,8 +124,7 @@ throw new RuntimeException("鎵ц鐘舵�佺粨鏉熸棩鏈熷繀椤诲ぇ浜庣瓑浜庡綋鍓嶆棩鏈�"); } } - PrAssemblyPlan origPlan = assemblyDao.selectByPrimaryKey(plan.id); - PrBatchNumber batch = batchDao.selectByPrimaryKey(origPlan.batchId); + //浜у搧鏀瑰彉鍒欐洿鏂板叏閮ㄥ凡鐢熸垚璁惧鍙� if(origPlan.proId != plan.proId){ batch.proId = plan.proId; -- Gitblit v1.8.0