From d175d9c401fb97ebe6a580005a8c9ad5fedccb6b Mon Sep 17 00:00:00 2001 From: Fancy <Fancy.fx@outlook.com> Date: 星期一, 29 七月 2024 17:02:41 +0800 Subject: [PATCH] add other method --- pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java index 710091f..336c43f 100644 --- a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java +++ b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java @@ -390,7 +390,24 @@ } return count; } - + //鏃犱换鍔¤鍒掍腑鐨勫叾浠� 浼爓orkId ,鎵嬪啓宸ヤ綔鍐呭 , 鏁伴噺 + @Transactional + public int other(QueryVo vo) { + long workId = Long.parseLong(vo.workId); + StaAssemblyWorkLast workLast = assemblyWorkLastDao.selectByPrimaryKey(workId); + if (workLast == null) { + throw new RuntimeException("绯荤粺涓病鏈夎鏉$櫥褰曚俊鎭�"); + } + StaDeviceLast deviceLast = buildDeviceLast(vo, workLast, vo.deviceNo[0]); + int count = deviceLast.id == null ? deviceLastDao.insertSelective(deviceLast) : + deviceLastDao.updateByPrimaryKeySelective(deviceLast); + saveDeviceProductionLog(deviceLast); + PrProductionNode node = nodeDao.selectByPrimaryKey(workLast.nodeId); + if (node.isRecord) { + saveDeviceLife(deviceLast); + } + return count; + } //鏍规嵁鑺傜偣鏌ュ嚭鑺傜偣浣滀笟鎸囧涔� public PrProductionNode getSopByNodeId(String nodeId) { if (com.alibaba.excel.util.StringUtils.isBlank(nodeId)) { -- Gitblit v1.8.0