Commit db0a35345e0e121387eeee19ca141417c5ddad7b
1 parent
202c573e
出入库操作记录优化
Signed-off-by: TanYibin <5491541@qq.com>
Showing
4 changed files
with
29 additions
and
22 deletions
ant-design-vue-jeecg/src/views/system/monitor/ApiLogList.vue
... | ... | @@ -135,22 +135,8 @@ |
135 | 135 | </template> |
136 | 136 | |
137 | 137 | <span slot="action" slot-scope="text, record"> |
138 | - <a v-has="'apiLog:edit'" @click="handleEdit(record)">编辑</a> | |
139 | - | |
140 | - <a-divider type="vertical"/> | |
141 | - <a-dropdown> | |
142 | - <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> | |
143 | - <a-menu slot="overlay"> | |
144 | - <a-menu-item> | |
145 | - <a @click="handleDetail(record)">详情</a> | |
146 | - </a-menu-item> | |
147 | - <a-menu-item v-has="'apiLog:delete'"> | |
148 | - <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | |
149 | - <a>删除</a> | |
150 | - </a-popconfirm> | |
151 | - </a-menu-item> | |
152 | - </a-menu> | |
153 | - </a-dropdown> | |
138 | + <a v-has="'apiLog:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a> | |
139 | + <a @click="handleDetail(record)">详情</a> | |
154 | 140 | </span> |
155 | 141 | |
156 | 142 | </a-table> |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java
... | ... | @@ -89,8 +89,8 @@ public class WcsServiceImpl implements WcsService { |
89 | 89 | */ |
90 | 90 | @Override |
91 | 91 | @Transactional(rollbackFor = Exception.class) |
92 | - @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情分配库位'", extra = "#extraJsonString", msg = "'库位编码:' + #locationCode", | |
93 | - condition = "#receiptContainerDetailList.size() > 0", recordReturnValue = true) | |
92 | + @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情分配库位'", extra = "#extraJsonString", | |
93 | + msg = "'任务ID:' + #warecellDomain.getTaskNo() + ',库位编码:' + #locationCode", condition = "#receiptContainerDetailList.size() > 0", recordReturnValue = true) | |
94 | 94 | public Result warecellAllocation(WarecellDomain warecellDomain) { |
95 | 95 | String warehouseCode = warecellDomain.getWarehouseCode(); |
96 | 96 | String zoneCode = warecellDomain.getZoneCode(); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/operation/service/impl/OperationLogServiceImpl.java
... | ... | @@ -57,6 +57,10 @@ public class OperationLogServiceImpl extends ServiceImpl<OperationLogMapper, Ope |
57 | 57 | } else if (logDTO.getTag().equals("入库任务完成")) { |
58 | 58 | String message = "物料编码:{},入库数量:{}"; |
59 | 59 | operationLogList.addAll(createOperationLogs(logDTO, TaskDetail.class, "getReceiptCode", message, "getMaterialCode", "getQty")); |
60 | + } else if (logDTO.getTag().equals("详情入库完成")) { | |
61 | + Thread.sleep(100); | |
62 | + String message = "物料编码:{},数量:{}"; | |
63 | + operationLogList.addAll(createOperationLogs(logDTO, ReceiptDetail.class, "getReceiptCode", message, "getMaterialCode", "getQty")); | |
60 | 64 | } else { |
61 | 65 | String message = "物料编码:{},数量:{}"; |
62 | 66 | operationLogList.addAll(createOperationLogs(logDTO, ReceiptDetail.class, "getReceiptCode", message, "getMaterialCode", "getQty")); |
... | ... | @@ -72,12 +76,17 @@ public class OperationLogServiceImpl extends ServiceImpl<OperationLogMapper, Ope |
72 | 76 | } else if (logDTO.getTag().equals("出库任务完成")) { |
73 | 77 | String message = "物料编码:{},出库数量:{}"; |
74 | 78 | operationLogList.addAll(createOperationLogs(logDTO, TaskDetail.class, "getShipmentCode", message, "getMaterialCode", "getQty")); |
79 | + } else if (logDTO.getTag().equals("详情出库完成")) { | |
80 | + Thread.sleep(100); | |
81 | + String message = "物料编码:{},数量:{}"; | |
82 | + operationLogList.addAll(createOperationLogs(logDTO, ShipmentDetail.class, "getShipmentCode", message, "getMaterialCode", "getQty")); | |
75 | 83 | } else { |
76 | 84 | String message = "物料编码:{},数量:{}"; |
77 | 85 | operationLogList.addAll(createOperationLogs(logDTO, ShipmentDetail.class, "getShipmentCode", message, "getMaterialCode", "getQty")); |
78 | 86 | } |
79 | 87 | } |
80 | 88 | } else { |
89 | + Thread.sleep(200); | |
81 | 90 | OperationLog operationLog = new OperationLog(); |
82 | 91 | operationLog.setBizId(logDTO.getBizId()); |
83 | 92 | operationLog.setOperationMsg(StringUtils.substring(logDTO.getMsg(), 0, 1000)); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
... | ... | @@ -1066,8 +1066,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1066 | 1066 | */ |
1067 | 1067 | @Override |
1068 | 1068 | @Transactional(rollbackFor = Exception.class) |
1069 | - @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'入库任务完成'", extra = "#extraJsonString", | |
1069 | + @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'入库任务完成'", extra = "#extraJsonString1", | |
1070 | 1070 | msg = "'任务ID:' + #taskHeader.getId() + ',库位编码:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()", recordReturnValue = true) |
1071 | + @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情入库完成'", extra = "#extraJsonString2", msg = "''", condition = "#receiptDetaiList.size() > 0", | |
1072 | + recordReturnValue = true) | |
1071 | 1073 | public Result completeReceiptTask(TaskHeader taskHeader) { |
1072 | 1074 | if (taskHeader == null) { |
1073 | 1075 | return Result.error("任务未找到,执行中止"); |
... | ... | @@ -1218,7 +1220,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1218 | 1220 | throw new ServiceException("完成入库任务时,更新入库单头失败"); |
1219 | 1221 | } |
1220 | 1222 | } |
1221 | - LogRecordContext.putVariable("extraJsonString", JSON.toJSONString(taskDetailList)); | |
1223 | + receiptDetaiList = receiptDetaiList.stream().filter(t -> t.getStatus().equals(QuantityConstant.RECEIPT_HEADER_COMPLETED)).collect(Collectors.toList()); | |
1224 | + LogRecordContext.putVariable("receiptDetaiList", receiptDetaiList); | |
1225 | + LogRecordContext.putVariable("extraJsonString1", JSON.toJSONString(taskDetailList)); | |
1226 | + LogRecordContext.putVariable("extraJsonString2", JSON.toJSONString(receiptDetaiList)); | |
1227 | + | |
1222 | 1228 | return Result.ok("完成入库任务"); |
1223 | 1229 | } |
1224 | 1230 | |
... | ... | @@ -1229,9 +1235,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1229 | 1235 | */ |
1230 | 1236 | @Override |
1231 | 1237 | @Transactional(rollbackFor = Exception.class) |
1232 | - @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'出库任务完成'", extra = "#extraJsonString", | |
1238 | + @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'出库任务完成'", extra = "#extraJsonString1", | |
1233 | 1239 | msg = "'任务ID:' + #taskHeader.getId() + ',库位编码:' + #taskHeader.getFromLocationCode() + ',容器编码:' + #taskHeader.getContainerCode() + ',目标出入口:' + #taskHeader.getToPortCode()", |
1234 | 1240 | recordReturnValue = true) |
1241 | + @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'详情出库完成'", extra = "#extraJsonString2", msg = "''", condition = "#shipmentDetailList.size() > 0", | |
1242 | + recordReturnValue = true) | |
1235 | 1243 | public Result completeShipmentTask(TaskHeader taskHeader) { |
1236 | 1244 | if (taskHeader == null) { |
1237 | 1245 | return Result.error("完成出库任务未找到,执行中止"); |
... | ... | @@ -1401,7 +1409,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1401 | 1409 | throw new ServiceException("完成出库任务,更新出库单头失败"); |
1402 | 1410 | } |
1403 | 1411 | } |
1404 | - LogRecordContext.putVariable("extraJsonString", JSON.toJSONString(taskDetailList)); | |
1412 | + // 操作记录添加 | |
1413 | + shipmentDetailList = shipmentDetailList.stream().filter(t -> t.getStatus().equals(QuantityConstant.SHIPMENT_HEADER_COMPLETED)).collect(Collectors.toList()); | |
1414 | + LogRecordContext.putVariable("shipmentDetailList", shipmentDetailList); // 操作记录添加 | |
1415 | + LogRecordContext.putVariable("extraJsonString1", JSON.toJSONString(taskDetailList)); | |
1416 | + LogRecordContext.putVariable("extraJsonString2", JSON.toJSONString(shipmentDetailList)); | |
1405 | 1417 | return Result.ok("完成出库任务"); |
1406 | 1418 | } |
1407 | 1419 | |
... | ... |