Browse Source

1.干线改单逻辑优化

2.干线bug修复
visual
zhenghaoyu 6 months ago
parent
commit
1c8c519f05
  1. 3
      blade-biz-common/src/main/java/org/springblade/common/constant/OldSystemDataPushConfig.java
  2. 3
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java
  3. 3
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelNumberClient.java
  4. 4
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseWaybillDetailClient.java
  5. 9
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java
  6. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java
  7. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelNumberClient.java
  8. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java
  9. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  10. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelNumberMapper.java
  11. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelNumberMapper.xml
  12. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java
  13. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelNumberService.java
  14. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  15. 29
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelNumberServiceImpl.java
  16. 8
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml
  17. 189
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  18. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  19. 6
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseWaybillDetailClient.java

3
blade-biz-common/src/main/java/org/springblade/common/constant/OldSystemDataPushConfig.java

@ -103,6 +103,9 @@ public class OldSystemDataPushConfig {
//仁寿欧派大家居
warehourseIds.add("127");
//生活家成都仓
warehourseIds.add("71");
}

3
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java

@ -284,5 +284,8 @@ public interface IDistributionParcelListClient {
*/
@GetMapping(API_PREFIX + "/findOrderInfoByOrderPackageCode")
Map<String,Object> findOrderInfoByOrderPackageCode(@RequestParam("orderPackageCode") String orderPackageCode,@RequestParam("warehouseId") Long warehouseId);
@PostMapping(API_PREFIX + "/deleteListByParcelListIds")
void deleteListByParcelListIds(@RequestBody List<Long> deleteParcelListIds);
}

3
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelNumberClient.java

@ -65,4 +65,7 @@ public interface IDistributionParcelNumberClient {
@GetMapping(API_PREFIX+"/addHandleQuantity")
void addHandleQuantity(@RequestParam Long packageId, @RequestParam int num);
@GetMapping(API_PREFIX+"/updateListByPracelListIds")
void updateListByPracelListIds(@RequestParam List<Long> updateNumberIds);
}

4
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseWaybillDetailClient.java

@ -65,6 +65,10 @@ public interface IWarehouseWaybillDetailClient {
@PostMapping(API_PREFIX+"/addEntity")
void addEntity(@RequestBody WarehouseWayBillDetail warehouseWayBillDetail);
@PostMapping(API_PREFIX+"/addEntityReturnId")
Long addEntityReturnId(@RequestBody WarehouseWayBillDetail warehouseWayBillDetail);
@PostMapping(API_PREFIX+"/findByWaybillIds")
List<WarehouseWayBillDetail> findByWaybillIds(@RequestBody List<Long> waybillIds);
@PostMapping(API_PREFIX+"/deleteByWaybillNo")

9
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java

@ -175,10 +175,7 @@ public class AftersalesAbnormalRecordServiceImpl extends BaseServiceImpl<Aftersa
Long waybillId = null;
Integer dealType = abnormalRecordDTO.getDealType();
List<ZeroPackageDTO> zeroPackageDTOS = abnormalRecordDTO.getZeroPackageDTOS();
if(CollUtil.isEmpty(zeroPackageDTOS)){
log.warn("################dealAbnormal: 品类信息不存在");
return R.fail(405,"品类信息不存在");
}
Integer num = abnormalRecordEntity.getNum();
Long carsLoadScanId = abnormalRecordEntity.getAssociationId();
TrunklineCarsLoadScanEntity carsLoadScanEntity = trunklineCarsLoadScanClient.findEntityById(carsLoadScanId);
@ -203,6 +200,10 @@ public class AftersalesAbnormalRecordServiceImpl extends BaseServiceImpl<Aftersa
abnormalRecordEntity.setRemark("差异件数退回原仓");
}else if(dealType.equals(6)){
List<PackageData> packageDataList = new ArrayList<>();
if(CollUtil.isEmpty(zeroPackageDTOS)){
log.warn("################dealAbnormal: 品类信息不存在");
return R.fail(405,"品类信息不存在");
}
//入库本仓
Integer enterNum = abnormalRecordDTO.getNum();
//把scanZeroDetailEntityList转化成以packageId为key的map

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java

@ -585,4 +585,11 @@ public class DistributionParcelListClient implements IDistributionParcelListClie
public Map<String, Object> findOrderInfoByOrderPackageCode(String orderPackageCode, Long warehouseId) {
return distributionParcelListService.findOrderInfoByOrderPackageCode(orderPackageCode,warehouseId);
}
@Override
public void deleteListByParcelListIds(List<Long> deleteParcelListIds) {
distributionParcelListService.deleteListByParcelListIds(deleteParcelListIds);
distributionParcelNumberService.deleteListByParcelListIds(deleteParcelListIds);
}
}

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelNumberClient.java

