Browse Source

feat(all): 配送车次成本报表

1 增加车次完结时间字段
pre-production
zhaoqiaobo 3 weeks ago
parent
commit
1c0a822656
  1. 18
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/ExpenseDispatchTrainDetailEntity.java
  2. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/QualityDeliverServiceImpl.java
  3. 12
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/ExpenseDispatchWarehouseMonthMapper.xml

18
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/ExpenseDispatchTrainDetailEntity.java

@ -81,6 +81,24 @@ public class ExpenseDispatchTrainDetailEntity extends TenantEntity {
@ApiModelProperty(value = "车次完成时间")
@ExcelProperty("车次完成时间")
private Date trainCompletionTime;
/**
* 车次完成时间-
*/
@ApiModelProperty(value = "车次完成时间-年")
@ExcelProperty("车次完成时间-年")
private int trainCompletionYear;
/**
* 车次完成时间-
*/
@ApiModelProperty(value = "车次完成时间-月")
@ExcelProperty("车次完成时间-月")
private int trainCompletionMonth;
/**
* 车次完成时间-
*/
@ApiModelProperty(value = "车次完成时间-日")
@ExcelProperty("车次完成时间-日")
private int trainCompletionDay;
/**
* 目的仓
*/

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

@ -116,6 +116,9 @@ public class QualityDeliverServiceImpl extends BaseServiceImpl<QualityDeliverMap
BigDecimal fuelCost = BigDecimal.ZERO;
trainDetailEntity.setSettlementStatus("未结算");
for (QualityDeliverEntity qualityDeliverEntity : value) {
trainDetailEntity.setTrainCompletionYear(DateUtil.year(qualityDeliverEntity.getCarComplateTime()));
trainDetailEntity.setTrainCompletionMonth(DateUtil.month(qualityDeliverEntity.getCarComplateTime()) + 1);
trainDetailEntity.setTrainCompletionDay(DateUtil.dayOfMonth(qualityDeliverEntity.getCarComplateTime()));
trainDetailEntity.setTrainCompletionTime(qualityDeliverEntity.getCarComplateTime());
trainDetailEntity.setTotalOrderQuantity(qualityDeliverEntity.getOrderNumber());
trainDetailEntity.setDeliveryVehicle(qualityDeliverEntity.getSignCarNumber());

12
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/ExpenseDispatchWarehouseMonthMapper.xml

@ -32,9 +32,9 @@
<select id="expenseDispatchDetailMonthJob" resultType="com.logpm.statistics.entity.ExpenseDispatchWarehouseMonthEntity">
select t.destination_warehouse destinationWarehouse,
t.settlement_month settlementMonth,
t.settlement_year settlementYear,
concat(t.settlement_year,'年',t.settlement_month,'月') settlementTime,
t.train_completion_month settlementMonth,
t.train_completion_year settlementYear,
concat(t.train_completion_year,'年',t.train_completion_month,'月') settlementTime,
count(*) totalTrainService,
sum(t.planned_total_quantity) plannedTotalQuantity,
sum(t.inventory_item_count) inventoryItemCount,
@ -57,9 +57,9 @@
sum(t.change_amount) changeAmount,
sum(t.settlement_amount) settlementAmount
from logpm_expense_dispatch_train_detail t
where t.settlement_year = #{year}
and t.settlement_month = #{month}
group by t.settlement_month,t.settlement_year,t.destination_warehouse
where t.train_completion_year = #{year}
and t.train_completion_month = #{month}
group by t.train_completion_month,t.train_completion_year,t.destination_warehouse
</select>

Loading…
Cancel
Save