Browse Source

1.干线bug修复

fix-sign
zhenghaoyu 5 months ago
parent
commit
4b21002db2
  1. 13
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/BillladingDTO.java
  2. 6
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/LoadingDetailExportVO.java
  3. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataClientMapper.xml
  4. 44
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/listener/mq/WaybillCheckListener.java
  5. 12
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml
  6. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml
  7. 8
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java

13
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/BillladingDTO.java

@ -56,4 +56,17 @@ public class BillladingDTO extends TrunklineBillladingEntity {
private String completeTime;//目的仓 private String completeTime;//目的仓
private Long billladingId; private Long billladingId;
private String startTimeStartStr;
private String startTimeEndStr;
private Date startTimeStart;
private Date startTimeEnd;
private String completeTimeStartStr;
private String completeTimeEndStr;
private Date completeTimeStart;
private Date completeTimeEnd;
} }

6
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/LoadingDetailExportVO.java

@ -112,4 +112,10 @@ public class LoadingDetailExportVO implements Serializable {
@ExcelProperty(value = "卸车托盘") @ExcelProperty(value = "卸车托盘")
private String unloadTrayName; private String unloadTrayName;
@ExcelProperty(value = "物料编码")
private String materialCode;
@ExcelProperty(value = "物料编码")
private String materialName;
} }

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataClientMapper.xml

