From dfd793f14e51c48c3322f1b36f543179043bd45d Mon Sep 17 00:00:00 2001 From: jiazx0107@163.com <jiazx0107@163.com> Date: 星期日, 22 十月 2023 18:25:27 +0800 Subject: [PATCH] 更新仓内抓拍 --- igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager2.java | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) diff --git a/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager2.java b/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager2.java index cff4ca8..ad0ae3a 100644 --- a/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager2.java +++ b/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager2.java @@ -15,6 +15,7 @@ import com.ld.igds.inout.dto.InoutParam; import com.ld.igds.inout.dto.InoutRecordItemData; import com.ld.igds.inout.dto.InoutRecordItemParam; +import com.ld.igds.inout.mapper.InoutRecordMapper; import com.ld.igds.inout.service.InoutRecordItemService; import com.ld.igds.inout.service.InoutService; import com.ld.igds.m.dto.NoticeParam; @@ -59,6 +60,8 @@ private InoutCommonService inoutManagerService; @Resource private HInoutCarConfService carConfService; + @Autowired + private InoutRecordMapper inoutMapper; /** * 鍑哄叆搴撴祦绋嬩腑鐨勫疄鏃舵暟鎹紝鐩存帴浠庣紦瀛樹腑鑾峰彇 @@ -226,6 +229,9 @@ // 璋冪敤淇濆瓨鏂规硶鎵ц if (null == data.getIntelCard()) { data.setIntelCard(data.getUserId()); + } + if (null == data.getRegisterTime()) { + data.setRegisterTime(new Date()); } msg = inoutService.insertData(data); @@ -475,6 +481,12 @@ if (InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) { //璇存槑娴佺▼宸茬粨鏉燂紝閲嶆柊缁熻鏁伴噺 inoutRecordItemService.updateNumByInoutItem(data.getRecordId()); + InoutParam param = new InoutParam(); + param.setId(data.getRecordId()); + param.setType(data.getType()); + param.setCompanyId(data.getCompanyId()); + InoutData completeData = inoutMapper.inoutQueryById(param); + inoutService.updateInoutCache(completeData); return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), null, data); } else { @@ -591,7 +603,8 @@ // } } } - + InoutData completeData = inoutMapper.inoutQueryById(inoutParam); + inoutService.updateInoutCache(completeData); return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), null, data); } @@ -637,7 +650,6 @@ param.setCompanyId(user.getCompanyId()); } param.setDeptId(ContextUtil.subDeptId(user)); - param.setCompleteStatus(InoutConstant.COMPLETE_STATUS_NONE); List<InoutNoticeIn> list = inoutManagerService.listNoticeIn(param); @@ -671,8 +683,8 @@ //鑾峰彇浠撳簱淇℃伅 List<Depot> depotList = coreCommonService.getCacheDepotList(param.getCompanyId(), param.getDeptId()); - Map<String,String> map = new HashMap<>(); - if(depotList != null && depotList.size() > 0){ + Map<String, String> map = new HashMap<>(); + if (depotList != null && depotList.size() > 0) { for (Depot depot : depotList) { map.put(depot.getId(), depot.getName()); } @@ -680,7 +692,7 @@ //璧嬪�间粨搴撳悕绉� for (InoutNoticeOut inoutNoticeOut : list) { - if(map.get(inoutNoticeOut.getDepotId()) != null){ + if (map.get(inoutNoticeOut.getDepotId()) != null) { inoutNoticeOut.setDepotName(map.get(inoutNoticeOut.getDepotId())); } } -- Gitblit v1.9.3