Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dist.1.3.0
pref_mail@163.com 9 months ago
parent
commit
0f5a80658f
  1. 7
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataPriceClient.java
  2. 50
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceDispatchAddClientVO.java
  3. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingWaybillVO.java
  4. 8
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataPriceClient.java
  5. 14
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataVehicleClient.java
  6. 12
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataPriceService.java
  7. 159
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java
  8. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java
  9. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java
  10. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  11. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java
  12. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  13. 32
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  14. 56
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  15. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  16. 133
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  17. 1
      blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/java/com/logpm/factorydata/linsy/service/impl/DeliveryNoteServiceImpl.java
  18. 24
      blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/enums/FactoryNodeEnums.java
  19. 28
      blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/enums/NodeMappingEnums.java
  20. 5
      blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/enums/NodeNeedEnums.java
  21. 15
      blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/enums/FactoryNodeEnums.java
  22. 10
      blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/enums/NodeMappingEnums.java
  23. 13
      blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/enums/NodeNeedEnums.java
  24. 2
      blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/mq/FactoryOrderListener.java
  25. 6
      blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/mq/NodeDataPushListener.java
  26. 1
      blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/enums/NodeNeedEnums.java
  27. 6
      blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/enums/ZbomNodeMappingEnums.java
  28. 2
      blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java
  29. 6
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java
  30. 12
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.xml
  31. 47
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  32. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

7
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataPriceClient.java

@ -18,11 +18,14 @@ package com.logpm.basicdata.feign;
import com.logpm.basicdata.vo.BasicdatPriceApiVO; import com.logpm.basicdata.vo.BasicdatPriceApiVO;
import com.logpm.basicdata.vo.PriceClientVO; import com.logpm.basicdata.vo.PriceClientVO;
import com.logpm.basicdata.vo.PriceDispatchAddClientVO;
import org.springblade.common.constant.ModuleNameConstant; import org.springblade.common.constant.ModuleNameConstant;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
/** /**
* 基础价格体系 Feign接口类 * 基础价格体系 Feign接口类
* *
@ -36,8 +39,12 @@ public interface IBasicdataPriceClient {
String API_PREFIX = "/basicdataPrice/client"; String API_PREFIX = "/basicdataPrice/client";
String PRICE = API_PREFIX + "/pirce"; String PRICE = API_PREFIX + "/pirce";
String DISPATCH_ADD_PRICE = API_PREFIX + "/dispatchAddPrice";
@PostMapping(PRICE) @PostMapping(PRICE)
PriceClientVO price(@RequestBody BasicdatPriceApiVO param); PriceClientVO price(@RequestBody BasicdatPriceApiVO param);
@PostMapping(DISPATCH_ADD_PRICE)
List<PriceDispatchAddClientVO> dispatchAddPrice(@RequestBody BasicdatPriceApiVO param);
} }

50
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/PriceDispatchAddClientVO.java

@ -0,0 +1,50 @@
/*
* 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.basicdata.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import java.io.Serializable;
/**
* 基础价格按品类计费 视图实体类
*
* @author zqb
* @since 2024-04-02
*/
@Builder
@Data
public class PriceDispatchAddClientVO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "品类id")
private Long categoryId;
@ApiModelProperty(value = "分货费")
private Double sortPrice;
@ApiModelProperty(value = "装卸费")
private Double handlingPrice;
@ApiModelProperty(value = "平移费")
private Double relocationPrice;
@ApiModelProperty(value = "上楼费")
private Double upstairsDeliveryPrice;
@ApiModelProperty(value = "配送-上楼费免费楼层")
private Integer dispatchStairsCarryingCharge;
}

1
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingWaybillVO.java

@ -33,5 +33,6 @@ public class TrunklineBillladingWaybillVO extends TrunklineBillladingWaybillEnti
private Long billladingWaybillId; private Long billladingWaybillId;
private Integer totalPlanNum; private Integer totalPlanNum;
private Integer scanNum;
} }

8
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataPriceClient.java

@ -19,10 +19,13 @@ package com.logpm.basicdata.feign;
import com.logpm.basicdata.service.IBasicdataPriceService; import com.logpm.basicdata.service.IBasicdataPriceService;
import com.logpm.basicdata.vo.BasicdatPriceApiVO; import com.logpm.basicdata.vo.BasicdatPriceApiVO;
import com.logpm.basicdata.vo.PriceClientVO; import com.logpm.basicdata.vo.PriceClientVO;
import com.logpm.basicdata.vo.PriceDispatchAddClientVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore; import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
/** /**
* 基础价格 Feign实现类 * 基础价格 Feign实现类
* *
@ -41,4 +44,9 @@ public class BasicdataPriceClient implements IBasicdataPriceClient {
return basicdataPriceService.price(param); return basicdataPriceService.price(param);
} }
@Override
public List<PriceDispatchAddClientVO> dispatchAddPrice(BasicdatPriceApiVO param) {
return basicdataPriceService.dispatchAddPrice(param);
}
} }

14
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataVehicleClient.java

@ -63,6 +63,20 @@ public class BasicdataVehicleClient implements IBasicdataVehicleClient {
public List<JSONObject> findCarListByName(String carNumber) { public List<JSONObject> findCarListByName(String carNumber) {
List<BasicdataVehicleEntity> ls = basicdataVehicleService.findCarListByName(carNumber); List<BasicdataVehicleEntity> ls = basicdataVehicleService.findCarListByName(carNumber);
List<JSONObject> list = new ArrayList<>(); List<JSONObject> list = new ArrayList<>();
ls.forEach(vehicleEntity -> {
JSONObject jsonObject = new JSONObject();
jsonObject.put("carId",vehicleEntity.getId());
jsonObject.put("carNumber",vehicleEntity.getVehicleNub());
String vehicleSource = vehicleEntity.getVehicleSource();
if("3".equals(vehicleSource)){
jsonObject.put("isOut",1);
}else{
jsonObject.put("isOut",0);
}
list.add(jsonObject);
});
for (BasicdataVehicleEntity vehicleEntity:ls){ for (BasicdataVehicleEntity vehicleEntity:ls){
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("carId",vehicleEntity.getId()); jsonObject.put("carId",vehicleEntity.getId());

12
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataPriceService.java

@ -16,19 +16,17 @@
*/ */
package com.logpm.basicdata.service; package com.logpm.basicdata.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.entity.BasicdataPriceEntity; import com.logpm.basicdata.entity.BasicdataPriceEntity;
import com.logpm.basicdata.excel.BasicdataPriceExcel;
import com.logpm.basicdata.vo.BasicdatPriceApiVO; import com.logpm.basicdata.vo.BasicdatPriceApiVO;
import com.logpm.basicdata.vo.BasicdataPriceBasicUpdateVO; import com.logpm.basicdata.vo.BasicdataPriceBasicUpdateVO;
import com.logpm.basicdata.vo.BasicdataPricePageVO; import com.logpm.basicdata.vo.BasicdataPricePageVO;
import com.logpm.basicdata.vo.PriceClientVO; import com.logpm.basicdata.vo.PriceClientVO;
import com.logpm.basicdata.vo.PriceDispatchAddClientVO;
import com.logpm.basicdata.vo.PriceVO; import com.logpm.basicdata.vo.PriceVO;
import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.base.BaseService;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import java.io.InputStream;
import java.util.List; import java.util.List;
/** /**
@ -80,4 +78,12 @@ public interface IBasicdataPriceService extends BaseService<BasicdataPriceEntity
* @return * @return
*/ */
Boolean deletePrice(String id); Boolean deletePrice(String id);
/**
* 根据客户品牌获取配送附加费
* @param param
* @Return com.logpm.basicdata.vo.PriceDispatchAddClientVO
* @Author zqb 2024/7/3
**/
List<PriceDispatchAddClientVO> dispatchAddPrice(BasicdatPriceApiVO param);
} }

159
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java