@ -65,7 +65,7 @@
lbc.blade_region_area_id areaId, lbc.blade_region_area_id areaId,
lbc.default_payment_methods defaultPayWay lbc.default_payment_methods defaultPayWay
from logpm_basicdata_client lbc from logpm_basicdata_client lbc
left join logpm_basicdata_store_contact lbsc on lbsc.shop_id = lbc.id left join logpm_basicdata_store_contact lbsc on lbsc.shop_id = lbc.id and lbsc.is_deleted = 0
where lbc.is_deleted = 0 where lbc.is_deleted = 0
<if test="clientName != null and clientName != ''"> <if test="clientName != null and clientName != ''">
and lbc.client_name like CONCAT('%',#{clientName},'%') and lbc.client_name like CONCAT('%',#{clientName},'%')

44
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/listener/mq/WaybillCheckListener.java

@ -217,12 +217,12 @@ public class WaybillCheckListener {
Integer totalCount = waybillEntity.getTotalCount(); Integer totalCount = waybillEntity.getTotalCount();
// BigDecimal pickupPrice = pickupFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); // BigDecimal pickupPrice = pickupFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP);
BigDecimal warehouseManagementPrice = warehouseManagementFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); BigDecimal warehouseManagementPrice = warehouseManagementFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal warehousePrice = warehouseFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); BigDecimal warehousePrice = warehouseFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal handlingPrice = handlingFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); BigDecimal handlingPrice = handlingFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal insurancePrice = insuranceFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); BigDecimal insurancePrice = insuranceFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal otherPrice = otherFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); BigDecimal otherPrice = otherFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal thirdOperationPrice = thirdOperationFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); BigDecimal thirdOperationPrice = thirdOperationFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal trunklineComletPrice; BigDecimal trunklineComletPrice;
@ -230,14 +230,14 @@ public class WaybillCheckListener {
if(NumberUtil.equals(trunklineCompleteOrNot,1)){ if(NumberUtil.equals(trunklineCompleteOrNot,1)){
BigDecimal totalFreight = waybillEntity.getTotalFreight(); BigDecimal totalFreight = waybillEntity.getTotalFreight();
trunklineComletPrice = totalFreight.divide(new BigDecimal(totalCount),2, BigDecimal.ROUND_HALF_UP); trunklineComletPrice = totalFreight.divide(new BigDecimal(totalCount),8, BigDecimal.ROUND_HALF_UP);
} else { } else {
trunklineComletPrice = BigDecimal.ZERO; trunklineComletPrice = BigDecimal.ZERO;
} }
if(NumberUtil.equals(pickupCompleteOrNot,1)){ if(NumberUtil.equals(pickupCompleteOrNot,1)){
BigDecimal pickupFee = waybillEntity.getPickupFee(); BigDecimal pickupFee = waybillEntity.getPickupFee();
trunklinePickupPrice = pickupFee.divide(new BigDecimal(totalCount),2, BigDecimal.ROUND_HALF_UP); trunklinePickupPrice = pickupFee.divide(new BigDecimal(totalCount),8, BigDecimal.ROUND_HALF_UP);
} else { } else {
trunklinePickupPrice = BigDecimal.ZERO; trunklinePickupPrice = BigDecimal.ZERO;
} }
@ -499,14 +499,14 @@ public class WaybillCheckListener {
Integer totalCount = waybillEntity.getTotalCount(); Integer totalCount = waybillEntity.getTotalCount();
// BigDecimal pickupPrice = pickupFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); // BigDecimal pickupPrice = pickupFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP);
BigDecimal warehouseManagementPrice = warehouseManagementFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); BigDecimal warehouseManagementPrice = warehouseManagementFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal warehousePrice = warehouseFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); BigDecimal warehousePrice = warehouseFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal handlingPrice = handlingFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); BigDecimal handlingPrice = handlingFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal insurancePrice = insuranceFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); BigDecimal insurancePrice = insuranceFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal otherPrice = otherFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); BigDecimal otherPrice = otherFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal thirdOperationPrice = thirdOperationFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); BigDecimal thirdOperationPrice = thirdOperationFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal sortingPrice = sortingFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); BigDecimal sortingPrice = sortingFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal deliveryPrice = deliveryFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); BigDecimal deliveryPrice = deliveryFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP);
//查询运单下所有的订单 //查询运单下所有的订单
@ -632,8 +632,8 @@ public class WaybillCheckListener {
trunklinePackageEntity.setPickupChargeType(systemPickupChargeType); trunklinePackageEntity.setPickupChargeType(systemPickupChargeType);
trunklinePackageEntity.setSystemPickupChargeType(systemPickupChargeType); trunklinePackageEntity.setSystemPickupChargeType(systemPickupChargeType);
BigDecimal packageWeight = productTotalWeight.divide(new BigDecimal(num), 2, BigDecimal.ROUND_HALF_UP);//平摊到包件的质量 BigDecimal packageWeight = productTotalWeight.divide(new BigDecimal(num), 8, BigDecimal.ROUND_HALF_UP);//平摊到包件的质量
BigDecimal packageVolume = productTotalVolume.divide(new BigDecimal(num), 2, BigDecimal.ROUND_HALF_UP);//平摊到包件的体积 BigDecimal packageVolume = productTotalVolume.divide(new BigDecimal(num), 8, BigDecimal.ROUND_HALF_UP);//平摊到包件的体积
trunklinePackageEntity.setWeight(Objects.isNull(packageWeight) ? BigDecimal.ZERO : packageWeight); trunklinePackageEntity.setWeight(Objects.isNull(packageWeight) ? BigDecimal.ZERO : packageWeight);
trunklinePackageEntity.setVolume(Objects.isNull(packageVolume) ? BigDecimal.ZERO : packageVolume); trunklinePackageEntity.setVolume(Objects.isNull(packageVolume) ? BigDecimal.ZERO : packageVolume);
@ -740,8 +740,8 @@ public class WaybillCheckListener {
Integer num = warehouseWayBillDetail.getNum();//运单品类的总数量 Integer num = warehouseWayBillDetail.getNum();//运单品类的总数量
BigDecimal productTotalVolume = warehouseWayBillDetail.getVolume();//运单品类总体积 BigDecimal productTotalVolume = warehouseWayBillDetail.getVolume();//运单品类总体积
BigDecimal packageWeight = productTotalWeight.divide(new BigDecimal(num), 2, BigDecimal.ROUND_HALF_UP);//平摊到包件的质量 BigDecimal packageWeight = productTotalWeight.divide(new BigDecimal(num), 8, BigDecimal.ROUND_HALF_UP);//平摊到包件的质量
BigDecimal packageVolume = productTotalVolume.divide(new BigDecimal(num), 2, BigDecimal.ROUND_HALF_UP);//平摊到包件的体积 BigDecimal packageVolume = productTotalVolume.divide(new BigDecimal(num), 8, BigDecimal.ROUND_HALF_UP);//平摊到包件的体积
warehousePackageEntity.setWeight(packageWeight); warehousePackageEntity.setWeight(packageWeight);
warehousePackageEntity.setVolume(packageVolume); warehousePackageEntity.setVolume(packageVolume);
@ -794,8 +794,8 @@ public class WaybillCheckListener {
Integer num = warehouseWayBillDetail.getNum(); Integer num = warehouseWayBillDetail.getNum();
BigDecimal productTotalVolume = warehouseWayBillDetail.getVolume(); BigDecimal productTotalVolume = warehouseWayBillDetail.getVolume();
BigDecimal packageWeight = productTotalWeight.divide(new BigDecimal(num), 2, BigDecimal.ROUND_HALF_UP); BigDecimal packageWeight = productTotalWeight.divide(new BigDecimal(num), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal packageVolume = productTotalVolume.divide(new BigDecimal(num), 2, BigDecimal.ROUND_HALF_UP); BigDecimal packageVolume = productTotalVolume.divide(new BigDecimal(num), 8, BigDecimal.ROUND_HALF_UP);
distributionPackageEntity.setWeight(packageWeight); distributionPackageEntity.setWeight(packageWeight);
distributionPackageEntity.setVolume(packageVolume); distributionPackageEntity.setVolume(packageVolume);

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

@ -61,6 +61,18 @@
<if test="param.createUserName != null and param.createUserName != '' "> <if test="param.createUserName != null and param.createUserName != '' ">
and ltb.create_user_name = #{param.createUserName} and ltb.create_user_name = #{param.createUserName}
</if> </if>
<if test="param.startTimeStart != null ">
and ltb.start_time &gt;= #{param.startTimeStart}
</if>
<if test="param.startTimeEnd != null ">
and ltb.start_time &lt;= #{param.startTimeEnd}
</if>
<if test="param.completeTimeStart != null ">
and ltb.end_time &gt;= #{param.completeTimeStart}
</if>
<if test="param.completeTimeEnd != null ">
and ltb.end_time &lt;= #{param.completeTimeEnd}
</if>
group by ltb.id group by ltb.id
order by ltb.create_time desc order by ltb.create_time desc
</select> </select>

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

@ -557,8 +557,7 @@
IFNULL(sum(IF(unload_node_id = null,0,unload_num)),0) unloadNum IFNULL(sum(IF(unload_node_id = null,0,unload_num)),0) unloadNum
from logpm_trunkline_cars_load_scan from logpm_trunkline_cars_load_scan
where load_id = #{loadId} where load_id = #{loadId}
and final_node_id = #{nodeId} and unload_node_id = #{nodeId}
and (unload_node_id = #{nodeId} or unload_node_id is null)
and waybill_no is not null and waybill_no is not null
group by waybill_no group by waybill_no
</select> </select>
@ -761,7 +760,9 @@
ltcls.customer_name customerName, ltcls.customer_name customerName,
ltcls.customer_telephone customerTelephone, ltcls.customer_telephone customerTelephone,
ltcls.customer_address customerAddress, ltcls.customer_address customerAddress,
ltcls.unload_tray_name unloadTrayName ltcls.unload_tray_name unloadTrayName,
ltcls.material_code materialCode,
ltcls.material_name materialName
from logpm_trunkline_cars_load_scan ltcls from logpm_trunkline_cars_load_scan ltcls
left join logpm_warehouse_waybill lww on ltcls.waybill_id = lww.id left join logpm_warehouse_waybill lww on ltcls.waybill_id = lww.id
where ltcls.load_id = #{param.loadId} where ltcls.load_id = #{param.loadId}

8
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java

@ -61,6 +61,12 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
page.setCurrent(billladingDTO.getPageNum()); page.setCurrent(billladingDTO.getPageNum());
page.setSize(billladingDTO.getPageSize()); page.setSize(billladingDTO.getPageSize());
billladingDTO.setStartTimeStart(CommonUtil.getStartByDateStr(billladingDTO.getStartTimeStartStr()));
billladingDTO.setStartTimeEnd(CommonUtil.getEndByDateStr(billladingDTO.getStartTimeEndStr()));
billladingDTO.setCompleteTimeStart(CommonUtil.getStartByDateStr(billladingDTO.getCompleteTimeStartStr()));
billladingDTO.setCompleteTimeEnd(CommonUtil.getEndByDateStr(billladingDTO.getCompleteTimeEndStr()));
return baseMapper.pageList(page,billladingDTO); return baseMapper.pageList(page,billladingDTO);
} }
@ -407,7 +413,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
//开始提货 //开始提货
if ("1".equals(billladingStatus)) { if ("1".equals(billladingStatus)) {
billladingEntity.setBillladingStatus("2"); billladingEntity.setBillladingStatus("2");
billladingEntity.setStartTime(new Date()); billladingEntity.setStartTime(CommonUtil.StringToDate(completeTime));
stringBuffer.append(",未开始变更为提货中"); stringBuffer.append(",未开始变更为提货中");
} else { } else {
log.warn("##################updateBillladingStatus: 提货单不能更新为提货中 billladingStatus={}", billladingStatus); log.warn("##################updateBillladingStatus: 提货单不能更新为提货中 billladingStatus={}", billladingStatus);

Loading…
Cancel
Save