From 31d9c2b114b5fc2cadc8f97da5c8d1b84dffaf03 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" <123456> Date: Tue, 25 Jul 2023 11:22:45 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=A2=9E=E5=8A=A0=E6=8E=A8=E9=80=81=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/logpm/factory/mt/entity/MtPushData.java | 2 +- .../factory/mt/service/IMtFactoryOrderMainService.java | 8 +++++++- .../mt/service/impl/MtFactoryOrderMainServiceImpl.java | 10 ++++++++-- .../logpm/factory/receiver/UnloadCarComHandler.java | 9 +++++++++ 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/mt/entity/MtPushData.java b/blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/mt/entity/MtPushData.java index 5b34e8c51..71e746cfc 100644 --- a/blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/mt/entity/MtPushData.java +++ b/blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/mt/entity/MtPushData.java @@ -44,7 +44,7 @@ public class MtPushData extends BaseEntity { * 关联主键 */ @ApiModelProperty(name = "关联主键", notes = "") - private Double refId; + private Long refId; /** * 关联编码 */ diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/IMtFactoryOrderMainService.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/IMtFactoryOrderMainService.java index ade4d2c51..5fab2489d 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/IMtFactoryOrderMainService.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/IMtFactoryOrderMainService.java @@ -3,7 +3,6 @@ package com.logpm.factory.mt.service; import com.logpm.factory.mt.entity.MtFactoryOrderMain; import com.logpm.factory.snm.vo.MTOrderPackageRelationVO; import org.springblade.core.mp.base.BaseService; -import org.springblade.core.tool.api.R; import java.util.List; @@ -11,6 +10,13 @@ public interface IMtFactoryOrderMainService extends BaseService mtOrderPackageRelation(); + /** + * 根基发货单编号查询 + * @param invoiceOrderCode + * @return + */ + List findMtFactoryOrderMainByInvoiceOrderCode(String invoiceOrderCode); + diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryOrderMainServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryOrderMainServiceImpl.java index 91adb5cc0..2379ba004 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryOrderMainServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryOrderMainServiceImpl.java @@ -1,12 +1,12 @@ package com.logpm.factory.mt.service.impl; +import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.logpm.factory.mt.entity.MtFactoryOrderMain; import com.logpm.factory.mt.mapper.MtFactoryOrderMainMapper; import com.logpm.factory.mt.service.IMtFactoryOrderMainService; import com.logpm.factory.snm.vo.MTOrderPackageRelationVO; import lombok.AllArgsConstructor; import org.springblade.core.mp.base.BaseServiceImpl; -import org.springblade.core.tool.api.R; import org.springframework.stereotype.Service; import java.util.List; @@ -22,6 +22,12 @@ public class MtFactoryOrderMainServiceImpl extends BaseServiceImpl findMtFactoryOrderMainByInvoiceOrderCode(String invoiceOrderCode) { - + LambdaQueryChainWrapper lambdaQueryChainWrapper = new LambdaQueryChainWrapper(MtFactoryOrderMain.class); + lambdaQueryChainWrapper.eq("invoice_order_code", invoiceOrderCode); + List ls = mtFactoryOrderMainMapper.selectList(lambdaQueryChainWrapper); + return ls; + } } diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/UnloadCarComHandler.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/UnloadCarComHandler.java index a27dd9394..d1bb865ce 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/UnloadCarComHandler.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/UnloadCarComHandler.java @@ -3,6 +3,7 @@ package com.logpm.factory.receiver; import com.fasterxml.jackson.core.JsonProcessingException; import com.logpm.factory.comfac.dto.UnloadCarDTO; +import com.logpm.factory.mt.entity.MtFactoryOrderMain; import com.logpm.factory.mt.entity.MtPackageInfo; import com.logpm.factory.mt.entity.MtPushData; import com.logpm.factory.mt.service.IMtFactoryDataService; @@ -132,7 +133,15 @@ public class UnloadCarComHandler { mtPushData.setPushStatus(1);// 推送状态 mtPushData.setRefCode(carNum); mtPushData.setRefType(1);// 订单主表 + // todo 这里需要查询主推送单的 ID + List mtFactoryOrderMainList = mtFactoryOrderMainService.findMtFactoryOrderMainByInvoiceOrderCode(carNum); + if(mtFactoryOrderMainList.size()>0){ + mtFactoryOrderMainList.get(0); + mtPushData.setRefId(mtFactoryOrderMainList.get(0).getId()); + + } + // 插入推送数据 mtPushDataService.save(mtPushData);