Browse Source

1.干线bug修复

fix-sign
zhenghaoyu 5 months ago
parent
commit
34b9ac9dd9
  1. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadWaybillInfoVO.java
  2. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineCarsLoadScanVO.java
  3. 1
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseWaybillVO.java
  4. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java
  5. 15
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml
  6. 1
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderAsyncService.java
  7. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java
  8. 15
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderAsyncServiceImpl.java
  9. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  10. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java
  11. 28
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  12. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml

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

@ -29,6 +29,7 @@ public class CarsLoadWaybillInfoVO implements Serializable {
private String productPrice; private String productPrice;
private String productVolume; private String productVolume;
private String productWeight; private String productWeight;
private String chargeTypes;
private Integer waybillType; private Integer waybillType;
private Long waybillId; private Long waybillId;
private String remark; private String remark;

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

@ -18,4 +18,5 @@ public class TrunklineCarsLoadScanVO extends TrunklineCarsLoadScanEntity {
private BigDecimal price; private BigDecimal price;
private String goodsName; private String goodsName;
private Integer chargeType;
} }

1
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseWaybillVO.java

@ -52,5 +52,6 @@ public class WarehouseWaybillVO extends WarehouseWaybillEntity {
private String productVolume; private String productVolume;
private String productWeight; private String productWeight;
private BigDecimal totalFee; private BigDecimal totalFee;
private String chargeTypes;
} }

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java

@ -199,4 +199,6 @@ public interface TrunklineCarsLoadScanMapper extends BaseMapper<TrunklineCarsLoa
void updateReserve1ByOrderPackageCode(@Param("orderPackageCode") String orderPackageCode, @Param("reseve1") String reseve1); void updateReserve1ByOrderPackageCode(@Param("orderPackageCode") String orderPackageCode, @Param("reseve1") String reseve1);
List<TrunklineCarsLoadScanEntity> findListByIdsAndType(@Param("carsLoadScanIdList") List<Long> carsLoadScanIdList, @Param("type") int type); List<TrunklineCarsLoadScanEntity> findListByIdsAndType(@Param("carsLoadScanIdList") List<Long> carsLoadScanIdList, @Param("type") int type);
void updateWaybillInfoByOrderPackageCodes(@Param("orderPackageCodeList") List<String> orderPackageCodeList, @Param("waybillId") Long waybillId, @Param("waybillNo") String waybillNo);
} }

15
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml

@ -1157,9 +1157,11 @@
<select id="findListAndPriceByLoadId" resultType="com.logpm.trunkline.vo.TrunklineCarsLoadScanVO"> <select id="findListAndPriceByLoadId" resultType="com.logpm.trunkline.vo.TrunklineCarsLoadScanVO">
select ltcls.*, select ltcls.*,
ltad.income_category_name goodsName ltad.income_category_name goodsName,
lwwd.charge_type chargeType
from logpm_trunkline_cars_load_scan ltcls from logpm_trunkline_cars_load_scan ltcls
left join logpm_trunkline_advance_detail ltad on ltad.order_package_code = ltcls.scan_code left join logpm_trunkline_advance_detail ltad on ltad.order_package_code = ltcls.scan_code
left join logpm_warehouse_waybill_detail lwwd on lwwd.waybill_id = ltad.waybill_id and lwwd.product_name = ltad.income_category_name
where ltcls.load_id = #{loadId} where ltcls.load_id = #{loadId}
group by ltcls.scan_code group by ltcls.scan_code
</select> </select>
@ -1190,4 +1192,15 @@
and type = #{type} and type = #{type}
</select> </select>
<update id="updateWaybillInfoByOrderPackageCodes">
update logpm_trunkline_cars_load_scan
set waybill_id = #{waybillId},
waybill_no = #{waybillNo}
where scan_code in
<foreach collection="orderPackageCodeList" item="orderPackageCode" separator="," open="(" close=")">
#{orderPackageCode}
</foreach>
</update>
</mapper> </mapper>

1
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderAsyncService.java

@ -34,4 +34,5 @@ public interface IOpenOrderAsyncService {
void updatePackageMaterial(List<TrunklineAdvanceDetailEntity> updateMaterialList); void updatePackageMaterial(List<TrunklineAdvanceDetailEntity> updateMaterialList);
void syncUnloadScanWaybillInfo(List<Long> advanceIds, WarehouseWaybillEntity waybillEntity);
} }

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java

@ -201,4 +201,6 @@ public interface ITrunklineCarsLoadScanService extends BaseService<TrunklineCars
void updateReserve1ByOrderPackageCode(String orderPackageCode, String reseve1); void updateReserve1ByOrderPackageCode(String orderPackageCode, String reseve1);
List<TrunklineCarsLoadScanEntity> findListByIdsAndType(List<Long> carsLoadScanIdList, int type); List<TrunklineCarsLoadScanEntity> findListByIdsAndType(List<Long> carsLoadScanIdList, int type);
void updateWaybillInfoByOrderPackageCodes(List<String> orderPackageCodeList, Long waybillId, String waybillNo);
} }

