Commit 973cb510668555165da4fbedd7190a994566d7b5

Authored by 房远帅
1 parent f0403965

楚江ERP:延期发货相关修改

@@ -157,7 +157,7 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic @@ -157,7 +157,7 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic
157 handleReplenishmentOrderStatus(flowStatus, businessId); 157 handleReplenishmentOrderStatus(flowStatus, businessId);
158 break; 158 break;
159 case "DELAYED_SHIPMENT": 159 case "DELAYED_SHIPMENT":
160 - handleDelayedShipmentData(flowStatus, businessId, variable.get("shipmentsOrderId")); 160 + handleDelayedShipmentData(flowStatus, businessId);
161 break; 161 break;
162 default: 162 default:
163 break; 163 break;
@@ -494,6 +494,7 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic @@ -494,6 +494,7 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic
494 Object o = redisHandler.get("GET_SHIPMENTS_ORDER_ID_" + draftRequestCarTicket.getId()); 494 Object o = redisHandler.get("GET_SHIPMENTS_ORDER_ID_" + draftRequestCarTicket.getId());
495 if (o != null) { 495 if (o != null) {
496 ticketVo.setPurchaseOrderId(String.valueOf(o)); 496 ticketVo.setPurchaseOrderId(String.valueOf(o));
  497 + redisHandler.del("GET_SHIPMENTS_ORDER_ID_" + draftRequestCarTicket.getId());
497 } 498 }
498 return ticketVo; 499 return ticketVo;
499 } 500 }
@@ -504,13 +505,14 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic @@ -504,13 +505,14 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic
504 * @param flowStatus 505 * @param flowStatus
505 * @param businessId 506 * @param businessId
506 */ 507 */
507 - private void handleDelayedShipmentData(String flowStatus, String businessId, Object shipmentsOrderId) { 508 + private void handleDelayedShipmentData(String flowStatus, String businessId) {
508 if (FlowInstanceStatus.APPROVE_PASS.getCode().equals(flowStatus) 509 if (FlowInstanceStatus.APPROVE_PASS.getCode().equals(flowStatus)
509 || FlowInstanceStatus.FINISH.getCode().equals(flowStatus)) { 510 || FlowInstanceStatus.FINISH.getCode().equals(flowStatus)) {
510 delayedShipmentService.updateStatus(businessId, "PASS"); 511 delayedShipmentService.updateStatus(businessId, "PASS");
511 QueryDelayedShipmentDetailVo vo = new QueryDelayedShipmentDetailVo(); 512 QueryDelayedShipmentDetailVo vo = new QueryDelayedShipmentDetailVo();
512 vo.setDelayedShipmentId(businessId); 513 vo.setDelayedShipmentId(businessId);
513 List<DelayedShipmentDetail> query = delayedShipmentDetailService.query(vo); 514 List<DelayedShipmentDetail> query = delayedShipmentDetailService.query(vo);
  515 + Object shipmentsOrderId = redisHandler.get("GET_SHIPMENTS_ORDER_ID_" + businessId);
514 if (shipmentsOrderId != null) { 516 if (shipmentsOrderId != null) {
515 QueryRequestCarTicketVo vo2 = new QueryRequestCarTicketVo(); 517 QueryRequestCarTicketVo vo2 = new QueryRequestCarTicketVo();
516 vo2.setShipmentsOrderId(String.valueOf(shipmentsOrderId)); 518 vo2.setShipmentsOrderId(String.valueOf(shipmentsOrderId));
@@ -528,9 +530,11 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic @@ -528,9 +530,11 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic
528 if (difference.compareTo(BigDecimal.ZERO) == 0) { 530 if (difference.compareTo(BigDecimal.ZERO) == 0) {
529 //删除要车单 531 //删除要车单
530 requestCarTicketService.deleteById(requestCarTicketId); 532 requestCarTicketService.deleteById(requestCarTicketId);
  533 + redisHandler.del("GET_SHIPMENTS_ORDER_ID_" + businessId);
531 } else { 534 } else {
532 //更新计划吨位 535 //更新计划吨位
533 requestCarTicketService.updateQuantity(requestCarTicketId, difference); 536 requestCarTicketService.updateQuantity(requestCarTicketId, difference);
  537 + redisHandler.del("GET_SHIPMENTS_ORDER_ID_" + businessId);
534 } 538 }
535 } 539 }
536 } 540 }
@@ -10,6 +10,7 @@ import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo; @@ -10,6 +10,7 @@ import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo;
10 import com.lframework.starter.common.utils.CollectionUtil; 10 import com.lframework.starter.common.utils.CollectionUtil;
11 import com.lframework.starter.common.utils.StringUtil; 11 import com.lframework.starter.common.utils.StringUtil;
12 import com.lframework.starter.mq.core.service.MqProducerService; 12 import com.lframework.starter.mq.core.service.MqProducerService;
  13 +import com.lframework.starter.web.core.components.redis.RedisHandler;
13 import com.lframework.starter.web.core.components.security.SecurityUtil; 14 import com.lframework.starter.web.core.components.security.SecurityUtil;
14 import com.lframework.starter.web.core.impl.BaseMpServiceImpl; 15 import com.lframework.starter.web.core.impl.BaseMpServiceImpl;
15 import com.lframework.starter.web.core.utils.PageResultUtil;; 16 import com.lframework.starter.web.core.utils.PageResultUtil;;
@@ -43,6 +44,7 @@ import com.lframework.xingyun.sc.service.shipments.delay.DelayedShipmentService; @@ -43,6 +44,7 @@ import com.lframework.xingyun.sc.service.shipments.delay.DelayedShipmentService;
43 import com.lframework.xingyun.sc.vo.shipments.car.QueryRequestCarTicketVo; 44 import com.lframework.xingyun.sc.vo.shipments.car.QueryRequestCarTicketVo;
44 import com.lframework.xingyun.sc.vo.shipments.delay.*; 45 import com.lframework.xingyun.sc.vo.shipments.delay.*;
45 import org.apache.commons.collections.CollectionUtils; 46 import org.apache.commons.collections.CollectionUtils;
  47 +import org.springframework.beans.factory.annotation.Autowired;
46 import org.springframework.transaction.annotation.Transactional; 48 import org.springframework.transaction.annotation.Transactional;
47 import org.springframework.stereotype.Service; 49 import org.springframework.stereotype.Service;
48 import javax.annotation.Resource; 50 import javax.annotation.Resource;
@@ -78,6 +80,8 @@ public class DelayedShipmentServiceImpl extends BaseMpServiceImpl<DelayedShipmen @@ -78,6 +80,8 @@ public class DelayedShipmentServiceImpl extends BaseMpServiceImpl<DelayedShipmen
78 private PurchaseOrderInfoService purchaseOrderInfoService; 80 private PurchaseOrderInfoService purchaseOrderInfoService;
79 @Resource 81 @Resource
80 private RequestCarTicketService requestCarTicketService; 82 private RequestCarTicketService requestCarTicketService;
  83 + @Autowired
  84 + private RedisHandler redisHandler;
81 85
82 86
83 @Override 87 @Override
@@ -210,6 +214,8 @@ public class DelayedShipmentServiceImpl extends BaseMpServiceImpl<DelayedShipmen @@ -210,6 +214,8 @@ public class DelayedShipmentServiceImpl extends BaseMpServiceImpl<DelayedShipmen
210 if (delayedExceedOneDay && !hasAny) { 214 if (delayedExceedOneDay && !hasAny) {
211 //开启审核 215 //开启审核
212 vo.setWorkshopCode(delayedShipmentDetail.getWorkshopCode()); 216 vo.setWorkshopCode(delayedShipmentDetail.getWorkshopCode());
  217 + String key = "GET_SHIPMENTS_ORDER_ID_" + data.getId();
  218 + redisHandler.set(key, vo.getShipmentsOrderId());
213 219
214 flowInstanceWrapperService.startInstance(BPM_FLAG, data.getId(), BPM_FLAG, vo); 220 flowInstanceWrapperService.startInstance(BPM_FLAG, data.getId(), BPM_FLAG, vo);
215 } else { 221 } else {