@ -82,4 +82,9 @@ public class DistributionParcelNumberClient implements IDistributionParcelNumber
distributionParcelNumberService.addZeroQuantity(packageId, num);
}
@Override
public void updateListByPracelListIds(List<Long> updateNumberIds) {
distributionParcelNumberService.updateListByPracelListIds(updateNumberIds);
}
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java

@ -313,4 +313,6 @@ public interface DistributionParcelListMapper extends BaseMapper<DistributionPar
void clearWaybillInfoByParceListIds(@Param("parceListIds") List<Long> parceListIds);
Map<String, Object> findOrderInfoByOrderPackageCode(@Param("orderPackageCode") String orderPackageCode, @Param("warehouseId") Long warehouseId);
void deleteListByParcelListIds(@Param("parceListIds") List<Long> deleteParcelListIds);
}

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml

@ -1962,4 +1962,12 @@
</update>
<delete id="deleteListByParcelListIds">
delete from logpm_distribution_parcel_list
where id in
<foreach collection="parceListIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
</mapper>

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelNumberMapper.java

@ -76,4 +76,6 @@ public interface DistributionParcelNumberMapper extends BaseMapper<DistributionP
Integer augmentSignForNum(@Param("packageId") Long id,@Param("stockArticleId") Long stockArticleId,@Param("quantity") Integer quantity);
void addZeroQuantity(@Param("packageId") Long packageId, @Param("num") int num);
void deleteListByParcelListIds(@Param("parceListIds") List<Long> deleteParcelListIds);
}

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelNumberMapper.xml

@ -86,4 +86,12 @@
parcel_list_id = #{packageId}
</update>
<delete id="deleteListByParcelListIds">
delete from logpm_distribution_parcel_number
where parcel_list_id in
<foreach collection="parceListIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
</mapper>

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java

@ -286,4 +286,6 @@ public interface IDistributionParcelListService extends BaseService<Distribution
Map<String, Object> findOrderInfoByOrderPackageCode(String orderPackageCode, Long warehouseId);
void updateEntityByOpenOrderByAdvanceIds(UpdateOrderDTO updateOrderDTO);
void deleteListByParcelListIds(List<Long> deleteParcelListIds);
}

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelNumberService.java

@ -81,4 +81,7 @@ public interface IDistributionParcelNumberService extends BaseService<Distributi
void addZeroQuantity(Long packageId, int num);
void deleteListByParcelListIds(List<Long> deleteParcelListIds);
void updateListByPracelListIds(List<Long> updateNumberIds);
}

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java

@ -1520,4 +1520,9 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
distributionStockArticleService.updateBatchById(stockArticleEntities);
}
}
@Override
public void deleteListByParcelListIds(List<Long> deleteParcelListIds) {
baseMapper.deleteListByParcelListIds(deleteParcelListIds);
}
}

29
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelNumberServiceImpl.java

