Browse Source

add:增加干线卸车作业节点

pre-production
pref_mail@163.com 3 months ago
parent
commit
23d14acc5f
  1. 29
      blade-biz-common/src/main/java/org/springblade/common/serializer/BigDecimal4WVSerializer.java
  2. 29
      blade-biz-common/src/main/java/org/springblade/common/serializer/BigDecimalSerializer.java
  3. 62
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/TrunklineCarCostEntity.java
  4. 20
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/vo/StatisticsOrderInfoVO.java
  5. 281
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/vo/TrunklineCarCostExcel.java
  6. 4
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseWaybillClient.java
  7. 27
      blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java
  8. 49
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/controller/TrunklineCarCostController.java
  9. 11
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/listener/mq/StationArrivedEnterListener.java
  10. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseWaybillClient.java
  11. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.java
  12. 6
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml
  13. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java
  14. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

29
blade-biz-common/src/main/java/org/springblade/common/serializer/BigDecimal4WVSerializer.java

@ -0,0 +1,29 @@
package org.springblade.common.serializer;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException;
import java.math.BigDecimal;
/**
* 重量提价方面的格式化
* 页面呈现4位小数
*
* @see BigDecimal
* @用法 @JsonSerialize(using = BigDecimalSerializer.class)
*/
public class BigDecimal4WVSerializer extends JsonSerializer<BigDecimal> {
@Override
public void serialize(BigDecimal bigDecimal, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
if (bigDecimal != null) {
BigDecimal number = bigDecimal.setScale(4, BigDecimal.ROUND_HALF_UP);
jsonGenerator.writeNumber(number);
} else {
jsonGenerator.writeNumber(bigDecimal);
}
}
}

29
blade-biz-common/src/main/java/org/springblade/common/serializer/BigDecimalSerializer.java

@ -0,0 +1,29 @@
package org.springblade.common.serializer;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException;
import java.math.BigDecimal;
/**
* 金额方面的格式化
* 页面呈现2位小数
*
* @see BigDecimal
* @用法 @JsonSerialize(using = BigDecimalSerializer.class)
*/
public class BigDecimalSerializer extends JsonSerializer<BigDecimal> {
@Override
public void serialize(BigDecimal bigDecimal, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
if (bigDecimal != null) {
BigDecimal number = bigDecimal.setScale(2, BigDecimal.ROUND_HALF_UP);
jsonGenerator.writeNumber(number);
} else {
jsonGenerator.writeNumber(bigDecimal);
}
}
}

62
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/TrunklineCarCostEntity.java

