diff --git a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesAbnormalRecordZeroDetailEntity.java b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesAbnormalRecordZeroDetailEntity.java new file mode 100644 index 000000000..4dcf02a88 --- /dev/null +++ b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesAbnormalRecordZeroDetailEntity.java @@ -0,0 +1,53 @@ +package com.logpm.aftersales.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.tenant.mp.TenantEntity; + +@Data +@TableName("logpm_aftersales_abnormal_record_zero_detail") +@ApiModel(value = "AftersalesAbnormalRecordZeroDetail对象", description = "异常记录零担明细表") +@EqualsAndHashCode(callSuper = true) +public class AftersalesAbnormalRecordZeroDetailEntity extends TenantEntity { + + /** 预留1 */ + @ApiModelProperty(name = "预留1",notes = "") + private String reserve1 ; + /** 预留2 */ + @ApiModelProperty(name = "预留2",notes = "") + private String reserve2 ; + /** 预留3 */ + @ApiModelProperty(name = "预留3",notes = "") + private String reserve3 ; + /** 预留4 */ + @ApiModelProperty(name = "预留4",notes = "") + private String reserve4 ; + /** 预留5 */ + @ApiModelProperty(name = "预留5",notes = "") + private String reserve5 ; + + @ApiModelProperty(name = "异常记录id",notes = "") + private Long AbnormalRecordId; + + @ApiModelProperty(name = "异常记录id",notes = "") + private Long packageId; + + @ApiModelProperty(name = "品类id",notes = "") + private Long goodsId; + + @ApiModelProperty(name = "品类名称",notes = "") + private String goodsName; + + @ApiModelProperty(name = "异常数量",notes = "") + private Integer abnormalNum; + + @ApiModelProperty(name = "回库数量",notes = "") + private Integer returnNum; + + @ApiModelProperty(name = "入库数量",notes = "") + private Integer incomingNum; + +} diff --git a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/feign/IAftersalesAbnormalRecordClient.java b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/feign/IAftersalesAbnormalRecordClient.java index 7ff999f08..26e1c5cc6 100644 --- a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/feign/IAftersalesAbnormalRecordClient.java +++ b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/feign/IAftersalesAbnormalRecordClient.java @@ -58,4 +58,8 @@ public interface IAftersalesAbnormalRecordClient { @PostMapping(API_PREFIX+"/addAbnormalRecordList") void addAbnormalRecordList(@RequestBody List abnormalRecordEntities); + + @PostMapping(API_PREFIX+"/addAbnormalRecordListReturnList") + List addAbnormalRecordListReturnList(@RequestBody List abnormalRecordEntities); + } diff --git a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/feign/IAftersalesAbnormalRecordZeroDetailClient.java b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/feign/IAftersalesAbnormalRecordZeroDetailClient.java new file mode 100644 index 000000000..d5a4ede48 --- /dev/null +++ b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/feign/IAftersalesAbnormalRecordZeroDetailClient.java @@ -0,0 +1,44 @@ +/* + * 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.aftersales.feign; + +import com.logpm.aftersales.entity.AftersalesAbnormalRecordZeroDetailEntity; +import org.springblade.common.constant.ModuleNameConstant; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +import java.util.List; + +/** + * 货位 Feign接口类 + * + * @author zhy + * @since 2023-09-02 + */ +@FeignClient( + value = ModuleNameConstant.APPLICATION_AFTERSALES_NAME +) +public interface IAftersalesAbnormalRecordZeroDetailClient { + + String API_PREFIX = "abormal/client"; + String TOP = API_PREFIX + "/top"; + + @PostMapping(API_PREFIX+"/addAbnormalRecordZeroDetail") + void addAbnormalRecordZeroDetail(@RequestBody List abnormalRecordZeroDetailEntityList); + +} diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java index 5cb1f2b4d..d8fc7911e 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java @@ -218,4 +218,9 @@ public interface IDistributionParcelListClient { @GetMapping(API_PREFIX + "/findListByStockArticleId") List findListByStockArticleId(@RequestParam Long articleId); + @GetMapping(API_PREFIX + "/findEntityVOListByOrderCode") + List findEntityVOListByOrderCode(@RequestParam String orderCode, @RequestParam Long fromWarehouseId); + + @GetMapping(API_PREFIX + "/addZeroQuantity") + void addZeroQuantity(@RequestParam Long packageId, @RequestParam int num); } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelNumberClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelNumberClient.java index b88cbd1e9..70b64c983 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelNumberClient.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelNumberClient.java @@ -54,4 +54,10 @@ public interface IDistributionParcelNumberClient { @PostMapping(API_PREFIX + "/addBatch") void addBatch(@RequestBody List parcelNumberList); + @PostMapping(API_PREFIX + "/findListByParcelListIds") + List findListByParcelListIds(@RequestBody List parcelListIds); + + @PostMapping(API_PREFIX + "/updateList") + void updateList(@RequestBody List updateParceNumberList); + } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java index fcd4cfa42..4fc7232ff 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java @@ -37,6 +37,8 @@ import java.util.List; public class DistributionParcelListVO extends DistributionParcelListEntity { private static final long serialVersionUID = 1L; + private Integer zeroPackageTotalNum; + private String stockupStatus; //备货状态 private String stockupStatusName; //备货名称 private Date stockupDate; diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/OrderCodeNumVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/OrderCodeNumVO.java new file mode 100644 index 000000000..58c32efd7 --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/OrderCodeNumVO.java @@ -0,0 +1,14 @@ +package com.logpm.trunkline.vo; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class OrderCodeNumVO implements Serializable { + + private String orderCode; + + private Integer totalNum; + +} diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineScanZeroDetailVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineScanZeroDetailVO.java new file mode 100644 index 000000000..f81bf4b1d --- /dev/null +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineScanZeroDetailVO.java @@ -0,0 +1,11 @@ +package com.logpm.trunkline.vo; + +import com.logpm.trunkline.entity.TrunklineScanZeroDetailEntity; +import lombok.Data; + +@Data +public class TrunklineScanZeroDetailVO extends TrunklineScanZeroDetailEntity { + + + +} diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadPackageVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadPackageVO.java index 1b7bbbdb1..2805c25a6 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadPackageVO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadPackageVO.java @@ -3,6 +3,8 @@ package com.logpm.trunkline.vo; import lombok.Data; import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; @Data public class UnloadPackageVO implements Serializable { @@ -16,4 +18,6 @@ public class UnloadPackageVO implements Serializable { private String scanStatus; private String unloadNodeName; + private List scanZeroDetailList = new ArrayList<>(); + } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/feign/AftersalesAbnormalRecordClient.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/feign/AftersalesAbnormalRecordClient.java index dc1820ef3..e0ee72a05 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/feign/AftersalesAbnormalRecordClient.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/feign/AftersalesAbnormalRecordClient.java @@ -54,4 +54,10 @@ public class AftersalesAbnormalRecordClient implements IAftersalesAbnormalRecord public void addAbnormalRecordList(List abnormalRecordEntities) { aftersalesAbnormalRecordService.saveBatch(abnormalRecordEntities); } + + @Override + public List addAbnormalRecordListReturnList(List abnormalRecordEntities) { + aftersalesAbnormalRecordService.saveBatch(abnormalRecordEntities); + return abnormalRecordEntities; + } } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/feign/AftersalesAbnormalRecordZeroDetailClient.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/feign/AftersalesAbnormalRecordZeroDetailClient.java new file mode 100644 index 000000000..18f988378 --- /dev/null +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/feign/AftersalesAbnormalRecordZeroDetailClient.java @@ -0,0 +1,22 @@ +package com.logpm.aftersales.feign; + +import com.logpm.aftersales.entity.AftersalesAbnormalRecordZeroDetailEntity; +import com.logpm.aftersales.service.IAftersalesAbnormalRecordZeroDetailService; +import lombok.AllArgsConstructor; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +@ApiIgnore() +@RestController +@AllArgsConstructor +public class AftersalesAbnormalRecordZeroDetailClient implements IAftersalesAbnormalRecordZeroDetailClient { + + private final IAftersalesAbnormalRecordZeroDetailService abnormalRecordZeroDetailService; + + @Override + public void addAbnormalRecordZeroDetail(List abnormalRecordZeroDetailEntityList) { + abnormalRecordZeroDetailService.saveBatch(abnormalRecordZeroDetailEntityList); + } +} diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordZeroDetailMapper.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordZeroDetailMapper.java new file mode 100644 index 000000000..789a0ea53 --- /dev/null +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordZeroDetailMapper.java @@ -0,0 +1,9 @@ +package com.logpm.aftersales.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.logpm.aftersales.entity.AftersalesAbnormalRecordZeroDetailEntity; +import org.mapstruct.Mapper; + +@Mapper +public interface AftersalesAbnormalRecordZeroDetailMapper extends BaseMapper { +} diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesAbnormalRecordZeroDetailService.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesAbnormalRecordZeroDetailService.java new file mode 100644 index 000000000..c81a3dd40 --- /dev/null +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesAbnormalRecordZeroDetailService.java @@ -0,0 +1,7 @@ +package com.logpm.aftersales.service; + +import com.logpm.aftersales.entity.AftersalesAbnormalRecordZeroDetailEntity; +import org.springblade.core.mp.base.BaseService; + +public interface IAftersalesAbnormalRecordZeroDetailService extends BaseService { +} diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordZeroDetailServiceImpl.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordZeroDetailServiceImpl.java new file mode 100644 index 000000000..e78854b95 --- /dev/null +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordZeroDetailServiceImpl.java @@ -0,0 +1,16 @@ +package com.logpm.aftersales.service.impl; + +import com.logpm.aftersales.entity.AftersalesAbnormalRecordZeroDetailEntity; +import com.logpm.aftersales.mapper.AftersalesAbnormalRecordZeroDetailMapper; +import com.logpm.aftersales.service.IAftersalesAbnormalRecordZeroDetailService; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; + +@Service +@AllArgsConstructor +@Slf4j +public class AftersalesAbnormalRecordZeroDetailServiceImpl extends BaseServiceImpl implements IAftersalesAbnormalRecordZeroDetailService { +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java index abb6d2ecf..27bc19be8 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java @@ -516,4 +516,17 @@ public class DistributionParcelListClient implements IDistributionParcelListClie return distributionParcelListService.list(queryWrapper); } + + @Override + public List findEntityVOListByOrderCode(String orderCode, Long fromWarehouseId) { + return distributionParcelListService.findEntityVOListByOrderCode(orderCode,fromWarehouseId); + } + + @Override + public void addZeroQuantity(Long packageId, int num) { + //零担加了数量 + distributionParcelListService.addZeroPackageQuantity(packageId,num); + //对应的parceNumber也要加上在库数量 + distributionParcelNumberService.addZeroQuantity(packageId,num); + } } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelNumberClient.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelNumberClient.java index 495f02454..d46248cc3 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelNumberClient.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelNumberClient.java @@ -16,13 +16,14 @@ */ package com.logpm.distribution.feign; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.distribution.entity.DistributionParcelNumberEntity; +import com.logpm.distribution.service.IDistributionParcelNumberService; import lombok.AllArgsConstructor; import org.springblade.core.mp.support.BladePage; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; -import com.logpm.distribution.entity.DistributionParcelNumberEntity; -import com.logpm.distribution.service.IDistributionParcelNumberService; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import springfox.documentation.annotations.ApiIgnore; @@ -57,4 +58,16 @@ public class DistributionParcelNumberClient implements IDistributionParcelNumber distributionParcelNumberService.saveBatch(parcelNumberList); } + @Override + public List findListByParcelListIds(List parcelListIds) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.in("parcel_list_id", parcelListIds); + return distributionParcelNumberService.list(queryWrapper); + } + + @Override + public void updateList(List updateParceNumberList) { + distributionParcelNumberService.updateBatchById(updateParceNumberList); + } + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java index 98d024307..bd019cb23 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java @@ -299,4 +299,8 @@ public interface DistributionParcelListMapper extends BaseMapper clearTrayList); List findPackageGoodsListByWaybillNo(@Param("waybillNo") String waybillNo); + + List findEntityVOListByOrderCode(@Param("orderCode") String orderCode,@Param("fromWarehouseId") Long fromWarehouseId); + + void addZeroPackageQuantity(@Param("packageId") Long packageId, @Param("num") int num); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml index dabe84761..b9c4ea74c 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml @@ -1884,5 +1884,20 @@ where lwwd.order_code = #{waybillNo} + + + + + update logpm_distribution_parcel_list + set quantity = quantity + #{num} + where id = #{packageId} + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelNumberMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelNumberMapper.java index 26b6142a7..13a37a426 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelNumberMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelNumberMapper.java @@ -74,4 +74,6 @@ public interface DistributionParcelNumberMapper extends BaseMapper + + UPDATE + logpm_distribution_parcel_number + SET + hand_quantity = hand_quantity + #{num} + WHERE + parcel_list_id = #{packageId} + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java index a9d902ce7..b2c9a4afb 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java @@ -258,4 +258,7 @@ public interface IDistributionParcelListService extends BaseService findPackageGoodsListByWaybillNo(String waybillNo); + List findEntityVOListByOrderCode(String orderCode, Long fromWarehouseId); + + void addZeroPackageQuantity(Long packageId, int num); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelNumberService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelNumberService.java index e041e0a3b..efd3ac722 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelNumberService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelNumberService.java @@ -78,4 +78,6 @@ public interface IDistributionParcelNumberService extends BaseService findEntityVOListByOrderCode(String orderCode, Long fromWarehouseId) { + return baseMapper.findEntityVOListByOrderCode(orderCode,fromWarehouseId); + } + + @Override + public void addZeroPackageQuantity(Long packageId, int num) { + baseMapper.addZeroPackageQuantity(packageId,num); + } + private JSONObject handleLogJSONObject(BasicdataWarehouseEntity warehouse, BladeUser user, String orderPackageCode, String content, Integer node) { JSONObject trunklinePackageTrackLog = new JSONObject(); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelNumberServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelNumberServiceImpl.java index 1a05df9b1..f4565d1f5 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelNumberServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelNumberServiceImpl.java @@ -16,31 +16,29 @@ */ package com.logpm.distribution.service.impl; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.logpm.distribution.dto.DistributionParcelNumberDTO; import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.entity.DistributionParcelNumberEntity; import com.logpm.distribution.entity.DistributionStockArticleEntity; -import com.logpm.distribution.service.IDistributionParcelListService; -import com.logpm.distribution.service.IDistributionStockArticleService; -import com.logpm.distribution.vo.DistributionParcelNumberVO; import com.logpm.distribution.excel.DistributionParcelNumberExcel; import com.logpm.distribution.mapper.DistributionParcelNumberMapper; +import com.logpm.distribution.service.IDistributionParcelListService; import com.logpm.distribution.service.IDistributionParcelNumberService; -import lombok.AllArgsConstructor; +import com.logpm.distribution.service.IDistributionStockArticleService; +import com.logpm.distribution.vo.DistributionParcelNumberVO; import lombok.extern.slf4j.Slf4j; +import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; -import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springblade.core.mp.base.BaseServiceImpl; + import java.util.List; import java.util.concurrent.atomic.AtomicInteger; -import java.util.stream.Collectors; /** * 订单零担包件数量记录 服务实现类 @@ -175,4 +173,9 @@ public class DistributionParcelNumberServiceImpl extends BaseServiceImpl zeroPackageList = loadCarsDTO.getZeroPackageList(); try{ @@ -607,8 +609,12 @@ public class CarsLoadApiController { log.warn(method+"订单号为空 orderCode={}",orderCode); return R.fail(405,"订单号为空"); } + if(CollUtil.isEmpty(zeroPackageList)){ + log.warn(method+"品类信息为空 zeroPackageList={}",zeroPackageList); + return R.fail(405,"品类信息为空"); + } - return carsLoadService.unloadZero(carsLoadScanId,loadId,waybillNo,enterNum,myCurrentWarehouse.getId(),1,trayCode,orderCode,"零担正常卸车",null,null); + return carsLoadService.unloadZero(carsLoadScanId,loadId,waybillNo,enterNum,myCurrentWarehouse.getId(),1,trayCode,orderCode,"零担正常卸车",null,null,zeroPackageList); }catch (CustomerException e){ log.error(e.message,e); return R.fail(e.code,e.message); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.java index fed8426ca..4a79bf7fe 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.java @@ -77,4 +77,6 @@ public interface TrunklineAdvanceDetailMapper extends BaseMapper findAdvanceDetailListByAdvanceIds(@Param("param") AdvanceDTO advanceDTO); List findAdvanceDetailListByWaybillId(@Param("param") AdvanceDTO advanceDTO); + + List findTotalNumByOrderCodes(@Param("orderCodeSet") Set orderCodeSet); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml index f38eddc76..2e340dd73 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml @@ -480,4 +480,17 @@ + + + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineScanZeroDetailMapper.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineScanZeroDetailMapper.java index b9881f419..0e6baf314 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineScanZeroDetailMapper.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineScanZeroDetailMapper.java @@ -2,11 +2,16 @@ package com.logpm.trunkline.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.logpm.trunkline.entity.TrunklineScanZeroDetailEntity; +import com.logpm.trunkline.vo.TrunklineScanZeroDetailVO; +import org.apache.ibatis.annotations.Param; import org.mapstruct.Mapper; +import java.util.List; + @Mapper public interface TrunklineScanZeroDetailMapper extends BaseMapper { + List findListByCarsLoadScanId(@Param("carsLoadScanId") Long carsLoadScanId); - + List findListByCarsLoadScanIds(@Param("carsLoadScanIds") List carsLoadScanIds); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineScanZeroDetailMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineScanZeroDetailMapper.xml new file mode 100644 index 000000000..43c476d4b --- /dev/null +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineScanZeroDetailMapper.xml @@ -0,0 +1,21 @@ + + + + + + + + + + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineAdvanceDetailService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineAdvanceDetailService.java index 2d097a852..a9e43b726 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineAdvanceDetailService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineAdvanceDetailService.java @@ -87,4 +87,7 @@ public interface ITrunklineAdvanceDetailService extends BaseService findAdvanceDetailListByAdvanceIds(AdvanceDTO advanceDTO); List findAdvanceDetailListByWaybillId(AdvanceDTO advanceDTO); + + List findTotalNumByOrderCodes(Set orderCodeSet); + } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java index 84a0a0cdd..8f158ce25 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java @@ -46,6 +46,7 @@ public interface ITrunklineCarsLoadScanService extends BaseService findPackageWithOrderList(Long loadId, Long warehouseId); List findUnloadPackageList(Long loadId, Long warehouseId, String waybillNo, String orderCode); + List findUnloadZeroList(Long loadId, Long warehouseId, String waybillNo, String orderCode); Integer findUnloadNumByLoadId(Long loadId); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java index 6d5697895..9cf630809 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java @@ -95,7 +95,7 @@ public interface ITrunklineCarsLoadService extends BaseService zeroPackageList); R findLoadScanWaybillDetailList(Long loadId, String orderCode, Long warehouseId); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineScanZeroDetailService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineScanZeroDetailService.java index 320846b09..19837f625 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineScanZeroDetailService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineScanZeroDetailService.java @@ -1,7 +1,13 @@ package com.logpm.trunkline.service; import com.logpm.trunkline.entity.TrunklineScanZeroDetailEntity; +import com.logpm.trunkline.vo.TrunklineScanZeroDetailVO; import org.springblade.core.mp.base.BaseService; +import java.util.List; + public interface ITrunklineScanZeroDetailService extends BaseService { + List findListByCarsLoadScanId(Long carsLoadScanId); + + List findListByCarsLoadScanIds(List carsLoadScanIds); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java index 0dc5b67d7..b90f50bfb 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java @@ -4,14 +4,18 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.IdUtil; import cn.hutool.json.JSONUtil; import com.logpm.aftersales.entity.AftersalesAbnormalRecordEntity; +import com.logpm.aftersales.entity.AftersalesAbnormalRecordZeroDetailEntity; import com.logpm.aftersales.feign.IAftersalesAbnormalRecordClient; +import com.logpm.aftersales.feign.IAftersalesAbnormalRecordZeroDetailClient; import com.logpm.aftersales.feign.IAftersalesWorkOrderClient; import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.distribution.entity.DistributionStockArticleEntity; +import com.logpm.distribution.feign.IDistributionParcelListClient; import com.logpm.distribution.feign.IDistributionStockArticleClient; import com.logpm.trunkline.entity.*; import com.logpm.trunkline.service.*; +import com.logpm.trunkline.vo.TrunklineScanZeroDetailVO; import com.logpm.trunkline.vo.UnloadReportVO; import com.logpm.warehouse.entity.WarehouseWaybillEntity; import com.logpm.warehouse.feign.IWarehouseWaybillClient; @@ -23,6 +27,7 @@ import org.springblade.common.constant.TenantNum; import org.springblade.common.constant.carsload.CarsLoadLogTypeConstant; import org.springblade.common.exception.CustomerException; import org.springblade.common.utils.CommonUtil; +import org.springblade.core.secure.utils.AuthUtil; import org.springblade.system.cache.DictBizCache; import org.springframework.amqp.rabbit.connection.CorrelationData; import org.springframework.amqp.rabbit.core.RabbitTemplate; @@ -33,6 +38,7 @@ import org.springframework.stereotype.Service; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.*; +import java.util.stream.Collectors; @Slf4j @Service @@ -61,6 +67,14 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { private ITrunklineCarsUnloadLogService trunklineCarsUnloadLogService; @Autowired private RabbitTemplate rabbitTemplate; + @Autowired + private IDistributionParcelListClient distributionParcelListClient; + @Autowired + private ITrunklineScanZeroDetailService trunklineScanZeroDetailService; + @Autowired + private IOpenOrderAsyncService openOrderAsyncService; + @Autowired + private IAftersalesAbnormalRecordZeroDetailClient abnormalRecordZeroDetailClient; @LogpmAsync("asyncExecutor") @Override @@ -521,6 +535,9 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { Integer num = carsLoadScanEntity.getNum(); String scanStatus = carsLoadScanEntity.getScanStatus(); Long fromWarehouseId = carsLoadScanEntity.getFromWarehouseId(); + WarehouseWaybillEntity warehouseWaybill = warehouseWaybillClient.findByWaybillNo(waybillNo); + Long waybillId = warehouseWaybill.getId(); + List zeroDetailVOList = trunklineScanZeroDetailService.findListByCarsLoadScanId(scanId); //卸车数量异常 AftersalesAbnormalRecordEntity abnormalRecordEntity = new AftersalesAbnormalRecordEntity(); @@ -547,7 +564,15 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findZeroByOrderCodeAndWarehouseId(orderCode, fromWarehouseId); if(!Objects.isNull(stockArticleEntity)){ distributionStockArticleClient.addHandQuantity(stockArticleEntity.getId(),num-unloadNum); + zeroDetailVOList.forEach(zeroDetailVO -> { + Long packageId = zeroDetailVO.getPackageId(); + Integer loadingNum = zeroDetailVO.getLoadingNum(); + Integer unloadNum1 = zeroDetailVO.getUnloadNum(); + distributionParcelListClient.addZeroQuantity(packageId,loadingNum-unloadNum1); + }); } + String content = warehouseName+"干线未签收卸车回库,总数/卸车数:"+num+"/"+num+",卸车时间"+ CommonUtil.dateToStringGeneral(new Date());; + openOrderAsyncService.saveLog(waybillId,waybillNo,"80","零担未签收回库",content,AuthUtil.getNickName(),AuthUtil.getUserId(),warehouseId,warehouseName); } abnormalRecordEntity.setSendOrderStatus(0); abnormalRecordEntity.setUpTime(new Date()); @@ -558,7 +583,34 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { addList.add(abnormalRecordEntity); }); } - abnormalRecordClient.addAbnormalRecordList(addList); + List aftersalesAbnormalRecordEntities = abnormalRecordClient.addAbnormalRecordListReturnList(addList); + //把aftersalesAbnormalRecordEntities只保留isZero等于1的数据 + List abnormalRecordEntities1 = aftersalesAbnormalRecordEntities.stream().filter(abnormalRecordEntity -> abnormalRecordEntity.getIsZero() == 1).collect(Collectors.toList()); + //把abnormalRecordEntities1中所有元素associationId放入一个集合 + List associationIdList = abnormalRecordEntities1.stream().map(AftersalesAbnormalRecordEntity::getAssociationId).collect(Collectors.toList()); + List scanZeroDetailVOList = trunklineScanZeroDetailService.findListByCarsLoadScanIds(associationIdList); + //把scanZeroDetailVOList所有元素通过scanId进行分组 + Map> scanZeroDetailVOMap = scanZeroDetailVOList.stream().collect(Collectors.groupingBy(TrunklineScanZeroDetailVO::getScanId)); + List abnormalRecordZeroDetailEntityList = new ArrayList<>(); + abnormalRecordEntities1.forEach(abnormalRecordEntity -> { + Long associationId = abnormalRecordEntity.getAssociationId(); + List zeroDetailVOList = scanZeroDetailVOMap.get(associationId); + Long abnormalRecordId = abnormalRecordEntity.getId(); + zeroDetailVOList.forEach(zeroDetailVO -> { + AftersalesAbnormalRecordZeroDetailEntity abnormalRecordZeroDetailEntity = new AftersalesAbnormalRecordZeroDetailEntity(); + abnormalRecordZeroDetailEntity.setAbnormalRecordId(abnormalRecordId); + abnormalRecordZeroDetailEntity.setPackageId(zeroDetailVO.getPackageId()); + abnormalRecordZeroDetailEntity.setGoodsId(zeroDetailVO.getGoodsId()); + abnormalRecordZeroDetailEntity.setGoodsName(zeroDetailVO.getGoodsName()); + abnormalRecordZeroDetailEntity.setAbnormalNum(zeroDetailVO.getLoadingNum()-zeroDetailVO.getUnloadNum()); + abnormalRecordZeroDetailEntity.setReturnNum(0); + abnormalRecordZeroDetailEntity.setIncomingNum(0); + abnormalRecordZeroDetailEntityList.add(abnormalRecordZeroDetailEntity); + }); + }); + if(CollUtil.isNotEmpty(abnormalRecordZeroDetailEntityList)){ + abnormalRecordZeroDetailClient.addAbnormalRecordZeroDetail(abnormalRecordZeroDetailEntityList); + } } @LogpmAsync("asyncExecutor") diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java index 79f265c73..83977da86 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java @@ -357,4 +357,9 @@ public class TrunklineAdvanceDetailServiceImpl extends BaseServiceImpl findAdvanceDetailListByWaybillId(AdvanceDTO advanceDTO) { return baseMapper.findAdvanceDetailListByWaybillId(advanceDTO); } + + @Override + public List findTotalNumByOrderCodes(Set orderCodeSet) { + return baseMapper.findTotalNumByOrderCodes(orderCodeSet); + } } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java index 2e7e8f3c4..ce14ec96c 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java @@ -9,6 +9,7 @@ import com.logpm.trunkline.dto.ProductInfoDTO; import com.logpm.trunkline.entity.TrunklineCarsLoadScanEntity; import com.logpm.trunkline.mapper.TrunklineCarsLoadScanMapper; import com.logpm.trunkline.service.ITrunklineCarsLoadScanService; +import com.logpm.trunkline.service.ITrunklineScanZeroDetailService; import com.logpm.trunkline.vo.*; import com.logpm.warehouse.entity.WarehouseWaybillEntity; import lombok.AllArgsConstructor; @@ -16,16 +17,19 @@ import lombok.extern.slf4j.Slf4j; import org.springblade.core.mp.base.BaseServiceImpl; import org.springframework.stereotype.Service; -import java.util.Collections; import java.util.Date; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; @Slf4j @Service @AllArgsConstructor public class TrunklineCarsLoadScanServiceImpl extends BaseServiceImpl implements ITrunklineCarsLoadScanService { + + private final ITrunklineScanZeroDetailService scanZeroDetailService; + @Override public Integer findNumByLoadId(Long loadId) { return baseMapper.findNumByLoadId(loadId); @@ -101,6 +105,27 @@ public class TrunklineCarsLoadScanServiceImpl extends BaseServiceImpl findUnloadZeroList(Long loadId, Long warehouseId, String waybillNo, String orderCode) { + List unloadPackageList = baseMapper.findUnloadPackageList(loadId, warehouseId, waybillNo, orderCode); + //把unloadPackageList中所有元素的carsLoadScanId放入一个集合 + // 创建一个包含所有carsLoadScanId的新列表 + List carsLoadScanIds = unloadPackageList.stream() + .map(UnloadPackageVO::getCarsLoadScanId) + .collect(Collectors.toList()); + List scanZeroDetailList = scanZeroDetailService.findListByCarsLoadScanIds(carsLoadScanIds); + //把scanZeroDetailList中所有元素通过id进行分组 + Map> scanZeroDetailMap = scanZeroDetailList.stream() + .collect(Collectors.groupingBy(TrunklineScanZeroDetailVO::getScanId)); + + unloadPackageList.forEach(unloadPackageVO -> { + Long carsLoadScanId = unloadPackageVO.getCarsLoadScanId(); + List list = scanZeroDetailMap.get(carsLoadScanId); + unloadPackageVO.setScanZeroDetailList(list); + }); + return unloadPackageList; + } + @Override public Integer findUnloadNumByLoadId(Long loadId) { return baseMapper.findUnloadNumByLoadId(loadId); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java index 63c44abd7..6561afc0b 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java @@ -28,6 +28,7 @@ import com.logpm.distribution.entity.DistributionStockArticleEntity; import com.logpm.distribution.feign.IDistributionParcelListClient; import com.logpm.distribution.feign.IDistributionParcelNumberClient; import com.logpm.distribution.feign.IDistributionStockArticleClient; +import com.logpm.distribution.vo.DistributionParcelListVO; import com.logpm.factorydata.enums.BrandEnums; import com.logpm.factorydata.feign.IFactoryDataClient; import com.logpm.factorydata.util.FactoryDataMessageSender; @@ -1200,162 +1201,155 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl> fromWarehouseIdmap = orderCodeList.stream().collect(Collectors.groupingBy(TrunklineCarsLoadScanEntity::getFromWarehouseId)); fromWarehouseIdmap.keySet().forEach(fromWarehouseId -> { - TrunklineCarsOrderEntity trunklineCarsOrderEntity = trunklineCarsOrderService.findEntityByLoadIdAndWarehouseIdAndOrderCodeAndWaybillNo(loadId, fromWarehouseId, orderCode, orderCode); - if(!Objects.isNull(trunklineCarsOrderEntity)){ - Integer realNum = trunklineCarsOrderEntity.getRealNum(); - List fromWarehouseIdList = fromWarehouseIdmap.get(fromWarehouseId); - //把fromWarehouseIdList中所有元素的unloadNum累加 - int unloadNum = fromWarehouseIdList.stream().mapToInt(TrunklineCarsLoadScanEntity::getUnloadNum).sum(); - DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findZeroByOrderCodeAndWarehouseId(orderCode, fromWarehouseId); - if(!Objects.isNull(stockArticleEntity)){ - Integer handQuantity = stockArticleEntity.getHandQuantity(); - - if(unloadNum > realNum){ - //卸车数大于实际装车数 - throw new CustomerException(405,"零担订单"+orderCode+"卸车件数已大于实际装车件数,请去调整补录"); - }else { -// if(unloadNum < realNum){ -// distributionStockArticleClient.addHandQuantity(stockArticleEntity.getId(),realNum-unloadNum); -// } - - DistributionStockArticleEntity newStockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, warehouseId); - if (Objects.isNull(newStockArticleEntity)) { - newStockArticleEntity = new DistributionStockArticleEntity(); - BeanUtil.copy(stockArticleEntity, newStockArticleEntity); - newStockArticleEntity.setId(null); + List fromWarehouseIdList = fromWarehouseIdmap.get(fromWarehouseId); + + int realNum = fromWarehouseIdList.stream().mapToInt(TrunklineCarsLoadScanEntity::getNum).sum(); + //把fromWarehouseIdList中所有元素的unloadNum累加 + int unloadNum = fromWarehouseIdList.stream().mapToInt(TrunklineCarsLoadScanEntity::getUnloadNum).sum(); + DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findZeroByOrderCodeAndWarehouseId(orderCode, fromWarehouseId); + if(!Objects.isNull(stockArticleEntity)){ + + if(unloadNum > realNum){ + //卸车数大于实际装车数 + throw new CustomerException(405,"零担订单"+orderCode+"卸车件数已大于实际装车件数,请去调整补录"); + }else { + + //把fromWarehouseIdList中所有元素的id放入一个集合 + List carsLoadScanIds = fromWarehouseIdList.stream().map(TrunklineCarsLoadScanEntity::getId).collect(Collectors.toList()); + + List zeroDetailVOList = scanZeroDetailService.findListByCarsLoadScanIds(carsLoadScanIds); + //把zeroDetailVOList所有元素通过goodsName进行分组 + Map> goodsNamemap = zeroDetailVOList.stream().collect(Collectors.groupingBy(TrunklineScanZeroDetailVO::getGoodsName)); + + + DistributionStockArticleEntity newStockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, warehouseId); + if (Objects.isNull(newStockArticleEntity)) { + newStockArticleEntity = new DistributionStockArticleEntity(); + BeanUtil.copy(stockArticleEntity, newStockArticleEntity); + Integer totalNumber = stockArticleEntity.getTotalNumber(); + newStockArticleEntity.setId(null); + if(totalNumber == unloadNum){ + newStockArticleEntity.setOrderReceiveStatus("30"); + }else{ newStockArticleEntity.setOrderReceiveStatus("20"); - newStockArticleEntity.setOrderStatus("10"); - newStockArticleEntity.setHandQuantity(unloadNum); - newStockArticleEntity.setIncomingNum(unloadNum); - newStockArticleEntity.setWarehouse(warehouseEntity.getName()); - newStockArticleEntity.setWarehouseId(warehouseEntity.getId()); - newStockArticleEntity.setAllocation(null); - newStockArticleEntity.setTrays(null); - newStockArticleEntity.setCarsLoadNum(0); - Long orderId = distributionStockArticleClient.addData(newStockArticleEntity); - if (orderId != 0) { - Integer isTransfer = 1; - List parcelListEntityList = distributionParcelListClient.findEntityListByOrderCode(orderCode, fromWarehouseId); - List ls = new ArrayList<>(); - for (DistributionParcelListEntity parcelListEntity : parcelListEntityList) { - DistributionParcelListEntity newParcelListEntity = new DistributionParcelListEntity(); - BeanUtil.copy(parcelListEntity, newParcelListEntity); - newParcelListEntity.setId(null); - newParcelListEntity.setWarehouseId(warehouseId); - newParcelListEntity.setWarehouse(warehouseEntity.getName()); - newParcelListEntity.setStockArticleId(orderId); - Long acceptWarehouseId = parcelListEntity.getAcceptWarehouseId(); - if(warehouseId.equals(acceptWarehouseId)){ - newParcelListEntity.setIsTransfer(0); - isTransfer = 0; -// String operationRemark = "运单装车"+unloadNum+"件 干线批次号:"+carsLoadEntity.getCarsNo()+",车牌号:"+carsLoadEntity.getCarNumber()+",司机姓名:"+carsLoadEntity.getDriverName()+",司机手机:"+carsLoadEntity.getDriverMobile(); -// openOrderAsyncService.saveLog(waybillId, waybillNo, "30", "干线装车", operationRemark, AuthUtil.getNickName(), AuthUtil.getUserId(), warehouseId, warehouseName); - }else{ - newParcelListEntity.setIsTransfer(1); - } - Long orderPackageId = distributionParcelListClient.addReturnId(newParcelListEntity); - - DistributionParcelNumberEntity parcelNumberEntity = new DistributionParcelNumberEntity(); - parcelNumberEntity.setStockArticleId(orderId); - parcelNumberEntity.setParcelListId(orderPackageId); - parcelNumberEntity.setQuantity(newParcelListEntity.getQuantity()); - parcelNumberEntity.setHandQuantity(newParcelListEntity.getQuantity()); - parcelNumberEntity.setDeliveryQuantity(0); - parcelNumberEntity.setSigninQuantity(0); - parcelNumberEntity.setOutboundQuantity(0); - parcelNumberEntity.setWarehouseId(warehouseId); - ls.add(parcelNumberEntity); + } + newStockArticleEntity.setOrderStatus("10"); + newStockArticleEntity.setHandQuantity(unloadNum); + newStockArticleEntity.setIncomingNum(unloadNum); + newStockArticleEntity.setWarehouse(warehouseEntity.getName()); + newStockArticleEntity.setWarehouseId(warehouseEntity.getId()); + newStockArticleEntity.setAllocation(null); + newStockArticleEntity.setTrays(null); + newStockArticleEntity.setCarsLoadNum(0); + Long orderId = distributionStockArticleClient.addData(newStockArticleEntity); + if (orderId != 0) { + + Integer isTransfer = 1; + List parcelListEntityList = distributionParcelListClient.findEntityVOListByOrderCode(orderCode, fromWarehouseId); + List ls = new ArrayList<>(); + for (DistributionParcelListVO parcelListEntity : parcelListEntityList) { + DistributionParcelListEntity newParcelListEntity = new DistributionParcelListEntity(); + String firsts = parcelListEntity.getFirsts(); + List detailVOList = goodsNamemap.get(firsts); + //把detailVOList所有元素的unloadNum求和,如果为空用0代替 + int totalUnloadNum = detailVOList.stream() + .mapToInt(vo -> Optional.ofNullable(vo.getUnloadNum()).orElse(0)) + .sum(); + + BeanUtil.copy(parcelListEntity, newParcelListEntity); + newParcelListEntity.setId(null); + newParcelListEntity.setWarehouseId(warehouseId); + newParcelListEntity.setWarehouse(warehouseEntity.getName()); + newParcelListEntity.setStockArticleId(orderId); + newParcelListEntity.setQuantity(totalUnloadNum); + Long acceptWarehouseId = parcelListEntity.getAcceptWarehouseId(); + if(warehouseId.equals(acceptWarehouseId)){ + newParcelListEntity.setIsTransfer(0); + isTransfer = 0; + }else{ + newParcelListEntity.setIsTransfer(1); } - distributionParcelNumberClient.addBatch(ls); - -// if(isTransfer == 0){ -// //查询零担发车件数 -// List zeroNumVOList = trunklineCarsLoadScanService.findZeroStartNum(loadId,warehouseId); -// if(CollUtil.isNotEmpty(zeroNumVOList)){ -// zeroNumVOList.forEach(zeroNumVO -> { -// String waybillNo = zeroNumVO.getWaybillNo(); -// Integer num = zeroNumVO.getNum(); -// WarehouseWaybillEntity waybill = warehouseWaybillClient.findByWaybillNo(waybillNo); -// Integer totalCount = waybill.getTotalCount(); -// Integer waybillStatusInt = Integer.parseInt(waybill.getWaybillStatus()); -// TrunklineWaybillOrderEntity waybillOrderEntity = trunklineWaybillOrderService.findEntityByWaybillNoAndOrderCode(waybillNo,waybillNo); -// if(!Objects.isNull(waybillOrderEntity)){ -// Integer handleNumber = waybillOrderEntity.getHandleNumber(); -// if(waybillStatusInt <= 40){ -// if(Objects.isNull(handleNumber)){ -// handleNumber = 0; -// } -// int i = handleNumber - num; -// if(i==0){ -// waybill.setWaybillStatus("20"); -// waybillOrderEntity.setHandleNumber(totalCount); -// }else{ -// waybill.setWaybillStatus("30"); -// waybillOrderEntity.setHandleNumber(i); -// } -// -// warehouseWaybillClient.updateEntity(waybill); -// trunklineWaybillOrderService.updateById(waybillOrderEntity); -// } -// -// } -// -// }); -// } -// } + Long orderPackageId = distributionParcelListClient.addReturnId(newParcelListEntity); + + DistributionParcelNumberEntity parcelNumberEntity = new DistributionParcelNumberEntity(); + parcelNumberEntity.setStockArticleId(orderId); + parcelNumberEntity.setParcelListId(orderPackageId); + parcelNumberEntity.setQuantity(parcelListEntity.getZeroPackageTotalNum()); + parcelNumberEntity.setHandQuantity(totalUnloadNum); + parcelNumberEntity.setDeliveryQuantity(0); + parcelNumberEntity.setSigninQuantity(0); + parcelNumberEntity.setOutboundQuantity(0); + parcelNumberEntity.setWarehouseId(warehouseId); + ls.add(parcelNumberEntity); } - } else { - Integer hQuantity = newStockArticleEntity.getHandQuantity() + unloadNum; - Integer incomingNum = newStockArticleEntity.getIncomingNum() + unloadNum; - Integer totalNumber = newStockArticleEntity.getTotalNumber(); - - if (incomingNum.equals(totalNumber)) { - if (hQuantity.equals(totalNumber)) { - newStockArticleEntity.setOrderStatus("20"); - } else { - newStockArticleEntity.setOrderStatus("30"); - } - newStockArticleEntity.setOrderReceiveStatus("30"); + distributionParcelNumberClient.addBatch(ls); + } + } else { + Integer hQuantity = newStockArticleEntity.getHandQuantity() + unloadNum; + Integer incomingNum = newStockArticleEntity.getIncomingNum() + unloadNum; + Integer totalNumber = newStockArticleEntity.getTotalNumber(); + + if (incomingNum.equals(totalNumber)) { + if (hQuantity.equals(totalNumber)) { + newStockArticleEntity.setOrderStatus("20"); } else { - if (incomingNum.equals(hQuantity)) { - newStockArticleEntity.setOrderStatus("10"); - } else { - newStockArticleEntity.setOrderStatus("30"); - } - newStockArticleEntity.setOrderReceiveStatus("20"); + newStockArticleEntity.setOrderStatus("30"); } - newStockArticleEntity.setHandQuantity(hQuantity); - newStockArticleEntity.setIncomingNum(incomingNum); - - distributionStockArticleClient.saveOrUpdate(newStockArticleEntity); -// String waybillNumber = newStockArticleEntity.getWaybillNumber(); -// WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNumber); -// Long destinationWarehouseId = warehouseWaybillEntity.getDestinationWarehouseId(); -// if(warehouseId.equals(destinationWarehouseId)){ -// QueryWrapper queryWrapper1 = new QueryWrapper<>(); -// queryWrapper1.eq("waybill_no",stockArticleEntity.getWaybillNumber()) -// .eq("order_code",stockArticleEntity.getWaybillNumber()); -// TrunklineWaybillOrderEntity one = trunklineWaybillOrderService.getOne(queryWrapper1); -// if(!Objects.isNull(one)){ -// Integer totalCount = warehouseWaybillEntity.getTotalCount(); -// Integer waybillStatusInt = Integer.parseInt(warehouseWaybillEntity.getWaybillStatus()); -// if(waybillStatusInt <= 30){ -// Integer handleNumber = one.getHandleNumber(); -// int total = handleNumber + unloadNum; -// if(total < totalCount){ -// warehouseWaybillEntity.setWaybillStatus("50"); -// one.setHandleNumber(total); -// }else{ -// warehouseWaybillEntity.setWaybillStatus("60"); -// one.setHandleNumber(totalCount); -// } -// warehouseWaybillClient.updateEntity(warehouseWaybillEntity); -// trunklineWaybillOrderService.updateById(one); -// } -// } -// } + newStockArticleEntity.setOrderReceiveStatus("30"); + } else { + newStockArticleEntity.setOrderReceiveStatus("20"); + } + newStockArticleEntity.setHandQuantity(hQuantity); + newStockArticleEntity.setIncomingNum(incomingNum); + + List listEntityList = distributionParcelListClient.findEntityListByOrderCode(orderCode, warehouseId); + //把listEntityList中所有元素的id放入一个集合 + List parcelListIds = listEntityList.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList()); + List parceNumberList = distributionParcelNumberClient.findListByParcelListIds(parcelListIds); + //把parceNumberList转化成以parcelListId为key的Map + Map mapByParcelListId = parceNumberList.stream() + .collect(Collectors.toMap( + DistributionParcelNumberEntity::getParcelListId, + entity -> entity, + (entity1, entity2) -> entity1)); // 处理可能的键冲突 + + + + List updateParceList = new ArrayList<>(); + List updateParceNumberList = new ArrayList<>(); + + listEntityList.forEach(entity -> { + Long parceListId = entity.getId(); + String firsts = entity.getFirsts(); + List detailVOList = goodsNamemap.get(firsts); + //把detailVOList所有元素的unloadNum求和,如果为空用0代替 + int totalUnloadNum = detailVOList.stream() + .mapToInt(vo -> Optional.ofNullable(vo.getUnloadNum()).orElse(0)) + .sum(); + Integer quantity = entity.getQuantity(); + DistributionParcelListEntity updatePaceList = new DistributionParcelListEntity(); + updatePaceList.setId(parceListId); + updatePaceList.setQuantity(quantity+totalUnloadNum); + updateParceList.add(updatePaceList); + + DistributionParcelNumberEntity parcelNumberEntity = mapByParcelListId.get(parceListId); + if(!Objects.isNull(parcelNumberEntity)){ + Integer handQuantity = parcelNumberEntity.getHandQuantity(); + DistributionParcelNumberEntity updateParceNumberEntity = new DistributionParcelNumberEntity(); + updateParceNumberEntity.setId(parcelNumberEntity.getId()); + updateParceNumberEntity.setHandQuantity(handQuantity + totalUnloadNum); + updateParceNumberList.add(updateParceNumberEntity); + } + }); + if(CollUtil.isNotEmpty(updateParceList)){ + distributionParcelListClient.updateList(updateParceList); + } + if(CollUtil.isNotEmpty(updateParceNumberList)){ + distributionParcelNumberClient.updateList(updateParceNumberList); } + distributionStockArticleClient.saveOrUpdate(newStockArticleEntity); + } } } @@ -1364,48 +1358,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl queryWrapper1 = new QueryWrapper<>(); -// queryWrapper1.eq("waybill_no",orderCode) -// .eq("order_code",orderCode); -// TrunklineWaybillOrderEntity one = trunklineWaybillOrderService.getOne(queryWrapper1); -// if(!Objects.isNull(one)){ -// Integer handleNumber = one.getHandleNumber(); -// Integer totalCount = warehouseWaybillEntity.getTotalCount(); -// Integer waybillStatusInt = Integer.parseInt(warehouseWaybillEntity.getWaybillStatus()); -// int total = handleNumber + unloadNum; -// if(waybillStatusInt < 50){ -// if(total != totalCount){ -// warehouseWaybillEntity.setWaybillStatus("50"); -// one.setHandleNumber(total); -// warehouseWaybillClient.updateEntity(warehouseWaybillEntity); -// trunklineWaybillOrderService.updateById(one); -// }else{ -// warehouseWaybillEntity.setWaybillStatus("60"); -// one.setHandleNumber(total); -// warehouseWaybillClient.updateEntity(warehouseWaybillEntity); -// trunklineWaybillOrderService.updateById(one); -// } -// }else if(waybillStatusInt == 50){ -// if(total == totalCount){ -// warehouseWaybillEntity.setWaybillStatus("60"); -// one.setHandleNumber(total); -// warehouseWaybillClient.updateEntity(warehouseWaybillEntity); -// trunklineWaybillOrderService.updateById(one); -// } -// } -// } -// } + }); } //无装车记录异常日志记录 try { -// carsLoadAsyncService. carsLoadAsyncService.abnormalListUnloadCheckByLoadIdAndWarehouseId(loadId, warehouseId, currentCarsLoadLineEntity.getNodeName(), AuthUtil.getTenantId(), AuthUtil.getUserId(), AuthUtil.getNickName(), Func.firstLong(AuthUtil.getDeptId()),currentCarsLoadLineEntity); List orderPackageCodes = trunklineCarsLoadScanService.findUnloadByLoadIdAndWarehouseId(loadId, warehouseId); @@ -3218,8 +3176,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl zeroPackageList = loadCarsDTO.getZeroPackageList(); BasicdataTrayEntity basicdataTrayEntity = basicdataTrayClient.getTrayByTrayCode(trayCode); if(Objects.isNull(basicdataTrayEntity)){ @@ -4050,7 +4017,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl map = new HashMap<>(); map.put("trayType", trayType); @@ -4559,14 +4531,32 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl unloadPackageList = batchUnloadDTO.getUnloadPackageList(); List unloadZeroList = batchUnloadDTO.getUnloadZeroList(); - - for (UnloadZeroDTO unloadZeroDTO : unloadZeroList) { - Long carsLoadScanId = unloadZeroDTO.getCarsLoadScanId(); - String waybillNo = unloadZeroDTO.getWaybillNo(); - Integer enterNum = unloadZeroDTO.getEnterNum(); - String trayCode = unloadZeroDTO.getTrayCode(); - String orderCode = unloadZeroDTO.getOrderCode(); - unloadZero(carsLoadScanId,loadId, waybillNo, enterNum, warehouseId, 1, trayCode, orderCode, "批量卸车零担正常卸车",null,null); + //把unloadZeroList中所有元素的carsLoadScanId放入一个list中 + List carsLoadScanIdList = unloadZeroList.stream().map(UnloadZeroDTO::getCarsLoadScanId).collect(Collectors.toList()); + if(CollUtil.isNotEmpty(carsLoadScanIdList)){ + List zeroDetailVOList = scanZeroDetailService.findListByCarsLoadScanIds(carsLoadScanIdList); + //把zeroDetailVOList所有元素通过id分组 + Map> zeroDetailVOMap = zeroDetailVOList.stream().collect(Collectors.groupingBy(TrunklineScanZeroDetailVO::getId)); + + for (UnloadZeroDTO unloadZeroDTO : unloadZeroList) { + Long carsLoadScanId = unloadZeroDTO.getCarsLoadScanId(); + String waybillNo = unloadZeroDTO.getWaybillNo(); + Integer enterNum = unloadZeroDTO.getEnterNum(); + String trayCode = unloadZeroDTO.getTrayCode(); + String orderCode = unloadZeroDTO.getOrderCode(); + + List list = zeroDetailVOMap.get(carsLoadScanId); + List zeroPackageList = new ArrayList<>(); + list.forEach(zeroDetailVO -> { + ZeroPackageDTO zeroPackageDTO = new ZeroPackageDTO(); + zeroPackageDTO.setPackageId(zeroDetailVO.getPackageId()); + zeroPackageDTO.setGoodsId(zeroDetailVO.getGoodsId()); + zeroPackageDTO.setGoodsName(zeroDetailVO.getGoodsName()); + zeroPackageDTO.setEnterNum(zeroDetailVO.getLoadingNum()); + zeroPackageList.add(zeroPackageDTO); + }); + unloadZero(carsLoadScanId,loadId, waybillNo, enterNum, warehouseId, 1, trayCode, orderCode, "批量卸车零担正常卸车",null,null,zeroPackageList); + } } List carsLoadScanIds = new ArrayList<>(); @@ -4596,7 +4586,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl stockArticleEntityList = distributionStockArticleClient.findListByOrderCodesAndWarehouseId(findParamterDTO); stockArticleEntities.addAll(stockArticleEntityList); - }); //把stockArticleEntities转成orderCode为键值的map @@ -8953,9 +8942,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl zeroPackageList) { log.info("#############unloadZero: 卸车零担"); + if(CollUtil.isEmpty(zeroPackageList)){ + log.warn("#############unloadZero: ;品类信息有误 zeroPackageList={}", zeroPackageList); + return R.fail(405, "品类信息有误"); + } + TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId); if (Objects.isNull(carsLoadEntity)) { log.warn("#############unloadZero: 配载计划信息不存在 loadId={}", loadId); @@ -9029,6 +9023,27 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl zeroDetailMap = zeroPackageList.stream().collect(Collectors.toMap(ZeroPackageDTO::getGoodsId, Function.identity())); + + List zeroDetailVOList = scanZeroDetailService.findListByCarsLoadScanId(carsLoadScanId); + List updateList = new ArrayList<>(); + zeroDetailVOList.forEach(detailVO -> { + Long goodsId = detailVO.getGoodsId(); + Long id = detailVO.getId(); + ZeroPackageDTO zeroPackageDTO = zeroDetailMap.get(goodsId); + if(!Objects.isNull(zeroPackageDTO)){ + TrunklineScanZeroDetailEntity updateEntity = new TrunklineScanZeroDetailEntity(); + updateEntity.setId(id); + updateEntity.setUnloadNum(zeroPackageDTO.getEnterNum()); + updateList.add(updateEntity); + } + }); + if(CollUtil.isNotEmpty(updateList)){ + scanZeroDetailService.updateBatchById(updateList); + } + trunklineCarsUnloadLogService.savaUnloadLog(warehouseId, warehouseName, loadId, loadCode, waybillId, waybillNo, orderCode, scanCode, enterNun, 2, 1, isAbnormal, trayId, trayCode, trayName, fromWarehouseId, loadScanId, remark); @@ -9435,23 +9450,30 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl unloadScanOrderList = trunklineCarsLoadScanService.findPackageWithOrderList(loadId, warehouseId); - for (UnloadScanOrderVO unloadScanOrderVO : unloadScanOrderList) { - Integer loadingNum = unloadScanOrderVO.getLoadingNum(); - String waybillNo = unloadScanOrderVO.getWaybillNo(); - String orderCode = unloadScanOrderVO.getOrderCode(); - Integer totalNumber = trunklineAdvanceDetailService.findTotalNumByOrderCode(orderCode); - unloadScanOrderVO.setTotalNumber(totalNumber); - List unloadPackageList = trunklineCarsLoadScanService.findUnloadPackageList(loadId, warehouseId, waybillNo, orderCode); - unloadScanOrderVO.setUnloadPackageList(unloadPackageList); + if(CollUtil.isNotEmpty(unloadScanOrderList)){ + //把unloadScanOrderList中所有元素转化成以orderCode为key的map + Map unloadScanOrderMap = unloadScanOrderList.stream().collect(Collectors.toMap(UnloadScanOrderVO::getOrderCode, Function.identity())); + Set orderCodeSet = unloadScanOrderMap.keySet(); + List orderCodeNumList = trunklineAdvanceDetailService.findTotalNumByOrderCodes(orderCodeSet); + //把orderCodeNumList中所有元素转化成以orderCode为key的map + Map orderCodeNumMap = orderCodeNumList.stream().collect(Collectors.toMap(OrderCodeNumVO::getOrderCode, Function.identity())); + + for (UnloadScanOrderVO unloadScanOrderVO : unloadScanOrderList) { + String waybillNo = unloadScanOrderVO.getWaybillNo(); + String orderCode = unloadScanOrderVO.getOrderCode(); + unloadScanOrderVO.setTotalNumber(orderCodeNumMap.get(orderCode).getTotalNum()); + List unloadPackageList = trunklineCarsLoadScanService.findUnloadPackageList(loadId, warehouseId, waybillNo, orderCode); + unloadScanOrderVO.setUnloadPackageList(unloadPackageList); + } } + //查询已装车的零担 List zeroList = trunklineCarsLoadScanService.findUnloadZeroList(loadId, warehouseId); for (UnloadZeroVO unloadZeroVO : zeroList) { - Integer loadingNum = unloadZeroVO.getLoadingNum(); String waybillNo = unloadZeroVO.getWaybillNo(); String orderCode = unloadZeroVO.getOrderCode(); - List unloadPackageList = trunklineCarsLoadScanService.findUnloadPackageList(loadId, warehouseId, waybillNo, orderCode); + List unloadPackageList = trunklineCarsLoadScanService.findUnloadZeroList(loadId, warehouseId, waybillNo, orderCode); unloadZeroVO.setUnloadPackageList(unloadPackageList); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineScanZeroDetailServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineScanZeroDetailServiceImpl.java index 575146d32..b5590e22b 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineScanZeroDetailServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineScanZeroDetailServiceImpl.java @@ -3,13 +3,25 @@ package com.logpm.trunkline.service.impl; import com.logpm.trunkline.entity.TrunklineScanZeroDetailEntity; import com.logpm.trunkline.mapper.TrunklineScanZeroDetailMapper; import com.logpm.trunkline.service.ITrunklineScanZeroDetailService; +import com.logpm.trunkline.vo.TrunklineScanZeroDetailVO; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.core.mp.base.BaseServiceImpl; import org.springframework.stereotype.Service; +import java.util.List; + @Service @AllArgsConstructor @Slf4j public class TrunklineScanZeroDetailServiceImpl extends BaseServiceImpl implements ITrunklineScanZeroDetailService { + @Override + public List findListByCarsLoadScanId(Long carsLoadScanId) { + return baseMapper.findListByCarsLoadScanId(carsLoadScanId); + } + + @Override + public List findListByCarsLoadScanIds(List carsLoadScanIds) { + return baseMapper.findListByCarsLoadScanIds(carsLoadScanIds); + } }