From ee7f2c1ff8b8bdc2352db35dc26253ac8e4d832d Mon Sep 17 00:00:00 2001 From: Fancy <Fancy.fx@outlook.com> Date: 星期三, 24 七月 2024 11:06:30 +0800 Subject: [PATCH] check station API add check line disabled --- pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderSv.java | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderSv.java b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderSv.java index 03fe92e..07644ac 100644 --- a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderSv.java +++ b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderSv.java @@ -3,6 +3,7 @@ import com.alibaba.excel.util.StringUtils; import com.dy.pmsGlobal.daoBa.BaUserMapper; import com.dy.pmsGlobal.daoPlt.PltProductMapper; +import com.dy.pmsGlobal.daoPlt.PltProductionLineMapper; import com.dy.pmsGlobal.daoPlt.PltStationMapper; import com.dy.pmsGlobal.daoPr.PrAssemblyPlanMapper; import com.dy.pmsGlobal.daoPr.PrProductionNodeMapper; @@ -10,6 +11,7 @@ import com.dy.pmsGlobal.daoSta.StaAssemblyWorkLastMapper; import com.dy.pmsGlobal.pojoBa.BaUser; import com.dy.pmsGlobal.pojoPlt.PltProduct; +import com.dy.pmsGlobal.pojoPlt.PltProductionLine; import com.dy.pmsGlobal.pojoPlt.PltStation; import com.dy.pmsGlobal.pojoPr.PrAssemblyPlan; import com.dy.pmsGlobal.pojoPr.PrProductionNode; @@ -49,6 +51,7 @@ private StaAssemblyWorkHistoryMapper assemblyWorkHistoryDao; private PrProductionNodeMapper nodeDao; private PltProductMapper productDao; + private PltProductionLineMapper lineDao; @Autowired public void setAssemblyDao(PrAssemblyPlanMapper assemblyDao) { @@ -85,6 +88,10 @@ this.productDao = productDao; } + @Autowired + public void setLineDao(PltProductionLineMapper lineDao) { + this.lineDao = lineDao; + } public BaUser getUserInfo(String id) { Long userId = null; @@ -124,6 +131,13 @@ } else if (stationInfo.getDisabled()) { throw new RuntimeException("宸ョ珯(" + stationInfo.getName() + ")缂栫爜:" + stationId + "鍦ㄧ郴缁熷凡绂佺敤,璇峰厛鍚敤宸ョ珯"); } + //妫�鏌ョ嚎浣撴槸鍚﹁绂佺敤 + PltProductionLine lineInfo = lineDao.selectByPrimaryKey(stationInfo.getLineId()); + if (lineInfo == null ) { + throw new RuntimeException("宸ョ珯(" + stationInfo.getName() + ")缂栫爜:" + stationId + "鎵�鍦ㄧ嚎浣撶紪鐮�:" + lineInfo.getId() + "鍦ㄧ郴缁熶笉瀛樺湪,璇峰厛鎵剧鐞嗕汉鍛樻鏌�"); + }else if(lineInfo.getDisabled()){ + throw new RuntimeException("宸ョ珯(" + stationInfo.getName() + ")缂栫爜:" + stationId + "鎵�鍦ㄧ嚎浣撶紪鐮�:" + lineInfo.getName() + "鍦ㄧ郴缁熷凡绂佺敤,璇峰厛鍚敤绾夸綋"); + } return stationInfo; } -- Gitblit v1.8.0