Commit b9fdb93eeb6af1bfdcb79eed85593e4b2f1ca0f1
1 parent
6ccc34ae
入库单操作记录优化
Signed-off-by: TanYibin <5491541@qq.com>
Showing
7 changed files
with
58 additions
and
23 deletions
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/operation/service/impl/OperationLogServiceImpl.java
@@ -49,16 +49,14 @@ public class OperationLogServiceImpl extends ServiceImpl<OperationLogMapper, Ope | @@ -49,16 +49,14 @@ public class OperationLogServiceImpl extends ServiceImpl<OperationLogMapper, Ope | ||
49 | "getWarehouseCode", "getContainerCode", "getMaterialCode", "getQty")); | 49 | "getWarehouseCode", "getContainerCode", "getMaterialCode", "getQty")); |
50 | } | 50 | } |
51 | } else if (logDTO.getBizType().equals("入库单追踪")) { | 51 | } else if (logDTO.getBizType().equals("入库单追踪")) { |
52 | - if (logDTO.getTag().equals("详情分配库位") || logDTO.getTag().equals("详情组盘") || logDTO.getTag().equals("详情取消组盘")) { | 52 | + if (logDTO.getTag().equals("详情分配库位") || logDTO.getTag().equals("详情组盘") || logDTO.getTag().equals("详情取消组盘") || logDTO.getTag().equals("入库任务生成") |
53 | + || logDTO.getTag().equals("入库任务取消")) { | ||
53 | String message = "容器编码:{},物料编码:{},入库数量:{}"; | 54 | String message = "容器编码:{},物料编码:{},入库数量:{}"; |
54 | operationLogList.addAll( | 55 | operationLogList.addAll( |
55 | createOperationLogs(logDTO, ReceiptContainerDetail.class, "getReceiptCode", message, "getContainerCode", "getMaterialCode", "getQty")); | 56 | createOperationLogs(logDTO, ReceiptContainerDetail.class, "getReceiptCode", message, "getContainerCode", "getMaterialCode", "getQty")); |
56 | - } else if (logDTO.getTag().equals("入库任务生成") || logDTO.getTag().equals("入库任务取消")) { | 57 | + } else if (logDTO.getTag().equals("入库任务完成")) { |
57 | String message = "物料编码:{},入库数量:{}"; | 58 | String message = "物料编码:{},入库数量:{}"; |
58 | - operationLogList.addAll(createOperationLogs(logDTO, ReceiptContainerDetail.class, "getReceiptCode", message, "getMaterialCode", "getQty")); | ||
59 | - } else if (logDTO.getTag().equals("详情入库")) { | ||
60 | - String message = "物料编码:{},入库数量:{}"; | ||
61 | - operationLogList.addAll(createOperationLogs(logDTO, ReceiptDetail.class, "getReceiptCode", message, "getMaterialCode", "getTaskQty")); | 59 | + operationLogList.addAll(createOperationLogs(logDTO, TaskDetail.class, "getReceiptCode", message, "getMaterialCode", "getQty")); |
62 | } else { | 60 | } else { |
63 | String message = "物料编码:{},数量:{}"; | 61 | String message = "物料编码:{},数量:{}"; |
64 | operationLogList.addAll(createOperationLogs(logDTO, ReceiptDetail.class, "getReceiptCode", message, "getMaterialCode", "getQty")); | 62 | operationLogList.addAll(createOperationLogs(logDTO, ReceiptDetail.class, "getReceiptCode", message, "getMaterialCode", "getQty")); |
@@ -71,9 +69,9 @@ public class OperationLogServiceImpl extends ServiceImpl<OperationLogMapper, Ope | @@ -71,9 +69,9 @@ public class OperationLogServiceImpl extends ServiceImpl<OperationLogMapper, Ope | ||
71 | } else if (logDTO.getTag().equals("出库任务生成") || logDTO.getTag().equals("出库任务取消")) { | 69 | } else if (logDTO.getTag().equals("出库任务生成") || logDTO.getTag().equals("出库任务取消")) { |
72 | String message = "物料编码:{},出库数量:{}"; | 70 | String message = "物料编码:{},出库数量:{}"; |
73 | operationLogList.addAll(createOperationLogs(logDTO, ShipmentContainerDetail.class, "getShipmentCode", message, "getMaterialCode", "getQty")); | 71 | operationLogList.addAll(createOperationLogs(logDTO, ShipmentContainerDetail.class, "getShipmentCode", message, "getMaterialCode", "getQty")); |
74 | - } else if (logDTO.getTag().equals("详情出库")) { | 72 | + } else if (logDTO.getTag().equals("出库任务完成")) { |
75 | String message = "物料编码:{},出库数量:{}"; | 73 | String message = "物料编码:{},出库数量:{}"; |
76 | - operationLogList.addAll(createOperationLogs(logDTO, ShipmentDetail.class, "getShipmentCode", message, "getMaterialCode", "getTaskQty")); | 74 | + operationLogList.addAll(createOperationLogs(logDTO, TaskDetail.class, "getShipmentCode", message, "getMaterialCode", "getQty")); |
77 | } else { | 75 | } else { |
78 | String message = "物料编码:{},数量:{}"; | 76 | String message = "物料编码:{},数量:{}"; |
79 | operationLogList.addAll(createOperationLogs(logDTO, ShipmentDetail.class, "getShipmentCode", message, "getMaterialCode", "getQty")); | 77 | operationLogList.addAll(createOperationLogs(logDTO, ShipmentDetail.class, "getShipmentCode", message, "getMaterialCode", "getQty")); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/impl/ReceiptHeaderServiceImpl.java
@@ -145,7 +145,7 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl<ReceiptHeaderMapper, R | @@ -145,7 +145,7 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl<ReceiptHeaderMapper, R | ||
145 | */ | 145 | */ |
146 | @Override | 146 | @Override |
147 | @Transactional | 147 | @Transactional |
148 | - @OperationLog(bizId = "#receiptHeader.getCode()", bizType = "'入库单追踪'", tag = "'入库完成'", | 148 | + @OperationLog(bizId = "#receiptHeader.getCode()", bizType = "'入库单追踪'", tag = "'入库单完成'", |
149 | msg = "'上游单号:'+ #receiptHeader.getReferCode() + ',仓库编码:' + #receiptHeader.getWarehouseCode()", condition = "#minStatus == 800", recordReturnValue = true) | 149 | msg = "'上游单号:'+ #receiptHeader.getReferCode() + ',仓库编码:' + #receiptHeader.getWarehouseCode()", condition = "#minStatus == 800", recordReturnValue = true) |
150 | public boolean updateReceiptHeaderStatus(Integer id) { | 150 | public boolean updateReceiptHeaderStatus(Integer id) { |
151 | LambdaQueryWrapper<ReceiptDetail> receiptDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); | 151 | LambdaQueryWrapper<ReceiptDetail> receiptDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
@@ -414,7 +414,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -414,7 +414,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
414 | @Override | 414 | @Override |
415 | @Transactional(rollbackFor = ServiceException.class) | 415 | @Transactional(rollbackFor = ServiceException.class) |
416 | @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'出库任务生成'", extra = "#extraJsonString", | 416 | @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'出库任务生成'", extra = "#extraJsonString", |
417 | - msg = "'任务ID:' + #taskHeaderId + ',库位编码:' + #shipmentContainerHeader.getFromLocationCode() + ',目标出入口:' + #shipmentContainerHeader.getToPort()", | 417 | + msg = "'任务ID:' + #taskHeaderId + ',库位编码:' + #shipmentContainerHeader.getFromLocationCode() + ',容器编码:' + #shipmentContainerHeader.getContainerCode() + ',目标出入口:' + #shipmentContainerHeader.getToPort()", |
418 | condition = "#shipmentContainerDetailList.size() > 0", recordReturnValue = true) | 418 | condition = "#shipmentContainerDetailList.size() > 0", recordReturnValue = true) |
419 | public Result createShipmentTask(ShipmentContainerHeader shipmentContainerHeader, String warehouseCode, long shipmentOrder, int sequence, int sequenceNumber) { | 419 | public Result createShipmentTask(ShipmentContainerHeader shipmentContainerHeader, String warehouseCode, long shipmentOrder, int sequence, int sequenceNumber) { |
420 | Integer preTaskNo = 0; | 420 | Integer preTaskNo = 0; |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerHeader/service/impl/ShipmentContainerHeaderServiceImpl.java
@@ -131,8 +131,8 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont | @@ -131,8 +131,8 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont | ||
131 | @Override | 131 | @Override |
132 | @Transactional(rollbackFor = Exception.class) | 132 | @Transactional(rollbackFor = Exception.class) |
133 | @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'出库任务取消'", extra = "#extraJsonString", | 133 | @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'出库任务取消'", extra = "#extraJsonString", |
134 | - msg = "'任务ID:' + #taskHeader.getId() + ',库位编码:' + #shipmentContainerHeader.getFromLocationCode() + ',目标出入口:' + #shipmentContainerHeader.getToPort()", | ||
135 | - condition = "#shipmentContainerDetailList.size() > 0", recordReturnValue = true) | 134 | + msg = "'任务ID:' + #taskHeader.getId() + ',库位编码:' + #shipmentContainerHeader.getFromLocationCode() + ',容器编码:' + #shipmentContainerHeader.getContainerCode() + ',目标出入口:' + #shipmentContainerHeader.getToPort()", |
135 | + condition = "#shipmentContainerDetailList.size() > 0", recordReturnValue = true) | ||
136 | public boolean cancelShipmentTask(TaskHeader taskHeader) { | 136 | public boolean cancelShipmentTask(TaskHeader taskHeader) { |
137 | ShipmentContainerHeader shipmentContainerHeader = getById(taskHeader.getShipmentContainerHeaderId()); | 137 | ShipmentContainerHeader shipmentContainerHeader = getById(taskHeader.getShipmentContainerHeaderId()); |
138 | if (shipmentContainerHeader == null) { | 138 | if (shipmentContainerHeader == null) { |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/impl/ShipmentHeaderServiceImpl.java
@@ -163,7 +163,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | @@ -163,7 +163,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | ||
163 | } | 163 | } |
164 | 164 | ||
165 | @Override | 165 | @Override |
166 | - @OperationLog(bizId = "#shipmentHeader.getCode()", bizType = "'出库单追踪'", tag = "'出库完成'", | 166 | + @OperationLog(bizId = "#shipmentHeader.getCode()", bizType = "'出库单追踪'", tag = "'出库单完成'", |
167 | msg = "'上游单号:'+ #shipmentHeader.getReferCode() + ',仓库编码:' + #shipmentHeader.getWarehouseCode()", condition = "#minStatus == 800", recordReturnValue = true) | 167 | msg = "'上游单号:'+ #shipmentHeader.getReferCode() + ',仓库编码:' + #shipmentHeader.getWarehouseCode()", condition = "#minStatus == 800", recordReturnValue = true) |
168 | public boolean updateShipmentHeaderStatus(Integer shipmentId) { | 168 | public boolean updateShipmentHeaderStatus(Integer shipmentId) { |
169 | List<ShipmentDetail> shipmentDetailList = shipmentDetailService.getShipmentDetailListByShipmentId(shipmentId); | 169 | List<ShipmentDetail> shipmentDetailList = shipmentDetailService.getShipmentDetailListByShipmentId(shipmentId); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/entity/TaskDetail.java
@@ -8,6 +8,7 @@ import org.jeecg.common.aspect.annotation.Dict; | @@ -8,6 +8,7 @@ import org.jeecg.common.aspect.annotation.Dict; | ||
8 | import org.jeecgframework.poi.excel.annotation.Excel; | 8 | import org.jeecgframework.poi.excel.annotation.Excel; |
9 | 9 | ||
10 | import com.baomidou.mybatisplus.annotation.IdType; | 10 | import com.baomidou.mybatisplus.annotation.IdType; |
11 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
11 | import com.baomidou.mybatisplus.annotation.TableId; | 12 | import com.baomidou.mybatisplus.annotation.TableId; |
12 | import com.baomidou.mybatisplus.annotation.TableName; | 13 | import com.baomidou.mybatisplus.annotation.TableName; |
13 | 14 | ||
@@ -31,114 +32,149 @@ public class TaskDetail implements Serializable { | @@ -31,114 +32,149 @@ public class TaskDetail implements Serializable { | ||
31 | @TableId(type = IdType.AUTO) | 32 | @TableId(type = IdType.AUTO) |
32 | @ApiModelProperty(value = "主键") | 33 | @ApiModelProperty(value = "主键") |
33 | private Integer id; | 34 | private Integer id; |
35 | + | ||
34 | /** 任务头ID */ | 36 | /** 任务头ID */ |
35 | @ApiModelProperty(value = "任务头ID") | 37 | @ApiModelProperty(value = "任务头ID") |
36 | private Integer taskHeaderId; | 38 | private Integer taskHeaderId; |
39 | + | ||
37 | /** 任务类型 */ | 40 | /** 任务类型 */ |
38 | @Excel(name = "任务类型", width = 15) | 41 | @Excel(name = "任务类型", width = 15) |
39 | @ApiModelProperty(value = "任务类型") | 42 | @ApiModelProperty(value = "任务类型") |
40 | private Integer taskType; | 43 | private Integer taskType; |
44 | + | ||
41 | /** 仓库编码 */ | 45 | /** 仓库编码 */ |
42 | @Excel(name = "仓库编码", width = 15) | 46 | @Excel(name = "仓库编码", width = 15) |
43 | @ApiModelProperty(value = "仓库编码") | 47 | @ApiModelProperty(value = "仓库编码") |
44 | private String warehouseCode; | 48 | private String warehouseCode; |
49 | + | ||
45 | /** 货主 */ | 50 | /** 货主 */ |
46 | @Excel(name = "货主", width = 15) | 51 | @Excel(name = "货主", width = 15) |
47 | @ApiModelProperty(value = "货主") | 52 | @ApiModelProperty(value = "货主") |
48 | private String companyCode; | 53 | private String companyCode; |
54 | + | ||
49 | /** 出库单id */ | 55 | /** 出库单id */ |
50 | @Excel(name = "出库单id", width = 15) | 56 | @Excel(name = "出库单id", width = 15) |
51 | @ApiModelProperty(value = "出库单id") | 57 | @ApiModelProperty(value = "出库单id") |
52 | private Integer shipmentId; | 58 | private Integer shipmentId; |
59 | + | ||
60 | + @TableField(exist = false) | ||
61 | + private String shipmentCode; | ||
62 | + | ||
53 | /** 出库详情id */ | 63 | /** 出库详情id */ |
54 | @Excel(name = "出库详情id", width = 15) | 64 | @Excel(name = "出库详情id", width = 15) |
55 | @ApiModelProperty(value = "出库详情id") | 65 | @ApiModelProperty(value = "出库详情id") |
56 | private Integer shipmentDetailId; | 66 | private Integer shipmentDetailId; |
67 | + | ||
57 | /** 出库组盘详情id */ | 68 | /** 出库组盘详情id */ |
58 | @Excel(name = "出库组盘详情id", width = 15) | 69 | @Excel(name = "出库组盘详情id", width = 15) |
59 | @ApiModelProperty(value = "出库组盘详情id") | 70 | @ApiModelProperty(value = "出库组盘详情id") |
60 | private Integer shipmentContainerDetailId; | 71 | private Integer shipmentContainerDetailId; |
72 | + | ||
61 | /** 入库单id */ | 73 | /** 入库单id */ |
62 | @Excel(name = "入库单id", width = 15) | 74 | @Excel(name = "入库单id", width = 15) |
63 | @ApiModelProperty(value = "入库单id") | 75 | @ApiModelProperty(value = "入库单id") |
64 | private Integer receiptId; | 76 | private Integer receiptId; |
77 | + | ||
78 | + @TableField(exist = false) | ||
79 | + private String receiptCode; | ||
80 | + | ||
65 | /** 入库单详情id */ | 81 | /** 入库单详情id */ |
66 | @Excel(name = "入库单详情id", width = 15) | 82 | @Excel(name = "入库单详情id", width = 15) |
67 | @ApiModelProperty(value = "入库单详情id") | 83 | @ApiModelProperty(value = "入库单详情id") |
68 | private Integer receiptDetailId; | 84 | private Integer receiptDetailId; |
85 | + | ||
69 | /** 入库组盘详情Id */ | 86 | /** 入库组盘详情Id */ |
70 | @Excel(name = "入库组盘详情Id", width = 15) | 87 | @Excel(name = "入库组盘详情Id", width = 15) |
71 | @ApiModelProperty(value = "入库组盘详情Id") | 88 | @ApiModelProperty(value = "入库组盘详情Id") |
72 | private Integer receiptContainerDetailId; | 89 | private Integer receiptContainerDetailId; |
90 | + | ||
73 | /** 物料编码 */ | 91 | /** 物料编码 */ |
74 | @Excel(name = "物料编码", width = 15) | 92 | @Excel(name = "物料编码", width = 15) |
75 | @ApiModelProperty(value = "物料编码") | 93 | @ApiModelProperty(value = "物料编码") |
76 | private String materialCode; | 94 | private String materialCode; |
95 | + | ||
77 | /** 物料名称 */ | 96 | /** 物料名称 */ |
78 | @Excel(name = "物料名称", width = 15) | 97 | @Excel(name = "物料名称", width = 15) |
79 | @ApiModelProperty(value = "物料名称") | 98 | @ApiModelProperty(value = "物料名称") |
80 | private String materialName; | 99 | private String materialName; |
100 | + | ||
81 | /** 物料规格 */ | 101 | /** 物料规格 */ |
82 | @Excel(name = "物料规格", width = 15) | 102 | @Excel(name = "物料规格", width = 15) |
83 | @ApiModelProperty(value = "物料规格") | 103 | @ApiModelProperty(value = "物料规格") |
84 | private String materialSpec; | 104 | private String materialSpec; |
105 | + | ||
85 | /** 物料单位 */ | 106 | /** 物料单位 */ |
86 | @Excel(name = "物料单位", width = 15) | 107 | @Excel(name = "物料单位", width = 15) |
87 | @ApiModelProperty(value = "物料单位") | 108 | @ApiModelProperty(value = "物料单位") |
88 | private String materialUnit; | 109 | private String materialUnit; |
110 | + | ||
89 | /** 数量 */ | 111 | /** 数量 */ |
90 | @Excel(name = "数量", width = 15) | 112 | @Excel(name = "数量", width = 15) |
91 | @ApiModelProperty(value = "数量") | 113 | @ApiModelProperty(value = "数量") |
92 | private BigDecimal qty; | 114 | private BigDecimal qty; |
115 | + | ||
93 | /** 批次 */ | 116 | /** 批次 */ |
94 | @Excel(name = "批次", width = 15) | 117 | @Excel(name = "批次", width = 15) |
95 | @ApiModelProperty(value = "批次") | 118 | @ApiModelProperty(value = "批次") |
96 | private String batch; | 119 | private String batch; |
120 | + | ||
97 | /** 批号 */ | 121 | /** 批号 */ |
98 | @Excel(name = "批号", width = 15) | 122 | @Excel(name = "批号", width = 15) |
99 | @ApiModelProperty(value = "批号") | 123 | @ApiModelProperty(value = "批号") |
100 | private String lot; | 124 | private String lot; |
125 | + | ||
101 | /** 项目号 */ | 126 | /** 项目号 */ |
102 | @Excel(name = "项目号", width = 15) | 127 | @Excel(name = "项目号", width = 15) |
103 | @ApiModelProperty(value = "项目号") | 128 | @ApiModelProperty(value = "项目号") |
104 | private String project; | 129 | private String project; |
130 | + | ||
105 | /** 库存状态 */ | 131 | /** 库存状态 */ |
106 | @Excel(name = "库存状态", width = 15) | 132 | @Excel(name = "库存状态", width = 15) |
107 | @Dict(dicCode = "inventory_status") | 133 | @Dict(dicCode = "inventory_status") |
108 | @ApiModelProperty(value = "库存状态") | 134 | @ApiModelProperty(value = "库存状态") |
109 | private String inventoryStatus; | 135 | private String inventoryStatus; |
136 | + | ||
110 | /** 出库的库存详情id */ | 137 | /** 出库的库存详情id */ |
111 | @Excel(name = "出库的库存详情id", width = 15) | 138 | @Excel(name = "出库的库存详情id", width = 15) |
112 | @ApiModelProperty(value = "出库的库存详情id") | 139 | @ApiModelProperty(value = "出库的库存详情id") |
113 | private Integer fromInventoryDetailId; | 140 | private Integer fromInventoryDetailId; |
141 | + | ||
114 | /** 入库的库存详情id */ | 142 | /** 入库的库存详情id */ |
115 | @Excel(name = "入库的库存详情id", width = 15) | 143 | @Excel(name = "入库的库存详情id", width = 15) |
116 | @ApiModelProperty(value = "入库的库存详情id") | 144 | @ApiModelProperty(value = "入库的库存详情id") |
117 | private Integer toInventoryDetailId; | 145 | private Integer toInventoryDetailId; |
146 | + | ||
118 | @Excel(name = "唯一号", width = 15) | 147 | @Excel(name = "唯一号", width = 15) |
119 | @ApiModelProperty(value = "唯一号") | 148 | @ApiModelProperty(value = "唯一号") |
120 | private String uniqueCode; | 149 | private String uniqueCode; |
150 | + | ||
121 | /** 备用字段1 */ | 151 | /** 备用字段1 */ |
122 | @Excel(name = "备用字段1", width = 15) | 152 | @Excel(name = "备用字段1", width = 15) |
123 | @ApiModelProperty(value = "备用字段1") | 153 | @ApiModelProperty(value = "备用字段1") |
124 | private String userdef1; | 154 | private String userdef1; |
155 | + | ||
125 | /** 备用字段2 */ | 156 | /** 备用字段2 */ |
126 | @Excel(name = "备用字段2", width = 15) | 157 | @Excel(name = "备用字段2", width = 15) |
127 | @ApiModelProperty(value = "备用字段2") | 158 | @ApiModelProperty(value = "备用字段2") |
128 | private String userdef2; | 159 | private String userdef2; |
160 | + | ||
129 | /** 备用字段3 */ | 161 | /** 备用字段3 */ |
130 | @Excel(name = "备用字段3", width = 15) | 162 | @Excel(name = "备用字段3", width = 15) |
131 | @ApiModelProperty(value = "备用字段3") | 163 | @ApiModelProperty(value = "备用字段3") |
132 | private String userdef3; | 164 | private String userdef3; |
165 | + | ||
133 | /** 创建人 */ | 166 | /** 创建人 */ |
134 | @ApiModelProperty(value = "创建人") | 167 | @ApiModelProperty(value = "创建人") |
135 | private String createBy; | 168 | private String createBy; |
169 | + | ||
136 | /** 创建日期 */ | 170 | /** 创建日期 */ |
137 | @ApiModelProperty(value = "创建日期") | 171 | @ApiModelProperty(value = "创建日期") |
138 | private Date createTime; | 172 | private Date createTime; |
173 | + | ||
139 | /** 更新人 */ | 174 | /** 更新人 */ |
140 | @ApiModelProperty(value = "更新人") | 175 | @ApiModelProperty(value = "更新人") |
141 | private String updateBy; | 176 | private String updateBy; |
177 | + | ||
142 | /** 更新日期 */ | 178 | /** 更新日期 */ |
143 | @ApiModelProperty(value = "更新日期") | 179 | @ApiModelProperty(value = "更新日期") |
144 | private Date updateTime; | 180 | private Date updateTime; |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
@@ -1097,8 +1097,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1097,8 +1097,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1097 | */ | 1097 | */ |
1098 | @Override | 1098 | @Override |
1099 | @Transactional(rollbackFor = Exception.class) | 1099 | @Transactional(rollbackFor = Exception.class) |
1100 | - @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情入库'", extra = "#extraJsonString", msg = "'库位编码:' + #toLocationCode + ',容器编码:' + #containerCode", | ||
1101 | - recordReturnValue = true) | 1100 | + @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'入库任务完成'", extra = "#extraJsonString", |
1101 | + msg = "'任务ID:' + #taskHeader.getId() + ',库位编码:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()", recordReturnValue = true) | ||
1102 | public Result completeReceiptTask(TaskHeader taskHeader) { | 1102 | public Result completeReceiptTask(TaskHeader taskHeader) { |
1103 | if (taskHeader == null) { | 1103 | if (taskHeader == null) { |
1104 | return Result.error("任务未找到,执行中止"); | 1104 | return Result.error("任务未找到,执行中止"); |
@@ -1155,8 +1155,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1155,8 +1155,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1155 | for (TaskDetail taskDetail : taskDetailList) { | 1155 | for (TaskDetail taskDetail : taskDetailList) { |
1156 | ReceiptDetail receiptDetail = receiptDetailService.getById(taskDetail.getReceiptDetailId()); | 1156 | ReceiptDetail receiptDetail = receiptDetailService.getById(taskDetail.getReceiptDetailId()); |
1157 | if (receiptDetail == null) { | 1157 | if (receiptDetail == null) { |
1158 | - throw new ServiceException("未找到id:" + taskDetail.getReceiptDetailId() + "入库单明细"); | 1158 | + throw new ServiceException("未找到ID:" + taskDetail.getReceiptDetailId() + "入库单明细"); |
1159 | } | 1159 | } |
1160 | + // 操作记录统计用 | ||
1161 | + taskDetail.setReceiptCode(receiptDetail.getReceiptCode()); | ||
1160 | BigDecimal taskQty = receiptDetail.getTaskQty(); | 1162 | BigDecimal taskQty = receiptDetail.getTaskQty(); |
1161 | BigDecimal qty = receiptDetail.getQty(); | 1163 | BigDecimal qty = receiptDetail.getQty(); |
1162 | if (taskQty.compareTo(qty) >= 0) { | 1164 | if (taskQty.compareTo(qty) >= 0) { |
@@ -1247,9 +1249,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1247,9 +1249,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1247 | throw new ServiceException("完成入库任务时,更新入库单头失败"); | 1249 | throw new ServiceException("完成入库任务时,更新入库单头失败"); |
1248 | } | 1250 | } |
1249 | } | 1251 | } |
1250 | - LogRecordContext.putVariable("toLocationCode", toLocationCode); | ||
1251 | - LogRecordContext.putVariable("containerCode", containerCode); | ||
1252 | - LogRecordContext.putVariable("extraJsonString", JSON.toJSONString(receiptDetaiList)); | 1252 | + LogRecordContext.putVariable("extraJsonString", JSON.toJSONString(taskDetailList)); |
1253 | return Result.ok("完成入库任务"); | 1253 | return Result.ok("完成入库任务"); |
1254 | } | 1254 | } |
1255 | 1255 | ||
@@ -1260,7 +1260,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1260,7 +1260,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1260 | */ | 1260 | */ |
1261 | @Override | 1261 | @Override |
1262 | @Transactional(rollbackFor = Exception.class) | 1262 | @Transactional(rollbackFor = Exception.class) |
1263 | - @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'详情出库'", extra = "#extraJsonString", msg = "'库位编码:' + #fromLocationCode + ',容器编码:' + #containerCode", recordReturnValue = true) | 1263 | + @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'出库任务完成'", extra = "#extraJsonString", |
1264 | + msg = "'任务ID:' + #taskHeader.getId() + ',库位编码:' + #taskHeader.getFromLocationCode() + ',容器编码:' + #taskHeader.getContainerCode() + ',目标出入口:' + #taskHeader.getToPortCode()", | ||
1265 | + recordReturnValue = true) | ||
1264 | public Result completeShipmentTask(TaskHeader taskHeader) { | 1266 | public Result completeShipmentTask(TaskHeader taskHeader) { |
1265 | if (taskHeader == null) { | 1267 | if (taskHeader == null) { |
1266 | return Result.error("完成出库任务未找到,执行中止"); | 1268 | return Result.error("完成出库任务未找到,执行中止"); |
@@ -1301,6 +1303,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1301,6 +1303,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1301 | if (shipmentDetail == null) { | 1303 | if (shipmentDetail == null) { |
1302 | throw new ServiceException("完成出库任务, 出库任务没有找到出库详情" + taskDetail.getShipmentDetailId()); | 1304 | throw new ServiceException("完成出库任务, 出库任务没有找到出库详情" + taskDetail.getShipmentDetailId()); |
1303 | } | 1305 | } |
1306 | + taskDetail.setShipmentCode(shipmentDetail.getShipmentCode()); | ||
1304 | if (shipmentDetail.getQty().compareTo(shipmentDetail.getTaskQty()) == 0) { | 1307 | if (shipmentDetail.getQty().compareTo(shipmentDetail.getTaskQty()) == 0) { |
1305 | shipmentDetail.setStatus(QuantityConstant.SHIPMENT_HEADER_COMPLETED); | 1308 | shipmentDetail.setStatus(QuantityConstant.SHIPMENT_HEADER_COMPLETED); |
1306 | } else if (shipmentDetail.getQty().compareTo(shipmentDetail.getTaskQty()) > 0) { | 1309 | } else if (shipmentDetail.getQty().compareTo(shipmentDetail.getTaskQty()) > 0) { |
@@ -1429,9 +1432,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1429,9 +1432,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1429 | throw new ServiceException("完成出库任务,更新出库单头失败"); | 1432 | throw new ServiceException("完成出库任务,更新出库单头失败"); |
1430 | } | 1433 | } |
1431 | } | 1434 | } |
1432 | - LogRecordContext.putVariable("fromLocationCode", fromLocationCode); | ||
1433 | - LogRecordContext.putVariable("containerCode", containerCode); | ||
1434 | - LogRecordContext.putVariable("extraJsonString", JSON.toJSONString(shipmentDetailList)); | 1435 | + LogRecordContext.putVariable("extraJsonString", JSON.toJSONString(taskDetailList)); |
1435 | return Result.ok("完成出库任务"); | 1436 | return Result.ok("完成出库任务"); |
1436 | } | 1437 | } |
1437 | 1438 |