Showing
5 changed files
with
62 additions
and
0 deletions
| @@ -303,6 +303,8 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic | @@ -303,6 +303,8 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic | ||
| 303 | if (FlowInstanceStatus.APPROVE_PASS.getCode().equals(flowStatus) | 303 | if (FlowInstanceStatus.APPROVE_PASS.getCode().equals(flowStatus) |
| 304 | || FlowInstanceStatus.FINISH.getCode().equals(flowStatus)) { | 304 | || FlowInstanceStatus.FINISH.getCode().equals(flowStatus)) { |
| 305 | purchaseOrderInfoService.updateStatus(businessId, "PASS"); | 305 | purchaseOrderInfoService.updateStatus(businessId, "PASS"); |
| 306 | + //审核通过,需要同步修改合同相关内容 | ||
| 307 | + contractDistributorStandardService.orderUpdateContract(businessId); | ||
| 306 | //审核通过,物料行存在试样订单的需要对当前订单拆分 | 308 | //审核通过,物料行存在试样订单的需要对当前订单拆分 |
| 307 | packPurchaseOrderInfo(businessId); | 309 | packPurchaseOrderInfo(businessId); |
| 308 | } else if (FlowInstanceStatus.REVOKE.getCode().equals(flowStatus) | 310 | } else if (FlowInstanceStatus.REVOKE.getCode().equals(flowStatus) |
| @@ -1307,6 +1307,47 @@ public class ContractDistributorStandardServiceImpl extends | @@ -1307,6 +1307,47 @@ public class ContractDistributorStandardServiceImpl extends | ||
| 1307 | }); | 1307 | }); |
| 1308 | } | 1308 | } |
| 1309 | 1309 | ||
| 1310 | + @OpLog(type = OtherOpLogType.class, name = "订单修改合同,ID:{}", params = {"#id"}) | ||
| 1311 | + @Transactional(rollbackFor = Exception.class) | ||
| 1312 | + @Override | ||
| 1313 | + public void orderUpdateContract(String orderId) { | ||
| 1314 | + PurchaseOrderInfo vo = purchaseOrderInfoService.findById(orderId); | ||
| 1315 | + if (ObjectUtil.isNull(vo)) { | ||
| 1316 | + throw new DefaultClientException("订货单表不存在!"); | ||
| 1317 | + } | ||
| 1318 | + //更新基本信息 | ||
| 1319 | + LambdaUpdateWrapper<ContractDistributorStandard> updateWrapper = Wrappers.lambdaUpdate(ContractDistributorStandard.class) | ||
| 1320 | + .set(ContractDistributorStandard::getSupplier, vo.getSupplyUnit()) | ||
| 1321 | + .set(ContractDistributorStandard::getBuyer, vo.getOrderingUnit()) | ||
| 1322 | + .set(vo.getDeptId() != null, ContractDistributorStandard::getDeptId, vo.getDeptId()) | ||
| 1323 | + .set(vo.getRegion() != null, ContractDistributorStandard::getRegion, vo.getRegion()) | ||
| 1324 | + .set(vo.getStockUpCompanyId() != null, ContractDistributorStandard::getStockUpCompanyId, vo.getStockUpCompanyId()) | ||
| 1325 | + .set(ContractDistributorStandard::getOrderDate, vo.getOrderDate()) | ||
| 1326 | + .set(ContractDistributorStandard::getWorkshopId, vo.getWorkshopId()) | ||
| 1327 | + .set(ContractDistributorStandard::getPaymentTerms, vo.getSettlementTerms()) | ||
| 1328 | + .set(ContractDistributorStandard::getExecutionStandard, vo.getExecutionStandard()) | ||
| 1329 | + .set(ContractDistributorStandard::getExecutionStandardRemarks, vo.getExecutionStandardRemarks()) | ||
| 1330 | + .set(ContractDistributorStandard::getTransportMode, vo.getDeliveryMethod()) | ||
| 1331 | + .set(ContractDistributorStandard::getPieceWeightHead, vo.getPieceWeightHeader()) | ||
| 1332 | + .set(ContractDistributorStandard::getSurface, vo.getSurface()) | ||
| 1333 | + .set(ContractDistributorStandard::getTolerance, vo.getTolerance()) | ||
| 1334 | + .set(ContractDistributorStandard::getPerformance, vo.getPerformance()) | ||
| 1335 | + .set(ContractDistributorStandard::getComponent, vo.getElement()) | ||
| 1336 | + .set(ContractDistributorStandard::getPackaging, vo.getPackaging()) | ||
| 1337 | + .set(ContractDistributorStandard::getRemarks, vo.getRemarks()) | ||
| 1338 | + //合计不含税金额 | ||
| 1339 | +// .set(ContractDistributorStandard::getTotalAmountExcludingTax, ) | ||
| 1340 | + //合计总金额 | ||
| 1341 | +// .set(ContractDistributorStandard::getTotalAmountIncludingTax, ) | ||
| 1342 | + .set(ContractDistributorStandard::getTotalQuantity, vo.getTotalQuantity()) | ||
| 1343 | + .eq(ContractDistributorStandard::getId, vo.getContractId()); | ||
| 1344 | + | ||
| 1345 | + getBaseMapper().update(updateWrapper); | ||
| 1346 | + | ||
| 1347 | + //更新物料信息 | ||
| 1348 | + | ||
| 1349 | + } | ||
| 1350 | + | ||
| 1310 | @CacheEvict(value = ContractDistributorStandard.CACHE_NAME, key = "@cacheVariables.tenantId() + #key") | 1351 | @CacheEvict(value = ContractDistributorStandard.CACHE_NAME, key = "@cacheVariables.tenantId() + #key") |
| 1311 | @Override | 1352 | @Override |
| 1312 | public void cleanCacheByKey(Serializable key) { | 1353 | public void cleanCacheByKey(Serializable key) { |
| @@ -421,7 +421,9 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde | @@ -421,7 +421,9 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde | ||
| 421 | .set(PurchaseOrderInfo::getOrderNo, StringUtil.isBlank(vo.getOrderNo()) ? null : vo.getOrderNo()) | 421 | .set(PurchaseOrderInfo::getOrderNo, StringUtil.isBlank(vo.getOrderNo()) ? null : vo.getOrderNo()) |
| 422 | .set(PurchaseOrderInfo::getSupplyUnit, StringUtil.isBlank(vo.getSupplyUnit()) ? null : vo.getSupplyUnit()) | 422 | .set(PurchaseOrderInfo::getSupplyUnit, StringUtil.isBlank(vo.getSupplyUnit()) ? null : vo.getSupplyUnit()) |
| 423 | .set(PurchaseOrderInfo::getOrderingUnit, StringUtil.isBlank(vo.getOrderingUnit()) ? null : vo.getOrderingUnit()) | 423 | .set(PurchaseOrderInfo::getOrderingUnit, StringUtil.isBlank(vo.getOrderingUnit()) ? null : vo.getOrderingUnit()) |
| 424 | + .set(PurchaseOrderInfo::getStockUpCompanyId, StringUtil.isBlank(vo.getStockUpCompanyId()) ? null : vo.getStockUpCompanyId()) | ||
| 424 | .set(PurchaseOrderInfo::getOrderDate, vo.getOrderDate() == null ? null : vo.getOrderDate()) | 425 | .set(PurchaseOrderInfo::getOrderDate, vo.getOrderDate() == null ? null : vo.getOrderDate()) |
| 426 | + .set(PurchaseOrderInfo::getRegion, StringUtil.isBlank(vo.getRegion()) ? null : vo.getRegion()) | ||
| 425 | .set(PurchaseOrderInfo::getSettlementTerms, StringUtil.isBlank(vo.getSettlementTerms()) ? null : vo.getSettlementTerms()) | 427 | .set(PurchaseOrderInfo::getSettlementTerms, StringUtil.isBlank(vo.getSettlementTerms()) ? null : vo.getSettlementTerms()) |
| 426 | .set(PurchaseOrderInfo::getDeliveryMethod, StringUtil.isBlank(vo.getDeliveryMethod()) ? null : vo.getDeliveryMethod()) | 428 | .set(PurchaseOrderInfo::getDeliveryMethod, StringUtil.isBlank(vo.getDeliveryMethod()) ? null : vo.getDeliveryMethod()) |
| 427 | .set(PurchaseOrderInfo::getPriceListNo, StringUtil.isBlank(vo.getPriceListNo()) ? null : vo.getPriceListNo()) | 429 | .set(PurchaseOrderInfo::getPriceListNo, StringUtil.isBlank(vo.getPriceListNo()) ? null : vo.getPriceListNo()) |
| @@ -125,4 +125,9 @@ public interface ContractDistributorStandardService extends BaseMpService<Contra | @@ -125,4 +125,9 @@ public interface ContractDistributorStandardService extends BaseMpService<Contra | ||
| 125 | * 合同规范补充提醒 | 125 | * 合同规范补充提醒 |
| 126 | */ | 126 | */ |
| 127 | void supplementContractSpecReminder(); | 127 | void supplementContractSpecReminder(); |
| 128 | + | ||
| 129 | + /** | ||
| 130 | + * 订单变动后同步修改合同相关信息 | ||
| 131 | + */ | ||
| 132 | + void orderUpdateContract(String orderId); | ||
| 128 | } | 133 | } |
| @@ -51,6 +51,12 @@ public class UpdatePurchaseOrderInfoVo implements BaseVo, Serializable { | @@ -51,6 +51,12 @@ public class UpdatePurchaseOrderInfoVo implements BaseVo, Serializable { | ||
| 51 | private String orderingUnitName; | 51 | private String orderingUnitName; |
| 52 | 52 | ||
| 53 | /** | 53 | /** |
| 54 | + * 备货单位ID | ||
| 55 | + */ | ||
| 56 | + @ApiModelProperty("备货单位ID") | ||
| 57 | + private String stockUpCompanyId; | ||
| 58 | + | ||
| 59 | + /** | ||
| 54 | * 订货日期 | 60 | * 订货日期 |
| 55 | */ | 61 | */ |
| 56 | @ApiModelProperty("订货日期") | 62 | @ApiModelProperty("订货日期") |
| @@ -185,6 +191,12 @@ public class UpdatePurchaseOrderInfoVo implements BaseVo, Serializable { | @@ -185,6 +191,12 @@ public class UpdatePurchaseOrderInfoVo implements BaseVo, Serializable { | ||
| 185 | private String workshopId; | 191 | private String workshopId; |
| 186 | 192 | ||
| 187 | /** | 193 | /** |
| 194 | + * 区域 | ||
| 195 | + */ | ||
| 196 | + @ApiModelProperty("区域") | ||
| 197 | + private String region; | ||
| 198 | + | ||
| 199 | + /** | ||
| 188 | * 客户资信Id | 200 | * 客户资信Id |
| 189 | */ | 201 | */ |
| 190 | @ApiModelProperty("客户资信Id") | 202 | @ApiModelProperty("客户资信Id") |