Commit c375b1fa356a439d4599ea2ee4c8bab722dfd7af
1 parent
02e47a62
详情入库完成操作记录添加
Signed-off-by: TanYibin <5491541@qq.com>
Showing
6 changed files
with
22 additions
and
10 deletions
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/controller/WcsController.java
... | ... | @@ -53,7 +53,7 @@ public class WcsController extends HuahengBaseController { |
53 | 53 | } |
54 | 54 | Result result = handleMultiProcess("warecellAllocation", new MultiProcessListener() { |
55 | 55 | @Override |
56 | - public Result doProcess() { | |
56 | + public Result<?> doProcess() { | |
57 | 57 | Result result = wcsService.warecellAllocation(warecellDomain); |
58 | 58 | return result; |
59 | 59 | } |
... | ... | @@ -78,7 +78,7 @@ public class WcsController extends HuahengBaseController { |
78 | 78 | |
79 | 79 | Result result = handleMultiProcess("manyEmptyIn", new MultiProcessListener() { |
80 | 80 | @Override |
81 | - public Result doProcess() { | |
81 | + public Result<?> doProcess() { | |
82 | 82 | Result result = taskHeaderService.createManyEmptyInTask(containerCode, zoneCode, roadWay, height, warehouseCode); |
83 | 83 | return result; |
84 | 84 | } |
... | ... | @@ -100,7 +100,7 @@ public class WcsController extends HuahengBaseController { |
100 | 100 | String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); |
101 | 101 | Result result = handleMultiProcess("manyEmptyOut", new MultiProcessListener() { |
102 | 102 | @Override |
103 | - public Result doProcess() { | |
103 | + public Result<?> doProcess() { | |
104 | 104 | Result result = taskHeaderService.createManyEmptyOutTask(containerCode, toPortCode, warehouseCode); |
105 | 105 | return result; |
106 | 106 | } |
... | ... | @@ -120,7 +120,7 @@ public class WcsController extends HuahengBaseController { |
120 | 120 | int taskNo = taskFinishEntity.getTaskNo(); |
121 | 121 | Result result = handleMultiProcess("completeTaskByWMS", new MultiProcessListener() { |
122 | 122 | @Override |
123 | - public Result doProcess() { | |
123 | + public Result<?> doProcess() { | |
124 | 124 | Result result = taskHeaderService.completeTaskByWMS(taskNo); |
125 | 125 | return result; |
126 | 126 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/controller/ReceiptHeaderController.java
... | ... | @@ -238,7 +238,7 @@ public class ReceiptHeaderController extends JeecgController<ReceiptHeader, IRec |
238 | 238 | @ApiOperation(value = "入库单详情-编辑", notes = "入库单详情-编辑") |
239 | 239 | @RequiresPermissions("receiptDetail:edit") |
240 | 240 | @RequestMapping(value = "/editReceiptDetail", method = {RequestMethod.PUT, RequestMethod.POST}) |
241 | - @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'入库详情编辑'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) | |
241 | + @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情编辑'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) | |
242 | 242 | public Result<String> editReceiptDetail(@RequestBody ReceiptDetail receiptDetail) { |
243 | 243 | receiptDetailService.updateById(receiptDetail); |
244 | 244 | LogRecordContext.putVariable("extraJsonString", JSON.toJSONString(Collections.singletonList(receiptDetail)));// 操作日志收集 |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/impl/ReceiptDetailServiceImpl.java
... | ... | @@ -60,7 +60,7 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<ReceiptDetailMapper, R |
60 | 60 | } |
61 | 61 | |
62 | 62 | @Override |
63 | - @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'入库详情添加'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) | |
63 | + @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情添加'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) | |
64 | 64 | public Result saveReceiptDetail(ReceiptDetail receiptDetail) { |
65 | 65 | ReceiptHeader receiptHeader = receiptHeaderService.getById(receiptDetail.getReceiptId()); |
66 | 66 | if (receiptHeader == null) { |
... | ... | @@ -104,7 +104,7 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<ReceiptDetailMapper, R |
104 | 104 | |
105 | 105 | @Override |
106 | 106 | @Transactional(rollbackFor = ServiceException.class) |
107 | - @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'入库详情删除'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) | |
107 | + @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情删除'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) | |
108 | 108 | public Result removeDetailById(String id) { |
109 | 109 | ReceiptDetail receiptDetail = receiptDetailService.getById(id); |
110 | 110 | if (receiptDetail == null) { |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/impl/ReceiptHeaderServiceImpl.java
... | ... | @@ -144,6 +144,8 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl<ReceiptHeaderMapper, R |
144 | 144 | * @return |
145 | 145 | */ |
146 | 146 | @Override |
147 | + @OperationLog(bizId = "#receiptHeader.getCode()", bizType = "'入库单追踪'", tag = "'入库单完成'", | |
148 | + msg = "'上游单号:'+ #receiptHeader.getReferCode() + ',仓库编码:' + #receiptHeader.getWarehouseCode()", recordReturnValue = true) | |
147 | 149 | public boolean updateReceiptHeaderStatus(Integer id) { |
148 | 150 | LambdaQueryWrapper<ReceiptDetail> receiptDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); |
149 | 151 | receiptDetailLambdaQueryWrapper.eq(ReceiptDetail::getReceiptId, id); |
... | ... | @@ -173,8 +175,11 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl<ReceiptHeaderMapper, R |
173 | 175 | |
174 | 176 | receiptHeader.setFirstStatus(maxStatus); |
175 | 177 | receiptHeader.setLastStatus(minStatus); |
176 | - boolean result = receiptHeaderService.updateById(receiptHeader); | |
177 | - return result; | |
178 | + if (!receiptHeaderService.updateById(receiptHeader)) { | |
179 | + throw new ServiceException("更新入库单:" + receiptHeader.getCode() + " 状态失败"); | |
180 | + } | |
181 | + LogRecordContext.putVariable("receiptHeader", receiptHeader); | |
182 | + return true; | |
178 | 183 | } |
179 | 184 | |
180 | 185 | @Override |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java
... | ... | @@ -89,7 +89,7 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl |
89 | 89 | @Override |
90 | 90 | @Transactional(rollbackFor = ServiceException.class) |
91 | 91 | @OperationLog(bizId = "''", bizType = "'物料追踪'", tag = "'入库组盘'", extra = "#extraJsonString1", msg = "''", recordReturnValue = true) |
92 | - @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'入库组盘'", extra = "#extraJsonString2", msg = "'容器编码:' + #receiveList.get(0).getContainerCode()", recordReturnValue = true) | |
92 | + @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情组盘'", extra = "#extraJsonString2", msg = "'容器编码:' + #receiveList.get(0).getContainerCode()", recordReturnValue = true) | |
93 | 93 | public Result<ReceiptContainerHeader> receiving(List<Receive> receiveList, String warehouseCode) { |
94 | 94 | boolean result = false; |
95 | 95 | if (receiveList == null || receiveList.size() == 0) { |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
... | ... | @@ -4,6 +4,7 @@ import java.io.Serializable; |
4 | 4 | import java.math.BigDecimal; |
5 | 5 | import java.util.ArrayList; |
6 | 6 | import java.util.Collection; |
7 | +import java.util.Collections; | |
7 | 8 | import java.util.Date; |
8 | 9 | import java.util.List; |
9 | 10 | import java.util.stream.Collectors; |
... | ... | @@ -65,12 +66,16 @@ import org.springframework.beans.factory.annotation.Autowired; |
65 | 66 | import org.springframework.stereotype.Service; |
66 | 67 | import org.springframework.transaction.annotation.Transactional; |
67 | 68 | |
69 | +import com.alibaba.fastjson.JSON; | |
68 | 70 | import com.aliyun.oss.ServiceException; |
69 | 71 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
70 | 72 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
71 | 73 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
72 | 74 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
73 | 75 | |
76 | +import cn.monitor4all.logRecord.annotation.OperationLog; | |
77 | +import cn.monitor4all.logRecord.context.LogRecordContext; | |
78 | + | |
74 | 79 | /** |
75 | 80 | * @Description: 任务表 |
76 | 81 | * @Author: jeecg-boot |
... | ... | @@ -1090,6 +1095,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1090 | 1095 | * @return AjaxResult 完成入库任务结果 |
1091 | 1096 | */ |
1092 | 1097 | @Transactional(rollbackFor = Exception.class) |
1098 | + @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情入库'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) | |
1093 | 1099 | public Result completeReceiptTask(TaskHeader taskHeader) { |
1094 | 1100 | if (taskHeader == null) { |
1095 | 1101 | return Result.error("任务未找到,执行中止"); |
... | ... | @@ -1239,6 +1245,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1239 | 1245 | if (!combineInventoryDetail(taskHeader)) { |
1240 | 1246 | throw new ServiceException("合并入库库存失败"); |
1241 | 1247 | } |
1248 | + LogRecordContext.putVariable("extraJsonString", JSON.toJSONString(receiptDetaiList)); | |
1242 | 1249 | return Result.ok("完成入库任务"); |
1243 | 1250 | } |
1244 | 1251 | |
... | ... |