From 1c1472f51d68382f913e413aa827fd0b028ab589 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期六, 13 七月 2024 16:44:20 +0800
Subject: [PATCH] 更改配置信息
---
igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager2.java | 54 +++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 49 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 c90ac15..8a29e9d 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;
@@ -28,6 +29,7 @@
import com.ld.igds.util.DateUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
@@ -59,6 +61,8 @@
private InoutCommonService inoutManagerService;
@Resource
private HInoutCarConfService carConfService;
+ @Autowired
+ private InoutRecordMapper inoutMapper;
/**
* 鍑哄叆搴撴祦绋嬩腑鐨勫疄鏃舵暟鎹紝鐩存帴浠庣紦瀛樹腑鑾峰彇
@@ -83,6 +87,26 @@
result.put("listProgress", listProgress);
result.put("listComplete", listComplete);
+ return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "鎵ц瀹屾垚", result);
+ }
+
+ public PageResponse<List<InoutData>> listOnlyProgress(InoutParam param) {
+
+ String type = param.getType();
+ //褰撳墠娴佺▼涓�
+ List<InoutData> listProgress = inoutService.getListInoutCache(param.getDeptId());
+ List<InoutData> result = new ArrayList<>();
+ if (null == listProgress || listProgress.isEmpty()) {
+ return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "鎵ц瀹屾垚", result);
+ }
+
+ if (null == type) {
+ return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "鎵ц瀹屾垚", result);
+ }
+
+ for (InoutData data : listProgress) {
+ if (data.getType().equals(type)) result.add(data);
+ }
return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "鎵ц瀹屾垚", result);
}
@@ -226,6 +250,9 @@
// 璋冪敤淇濆瓨鏂规硶鎵ц
if (null == data.getIntelCard()) {
data.setIntelCard(data.getUserId());
+ }
+ if (null == data.getRegisterTime()) {
+ data.setRegisterTime(new Date());
}
msg = inoutService.insertData(data);
@@ -475,6 +502,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 {
@@ -539,7 +572,6 @@
data.setDepotId(item.getDepotId());
}
if (data.getDepotId().equals(item.getDepotId())) {
-
inoutParam.setId(data.getRecordId());
} else {
String newId = data.getRecordId() + temp;
@@ -573,11 +605,15 @@
map.put(inoutParam.getId(), inoutParam);
}
InoutParam par;
+ InoutData dat;
for (String key : map.keySet()) {
par = map.get(key);
if (par != null) {
+ dat = new InoutData();
//鏇存柊娴佹按鏁版嵁(鍖呭惈閲嶉噺淇℃伅浠ュ強娴佺▼杩涘害淇℃伅)
inoutService.toComplete(par);
+ BeanUtils.copyProperties(par, dat);
+ inoutService.updateData(dat);
// //鏇存柊浠撳簱搴撳瓨
// if (InoutConstant.TYPE_IN.equals(par.getType())) {
@@ -591,7 +627,8 @@
// }
}
}
-
+ InoutData completeData = inoutMapper.inoutQueryById(inoutParam);
+ inoutService.updateInoutCache(completeData);
return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), null, data);
}
@@ -644,6 +681,13 @@
if (null == list || list.isEmpty()) {
return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "鏌ヨ缁撴灉涓虹┖锛�");
}
+ for (InoutNoticeIn inoutNoticeIn : list) {
+ Depot cacheDepot = coreCommonService.getCacheDepot(inoutNoticeIn.getCompanyId(), inoutNoticeIn.getDepotId());
+ if (null == cacheDepot) {
+ continue;
+ }
+ inoutNoticeIn.setDepotName(cacheDepot.getName());
+ }
return new PageResponse<>(RespCodeEnum.CODE_0000, list);
}
@@ -670,8 +714,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());
}
@@ -679,7 +723,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