Showing
6 changed files
with
11 additions
and
41 deletions
| @@ -118,10 +118,8 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic | @@ -118,10 +118,8 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic | ||
| 118 | handlePurchaseOrderRevokeData(flowStatus, businessId); | 118 | handlePurchaseOrderRevokeData(flowStatus, businessId); |
| 119 | break; | 119 | break; |
| 120 | case "SPEC_CHANGE_SUBMIT": | 120 | case "SPEC_CHANGE_SUBMIT": |
| 121 | - handleOrderSpecChangeData(flowStatus, businessId, true, true); | ||
| 122 | - break; | ||
| 123 | case "SPEC_CHANGE_CONFIRM": | 121 | case "SPEC_CHANGE_CONFIRM": |
| 124 | - handleOrderSpecChangeData(flowStatus, businessId, null, false); | 122 | + handleOrderSpecChangeData(flowStatus, businessId); |
| 125 | break; | 123 | break; |
| 126 | default: | 124 | default: |
| 127 | break; | 125 | break; |
| @@ -353,17 +351,13 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic | @@ -353,17 +351,13 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic | ||
| 353 | * @param flowStatus 审核结果 | 351 | * @param flowStatus 审核结果 |
| 354 | * @param businessId 业务ID | 352 | * @param businessId 业务ID |
| 355 | */ | 353 | */ |
| 356 | - private void handleOrderSpecChangeData(String flowStatus, String businessId, Boolean output, boolean notice) { | 354 | + private void handleOrderSpecChangeData(String flowStatus, String businessId) { |
| 357 | if (FlowInstanceStatus.APPROVE_PASS.getCode().equals(flowStatus) | 355 | if (FlowInstanceStatus.APPROVE_PASS.getCode().equals(flowStatus) |
| 358 | || FlowInstanceStatus.FINISH.getCode().equals(flowStatus)) { | 356 | || FlowInstanceStatus.FINISH.getCode().equals(flowStatus)) { |
| 359 | orderChangeRecordService.reviewPass(businessId); | 357 | orderChangeRecordService.reviewPass(businessId); |
| 360 | } else if (FlowInstanceStatus.REVOKE.getCode().equals(flowStatus) | 358 | } else if (FlowInstanceStatus.REVOKE.getCode().equals(flowStatus) |
| 361 | - || FlowInstanceStatus.REFUSE.getCode().equals(flowStatus)) { | ||
| 362 | - orderChangeRecordService.reviewRefuse(businessId, output); | ||
| 363 | - if (notice) { | ||
| 364 | - // todo 消息通知 | ||
| 365 | - } | ||
| 366 | - } else if (FlowInstanceStatus.TERMINATION.getCode().equals(flowStatus)) { | 359 | + || FlowInstanceStatus.REFUSE.getCode().equals(flowStatus) |
| 360 | + || FlowInstanceStatus.TERMINATION.getCode().equals(flowStatus)) { | ||
| 367 | orderChangeRecordService.updateStatus(businessId, "REFUSE"); | 361 | orderChangeRecordService.updateStatus(businessId, "REFUSE"); |
| 368 | } | 362 | } |
| 369 | } | 363 | } |
| @@ -270,9 +270,6 @@ public class OrderChangeRecordServiceImpl extends BaseMpServiceImpl<OrderChangeR | @@ -270,9 +270,6 @@ public class OrderChangeRecordServiceImpl extends BaseMpServiceImpl<OrderChangeR | ||
| 270 | if (OrderSpecChangeStatus.CANCEL.getCode().equals(status)) { | 270 | if (OrderSpecChangeStatus.CANCEL.getCode().equals(status)) { |
| 271 | // 更新订货单变更状态 | 271 | // 更新订货单变更状态 |
| 272 | purchaseOrderInfoService.updateSpecChangeStatus(record.getOrderId(), status); | 272 | purchaseOrderInfoService.updateSpecChangeStatus(record.getOrderId(), status); |
| 273 | - } else if ("PASS".equals(status)) { | ||
| 274 | - // 更新订货单变更状态 | ||
| 275 | - purchaseOrderInfoService.updateSpecChangeStatus(record.getOrderId(), OrderSpecChangeStatus.COMPLETED.getCode()); | ||
| 276 | } | 273 | } |
| 277 | } | 274 | } |
| 278 | 275 | ||
| @@ -292,23 +289,4 @@ public class OrderChangeRecordServiceImpl extends BaseMpServiceImpl<OrderChangeR | @@ -292,23 +289,4 @@ public class OrderChangeRecordServiceImpl extends BaseMpServiceImpl<OrderChangeR | ||
| 292 | // 更新订货单物料行数据 | 289 | // 更新订货单物料行数据 |
| 293 | purchaseOrderLineService.update(record.getOrderId(), record.getAfterChangeSpecList()); | 290 | purchaseOrderLineService.update(record.getOrderId(), record.getAfterChangeSpecList()); |
| 294 | } | 291 | } |
| 295 | - | ||
| 296 | - @Override | ||
| 297 | - public void reviewRefuse(String id, Boolean output) { | ||
| 298 | - if (StringUtils.isBlank(id)) { | ||
| 299 | - return; | ||
| 300 | - } | ||
| 301 | - OrderInfoChangeRecord record = findById(id); | ||
| 302 | - if (record == null) { | ||
| 303 | - throw new DefaultClientException("规格变更记录不存在!"); | ||
| 304 | - } | ||
| 305 | - // 更新状态 | ||
| 306 | - LambdaUpdateWrapper<OrderInfoChangeRecord> updateWrapper = Wrappers.lambdaUpdate(OrderInfoChangeRecord.class); | ||
| 307 | - updateWrapper.set(OrderInfoChangeRecord::getExamineStatus, "REFUSE") | ||
| 308 | - .eq(OrderInfoChangeRecord::getId, id); | ||
| 309 | - if (output != null) { | ||
| 310 | - updateWrapper.set(OrderInfoChangeRecord::getOutput, output); | ||
| 311 | - } | ||
| 312 | - getBaseMapper().update(updateWrapper); | ||
| 313 | - } | ||
| 314 | } | 292 | } |
| @@ -19,6 +19,7 @@ import com.lframework.starter.common.utils.Assert; | @@ -19,6 +19,7 @@ import com.lframework.starter.common.utils.Assert; | ||
| 19 | import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; | 19 | import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; |
| 20 | import com.lframework.xingyun.sc.entity.CustomerCredit; | 20 | import com.lframework.xingyun.sc.entity.CustomerCredit; |
| 21 | import com.lframework.xingyun.sc.entity.PurchaseOrderInfo; | 21 | import com.lframework.xingyun.sc.entity.PurchaseOrderInfo; |
| 22 | +import com.lframework.xingyun.sc.enums.OrderSpecChangeStatus; | ||
| 22 | import com.lframework.xingyun.sc.mappers.PurchaseOrderInfoMapper; | 23 | import com.lframework.xingyun.sc.mappers.PurchaseOrderInfoMapper; |
| 23 | import com.lframework.xingyun.sc.service.customer.CustomerCreditService; | 24 | import com.lframework.xingyun.sc.service.customer.CustomerCreditService; |
| 24 | import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; | 25 | import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; |
| @@ -369,6 +370,7 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde | @@ -369,6 +370,7 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde | ||
| 369 | .set(PurchaseOrderInfo::getDeptId, StringUtil.isBlank(orderInfo.getDeptId()) ? null : orderInfo.getDeptId()) | 370 | .set(PurchaseOrderInfo::getDeptId, StringUtil.isBlank(orderInfo.getDeptId()) ? null : orderInfo.getDeptId()) |
| 370 | .set(PurchaseOrderInfo::getWorkshopId, StringUtil.isBlank(orderInfo.getWorkshopId()) ? null : orderInfo.getWorkshopId()) | 371 | .set(PurchaseOrderInfo::getWorkshopId, StringUtil.isBlank(orderInfo.getWorkshopId()) ? null : orderInfo.getWorkshopId()) |
| 371 | .set(PurchaseOrderInfo::getCustomerCreditId, StringUtil.isBlank(orderInfo.getCustomerCreditId()) ? null : orderInfo.getCustomerCreditId()) | 372 | .set(PurchaseOrderInfo::getCustomerCreditId, StringUtil.isBlank(orderInfo.getCustomerCreditId()) ? null : orderInfo.getCustomerCreditId()) |
| 373 | + .set(PurchaseOrderInfo::getSpecChangeStatus, OrderSpecChangeStatus.COMPLETED.getCode()) | ||
| 372 | .eq(PurchaseOrderInfo::getId, orderInfo.getId()); | 374 | .eq(PurchaseOrderInfo::getId, orderInfo.getId()); |
| 373 | getBaseMapper().update(updateWrapper); | 375 | getBaseMapper().update(updateWrapper); |
| 374 | } | 376 | } |
| @@ -261,6 +261,7 @@ public class PurchaseOrderLineServiceImpl extends BaseMpServiceImpl<PurchaseOrde | @@ -261,6 +261,7 @@ public class PurchaseOrderLineServiceImpl extends BaseMpServiceImpl<PurchaseOrde | ||
| 261 | } | 261 | } |
| 262 | LambdaUpdateWrapper<PurchaseOrderLine> updateWrapper = Wrappers.lambdaUpdate(PurchaseOrderLine.class); | 262 | LambdaUpdateWrapper<PurchaseOrderLine> updateWrapper = Wrappers.lambdaUpdate(PurchaseOrderLine.class); |
| 263 | updateWrapper.eq(PurchaseOrderLine::getPurchaseOrderId, orderId); | 263 | updateWrapper.eq(PurchaseOrderLine::getPurchaseOrderId, orderId); |
| 264 | + | ||
| 264 | getBaseMapper().delete(updateWrapper); | 265 | getBaseMapper().delete(updateWrapper); |
| 265 | } | 266 | } |
| 266 | 267 |
| @@ -72,11 +72,4 @@ public interface OrderChangeRecordService extends BaseMpService<OrderInfoChangeR | @@ -72,11 +72,4 @@ public interface OrderChangeRecordService extends BaseMpService<OrderInfoChangeR | ||
| 72 | * @param id 主键ID | 72 | * @param id 主键ID |
| 73 | */ | 73 | */ |
| 74 | void reviewPass(String id); | 74 | void reviewPass(String id); |
| 75 | - | ||
| 76 | - /** | ||
| 77 | - * 审批拒绝 | ||
| 78 | - * | ||
| 79 | - * @param id 主键ID | ||
| 80 | - */ | ||
| 81 | - void reviewRefuse(String id, Boolean output); | ||
| 82 | } | 75 | } |
| @@ -88,7 +88,8 @@ | @@ -88,7 +88,8 @@ | ||
| 88 | width, width_tol_pos, width_tol_neg, | 88 | width, width_tol_pos, width_tol_neg, |
| 89 | length, length_tol_pos, length_tol_neg, | 89 | length, length_tol_pos, length_tol_neg, |
| 90 | status, quantity, sales_price, delivery_date, show_order, | 90 | status, quantity, sales_price, delivery_date, show_order, |
| 91 | - assessment_exceeds_agreement, create_by_id, create_by, update_by_id, update_by | 91 | + assessment_exceeds_agreement, create_by_id, create_by, update_by_id, update_by, |
| 92 | + create_time, update_time | ||
| 92 | ) VALUES | 93 | ) VALUES |
| 93 | <foreach collection="specList" item="item" separator=","> | 94 | <foreach collection="specList" item="item" separator=","> |
| 94 | ( | 95 | ( |
| @@ -97,7 +98,8 @@ | @@ -97,7 +98,8 @@ | ||
| 97 | #{item.width}, #{item.widthTolPos}, #{item.widthTolNeg}, | 98 | #{item.width}, #{item.widthTolPos}, #{item.widthTolNeg}, |
| 98 | #{item.length}, #{item.lengthTolPos}, #{item.lengthTolNeg}, | 99 | #{item.length}, #{item.lengthTolPos}, #{item.lengthTolNeg}, |
| 99 | #{item.status}, #{item.quantity}, #{item.salesPrice}, #{item.deliveryDate}, #{item.showOrder}, | 100 | #{item.status}, #{item.quantity}, #{item.salesPrice}, #{item.deliveryDate}, #{item.showOrder}, |
| 100 | - #{item.assessmentExceedsAgreement}, #{item.createById}, #{item.createBy}, #{item.updateById}, #{item.updateBy} | 101 | + #{item.assessmentExceedsAgreement}, #{item.createById}, #{item.createBy}, #{item.updateById}, #{item.updateBy}, |
| 102 | + #{item.createTime}, #{item.updateTime} | ||
| 101 | ) | 103 | ) |
| 102 | </foreach> | 104 | </foreach> |
| 103 | </insert> | 105 | </insert> |