15
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderAsyncServiceImpl.java

@ -74,6 +74,9 @@ public class OpenOrderAsyncServiceImpl implements IOpenOrderAsyncService {
private ITrunklineBillladingService trunklineBillladingService; private ITrunklineBillladingService trunklineBillladingService;
@Autowired @Autowired
private IDistributionParcelListClient distributionParcelListClient; private IDistributionParcelListClient distributionParcelListClient;
@Autowired
private ITrunklineCarsLoadScanService carsLoadScanService;
@LogpmAsync("asyncExecutor") @LogpmAsync("asyncExecutor")
@Override @Override
@ -1034,5 +1037,17 @@ public class OpenOrderAsyncServiceImpl implements IOpenOrderAsyncService {
} }
} }
@LogpmAsync("asyncExecutor")
@Override
public void syncUnloadScanWaybillInfo(List<Long> advanceIds, WarehouseWaybillEntity waybillEntity) {
Long waybillId = waybillEntity.getId();
String waybillNo = waybillEntity.getWaybillNo();
List<TrunklineAdvanceDetailVO> advanceDetailVOList = advanceDetailService.findListByAdvanceIds(advanceIds);
//把advanceDetailVOList中所有元素的orderPackageCode放入一个List
List<String> orderPackageCodeList = advanceDetailVOList.stream().map(TrunklineAdvanceDetailVO::getOrderPackageCode).collect(Collectors.toList());
carsLoadScanService.updateWaybillInfoByOrderPackageCodes(orderPackageCodeList,waybillId,waybillNo);
}
} }

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

@ -836,6 +836,8 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
String createOperationRemark = "创建运单" + waybillNo + ",时间:" + CommonUtil.dateToStringGeneral(new Date()); String createOperationRemark = "创建运单" + waybillNo + ",时间:" + CommonUtil.dateToStringGeneral(new Date());
openOrderAsyncService.saveLog(waybillId, waybillNo, "10", "创建运单", createOperationRemark, nickName, userId, warehouseId, warehouseName); openOrderAsyncService.saveLog(waybillId, waybillNo, "10", "创建运单", createOperationRemark, nickName, userId, warehouseId, warehouseName);
openOrderAsyncService.syncUnloadScanWaybillInfo(advanceIds,waybillEntity);
//队列处理包件补数据 //队列处理包件补数据
carsLoadService.sendRabbitMessageOpenOrder(advanceIds, waybillId); carsLoadService.sendRabbitMessageOpenOrder(advanceIds, waybillId);

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java

@ -499,4 +499,9 @@ public class TrunklineCarsLoadScanServiceImpl extends BaseServiceImpl<TrunklineC
return baseMapper.findListByIdsAndType(carsLoadScanIdList,type); return baseMapper.findListByIdsAndType(carsLoadScanIdList,type);
} }
@Override
public void updateWaybillInfoByOrderPackageCodes(List<String> orderPackageCodeList, Long waybillId, String waybillNo) {
baseMapper.updateWaybillInfoByOrderPackageCodes(orderPackageCodeList,waybillId,waybillNo);
}
} }

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

