Showing
6 changed files
with
11 additions
and
41 deletions
| ... | ... | @@ -118,10 +118,8 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic |
| 118 | 118 | handlePurchaseOrderRevokeData(flowStatus, businessId); |
| 119 | 119 | break; |
| 120 | 120 | case "SPEC_CHANGE_SUBMIT": |
| 121 | - handleOrderSpecChangeData(flowStatus, businessId, true, true); | |
| 122 | - break; | |
| 123 | 121 | case "SPEC_CHANGE_CONFIRM": |
| 124 | - handleOrderSpecChangeData(flowStatus, businessId, null, false); | |
| 122 | + handleOrderSpecChangeData(flowStatus, businessId); | |
| 125 | 123 | break; |
| 126 | 124 | default: |
| 127 | 125 | break; |
| ... | ... | @@ -353,17 +351,13 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic |
| 353 | 351 | * @param flowStatus 审核结果 |
| 354 | 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 | 355 | if (FlowInstanceStatus.APPROVE_PASS.getCode().equals(flowStatus) |
| 358 | 356 | || FlowInstanceStatus.FINISH.getCode().equals(flowStatus)) { |
| 359 | 357 | orderChangeRecordService.reviewPass(businessId); |
| 360 | 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 | 361 | orderChangeRecordService.updateStatus(businessId, "REFUSE"); |
| 368 | 362 | } |
| 369 | 363 | } | ... | ... |
| ... | ... | @@ -270,9 +270,6 @@ public class OrderChangeRecordServiceImpl extends BaseMpServiceImpl<OrderChangeR |
| 270 | 270 | if (OrderSpecChangeStatus.CANCEL.getCode().equals(status)) { |
| 271 | 271 | // 更新订货单变更状态 |
| 272 | 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 | 289 | // 更新订货单物料行数据 |
| 293 | 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 | 19 | import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; |
| 20 | 20 | import com.lframework.xingyun.sc.entity.CustomerCredit; |
| 21 | 21 | import com.lframework.xingyun.sc.entity.PurchaseOrderInfo; |
| 22 | +import com.lframework.xingyun.sc.enums.OrderSpecChangeStatus; | |
| 22 | 23 | import com.lframework.xingyun.sc.mappers.PurchaseOrderInfoMapper; |
| 23 | 24 | import com.lframework.xingyun.sc.service.customer.CustomerCreditService; |
| 24 | 25 | import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; |
| ... | ... | @@ -369,6 +370,7 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde |
| 369 | 370 | .set(PurchaseOrderInfo::getDeptId, StringUtil.isBlank(orderInfo.getDeptId()) ? null : orderInfo.getDeptId()) |
| 370 | 371 | .set(PurchaseOrderInfo::getWorkshopId, StringUtil.isBlank(orderInfo.getWorkshopId()) ? null : orderInfo.getWorkshopId()) |
| 371 | 372 | .set(PurchaseOrderInfo::getCustomerCreditId, StringUtil.isBlank(orderInfo.getCustomerCreditId()) ? null : orderInfo.getCustomerCreditId()) |
| 373 | + .set(PurchaseOrderInfo::getSpecChangeStatus, OrderSpecChangeStatus.COMPLETED.getCode()) | |
| 372 | 374 | .eq(PurchaseOrderInfo::getId, orderInfo.getId()); |
| 373 | 375 | getBaseMapper().update(updateWrapper); |
| 374 | 376 | } | ... | ... |
| ... | ... | @@ -261,6 +261,7 @@ public class PurchaseOrderLineServiceImpl extends BaseMpServiceImpl<PurchaseOrde |
| 261 | 261 | } |
| 262 | 262 | LambdaUpdateWrapper<PurchaseOrderLine> updateWrapper = Wrappers.lambdaUpdate(PurchaseOrderLine.class); |
| 263 | 263 | updateWrapper.eq(PurchaseOrderLine::getPurchaseOrderId, orderId); |
| 264 | + | |
| 264 | 265 | getBaseMapper().delete(updateWrapper); |
| 265 | 266 | } |
| 266 | 267 | ... | ... |
| ... | ... | @@ -72,11 +72,4 @@ public interface OrderChangeRecordService extends BaseMpService<OrderInfoChangeR |
| 72 | 72 | * @param id 主键ID |
| 73 | 73 | */ |
| 74 | 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 | 88 | width, width_tol_pos, width_tol_neg, |
| 89 | 89 | length, length_tol_pos, length_tol_neg, |
| 90 | 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 | 93 | ) VALUES |
| 93 | 94 | <foreach collection="specList" item="item" separator=","> |
| 94 | 95 | ( |
| ... | ... | @@ -97,7 +98,8 @@ |
| 97 | 98 | #{item.width}, #{item.widthTolPos}, #{item.widthTolNeg}, |
| 98 | 99 | #{item.length}, #{item.lengthTolPos}, #{item.lengthTolNeg}, |
| 99 | 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 | 104 | </foreach> |
| 103 | 105 | </insert> | ... | ... |