@ -1,7 +1,10 @@
package com.logpm.statistics.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.springblade.common.serializer.BigDecimalSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
@ -18,42 +21,50 @@ public class TrunklineCarCostEntity extends TenantEntity {
/**
* 申请时间
*/
@ApiModelProperty(value = "申请时间")
private Date effectTime;
/**
* 车牌号
*/
@ApiModelProperty(value = "车牌号")
private String plateNumber;
/**
* 司机名称
*/
@ApiModelProperty(value = "司机名称")
private String driverName;
/**
* 实际收款人
*/
@ApiModelProperty(value = "实际收款人")
private String actualReceivablePerson;
/**
* 车次号码
*/
@ApiModelProperty(value = "车次号码")
private String carsNo;
/**
* 车次类型 外请 自有 目前该字段不使用
* 车次类型 1外请 2自有 目前该字段不使用
*
*/
@ApiModelProperty(value = "车次类型 1外请 2自有 ")
private Integer carsNoType;
/**
* 调车员
*/
@ApiModelProperty(value = "调车员")
private String driverStaff;
/**
* 车辆类型结算车辆类型
*/
@ApiModelProperty(value = "车辆类型")
private String vehicleType;
// /**
@ -64,156 +75,203 @@ public class TrunklineCarCostEntity extends TenantEntity {
/**
* 货物品牌多个拼接在一起
*/
@ApiModelProperty(value = "货物品牌,多个拼接在一起")
private String brands;
/**
* 起始站点
*/
@ApiModelProperty(value = "起始站点")
private String startStation;
/**
* 外请网点
*/
@ApiModelProperty(value = "外请网点")
private String outStation;
/**
* 货数
*/
@ApiModelProperty(value = "货数")
private Integer goodsNum;
/**
* 原价
*/
@ApiModelProperty(value = "原价")
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal originalPrice;
/**
* 实际驾驶员费用
*/
@ApiModelProperty(value = "实际驾驶员费用(元)")
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal actualDriverFee;
/**
* 燃油卡费
*/
@ApiModelProperty(value = "燃油卡费(元)")
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal fuelCardFee;
/**
* 路桥费f
*/
@ApiModelProperty(value = "路桥费(元)")
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal bridgeFee;
/**
* 现付运输费
*/
@ApiModelProperty(value = "现付运输费(元)")
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal nowFreightFee;
/**
* 回收货运费
*/
@ApiModelProperty(value = "回收货运费(元)")
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal returnFreightFee;
/**
* 到付运输费
*/
@ApiModelProperty(value = "到付运输费(元)")
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal payFreightFee;
/**
* 整车信息费
*/
@ApiModelProperty(value = "整车信息费(元)")
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal trailerInsuranceFee;
/**
* 整车保险费
*/
@ApiModelProperty(value = "整车保险费(元)")
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal trailerInsuranceCost;
/**
* 整车落地费
*/
@ApiModelProperty(value = "整车落地费(元)")
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal landingFee;
/**
* 发站装车费
*/
@ApiModelProperty(value = "发站装车费(元)")
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal stationLoadingFee;
/**
* 发站其它费
*/
@ApiModelProperty(value = "发站其它费(元)")
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal otherStationFee;
/**
* 到站卸车费
*/
@ApiModelProperty(value = "到站卸车费(元)")
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal stationUnloadingFee;
/**
* 其他费用
*/
@ApiModelProperty(value = "其他费用(元)")
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal otherFee;
/**
*额外费用
*/
@ApiModelProperty(value = "额外费用(元)")
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal additionalFee;
/**
* 平台结算fee
*/
@ApiModelProperty(value = "平台结算fee(元)")
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal platformSettlementFee;
/**
*钉钉编号
*/
@ApiModelProperty(value = "钉钉编号")
private String dingDingNumber;
/**
* 平台订单号
*/
@ApiModelProperty(value = "平台订单号")
private String platformOrderNumber;
/**
* 付款时间
*/
@ApiModelProperty(value = "付款时间")
private Date paymentTime;
/**
* 付款方名称
*/
@ApiModelProperty(value = "付款方名称")
private String paymentName;
/**
* 付款方账号
*/
@ApiModelProperty(value = "付款方账号")
private String paymentAccount;
/**
* 收款方如是平台叫车该字段未平台名称
*/
@ApiModelProperty(value = "收款方如是平台叫车该字段未平台名称")
private String receiveName;
/**
* 收款账号
*/
@ApiModelProperty(value = "收款账号")
private String receiveAccount;
/**
* 线路名称
*/
@ApiModelProperty(value = "线路名称")
private String routeName;
/**
* 付款记录
* 付款记录ID
*/
@ApiModelProperty(value = "付款记录ID")
private String carPayId;
/**
* 是否确认1确认0未确认
*/
@ApiModelProperty(value = "是否确认1确认0未确认")
private Integer isEnter;
/**
* 是否支付0未支付1已支付
*/
@ApiModelProperty(value = "是否支付(0:未支付,1:已支付)")
private Integer isPayment;
}

20
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/vo/StatisticsOrderInfoVO.java

@ -1,5 +1,8 @@
package com.logpm.statistics.vo;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.springblade.common.serializer.BigDecimal4WVSerializer;
import org.springblade.common.serializer.BigDecimalSerializer;
import lombok.Data;
import java.io.Serializable;
@ -54,23 +57,34 @@ public class StatisticsOrderInfoVO implements Serializable {
*/
private String goodsPrice;
private Integer totalNum;//订单数量
@JsonSerialize(using = BigDecimal4WVSerializer.class)
private BigDecimal totalWeight;//订单重量
@JsonSerialize(using = BigDecimal4WVSerializer.class)
private BigDecimal totalVolume;//订单体积
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal sysTotalFee;
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal totalFee;
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal systemFreightPrice;
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal freightPrice;
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal systemPickupPrice;
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal pickupPrice;
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal warehouseServiceFee;
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal warehouseFee;
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal warehouseManageFee;
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal warehouseSortingFee;
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal warehouseOperatingFee;
private BigDecimal systemDeliveryFee;
private BigDecimal deliveryFee;
private BigDecimal deliveryServiceFee;

281
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/vo/TrunklineCarCostExcel.java

@ -0,0 +1,281 @@
package com.logpm.statistics.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.format.NumberFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class TrunklineCarCostExcel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 申请时间
*/
@ExcelProperty(value = "申请时间")
@DateTimeFormat("yyyy-MM-dd")
private Date effectTime;
/**
* 车牌号
*/
@ExcelProperty(value = "车牌号")
private String plateNumber;
/**
* 司机名称
*/
@ExcelProperty(value = "司机名称")
private String driverName;
/**
* 实际收款人
*/
@ExcelProperty(value = "实际收款人")
private String actualReceivablePerson;
/**
* 车次号码
*/
@ExcelProperty(value = "车次号码")
private String carsNo;
/**
* 车次类型 1外请 2自有 目前该字段不使用
*
*/
@ExcelProperty(value = "车次类型 1外请 2自有 ")
private Integer carsNoType;
/**
* 调车员
*/
@ExcelProperty(value = "调车员")
private String driverStaff;
/**
* 车辆类型结算车辆类型
*/
@ExcelProperty(value = "车辆类型")
private String vehicleType;
// /**
// * 客户名称 和货物品牌 相同
// */
// private String customerName;
/**
* 货物品牌多个拼接在一起
*/
@ExcelProperty(value = "货物品牌,多个拼接在一起")
private String brands;
/**
* 起始站点
*/
@ExcelProperty(value = "起始站点")
private String startStation;
/**
* 外请网点
*/
@ExcelProperty(value = "外请网点")
private String outStation;
/**
* 货数
*/
@ExcelProperty(value = "货数")
private Integer goodsNum;
/**
* 原价
*/
@ExcelProperty(value = "原价")
@NumberFormat("##.00")
private BigDecimal originalPrice;
/**
* 实际驾驶员费用
*/
@ExcelProperty(value = "实际驾驶员费用(元)")
@NumberFormat("##.00")
private BigDecimal actualDriverFee;
/**
* 燃油卡费
*/
@ExcelProperty(value = "燃油卡费(元)")
@NumberFormat("0.00")
private BigDecimal fuelCardFee;
/**
* 路桥费f
*/
@ExcelProperty(value = "路桥费(元)")
@NumberFormat("0.00")
private BigDecimal bridgeFee;
/**
* 现付运输费
*/
@ExcelProperty(value = "现付运输费(元)")
@NumberFormat("0.00")
private BigDecimal nowFreightFee;
/**
* 回收货运费
*/
@ExcelProperty(value = "回收货运费(元)")
@NumberFormat("0.00")
private BigDecimal returnFreightFee;
/**
* 到付运输费
*/
@ExcelProperty(value = "到付运输费(元)")
@NumberFormat("0.00")
private BigDecimal payFreightFee;
/**
* 整车信息费
*/
@ExcelProperty(value = "整车信息费(元)")
@NumberFormat("0.00")
private BigDecimal trailerInsuranceFee;
/**
* 整车保险费
*/
@ExcelProperty(value = "整车保险费(元)")
@NumberFormat("0.00")
private BigDecimal trailerInsuranceCost;
/**
* 整车落地费
*/
@ExcelProperty(value = "整车落地费(元)")
@NumberFormat("0.00")
private BigDecimal landingFee;
/**
* 发站装车费
*/
@ExcelProperty(value = "发站装车费(元)")
@NumberFormat("0.00")
private BigDecimal stationLoadingFee;
/**
* 发站其它费
*/
@ExcelProperty(value = "发站其它费(元)")
@NumberFormat("0.00")
private BigDecimal otherStationFee;
/**
* 到站卸车费
*/
@ExcelProperty(value = "到站卸车费(元)")
@NumberFormat("0.00")
private BigDecimal stationUnloadingFee;
/**
* 其他费用
*/
@ExcelProperty(value = "其他费用(元)")
@NumberFormat("0.00")
private BigDecimal otherFee;
/**
*额外费用
*/
@ExcelProperty(value = "额外费用(元)")
@NumberFormat("0.00")
private BigDecimal additionalFee;
//
// /**
// * 平台结算fee(元)
// */
// @ExcelProperty(value = "平台结算fee(元)")
// @NumberFormat("0.00")
// private BigDecimal platformSettlementFee;
//
// /**
// *钉钉编号
// */
// @ExcelProperty(value = "钉钉编号")
// private String dingDingNumber;
//
// /**
// * 平台订单号
// */
// @ExcelProperty(value = "平台订单号")
// private String platformOrderNumber;
//
// /**
// * 付款时间
// */
// @ExcelProperty(value = "付款时间")
// @DateTimeFormat("yyyy-MM-dd")
// private Date paymentTime;
//
// /**
// * 付款方名称
// */
// @ExcelProperty(value = "付款方名称")
// private String paymentName;
//
// /**
// * 付款方账号
// */
// @ExcelProperty(value = "付款方账号")
// private String paymentAccount;
//
// /**
// * 收款方如是平台叫车该字段未平台名称
// */
// @ExcelProperty(value = "收款方如是平台叫车该字段未平台名称")
// private String receiveName;
//
// /**
// * 收款账号
// */
// @ExcelProperty(value = "收款账号")
// private String receiveAccount;
//
// /**
// * 线路名称
// */
// @ExcelProperty(value = "线路名称")
// private String routeName;
//
// /**
// * 付款记录ID
// */
// @ExcelProperty(value = "付款记录ID")
// private String carPayId;
//
// /**
// * 是否确认1确认0未确认
// */
// @ExcelProperty(value = "是否确认1确认0未确认")
// private Integer isEnter;
//
// /**
// * 是否支付(0:未支付,1:已支付)
// */
// @ExcelProperty(value = "是否支付(0:未支付,1:已支付)")
// private Integer isPayment;
}

4
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseWaybillClient.java

@ -105,4 +105,8 @@ public interface IWarehouseWaybillClient {
@GetMapping(API_PREFIX+"/updateWaybillCondigneeId")
void updateWaybillCondigneeIdToNull(@RequestParam Long waybillId);
@GetMapping(API_PREFIX + "/findWaybillVOByOrderCode")
List<WarehouseWaybillEntity> findWaybillVOByOrderCode(@RequestParam String orderCode);
}

27
blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java

@ -77,11 +77,11 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService {
// 移除当前的仓库
groupedByWarehouse.remove(result.getDepartureWarehouseName());
result.setStartWarehouseNumber(startWarehouseNumber);
temp +=startWarehouseNumber!=null?startWarehouseNumber.getNumber():temp;
temp +=startWarehouseNumber!=null?startWarehouseNumber.getNumber():0;
/*********************************m目的仓 start********************************/
String destinationWarehouseName = result.getDestinationWarehouseName();
WarehouseNumberVO endWarehouseNumber=buildWarehouse(groupedByWarehouse,destinationWarehouseName);
temp +=endWarehouseNumber!=null?endWarehouseNumber.getNumber():temp;
temp +=endWarehouseNumber!=null?endWarehouseNumber.getNumber():0;
// 计算预约数量
List<DistributionParcelListEntity> end = groupedByWarehouse.get(destinationWarehouseName);
@ -102,7 +102,7 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService {
}
WarehouseNumberVO middleWarehouseNumberVO = buildWarehouse(groupedByWarehouse,key);
models.add(middleWarehouseNumberVO);
temp +=middleWarehouseNumberVO!=null?middleWarehouseNumberVO.getNumber():temp;
temp +=middleWarehouseNumberVO!=null?middleWarehouseNumberVO.getNumber():0;
}
// 加入中转的数据
result.setMiddleWarehouseNumber(models);
@ -190,14 +190,17 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService {
private R dataOrder(String order) {
// 通过订单查询站存单导入时间
//todo
return null;
// 通过订单查询运单号
List<WarehouseWaybillEntity> waybillVOByOrderCode = warehouseWaybillClient.findWaybillVOByOrderCode(order);
// 对集合中的运单号进行分组
Map<String, List<WarehouseWaybillEntity>> groupedByWaybillNo = waybillVOByOrderCode.stream()
.collect(Collectors.groupingBy(WarehouseWaybillEntity::getWaybillNo));
Set<String> keys = groupedByWaybillNo.keySet();
List<WaybillInfoVO> data = new ArrayList<>();
for (String key : keys) {
WaybillInfoVO waybillInfoVO = dataWEaybill(key);
data.add(waybillInfoVO);
}
return R.data(data);
}
}

49
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/controller/TrunklineCarCostController.java

@ -1,26 +1,33 @@
package com.logpm.statistics.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.statistics.dto.MerchantStatisticsDTO;
import com.logpm.statistics.entity.ExpenseDispatchPriceOverZoneEntity;
import com.logpm.statistics.entity.TrunklineCarCostEntity;
import com.logpm.statistics.query.ExpenseDispatchTrainDetailMonthQuery;
import com.logpm.statistics.service.ITrunklineCarCostService;
import com.logpm.statistics.vo.ExpenseDispatchWarehouseMonthVO;
import com.logpm.statistics.vo.StatisticsOrderInfoExportVO;
import com.logpm.statistics.vo.TrunklineCarCostExcel;
import com.logpm.statistics.vo.TrunklineCarCostVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.jetbrains.annotations.NotNull;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springblade.core.tool.utils.BeanUtil;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
@ -39,7 +46,7 @@ public class TrunklineCarCostController extends BladeController {
/**
* 分页列表
*/
@GetMapping("/page")
@PostMapping("/page")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "分页", notes = "传入expenseDispatchWarehouseMonth")
public R<IPage<TrunklineCarCostEntity>> page(@ApiIgnore @RequestParam Map<String, Object> expenseDispatchPriceOverZone, Query query) {
@ -51,5 +58,37 @@ public class TrunklineCarCostController extends BladeController {
}
/**
* 数据导出
* @param response
*/
@PostMapping("/export")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "干线车次费用导出", notes = "传入merchantStatisticsDTO")
public void export(@RequestBody Map<String, Object> args, HttpServletResponse response) {
LambdaQueryWrapper<TrunklineCarCostEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
if(args.get("carsNoType") != null){
lambdaQueryWrapper.eq(TrunklineCarCostEntity::getCarsNoType, args.get("carsNoType"));
}
List<TrunklineCarCostEntity> ls = trunklineCarCostService.list(lambdaQueryWrapper);
List<TrunklineCarCostExcel> data = getTrunklineCarCostExcels(ls);
//导出ls
ExcelUtil.export(response, "干线车次费用", "干线车次费用", data, TrunklineCarCostExcel.class);
}
@NotNull
private static List<TrunklineCarCostExcel> getTrunklineCarCostExcels(List<TrunklineCarCostEntity> ls) {
List<TrunklineCarCostExcel> data = new ArrayList<>();
for (TrunklineCarCostEntity l : ls) {
TrunklineCarCostExcel t =BeanUtil.copy(l, TrunklineCarCostExcel.class);
data.add(t);
}
return data;
}
}