@ -80,6 +80,7 @@ import com.logpm.basicdata.vo.BasicdataPriceImportVO;
import com.logpm.basicdata.vo.BasicdataPricePageVO; import com.logpm.basicdata.vo.BasicdataPricePageVO;
import com.logpm.basicdata.vo.PriceBasicVO; import com.logpm.basicdata.vo.PriceBasicVO;
import com.logpm.basicdata.vo.PriceClientVO; import com.logpm.basicdata.vo.PriceClientVO;
import com.logpm.basicdata.vo.PriceDispatchAddClientVO;
import com.logpm.basicdata.vo.PriceDispatchAdditionalVO; import com.logpm.basicdata.vo.PriceDispatchAdditionalVO;
import com.logpm.basicdata.vo.PriceDispatchBasicVO; import com.logpm.basicdata.vo.PriceDispatchBasicVO;
import com.logpm.basicdata.vo.PriceDispatchVO; import com.logpm.basicdata.vo.PriceDispatchVO;
@ -92,6 +93,7 @@ import com.logpm.basicdata.vo.PriceWarehouseBasicVO;
import com.logpm.basicdata.vo.PriceWarehouseVO; import com.logpm.basicdata.vo.PriceWarehouseVO;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.Nullable;
import org.springblade.common.enums.BooleanZeroOneEnums; import org.springblade.common.enums.BooleanZeroOneEnums;
import org.springblade.common.model.IDict; import org.springblade.common.model.IDict;
import org.springblade.core.log.exception.ServiceException; import org.springblade.core.log.exception.ServiceException;
@ -228,6 +230,40 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
} }
} }
@Override
public List<PriceDispatchAddClientVO> dispatchAddPrice(BasicdatPriceApiVO param) {
BasicdataPriceEntity priceEntity = getBasicdataPriceEntityByParam(param);
if (ObjectUtil.isEmpty(priceEntity)) {
return null;
}
BasicdataPriceTemplateEntity templateEntity = getBasicdataPriceTemplateEntityByPrice(priceEntity);
if (ObjectUtil.isEmpty(templateEntity)) {
return null;
}
Map<Integer, List<BasicdataPriceCategoryDispatchEntity>> dispatchMap = new HashMap<>();
initDispatchMap(priceEntity, dispatchMap);
String serviceType = templateEntity.getServiceType();
// 配送费
if (StrUtil.contains(serviceType, ServiceTypeEnums.DISPATCH.getCode().toString())) {
Integer dispatchIsAddFee = templateEntity.getDispatchIsAddFee();
if (ObjectUtil.equals(dispatchIsAddFee, BooleanZeroOneEnums.YES.getCode())) {
List<PriceDispatchAdditionalVO> priceDispatchAdditionalVOS = buildDispatchAddFee(dispatchMap);
List<PriceDispatchAddClientVO> res = new ArrayList<>();
for (PriceDispatchAdditionalVO priceDispatchAdditionalVO : priceDispatchAdditionalVOS) {
res.add(PriceDispatchAddClientVO.builder()
.categoryId(priceDispatchAdditionalVO.getCategoryId())
.sortPrice(priceDispatchAdditionalVO.getSortPrice())
.handlingPrice(priceDispatchAdditionalVO.getHandlingPrice())
.relocationPrice(priceDispatchAdditionalVO.getRelocationPrice())
.upstairsDeliveryPrice(priceDispatchAdditionalVO.getUpstairsDeliveryPrice())
.dispatchStairsCarryingCharge(priceEntity.getDispatchStairsCarryingCharge()).build());
}
return res;
}
}
return null;
}
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Boolean basicUpdate(BasicdataPriceBasicUpdateVO vo) { public Boolean basicUpdate(BasicdataPriceBasicUpdateVO vo) {
@ -411,38 +447,12 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
@Override @Override
public PriceClientVO price(BasicdatPriceApiVO param) { public PriceClientVO price(BasicdatPriceApiVO param) {
PriceClientVO priceClientVO = new PriceClientVO(); PriceClientVO priceClientVO = new PriceClientVO();
// 根据客户信息查找价格 BasicdataPriceEntity priceEntity = getBasicdataPriceEntityByParam(param);
String clientId = param.getClientId();
String brandId = param.getBrandId();
if (!ObjectUtil.isAllNotEmpty(clientId, brandId)) {
return null;
}
BasicdataPriceEntity priceEntity = null;
LambdaQueryWrapper<BasicdataPriceEntity> wrapper = Wrappers.<BasicdataPriceEntity>lambdaQuery()
.eq(BasicdataPriceEntity::getClientId, clientId)
.eq(BasicdataPriceEntity::getBrandId, brandId);
if (StrUtil.isNotEmpty(param.getTime())) {
wrapper.ge(BasicdataPriceEntity::getExpiryTime, DateUtil.parse(param.getTime(), "yyyy-MM-dd"))
.le(BasicdataPriceEntity::getEffectiveTime, DateUtil.parse(param.getTime(), "yyyy-MM-dd"))
;
} else {
wrapper.ge(BasicdataPriceEntity::getExpiryTime, DateUtil.beginOfDay(new Date()))
.le(BasicdataPriceEntity::getEffectiveTime, DateUtil.beginOfDay(new Date()))
;
}
List<BasicdataPriceEntity> priceEntities = this.list(wrapper);
if (CollUtil.isNotEmpty(priceEntities)) {
priceEntity = priceEntities.get(0);
}
if (ObjectUtil.isEmpty(priceEntity)) { if (ObjectUtil.isEmpty(priceEntity)) {
return priceClientVO; return priceClientVO;
} }
// 根据价格获取模板 // 根据价格获取模板
Long templateId = priceEntity.getTemplateId(); BasicdataPriceTemplateEntity templateEntity = getBasicdataPriceTemplateEntityByPrice(priceEntity);
BasicdataPriceTemplateEntity templateEntity = null;
if (ObjectUtil.isNotEmpty(templateId)) {
templateEntity = templateService.getById(templateId);
}
if (ObjectUtil.isEmpty(templateEntity)) { if (ObjectUtil.isEmpty(templateEntity)) {
return priceClientVO; return priceClientVO;
} }
@ -523,6 +533,42 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
return priceClientVO; return priceClientVO;
} }
private @Nullable BasicdataPriceTemplateEntity getBasicdataPriceTemplateEntityByPrice(BasicdataPriceEntity priceEntity) {
Long templateId = priceEntity.getTemplateId();
BasicdataPriceTemplateEntity templateEntity = null;
if (ObjectUtil.isNotEmpty(templateId)) {
templateEntity = templateService.getById(templateId);
}
return templateEntity;
}
private @Nullable BasicdataPriceEntity getBasicdataPriceEntityByParam(BasicdatPriceApiVO param) {
// 根据客户信息查找价格
String clientId = param.getClientId();
String brandId = param.getBrandId();
if (!ObjectUtil.isAllNotEmpty(clientId, brandId)) {
return null;
}
BasicdataPriceEntity priceEntity = null;
LambdaQueryWrapper<BasicdataPriceEntity> wrapper = Wrappers.<BasicdataPriceEntity>lambdaQuery()
.eq(BasicdataPriceEntity::getClientId, clientId)
.eq(BasicdataPriceEntity::getBrandId, brandId);
if (StrUtil.isNotEmpty(param.getTime())) {
wrapper.ge(BasicdataPriceEntity::getExpiryTime, DateUtil.parse(param.getTime(), "yyyy-MM-dd"))
.le(BasicdataPriceEntity::getEffectiveTime, DateUtil.parse(param.getTime(), "yyyy-MM-dd"))
;
} else {
wrapper.ge(BasicdataPriceEntity::getExpiryTime, DateUtil.beginOfDay(new Date()))
.le(BasicdataPriceEntity::getEffectiveTime, DateUtil.beginOfDay(new Date()))
;
}
List<BasicdataPriceEntity> priceEntities = this.list(wrapper);
if (CollUtil.isNotEmpty(priceEntities)) {
priceEntity = priceEntities.get(0);
}
return priceEntity;
}
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public String upload(MultipartFile file) { public String upload(MultipartFile file) {
@ -3534,20 +3580,7 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
}); });
} }
List<BasicdataPriceCategoryDispatchEntity> dispatchList = categoryDispatchService.list(Wrappers.<BasicdataPriceCategoryDispatchEntity>lambdaQuery() initDispatchMap(priceEntity, dispatchMap);
.eq(BasicdataPriceCategoryDispatchEntity::getBoId, priceEntity.getId()));
if (CollUtil.isNotEmpty(dispatchList)) {
// 按类型分组放到dispatchMap中
dispatchList.forEach(item -> {
Integer type = item.getCostType();
List<BasicdataPriceCategoryDispatchEntity> collect = dispatchMap.get(type);
if (ObjectUtil.isEmpty(collect)) {
collect = new ArrayList<>();
}
collect.add(item);
dispatchMap.put(type, collect);
});
}
// 获取一般费用 // 获取一般费用
List<BasicdataPriceGeneralEntity> generalList = generalService.list(Wrappers.<BasicdataPriceGeneralEntity>lambdaQuery() List<BasicdataPriceGeneralEntity> generalList = generalService.list(Wrappers.<BasicdataPriceGeneralEntity>lambdaQuery()
@ -3566,6 +3599,23 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
} }
} }
private void initDispatchMap(BasicdataPriceEntity priceEntity, Map<Integer, List<BasicdataPriceCategoryDispatchEntity>> dispatchMap) {
List<BasicdataPriceCategoryDispatchEntity> dispatchList = categoryDispatchService.list(Wrappers.<BasicdataPriceCategoryDispatchEntity>lambdaQuery()
.eq(BasicdataPriceCategoryDispatchEntity::getBoId, priceEntity.getId()));
if (CollUtil.isNotEmpty(dispatchList)) {
// 按类型分组放到dispatchMap中
dispatchList.forEach(item -> {
Integer type = item.getCostType();
List<BasicdataPriceCategoryDispatchEntity> collect = dispatchMap.get(type);
if (ObjectUtil.isEmpty(collect)) {
collect = new ArrayList<>();
}
collect.add(item);
dispatchMap.put(type, collect);
});
}
}
private PriceDispatchVO initDispatch(BasicdataPriceEntity priceEntity, BasicdataPriceTemplateEntity templateEntity, List<BasicdataPriceFullVehicleEntity> fullVehicleEntities, Map<Integer, List<BasicdataPriceCategoryDispatchEntity>> dispatchMap, List<BasicdataPriceGeneralEntity> generalEntities, List<BasicdataPriceGeneralEntity> generalEntities1) { private PriceDispatchVO initDispatch(BasicdataPriceEntity priceEntity, BasicdataPriceTemplateEntity templateEntity, List<BasicdataPriceFullVehicleEntity> fullVehicleEntities, Map<Integer, List<BasicdataPriceCategoryDispatchEntity>> dispatchMap, List<BasicdataPriceGeneralEntity> generalEntities, List<BasicdataPriceGeneralEntity> generalEntities1) {
PriceDispatchVO priceDispatchVO = new PriceDispatchVO(); PriceDispatchVO priceDispatchVO = new PriceDispatchVO();
String dispatchPricingType = templateEntity.getDispatchPricingType(); String dispatchPricingType = templateEntity.getDispatchPricingType();
@ -3678,16 +3728,7 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
} }
// 附加费 // 附加费
List<BasicdataPriceCategoryDispatchEntity> dispatchEntities1 = dispatchMap.get(CostTypeEnums.ADD.getCode()); priceDispatchVO.setAdditionalCategory(buildDispatchAddFee(dispatchMap));
if (CollUtil.isNotEmpty(dispatchEntities1)) {
List<PriceDispatchAdditionalVO> basicVOList = new ArrayList<>();
dispatchEntities1.forEach(item -> {
PriceDispatchAdditionalVO basicVO = new PriceDispatchAdditionalVO();
BeanUtil.copyProperties(item, basicVO);
basicVOList.add(basicVO);
});
priceDispatchVO.setAdditionalCategory(basicVOList);
}
// 一般费用 generalEntities // 一般费用 generalEntities
if (CollUtil.isNotEmpty(generalEntities)) { if (CollUtil.isNotEmpty(generalEntities)) {
BasicdataPriceGeneralEntity generalEntity = generalEntities.get(0); BasicdataPriceGeneralEntity generalEntity = generalEntities.get(0);
@ -3712,6 +3753,20 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
return priceDispatchVO; return priceDispatchVO;
} }
private static List<PriceDispatchAdditionalVO> buildDispatchAddFee(Map<Integer, List<BasicdataPriceCategoryDispatchEntity>> dispatchMap) {
List<BasicdataPriceCategoryDispatchEntity> dispatchEntities1 = dispatchMap.get(CostTypeEnums.ADD.getCode());
if (CollUtil.isNotEmpty(dispatchEntities1)) {
List<PriceDispatchAdditionalVO> basicVOList = new ArrayList<>();
dispatchEntities1.forEach(item -> {
PriceDispatchAdditionalVO basicVO = new PriceDispatchAdditionalVO();
BeanUtil.copyProperties(item, basicVO);
basicVOList.add(basicVO);
});
return basicVOList;
}
return null;
}
private PriceWarehouseVO initWarehouse(BasicdataPriceEntity priceEntity, BasicdataPriceTemplateEntity templateEntity, Map<Integer, List<BasicdataPriceCategoryWarehouseEntity>> warehouseMap) { private PriceWarehouseVO initWarehouse(BasicdataPriceEntity priceEntity, BasicdataPriceTemplateEntity templateEntity, Map<Integer, List<BasicdataPriceCategoryWarehouseEntity>> warehouseMap) {
PriceWarehouseVO priceWarehouseVO = new PriceWarehouseVO(); PriceWarehouseVO priceWarehouseVO = new PriceWarehouseVO();
Integer warehousePricingType = templateEntity.getWarehousePricingType(); Integer warehousePricingType = templateEntity.getWarehousePricingType();

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java

@ -596,8 +596,14 @@ public class DistributionStockArticleController extends BladeController {
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "已签收订单", notes = "传入distributionStockArticle") @ApiOperation(value = "已签收订单", notes = "传入distributionStockArticle")
public R<IPage<DistributionSignforStockArticleVO>> signforList(@ApiIgnore @RequestParam Map<String, Object> distributionStockArticle, Query query) { public R<IPage<DistributionSignforStockArticleVO>> signforList(@ApiIgnore @RequestParam Map<String, Object> distributionStockArticle, Query query) {
IPage<DistributionSignforStockArticleVO> pages = distributionStockArticleService.pageSignforListtOwe(Condition.getPage(query), distributionStockArticle); try {
return R.data(pages); IPage<DistributionSignforStockArticleVO> pages = distributionStockArticleService.pageSignforListtOwe(Condition.getPage(query), distributionStockArticle);
return R.data(pages);
}catch (Exception e){
log.error("已签订单错误e:{}",e);
}
return R.data(null);
} }

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java

@ -16,11 +16,9 @@
*/ */
package com.logpm.distribution.mapper; package com.logpm.distribution.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.DistributionDeliveryInfoDTO;
import com.logpm.distribution.dto.DistributionDeliveryListDTO; import com.logpm.distribution.dto.DistributionDeliveryListDTO;
import com.logpm.distribution.dto.DistributionLoadingNumDTO; import com.logpm.distribution.dto.DistributionLoadingNumDTO;
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO; import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
@ -496,8 +494,9 @@ public interface DistributionDeliveryListMapper extends BaseMapper<DistributionD
/** /**
* 检查配送任务是否进行发车 * 检查配送任务是否进行发车
* @param deliveryListEntityId
* @return * @return
*/ */
Boolean checkDeliveryStart(@Param("deliveryId")Long deliveryId); Boolean checkDeliveryStart(@Param("deliveryId")Long deliveryId);
} }

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

