Browse Source

Merge branch 'pre-production'

master
pref_mail@163.com 1 month ago
parent
commit
d95dddb485
  1. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryListExcel.java
  2. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  3. 14
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/DeliverFinishReportListener.java

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryListExcel.java

@ -17,6 +17,7 @@
package com.logpm.distribution.excel;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
@ -41,15 +42,14 @@ public class DistributionDeliveryListExcel implements Serializable {
private static final long serialVersionUID = 1L;
@ExcelIgnore()
private Long id;
/**
* 车次
*/
@ColumnWidth(20)
@ExcelProperty("车次")
@ExcelProperty("车次")
private String trainNumber;
/**
* 车次

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

@ -318,7 +318,7 @@
<select id="exportDistributionDeliveryList" resultType="com.logpm.distribution.excel.DistributionDeliveryListExcel">
SELECT
lddl.id id,
lddl.id AS id,
lww.NAME AS warehouseName,
lddl.train_number trainNumber,
lddl.warehouse_name warehouseName,
@ -578,7 +578,7 @@
and date_format(lddl.task_time,'%y%m%d%') = date_format(#{param.taskTime},'%y%m%d%')
</if>
<if test="param.taskTimeStart!=null and param.taskTimeStart!=''">
and date_format(lddl.task_time,'%y%m%d%') BETWEEN #{param.taskTimeStart} AND #{param.taskTimeEnd}
and date_format(lddl.task_time,'%y%m%d%') BETWEEN date_format(#{param.taskTimeStart},'%y%m%d%') AND date_format(#{param.taskTimeEnd},'%y%m%d%')
</if>
</where>
GROUP BY lddl.id ,

14
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/DeliverFinishReportListener.java

@ -142,7 +142,9 @@ public class DeliverFinishReportListener implements ReportService {
for (QualityDeliverEntity qualityDeliverEntity : value) {
QualityDeliverEntity entity = new QualityDeliverEntity();
entity.setId(qualityDeliverEntity.getId());
entity.setCarComplateTime(new Date());
if(ObjectUtil.isEmpty(entity.getCarComplateTime())){
entity.setCarComplateTime(new Date());
}
entity.setOrderCode(qualityDeliverEntity.getOrderCode());
entity.setWaybillNumber(qualityDeliverEntity.getWaybillNumber());
entity.setConditions(qualityDeliverEntity.getConditions());
@ -1085,6 +1087,7 @@ public class DeliverFinishReportListener implements ReportService {
return;
}
}
BigDecimal reduce = BigDecimal.ZERO;
for (Map.Entry<String, QualityDeliverEntity> entry : map.entrySet()) {
QualityDeliverEntity value1 = entry.getValue();
String warehousePosition = value1.getWarehousePosition();
@ -1100,13 +1103,10 @@ public class DeliverFinishReportListener implements ReportService {
}
// A-B B-C C-D 每一个点为起点到下一个点的距离
Long distance = GaoDeApiUtil.measureDistance(beforePositioning, arrivePositioning);
// 获取上一个点位的总距离
BigDecimal reduce = BigDecimal.ZERO;
if(CollUtil.isNotEmpty(allRouteMap)){
reduce = allRouteMap.values().stream().map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add);
}
String str = Convert.toStr(ObjectUtil.isNotEmpty(distance) ? NumberUtil.div(new BigDecimal(distance), 1000) : 0L / 1000);
allRouteMap.put(value1.getSignReservationCode(), Convert.toStr(NumberUtil.add(reduce, new BigDecimal(str))));
// 获取上一个点位的总距离
reduce = NumberUtil.add(reduce, new BigDecimal(str));
allRouteMap.put(value1.getSignReservationCode(), Convert.toStr(reduce));
beforePositioning = arrivePositioning;
}
}

Loading…
Cancel
Save