Browse Source

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

fix-sign
zhaoqiaobo 5 months ago
parent
commit
b88923faad
  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. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
  5. 15
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  6. 44
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/listener/mq/WaybillCheckListener.java
  7. 12
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml
  8. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml
  9. 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 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 = "卸车托盘")
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.default_payment_methods defaultPayWay
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
<if test="clientName != null and clientName != ''">
and lbc.client_name like CONCAT('%',#{clientName},'%')

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml

@ -41,6 +41,7 @@
t.customerName,
t.customerTelephone,
t.waybillNumber,
t.brand,
3 AS typeService,
t.warehouseEntryTime,
t.storageFee,
@ -107,7 +108,8 @@
IF(k.customerTelephone is not null, k.customerTelephone, m.customerTelephone) AS customerTelephone,
CONCAT_WS( ',', k.waybillNumber ) AS waybillNumber,
k.warehouse_entry_time AS warehouseEntryTime,
k.storage_fee AS storageFee
k.storage_fee AS storageFee,
k.brand
FROM
(
SELECT

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

@ -2558,22 +2558,11 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
distrilbutionBillLadingDTO.setPickupBatchs(strs);
distrilbutionBillLadingDTO.setOrderCodes(orderCodes);
//获取当前登录人仓库
List<BasicdataWarehouseEntity> warehouseList = basicdataWarehouseClient.getMyWarehouseList();
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
IPage<DistrilbutionBillLadingVO> distrilbutionBillLadingVOIPage = null;
List<Long> collect = null;
List<Long> collect = basicdataWarehouseClient.getWarehouseIds();
IPage<DistrilbutionBillLadingVO> distrilbutionBillLadingVOIPage = null;
if (Func.isNotEmpty(myCurrentWarehouse)) {
collect = new ArrayList<>();
collect.add(myCurrentWarehouse.getId());
} else {
// distrilbutionBillLadingVOIPage = baseMapper.getAllBillLadingByView(page, distrilbutionBillLadingDTO, collect);
collect = warehouseList.stream()
.map(BasicdataWarehouseEntity::getId)
.collect(Collectors.toList());
}
distrilbutionBillLadingVOIPage = baseMapper.pageList(page, distrilbutionBillLadingDTO, collect);

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();
// 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 warehousePrice = warehouseFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP);
BigDecimal handlingPrice = handlingFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP);
BigDecimal insurancePrice = insuranceFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP);
BigDecimal otherPrice = otherFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP);
BigDecimal thirdOperationPrice = thirdOperationFee.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), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal handlingPrice = handlingFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal insurancePrice = insuranceFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal otherPrice = otherFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal thirdOperationPrice = thirdOperationFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal trunklineComletPrice;
@ -230,14 +230,14 @@ public class WaybillCheckListener {
if(NumberUtil.equals(trunklineCompleteOrNot,1)){
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 {
trunklineComletPrice = BigDecimal.ZERO;
}
if(NumberUtil.equals(pickupCompleteOrNot,1)){
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 {
trunklinePickupPrice = BigDecimal.ZERO;
}
@ -499,14 +499,14 @@ public class WaybillCheckListener {
Integer totalCount = waybillEntity.getTotalCount();
// 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 warehousePrice = warehouseFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP);
BigDecimal handlingPrice = handlingFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP);
BigDecimal insurancePrice = insuranceFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP);
BigDecimal otherPrice = otherFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP);
BigDecimal thirdOperationPrice = thirdOperationFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP);
BigDecimal sortingPrice = sortingFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP);
BigDecimal deliveryPrice = deliveryFee.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), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal handlingPrice = handlingFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal insurancePrice = insuranceFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal otherPrice = otherFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal thirdOperationPrice = thirdOperationFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP);
BigDecimal sortingPrice = sortingFee.divide(new BigDecimal(totalCount), 8, 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.setSystemPickupChargeType(systemPickupChargeType);
BigDecimal packageWeight = productTotalWeight.divide(new BigDecimal(num), 2, BigDecimal.ROUND_HALF_UP);//平摊到包件的质量
BigDecimal packageVolume = productTotalVolume.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), 8, BigDecimal.ROUND_HALF_UP);//平摊到包件的体积
trunklinePackageEntity.setWeight(Objects.isNull(packageWeight) ? BigDecimal.ZERO : packageWeight);
trunklinePackageEntity.setVolume(Objects.isNull(packageVolume) ? BigDecimal.ZERO : packageVolume);
@ -740,8 +740,8 @@ public class WaybillCheckListener {
Integer num = warehouseWayBillDetail.getNum();//运单品类的总数量
BigDecimal productTotalVolume = warehouseWayBillDetail.getVolume();//运单品类总体积
BigDecimal packageWeight = productTotalWeight.divide(new BigDecimal(num), 2, BigDecimal.ROUND_HALF_UP);//平摊到包件的质量
BigDecimal packageVolume = productTotalVolume.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), 8, BigDecimal.ROUND_HALF_UP);//平摊到包件的体积
warehousePackageEntity.setWeight(packageWeight);
warehousePackageEntity.setVolume(packageVolume);
@ -794,8 +794,8 @@ public class WaybillCheckListener {
Integer num = warehouseWayBillDetail.getNum();
BigDecimal productTotalVolume = warehouseWayBillDetail.getVolume();
BigDecimal packageWeight = productTotalWeight.divide(new BigDecimal(num), 2, BigDecimal.ROUND_HALF_UP);
BigDecimal packageVolume = productTotalVolume.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), 8, BigDecimal.ROUND_HALF_UP);
distributionPackageEntity.setWeight(packageWeight);
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 != '' ">
and ltb.create_user_name = #{param.createUserName}
</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
order by ltb.create_time desc
</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
from logpm_trunkline_cars_load_scan
where load_id = #{loadId}
and final_node_id = #{nodeId}
and (unload_node_id = #{nodeId} or unload_node_id is null)
and unload_node_id = #{nodeId}
and waybill_no is not null
group by waybill_no
</select>
@ -761,7 +760,9 @@
ltcls.customer_name customerName,
ltcls.customer_telephone customerTelephone,
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
left join logpm_warehouse_waybill lww on ltcls.waybill_id = lww.id
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.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);
}
@ -407,7 +413,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
//开始提货
if ("1".equals(billladingStatus)) {
billladingEntity.setBillladingStatus("2");
billladingEntity.setStartTime(new Date());
billladingEntity.setStartTime(CommonUtil.StringToDate(completeTime));
stringBuffer.append(",未开始变更为提货中");
} else {
log.warn("##################updateBillladingStatus: 提货单不能更新为提货中 billladingStatus={}", billladingStatus);

Loading…
Cancel
Save