11
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/listener/mq/StationArrivedEnterListener.java

@ -49,10 +49,10 @@ public class StationArrivedEnterListener {
log.warn("{}:车次存在未点击卸车确认完成的数据",vo.getCarsNo());
return ;
}
if(StringUtil.isBlank(vo.getOutDriverPerson())){
log.warn("{}:该车次自由车次数据",vo.getCarsNo());
return ;
}
// if(StringUtil.isBlank(vo.getOutDriverPerson())){
// log.warn("{}:该车次自由车次数据",vo.getCarsNo());
// return ;
// }
// 构建需要保存的数据
TrunklineCarCostEntity costEntity = buildCostEntity(vo);
@ -75,7 +75,8 @@ public class StationArrivedEnterListener {
data.setDriverName(main.getDriverName());
data.setActualReceivablePerson(main.getDriverName());
data.setCarsNo(main.getCarsNo());
data.setCarsNoType(1);
// 如存在外情人 标识该车次为外请车次
data.setCarsNoType(StringUtil.isBlank(main.getOutDriverPerson())?2:1);
data.setDriverStaff(main.getOutDriverPerson());
data.setVehicleType(main.getCarSettlementType());
// data.setCustomerName(main.getBrandNames());

5
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseWaybillClient.java

@ -134,4 +134,9 @@ public class WarehouseWaybillClient implements IWarehouseWaybillClient {
public void updateWaybillCondigneeIdToNull(Long waybillId) {
warehouseWaybillService.updateWaybillCondigneeIdToNull(waybillId);
}
@Override
public List<WarehouseWaybillEntity> findWaybillVOByOrderCode(String orderCode) {
return warehouseWaybillService.findWaybillVOByOrderCode(orderCode);
}
}

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

@ -81,4 +81,6 @@ public interface WarehouseWaybillMapper extends BaseMapper<WarehouseWaybillEntit
List<WarehouseWaybillVO> findWaybillVOByWaybillNoSet(@Param("waybillNos") Set<String> allWaybillNoSet);
void updateWaybillCondigneeIdToNull(@Param("waybillId") Long waybillId);
List<WarehouseWaybillEntity> findWaybillVOByOrderCode(@Param("orderCode") String orderCode);
}

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

