Commit 537d2b62d0f4e32286b21c0d5e43155bdc602599

Authored by 房远帅
2 parents 2aaa902e b6c4afe1

Merge branch 'master_chujiang_0805' into master_quotation

@@ -38,6 +38,7 @@ import org.springframework.stereotype.Service; @@ -38,6 +38,7 @@ import org.springframework.stereotype.Service;
38 import org.springframework.transaction.annotation.Propagation; 38 import org.springframework.transaction.annotation.Propagation;
39 import org.springframework.transaction.annotation.Transactional; 39 import org.springframework.transaction.annotation.Transactional;
40 40
  41 +import org.springframework.context.ApplicationContext;
41 import javax.annotation.Resource; 42 import javax.annotation.Resource;
42 import java.io.Serializable; 43 import java.io.Serializable;
43 import java.util.ArrayList; 44 import java.util.ArrayList;
@@ -60,6 +61,8 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq @@ -60,6 +61,8 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq
60 private ShipmentsPlanDetailService shipmentsPlanDetailService; 61 private ShipmentsPlanDetailService shipmentsPlanDetailService;
61 @Resource 62 @Resource
62 private MqProducerService mqProducerService; 63 private MqProducerService mqProducerService;
  64 + @Resource
  65 + private ApplicationContext applicationContext;
63 66
64 @Override 67 @Override
65 public PageResult<DraftRequestCarTicket> query(Integer pageIndex, Integer pageSize, QueryDraftRequestCarTicketVo vo) { 68 public PageResult<DraftRequestCarTicket> query(Integer pageIndex, Integer pageSize, QueryDraftRequestCarTicketVo vo) {
@@ -326,7 +329,8 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq @@ -326,7 +329,8 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq
326 */ 329 */
327 @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class) 330 @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
328 public void createDraftAndNotify(CreateDraftRequestCarTicketVo vo) { 331 public void createDraftAndNotify(CreateDraftRequestCarTicketVo vo) {
329 - this.create(vo); 332 + // 通过 Spring 代理调用 create,确保 @OpLog 切面生效,避免 OpLogUtil 空指针
  333 + applicationContext.getBean(DraftRequestCarTicketServiceImpl.class).create(vo);
330 PurchaseOrderInfo info = purchaseOrderInfoService.findById(vo.getPurchaseOrderId()); 334 PurchaseOrderInfo info = purchaseOrderInfoService.findById(vo.getPurchaseOrderId());
331 if (info == null) { 335 if (info == null) {
332 return; 336 return;