@ -17,6 +17,7 @@
package com.logpm.distribution.service.impl;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.distribution.dto.DistributionParcelNumberDTO;
@ -38,7 +39,10 @@ import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
/**
* 订单零担包件数量记录 服务实现类
@ -178,4 +182,29 @@ public class DistributionParcelNumberServiceImpl extends BaseServiceImpl<Distrib
baseMapper.addZeroQuantity(packageId,num);
}
@Override
public void deleteListByParcelListIds(List<Long> deleteParcelListIds) {
baseMapper.deleteListByParcelListIds(deleteParcelListIds);
}
@Override
public void updateListByPracelListIds(List<Long> updateNumberIds) {
List<DistributionParcelListEntity> distributionParcelListEntities = distributionParcelListService.listByIds(updateNumberIds);
//转化成以id为key的Map
Map<Long, DistributionParcelListEntity> parcelListMap = distributionParcelListEntities.stream().collect(Collectors.toMap(DistributionParcelListEntity::getId, parcelListEntity -> parcelListEntity));
QueryWrapper<DistributionParcelNumberEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.in("parcel_list_id", updateNumberIds);
List<DistributionParcelNumberEntity> distributionParcelNumberEntities = baseMapper.selectList(queryWrapper);
distributionParcelNumberEntities.forEach(p->{
Long parcelListId = p.getParcelListId();
DistributionParcelListEntity parcelList = parcelListMap.get(parcelListId);
if(!Objects.isNull(parcelList)){
p.setQuantity(parcelList.getQuantity());
p.setHandQuantity(parcelList.getQuantity());
}
});
updateBatchById(distributionParcelNumberEntities);
}
}

8
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml

@ -502,16 +502,16 @@
and ltcl.arrive_time &lt;= #{param.arriveTimeEnd}
</if>
<if test="param.carrierTimeStart != null ">
and ltcl.arrive_time &gt;= #{param.carrierTimeStart}
and ltcl.carrier_time &gt;= #{param.carrierTimeStart}
</if>
<if test="param.carrierTimeEnd != null ">
and ltcl.arrive_time &lt;= #{param.carrierTimeEnd}
and ltcl.carrier_time &lt;= #{param.carrierTimeEnd}
</if>
<if test="param.signTimeStart != null ">
and ltcl.arrive_time &gt;= #{param.signTimeStart}
and ltcl.sign_time &gt;= #{param.signTimeStart}
</if>
<if test="param.signTimeEnd != null ">
and ltcl.arrive_time &lt;= #{param.signTimeEnd}
and ltcl.sign_time &lt;= #{param.signTimeEnd}
</if>
group by ltcl.id
order by ltcl.create_time desc

189
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

@ -2478,33 +2478,35 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
log.warn("#############updateWaybill: 运单已作废 waybillId={}", waybillId);
return R.fail(405, "运单已作废");
}
Integer checkStatus = waybillEntity.getCheckStatus();
if(checkStatus.equals(1)){
log.warn("#############updateWaybill: 运单已审核 waybillId={}", waybillId);
return R.fail(405, "运单已审核,不能改单");
}
Integer waybillType = waybillEntity.getWaybillType();
if(waybillType.equals(2)){
//零担改单限制
Long departureWarehouseId = waybillEntity.getDepartureWarehouseId();
Long destinationWarehouseId = waybillEntity.getDestinationWarehouseId();
Integer totalCount = waybillEntity.getTotalCount();
DistributionStockArticleEntity startStockArticleEntity = distributionStockArticleClient.findZeroByOrderCodeAndWarehouseId(waybillNo, departureWarehouseId);
if(Objects.isNull(startStockArticleEntity)){
log.warn("#############updateWaybill: 订单信息不存在 waybillId={}", waybillId);
return R.fail(405, "订单信息不存在");
}
Integer handQuantity = startStockArticleEntity.getHandQuantity();
if(NumberUtil.equals(handQuantity,0)){
DistributionStockArticleEntity endStockArticleEntity = distributionStockArticleClient.findZeroByOrderCodeAndWarehouseId(waybillNo, destinationWarehouseId);
if(Objects.isNull(endStockArticleEntity)){
DistributionStockArticleEntity endStockArticleEntity = distributionStockArticleClient.findZeroByOrderCodeAndWarehouseId(waybillNo, destinationWarehouseId);
if(Objects.isNull(endStockArticleEntity)){
DistributionStockArticleEntity startStockArticleEntity = distributionStockArticleClient.findZeroByOrderCodeAndWarehouseId(waybillNo, departureWarehouseId);
if(Objects.isNull(startStockArticleEntity)){
log.warn("#############updateWaybill: 订单信息不存在! waybillId={}", waybillId);
return R.fail(405, "订单信息不存在!");
}
handQuantity = endStockArticleEntity.getHandQuantity();
Integer handQuantity = startStockArticleEntity.getHandQuantity();
if(!NumberUtil.equals(handQuantity,totalCount)){
log.warn("#############updateWaybill: 目的仓数据还未完全到达 waybillId={}", waybillId);
return R.fail(405, "目的仓数据还未完全到达");
log.warn("#############updateWaybill: 始发仓数据已发运 waybillId={}", waybillId);
return R.fail(405, "始发仓数据已发运");
}
}else{
Integer handQuantity = endStockArticleEntity.getHandQuantity();
if(!NumberUtil.equals(handQuantity,totalCount)){
log.warn("#############updateWaybill: 始发仓数据已发运 waybillId={}", waybillId);
return R.fail(405, "始发仓数据已发运");
log.warn("#############updateWaybill: 目的仓数据还未完全到达 waybillId={}", waybillId);
return R.fail(405, "目的仓数据还未完全到达");
}
}
}
@ -2637,10 +2639,22 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
}
}else if(waybillType == 2){
List<WaybillDetailDTO> addList = openOrderDTO.getAddList();
//把addList中updateType=1的放入一个新的List
List<WaybillDetailDTO> addNewList = addList.stream().filter(waybillDetailDTO -> waybillDetailDTO.getUpdateType() == 1).collect(Collectors.toList());
List<DistributionStockArticleEntity> orderList = distributionStockArticleClient.findListByWaybillNumber(waybillNo);
orderList.forEach(stockArticleEntity -> {
stockArticleEntity.setMallId(consigneeId);
stockArticleEntity.setDescriptionGoods(waybillEntity.getGoodsName());
stockArticleEntity.setTotalNumber(totalCount);
Integer handQuantity = stockArticleEntity.getHandQuantity();
if(handQuantity != 0){
stockArticleEntity.setHandQuantity(totalCount);
}
if(!Objects.isNull(basicdataClientEntity)){
stockArticleEntity.setMallCode(basicdataClientEntity.getClientCode());
}else{
@ -2663,18 +2677,53 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
}
});
List<WaybillDetailDTO> removeList = openOrderDTO.getRemoveList();
List<Long> updateNumberIds = new ArrayList<>();
//把addList中updateType=2的元素的id放入一个新的List
List<WaybillDetailDTO> updateList = addList.stream().filter(waybillDetailDTO -> waybillDetailDTO.getUpdateType() == 2).collect(Collectors.toList());
//把updateList转化成以id为key的Map
Map<Long, WaybillDetailDTO> updateMap = updateList.stream().collect(Collectors.toMap(WaybillDetailDTO::getId, Function.identity()));
List<Long> deleteParcelListIds = new ArrayList<>();
List<Long> removeIds = new ArrayList<>();
if(CollUtil.isNotEmpty(removeList)){
//把removeList中所有id放入一个List
List<Long> list = removeList.stream().map(WaybillDetailDTO::getId).collect(Collectors.toList());
removeIds.addAll(list);
}
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListClient.findByWaybillNumber(waybillNo);
parcelListEntityList.forEach(parcelListEntity -> {
Long nowWarehouseId = parcelListEntity.getWarehouseId();
parcelListEntity.setSendWarehouseId(departureWarehouseId);
parcelListEntity.setSendWarehouseName(departureWarehouseName);
parcelListEntity.setAcceptWarehouseId(destinationWarehouseId);
parcelListEntity.setAcceptWarehouseName(destinationWarehouseName);
if(nowWarehouseId.equals(destinationWarehouseId)){
parcelListEntity.setIsTransfer(0);
Long advanceId = parcelListEntity.getAdvanceId();
Long id = parcelListEntity.getId();
if(removeIds.contains(advanceId)){
deleteParcelListIds.add(id);
}else{
parcelListEntity.setIsTransfer(1);
WaybillDetailDTO waybillDetailDTO = updateMap.get(advanceId);
if(!Objects.isNull(waybillDetailDTO)){
parcelListEntity.setFirsts(waybillDetailDTO.getGoodsName());
Integer quantity = parcelListEntity.getQuantity();
if(quantity != 0){
parcelListEntity.setQuantity(waybillDetailDTO.getNum());
}
updateNumberIds.add(id);
}
parcelListEntity.setSendWarehouseId(departureWarehouseId);
parcelListEntity.setSendWarehouseName(departureWarehouseName);
parcelListEntity.setAcceptWarehouseId(destinationWarehouseId);
parcelListEntity.setAcceptWarehouseName(destinationWarehouseName);
if(nowWarehouseId.equals(destinationWarehouseId)){
parcelListEntity.setIsTransfer(0);
}else{
parcelListEntity.setIsTransfer(1);
}
}
});
@ -2685,6 +2734,80 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
distributionParcelListClient.updateList(parcelListEntityList);
}
List<DistributionParcelNumberEntity> addNewNumberList = new ArrayList<>();
orderList.forEach(stockArticleEntity -> {
Integer handQuantity = stockArticleEntity.getHandQuantity();
addNewList.forEach(waybillDetailDTO->{
DistributionParcelListEntity entity = new DistributionParcelListEntity();
entity.setBrandName(stockArticleEntity.getBrand());
entity.setDealerName(stockArticleEntity.getConsigneeUnit());
entity.setFirsts(waybillDetailDTO.getGoodsName());
Long warehouseId1 = stockArticleEntity.getWarehouseId();
entity.setWarehouseId(warehouseId1);
entity.setWarehouse(stockArticleEntity.getWarehouse());
if(handQuantity != 0){
entity.setQuantity(waybillDetailDTO.getNum());
}else{
entity.setQuantity(0);
}
entity.setConditions(3);
entity.setStockArticleId(stockArticleEntity.getId());
entity.setOrderCode(stockArticleEntity.getOrderCode());
entity.setOrderPackageStatus("20");
entity.setOrderPackageFreezeStatus("10");
entity.setOrderPackageGroundingStatus("10");
entity.setOrderPackageStockupStatus("10");
entity.setOrderPackageReservationStatus("10");
entity.setOrderPackageLoadingStatus("10");
entity.setWaybillId(waybillId);
entity.setWaybillNumber(waybillNo);
entity.setIsZero("1");
entity.setAdvanceId(waybillDetailDTO.getId());
entity.setWarehouseEntryTimeEnd(new Date());
entity.setSendWarehouseId(departureWarehouseId);
entity.setSendWarehouseName(departureWarehouseName);
entity.setAcceptWarehouseId(destinationWarehouseId);
entity.setAcceptWarehouseName(destinationWarehouseName);
if (departureWarehouseId.equals(destinationWarehouseId)) {
entity.setIsTransfer(0);
} else {
entity.setIsTransfer(1);
}
Long aLong = distributionParcelListClient.addReturnId(entity);
DistributionParcelNumberEntity parcelNumberEntity = new DistributionParcelNumberEntity();
parcelNumberEntity.setStockArticleId(entity.getStockArticleId());
parcelNumberEntity.setWarehouseId(entity.getWarehouseId());
parcelNumberEntity.setParcelListId(aLong);
parcelNumberEntity.setHandQuantity(entity.getQuantity());
parcelNumberEntity.setQuantity(entity.getQuantity());
parcelNumberEntity.setDeliveryQuantity(0);
parcelNumberEntity.setSigninQuantity(0);
parcelNumberEntity.setOutboundQuantity(0);
addNewNumberList.add(parcelNumberEntity);
});
});
if(CollUtil.isNotEmpty(addNewNumberList)){
distributionParcelNumberClient.addBatch(addNewNumberList);
}
if(CollUtil.isNotEmpty(deleteParcelListIds)){
distributionParcelListClient.deleteListByParcelListIds(deleteParcelListIds);
}
if(CollUtil.isNotEmpty(updateNumberIds)){
distributionParcelNumberClient.updateListByPracelListIds(updateNumberIds);
}
}
trunklineWaybillPackageService.updateWaybillStatus(waybillEntity);
@ -4842,10 +4965,14 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
if (StringUtil.isNotBlank(removeMsg)) {
stringBuilder.append("明细移除:").append(removeMsg).append(";");
}
Integer totalNum = 0;
Set<String> goodsList = new HashSet<>();
List<WaybillDetailDTO> addList = openOrderDTO.getAddList();
for (WaybillDetailDTO waybillDetailDTO : addList) {
Integer num1 = waybillDetailDTO.getNum();
String goodsName = waybillDetailDTO.getGoodsName();
goodsList.add(goodsName);
totalNum = totalNum + num1;
Integer updateType = waybillDetailDTO.getUpdateType();
if (1 == updateType) {
@ -4867,7 +4994,9 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
warehouseWayBillDetail.setSystemDeliveryChargeType(waybillDetailDTO.getSystemDeliveryChargeType());
warehouseWayBillDetail.setSystemPickupChargeType(waybillDetailDTO.getSystemPickupChargeType());
warehouseWayBillDetail.setSystemWarehouseChargeType(waybillDetailDTO.getSystemWarehouseChargeType());
warehouseWaybillDetailClient.addEntity(warehouseWayBillDetail);
Long waybillDetailId = warehouseWaybillDetailClient.addEntityReturnId(warehouseWayBillDetail);
waybillDetailDTO.setId(waybillDetailId);
stringBuilder.append("明细新增:").append(warehouseWayBillDetail.getProductName()).append(" 数量 ").append(waybillDetailDTO.getNum()).append(" 单价 ").append(waybillDetailDTO.getPrice()).append(";");
} else if (2 == updateType) {
@ -4944,12 +5073,14 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
warehouseWaybillDetailClient.updateEntityById(warehouseWayBillDetail);
}
}
waybillEntity.setGoodsName(String.join(",",goodsList));
Integer newTotalCount = openOrderDTO.getTotalCount();
Integer totalCount = waybillEntity.getTotalCount();
if (!ObjectUtil.equals(totalCount,newTotalCount)) {
stringBuilder.append("货物总数:").append(totalCount).append("-->").append(newTotalCount).append(";");
waybillEntity.setTotalCount(newTotalCount);
if (!ObjectUtil.equals(totalCount,totalNum)) {
stringBuilder.append("货物总数:").append(totalCount).append("-->").append(totalNum).append(";");
waybillEntity.setTotalCount(totalNum);
waybillEntity.setStockCount(totalNum);
}
BigDecimal newTotalFreight = openOrderDTO.getTotalFreight();
@ -5210,7 +5341,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
entity.setWarehouse(distributionStockArticleEntity.getWarehouse());
entity.setQuantity(warehouseWayBillDetail.getNum());
entity.setTrainNumber(warehouseWaybill.getCustomerTrain());
entity.setConditions(1);
entity.setConditions(3);
entity.setStockArticleId(orderId);
entity.setOrderCode(distributionStockArticleEntity.getOrderCode());
entity.setOrderPackageStatus("20");

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -2997,7 +2997,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
loadCarsDTO.setArriveTimeStart(CommonUtil.getStartByDateStr(loadCarsDTO.getArriveTimeStartStr()));
loadCarsDTO.setArriveTimeEnd(CommonUtil.getEndByDateStr(loadCarsDTO.getArriveTimeEndStr()));
//承运时间
loadCarsDTO.setCarrierTimeStart(CommonUtil.getStartByDateStr(loadCarsDTO.getCarrierTimeStartStr()));
loadCarsDTO.setCarrierTimeEnd(CommonUtil.getEndByDateStr(loadCarsDTO.getCarrierTimeEndStr()));
@ -5533,7 +5533,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
if(CollUtil.isNotEmpty(carsLoadScanIdList)){
List<TrunklineScanZeroDetailVO> zeroDetailVOList = scanZeroDetailService.findListByCarsLoadScanIds(carsLoadScanIdList);
//把zeroDetailVOList所有元素通过id分组
Map<Long, List<TrunklineScanZeroDetailVO>> zeroDetailVOMap = zeroDetailVOList.stream().collect(Collectors.groupingBy(TrunklineScanZeroDetailVO::getId));
Map<Long, List<TrunklineScanZeroDetailVO>> zeroDetailVOMap = zeroDetailVOList.stream().collect(Collectors.groupingBy(TrunklineScanZeroDetailVO::getScanId));
for (UnloadZeroDTO unloadZeroDTO : unloadZeroList) {
Long carsLoadScanId = unloadZeroDTO.getCarsLoadScanId();

6
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseWaybillDetailClient.java

@ -53,6 +53,12 @@ public class WarehouseWaybillDetailClient implements IWarehouseWaybillDetailClie
warehouseWayBillDetailService.save(warehouseWayBillDetail);
}
@Override
public Long addEntityReturnId(WarehouseWayBillDetail warehouseWayBillDetail) {
warehouseWayBillDetailService.save(warehouseWayBillDetail);
return warehouseWayBillDetail.getId();
}
@Override
public List<WarehouseWayBillDetail> findByWaybillIds(List<Long> waybillIds) {
return warehouseWayBillDetailService.findByWaybillIds(waybillIds);

Loading…
Cancel
Save