refactor(wms): 优化卷材变更日志记录逻辑
- 重构加工变换日志记录,支持合并、分卷等不同场景 - 修改快照对比逻辑,合并新旧键值以避免遗漏空值字段 - 调整仓库层级排序算法,移除四级库位的序号修正 - 注释掉卷材合同关系中的日志记录代码 - 在撤回导出时清空操作人员信息
This commit is contained in:
@@ -276,7 +276,7 @@ public class CrmOrderServiceImpl implements ICrmOrderService {
|
||||
// 1. 置顶优先 (is_top=1 排在前面)
|
||||
// 2. 合同号倒序(KLPY+年月日+序号,降序最新在前)
|
||||
qw.orderByDesc("co.is_top")
|
||||
.orderByDesc("co.contract_code");
|
||||
.orderByDesc("co.contract_code");
|
||||
return qw;
|
||||
}
|
||||
|
||||
@@ -365,10 +365,11 @@ public class CrmOrderServiceImpl implements ICrmOrderService {
|
||||
|
||||
// 计算变更字段差异
|
||||
Map<String, Map<String, Object>> diff = new LinkedHashMap<>();
|
||||
for (Map.Entry<String, Object> fieldEntry : newSnapshot.entrySet()) {
|
||||
String field = fieldEntry.getKey();
|
||||
Set<String> allKeys = new LinkedHashSet<>(oldSnapshot.keySet());
|
||||
allKeys.addAll(newSnapshot.keySet());
|
||||
for (String field : allKeys) {
|
||||
Object oldVal = oldSnapshot.get(field);
|
||||
Object newVal = fieldEntry.getValue();
|
||||
Object newVal = newSnapshot.get(field);
|
||||
if (!Objects.equals(oldVal, newVal)) {
|
||||
Map<String, Object> change = new LinkedHashMap<>();
|
||||
change.put("old", oldVal);
|
||||
|
||||
Reference in New Issue
Block a user