Commit 440d6b24d11126f3fef87030e735a10ef12af8e2
1 parent
f07c2523
fix: 订单编辑
Showing
2 changed files
with
12 additions
and
4 deletions
src/main/java/com/order/erp/domain/OrderOptTypeEnum.java
... | ... | @@ -17,7 +17,7 @@ public enum OrderOptTypeEnum { |
17 | 17 | |
18 | 18 | ORDER_CREATE(0, "订单创建"), |
19 | 19 | |
20 | - ORDER_EDIT(10, "订单编辑"), | |
20 | + ORDER_EDIT(10, "订单基础信息编辑"), | |
21 | 21 | |
22 | 22 | ORDER_FIELD_UNLOCK_APPLY(20, "订单字段解锁申请"), |
23 | 23 | |
... | ... | @@ -25,6 +25,10 @@ public enum OrderOptTypeEnum { |
25 | 25 | |
26 | 26 | ORDER_REPORT_EDIT_APPLY(40, "项目报告书编辑申请"), |
27 | 27 | |
28 | + ORDER_TRACKER_EDIT_APPLY(50, "跟单信息编辑"), | |
29 | + | |
30 | + ORDER_INSPECT_EDIT_APPLY(60, "质检信息编辑"), | |
31 | + | |
28 | 32 | ; |
29 | 33 | private Integer type; |
30 | 34 | ... | ... |
src/main/java/com/order/erp/service/order/impl/OrderBaseInfoServiceImpl.java
... | ... | @@ -1172,9 +1172,11 @@ public class OrderBaseInfoServiceImpl extends ServiceImpl<OrderBaseInfoMapper, O |
1172 | 1172 | if (Objects.isNull(orderBaseInfoDo)) { |
1173 | 1173 | throw new BusinessException(ServerResultCode.ORDER_BASE_INFO_EMPTY); |
1174 | 1174 | } |
1175 | + OrderOptLogDO optLogDO = new OrderOptLogDO(); | |
1175 | 1176 | if (Objects.nonNull(updateVO.getBaseInfo())) { |
1176 | 1177 | buildUpdateVO(updateVO.getBaseInfo(), orderBaseInfoDo); |
1177 | 1178 | orderBaseInfoDo.setId(updateVO.getOrderId()); |
1179 | + optLogDO = buildOrderOptLogDo(updateVO.getOrderId(), userId, OrderOptTypeEnum.ORDER_EDIT.getDesc(), JSONObject.toJSONString(updateVO)); | |
1178 | 1180 | } |
1179 | 1181 | if (Objects.nonNull(updateVO.getProfitAnalysisInfo())) { |
1180 | 1182 | checkApply(updateVO.getOrderId(), userId); |
... | ... | @@ -1182,7 +1184,7 @@ public class OrderBaseInfoServiceImpl extends ServiceImpl<OrderBaseInfoMapper, O |
1182 | 1184 | orderFieldLockApplyService.save(orderFieldLockApplyDO); |
1183 | 1185 | |
1184 | 1186 | orderBaseInfoDo.setOrderStatus(OrderStatusEnum.PROFIT_WAIT_AUDIT.getStatus()); |
1185 | - orderOptLogService.save(buildOrderOptLogDo(updateVO.getOrderId(), userId, OrderOptTypeEnum.ORDER_PROFIT_EDIT_APPLY.getDesc(), orderFieldLockApplyDO.getFields())); | |
1187 | + optLogDO = buildOrderOptLogDo(updateVO.getOrderId(), userId, OrderOptTypeEnum.ORDER_PROFIT_EDIT_APPLY.getDesc(), orderFieldLockApplyDO.getFields()); | |
1186 | 1188 | } |
1187 | 1189 | |
1188 | 1190 | if (Objects.nonNull(updateVO.getReportInfo())) { |
... | ... | @@ -1191,7 +1193,7 @@ public class OrderBaseInfoServiceImpl extends ServiceImpl<OrderBaseInfoMapper, O |
1191 | 1193 | orderFieldLockApplyService.save(orderFieldLockApplyDO); |
1192 | 1194 | |
1193 | 1195 | orderBaseInfoDo.setOrderStatus(OrderStatusEnum.REPORT_WAIT_AUDIT.getStatus()); |
1194 | - orderOptLogService.save(buildOrderOptLogDo(updateVO.getOrderId(), userId, OrderOptTypeEnum.ORDER_REPORT_EDIT_APPLY.getDesc(), orderFieldLockApplyDO.getFields())); | |
1196 | + optLogDO = buildOrderOptLogDo(updateVO.getOrderId(), userId, OrderOptTypeEnum.ORDER_REPORT_EDIT_APPLY.getDesc(), orderFieldLockApplyDO.getFields()); | |
1195 | 1197 | } |
1196 | 1198 | |
1197 | 1199 | if (Objects.nonNull(updateVO.getTrackStageInfo())) { |
... | ... | @@ -1250,6 +1252,7 @@ public class OrderBaseInfoServiceImpl extends ServiceImpl<OrderBaseInfoMapper, O |
1250 | 1252 | trackStageService.save(trackStageDO); |
1251 | 1253 | } |
1252 | 1254 | orderBaseInfoDo.setOrderStatus(OrderStatusEnum.TRACK_ING.getStatus()); |
1255 | + optLogDO = buildOrderOptLogDo(updateVO.getOrderId(), userId, OrderOptTypeEnum.ORDER_TRACKER_EDIT_APPLY.getDesc(), JSONObject.toJSONString(updateVO)); | |
1253 | 1256 | } |
1254 | 1257 | |
1255 | 1258 | if (Objects.nonNull(updateVO.getInspectionStageInfo())) { |
... | ... | @@ -1305,9 +1308,10 @@ public class OrderBaseInfoServiceImpl extends ServiceImpl<OrderBaseInfoMapper, O |
1305 | 1308 | inspectionStageService.save(inspectionStageDO); |
1306 | 1309 | } |
1307 | 1310 | orderBaseInfoDo.setOrderStatus(OrderStatusEnum.INSPECT_ING.getStatus()); |
1311 | + optLogDO = buildOrderOptLogDo(updateVO.getOrderId(), userId, OrderOptTypeEnum.ORDER_INSPECT_EDIT_APPLY.getDesc(), JSONObject.toJSONString(updateVO)); | |
1308 | 1312 | } |
1309 | 1313 | updateById(orderBaseInfoDo); |
1310 | - orderOptLogService.save(buildOrderOptLogDo(updateVO.getOrderId(), userId, OrderOptTypeEnum.ORDER_EDIT.getDesc(), JSONObject.toJSONString(updateVO))); | |
1314 | + orderOptLogService.save(optLogDO); | |
1311 | 1315 | return ServerResult.success(); |
1312 | 1316 | } |
1313 | 1317 | ... | ... |