@ -1260,10 +1260,6 @@
and ldsa.order_status in ('70','80') and ldsa.order_status in ('70','80')
<if test="collect != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(collect)"> <if test="collect != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(collect)">
and ldsa.warehouse_id in
<foreach collection="collect" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
and ldl.warehouse_id in and ldl.warehouse_id in
<foreach collection="collect" item="item" open="(" close=")" separator=","> <foreach collection="collect" item="item" open="(" close=")" separator=",">
#{item} #{item}
@ -1386,6 +1382,10 @@
LEFT JOIN logpm_distrilbution_bill_lading AS ldbl ON ldbls.bill_lading_id = ldbl.id LEFT JOIN logpm_distrilbution_bill_lading AS ldbl ON ldbls.bill_lading_id = ldbl.id
<where> <where>
ldsa.order_status in ('70','80') ldsa.order_status in ('70','80')
and ldbls.warehouse_id in
<foreach collection="collect" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
<if test="param.waybillNumber != null and param.waybillNumber != ''"> <if test="param.waybillNumber != null and param.waybillNumber != ''">
AND ldsa.waybill_number like concat(#{param.waybillNumber},"%") AND ldsa.waybill_number like concat(#{param.waybillNumber},"%")
</if> </if>

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java

@ -21,7 +21,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.aftersales.vo.AftersalesAbnormalPackageVO; import com.logpm.aftersales.vo.AftersalesAbnormalPackageVO;
import com.logpm.distribution.bean.Resp; import com.logpm.distribution.bean.Resp;
import com.logpm.distribution.dto.DistributionDeliveryExcelDTO; import com.logpm.distribution.dto.DistributionDeliveryExcelDTO;
import com.logpm.distribution.dto.DistributionDeliveryInfoDTO;
import com.logpm.distribution.dto.DistributionDeliveryListDTO; import com.logpm.distribution.dto.DistributionDeliveryListDTO;
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO; import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO; import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO;
@ -257,7 +256,6 @@ public interface IDistributionDeliveryListService extends BaseService<Distributi
/** /**
* 查询托盘详情 * 查询托盘详情
* @param page
* @param distributionDeliveryList * @param distributionDeliveryList
* @return * @return
*/ */
@ -465,6 +463,8 @@ public interface IDistributionDeliveryListService extends BaseService<Distributi
/** /**
* 查询签收预约客户包件信息 * 查询签收预约客户包件信息
* @param reservationId * @param reservationId

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

@ -3038,7 +3038,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
order.setWaybill_no(distributionStockArticleEntity.getWaybillNumber()); order.setWaybill_no(distributionStockArticleEntity.getWaybillNumber());
order.setOrder_no(distributionStockArticleEntity.getOrderCode()); order.setOrder_no(distributionStockArticleEntity.getOrderCode());
order.setAll_num(distributionStockArticleEntity.getTotalNumber() + ""); order.setAll_num(distributionStockArticleEntity.getTotalNumber() + "");
order.setAll_num("0"); order.setEnd_num("0");
//查询签收数量 //查询签收数量
List<DistributionLoadscanEntity> loadscanEntityList = distributionLoadscanMapper.selectList(Wrappers.<DistributionLoadscanEntity>query().lambda() List<DistributionLoadscanEntity> loadscanEntityList = distributionLoadscanMapper.selectList(Wrappers.<DistributionLoadscanEntity>query().lambda()
.eq(DistributionLoadscanEntity::getReservationId, reservationEntity.getId()) .eq(DistributionLoadscanEntity::getReservationId, reservationEntity.getId())

32
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -676,6 +676,19 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
String collect = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(",")); String collect = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(","));
log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}", distributionDeliveryListEntity.getTrainNumber(), collect); log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}", distributionDeliveryListEntity.getTrainNumber(), collect);
return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常"); return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常");
}else {
//这里需要判定文员是否对该异常进行驳回操作
List<DistributionLoadscanAbnormalEntity> collect = abnormalEntities.stream().filter(f -> distributionDeliveryListEntity.getId().equals(f.getDeliveryListId()) && distrilbutionloadingscanDTO.getReservationId().equals(f.getReservationId())).collect(Collectors.toList());
if (!collect.isEmpty()) {
//存在异常操作
if (collect.size() == 1){
//判断是否进行审核以及驳货操作
DistributionLoadscanAbnormalEntity distributionLoadscanAbnormalEntity = collect.get(0);
if (distributionLoadscanAbnormalEntity.getAuditingStatus().equals(3)){
return Resp.scanFail("包件异常已驳回", "包件异常已驳回");
}
}
}
} }
} }
@ -5883,14 +5896,21 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
@Override @Override
public R retentionScan(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { public R retentionScan(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
if (distrilbutionloadingscanDTO.getBarcode().isEmpty()) {
log.error("参数缺失Barcode:{}",distrilbutionloadingscanDTO.getBarcode());
}
Integer retentionType = distrilbutionloadingscanDTO.getRetentionType(); Integer retentionType = distrilbutionloadingscanDTO.getRetentionType();
DistributionDeliveryListEntity deliveryListEntity = this.getById(distrilbutionloadingscanDTO.getDeliveryId()); DistributionDeliveryListEntity deliveryListEntity = this.getById(distrilbutionloadingscanDTO.getDeliveryId());
List<DistributionRetentionScanVo> retentionScanVos = new ArrayList<>(); List<DistributionRetentionScanVo> retentionScanVos = new ArrayList<>();
//查询包件
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)){
return Resp.scanFail("未授权!!!","未授权!!!");
}
switch (retentionType) { switch (retentionType) {
case 1: case 1:
//包件--库存品 和包件 //包件--库存品 和包件
List<DistributionLoadscanEntity> loadscanEntityList = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda() List<DistributionLoadscanEntity> loadscanEntityList = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda()
.eq(DistributionLoadscanEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId())
.eq(DistributionLoadscanEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode()) .eq(DistributionLoadscanEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode())
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()) .ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
); );
@ -5900,6 +5920,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//包件存在装车才能进行滞留 //包件存在装车才能进行滞留
//通过配送任务和包件确定预约信息 //通过配送任务和包件确定预约信息
DistributionLoadscanEntity distributionLoadscanEntity = loadscanEntityList.get(0); DistributionLoadscanEntity distributionLoadscanEntity = loadscanEntityList.get(0);
if (2 == distributionLoadscanEntity.getIsAbnormalLoading()){
//异常装车未进行审核
return Resp.scanFail("包件存在异常", "包件存在异常");
}
if (2 == distributionLoadscanEntity.getSignforState()) { if (2 == distributionLoadscanEntity.getSignforState()) {
log.info("滞留扫描失败,包件已签收>>>>>>>>>>>>>>>>>>>>>>>reservationId:{},packageCode:{}", distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getOrderPackageCode()); log.info("滞留扫描失败,包件已签收>>>>>>>>>>>>>>>>>>>>>>>reservationId:{},packageCode:{}", distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getOrderPackageCode());
return Resp.scanFail("包件已签收", "包件已签收"); return Resp.scanFail("包件已签收", "包件已签收");
@ -5909,7 +5933,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
} }
} else { } else {
List<DistributionLoadscaninvnEntity> loadscaninvnEntityList = distributionLoadscaninvnService.list(Wrappers.<DistributionLoadscaninvnEntity>query().lambda() List<DistributionLoadscaninvnEntity> loadscaninvnEntityList = distributionLoadscaninvnService.list(Wrappers.<DistributionLoadscaninvnEntity>query().lambda()
.eq(DistributionLoadscaninvnEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId())
.eq(DistributionLoadscaninvnEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode()) .eq(DistributionLoadscaninvnEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode())
.ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()) .ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
); );
@ -5957,7 +5980,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
return Resp.scanFail("包件未装车", "包件未装车"); return Resp.scanFail("包件未装车", "包件未装车");
} else { } else {
//该配送任务查询无该包件信息 //该配送任务查询无该包件信息
return Resp.scanFail("此配送无该包件", "此配送无该包件信息"); return Resp.scanFail("系统无编码", "系统无编码");
} }
} }
@ -7642,6 +7665,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
} }
@Override @Override
@Transactional @Transactional
public void maintenanceDeliveryInfo(Long deliveryId) { public void maintenanceDeliveryInfo(Long deliveryId) {

56
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -2506,6 +2506,19 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
String info = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(",")); String info = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(","));
log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}",deliveryListEntity.getTrainNumber(),info); log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}",deliveryListEntity.getTrainNumber(),info);
return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常"); return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常");
}else {
//这里需要判定文员是否对该异常进行驳回操作
List<DistributionLoadscanAbnormalEntity> LoadscanAbnormalEntityList = abnormalEntities.stream().filter(f -> deliveryListEntity.getId().equals(f.getDeliveryListId()) && distrilbutionloadingscanDTO.getReservationId().equals(f.getReservationId())).collect(Collectors.toList());
if (!LoadscanAbnormalEntityList.isEmpty()) {
//存在异常操作
if (LoadscanAbnormalEntityList.size() == 1){
//判断是否进行审核以及驳货操作
DistributionLoadscanAbnormalEntity distributionLoadscanAbnormalEntity = LoadscanAbnormalEntityList.get(0);
if (distributionLoadscanAbnormalEntity.getAuditingStatus().equals(3)){
return Resp.scanFail("包件异常已驳回", "包件异常已驳回");
}
}
}
} }
//判断具体的装车信息 //判断具体的装车信息
} }
@ -6521,28 +6534,32 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//存在异常列表 //存在异常列表
//进行异常列表的清理 //进行异常列表的清理
for (DistributionLoadscanAbnormalEntity abnormalEntity : abnormalEntities) { for (DistributionLoadscanAbnormalEntity abnormalEntity : abnormalEntities) {
abnormalEntity.setAuditingStatus(3); //存在异常操作为进行审核操作才可进行驳回
abnormalEntity.setAuditingUser(AuthUtil.getNickName()); if (Objects.isNull(abnormalEntity.getAuditingStatus())){
abnormalEntity.setAuditingTime(new Date()); //驳回视为进行审核,审核结果为驳回
abnormalEntity.setIsDeleted(1); abnormalEntity.setAuditingStatus(3);
updateList.add(abnormalEntity); abnormalEntity.setAuditingUser(AuthUtil.getNickName());
//收集需要进行维护的包件 abnormalEntity.setAuditingTime(new Date());
packageIdList.add(abnormalEntity.getPackageId()); updateList.add(abnormalEntity);
//查询是否进行签收 //收集需要进行维护的包件
packageIdList.add(abnormalEntity.getPackageId());
//查询是否进行签收
// 统计需要进行扣减的签收数量 // 统计需要进行扣减的签收数量
if (Func.isNotEmpty(loadscanMap.get(abnormalEntity.getPackageId()))){ if (Func.isNotEmpty(loadscanMap.get(abnormalEntity.getPackageId()))){
//获取装车记录 //获取装车记录
DistributionLoadscanEntity distributionLoadscanEntity = loadscanMap.get(abnormalEntity.getPackageId()); DistributionLoadscanEntity distributionLoadscanEntity = loadscanMap.get(abnormalEntity.getPackageId());
orderIds.add(distributionLoadscanEntity.getOrderId()); orderIds.add(distributionLoadscanEntity.getOrderId());
if (distributionLoadscanEntity.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())){ if (distributionLoadscanEntity.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())){
signforNum++; signforNum++;
}
}else {
//异常驳回无装车记录
log.error(method+"异常驳回无装车记录");
throw new RuntimeException("异常驳货列表存在无装车信息");
} }
}else { loadingNum++;
//异常驳回无装车记录
log.error(method+"异常驳回无装车记录");
throw new RuntimeException("异常驳货列表存在无装车信息");
} }
loadingNum++;
} }
} }
//进行装车记录的统计 //进行装车记录的统计
@ -6557,7 +6574,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
.set(DistributionParcelListEntity::getOrderPackageStatus,OrderPackageStatusConstant.yiruku.getValue()) .set(DistributionParcelListEntity::getOrderPackageStatus,OrderPackageStatusConstant.yiruku.getValue())
.set(DistributionParcelListEntity::getOrderPackageStockupStatus,OrderPackageStockupStatusConstant.daibeihuo.getValue()) .set(DistributionParcelListEntity::getOrderPackageStockupStatus,OrderPackageStockupStatusConstant.daibeihuo.getValue())
); );
//维护相关的订单信息 //维护相关的订单信息
distributionStockArticleService.maintenanceOrderInfoByIds(orderIds); distributionStockArticleService.maintenanceOrderInfoByIds(orderIds);
return R.success("异常驳回成功"); return R.success("异常驳回成功");

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

@ -2611,12 +2611,13 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
BasicdataWarehouseEntity currentWarehouse = warehouseClient.getMyCurrentWarehouse(); BasicdataWarehouseEntity currentWarehouse = warehouseClient.getMyCurrentWarehouse();
List<Long> collect = null; List<Long> collect = null;
if(ObjectUtils.isNotNull(myWarehouseList)){ if(ObjectUtils.isNotNull(currentWarehouse)){
collect = new ArrayList<>(); collect = new ArrayList<>();
collect.add(currentWarehouse.getId()); collect.add(currentWarehouse.getId());
}else{ }else{
collect = myWarehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList()); collect = myWarehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
} }
log.info(">>>>>>>>>>>>>当前仓库:{}",collect);
IPage<DistributionSignforStockArticleVO> distributionStockArticleEntityIPage = baseMapper.pageSignforListOwe(page, stockArticleEntity,collect); IPage<DistributionSignforStockArticleVO> distributionStockArticleEntityIPage = baseMapper.pageSignforListOwe(page, stockArticleEntity,collect);
//处理创建人 //处理创建人
distributionStockArticleEntityIPage.getRecords().forEach(a -> { distributionStockArticleEntityIPage.getRecords().forEach(a -> {

133
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -18,7 +18,6 @@ package com.logpm.distribution.service.impl;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
@ -33,26 +32,72 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.distribution.bean.Resp; import com.logpm.distribution.bean.Resp;
import com.logpm.distribution.dto.DistributionBillLadingExcelDTO;
import com.logpm.distribution.dto.DistributionParcelListDTO; import com.logpm.distribution.dto.DistributionParcelListDTO;
import com.logpm.distribution.dto.DistributionStockListDTO; import com.logpm.distribution.dto.DistributionStockListDTO;
import com.logpm.distribution.dto.DistrilbutionBillLadingDTO; import com.logpm.distribution.dto.DistrilbutionBillLadingDTO;
import com.logpm.distribution.dto.OrderStatusDTO; import com.logpm.distribution.dto.OrderStatusDTO;
import com.logpm.distribution.dto.app.BillLadingAppDTO; import com.logpm.distribution.dto.app.BillLadingAppDTO;
import com.logpm.distribution.dto.DistributionBillLadingExcelDTO; import com.logpm.distribution.entity.DisStockListDetailEntity;
import com.logpm.distribution.entity.*; import com.logpm.distribution.entity.DistributionBillLadingScanEntity;
import com.logpm.distribution.entity.DistributionDeliveryChargeEntity;
import com.logpm.distribution.entity.DistributionDeliveryDetailsEntity;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionParcelNumberEntity;
import com.logpm.distribution.entity.DistributionPrintEntity;
import com.logpm.distribution.entity.DistributionReservationZeroPackageEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.entity.DistributionStockEntity;
import com.logpm.distribution.entity.DistributionStockListEntity;
import com.logpm.distribution.entity.DistributionStockupEntity;
import com.logpm.distribution.entity.DistributionStockupInfoEntity;
import com.logpm.distribution.entity.DistributionStockupScanEntity;
import com.logpm.distribution.entity.DistrilbutionBillLadingEntity;
import com.logpm.distribution.entity.DistrilbutionBillPackageEntity;
import com.logpm.distribution.entity.DistrilbutionBillStockEntity;
import com.logpm.distribution.excel.DistributionBillInventoryExcel; import com.logpm.distribution.excel.DistributionBillInventoryExcel;
import com.logpm.distribution.excel.DistributionBillOrderExcel; import com.logpm.distribution.excel.DistributionBillOrderExcel;
import com.logpm.distribution.excel.DistributionBillOrderPackExcel; import com.logpm.distribution.excel.DistributionBillOrderPackExcel;
import com.logpm.distribution.excel.DistrilbutionBillLadingExcel; import com.logpm.distribution.excel.DistrilbutionBillLadingExcel;
import com.logpm.distribution.mapper.DistributionStockListMapper; import com.logpm.distribution.mapper.DistributionStockListMapper;
import com.logpm.distribution.mapper.DistrilbutionBillLadingMapper; import com.logpm.distribution.mapper.DistrilbutionBillLadingMapper;
import com.logpm.distribution.service.*; import com.logpm.distribution.service.IDisStockListDetailService;
import com.logpm.distribution.vo.*; import com.logpm.distribution.service.IDistributionAsyncService;
import com.logpm.distribution.vo.app.*; import com.logpm.distribution.service.IDistributionBillLadingScanService;
import com.logpm.distribution.service.IDistributionDeliveryChargeService;
import com.logpm.distribution.service.IDistributionDeliveryDetailsService;
import com.logpm.distribution.service.IDistributionParcelListService;
import com.logpm.distribution.service.IDistributionParcelNumberService;
import com.logpm.distribution.service.IDistributionPrintService;
import com.logpm.distribution.service.IDistributionReservationService;
import com.logpm.distribution.service.IDistributionReservationZeroPackageService;
import com.logpm.distribution.service.IDistributionStockArticleService;
import com.logpm.distribution.service.IDistributionStockListService;
import com.logpm.distribution.service.IDistributionStockService;
import com.logpm.distribution.service.IDistributionStockupInfoService;
import com.logpm.distribution.service.IDistributionStockupScanService;
import com.logpm.distribution.service.IDistributionStockupService;
import com.logpm.distribution.service.IDistrilbutionBillLadingService;
import com.logpm.distribution.service.IDistrilbutionBillPackageService;
import com.logpm.distribution.service.IDistrilbutionBillStockService;
import com.logpm.distribution.vo.DistributionDeliveryDetailsVO;
import com.logpm.distribution.vo.DistributionParcelNumberVO;
import com.logpm.distribution.vo.DistributionStockArticleVO;
import com.logpm.distribution.vo.DistributionStockListVO;
import com.logpm.distribution.vo.DistributionStockupOrderListVO;
import com.logpm.distribution.vo.DistrilbutionBillLadingAppVO;
import com.logpm.distribution.vo.DistrilbutionBillLadingDetailsVO;
import com.logpm.distribution.vo.DistrilbutionBillLadingOwnVO;
import com.logpm.distribution.vo.DistrilbutionBillLadingVO;
import com.logpm.distribution.vo.DistrilbutionBillLadingViewVO;
import com.logpm.distribution.vo.DistrilbutionBillStockVO;
import com.logpm.distribution.vo.app.DistrilbutionAppBillLadingDetailVO;
import com.logpm.distribution.vo.app.DistrilbutionAppBillLadingOrderMainVO;
import com.logpm.distribution.vo.app.DistrilbutionAppBillLadingOrderVO;
import com.logpm.distribution.vo.app.DistrilbutionAppBillLadingZeroOrderVO;
import com.logpm.distribution.vo.app.DistrilbutionAppBillLadingZeroVO;
import com.logpm.distribution.vo.app.DistrilbutionBillLadingInventoryAppVO;
import com.logpm.distribution.wrapper.DistributionStockArticleWrapper; import com.logpm.distribution.wrapper.DistributionStockArticleWrapper;
import com.logpm.factory.mt.dto.MtReceiveContentDTO;
import com.logpm.factory.mt.dto.MtReceiveDTO;
import com.logpm.factory.mt.dto.MtReceiveImagesDTO;
import com.logpm.factorydata.enums.BrandEnums; import com.logpm.factorydata.enums.BrandEnums;
import com.logpm.factorydata.util.FactoryDataMessageSender; import com.logpm.factorydata.util.FactoryDataMessageSender;
import com.logpm.factorydata.vo.NodePushMsg; import com.logpm.factorydata.vo.NodePushMsg;
@ -100,7 +145,6 @@ import org.springblade.system.feign.IUserClient;
import org.springframework.amqp.rabbit.core.RabbitTemplate; import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -109,7 +153,18 @@ import javax.annotation.Resource;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -398,7 +453,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
.eq(DistributionDeliveryDetailsEntity::getBillLadingId, distrilbutionBillLading.getId()) .eq(DistributionDeliveryDetailsEntity::getBillLadingId, distrilbutionBillLading.getId())
.ne(DistributionDeliveryDetailsEntity::getInventoryStatus, "2") .ne(DistributionDeliveryDetailsEntity::getInventoryStatus, "2")
); );
Map<Long, List<DistributionDeliveryDetailsEntity>> map = null; Map<Long, List<DistributionDeliveryDetailsEntity>> map = new HashMap<>();
if (!listDetails.isEmpty()) { if (!listDetails.isEmpty()) {
map = listDetails.stream().collect(Collectors.groupingBy(DistributionDeliveryDetailsEntity::getStockListId)); map = listDetails.stream().collect(Collectors.groupingBy(DistributionDeliveryDetailsEntity::getStockListId));
} }
@ -636,6 +691,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), distrilbutionBillPackageEntity.getOrderPackageCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode()); JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), distrilbutionBillPackageEntity.getOrderPackageCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode());
logs.add(js); logs.add(js);
} }
sendFactoryPlan(packageMap.get(Long.parseLong(s)),myCurrentWarehouse, distrilbutionBillLading);
} else { } else {
//没有进行包件的勾选,默认添加所有可用包件至计划下 //没有进行包件的勾选,默认添加所有可用包件至计划下
List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda() List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda()
@ -656,6 +712,8 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode()); JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode());
logs.add(js); logs.add(js);
} }
// 推送工厂
sendFactoryPlan(parcelListEntities, myCurrentWarehouse, distrilbutionBillLading);
} else { } else {
log.error("#####################自提计划订单无可用包件:{}", s); log.error("#####################自提计划订单无可用包件:{}", s);
throw new ServiceException(stockArticleEntity.getOrderCode() + "订单无可用包件!!!"); throw new ServiceException(stockArticleEntity.getOrderCode() + "订单无可用包件!!!");
@ -681,6 +739,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode()); JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode());
logs.add(js); logs.add(js);
} }
sendFactoryPlan(parcelListEntities, myCurrentWarehouse, distrilbutionBillLading);
} else { } else {
log.error("#####################自提计划订单无可用包件:{}", s); log.error("#####################自提计划订单无可用包件:{}", s);
throw new ServiceException(stockArticleEntity.getOrderCode() + "订单无可用包件!!!"); throw new ServiceException(stockArticleEntity.getOrderCode() + "订单无可用包件!!!");
@ -861,6 +920,44 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
return true; return true;
} }
private void sendFactoryPlan(List<DistributionParcelListEntity> parcelListEntities, BasicdataWarehouseEntity myCurrentWarehouse, DistrilbutionBillLadingDTO distrilbutionBillLading) {
// 包件按品牌分组
try {
Map<String, List<DistributionParcelListEntity>> parcelListMap = parcelListEntities.stream().collect(Collectors.groupingBy(DistributionParcelListEntity::getBrandName));
if(CollUtil.isNotEmpty(parcelListMap)){
for (Map.Entry<String, List<DistributionParcelListEntity>> entry : parcelListMap.entrySet()) {
String key = entry.getKey();
JSONObject jsonObject = new JSONObject();
jsonObject.put("trainNumber", distrilbutionBillLading.getPickupBatch());
jsonObject.put("receiver", distrilbutionBillLading.getConsignee());
jsonObject.put("receiveAddr", myCurrentWarehouse.getName());
jsonObject.put("receiveTel", distrilbutionBillLading.getCustomerTelephone());
jsonObject.put("planDeliveryDate", DateUtil.formatDateTime(distrilbutionBillLading.getPickUpTime()));
List<DistributionParcelListEntity> listEntities = entry.getValue();
NodePushMsg msg = new NodePushMsg();
msg.setNode(WorkNodeEnums.PLAN_BILLOFLADING);
msg.setBrand(BrandEnums.getByValue(key));
msg.setOperator(AuthUtil.getNickName());
msg.setOperatorTime(new Date());
msg.setMain(jsonObject.toString());
msg.setContent(listEntities.stream().map(item->{
return PushData.builder()
.orderCode(item.getOrderCode())
.packageCode(item.getOrderPackageCode())
.warehouseName(myCurrentWarehouse.getName())
.waybillNumber(item.getWaybillNumber())
.build();
}).collect(Collectors.toList()));
log.info("推送工厂数据:{}", JSONUtil.toJsonStr(msg));
factoryDataMessageSender.sendNodeDataByBrand(msg);
}
}
} catch (Exception e) {
log.error("推送签收数据给工厂失败 {}", e);
}
}
@NotNull @NotNull
private static DistrilbutionBillPackageEntity getDistrilbutionBillPackageEntity(DistrilbutionBillLadingDTO distrilbutionBillLading, DistributionParcelListEntity parcelListEntity) { private static DistrilbutionBillPackageEntity getDistrilbutionBillPackageEntity(DistrilbutionBillLadingDTO distrilbutionBillLading, DistributionParcelListEntity parcelListEntity) {
DistrilbutionBillPackageEntity billPackageEntity = new DistrilbutionBillPackageEntity(); DistrilbutionBillPackageEntity billPackageEntity = new DistrilbutionBillPackageEntity();
@ -1583,6 +1680,13 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
.in("id", collect) .in("id", collect)
.set("order_package_reservation_status", OrderPackageReservationStatusConstant.yiyueyue.getValue()) .set("order_package_reservation_status", OrderPackageReservationStatusConstant.yiyueyue.getValue())
); );
// 推送工厂
if(CollUtil.isNotEmpty(collect)){
List<DistributionParcelListEntity> distributionParcelListEntities = distributionParcelListService.listByIds(collect);
if(CollUtil.isNotEmpty(distributionParcelListEntities)){
sendFactoryPlan(distributionParcelListEntities, warehouse, distrilbutionBillLading);
}
}
} }
}); });
@ -1600,7 +1704,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
List<DistributionParcelListEntity> distributionParcelListEntities = distributionParcelListService.listByIds(collect); List<DistributionParcelListEntity> distributionParcelListEntities = distributionParcelListService.listByIds(collect);
for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntities) { for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntities) {
String content = "包件在" + warehouse.getName() + "由" + AuthUtil.getNickName() + "取消计划自提,操作方式:订单取消勾选包件,自提批次号:" + pickupBatch; String content = "包件在" + warehouse.getName() + "由" + AuthUtil.getNickName() + "取消计划自提,操作方式:订单取消勾选包件,自提批次号:" + pickupBatch;
JSONObject js = handleLogJSONObject(warehouse, AuthUtil.getUser(), distributionParcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode()); JSONObject js = handleLogJSONObject(warehouse, AuthUtil.getUser(), distributionParcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.CANCEL_BILLOFLADING.getCode());
aaa.add(js); aaa.add(js);
} }
packageIds.addAll(collect); packageIds.addAll(collect);
@ -1813,7 +1917,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
if (!list.isEmpty()) { if (!list.isEmpty()) {
for (DistrilbutionBillPackageEntity billPackageEntity : list) { for (DistrilbutionBillPackageEntity billPackageEntity : list) {
String content = "包件在" + myCurrentWarehouse.getName() + "由" + AuthUtil.getNickName() + "取消计划自提,操作方式:移除订单,自提批次号:" + pickupBatch; String content = "包件在" + myCurrentWarehouse.getName() + "由" + AuthUtil.getNickName() + "取消计划自提,操作方式:移除订单,自提批次号:" + pickupBatch;
JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), billPackageEntity.getPacketBarCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode()); JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), billPackageEntity.getPacketBarCode(), content, WorkNodeEnums.CANCEL_BILLOFLADING.getCode());
aaa.add(js); aaa.add(js);
billPackageEntity.setPacketBarStatus(2); billPackageEntity.setPacketBarStatus(2);
@ -1908,6 +2012,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), billPackageEntity.getPacketBarCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode()); JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), billPackageEntity.getPacketBarCode(), content, WorkNodeEnums.PLAN_BILLOFLADING.getCode());
aaa.add(js); aaa.add(js);
}); });
sendFactoryPlan(parcelListEntities, myCurrentWarehouse, distrilbutionBillLading);
//修改包件数量为预约状态 //修改包件数量为预约状态
List<Long> collect = parcelListEntities.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList()); List<Long> collect = parcelListEntities.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList());
distributionParcelListService.update(Wrappers.<DistributionParcelListEntity>update() distributionParcelListService.update(Wrappers.<DistributionParcelListEntity>update()

1
blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/java/com/logpm/factorydata/linsy/service/impl/DeliveryNoteServiceImpl.java

@ -200,6 +200,7 @@ public class DeliveryNoteServiceImpl extends BaseServiceImpl<DeliveryNoteMapper,
String startWarehouseName = null; String startWarehouseName = null;
// 获取工厂基地绑定的始发仓信息 // 获取工厂基地绑定的始发仓信息
R<FactoryWarehouseBindVO> warehouseByBrandAndSiteName = baseClient.getWarehouseByBrandAndSiteName(BrandEnums.LINSY.getValue(), vo.getSupplierName()); R<FactoryWarehouseBindVO> warehouseByBrandAndSiteName = baseClient.getWarehouseByBrandAndSiteName(BrandEnums.LINSY.getValue(), vo.getSupplierName());
log.info("工厂基地绑定的始发仓信息:{}", JSONUtil.toJsonStr(warehouseByBrandAndSiteName));
if (ObjectUtil.equal(HttpConstants.HTTP.HTTP_RESOURCE_CODE.SUCCESS_CODE, warehouseByBrandAndSiteName.getCode())) { if (ObjectUtil.equal(HttpConstants.HTTP.HTTP_RESOURCE_CODE.SUCCESS_CODE, warehouseByBrandAndSiteName.getCode())) {
FactoryWarehouseBindVO data = warehouseByBrandAndSiteName.getData(); FactoryWarehouseBindVO data = warehouseByBrandAndSiteName.getData();
if (ObjectUtil.isNotNull(data)) { if (ObjectUtil.isNotNull(data)) {

24
blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/enums/FactoryNodeEnums.java

@ -12,20 +12,16 @@ import org.springblade.common.model.IDict;
@Getter @Getter
public enum FactoryNodeEnums implements IDict<Integer> { public enum FactoryNodeEnums implements IDict<Integer> {
/** 已入库 */
INITIAL_WAREHOUSE_ENTRY(101020, "已入库"), ALREADY_IN_STOCK(101020, "已入库"),
UNLOAD_INCOMING_WAREHOUSE(105010,"已入库"), /** 已出库 */
INITIAL_WAREHOUSE_LOADING(103020, "已出库"), SHIPPED(103020, "已出库"),
INITIAL_WAREHOUSE_DEPART(103040, "已发车"), /** 已发车 */
TRANSFER_WAREHOUSE_DEPART(103080, "已发车"), DISPATCHED(103040, "已发车"),
/** /** 配送 */
* 配送装车 DISTRIBUTION(302010, "配送"),
*/ /** 已签收 */
DISTRIBUTION_LOADING(302010, "配送"), SIGNED_FOR(303010, "已签收"),
/**
* 文员复核
*/
CLERK_REVIEW(303010, "已签收"),
; ;
FactoryNodeEnums(Integer code, String text) { FactoryNodeEnums(Integer code, String text) {

28
blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/enums/NodeMappingEnums.java

@ -13,19 +13,21 @@ import org.springblade.common.constant.WorkNodeEnums;
@Getter @Getter
public enum NodeMappingEnums { public enum NodeMappingEnums {
INITIAL_WAREHOUSE_ENTRY(FactoryNodeEnums.INITIAL_WAREHOUSE_ENTRY, WorkNodeEnums.INITIAL_WAREHOUSE_ENTRY, 1), INITIAL_WAREHOUSE_ENTRY(FactoryNodeEnums.ALREADY_IN_STOCK, WorkNodeEnums.INITIAL_WAREHOUSE_ENTRY, 1),
UNLOAD_INCOMING_WAREHOUSE(FactoryNodeEnums.UNLOAD_INCOMING_WAREHOUSE, WorkNodeEnums.UNLOAD_INCOMING_WAREHOUSE, 1), UNLOAD_INCOMING_WAREHOUSE(FactoryNodeEnums.ALREADY_IN_STOCK, WorkNodeEnums.UNLOAD_INCOMING_WAREHOUSE, 1),
INITIAL_WAREHOUSE_LOADING(FactoryNodeEnums.INITIAL_WAREHOUSE_LOADING, WorkNodeEnums.INITIAL_WAREHOUSE_LOADING, 1),
INITIAL_WAREHOUSE_DEPART(FactoryNodeEnums.INITIAL_WAREHOUSE_DEPART, WorkNodeEnums.INITIAL_WAREHOUSE_DEPART, 1), INITIAL_WAREHOUSE_LOADING(FactoryNodeEnums.SHIPPED, WorkNodeEnums.INITIAL_WAREHOUSE_LOADING, 1),
TRANSFER_WAREHOUSE_DEPART(FactoryNodeEnums.TRANSFER_WAREHOUSE_DEPART, WorkNodeEnums.TRANSFER_WAREHOUSE_DEPART, 1),
/** INITIAL_WAREHOUSE_DEPART(FactoryNodeEnums.DISPATCHED, WorkNodeEnums.INITIAL_WAREHOUSE_DEPART, 1),
* 已交接 TRANSFER_WAREHOUSE_DEPART(FactoryNodeEnums.DISPATCHED, WorkNodeEnums.TRANSFER_WAREHOUSE_DEPART, 1),
*/ TRIPARTITE_TRANSFER_DEPART(FactoryNodeEnums.DISPATCHED, WorkNodeEnums.TRIPARTITE_TRANSFER_DEPART, 1),
DISTRIBUTION_LOADING(FactoryNodeEnums.DISTRIBUTION_LOADING, WorkNodeEnums.DISTRIBUTION_LOADING, 1),
/** DISTRIBUTION_LOADING(FactoryNodeEnums.DISTRIBUTION, WorkNodeEnums.DISTRIBUTION_LOADING, 1),
* 收货完成
*/ SIGN_DIRECT_SHIPPER(FactoryNodeEnums.SIGNED_FOR, WorkNodeEnums.SIGN_DIRECT_SHIPPER, 1),
CLERK_REVIEW(FactoryNodeEnums.CLERK_REVIEW, WorkNodeEnums.CLERK_REVIEW, 1); SIGN_TRIPARTITE_TRANSFER_DEPART(FactoryNodeEnums.SIGNED_FOR, WorkNodeEnums.SIGN_TRIPARTITE_TRANSFER_DEPART, 1),
CLERK_REVIEW(FactoryNodeEnums.SIGNED_FOR, WorkNodeEnums.CLERK_REVIEW, 1),
;
/** /**
* 系统作业节点 * 系统作业节点

5
blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/enums/NodeNeedEnums.java

@ -15,9 +15,12 @@ public enum NodeNeedEnums implements Serializable {
INITIAL_WAREHOUSE_ENTRY(101020, "始发仓入库"), INITIAL_WAREHOUSE_ENTRY(101020, "始发仓入库"),
UNLOAD_INCOMING_WAREHOUSE(105010,"卸车入库"), UNLOAD_INCOMING_WAREHOUSE(105010,"卸车入库"),
INITIAL_WAREHOUSE_LOADING(103020, "装车"), INITIAL_WAREHOUSE_LOADING(103020, "装车"),
INITIAL_WAREHOUSE_DEPART(103040, "始发仓发车"), INITIAL_WAREHOUSE_DEPART(103040, "始发仓发车"),
TRANSFER_WAREHOUSE_DEPART(103080, "网点发车"), TRANSFER_WAREHOUSE_DEPART(103080, "网点发车"),
TRIPARTITE_TRANSFER_DEPART(104010, "三方中转发车"),
/** /**
* 配送装车 * 配送装车
*/ */
@ -25,6 +28,8 @@ public enum NodeNeedEnums implements Serializable {
/** /**
* 文员复核 * 文员复核
*/ */
SIGN_DIRECT_SHIPPER(105030,"直发商家签收"),
SIGN_TRIPARTITE_TRANSFER_DEPART(104040, "三方中转签收"),
CLERK_REVIEW(303010, "文员复核"), CLERK_REVIEW(303010, "文员复核"),
; ;

15
blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/enums/FactoryNodeEnums.java

@ -12,18 +12,15 @@ import org.springblade.common.model.IDict;
@Getter @Getter
public enum FactoryNodeEnums implements IDict<Integer> { public enum FactoryNodeEnums implements IDict<Integer> {
/** 入库 */
INITIAL_WAREHOUSE_ENTRY(101020, "入库"), ALREADY_IN_STOCK(101020, "入库"),
UNLOAD_INCOMING_WAREHOUSE(105010,"入库"), /** 出库 */
INITIAL_WAREHOUSE_LOADING(103020, "出库"), INITIAL_WAREHOUSE_LOADING(103020, "出库"),
/** 计划配车 */
PLAN_DISTRIBUTION(301060, "计划配车"), PLAN_DISTRIBUTION(301060, "计划配车"),
/** /** 配送 */
* 配送装车
*/
DISTRIBUTION_LOADING(302010, "配送"), DISTRIBUTION_LOADING(302010, "配送"),
/** /** 签收 */
* 文员复核
*/
CLERK_REVIEW(303010, "签收"), CLERK_REVIEW(303010, "签收"),
; ;

10
blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/enums/NodeMappingEnums.java

@ -16,11 +16,11 @@ public enum NodeMappingEnums {
/** /**
* 始发仓入库 * 始发仓入库
*/ */
INITIAL_WAREHOUSE_ENTRY(FactoryNodeEnums.INITIAL_WAREHOUSE_ENTRY, WorkNodeEnums.INITIAL_WAREHOUSE_ENTRY, 1), INITIAL_WAREHOUSE_ENTRY(FactoryNodeEnums.ALREADY_IN_STOCK, WorkNodeEnums.INITIAL_WAREHOUSE_ENTRY, 1),
/** /**
* 卸车入库 * 卸车入库
*/ */
UNLOAD_INCOMING_WAREHOUSE(FactoryNodeEnums.UNLOAD_INCOMING_WAREHOUSE, WorkNodeEnums.UNLOAD_INCOMING_WAREHOUSE, 1), UNLOAD_INCOMING_WAREHOUSE(FactoryNodeEnums.ALREADY_IN_STOCK, WorkNodeEnums.UNLOAD_INCOMING_WAREHOUSE, 1),
/** /**
* 装车 * 装车
*/ */
@ -29,6 +29,7 @@ public enum NodeMappingEnums {
* 计划配车 * 计划配车
*/ */
PLAN_DISTRIBUTION(FactoryNodeEnums.PLAN_DISTRIBUTION, WorkNodeEnums.PLAN_DISTRIBUTION, 1), PLAN_DISTRIBUTION(FactoryNodeEnums.PLAN_DISTRIBUTION, WorkNodeEnums.PLAN_DISTRIBUTION, 1),
PLAN_BILLOFLADING(FactoryNodeEnums.PLAN_DISTRIBUTION, WorkNodeEnums.PLAN_BILLOFLADING, 1),
/** /**
* 已交接 * 已交接
@ -37,7 +38,10 @@ public enum NodeMappingEnums {
/** /**
* 收货完成 * 收货完成
*/ */
CLERK_REVIEW(FactoryNodeEnums.CLERK_REVIEW, WorkNodeEnums.CLERK_REVIEW, 1); CLERK_REVIEW(FactoryNodeEnums.CLERK_REVIEW, WorkNodeEnums.CLERK_REVIEW, 1),
CLERK_REVIEW_DIRECT_SHIPPER(FactoryNodeEnums.CLERK_REVIEW, WorkNodeEnums.SIGN_DIRECT_SHIPPER, 1),
CLERK_REVIEW_TRIPARTITE_TRANSFER_DEPART(FactoryNodeEnums.CLERK_REVIEW, WorkNodeEnums.SIGN_TRIPARTITE_TRANSFER_DEPART, 1),
;
/** /**
* 系统作业节点 * 系统作业节点

13
blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/enums/NodeNeedEnums.java

@ -15,15 +15,16 @@ public enum NodeNeedEnums implements Serializable {
INITIAL_WAREHOUSE_ENTRY(101020, "始发仓入库"), INITIAL_WAREHOUSE_ENTRY(101020, "始发仓入库"),
UNLOAD_INCOMING_WAREHOUSE(105010,"卸车入库"), UNLOAD_INCOMING_WAREHOUSE(105010,"卸车入库"),
INITIAL_WAREHOUSE_LOADING(103020, "装车"), INITIAL_WAREHOUSE_LOADING(103020, "装车"),
PLAN_BILLOFLADING(301040, "计划自提"),
PLAN_DISTRIBUTION(301060, "计划配车"), PLAN_DISTRIBUTION(301060, "计划配车"),
/**
* 配送装车
*/
DISTRIBUTION_LOADING(302010, "配送装车"), DISTRIBUTION_LOADING(302010, "配送装车"),
/**
* 文员复核 SIGN_DIRECT_SHIPPER(105030,"直发商家签收"),
*/ SIGN_TRIPARTITE_TRANSFER_DEPART(104040, "三方中转签收"),
CLERK_REVIEW(303010, "文员复核"), CLERK_REVIEW(303010, "文员复核"),
; ;

2
blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/mq/FactoryOrderListener.java

@ -264,7 +264,7 @@ public class FactoryOrderListener {
advanceDetailEntity.setSiteCode(""); advanceDetailEntity.setSiteCode("");
advanceDetailEntity.setQuantity(1); advanceDetailEntity.setQuantity(1);
advanceDetailEntity.setOrderPackageCode(orderPackageDTO.getPaNo()); advanceDetailEntity.setOrderPackageCode(orderPackageDTO.getPaNo());
advanceDetailEntity.setTrainNumber(""); advanceDetailEntity.setTrainNumber(vo.getLogisticID());
advanceDetailEntity.setServiceNum(orderInfoVO.getMainOrderNo()); advanceDetailEntity.setServiceNum(orderInfoVO.getMainOrderNo());
advanceDetailEntity.setWaybillNo(""); advanceDetailEntity.setWaybillNo("");
advanceDetailEntity.setPackageStatus("0"); advanceDetailEntity.setPackageStatus("0");

6
blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/mq/NodeDataPushListener.java

@ -45,9 +45,9 @@ public class NodeDataPushListener {
private final OldProperties oldProperties; private final OldProperties oldProperties;
@RabbitListener(bindings = @QueueBinding( @RabbitListener(bindings = @QueueBinding(
value = @Queue(name = FactoryDataConstants.Mq.Queues.OLO_NODE_DATA_PUSH, durable = "true"), value = @Queue(name = FactoryDataConstants.Mq.Queues.SFY_NODE_DATA_PUSH, durable = "true"),
exchange = @Exchange(name = FactoryDataConstants.Mq.Exchanges.NODE_DATA_PUSH, type = ExchangeTypes.TOPIC), exchange = @Exchange(name = FactoryDataConstants.Mq.Exchanges.NODE_DATA_PUSH, type = ExchangeTypes.TOPIC),
key = FactoryDataConstants.Mq.RoutingKeys.OLO_NODE_DATA_PUSH key = FactoryDataConstants.Mq.RoutingKeys.SFY_NODE_DATA_PUSH
)) ))
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void nodeDataPush(String msg) { public void nodeDataPush(String msg) {
@ -63,7 +63,7 @@ public class NodeDataPushListener {
FactoryNodeEnums factoryNode = NodeMappingEnums.getFactoryByNodeAndStatus(workNodeEnums); FactoryNodeEnums factoryNode = NodeMappingEnums.getFactoryByNodeAndStatus(workNodeEnums);
// 2 获取业务数据 // 2 获取业务数据
List<PushData> content = entries.getBeanList("content", PushData.class); List<PushData> content = entries.getBeanList("content", PushData.class);
if (!ObjectUtil.equal(workNodeEnums.getCode(), NodeNeedEnums.PLAN_DISTRIBUTION.getCode())) { if (!ObjectUtil.equal(workNodeEnums.getCode(), NodeNeedEnums.PLAN_DISTRIBUTION.getCode()) || !ObjectUtil.equal(workNodeEnums.getCode(), NodeNeedEnums.PLAN_BILLOFLADING.getCode()) ) {
// 推送入库出库数据 // 推送入库出库数据
// 按订单号和运单号进行分组 // 按订单号和运单号进行分组
if (CollUtil.isNotEmpty(content)) { if (CollUtil.isNotEmpty(content)) {

1
blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/enums/NodeNeedEnums.java

@ -19,6 +19,7 @@ public enum NodeNeedEnums implements Serializable {
TRANSFER_WAREHOUSE_DEPART(103080, "中转仓发车"), TRANSFER_WAREHOUSE_DEPART(103080, "中转仓发车"),
SIGN_DIRECT_SHIPPER(105030,"直发商家签收"), SIGN_DIRECT_SHIPPER(105030,"直发商家签收"),
END_WAREHOUSE_UNLOADING(105040, "末端仓卸车确认"), END_WAREHOUSE_UNLOADING(105040, "末端仓卸车确认"),
SIGN_TRIPARTITE_TRANSFER_DEPART(104040, "三方中转签收"),
CLERK_REVIEW(303010, "文员复核"); CLERK_REVIEW(303010, "文员复核");
private Integer code; private Integer code;

6
blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/enums/ZbomNodeMappingEnums.java

@ -40,10 +40,14 @@ public enum ZbomNodeMappingEnums {
* 全部签收 -- 文员复核 * 全部签收 -- 文员复核
*/ */
SIGN_FOR(ZbomNodeEnums.SIGN_FOR, WorkNodeEnums.CLERK_REVIEW, 1), SIGN_FOR(ZbomNodeEnums.SIGN_FOR, WorkNodeEnums.CLERK_REVIEW, 1),
SIGN_FOR_DIRECT_SHIPPER(ZbomNodeEnums.SIGN_FOR, WorkNodeEnums.SIGN_DIRECT_SHIPPER, 1),
SIGN_FOR_TRIPARTITE_TRANSFER_DEPART(ZbomNodeEnums.SIGN_FOR, WorkNodeEnums.SIGN_TRIPARTITE_TRANSFER_DEPART, 1),
/** /**
* 部分签收 -- 文员复核 * 部分签收 -- 文员复核
*/ */
PARTIAL_RECEIPT(ZbomNodeEnums.PARTIAL_RECEIPT, WorkNodeEnums.CLERK_REVIEW, 2); PARTIAL_RECEIPT(ZbomNodeEnums.PARTIAL_RECEIPT, WorkNodeEnums.CLERK_REVIEW, 2),
PARTIAL_RECEIPT_DIRECT_SHIPPER(ZbomNodeEnums.PARTIAL_RECEIPT, WorkNodeEnums.SIGN_DIRECT_SHIPPER, 2),
PARTIAL_RECEIPT_TRIPARTITE_TRANSFER_DEPART(ZbomNodeEnums.PARTIAL_RECEIPT, WorkNodeEnums.SIGN_TRIPARTITE_TRANSFER_DEPART, 2);
/** /**
* 系统作业节点 * 系统作业节点

2
blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java

@ -261,7 +261,7 @@ public class ZbomNodeDataPushListener {
nodeOrderEntity = new ZbFactoryNodeOrderEntity(); nodeOrderEntity = new ZbFactoryNodeOrderEntity();
} }
// 如果是签收节点,需要判断是否为全部签收和部分签收 // 如果是签收节点,需要判断是否为全部签收和部分签收
if (EnumUtil.equals(WorkNodeEnums.CLERK_REVIEW, node)) { if (EnumUtil.equals(WorkNodeEnums.CLERK_REVIEW, node) || EnumUtil.equals(WorkNodeEnums.SIGN_TRIPARTITE_TRANSFER_DEPART, node) || EnumUtil.equals(WorkNodeEnums.SIGN_DIRECT_SHIPPER, node)) {
// 签收节点设置签收数量 // 签收节点设置签收数量
Integer signNumber = Convert.toInt(nodeData.getSignQty()); Integer signNumber = Convert.toInt(nodeData.getSignQty());
log.info("key:{},签收数量:{}", departCode + "_" + platformOrderCode, signNumber); log.info("key:{},签收数量:{}", departCode + "_" + platformOrderCode, signNumber);

6
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java

@ -1460,6 +1460,12 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
log.warn("#################saveOrderInfo: 运单信息为空 orderCode={}",orderCode); log.warn("#################saveOrderInfo: 运单信息为空 orderCode={}",orderCode);
throw new CustomerException(403,"运单信息为空"); throw new CustomerException(403,"运单信息为空");
} }
Integer warehouseId = wayBillEntity.getWarehouseId();
if(!warehouseId.equals(oldWarehouseId)){
log.warn("#################saveOrderInfo: 包件还未到达目的仓,不同步 warehouseId={} oldWarehouseId={}",warehouseId,oldWarehouseId);
throw new CustomerException(403,"包件还未到达目的仓,不同步");
}
BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(newWarehouseId); BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(newWarehouseId);
if(Objects.isNull(basicdataWarehouseEntity)){ if(Objects.isNull(basicdataWarehouseEntity)){

12
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.xml

@ -22,8 +22,8 @@
<select id="findWaybillInfoListByBillladingId" resultType="com.logpm.trunkline.vo.TrunklineBillladingWaybillVO"> <select id="findWaybillInfoListByBillladingId" resultType="com.logpm.trunkline.vo.TrunklineBillladingWaybillVO">
select ltb.billlading_code billadingCode, select ltb.billlading_code billadingCode,
ltbw.waybill_id waybillId, ltad.waybill_id waybillId,
ltbw.waybill_no waybillNo, ltad.waybill_no waybillNo,
ltbw.id billladingWaybillId, ltbw.id billladingWaybillId,
lww.create_time openOrderTime, lww.create_time openOrderTime,
lww.goods_name goodsName, lww.goods_name goodsName,
@ -44,12 +44,18 @@
ltbw.plan_num planNum, ltbw.plan_num planNum,
ltbw.real_num realNum, ltbw.real_num realNum,
ltbw.billlading_fee billladingFee, ltbw.billlading_fee billladingFee,
lww.collect_pay collectPay lww.collect_pay collectPay,
count(ltad.id) scanNum
from logpm_trunkline_billlading_waybill ltbw from logpm_trunkline_billlading_waybill ltbw
left join logpm_trunkline_billlading_package ltbp on ltbw.billlading_id = ltbp.billlading_id
left join logpm_trunkline_advance_detail ltad on ltad.order_package_code = ltbp.order_package_code and ltad.waybill_id = ltbw.waybill_id
left join logpm_trunkline_billlading ltb on ltb.id = ltbw.billlading_id left join logpm_trunkline_billlading ltb on ltb.id = ltbw.billlading_id
left join logpm_warehouse_waybill lww on lww.waybill_no = ltbw.waybill_no left join logpm_warehouse_waybill lww on lww.waybill_no = ltbw.waybill_no
where ltbw.billlading_id = #{billladingId} where ltbw.billlading_id = #{billladingId}
and ltbw.is_deleted = 0 and ltbw.is_deleted = 0
group by ltb.billlading_code,
ltbw.waybill_id,
ltbw.waybill_no
</select> </select>
<update id="updateDataByBillladingWaybillId" > <update id="updateDataByBillladingWaybillId" >

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

@ -20,6 +20,7 @@ import com.logpm.basicdata.feign.IBasicdataCodeClient;
import com.logpm.basicdata.feign.IBasicdataDriverArteryClient; import com.logpm.basicdata.feign.IBasicdataDriverArteryClient;
import com.logpm.basicdata.feign.IBasicdataTrayClient; import com.logpm.basicdata.feign.IBasicdataTrayClient;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.distribution.dto.FindParamterDTO;
import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionParcelNumberEntity; import com.logpm.distribution.entity.DistributionParcelNumberEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity; import com.logpm.distribution.entity.DistributionStockArticleEntity;
@ -2153,6 +2154,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String content = "包件在" + warehouseEntity.getName() + "被三方中转整车签收"; String content = "包件在" + warehouseEntity.getName() + "被三方中转整车签收";
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(), AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName(), orderPackageCodes, warehouseId, warehouseEntity.getName(), WorkNodeEnums.SIGN_TRIPARTITE_TRANSFER_DEPART.getCode(), content); packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(), AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName(), orderPackageCodes, warehouseId, warehouseEntity.getName(), WorkNodeEnums.SIGN_TRIPARTITE_TRANSFER_DEPART.getCode(), content);
// 推送签收数据给工厂
sendFactorySignTriparite(warehouseId, orderPackageCodes, warehouseEntity);
} catch (Exception e) { } catch (Exception e) {
log.warn("###########存入日志失败"); log.warn("###########存入日志失败");
} }
@ -2709,8 +2712,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
Date start = CommonUtil.getStartByDateStr(loadCarsDTO.getStartDate()); Date start = CommonUtil.getStartByDateStr(loadCarsDTO.getStartDate());
Date end = CommonUtil.getEndByDateStr(loadCarsDTO.getEndDate()); Date end = CommonUtil.getEndByDateStr(loadCarsDTO.getEndDate());
loadCarsDTO.setStartDate(CommonUtil.dateToStringGeneral(start)); loadCarsDTO.setStartTime(start);
loadCarsDTO.setEndDate(CommonUtil.dateToStringGeneral(end)); loadCarsDTO.setEndTime(end);
IPage<TrunklineCarsLoadVO> pageList = baseMapper.carsLoadPageList(page, loadCarsDTO); IPage<TrunklineCarsLoadVO> pageList = baseMapper.carsLoadPageList(page, loadCarsDTO);
List<TrunklineCarsLoadVO> records = pageList.getRecords(); List<TrunklineCarsLoadVO> records = pageList.getRecords();
@ -4524,7 +4527,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
.build(); .build();
contents.add(pushData); contents.add(pushData);
NodePushMsg msg = new NodePushMsg(); NodePushMsg msg = new NodePushMsg();
msg.setNode(WorkNodeEnums.CLERK_REVIEW); msg.setNode(WorkNodeEnums.SIGN_DIRECT_SHIPPER);
msg.setBrand(BrandEnums.getByValue(parcelListEntity.getBrandName())); msg.setBrand(BrandEnums.getByValue(parcelListEntity.getBrandName()));
msg.setOperator(AuthUtil.getNickName()); msg.setOperator(AuthUtil.getNickName());
msg.setOperatorTime(new Date()); msg.setOperatorTime(new Date());
@ -4740,7 +4743,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
.waybillNumber(parcelListEntity.getWaybillNumber()).build(); .waybillNumber(parcelListEntity.getWaybillNumber()).build();
contents.add(pushData); contents.add(pushData);
NodePushMsg msg = new NodePushMsg(); NodePushMsg msg = new NodePushMsg();
msg.setNode(WorkNodeEnums.CLERK_REVIEW); msg.setNode(WorkNodeEnums.SIGN_DIRECT_SHIPPER);
msg.setBrand(BrandEnums.getByValue(parcelListEntity.getBrandName())); msg.setBrand(BrandEnums.getByValue(parcelListEntity.getBrandName()));
msg.setOperator(AuthUtil.getNickName()); msg.setOperator(AuthUtil.getNickName());
msg.setOperatorTime(new Date()); msg.setOperatorTime(new Date());
@ -5085,10 +5088,44 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
} catch (Exception e) { } catch (Exception e) {
log.warn("###########存入日志失败"); log.warn("###########存入日志失败");
} }
// 推送签收数据给工厂
sendFactorySignTriparite(warehouseId, orderPackageCodes, warehouseEntity);
return R.success("签收成功"); return R.success("签收成功");
} }
private void sendFactorySignTriparite(Long warehouseId, List<String> orderPackageCodes, BasicdataWarehouseEntity warehouseEntity) {
try {
FindParamterDTO paramterDTO = new FindParamterDTO();
paramterDTO.setOrderPackageCodeList(orderPackageCodes);
paramterDTO.setWarehouseId(warehouseId);
List<DistributionParcelListEntity> listByOrderPackageCodeList = distributionParcelListClient.findListByOrderPackageCodeList(paramterDTO);
if (CollUtil.isNotEmpty(listByOrderPackageCodeList)) {
// 按品牌分组
Map<String, List<DistributionParcelListEntity>> map = listByOrderPackageCodeList.stream().collect(Collectors.groupingBy(DistributionParcelListEntity::getBrandName));
for (Map.Entry<String, List<DistributionParcelListEntity>> entry : map.entrySet()) {
String key = entry.getKey();
List<DistributionParcelListEntity> value = entry.getValue();
NodePushMsg msg = new NodePushMsg();
msg.setNode(WorkNodeEnums.SIGN_TRIPARTITE_TRANSFER_DEPART);
msg.setBrand(BrandEnums.getByValue(key));
msg.setOperator(AuthUtil.getNickName());
msg.setOperatorTime(new Date());
msg.setContent(value.stream().map(item -> {
return PushData.builder()
.packageCode(item.getOrderPackageCode())
.orderCode(item.getOrderCode())
.warehouseName(warehouseEntity.getName())
.waybillNumber(item.getWaybillNumber()).build();
}).collect(Collectors.toList()));
log.info("推送工厂数据:{}", JSONUtil.toJsonStr(msg));
factoryDataMessageSender.sendNodeDataByBrand(msg);
}
}
} catch (Exception e) {
log.error("推送签收数据给工厂失败 {}", e);
}
}
@Override @Override
public R findCarsLoadLogs(LoadCarsDTO loadCarsDTO) { public R findCarsLoadLogs(LoadCarsDTO loadCarsDTO) {

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

@ -984,6 +984,7 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
map.put("orderCode",parcelListEntity.getOrderCode()); map.put("orderCode",parcelListEntity.getOrderCode());
map.put("orderPackageCode",orderPackageCode); map.put("orderPackageCode",orderPackageCode);
map.put("trayName",trayName); map.put("trayName",trayName);
map.put("trayWarehouseId",trayWarehouseId);
map.put("trayWarehouseName",trayWarehouseName); map.put("trayWarehouseName",trayWarehouseName);
return R.data(map); return R.data(map);

Loading…
Cancel
Save