委托加工更新提交erp优化

This commit is contained in:
潘荣晟
2026-02-26 11:26:43 +08:00
parent 3ad1353a00
commit 956d939cc6
3 changed files with 9 additions and 2 deletions

View File

@@ -192,5 +192,7 @@ public class EntrustOrderOrderRespVO {
@ExcelProperty("订单类型") @ExcelProperty("订单类型")
@Schema(description = "订单类型,(字典SPLY_BSN_TP)") @Schema(description = "订单类型,(字典SPLY_BSN_TP)")
private String splyBsnTp; private String splyBsnTp;
@Schema(description = "相关订单id")
private Long relatedOrderId;
} }

View File

@@ -227,4 +227,7 @@ public class SalesOrderRespVO {
@Schema(description = "erp失败原因") @Schema(description = "erp失败原因")
private String issueCause; private String issueCause;
@Schema(description = "相关订单id")
private Long relatedOrderId;
} }

View File

@@ -981,8 +981,10 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
int update = purchaseOrderMapper.update(updateWrapper); int update = purchaseOrderMapper.update(updateWrapper);
log.info("已绑定的订单已解绑订单ID{},影响行数:{}",orderDO.getRelatedOrderId(),update); log.info("已绑定的订单已解绑订单ID{},影响行数:{}",orderDO.getRelatedOrderId(),update);
} }
orderDO.setRelatedOrderId(reqVO.getBoundId()); LambdaUpdateWrapper<PurchaseOrderDO> boundUpdateWrapper = new LambdaUpdateWrapper<>();
purchaseOrderMapper.updateById(orderDO); boundUpdateWrapper.eq(PurchaseOrderDO::getId, reqVO.getId())
.set(PurchaseOrderDO::getRelatedOrderId, reqVO.getBoundId());
purchaseOrderMapper.update(boundUpdateWrapper);
log.info("订单ID{} 已绑定订单ID{}", reqVO.getId(), reqVO.getBoundId()); log.info("订单ID{} 已绑定订单ID{}", reqVO.getId(), reqVO.getBoundId());
//修改已绑定的的订单 //修改已绑定的的订单
if (boundOrder.getRelatedOrderId() != null){ if (boundOrder.getRelatedOrderId() != null){