diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java b/blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java index 301dcc0d5..d4d3b3676 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java @@ -8,7 +8,7 @@ public interface ModuleNameConstant { /** * 如果不需要 "" */ - public static final String DEVAUTH =""; + public static final String DEVAUTH ="-zhy"; /** * 工厂对接服务名称 diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java index 9b8f90dda..f5844f91f 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java @@ -20,10 +20,8 @@ import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; import org.springblade.core.tenant.mp.TenantEntity; import java.util.Date; @@ -39,8 +37,6 @@ import java.util.List; @TableName("logpm_distribution_stock_list") @ApiModel(value = "DistributionStockList对象", description = "库存品管理") @EqualsAndHashCode(callSuper = true) -@AllArgsConstructor -@NoArgsConstructor public class DistributionStockListEntity extends TenantEntity { /** diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupStockListVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupStockListVO.java index 54c23ae1d..25dd69d74 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupStockListVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupStockListVO.java @@ -24,4 +24,6 @@ public class DistributionStockupStockListVO implements Serializable { private String trayName;//托盘信息 + private Integer unpack;//是否拆包 0 没有 1 拆了 + } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistrilbutionAppBillLadingOrderVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistrilbutionAppBillLadingOrderVO.java index 902c29199..f2d046e7b 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistrilbutionAppBillLadingOrderVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistrilbutionAppBillLadingOrderVO.java @@ -34,6 +34,7 @@ public class DistrilbutionAppBillLadingOrderVO implements Serializable { private String orderSelfNumbering; private Integer orderStatus;//状态 + private String orderStatusStr;//状态 private Integer planNum;//自提件数 private Integer signedNum;//签收总数 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-distribution/pom.xml b/blade-service/logpm-distribution/pom.xml index 5667fd746..11a822f98 100644 --- a/blade-service/logpm-distribution/pom.xml +++ b/blade-service/logpm-distribution/pom.xml @@ -62,6 +62,11 @@ org.springframework.boot spring-boot-starter-amqp + + org.springblade + blade-core-test + test + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java index 4a744bf00..cf5778935 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java @@ -68,6 +68,22 @@ public class DistributionStockupAppController extends BladeController { @ApiOperationSupport(order = 1) @ApiOperation(value = "分页列表", notes = "传入stockupDTO") public R> pageList(@RequestBody StockupDTO stockupDTO) { + Integer current = stockupDTO.getCurrent(); + Integer size = stockupDTO.getSize(); + Integer status = stockupDTO.getStatus(); + if(Objects.isNull(current)){ + log.info("#################pageList: 当前页码不能为空"); + return R.fail(401,"当前页码不能为空"); + } + if(Objects.isNull(size)){ + log.info("#################pageList: 每页条数不能为空"); + return R.fail(401,"每页条数不能为空"); + } + if(Objects.isNull(status)){ + log.info("#################pageList: 查询状态不能为空"); + return R.fail(401,"查询状态不能为空"); + } + IPage pages = distributionStockupService.selectStockupPage(stockupDTO); return R.data(pages); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml index 13aa02e02..052be4296 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml @@ -183,7 +183,7 @@ ldpl.shelf_title, ldpl.goods_allocation, ldrs.stock_article_code, - ldrs.ldrs.stock_article_id, + ldrs.stock_article_id, ldpl.pallet @@ -196,36 +196,39 @@ ldrs.reservation_num planNum, ldst.cargo_unit cargoUnit, ldst.tray_name trayName, + ldst.unpack unpack, count(ldss.id) realNum from logpm_distribution_reservation_stocklist ldrs - left join logpm_distribution_stock_list ldst on ldst.id = ldrs.stocklist_id and ldst.is_deleted = 0 - left join logpm_distribution_stock s on s.stock_list_id = ldst.id and s.is_deleted = 0 + left join logpm_distribution_stock_list ldst on ldst.id = ldrs.stocklist_id and ldst.is_deleted = 0 + left join logpm_distribution_stock ldss on ldss.stock_list_id = ldst.id and ldss.is_deleted = 0 where ldrs.reservation_id = #{reservationId} and ldrs.is_deleted = 0 - group by ldst.id,ldst.storage_location, - ldst.description_goods, - ldst.sku, - ldst.cargo_norms, - ldrs.reservation_num, - ldst.tray_name, - ldst.cargo_unit + group by ldst.id, + ldst.storage_location, + ldst.description_goods, + ldst.sku, + ldst.cargo_norms, + ldrs.reservation_num, + ldst.cargo_unit, + ldst.tray_name, + ldst.unpack select sl.storage_location from logpm_distribution_reservation ldr - left join logpm_distribution_reservation_stocklist rs on rs.reservation_id = ldr.id and rs.is_deleted = 0 - left join logpm_distribution_stock_list sl on sl.id = rs.stocklist_id and sl.is_deleted = 0 + left join logpm_distribution_reservation_stocklist ldrs on ldrs.reservation_id = ldr.id and ldrs.is_deleted = 0 + left join logpm_distribution_stock_list sl on sl.id = ldrs.stocklist_id and sl.is_deleted = 0 where ldr.id = #{reservationId} and ldr.is_deleted = 0 group by sl.storage_location diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockMapper.java index 0e6d71f97..c4c0714bf 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockMapper.java @@ -16,13 +16,14 @@ */ package com.logpm.distribution.mapper; -import com.logpm.distribution.entity.DistributionStockEntity; -import com.logpm.distribution.vo.DistributionStockVO; -import com.logpm.distribution.excel.DistributionStockExcel; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.distribution.entity.DistributionStockEntity; +import com.logpm.distribution.excel.DistributionStockExcel; +import com.logpm.distribution.vo.DistributionStockVO; import org.apache.ibatis.annotations.Param; + import java.util.List; /** diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockMapper.xml index 2b7124db8..d5e52f5a1 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockMapper.xml @@ -39,11 +39,11 @@ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml index 5c7fb9160..a55019e46 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml @@ -70,20 +70,14 @@ select ldr.id reservationId, ldr.delivery_type typeService, ldr.consignee customer, - lds.stockup_area stockupArea, + lds.stockup_area stockupArea from logpm_distribution_reservation ldr left join logpm_distribution_stockup_info ldsi on ldsi.reservation_id = ldr.id left join logpm_distribution_stockup lds on ldsi.stockup_id = lds.id --- left join logpm_distribution_reservation_package ldrp on ldrp.reservation_id = ldr.id --- left join logpm_distribution_parcel_list ldpl on ldpl.id = ldrp.parce_list_id --- left join logpm_distribution_reservation_stocklist ldrs on ldrs.reservation_id = ldr.id --- left join logpm_distribution_reservation_stockarticle ldrst on ldrst.reservation_id = ldr.id --- left join logpm_distribution_stockup_scan ldss on ldss.reservation_id = ldr.id and ldss.stock_list_id = ldrs.id and ldss.package_type = 2 --- left join logpm_distribution_stockup_scan ldss1 on ldss1.reservation_id = ldr.id and ldss1.parcel_list_id = ldrs.id and ldss.package_type = 2 and DATE_FORMAT(lds.stockup_date,'%Y-%m-%d') = #{param.stockupDate} - and lds.stockup_status in (2.3) - and lds.stockup_status = 4 + and lds.stockup_status in (1,2,3) + and lds.stockup_status = 4 and lds.is_deleted = 0 and lds.forklift_id = #{param.userId} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml index f1f156806..9e4c3ae68 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml @@ -94,8 +94,8 @@ pl.order_self_numbering orderSelfNumbering, pl.packet_bar_code packetBarCode, case - when bls.id is null then 0 - else 1 + when bls.id is null then 1 + else 2 end scanStatus, 0 errorStatus from logpm_distribution_parcel_list pl @@ -106,10 +106,10 @@ and pl.order_self_numbering like ${orderSelfNumbering} - + and bls.id is null - + and bls.id is not null diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java index 9f4a3d290..393f193f0 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java @@ -133,7 +133,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl packagePallet = distributionParcelListService.selectPalletByReservationId(reservationId); //2.查询库存品托盘信息 List stockListPallet = distributionStockListService.selectPalletByReservationId(reservationId); @@ -190,6 +190,9 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl packageAllocation, List stockListAllocation) { + Set set = new HashSet<>(); set.addAll(packageAllocation); for (String allocation:stockListAllocation){ + if(StringUtil.isBlank(allocation)){ + continue; + } //因为库存品的数据可能会有拼接 String[] split = allocation.split(","); set.addAll(Arrays.asList(split)); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java index bd4ba1580..fe091b0ea 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java @@ -370,6 +370,14 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl 0){ + vo.setOrderStatusStr("部分扫"); + }else if(sn == 0){ + vo.setOrderStatusStr("未扫"); + } + //0 全部 1 齐套 2部分扫 3未扫 if(orderStatus == 0){ l.add(vo); @@ -378,7 +386,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl 0){ l.add(vo); } }else if(orderStatus == 3){ diff --git a/blade-service/logpm-distribution/src/main/resources/application-test.yml b/blade-service/logpm-distribution/src/main/resources/application-test.yml index 21d6c573d..fbd1b96ae 100644 --- a/blade-service/logpm-distribution/src/main/resources/application-test.yml +++ b/blade-service/logpm-distribution/src/main/resources/application-test.yml @@ -10,6 +10,33 @@ server: # password: ${blade.datasource.dev.password} spring: + #rabbitmq配置 + rabbitmq: + host: 172.16.128.146 + port: 5672 + username: admin + password: Slwk@123654 + #虚拟host 可以不设置,使用server默认host + virtual-host: / + #确认消息已发送到队列(Queue) + publisher-returns: true + publisher-confirm-type: correlated + # 手动提交消息 + listener: + simple: + acknowledge-mode: auto + default-requeue-rejected: false + retry: + enabled: true # 开启消费者失败重试 + initial-interval: 1000 # 初识的失败等待时长为1秒 + multiplier: 1 # 失败的等待时长倍数,下次等待时长 = multiplier * last-interval + max-attempts: 3 # 最大重试次数 + stateless: true # true无状态;false有状态。如果业务中包含事务,这里改为false + direct: + acknowledge-mode: manual + template: + mandatory: true + #排除DruidDataSourceAutoConfigure autoconfigure: exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure diff --git a/blade-service/logpm-distribution/src/test/com/logpm/distribution/MyTest.java b/blade-service/logpm-distribution/src/test/com/logpm/distribution/MyTest.java new file mode 100644 index 000000000..f9e9a8fa7 --- /dev/null +++ b/blade-service/logpm-distribution/src/test/com/logpm/distribution/MyTest.java @@ -0,0 +1,45 @@ +//package com.logpm.distribution; +// +// +//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +//import com.logpm.distribution.dto.app.StockupDTO; +//import com.logpm.distribution.entity.DistributionBillLadingScanEntity; +//import com.logpm.distribution.service.*; +//import org.junit.jupiter.api.Test; +//import org.junit.jupiter.api.extension.ExtendWith; +//import org.springblade.core.test.BladeBootTest; +//import org.springblade.core.test.BladeSpringExtension; +//import org.springframework.beans.factory.annotation.Autowired; +// +//import java.util.List; +// +//import static org.springblade.common.constant.ModuleNameConstant.APPLICATION_DISTRIBUTION_NAME; +// +//@ExtendWith(BladeSpringExtension.class) +//@BladeBootTest(appName = APPLICATION_DISTRIBUTION_NAME, enableLoader = true) +//public class MyTest { +// +// +// @Autowired +// private IDistributionStockupService distributionStockupService; +// +// @Autowired +// private IDistributionReservationService distributionReservationService; +// +// @Autowired +// private IDistributionParcelListService distributionParcelListService; +// +// @Autowired +// private IDistributionStockListService distributionStockListService; +// +// +// @Test +// public void te(){ +// +// Long id =1682676882390781953L; +// List packageAllocation = distributionParcelListService.selectWarehouseAreaByReservationId(id); +// //2.通过预约单查询所有库存品的库位信息 +// List stockListAllocation = distributionStockListService.selectWarehouseAreaByReservationId(id); +// } +// +//} diff --git a/blade-service/logpm-distribution/src/test/com/logpm/distribution/launch/DistributionLauncherServiceImpl.java b/blade-service/logpm-distribution/src/test/com/logpm/distribution/launch/DistributionLauncherServiceImpl.java new file mode 100644 index 000000000..3b87ba4a6 --- /dev/null +++ b/blade-service/logpm-distribution/src/test/com/logpm/distribution/launch/DistributionLauncherServiceImpl.java @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.distribution.launch; + +import org.springblade.core.auto.service.AutoService; +import org.springblade.core.launch.constant.NacosConstant; +import org.springblade.core.launch.service.LauncherService; +import org.springblade.core.launch.utils.PropsUtil; +import org.springframework.boot.builder.SpringApplicationBuilder; + +import java.util.Properties; + +/** + * 启动参数拓展 + * + * @author Chill + */ +@AutoService(LauncherService.class) +public class DistributionLauncherServiceImpl implements LauncherService { + + @Override + public void launcher(SpringApplicationBuilder builder, String appName, String profile, boolean isLocalDev) { + Properties props = System.getProperties(); + // 开启多数据源 + PropsUtil.setProperty(props, "spring.datasource.dynamic.enabled", "true"); + // 指定注册配置信息 + PropsUtil.setProperty(props, "spring.cloud.nacos.config.extension-configs[0].data-id", NacosConstant.dataId("factory", profile)); + PropsUtil.setProperty(props, "spring.cloud.nacos.config.extension-configs[0].group", NacosConstant.NACOS_CONFIG_GROUP); + PropsUtil.setProperty(props, "spring.cloud.nacos.config.extension-configs[0].refresh", NacosConstant.NACOS_CONFIG_REFRESH); + // 指定注册IP + // PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.ip", "127.0.0.1"); + // 指定注册端口 + // PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.port", "8200"); + // 自定义命名空间 + // PropsUtil.setProperty(props, "spring.cloud.nacos.config.namespace", LauncherConstant.NACOS_NAMESPACE); + // PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.namespace", LauncherConstant.NACOS_NAMESPACE); + // 自定义分组 + // PropsUtil.setProperty(props, "spring.cloud.nacos.config.group", NacosConstant.NACOS_CONFIG_GROUP); + // PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.group", NacosConstant.NACOS_CONFIG_GROUP); + } + + @Override + public int getOrder() { + return 20; + } +} 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/ReceiveInfoHandler.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/ReceiveInfoHandler.java index d91bb8074..25a418e84 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/ReceiveInfoHandler.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/ReceiveInfoHandler.java @@ -44,7 +44,6 @@ public class ReceiveInfoHandler { @Autowired private IMtFactoryOrderMainService mtFactoryOrderMainService; - private Integer retryCount = 1; @RabbitHandler public void receiveInfoHandler(Map map, Message message, Channel channel) throws IOException, NoSuchAlgorithmException { 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); diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/receiver/WaybillDataHandler.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/receiver/WaybillDataHandler.java index b119b187b..0e4a9b8fd 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/receiver/WaybillDataHandler.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/receiver/WaybillDataHandler.java @@ -22,7 +22,7 @@ import java.util.Objects; */ @Slf4j @AllArgsConstructor -@RabbitListener(queues = RabbitConstant.WAYBILL_DATA_TEST_QUEUE) +@RabbitListener(queues = RabbitConstant.WAYBILL_DATA_QUEUE) @Component public class WaybillDataHandler {