@ -1275,6 +1275,12 @@
</foreach>
group by lww.id
</select>
<select id="findWaybillVOByOrderCode" resultType="com.logpm.warehouse.entity.WarehouseWaybillEntity">
SELECT lww.* from logpm_warehouse_waybill lww
left JOIN logpm_trunkline_waybill_order ltwo on ltwo.waybill_id= lww.id
where ltwo.order_code=#{orderCode}
</select>
<update id="updateWaybillCondigneeIdToNull">
update logpm_warehouse_waybill set consignee_id = null where id = #{waybillId}

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java

@ -93,4 +93,6 @@ public interface IWarehouseWaybillService extends BaseService<WarehouseWaybillEn
List<WarehouseWaybillVO> findWaybillVOByWaybillNoSet(Set<String> allWaybillNoSet);
void updateWaybillCondigneeIdToNull(Long waybillId);
List<WarehouseWaybillEntity> findWaybillVOByOrderCode(String orderCode);
}

5
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

@ -1229,4 +1229,9 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
public void updateWaybillCondigneeIdToNull(Long waybillId) {
baseMapper.updateWaybillCondigneeIdToNull(waybillId);
}
@Override
public List<WarehouseWaybillEntity> findWaybillVOByOrderCode(String orderCode) {
return baseMapper.findWaybillVOByOrderCode(orderCode);
}
}

Loading…
Cancel
Save