@ -4638,12 +4638,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String productNum = carsLoadWaybillInfoVO.getProductNum(); String productNum = carsLoadWaybillInfoVO.getProductNum();
String productVolume = carsLoadWaybillInfoVO.getProductVolume(); String productVolume = carsLoadWaybillInfoVO.getProductVolume();
String productWeight = carsLoadWaybillInfoVO.getProductWeight(); String productWeight = carsLoadWaybillInfoVO.getProductWeight();
String chargeTypes = carsLoadWaybillInfoVO.getChargeTypes();
String[] nameArray = goodsName.split(","); String[] nameArray = goodsName.split(",");
String[] priceArray = productPrice.split(","); String[] priceArray = productPrice.split(",");
String[] numArray = productNum.split(","); String[] numArray = productNum.split(",");
String[] volumeArray = productVolume.split(","); String[] volumeArray = productVolume.split(",");
String[] weightArray = productWeight.split(","); String[] weightArray = productWeight.split(",");
String[] chargeTypeArray = chargeTypes.split(",");
@ -4651,6 +4653,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
Map<String,String> priceMap = new HashMap<>(); Map<String,String> priceMap = new HashMap<>();
Map<String,String> volumeMap = new HashMap<>(); Map<String,String> volumeMap = new HashMap<>();
Map<String,String> weightMap = new HashMap<>(); Map<String,String> weightMap = new HashMap<>();
Map<String,String> chargeTypeMap = new HashMap<>();
for (int i = 0; i < nameArray.length; i++) { for (int i = 0; i < nameArray.length; i++) {
priceMap.put(nameArray[i],priceArray[i]); priceMap.put(nameArray[i],priceArray[i]);
String num = numArray[i]; String num = numArray[i];
@ -4658,6 +4661,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String weight = weightArray[i]; String weight = weightArray[i];
volumeMap.put(nameArray[i],new BigDecimal(volume).divide(new BigDecimal(num),2, RoundingMode.HALF_UP).toString()); volumeMap.put(nameArray[i],new BigDecimal(volume).divide(new BigDecimal(num),2, RoundingMode.HALF_UP).toString());
weightMap.put(nameArray[i],new BigDecimal(weight).divide(new BigDecimal(num),2, RoundingMode.HALF_UP).toString()); weightMap.put(nameArray[i],new BigDecimal(weight).divide(new BigDecimal(num),2, RoundingMode.HALF_UP).toString());
chargeTypeMap.put(nameArray[i],chargeTypeArray[i]);
} }
@ -4763,7 +4767,17 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
if(StrUtil.isBlank(oneWeight)){ if(StrUtil.isBlank(oneWeight)){
oneWeight = "0"; oneWeight = "0";
} }
totalIncomingParice.set(totalIncomingParice.get().add(new BigDecimal(price).multiply(new BigDecimal(unloadNum1)))); String chargeType = chargeTypeMap.get(gn);
if(StringUtil.isBlank(chargeType)){
chargeType = "1";
}
if("1".equals(chargeType)){
totalIncomingParice.set(totalIncomingParice.get().add(new BigDecimal(price).multiply(new BigDecimal(unloadNum1))));
}else if("2".equals(chargeType)){
totalIncomingParice.set(totalIncomingParice.get().add(new BigDecimal(price).multiply(new BigDecimal(oneVolume))));
}else if("3".equals(chargeType)){
totalIncomingParice.set(totalIncomingParice.get().add(new BigDecimal(price).multiply(new BigDecimal(oneWeight))));
}
totalVolume.set(totalVolume.get().add(new BigDecimal(oneVolume).multiply(new BigDecimal(unloadNum1)))); totalVolume.set(totalVolume.get().add(new BigDecimal(oneVolume).multiply(new BigDecimal(unloadNum1))));
totalWeight.set(totalWeight.get().add(new BigDecimal(oneWeight).multiply(new BigDecimal(unloadNum1)))); totalWeight.set(totalWeight.get().add(new BigDecimal(oneWeight).multiply(new BigDecimal(unloadNum1))));
Integer n = goodsByNum.get(gn); Integer n = goodsByNum.get(gn);
@ -4816,7 +4830,17 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
if(StrUtil.isBlank(oneWeight)){ if(StrUtil.isBlank(oneWeight)){
oneWeight = "0"; oneWeight = "0";
} }
totalIncomingParice.set(totalIncomingParice.get().add(new BigDecimal(price).multiply(new BigDecimal(unloadNum1)))); String chargeType = chargeTypeMap.get(goodsName1);
if(StringUtil.isBlank(chargeType)){
chargeType = "1";
}
if("1".equals(chargeType)){
totalIncomingParice.set(totalIncomingParice.get().add(new BigDecimal(price).multiply(new BigDecimal(unloadNum1))));
}else if("2".equals(chargeType)){
totalIncomingParice.set(totalIncomingParice.get().add(new BigDecimal(price).multiply(new BigDecimal(oneVolume)).multiply(new BigDecimal(unloadNum1))));
}else if("3".equals(chargeType)){
totalIncomingParice.set(totalIncomingParice.get().add(new BigDecimal(price).multiply(new BigDecimal(oneWeight)).multiply(new BigDecimal(unloadNum1))));
}
totalVolume.set(totalVolume.get().add(new BigDecimal(oneVolume).multiply(new BigDecimal(unloadNum1)))); totalVolume.set(totalVolume.get().add(new BigDecimal(oneVolume).multiply(new BigDecimal(unloadNum1))));
totalWeight.set(totalWeight.get().add(new BigDecimal(oneWeight).multiply(new BigDecimal(unloadNum1)))); totalWeight.set(totalWeight.get().add(new BigDecimal(oneWeight).multiply(new BigDecimal(unloadNum1))));
Integer n = goodsByNum.get(goodsName1); Integer n = goodsByNum.get(goodsName1);

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml

@ -1197,6 +1197,7 @@
GROUP_CONCAT(lwwd.num) productNum, GROUP_CONCAT(lwwd.num) productNum,
GROUP_CONCAT(lwwd.volume) productVolume, GROUP_CONCAT(lwwd.volume) productVolume,
GROUP_CONCAT(lwwd.weight) productWeight, GROUP_CONCAT(lwwd.weight) productWeight,
GROUP_CONCAT(lwwd.charge_type) chargeTypes,
IFNULL(lww.total_freight,0) totalFreight, IFNULL(lww.total_freight,0) totalFreight,
IFNULL(lww.delivery_fee,0) deliveryFee, IFNULL(lww.delivery_fee,0) deliveryFee,
IFNULL(lww.pickup_fee,0) pickupFee, IFNULL(lww.pickup_fee,0) pickupFee,

Loading…
Cancel
Save