Browse Source

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

pre-production
zhaoqiaobo 3 months ago
parent
commit
ccd08adf79
  1. 24
      blade-service-api/logpm-report-api/src/main/java/com/logpm/report/entity/ReportConfigAdvanceDetailOpenEntity.java
  2. 26
      blade-service-api/logpm-report-api/src/main/java/com/logpm/report/entity/ReportConfigAllTrunklineEntity.java
  3. 26
      blade-service-api/logpm-report-api/src/main/java/com/logpm/report/entity/ReportConfigCheckWaybillEntity.java
  4. 26
      blade-service-api/logpm-report-api/src/main/java/com/logpm/report/entity/ReportConfigDespatchEntity.java
  5. 24
      blade-service-api/logpm-report-api/src/main/java/com/logpm/report/entity/ReportConfigTransferEntity.java
  6. 186
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/vo/StatisticsBalanceOrderExcel.java
  7. 142
      blade-service/logpm-report/src/main/java/com/logpm/report/controller/ReportConfigController.java
  8. 43
      blade-service/logpm-report/src/main/java/com/logpm/report/controller/ReportQualityController.java
  9. 102
      blade-service/logpm-report/src/main/java/com/logpm/report/controller/ReportTimeController.java
  10. 37
      blade-service/logpm-report/src/main/java/com/logpm/report/dto/ReportConfigDTO.java
  11. 28
      blade-service/logpm-report/src/main/java/com/logpm/report/dto/ReportQualityDTO.java
  12. 2
      blade-service/logpm-report/src/main/java/com/logpm/report/dto/ReportTimeDTO.java
  13. 15
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportConfigAdvanceDetailOpenMapper.java
  14. 25
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportConfigAdvanceDetailOpenMapper.xml
  15. 14
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportConfigAllTrunklineMapper.java
  16. 31
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportConfigAllTrunklineMapper.xml
  17. 15
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportConfigCheckWaybillMapper.java
  18. 31
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportConfigCheckWaybillMapper.xml
  19. 14
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportConfigDespatchMapper.java
  20. 31
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportConfigDespatchMapper.xml
  21. 13
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportConfigTransferMapper.java
  22. 25
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportConfigTransferMapper.xml
  23. 17
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportQualityMapper.java
  24. 128
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportQuallityMapper.xml
  25. 27
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.java
  26. 1197
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml
  27. 14
      blade-service/logpm-report/src/main/java/com/logpm/report/service/IReportConfigAdvanceDetailOpenService.java
  28. 14
      blade-service/logpm-report/src/main/java/com/logpm/report/service/IReportConfigAllTrunklineService.java
  29. 14
      blade-service/logpm-report/src/main/java/com/logpm/report/service/IReportConfigCheckWaybillService.java
  30. 14
      blade-service/logpm-report/src/main/java/com/logpm/report/service/IReportConfigDespatchService.java
  31. 14
      blade-service/logpm-report/src/main/java/com/logpm/report/service/IReportConfigTransferService.java
  32. 13
      blade-service/logpm-report/src/main/java/com/logpm/report/service/IReportQualityService.java
  33. 24
      blade-service/logpm-report/src/main/java/com/logpm/report/service/IReportTimeService.java
  34. 67
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportConfigAdvanceDetailOpenServiceImpl.java
  35. 69
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportConfigAllTrunklineServiceImpl.java
  36. 70
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportConfigCheckWaybillServiceImpl.java
  37. 70
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportConfigDespatchServiceImpl.java
  38. 65
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportConfigTransferServiceImpl.java
  39. 53
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportQualityServiceImpl.java
  40. 291
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportTimeServiceImpl.java
  41. 90
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportPackgeAllTrunklineTimeVO.java
  42. 38
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportPackgeStartTimeVO.java
  43. 37
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportPackgeTransferTimeVO.java
  44. 56
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportUpdateWaybillVO.java
  45. 1
      blade-service/logpm-report/src/main/resources/application-dev.yml
  46. 1
      blade-service/logpm-report/src/main/resources/application-prod.yml
  47. 1
      blade-service/logpm-report/src/main/resources/application-test.yml
  48. 19
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/controller/MerchantBalanceController.java
  49. 9
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/controller/TrunklineCarCostController.java
  50. 2
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/StatisticsBalanceOrderInfoMapper.java
  51. 52
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/StatisticsBalanceOrderInfoMapper.xml
  52. 1
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/StatisticsOrderInfoMapper.java
  53. 150
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/StatisticsOrderInfoMapper.xml
  54. 4
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/IStatisticsBalanceOrderInfoService.java
  55. 35
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsBalanceOrderInfoServiceImpl.java
  56. 161
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsOrderInfoServiceImpl.java
  57. 71
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/vo/StatisticsOrderInfoExportVO.java
  58. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

24
blade-service-api/logpm-report-api/src/main/java/com/logpm/report/entity/ReportConfigAdvanceDetailOpenEntity.java

@ -0,0 +1,24 @@
package com.logpm.report.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.*;
import org.springblade.core.tenant.mp.TenantEntity;
@Data
@TableName("logpm_reportconfig_advance_detail_open")
@ApiModel(value = "ReportConfigAdvanceDetailOpen对象", description = "暂存单开单报表配置")
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ReportConfigAdvanceDetailOpenEntity extends TenantEntity {
private Long warehouseId;
private String warehouseName;
private String brand;
private Integer hoursTime;
}

26
blade-service-api/logpm-report-api/src/main/java/com/logpm/report/entity/ReportConfigAllTrunklineEntity.java

@ -0,0 +1,26 @@
package com.logpm.report.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.*;
import org.springblade.core.tenant.mp.TenantEntity;
@Data
@TableName("logpm_reportconfig_all_trunkline")
@ApiModel(value = " ReportConfigAllTrunkline对象", description = "整体时效报表配置")
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ReportConfigAllTrunklineEntity extends TenantEntity {
private Long departureWarehouseId;
private String departureWarehouseName;
private Long destinationWarehouseId;
private String destinationWarehouseName;
private String brand;
private Integer hoursTime;
}

26
blade-service-api/logpm-report-api/src/main/java/com/logpm/report/entity/ReportConfigCheckWaybillEntity.java

@ -0,0 +1,26 @@
package com.logpm.report.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.*;
import org.springblade.core.tenant.mp.TenantEntity;
@Data
@TableName("logpm_reportconfig_check_waybill")
@ApiModel(value = "ReportConfigCheckWaybill对象", description = "审单报表配置")
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ReportConfigCheckWaybillEntity extends TenantEntity {
private Long departureWarehouseId;
private String departureWarehouseName;
private Long destinationWarehouseId;
private String destinationWarehouseName;
private String brand;
private Integer hoursTime;
}

26
blade-service-api/logpm-report-api/src/main/java/com/logpm/report/entity/ReportConfigDespatchEntity.java

@ -0,0 +1,26 @@
package com.logpm.report.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.*;
import org.springblade.core.tenant.mp.TenantEntity;
@Data
@TableName("logpm_reportconfig_despatch")
@ApiModel(value = " ReportConfigDespatch对象", description = "发运报表配置")
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ReportConfigDespatchEntity extends TenantEntity {
private Long departureWarehouseId;
private String departureWarehouseName;
private Long destinationWarehouseId;
private String destinationWarehouseName;
private String brand;
private Integer hoursTime;
}

24
blade-service-api/logpm-report-api/src/main/java/com/logpm/report/entity/ReportConfigTransferEntity.java

@ -0,0 +1,24 @@
package com.logpm.report.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.*;
import org.springblade.core.tenant.mp.TenantEntity;
@Data
@TableName("logpm_reportconfig_transfer")
@ApiModel(value = " ReportConfigTransfer对象", description = "中转报表配置")
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ReportConfigTransferEntity extends TenantEntity {
private Long warehouseId;
private String warehouseName;
private String brand;
private Integer hoursTime;
}

186
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/vo/StatisticsBalanceOrderExcel.java

@ -0,0 +1,186 @@
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 io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 结算单导出
*/
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class StatisticsBalanceOrderExcel implements Serializable {
@ExcelProperty(value = "结算单号")
private String balanceOrderNo; // 结算单号
@ExcelProperty(value = "品牌")
private String brand; // 品牌
@ExcelProperty(value = "运单号")
private String waybillNo; // 运单号
@ExcelProperty(value = "订单号")
private String orderCode; // 订单号
@ExcelProperty(value = "服务类型")
private String typeServiceName; // 服务类型
//
// @ExcelProperty(value = "货物品类")
// private String productGoods; // 货物品类
@ExcelProperty(value = "结算总金额")
@NumberFormat("0.00")
private BigDecimal totalBalanceFee; // 结算总金额
@ExcelProperty(value = "总数量")
private Integer totalCount; // 总数量
@ExcelProperty(value = "总重量")
@NumberFormat("0.00")
private BigDecimal totalWeight; // 总重量
@ExcelProperty(value = "总体积")
@NumberFormat("0.00")
private BigDecimal totalVolume; // 总体积
@ExcelProperty(value = "收货单位")
private String consignee; // 收货单位
@ExcelProperty(value = "实际费用")
@NumberFormat("0.00")
private BigDecimal realTotalFee; // 实际费用
@ExcelProperty(value = "提货费")
@NumberFormat("0.00")
private BigDecimal pickupFee; // 提货费
@ExcelProperty(value = "运费")
@NumberFormat("0.00")
private BigDecimal freightFee; // 运费
@ExcelProperty(value = "仓库服务费")
@NumberFormat("0.00")
private BigDecimal warehouseServiceFee; // 仓库服务费
@ExcelProperty(value = "仓储费")
@NumberFormat("0.00")
private BigDecimal warehouseFee; // 仓储费
@ExcelProperty(value = "仓储管理费")
@NumberFormat("0.00")
private BigDecimal warehouseManageFee; // 仓储管理费
@ExcelProperty(value = "仓储分拣费")
@NumberFormat("0.00")
private BigDecimal warehouseSortingFee; // 仓储分拣费
@ExcelProperty(value = "仓储操作费")
@NumberFormat("0.00")
private BigDecimal warehouseOperatingFee; // 仓储操作费
@ExcelProperty(value = "配送费")
@NumberFormat("0.00")
private BigDecimal deliveryFee; // 配送费
@ExcelProperty(value = "配送服务费")
@NumberFormat("0.00")
private BigDecimal deliveryServiceFee; // 配送服务费
@ExcelProperty(value = "配送装卸费")
@NumberFormat("0.00")
private BigDecimal deliveryLoadingFee; // 配送装卸费
@ExcelProperty(value = "配送分拣费")
@NumberFormat("0.00")
private BigDecimal deliverySortingFee; // 配送分拣费
@ExcelProperty(value = "配送上楼费")
@NumberFormat("0.00")
private BigDecimal deliveryUpfloorFee; // 配送上楼费
@ExcelProperty(value = "配送平移费")
@NumberFormat("0.00")
private BigDecimal deliveryMoveFee; // 配送平移费
@ExcelProperty(value = "配送其他费")
@NumberFormat("0.00")
private BigDecimal deliveryOtherFee; // 配送其他费
@ExcelProperty(value = "超区费")
@NumberFormat("0.00")
private BigDecimal deliveryCrossingFee; // 超区费
@ExcelProperty(value = "安装费")
@NumberFormat("0.00")
private BigDecimal installFee; // 安装费
@ExcelProperty(value = "其他费")
@NumberFormat("0.00")
private BigDecimal otherFee; // 其他费
@ExcelProperty(value = "是否有售后")
private String aftersaleName; // 是否有售后
@ExcelProperty(value = "售后单号")
private String aftersaleOrder; // 售后单号
@ExcelProperty(value = "售后金额")
@NumberFormat("0.00")
private BigDecimal aftersalesFee; // 售后金额
@ExcelProperty(value = "结算状态")
private String balanceStatusName; // 0未结算 1部分结算 2已结算
@ExcelProperty(value = "已结算金额")
@NumberFormat("0.00")
private BigDecimal hasBalanceFee; // 已结算金额
@ExcelProperty(value = "未结算金额")
@NumberFormat("0.00")
private BigDecimal noBalanceFee; // 未结算金额
@ExcelProperty(value = "结算时间")
@DateTimeFormat("yyyy-MM-dd")
private Date balanceTime; // 结算时间
@ExcelProperty(value = "结算人")
private String balanceUserName; // 结算人
@ExcelProperty(value = "结算备注")
private String balanceRemark; // 结算备注
@ExcelProperty(value = "是否有异常结算")
private String abnormalBalanceStatusName; // 是否有异常结算
@ExcelProperty(value = "异常金额")
@NumberFormat("0.00")
private BigDecimal abnormalBalanceFee; // 异常金额
@ExcelProperty(value = "异常时间")
@DateTimeFormat("yyyy-MM-dd")
private Date abnormalTime; // 异常时间
@ExcelProperty(value = "异常确认人")
private String abnormalUserName; // 异常确认人
@ExcelProperty(value = "异常备注")
private String abnormalRemark; // 异常备注
}

142
blade-service/logpm-report/src/main/java/com/logpm/report/controller/ReportConfigController.java

@ -0,0 +1,142 @@
package com.logpm.report.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.report.dto.ReportConfigDTO;
import com.logpm.report.service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@AllArgsConstructor
@RequestMapping("/reportConfig")
@Api(value = "报表配置", tags = "报表配置")
public class ReportConfigController extends BladeController {
private final IReportConfigAdvanceDetailOpenService reportConfigAdvanceDetailOpenService;
private final IReportConfigCheckWaybillService reportConfigCheckWaybillService;
private final IReportConfigDespatchService reportConfigDespatchService;
private final IReportConfigTransferService reportConfigTransferService;
private final IReportConfigAllTrunklineService reportConfigAllTrunklineService;
//-------------------------开单及时率
@PostMapping("/openTimeConfigPage")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "开单时效配置报表", notes = "开单时效配置报表")
public R openTimeConfigPage(@RequestBody ReportConfigDTO reportConfigDTO) {
return reportConfigAdvanceDetailOpenService.openTimeConfigPage(reportConfigDTO);
}
@PostMapping("/addOpenTimeConfig")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "新增开单时效配置", notes = "新增开单时效配置")
public R addOpenTimeConfig(@RequestBody ReportConfigDTO reportConfigDTO) {
return reportConfigAdvanceDetailOpenService.addOpenTimeConfig(reportConfigDTO);
}
@PostMapping("/deleteOpenTimeConfig")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "删除开单时效配置", notes = "删除开单时效配置")
public R deleteOpenTimeConfig(@RequestBody ReportConfigDTO reportConfigDTO) {
return reportConfigAdvanceDetailOpenService.deleteOpenTimeConfig(reportConfigDTO);
}
//--------------------审单及时率
@PostMapping("/checkWaybillConfigPage")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "审单时效配置报表", notes = "审单时效配置报表")
public R checkWaybillConfigPage(@RequestBody ReportConfigDTO reportConfigDTO) {
return reportConfigCheckWaybillService.checkWaybillConfigPage(reportConfigDTO);
}
@PostMapping("/addCheckWaybillConfig")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "新增审单时效配置", notes = "新增审单时效配置")
public R addCheckWaybillConfig(@RequestBody ReportConfigDTO reportConfigDTO) {
return reportConfigCheckWaybillService.addCheckWaybillConfig(reportConfigDTO);
}
@PostMapping("/deleteCheckWaybillConfig")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "删除审单时效配置", notes = "删除审单时效配置")
public R deleteCheckWaybillConfig(@RequestBody ReportConfigDTO reportConfigDTO) {
return reportConfigCheckWaybillService.deleteCheckWaybillConfig(reportConfigDTO);
}
//--------------------发运时效
@PostMapping("/despatchConfigPage")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "发运时效配置报表", notes = "发运时效配置报表")
public R despatchConfigPage(@RequestBody ReportConfigDTO reportConfigDTO) {
return reportConfigDespatchService.despatchConfigPage(reportConfigDTO);
}
@PostMapping("/addDespatchConfig")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "新增发运时效配置", notes = "新增发运时效配置")
public R addDespatchConfig(@RequestBody ReportConfigDTO reportConfigDTO) {
return reportConfigDespatchService.addDespatchConfig(reportConfigDTO);
}
@PostMapping("/deleteDespatchConfig")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "删除发运时效配置", notes = "删除发运时效配置")
public R deleteDespatchConfig(@RequestBody ReportConfigDTO reportConfigDTO) {
return reportConfigDespatchService.deleteDespatchConfig(reportConfigDTO);
}
//--------------------中转时效
@PostMapping("/transferConfigPage")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "中转时效配置报表", notes = "中转时效配置报表")
public R transferConfigPage(@RequestBody ReportConfigDTO reportConfigDTO) {
return reportConfigTransferService.transferConfigPage(reportConfigDTO);
}
@PostMapping("/addTransferConfig")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "新增中转时效配置", notes = "新增中转时效配置")
public R addTransferConfig(@RequestBody ReportConfigDTO reportConfigDTO) {
return reportConfigTransferService.addTransferConfig(reportConfigDTO);
}
@PostMapping("/deleteTransferConfig")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "删除中转时效配置", notes = "删除中转时效配置")
public R deleteTransferConfig(@RequestBody ReportConfigDTO reportConfigDTO) {
return reportConfigTransferService.deleteTransferConfig(reportConfigDTO);
}
//--------------------干线整体准时
@PostMapping("/allTrunklineConfigPage")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "干线整体准时配置报表", notes = "干线整体准时配置报表")
public R allTrunklineConfigPage(@RequestBody ReportConfigDTO reportConfigDTO) {
return reportConfigAllTrunklineService.allTrunklineConfigPage(reportConfigDTO);
}
@PostMapping("/addAllTrunklineConfig")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "新增干线整体准时配置", notes = "新增干线整体准时配置")
public R addAllTrunklineConfig(@RequestBody ReportConfigDTO reportConfigDTO) {
return reportConfigAllTrunklineService.addAllTrunklineConfig(reportConfigDTO);
}
@PostMapping("/deleteAllTrunklineConfig")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "删除干线整体准时配置", notes = "删除干线整体准时配置")
public R deleteAllTrunklineConfig(@RequestBody ReportConfigDTO reportConfigDTO) {
return reportConfigAllTrunklineService.deleteAllTrunklineConfig(reportConfigDTO);
}
}

43
blade-service/logpm-report/src/main/java/com/logpm/report/controller/ReportQualityController.java

@ -0,0 +1,43 @@
package com.logpm.report.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.report.dto.ReportQualityDTO;
import com.logpm.report.dto.ReportTimeDTO;
import com.logpm.report.service.IReportQualityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
@RestController
@AllArgsConstructor
@RequestMapping("/reportQuality")
@Api(value = "质量报表", tags = "质量报表")
public class ReportQualityController {
private final IReportQualityService reportQualityService;
//------------------改单质量报表
@PostMapping("/updateWaybillQualityPage")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "改单质量报表", notes = "改单质量报表")
public R updateWaybillQualityPage(@RequestBody ReportQualityDTO reportQualityDTO) {
return reportQualityService.updateWaybillQualityPage(reportQualityDTO);
}
@PostMapping("/updateWaybillQualityExport")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "改单质量报表导出", notes = "改单质量报表导出")
public void updateWaybillQualityExport(@RequestBody ReportQualityDTO reportQualityDTO, HttpServletResponse response) {
reportQualityService.updateWaybillQualityExport(reportQualityDTO,response);
}
}

102
blade-service/logpm-report/src/main/java/com/logpm/report/controller/ReportTimeController.java

@ -20,6 +20,8 @@ public class ReportTimeController extends BladeController {
private final IReportTimeService reportTimeService;
//-----------------------开单时效------------------------
@PostMapping("/openTimePage")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "开单时效报表", notes = "开单时效报表")
@ -34,6 +36,9 @@ public class ReportTimeController extends BladeController {
reportTimeService.openTimeExport(reportTimeDTO,response);
}
//-----------------------审单时效------------------------
@PostMapping("/checkWaybillTimePage")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "审单时效报表", notes = "审单时效报表")
@ -49,4 +54,101 @@ public class ReportTimeController extends BladeController {
}
//-----------------------订制品发运时效------------------------
@PostMapping("/packageStartTimePage")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "订制品发运时效报表", notes = "订制品发运时效报表")
public R packageStartTimePage(@RequestBody ReportTimeDTO reportTimeDTO) {
return reportTimeService.packageStartTimePage(reportTimeDTO);
}
@PostMapping("/packageStartTimeExport")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "订制品发运时效报表导出", notes = "订制品发运时效报表导出")
public void packageStartTimeExport(@RequestBody ReportTimeDTO reportTimeDTO, HttpServletResponse response) {
reportTimeService.packageStartTimeExport(reportTimeDTO,response);
}
//-----------------------零担发运时效------------------------
@PostMapping("/zeroStartTimePage")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "零担发运时效报表", notes = "零担发运时效报表")
public R zeroStartTimePage(@RequestBody ReportTimeDTO reportTimeDTO) {
return reportTimeService.zeroStartTimePage(reportTimeDTO);
}
@PostMapping("/zeroStartTimeExport")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "零担发运时效报表导出", notes = "零担发运时效报表导出")
public void zeroStartTimeExport(@RequestBody ReportTimeDTO reportTimeDTO, HttpServletResponse response) {
reportTimeService.zeroStartTimeExport(reportTimeDTO,response);
}
//-----------------------订制品中转时效------------------------
@PostMapping("/packageTransferTimePage")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "订制品中转时效报表", notes = "订制品中转时效报表")
public R packageTransferTimePage(@RequestBody ReportTimeDTO reportTimeDTO) {
return reportTimeService.packageTransferTimePage(reportTimeDTO);
}
@PostMapping("/packageTransferTimeExport")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "订制品中转时效报表导出", notes = "订制品中转时效报表导出")
public void packageTransferTimeExport(@RequestBody ReportTimeDTO reportTimeDTO, HttpServletResponse response) {
reportTimeService.packageTransferTimeExport(reportTimeDTO,response);
}
//-----------------------零担中转时效------------------------
@PostMapping("/zeroTransferTimePage")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "零担中转时效报表", notes = "零担中转时效报表")
public R zeroTransferTimePage(@RequestBody ReportTimeDTO reportTimeDTO) {
return reportTimeService.zeroTransferTimePage(reportTimeDTO);
}
@PostMapping("/zeroTransferTimeExport")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "零担中转时效报表导出", notes = "零担中转时效报表导出")
public void zeroTransferTimeExport(@RequestBody ReportTimeDTO reportTimeDTO, HttpServletResponse response) {
reportTimeService.zeroTransferTimeExport(reportTimeDTO,response);
}
//-----------------------订制品干线整体时效------------------------
@PostMapping("/packageAllTrunklineTimePage")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "订制品干线时效报表", notes = "订制品干线时效报表")
public R packageAllTrunklineTimePage(@RequestBody ReportTimeDTO reportTimeDTO) {
return reportTimeService.packageAllTrunklineTimePage(reportTimeDTO);
}
@PostMapping("/packageAllTrunklineTimeExport")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "订制品干线时效报表导出", notes = "订制品干线时效报表导出")
public void packageAllTrunklineTimeExport(@RequestBody ReportTimeDTO reportTimeDTO, HttpServletResponse response) {
reportTimeService.packageAllTrunklineTimeExport(reportTimeDTO,response);
}
//-----------------------零担干线整体时效------------------------
@PostMapping("/zeroAllTrunklineTimePage")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "零担干线时效报表", notes = "零担干线时效报表")
public R zeroAllTrunklineTimePage(@RequestBody ReportTimeDTO reportTimeDTO) {
return reportTimeService.zeroAllTrunklineTimePage(reportTimeDTO);
}
@PostMapping("/zeroAllTrunklineTimeExport")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "零担干线时效报表导出", notes = "零担干线时效报表导出")
public void zeroAllTrunklineTimeExport(@RequestBody ReportTimeDTO reportTimeDTO, HttpServletResponse response) {
reportTimeService.zeroAllTrunklineTimeExport(reportTimeDTO,response);
}
}

37
blade-service/logpm-report/src/main/java/com/logpm/report/dto/ReportConfigDTO.java

@ -0,0 +1,37 @@
package com.logpm.report.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class ReportConfigDTO implements Serializable {
private Integer pageNum;
private Integer pageSize;
private List<Long> warehouseIds;
private List<String> brands;
private Long warehouseId;
private String warehouseName;
private String brand;
private Integer hoursTime;
private Long id;
private List<Long> departureWarehouseIds;
private List<Long> destinationWarehouseIds;
private Long departureWarehouseId;
private String departureWarehouseName;
private Long destinationWarehouseId;
private String destinationWarehouseName;
}

28
blade-service/logpm-report/src/main/java/com/logpm/report/dto/ReportQualityDTO.java

@ -0,0 +1,28 @@
package com.logpm.report.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
@Data
public class ReportQualityDTO implements Serializable {
private Integer pageNum;
private Integer pageSize;
private List<String> businessLineList;
private List<String> brandList;
private List<Long> warehouseIds;
private List<Long> departureWarehouseIds;
private List<Long> destinationWarehouseIds;
private String startTimeStr;
private String endTimeStr;
private Date startTime;
private Date endTime;
}

2
blade-service/logpm-report/src/main/java/com/logpm/report/dto/ReportTimeDTO.java

@ -24,4 +24,6 @@ public class ReportTimeDTO implements Serializable {
private Date startTime;
private Date endTime;
private Integer hoursTime;
}

15
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportConfigAdvanceDetailOpenMapper.java

@ -0,0 +1,15 @@
package com.logpm.report.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.report.dto.ReportConfigDTO;
import com.logpm.report.entity.ReportConfigAdvanceDetailOpenEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface ReportConfigAdvanceDetailOpenMapper extends BaseMapper<ReportConfigAdvanceDetailOpenEntity> {
IPage<ReportConfigAdvanceDetailOpenEntity> openTimeConfigPage(IPage<Object> page, @Param("param") ReportConfigDTO reportConfigDTO);
}

25
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportConfigAdvanceDetailOpenMapper.xml

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.logpm.report.mapper.ReportConfigAdvanceDetailOpenMapper">
<select id="openTimeConfigPage" resultType="com.logpm.report.entity.ReportConfigAdvanceDetailOpenEntity">
select *
from logpm_reportconfig_advance_detail_open ado
<where>
and ado.is_deleted = 0
<if test="param.warehouseIds != null and param.warehouseIds.size() > 0">
and ado.warehouse_id in
<foreach collection="param.warehouseIds" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.brands != null and param.brands.size() > 0">
and ado.brand in
<foreach collection="param.brands" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
</mapper>

14
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportConfigAllTrunklineMapper.java

@ -0,0 +1,14 @@
package com.logpm.report.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.report.dto.ReportConfigDTO;
import com.logpm.report.entity.ReportConfigAdvanceDetailOpenEntity;
import com.logpm.report.entity.ReportConfigAllTrunklineEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface ReportConfigAllTrunklineMapper extends BaseMapper<ReportConfigAllTrunklineEntity> {
IPage<ReportConfigAdvanceDetailOpenEntity> allTrunklineConfigPage(IPage<Object> page, @Param("param") ReportConfigDTO reportConfigDTO);
}

31
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportConfigAllTrunklineMapper.xml

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.logpm.report.mapper.ReportConfigAllTrunklineMapper">
<select id="allTrunklineConfigPage" resultType="com.logpm.report.entity.ReportConfigAllTrunklineEntity">
select *
from logpm_reportconfig_all_trunkline rat
<where>
and rat.is_deleted = 0
<if test="param.departureWarehouseIds != null and param.departureWarehouseIds.size() > 0">
and rat.departure_warehouse_id in
<foreach collection="param.departureWarehouseIds" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.destinationWarehouseIds != null and param.destinationWarehouseIds.size() > 0">
and rat.destination_warehouse_id in
<foreach collection="param.destinationWarehouseIds" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.brands != null and param.brands.size() > 0">
and rat.brand in
<foreach collection="param.brands" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
</mapper>

15
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportConfigCheckWaybillMapper.java

@ -0,0 +1,15 @@
package com.logpm.report.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.report.dto.ReportConfigDTO;
import com.logpm.report.entity.ReportConfigCheckWaybillEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface ReportConfigCheckWaybillMapper extends BaseMapper<ReportConfigCheckWaybillEntity> {
IPage<ReportConfigCheckWaybillEntity> checkWaybillConfigPage(IPage<Object> page, @Param("param") ReportConfigDTO reportConfigDTO);
}

31
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportConfigCheckWaybillMapper.xml

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.logpm.report.mapper.ReportConfigCheckWaybillMapper">
<select id="checkWaybillConfigPage" resultType="com.logpm.report.entity.ReportConfigCheckWaybillEntity">
select *
from logpm_reportconfig_check_waybill cw
<where>
and cw.is_deleted = 0
<if test="param.departureWarehouseIds != null and param.departureWarehouseIds.size() > 0">
and cw.departure_warehouse_id in
<foreach collection="param.departureWarehouseIds" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.destinationWarehouseIds != null and param.destinationWarehouseIds.size() > 0">
and cw.destination_warehouse_id in
<foreach collection="param.destinationWarehouseIds" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.brands != null and param.brands.size() > 0">
and cw.brand in
<foreach collection="param.brands" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
</mapper>

14
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportConfigDespatchMapper.java

@ -0,0 +1,14 @@
package com.logpm.report.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.report.dto.ReportConfigDTO;
import com.logpm.report.entity.ReportConfigDespatchEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface ReportConfigDespatchMapper extends BaseMapper<ReportConfigDespatchEntity> {
IPage<ReportConfigDespatchEntity> despatchConfigPage(IPage<Object> page, @Param("param") ReportConfigDTO reportConfigDTO);
}

31
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportConfigDespatchMapper.xml

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.logpm.report.mapper.ReportConfigDespatchMapper">
<select id="despatchConfigPage" resultType="com.logpm.report.entity.ReportConfigDespatchEntity">
select *
from logpm_reportconfig_despatch lrd
<where>
and lrd.is_deleted = 0
<if test="param.departureWarehouseIds != null and param.departureWarehouseIds.size() > 0">
and lrd.departure_warehouse_id in
<foreach collection="param.departureWarehouseIds" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.destinationWarehouseIds != null and param.destinationWarehouseIds.size() > 0">
and lrd.destination_warehouse_id in
<foreach collection="param.destinationWarehouseIds" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.brands != null and param.brands.size() > 0">
and lrd.brand in
<foreach collection="param.brands" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
</mapper>

13
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportConfigTransferMapper.java

@ -0,0 +1,13 @@
package com.logpm.report.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.report.dto.ReportConfigDTO;
import com.logpm.report.entity.ReportConfigTransferEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface ReportConfigTransferMapper extends BaseMapper<ReportConfigTransferEntity> {
IPage<ReportConfigTransferEntity> transferConfigPage(IPage<Object> page, @Param("param") ReportConfigDTO reportConfigDTO);
}

25
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportConfigTransferMapper.xml

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.logpm.report.mapper.ReportConfigTransferMapper">
<select id="transferConfigPage" resultType="com.logpm.report.entity.ReportConfigTransferEntity">
select *
from logpm_reportconfig_transfer lrt
<where>
and lrt.is_deleted = 0
<if test="param.warehouseIds != null and param.warehouseIds.size() > 0">
and lrt.warehouse_id in
<foreach collection="param.warehouseIds" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.brands != null and param.brands.size() > 0">
and lrt.brand in
<foreach collection="param.brands" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
</mapper>

17
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportQualityMapper.java

@ -0,0 +1,17 @@
package com.logpm.report.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.report.dto.ReportQualityDTO;
import com.logpm.report.vo.ReportUpdateWaybillVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface ReportQualityMapper {
IPage<ReportUpdateWaybillVO> updateWaybillQualityPage(IPage<Object> page, @Param("param") ReportQualityDTO reportQualityDTO);
List<ReportUpdateWaybillVO> updateWaybillQualityExport(@Param("param") ReportQualityDTO reportQualityDTO);
}

128
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportQuallityMapper.xml

@ -0,0 +1,128 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.logpm.report.mapper.ReportQualityMapper">
<select id="updateWaybillQualityPage" resultType="com.logpm.report.vo.ReportUpdateWaybillVO">
select waw.business_line businessLine,
lww.departure_warehouse_name departureWarehouseName,
lww.destination_warehouse_name destinationWarehouseName,
lww.brand brand,
count(DISTINCT lww.id) totalNum,
count(DISTINCT ltwt.waybill_id) editNum,
count(ltwt.id) updateNum,
sum(if(ltwt.refer='发车前修改',1,0)) startBeforeNum,
IFNULL(round(sum(if(ltwt.refer='发车前修改',1,0))/count(ltwt.id)*100,2),'0.00') startBeforeRate,
sum(if(ltwt.refer='人为操作错误',1,0)) personProbleNum,
IFNULL(round(sum(if(ltwt.refer='人为操作错误',1,0))/count(ltwt.id)*100,2),'0.00') personProbleRate,
sum(if(ltwt.refer='财务修改',1,0)) financeUpdateNum,
IFNULL(round(sum(if(ltwt.refer='财务修改',1,0))/count(ltwt.id)*100,2),'0.00') financeUpdateRate,
sum(if(ltwt.refer='商家要求',1,0)) merchantUpdateNum,
IFNULL(round(sum(if(ltwt.refer='商家要求',1,0))/count(ltwt.id)*100,2),'0.00') merchantUpdateRate,
sum(if(ltwt.refer='业务调整',1,0)) businessUpdateNum,
IFNULL(round(sum(if(ltwt.refer='业务调整',1,0))/count(ltwt.id)*100,2),'0.00') businessUpdateRate,
IFNULL(round(count(DISTINCT ltwt.waybill_id)/count(DISTINCT lww.id)*100,2),'0.00') updateRate
from logpm_warehouse_waybill lww
left join logpm_warehouse_warehouse waw on waw.id = lww.destination_warehouse_id
left join logpm_trunkline_waybill_track ltwt on ltwt.waybill_id = lww.id and ltwt.track_type = '888'
where 1=1
and lww.create_time > '2024-10-22 00:00:00'
and waw.business_line is not null
<if test="param.businessLineList != null and param.businessLineList.size() > 0">
and waw.business_line in
<foreach collection="param.businessLineList" item="businessLine" open="(" separator="," close=")">
#{businessLine}
</foreach>
</if>
<if test="param.brandList != null and param.brandList.size() > 0">
and lww.brand in
<foreach collection="param.brandList" item="brand" open="(" separator="," close=")">
#{brand}
</foreach>
</if>
<if test="param.departureWarehouseIds != null and param.departureWarehouseIds.size() > 0">
and lww.departure_warehouse_id in
<foreach collection="param.departureWarehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.destinationWarehouseIds != null and param.destinationWarehouseIds.size() > 0">
and lww.destination_warehouse_id in
<foreach collection="param.destinationWarehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.startTime != null ">
and lww.create_time &gt;= #{param.startTime}
</if>
<if test="param.endTime != null ">
and lww.create_time &lt;= #{param.endTime}
</if>
group by waw.business_line,
lww.departure_warehouse_name,
lww.destination_warehouse_name,
lww.brand
</select>
<select id="updateWaybillQualityExport" resultType="com.logpm.report.vo.ReportUpdateWaybillVO">
select waw.business_line businessLine,
lww.departure_warehouse_name departureWarehouseName,
lww.destination_warehouse_name destinationWarehouseName,
lww.brand brand,
count(DISTINCT lww.id) totalNum,
count(DISTINCT ltwt.waybill_id) editNum,
count(ltwt.id) updateNum,
sum(if(ltwt.refer='发车前修改',1,0)) startBeforeNum,
IFNULL(concat(round(sum(if(ltwt.refer='发车前修改',1,0))/count(ltwt.id)*100,2),'%'),'0.00%') startBeforeRate,
sum(if(ltwt.refer='人为操作错误',1,0)) personProbleNum,
IFNULL(concat(round(sum(if(ltwt.refer='人为操作错误',1,0))/count(ltwt.id)*100,2),'%'),'0.00%') personProbleRate,
sum(if(ltwt.refer='财务修改',1,0)) financeUpdateNum,
IFNULL(concat(round(sum(if(ltwt.refer='财务修改',1,0))/count(ltwt.id)*100,2),'%'),'0.00%') financeUpdateRate,
sum(if(ltwt.refer='商家要求',1,0)) merchantUpdateNum,
IFNULL(concat(round(sum(if(ltwt.refer='商家要求',1,0))/count(ltwt.id)*100,2),'%'),'0.00%') merchantUpdateRate,
sum(if(ltwt.refer='业务调整',1,0)) businessUpdateNum,
IFNULL(concat(round(sum(if(ltwt.refer='业务调整',1,0))/count(ltwt.id)*100,2),'%'),'0.00%') businessUpdateRate,
IFNULL(concat(round(count(DISTINCT ltwt.waybill_id)/count(DISTINCT lww.id)*100,2),'%'),'0.00%') updateRate
from logpm_warehouse_waybill lww
left join logpm_warehouse_warehouse waw on waw.id = lww.destination_warehouse_id
left join logpm_trunkline_waybill_track ltwt on ltwt.waybill_id = lww.id and ltwt.track_type = '888'
where 1=1
and lww.create_time > '2024-10-22 00:00:00'
and waw.business_line is not null
<if test="param.businessLineList != null and param.businessLineList.size() > 0">
and waw.business_line in
<foreach collection="param.businessLineList" item="businessLine" open="(" separator="," close=")">
#{businessLine}
</foreach>
</if>
<if test="param.brandList != null and param.brandList.size() > 0">
and lww.brand in
<foreach collection="param.brandList" item="brand" open="(" separator="," close=")">
#{brand}
</foreach>
</if>
<if test="param.departureWarehouseIds != null and param.departureWarehouseIds.size() > 0">
and lww.departure_warehouse_id in
<foreach collection="param.departureWarehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.destinationWarehouseIds != null and param.destinationWarehouseIds.size() > 0">
and lww.destination_warehouse_id in
<foreach collection="param.destinationWarehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.startTime != null ">
and lww.create_time &gt;= #{param.startTime}
</if>
<if test="param.endTime != null ">
and lww.create_time &lt;= #{param.endTime}
</if>
group by waw.business_line,
lww.departure_warehouse_name,
lww.destination_warehouse_name,
lww.brand
</select>
</mapper>

27
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.java

@ -2,8 +2,7 @@ package com.logpm.report.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.report.dto.ReportTimeDTO;
import com.logpm.report.vo.ReportCheckWaybillTimeVO;
import com.logpm.report.vo.ReportOpenTimeVO;
import com.logpm.report.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -20,4 +19,28 @@ public interface ReportTimeMapper {
IPage<ReportCheckWaybillTimeVO> checkWaybillTimePage(IPage<Object> page, @Param("param") ReportTimeDTO reportTimeDTO);
List<ReportCheckWaybillTimeVO> checkWaybillTimeExport(@Param("param") ReportTimeDTO reportTimeDTO);
IPage<ReportPackgeStartTimeVO> packageStartTimePage(IPage<Object> page, @Param("param") ReportTimeDTO reportTimeDTO);
List<ReportPackgeStartTimeVO> packageStartTimeExport(@Param("param") ReportTimeDTO reportTimeDTO);
IPage<ReportPackgeStartTimeVO> zeroStartTimePage(IPage<Object> page, @Param("param") ReportTimeDTO reportTimeDTO);
List<ReportPackgeStartTimeVO> zeroStartTimeExport(@Param("param") ReportTimeDTO reportTimeDTO);
IPage<ReportPackgeTransferTimeVO> packageTransferTimePage(IPage<Object> page, @Param("param") ReportTimeDTO reportTimeDTO);
List<ReportPackgeTransferTimeVO> packageTransferTimeExport(@Param("param") ReportTimeDTO reportTimeDTO);
IPage<ReportPackgeTransferTimeVO> zeroTransferTimePage(IPage<Object> page, @Param("param") ReportTimeDTO reportTimeDTO);
List<ReportPackgeTransferTimeVO> zeroTransferTimeExport(@Param("param") ReportTimeDTO reportTimeDTO);
IPage<ReportPackgeAllTrunklineTimeVO> packageAllTrunklineTimePage(IPage<Object> page, @Param("param") ReportTimeDTO reportTimeDTO);
List<ReportPackgeAllTrunklineTimeVO> packageAllTrunklineTimeExport(@Param("param") ReportTimeDTO reportTimeDTO);
IPage<ReportPackgeAllTrunklineTimeVO> zeroAllTrunklineTimePage(IPage<Object> page, @Param("param") ReportTimeDTO reportTimeDTO);
List<ReportPackgeAllTrunklineTimeVO> zeroAllTrunklineTimeExport(@Param("param") ReportTimeDTO reportTimeDTO);
}

1197
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml

File diff suppressed because it is too large Load Diff

14
blade-service/logpm-report/src/main/java/com/logpm/report/service/IReportConfigAdvanceDetailOpenService.java

@ -0,0 +1,14 @@
package com.logpm.report.service;
import com.logpm.report.dto.ReportConfigDTO;
import com.logpm.report.entity.ReportConfigAdvanceDetailOpenEntity;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
public interface IReportConfigAdvanceDetailOpenService extends BaseService<ReportConfigAdvanceDetailOpenEntity> {
R openTimeConfigPage(ReportConfigDTO reportConfigDTO);
R addOpenTimeConfig(ReportConfigDTO reportConfigDTO);
R deleteOpenTimeConfig(ReportConfigDTO reportConfigDTO);
}

14
blade-service/logpm-report/src/main/java/com/logpm/report/service/IReportConfigAllTrunklineService.java

@ -0,0 +1,14 @@
package com.logpm.report.service;
import com.logpm.report.dto.ReportConfigDTO;
import com.logpm.report.entity.ReportConfigAllTrunklineEntity;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
public interface IReportConfigAllTrunklineService extends BaseService<ReportConfigAllTrunklineEntity> {
R allTrunklineConfigPage(ReportConfigDTO reportConfigDTO);
R addAllTrunklineConfig(ReportConfigDTO reportConfigDTO);
R deleteAllTrunklineConfig(ReportConfigDTO reportConfigDTO);
}

14
blade-service/logpm-report/src/main/java/com/logpm/report/service/IReportConfigCheckWaybillService.java

@ -0,0 +1,14 @@
package com.logpm.report.service;
import com.logpm.report.dto.ReportConfigDTO;
import com.logpm.report.entity.ReportConfigCheckWaybillEntity;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
public interface IReportConfigCheckWaybillService extends BaseService<ReportConfigCheckWaybillEntity> {
R checkWaybillConfigPage(ReportConfigDTO reportConfigDTO);
R addCheckWaybillConfig(ReportConfigDTO reportConfigDTO);
R deleteCheckWaybillConfig(ReportConfigDTO reportConfigDTO);
}

14
blade-service/logpm-report/src/main/java/com/logpm/report/service/IReportConfigDespatchService.java

@ -0,0 +1,14 @@
package com.logpm.report.service;
import com.logpm.report.dto.ReportConfigDTO;
import com.logpm.report.entity.ReportConfigDespatchEntity;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
public interface IReportConfigDespatchService extends BaseService<ReportConfigDespatchEntity> {
R despatchConfigPage(ReportConfigDTO reportConfigDTO);
R addDespatchConfig(ReportConfigDTO reportConfigDTO);
R deleteDespatchConfig(ReportConfigDTO reportConfigDTO);
}

14
blade-service/logpm-report/src/main/java/com/logpm/report/service/IReportConfigTransferService.java

@ -0,0 +1,14 @@
package com.logpm.report.service;
import com.logpm.report.dto.ReportConfigDTO;
import com.logpm.report.entity.ReportConfigTransferEntity;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
public interface IReportConfigTransferService extends BaseService<ReportConfigTransferEntity> {
R transferConfigPage(ReportConfigDTO reportConfigDTO);
R addTransferConfig(ReportConfigDTO reportConfigDTO);
R deleteTransferConfig(ReportConfigDTO reportConfigDTO);
}

13
blade-service/logpm-report/src/main/java/com/logpm/report/service/IReportQualityService.java

@ -0,0 +1,13 @@
package com.logpm.report.service;
import com.logpm.report.dto.ReportQualityDTO;
import org.springblade.core.tool.api.R;
import javax.servlet.http.HttpServletResponse;
public interface IReportQualityService {
R updateWaybillQualityPage(ReportQualityDTO reportQualityDTO);
void updateWaybillQualityExport(ReportQualityDTO reportQualityDTO, HttpServletResponse response);
}

24
blade-service/logpm-report/src/main/java/com/logpm/report/service/IReportTimeService.java

@ -15,4 +15,28 @@ public interface IReportTimeService {
R checkWaybillTimePage(ReportTimeDTO reportTimeDTO);
void checkWaybillTimeExport(ReportTimeDTO reportTimeDTO, HttpServletResponse response);
R packageStartTimePage(ReportTimeDTO reportTimeDTO);
void packageStartTimeExport(ReportTimeDTO reportTimeDTO, HttpServletResponse response);
R zeroStartTimePage(ReportTimeDTO reportTimeDTO);
void zeroStartTimeExport(ReportTimeDTO reportTimeDTO, HttpServletResponse response);
R packageTransferTimePage(ReportTimeDTO reportTimeDTO);
void packageTransferTimeExport(ReportTimeDTO reportTimeDTO, HttpServletResponse response);
R zeroTransferTimePage(ReportTimeDTO reportTimeDTO);
void zeroTransferTimeExport(ReportTimeDTO reportTimeDTO, HttpServletResponse response);
R packageAllTrunklineTimePage(ReportTimeDTO reportTimeDTO);
void packageAllTrunklineTimeExport(ReportTimeDTO reportTimeDTO, HttpServletResponse response);
R zeroAllTrunklineTimePage(ReportTimeDTO reportTimeDTO);
void zeroAllTrunklineTimeExport(ReportTimeDTO reportTimeDTO, HttpServletResponse response);
}

67
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportConfigAdvanceDetailOpenServiceImpl.java

@ -0,0 +1,67 @@
package com.logpm.report.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.report.dto.ReportConfigDTO;
import com.logpm.report.entity.ReportConfigAdvanceDetailOpenEntity;
import com.logpm.report.mapper.ReportConfigAdvanceDetailOpenMapper;
import com.logpm.report.service.IReportConfigAdvanceDetailOpenService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.api.R;
import org.springframework.stereotype.Service;
import java.util.Objects;
@Service
@AllArgsConstructor
@Slf4j
public class ReportConfigAdvanceDetailOpenServiceImpl extends BaseServiceImpl<ReportConfigAdvanceDetailOpenMapper, ReportConfigAdvanceDetailOpenEntity> implements IReportConfigAdvanceDetailOpenService {
@Override
public R openTimeConfigPage(ReportConfigDTO reportConfigDTO) {
IPage<Object> page = new Page<>();
page.setCurrent(reportConfigDTO.getPageNum());
page.setSize(reportConfigDTO.getPageSize());
IPage<ReportConfigAdvanceDetailOpenEntity> ipage = baseMapper.openTimeConfigPage(page, reportConfigDTO);
return R.data(ipage);
}
@Override
public R addOpenTimeConfig(ReportConfigDTO reportConfigDTO) {
Long warehouseId = reportConfigDTO.getWarehouseId();
String warehouseName = reportConfigDTO.getWarehouseName();
String brand = reportConfigDTO.getBrand();
QueryWrapper<ReportConfigAdvanceDetailOpenEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("warehouse_name",warehouseName)
.eq("brand",brand)
.eq("is_deleted",0);
ReportConfigAdvanceDetailOpenEntity reportConfigAdvanceDetailOpenEntity = baseMapper.selectOne(queryWrapper);
if(!Objects.isNull(reportConfigAdvanceDetailOpenEntity)){
reportConfigAdvanceDetailOpenEntity.setHoursTime(reportConfigDTO.getHoursTime());
}else{
reportConfigAdvanceDetailOpenEntity = ReportConfigAdvanceDetailOpenEntity.builder()
.warehouseId(warehouseId)
.warehouseName(warehouseName)
.brand(brand)
.hoursTime(reportConfigDTO.getHoursTime())
.build();
}
saveOrUpdate(reportConfigAdvanceDetailOpenEntity);
return R.success("保存成功");
}
@Override
public R deleteOpenTimeConfig(ReportConfigDTO reportConfigDTO) {
Long id = reportConfigDTO.getId();
removeById(id);
return R.success("删除成功");
}
}

69
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportConfigAllTrunklineServiceImpl.java

@ -0,0 +1,69 @@
package com.logpm.report.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.report.dto.ReportConfigDTO;
import com.logpm.report.entity.ReportConfigAdvanceDetailOpenEntity;
import com.logpm.report.entity.ReportConfigAllTrunklineEntity;
import com.logpm.report.mapper.ReportConfigAllTrunklineMapper;
import com.logpm.report.service.IReportConfigAllTrunklineService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.api.R;
import org.springframework.stereotype.Service;
import java.util.Objects;
@Service
@AllArgsConstructor
@Slf4j
public class ReportConfigAllTrunklineServiceImpl extends BaseServiceImpl<ReportConfigAllTrunklineMapper, ReportConfigAllTrunklineEntity> implements IReportConfigAllTrunklineService {
@Override
public R allTrunklineConfigPage(ReportConfigDTO reportConfigDTO) {
IPage<Object> page = new Page<>();
page.setCurrent(reportConfigDTO.getPageNum());
page.setSize(reportConfigDTO.getPageSize());
IPage<ReportConfigAdvanceDetailOpenEntity> ipage = baseMapper.allTrunklineConfigPage(page, reportConfigDTO);
return R.data(ipage);
}
@Override
public R addAllTrunklineConfig(ReportConfigDTO reportConfigDTO) {
Long departureWarehouseId = reportConfigDTO.getDepartureWarehouseId();
String departureWarehouseName = reportConfigDTO.getDepartureWarehouseName();
Long destinationWarehouseId = reportConfigDTO.getDestinationWarehouseId();
String destinationWarehouseName = reportConfigDTO.getDestinationWarehouseName();
String brand = reportConfigDTO.getBrand();
QueryWrapper<ReportConfigAllTrunklineEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("departure_warehouse_name",departureWarehouseName)
.eq("destination_warehouse_name",destinationWarehouseName)
.eq("is_deleted",0);
ReportConfigAllTrunklineEntity reportConfigAllTrunklineEntity = baseMapper.selectOne(queryWrapper);
if(!Objects.isNull(reportConfigAllTrunklineEntity)){
reportConfigAllTrunklineEntity.setHoursTime(reportConfigDTO.getHoursTime());
}else{
reportConfigAllTrunklineEntity = ReportConfigAllTrunklineEntity.builder()
.departureWarehouseId(departureWarehouseId)
.departureWarehouseName(departureWarehouseName)
.destinationWarehouseId(destinationWarehouseId)
.destinationWarehouseName(destinationWarehouseName)
.hoursTime(reportConfigDTO.getHoursTime())
.build();
}
saveOrUpdate(reportConfigAllTrunklineEntity);
return R.success("保存成功");
}
@Override
public R deleteAllTrunklineConfig(ReportConfigDTO reportConfigDTO) {
Long id = reportConfigDTO.getId();
removeById(id);
return R.success("删除成功");
}
}

70
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportConfigCheckWaybillServiceImpl.java

@ -0,0 +1,70 @@
package com.logpm.report.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.report.dto.ReportConfigDTO;
import com.logpm.report.entity.ReportConfigCheckWaybillEntity;
import com.logpm.report.mapper.ReportConfigCheckWaybillMapper;
import com.logpm.report.service.IReportConfigCheckWaybillService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.api.R;
import org.springframework.stereotype.Service;
import java.util.Objects;
@Service
@AllArgsConstructor
@Slf4j
public class ReportConfigCheckWaybillServiceImpl extends BaseServiceImpl<ReportConfigCheckWaybillMapper, ReportConfigCheckWaybillEntity> implements IReportConfigCheckWaybillService {
@Override
public R checkWaybillConfigPage(ReportConfigDTO reportConfigDTO) {
IPage<Object> page = new Page<>();
page.setCurrent(reportConfigDTO.getPageNum());
page.setSize(reportConfigDTO.getPageSize());
IPage<ReportConfigCheckWaybillEntity> ipage = baseMapper.checkWaybillConfigPage(page, reportConfigDTO);
return R.data(ipage);
}
@Override
public R addCheckWaybillConfig(ReportConfigDTO reportConfigDTO) {
Long departureWarehouseId = reportConfigDTO.getDepartureWarehouseId();
String departureWarehouseName = reportConfigDTO.getDepartureWarehouseName();
Long destinationWarehouseId = reportConfigDTO.getDestinationWarehouseId();
String destinationWarehouseName = reportConfigDTO.getDestinationWarehouseName();
String brand = reportConfigDTO.getBrand();
QueryWrapper<ReportConfigCheckWaybillEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("departure_warehouse_name",departureWarehouseName)
.eq("destination_warehouse_name",destinationWarehouseName)
.eq("brand",brand)
.eq("is_deleted",0);
ReportConfigCheckWaybillEntity reportConfigCheckWaybillEntity = baseMapper.selectOne(queryWrapper);
if(!Objects.isNull(reportConfigCheckWaybillEntity)){
reportConfigCheckWaybillEntity.setHoursTime(reportConfigDTO.getHoursTime());
}else{
reportConfigCheckWaybillEntity = ReportConfigCheckWaybillEntity.builder()
.departureWarehouseId(departureWarehouseId)
.departureWarehouseName(departureWarehouseName)
.destinationWarehouseId(destinationWarehouseId)
.destinationWarehouseName(destinationWarehouseName)
.brand(brand)
.hoursTime(reportConfigDTO.getHoursTime())
.build();
}
saveOrUpdate(reportConfigCheckWaybillEntity);
return R.success("保存成功");
}
@Override
public R deleteCheckWaybillConfig(ReportConfigDTO reportConfigDTO) {
Long id = reportConfigDTO.getId();
removeById(id);
return R.success("删除成功");
}
}

70
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportConfigDespatchServiceImpl.java

@ -0,0 +1,70 @@
package com.logpm.report.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.report.dto.ReportConfigDTO;
import com.logpm.report.entity.ReportConfigDespatchEntity;
import com.logpm.report.mapper.ReportConfigDespatchMapper;
import com.logpm.report.service.IReportConfigDespatchService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.api.R;
import org.springframework.stereotype.Service;
import java.util.Objects;
@Service
@AllArgsConstructor
@Slf4j
public class ReportConfigDespatchServiceImpl extends BaseServiceImpl<ReportConfigDespatchMapper, ReportConfigDespatchEntity> implements IReportConfigDespatchService {
@Override
public R despatchConfigPage(ReportConfigDTO reportConfigDTO) {
IPage<Object> page = new Page<>();
page.setCurrent(reportConfigDTO.getPageNum());
page.setSize(reportConfigDTO.getPageSize());
IPage<ReportConfigDespatchEntity> ipage = baseMapper.despatchConfigPage(page, reportConfigDTO);
return R.data(ipage);
}
@Override
public R addDespatchConfig(ReportConfigDTO reportConfigDTO) {
Long departureWarehouseId = reportConfigDTO.getDepartureWarehouseId();
String departureWarehouseName = reportConfigDTO.getDepartureWarehouseName();
Long destinationWarehouseId = reportConfigDTO.getDestinationWarehouseId();
String destinationWarehouseName = reportConfigDTO.getDestinationWarehouseName();
String brand = reportConfigDTO.getBrand();
QueryWrapper<ReportConfigDespatchEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("departure_warehouse_name",departureWarehouseName)
.eq("destination_warehouse_name",destinationWarehouseName)
.eq("brand",brand)
.eq("is_deleted",0);
ReportConfigDespatchEntity reportConfigDespatchEntity = baseMapper.selectOne(queryWrapper);
if(!Objects.isNull(reportConfigDespatchEntity)){
reportConfigDespatchEntity.setHoursTime(reportConfigDTO.getHoursTime());
}else{
reportConfigDespatchEntity = ReportConfigDespatchEntity.builder()
.departureWarehouseId(departureWarehouseId)
.destinationWarehouseId(destinationWarehouseId)
.departureWarehouseName(departureWarehouseName)
.destinationWarehouseName(destinationWarehouseName)
.brand(brand)
.hoursTime(reportConfigDTO.getHoursTime())
.build();
}
saveOrUpdate(reportConfigDespatchEntity);
return R.success("保存成功");
}
@Override
public R deleteDespatchConfig(ReportConfigDTO reportConfigDTO) {
Long id = reportConfigDTO.getId();
removeById(id);
return R.success("删除成功");
}
}

65
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportConfigTransferServiceImpl.java

@ -0,0 +1,65 @@
package com.logpm.report.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.report.dto.ReportConfigDTO;
import com.logpm.report.entity.ReportConfigTransferEntity;
import com.logpm.report.mapper.ReportConfigTransferMapper;
import com.logpm.report.service.IReportConfigTransferService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.api.R;
import org.springframework.stereotype.Service;
import java.util.Objects;
@Service
@AllArgsConstructor
@Slf4j
public class ReportConfigTransferServiceImpl extends BaseServiceImpl<ReportConfigTransferMapper, ReportConfigTransferEntity> implements IReportConfigTransferService {
@Override
public R transferConfigPage(ReportConfigDTO reportConfigDTO) {
IPage<Object> page = new Page<>();
page.setCurrent(reportConfigDTO.getPageNum());
page.setSize(reportConfigDTO.getPageSize());
IPage<ReportConfigTransferEntity> ipage = baseMapper.transferConfigPage(page, reportConfigDTO);
return R.data(ipage);
}
@Override
public R addTransferConfig(ReportConfigDTO reportConfigDTO) {
Long warehouseId = reportConfigDTO.getWarehouseId();
String warehouseName = reportConfigDTO.getWarehouseName();
String brand = reportConfigDTO.getBrand();
QueryWrapper<ReportConfigTransferEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("warehouse_name",warehouseName)
.eq("brand",brand)
.eq("is_deleted",0);
ReportConfigTransferEntity reportConfigTransferEntity = baseMapper.selectOne(queryWrapper);
if(!Objects.isNull(reportConfigTransferEntity)){
reportConfigTransferEntity.setHoursTime(reportConfigDTO.getHoursTime());
}else{
reportConfigTransferEntity = ReportConfigTransferEntity.builder()
.warehouseId(warehouseId)
.warehouseName(warehouseName)
.brand(brand)
.hoursTime(reportConfigDTO.getHoursTime())
.build();
}
saveOrUpdate(reportConfigTransferEntity);
return R.success("保存成功");
}
@Override
public R deleteTransferConfig(ReportConfigDTO reportConfigDTO) {
Long id = reportConfigDTO.getId();
removeById(id);
return R.success("删除成功");
}
}

53
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportQualityServiceImpl.java

@ -0,0 +1,53 @@
package com.logpm.report.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.report.dto.ReportQualityDTO;
import com.logpm.report.mapper.ReportQualityMapper;
import com.logpm.report.service.IReportQualityService;
import com.logpm.report.vo.ReportCheckWaybillTimeVO;
import com.logpm.report.vo.ReportUpdateWaybillVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.utils.CommonUtil;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.api.R;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@Service
@AllArgsConstructor
@Slf4j
public class ReportQualityServiceImpl implements IReportQualityService {
private final ReportQualityMapper reportQualityMapper;
@Override
public R updateWaybillQualityPage(ReportQualityDTO reportQualityDTO) {
IPage<Object> page = new Page<>();
page.setCurrent(reportQualityDTO.getPageNum());
page.setSize(reportQualityDTO.getPageSize());
reportQualityDTO.setStartTime(CommonUtil.getStartByDateStr(reportQualityDTO.getStartTimeStr()));
reportQualityDTO.setEndTime(CommonUtil.getEndByDateStr(reportQualityDTO.getEndTimeStr()));
IPage<ReportUpdateWaybillVO> iPage = reportQualityMapper.updateWaybillQualityPage(page,reportQualityDTO);
return R.data(iPage);
}
@Override
public void updateWaybillQualityExport(ReportQualityDTO reportQualityDTO, HttpServletResponse response) {
reportQualityDTO.setStartTime(CommonUtil.getStartByDateStr(reportQualityDTO.getStartTimeStr()));
reportQualityDTO.setEndTime(CommonUtil.getEndByDateStr(reportQualityDTO.getEndTimeStr()));
List<ReportUpdateWaybillVO> list = reportQualityMapper.updateWaybillQualityExport(reportQualityDTO);
//导出ls
ExcelUtil.export(response, "改单质量报表导出", "改单质量报表导出", list, ReportUpdateWaybillVO.class);
}
}

291
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportTimeServiceImpl.java

@ -1,12 +1,16 @@
package com.logpm.report.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.report.dto.ReportTimeDTO;
import com.logpm.report.entity.ReportConfigAdvanceDetailOpenEntity;
import com.logpm.report.entity.ReportConfigCheckWaybillEntity;
import com.logpm.report.entity.ReportConfigDespatchEntity;
import com.logpm.report.entity.ReportConfigTransferEntity;
import com.logpm.report.mapper.ReportTimeMapper;
import com.logpm.report.service.IReportTimeService;
import com.logpm.report.vo.ReportCheckWaybillTimeVO;
import com.logpm.report.vo.ReportOpenTimeVO;
import com.logpm.report.service.*;
import com.logpm.report.vo.*;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.utils.CommonUtil;
@ -16,6 +20,7 @@ import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Objects;
@Service
@Slf4j
@ -23,6 +28,10 @@ import java.util.List;
public class ReportTimeServiceImpl implements IReportTimeService {
private final ReportTimeMapper reportTimeMapper;
private final IReportConfigAdvanceDetailOpenService advanceDetailOpenService;
private final IReportConfigCheckWaybillService checkWaybillService;
private final IReportConfigDespatchService despatchService;
private final IReportConfigTransferService transferService;
@Override
@ -35,6 +44,17 @@ public class ReportTimeServiceImpl implements IReportTimeService {
reportTimeDTO.setStartTime(CommonUtil.getStartByDateStr(reportTimeDTO.getStartTimeStr()));
reportTimeDTO.setEndTime(CommonUtil.getEndByDateStr(reportTimeDTO.getEndTimeStr()));
reportTimeDTO.setHoursTime(72);
QueryWrapper<ReportConfigAdvanceDetailOpenEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("warehouse_name","全部")
.eq("brand","全部")
.eq("is_deleted",0);
ReportConfigAdvanceDetailOpenEntity advanceDetailOpenEntity = advanceDetailOpenService.getOne(queryWrapper);
if(!Objects.isNull(advanceDetailOpenEntity)){
reportTimeDTO.setHoursTime(advanceDetailOpenEntity.getHoursTime());
}
IPage<ReportOpenTimeVO> iPage = reportTimeMapper.openTimePage(page,reportTimeDTO);
@ -44,13 +64,21 @@ public class ReportTimeServiceImpl implements IReportTimeService {
@Override
public void openTimeExport(ReportTimeDTO reportTimeDTO, HttpServletResponse response) {
IPage<Object> page = new Page<>();
page.setCurrent(reportTimeDTO.getPageNum());
page.setSize(reportTimeDTO.getPageSize());
reportTimeDTO.setStartTime(CommonUtil.getStartByDateStr(reportTimeDTO.getStartTimeStr()));
reportTimeDTO.setEndTime(CommonUtil.getEndByDateStr(reportTimeDTO.getEndTimeStr()));
reportTimeDTO.setHoursTime(72);
QueryWrapper<ReportConfigAdvanceDetailOpenEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("warehouse_name","全部")
.eq("brand","全部")
.eq("is_deleted",0);
ReportConfigAdvanceDetailOpenEntity advanceDetailOpenEntity = advanceDetailOpenService.getOne(queryWrapper);
if(!Objects.isNull(advanceDetailOpenEntity)){
reportTimeDTO.setHoursTime(advanceDetailOpenEntity.getHoursTime());
}
List<ReportOpenTimeVO> list = reportTimeMapper.openTimeExport(reportTimeDTO);
//导出ls
@ -67,6 +95,18 @@ public class ReportTimeServiceImpl implements IReportTimeService {
reportTimeDTO.setStartTime(CommonUtil.getStartByDateStr(reportTimeDTO.getStartTimeStr()));
reportTimeDTO.setEndTime(CommonUtil.getEndByDateStr(reportTimeDTO.getEndTimeStr()));
reportTimeDTO.setHoursTime(72);
QueryWrapper<ReportConfigCheckWaybillEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("departure_warehouse_name","全部")
.eq("destination_warehouse_name","全部")
.eq("brand","全部")
.eq("is_deleted",0);
ReportConfigCheckWaybillEntity checkWaybillEntity = checkWaybillService.getOne(queryWrapper);
if(!Objects.isNull(checkWaybillEntity)){
reportTimeDTO.setHoursTime(checkWaybillEntity.getHoursTime());
}
IPage<ReportCheckWaybillTimeVO> iPage = reportTimeMapper.checkWaybillTimePage(page,reportTimeDTO);
@ -75,6 +115,30 @@ public class ReportTimeServiceImpl implements IReportTimeService {
@Override
public void checkWaybillTimeExport(ReportTimeDTO reportTimeDTO, HttpServletResponse response) {
reportTimeDTO.setStartTime(CommonUtil.getStartByDateStr(reportTimeDTO.getStartTimeStr()));
reportTimeDTO.setEndTime(CommonUtil.getEndByDateStr(reportTimeDTO.getEndTimeStr()));
reportTimeDTO.setHoursTime(72);
QueryWrapper<ReportConfigCheckWaybillEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("departure_warehouse_name","全部")
.eq("destination_warehouse_name","全部")
.eq("brand","全部")
.eq("is_deleted",0);
ReportConfigCheckWaybillEntity checkWaybillEntity = checkWaybillService.getOne(queryWrapper);
if(!Objects.isNull(checkWaybillEntity)){
reportTimeDTO.setHoursTime(checkWaybillEntity.getHoursTime());
}
List<ReportCheckWaybillTimeVO> list = reportTimeMapper.checkWaybillTimeExport(reportTimeDTO);
//导出ls
ExcelUtil.export(response, "审单及时率报表导出", "审单及时率报表导出", list, ReportCheckWaybillTimeVO.class);
}
@Override
public R packageStartTimePage(ReportTimeDTO reportTimeDTO) {
IPage<Object> page = new Page<>();
page.setCurrent(reportTimeDTO.getPageNum());
page.setSize(reportTimeDTO.getPageSize());
@ -82,9 +146,220 @@ public class ReportTimeServiceImpl implements IReportTimeService {
reportTimeDTO.setStartTime(CommonUtil.getStartByDateStr(reportTimeDTO.getStartTimeStr()));
reportTimeDTO.setEndTime(CommonUtil.getEndByDateStr(reportTimeDTO.getEndTimeStr()));
List<ReportCheckWaybillTimeVO> list = reportTimeMapper.checkWaybillTimeExport(reportTimeDTO);
reportTimeDTO.setHoursTime(72);
QueryWrapper<ReportConfigDespatchEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("departure_warehouse_name","全部")
.eq("destination_warehouse_name","全部")
.eq("brand","全部")
.eq("is_deleted",0);
ReportConfigDespatchEntity despatchEntity = despatchService.getOne(queryWrapper);
if(!Objects.isNull(despatchEntity)){
reportTimeDTO.setHoursTime(despatchEntity.getHoursTime());
}
IPage<ReportPackgeStartTimeVO> iPage = reportTimeMapper.packageStartTimePage(page,reportTimeDTO);
return R.data(iPage);
}
@Override
public void packageStartTimeExport(ReportTimeDTO reportTimeDTO, HttpServletResponse response) {
reportTimeDTO.setStartTime(CommonUtil.getStartByDateStr(reportTimeDTO.getStartTimeStr()));
reportTimeDTO.setEndTime(CommonUtil.getEndByDateStr(reportTimeDTO.getEndTimeStr()));
reportTimeDTO.setHoursTime(72);
QueryWrapper<ReportConfigDespatchEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("departure_warehouse_name","全部")
.eq("destination_warehouse_name","全部")
.eq("brand","全部")
.eq("is_deleted",0);
ReportConfigDespatchEntity despatchEntity = despatchService.getOne(queryWrapper);
if(!Objects.isNull(despatchEntity)){
reportTimeDTO.setHoursTime(despatchEntity.getHoursTime());
}
List<ReportPackgeStartTimeVO> list = reportTimeMapper.packageStartTimeExport(reportTimeDTO);
//导出ls
ExcelUtil.export(response, "审单及时率报表导出", "审单及时率报表导出", list, ReportCheckWaybillTimeVO.class);
ExcelUtil.export(response, "订制品发运时效报表导出", "订制品发运时效报表导出", list, ReportPackgeStartTimeVO.class);
}
@Override
public R zeroStartTimePage(ReportTimeDTO reportTimeDTO) {
IPage<Object> page = new Page<>();
page.setCurrent(reportTimeDTO.getPageNum());
page.setSize(reportTimeDTO.getPageSize());
reportTimeDTO.setStartTime(CommonUtil.getStartByDateStr(reportTimeDTO.getStartTimeStr()));
reportTimeDTO.setEndTime(CommonUtil.getEndByDateStr(reportTimeDTO.getEndTimeStr()));
reportTimeDTO.setHoursTime(72);
QueryWrapper<ReportConfigDespatchEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("departure_warehouse_name","全部")
.eq("destination_warehouse_name","全部")
.eq("brand","全部")
.eq("is_deleted",0);
ReportConfigDespatchEntity despatchEntity = despatchService.getOne(queryWrapper);
if(!Objects.isNull(despatchEntity)){
reportTimeDTO.setHoursTime(despatchEntity.getHoursTime());
}
IPage<ReportPackgeStartTimeVO> iPage = reportTimeMapper.zeroStartTimePage(page,reportTimeDTO);
return R.data(iPage);
}
@Override
public void zeroStartTimeExport(ReportTimeDTO reportTimeDTO, HttpServletResponse response) {
reportTimeDTO.setStartTime(CommonUtil.getStartByDateStr(reportTimeDTO.getStartTimeStr()));
reportTimeDTO.setEndTime(CommonUtil.getEndByDateStr(reportTimeDTO.getEndTimeStr()));
reportTimeDTO.setHoursTime(72);
QueryWrapper<ReportConfigDespatchEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("departure_warehouse_name","全部")
.eq("destination_warehouse_name","全部")
.eq("brand","全部")
.eq("is_deleted",0);
ReportConfigDespatchEntity despatchEntity = despatchService.getOne(queryWrapper);
if(!Objects.isNull(despatchEntity)){
reportTimeDTO.setHoursTime(despatchEntity.getHoursTime());
}
List<ReportPackgeStartTimeVO> list = reportTimeMapper.zeroStartTimeExport(reportTimeDTO);
//导出ls
ExcelUtil.export(response, "零担发运时效报表导出", "零担发运时效报表导出", list, ReportPackgeStartTimeVO.class);
}
@Override
public R packageTransferTimePage(ReportTimeDTO reportTimeDTO) {
IPage<Object> page = new Page<>();
page.setCurrent(reportTimeDTO.getPageNum());
page.setSize(reportTimeDTO.getPageSize());
reportTimeDTO.setStartTime(CommonUtil.getStartByDateStr(reportTimeDTO.getStartTimeStr()));
reportTimeDTO.setEndTime(CommonUtil.getEndByDateStr(reportTimeDTO.getEndTimeStr()));
reportTimeDTO.setHoursTime(48);
QueryWrapper<ReportConfigTransferEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("warehouse_name","全部")
.eq("brand","全部")
.eq("is_deleted",0);
ReportConfigTransferEntity transferEntity = transferService.getOne(queryWrapper);
if(!Objects.isNull(transferEntity)){
reportTimeDTO.setHoursTime(transferEntity.getHoursTime());
}
IPage<ReportPackgeTransferTimeVO> iPage = reportTimeMapper.packageTransferTimePage(page,reportTimeDTO);
return R.data(iPage);
}
@Override
public void packageTransferTimeExport(ReportTimeDTO reportTimeDTO, HttpServletResponse response) {
reportTimeDTO.setStartTime(CommonUtil.getStartByDateStr(reportTimeDTO.getStartTimeStr()));
reportTimeDTO.setEndTime(CommonUtil.getEndByDateStr(reportTimeDTO.getEndTimeStr()));
reportTimeDTO.setHoursTime(48);
QueryWrapper<ReportConfigTransferEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("warehouse_name","全部")
.eq("brand","全部")
.eq("is_deleted",0);
ReportConfigTransferEntity transferEntity = transferService.getOne(queryWrapper);
if(!Objects.isNull(transferEntity)){
reportTimeDTO.setHoursTime(transferEntity.getHoursTime());
}
List<ReportPackgeTransferTimeVO> list = reportTimeMapper.packageTransferTimeExport(reportTimeDTO);
//导出ls
ExcelUtil.export(response, "订制品中转时效报表导出", "订制品中转时效报表导出", list, ReportPackgeTransferTimeVO.class);
}
@Override
public R zeroTransferTimePage(ReportTimeDTO reportTimeDTO) {
IPage<Object> page = new Page<>();
page.setCurrent(reportTimeDTO.getPageNum());
page.setSize(reportTimeDTO.getPageSize());
reportTimeDTO.setStartTime(CommonUtil.getStartByDateStr(reportTimeDTO.getStartTimeStr()));
reportTimeDTO.setEndTime(CommonUtil.getEndByDateStr(reportTimeDTO.getEndTimeStr()));
IPage<ReportPackgeTransferTimeVO> iPage = reportTimeMapper.zeroTransferTimePage(page,reportTimeDTO);
return R.data(iPage);
}
@Override
public void zeroTransferTimeExport(ReportTimeDTO reportTimeDTO, HttpServletResponse response) {
reportTimeDTO.setStartTime(CommonUtil.getStartByDateStr(reportTimeDTO.getStartTimeStr()));
reportTimeDTO.setEndTime(CommonUtil.getEndByDateStr(reportTimeDTO.getEndTimeStr()));
List<ReportPackgeTransferTimeVO> list = reportTimeMapper.zeroTransferTimeExport(reportTimeDTO);
//导出ls
ExcelUtil.export(response, "零担中转时效报表导出", "零担中转时效报表导出", list, ReportPackgeTransferTimeVO.class);
}
@Override
public R packageAllTrunklineTimePage(ReportTimeDTO reportTimeDTO) {
IPage<Object> page = new Page<>();
page.setCurrent(reportTimeDTO.getPageNum());
page.setSize(reportTimeDTO.getPageSize());
reportTimeDTO.setStartTime(CommonUtil.getStartByDateStr(reportTimeDTO.getStartTimeStr()));
reportTimeDTO.setEndTime(CommonUtil.getEndByDateStr(reportTimeDTO.getEndTimeStr()));
IPage<ReportPackgeAllTrunklineTimeVO> iPage = reportTimeMapper.packageAllTrunklineTimePage(page,reportTimeDTO);
return R.data(iPage);
}
@Override
public void packageAllTrunklineTimeExport(ReportTimeDTO reportTimeDTO, HttpServletResponse response) {
reportTimeDTO.setStartTime(CommonUtil.getStartByDateStr(reportTimeDTO.getStartTimeStr()));
reportTimeDTO.setEndTime(CommonUtil.getEndByDateStr(reportTimeDTO.getEndTimeStr()));
List<ReportPackgeAllTrunklineTimeVO> list = reportTimeMapper.packageAllTrunklineTimeExport(reportTimeDTO);
//导出ls
ExcelUtil.export(response, "订制品干线整体时效报表导出", "订制品干线整体时效报表导出", list, ReportPackgeAllTrunklineTimeVO.class);
}
@Override
public R zeroAllTrunklineTimePage(ReportTimeDTO reportTimeDTO) {
IPage<Object> page = new Page<>();
page.setCurrent(reportTimeDTO.getPageNum());
page.setSize(reportTimeDTO.getPageSize());
reportTimeDTO.setStartTime(CommonUtil.getStartByDateStr(reportTimeDTO.getStartTimeStr()));
reportTimeDTO.setEndTime(CommonUtil.getEndByDateStr(reportTimeDTO.getEndTimeStr()));
IPage<ReportPackgeAllTrunklineTimeVO> iPage = reportTimeMapper.zeroAllTrunklineTimePage(page,reportTimeDTO);
return R.data(iPage);
}
@Override
public void zeroAllTrunklineTimeExport(ReportTimeDTO reportTimeDTO, HttpServletResponse response) {
reportTimeDTO.setStartTime(CommonUtil.getStartByDateStr(reportTimeDTO.getStartTimeStr()));
reportTimeDTO.setEndTime(CommonUtil.getEndByDateStr(reportTimeDTO.getEndTimeStr()));
List<ReportPackgeAllTrunklineTimeVO> list = reportTimeMapper.zeroAllTrunklineTimeExport(reportTimeDTO);
//导出ls
ExcelUtil.export(response, "零担干线整体时效报表导出", "零担干线整体时效报表导出", list, ReportPackgeAllTrunklineTimeVO.class);
}
}

90
blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportPackgeAllTrunklineTimeVO.java

@ -0,0 +1,90 @@
package com.logpm.report.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class ReportPackgeAllTrunklineTimeVO implements Serializable {
@ExcelProperty(value = "事业线")
private String businessLine;
@ExcelProperty(value = "始发仓")
private String departureWarehouseName;
@ExcelProperty(value = "目的仓")
private String destinationWarehouseName;
@ExcelProperty(value = "品牌")
private String brand;
@ExcelProperty(value = "开单数")
private Integer waybillNum;
@ExcelProperty(value = "开单件数")
private Integer openNum;
@ExcelProperty(value = "目的仓到仓件数")
private Integer arriveNum;
@ExcelProperty(value = "目的仓未到仓件数")
private Integer noArriveNum;
@ExcelProperty(value = "目的仓到仓率")
private String arriveRate;
@ExcelProperty(value = "到仓平均干线时效(天)")
private String avgTime;
@ExcelProperty(value = "准时到仓件数")
private Integer onTimeArriveNum;
@ExcelProperty(value = "准时到仓率")
private String onTimeArriveRate;
@ExcelProperty(value = "1天到仓数")
private Integer oneArriveNum;
@ExcelProperty(value = "1天到仓占比")
private String oneArriveRate;
@ExcelProperty(value = "2天到仓数")
private Integer twoArriveNum;
@ExcelProperty(value = "2天到仓占比")
private String twoArriveRate;
@ExcelProperty(value = "3天到仓数")
private Integer threeArriveNum;
@ExcelProperty(value = "3天到仓占比")
private String threeArriveRate;
@ExcelProperty(value = "4天到仓数")
private Integer fourArriveNum;
@ExcelProperty(value = "4天到仓占比")
private String fourArriveRate;
@ExcelProperty(value = "5天到仓数")
private Integer fiveArriveNum;
@ExcelProperty(value = "5天到仓占比")
private String fiveArriveRate;
@ExcelProperty(value = "6天到仓数")
private Integer sixArriveNum;
@ExcelProperty(value = "6天到仓占比")
private String sixArriveRate;
@ExcelProperty(value = "7天到仓数")
private Integer sevenArriveNum;
@ExcelProperty(value = "7天到仓占比")
private String sevenArriveRate;
@ExcelProperty(value = "7天至10天到仓数")
private Integer sevenToTenArriveNum;
@ExcelProperty(value = "7天至10天到仓占比")
private String sevenToTenArriveRate;
@ExcelProperty(value = "10天以上到仓数")
private Integer moreTenArriveNum;
@ExcelProperty(value = "10天以上到仓占比")
private String moreTenArriveRate;
}

38
blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportPackgeStartTimeVO.java

@ -0,0 +1,38 @@
package com.logpm.report.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class ReportPackgeStartTimeVO implements Serializable {
@ExcelProperty(value = "事业线")
private String businessLine;
@ExcelProperty(value = "始发仓")
private String departureWarehouseName;
@ExcelProperty(value = "目的仓")
private String destinationWarehouseName;
@ExcelProperty(value = "品牌")
private String brand;
@ExcelProperty(value = "总件数")
private Integer totalNum;
@ExcelProperty(value = "开单件数")
private Integer openNum;
@ExcelProperty(value = "开单数")
private Integer waybillNum;
@ExcelProperty(value = "发运件数")
private Integer startNum;
@ExcelProperty(value = "准时发运件数")
private Integer onTimeNum;
@ExcelProperty(value = "准时发运率")
private String onTimeRate;
@ExcelProperty(value = "平均发运时效")
private String avgTime;
}

37
blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportPackgeTransferTimeVO.java

@ -0,0 +1,37 @@
package com.logpm.report.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class ReportPackgeTransferTimeVO implements Serializable {
@ExcelProperty(value = "事业线")
private String businessLine;
@ExcelProperty(value = "始发仓")
private String departureWarehouseName;
@ExcelProperty(value = "目的仓")
private String destinationWarehouseName;
@ExcelProperty(value = "中转仓")
private String warehouseName;
@ExcelProperty(value = "品牌")
private String brand;
@ExcelProperty(value = "中转入库件数")
private Integer incomingNum;
@ExcelProperty(value = "中转出库件数")
private Integer outNum;
@ExcelProperty(value = "中转准时出库件数")
private Integer outOnTimeNum;
@ExcelProperty(value = "中转准时出库率")
private String outOnTimeRate;
@ExcelProperty(value = "平均中转时效")
private String avgTime;
}

56
blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportUpdateWaybillVO.java

@ -0,0 +1,56 @@
package com.logpm.report.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class ReportUpdateWaybillVO implements Serializable {
@ExcelProperty(value = "事业线")
private String businessLine;
@ExcelProperty(value = "始发仓")
private String departureWarehouseName;
@ExcelProperty(value = "目的仓")
private String destinationWarehouseName;
@ExcelProperty(value = "品牌")
private String brand;
@ExcelProperty(value = "总运单数")
private Integer totalNum;//总运单数
@ExcelProperty(value = "改单单数")
private Integer editNum;//改单单数
@ExcelProperty(value = "改单次数")
private Integer updateNum;//改单次数
@ExcelProperty(value = "发车前修改数")
private Integer startBeforeNum;
@ExcelProperty(value = "发车前修改率")
private String startBeforeRate;
@ExcelProperty(value = "人为操作错误数")
private Integer personProbleNum;
@ExcelProperty(value = "人为操作错误率")
private String personProbleRate;
@ExcelProperty(value = "财务修改数")
private Integer financeUpdateNum;
@ExcelProperty(value = "财务修改率")
private String financeUpdateRate;
@ExcelProperty(value = "商家要求数")
private Integer merchantUpdateNum;
@ExcelProperty(value = "商家要求率")
private String merchantUpdateRate;
@ExcelProperty(value = "业务调整数")
private Integer businessUpdateNum;
@ExcelProperty(value = "业务调整率")
private String businessUpdateRate;
@ExcelProperty(value = "改单率")
private String updateRate;
}

1
blade-service/logpm-report/src/main/resources/application-dev.yml

@ -21,6 +21,7 @@ spring:
#启用sql日志拦截器
proxy-filters:
- sqlLogInterceptor
query-timeout: 60000
#设置默认的数据源或者数据源组,默认值即为master
primary: master
datasource:

1
blade-service/logpm-report/src/main/resources/application-prod.yml

@ -21,6 +21,7 @@ spring:
#启用sql日志拦截器
proxy-filters:
- sqlLogInterceptor
query-timeout: 60000
#设置默认的数据源或者数据源组,默认值即为master
primary: master
datasource:

1
blade-service/logpm-report/src/main/resources/application-test.yml

@ -21,6 +21,7 @@ spring:
#启用sql日志拦截器
proxy-filters:
- sqlLogInterceptor
query-timeout: 60000
#设置默认的数据源或者数据源组,默认值即为master
primary: master
datasource:

19
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/controller/MerchantBalanceController.java

@ -1,21 +1,28 @@
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.dto.StatisticsBalanceAbnormalDTO;
import com.logpm.statistics.dto.StatisticsBalanceRecordDTO;
import com.logpm.statistics.entity.TrunklineCarCostEntity;
import com.logpm.statistics.service.IStatisticsBalanceOrderInfoService;
import com.logpm.statistics.vo.StatisticsBalanceOrderExcel;
import com.logpm.statistics.vo.StatisticsBalanceOrderInfoVO;
import com.logpm.statistics.vo.TrunklineCarCostExcel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@Slf4j
@ -207,5 +214,17 @@ public class MerchantBalanceController {
}
}
@PostMapping("/export")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "商家结算成本导出", notes = "传入merchantStatisticsDTO")
public void export(@RequestBody MerchantStatisticsDTO merchantStatisticsDTO, HttpServletResponse response) {
List<StatisticsBalanceOrderExcel> statisticsBalanceOrderExcels = balanceOrderInfoService.pageListExport(merchantStatisticsDTO);
//导出ls
ExcelUtil.export(response, "商家结算成本", "商家结算成本", statisticsBalanceOrderExcels, StatisticsBalanceOrderExcel.class);
}
}

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

@ -1,6 +1,7 @@
package com.logpm.statistics.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.statistics.dto.MerchantStatisticsDTO;
@ -46,7 +47,7 @@ public class TrunklineCarCostController extends BladeController {
/**
* 分页列表
*/
@PostMapping("/page")
@GetMapping("/page")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "分页", notes = "传入expenseDispatchWarehouseMonth")
public R<IPage<TrunklineCarCostEntity>> page(@ApiIgnore @RequestParam Map<String, Object> expenseDispatchPriceOverZone, Query query) {
@ -68,10 +69,7 @@ public class TrunklineCarCostController extends BladeController {
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"));
}
QueryWrapper<TrunklineCarCostEntity> lambdaQueryWrapper = Condition.getQueryWrapper(args, TrunklineCarCostEntity.class);
List<TrunklineCarCostEntity> ls = trunklineCarCostService.list(lambdaQueryWrapper);
List<TrunklineCarCostExcel> data = getTrunklineCarCostExcels(ls);
@ -79,6 +77,7 @@ public class TrunklineCarCostController extends BladeController {
ExcelUtil.export(response, "干线车次费用", "干线车次费用", data, TrunklineCarCostExcel.class);
}
@NotNull
private static List<TrunklineCarCostExcel> getTrunklineCarCostExcels(List<TrunklineCarCostEntity> ls) {
List<TrunklineCarCostExcel> data = new ArrayList<>();

2
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/StatisticsBalanceOrderInfoMapper.java

@ -18,4 +18,6 @@ public interface StatisticsBalanceOrderInfoMapper extends BaseMapper<StatisticsB
BigDecimal findHasBalanceFeeByBalanceOrderIds(@Param("balanceOrderIds") List<Long> balanceOrderIds);
void deleteBanlanceOrderByIds(@Param("balanceOrderIds") List<Long> balanceOrderIds);
List<StatisticsBalanceOrderInfoVO> pageListExport(@Param("param") MerchantStatisticsDTO merchantStatisticsDTO);
}

52
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/StatisticsBalanceOrderInfoMapper.xml

@ -65,6 +65,58 @@
#{item}
</foreach>
</select>
<select id="pageListExport" resultType="com.logpm.statistics.vo.StatisticsBalanceOrderInfoVO">
select *
from logpm_statistics_balance_order_info
where 1=1
<if test="param.waybillNo != null and param.waybillNo != ''">
and LOCATE(#{param.waybillNo},waybill_no) > 0
</if>
<if test="param.orderCode != null and param.orderCode != ''">
and LOCATE(#{param.orderCode},order_code) > 0
</if>
<if test="param.balanceOrderNo != null and param.balanceOrderNo != ''">
and LOCATE(#{param.balanceOrderNo},balance_order_no) > 0
</if>
<if test="param.balanceStatus != null ">
and balance_status = #{param.balanceStatus}
</if>
<if test="param.abnormalBalanceStatus != null ">
and abnormal_balance_status = #{param.abnormalBalanceStatus}
</if>
<if test="param.consignee != null ">
and consignee = #{param.consignee}
</if>
<if test="param.consignee != null ">
and consignee = #{param.consignee}
</if>
<if test="param.createTimeStart != null">
and create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
and create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.abnormalTimeStart != null">
and abnormal_time &gt;= #{param.abnormalTimeStart}
</if>
<if test="param.abnormalTimeEnd != null">
and abnormal_time &lt;= #{param.abnormalTimeEnd}
</if>
<if test="param.balanceTimeStart != null">
and balance_time &gt;= #{param.balanceTimeStart}
</if>
<if test="param.balanceTimeEnd != null">
and balance_time &lt;= #{param.balanceTimeEnd}
</if>
<if test="param.destinationWarehouseName != null">
and destination_warehouse_name = #{param.destinationWarehouseName}
</if>
and destination_warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<delete id="deleteBanlanceOrderByIds" >
delete from logpm_statistics_balance_order_info

1
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/StatisticsOrderInfoMapper.java

@ -51,4 +51,5 @@ public interface StatisticsOrderInfoMapper extends BaseMapper<StatisticsOrderInf
List<AdvanceDetailDTO> selectAdvinceDetail(@Param("waybillIds") Set<Long> waybillIds, @Param("orderCodes") Set<String> orderCodes);
IPage<StatisticsOrderInfoVO> pageList2B(IPage<Object> page, @Param("param") MerchantStatisticsDTO merchantStatisticsDTO);
List<StatisticsOrderInfoVO> pageList2BNoPage( @Param("param") MerchantStatisticsDTO merchantStatisticsDTO);
}

150
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/StatisticsOrderInfoMapper.xml

@ -775,6 +775,156 @@
group by lsoi.waybill_id
</select>
<select id="pageList2BNoPage" resultType="com.logpm.statistics.vo.StatisticsOrderInfoVO">
select lsoi.id orderInfoId,
lsoi.brand_id brandId,
lsoi.brand brand,
lsoi.waybill_id waybillId,
lsoi.waybill_no waybillNo,
lww.order_no orderCode,
lsoi.type_service typeService,
lww.shipper shipper,
lww.shipper_name shipperPerson,
lww.shipper_mobile shipperMobile,
lww.shipper_address shipperAddress,
lww.consignee consignee,
lww.consignee_name consigneePerson,
lww.consignee_mobile consigneeMobile,
lww.consignee_address consigneeAddress,
case lww.waybill_status
when 100 then 2
when 90 then 1
else 0
end
as signStatus,
lww.sign_time signTime,
lww.sign_num signNum,
lww.create_time openTime,
lww.departure departure,
lww.destination destination,
lsoi.departure_warehouse_id departureWarehouseId,
lsoi.departure_warehouse_name departureWarehouseName,
lsoi.destination_warehouse_id destinationWarehouseId,
lsoi.destination_warehouse_name destinationWarehouseName,
lww.delivery_method deliveryMethod,
lww.customer_train customerTrain,
lww.pay_type payType,
lww.pay_way payWay,
lsoi.create_reconciliation_order_status createReconciliationOrderStatus,
lsoi.create_reconciliation_user_name createReconciliationUserName,
lsoi.create_reconciliation_date createReconciliationDate,
lsoi.cycle cycle,
lsoi.warehouse_fee_interval warehouseFeeInterval,
lsoi.sync_fee_status syncFeeStatus,
lsoi.sync_fee_date syncFeeDate,
lbc.clean_obj_type cleanObjType
from logpm_statistics_order_info lsoi
left join logpm_basicdata_client lbc on lbc.id = lsoi.consignee_id
left join logpm_warehouse_waybill lww on lww.id = lsoi.waybill_id
where 1=1
and lsoi.create_reconciliation_order_status = 0
<if test="param.listType == 1">
and lsoi.type_service != '2'
</if>
<if test="param.listType == 2">
and lsoi.type_service = '2'
</if>
<if test="param.consignee != null and param.consignee != '' ">
and Locate(#{param.consignee},lww.consignee) > 0
</if>
<if test="param.confirmStatisticsOrder != null">
and lsoi.confirm_statistics_order = #{param.confirmStatisticsOrder}
</if>
<if test="param.syncFeeSstatus != null">
and lsoi.sync_fee_status = #{param.syncFeeSstatus}
</if>
<if test="param.signStatus != null">
and CASE
lww.waybill_status
WHEN 100 THEN
2
WHEN 90 THEN
1 ELSE 0
END = #{param.signStatus}
</if>
<if test="param.signStatuses != null">
and CASE
lww.waybill_status
WHEN 100 THEN
2
WHEN 90 THEN
1 ELSE 0
END in
<foreach collection="param.signStatuses" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.waybillNo != null and param.waybillNo != '' ">
and Locate(#{param.waybillNo},lww.waybill_no) > 0
</if>
<if test="param.orderCode != null and param.orderCode != '' ">
and Locate(#{param.orderCode},lww.order_no) > 0
</if>
<if test="param.shipper != null and param.shipper != '' ">
and Locate(#{param.shipper},lww.shipper) > 0
</if>
<if test="param.departureWarehouseName != null and param.departureWarehouseName != '' ">
and Locate(#{param.departureWarehouseName},lsoi.departure_warehouse_name) > 0
</if>
<if test="param.destinationWarehouseName != null and param.destinationWarehouseName != '' ">
and Locate(#{param.destinationWarehouseName},lsoi.destination_warehouse_name) > 0
</if>
<if test="param.typeService != null">
and lsoi.type_service = #{param.typeService}
</if>
<if test="param.openTimeStart != null">
and lww.document_making_time &gt;= #{param.openTimeStart}
</if>
<if test="param.openTimeEnd != null">
and lww.document_making_time &lt;= #{param.openTimeEnd}
</if>
<if test="param.signTimeStart != null">
and lww.sign_time &gt;= #{param.signTimeStart}
</if>
<if test="param.signTimeEnd != null">
and lww.sign_time &lt;= #{param.signTimeEnd}
</if>
<if test="param.syncFeeDateStart != null">
and lsoi.sync_fee_date &gt;= #{param.syncFeeDateStart}
</if>
<if test="param.syncFeeDateEnd != null">
and lsoi.sync_fee_date &lt;= #{param.syncFeeDateEnd}
</if>
<if test="param.shipperPerson != null and param.shipperPerson != '' ">
and Locate(#{param.shipperPerson},lww.shipper_person) > 0
</if>
<if test="param.shipperMoblie != null and param.shipperMoblie != '' ">
and Locate(#{param.shipperMoblie},lww.shipper_mobile) > 0
</if>
<if test="param.consigneePerson != null and param.consigneePerson != '' ">
and Locate(#{param.consigneePerson},lww.consignee_name) > 0
</if>
<if test="param.consigneeMobile != null and param.consigneeMobile != '' ">
and Locate(#{param.consigneeMobile},lww.consignee_mobile) > 0
</if>
<if test="param.cleanObjType != null and param.cleanObjType != '' ">
and lbc.clean_obj_type = #{param.cleanObjType}
</if>
<if test="param.payType != null and param.payType != '' ">
and lww.pay_type = #{param.payType}
</if>
<if test="param.payWay != null and param.payWay != '' ">
and lww.pay_way = #{param.payWay}
</if>
and lsoi.destination_warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
group by lsoi.waybill_id
</select>
<delete id="deleteDataByWaybillId" >
delete from logpm_statistics_order_info

4
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/IStatisticsBalanceOrderInfoService.java

@ -5,6 +5,7 @@ import com.logpm.statistics.dto.MerchantStatisticsDTO;
import com.logpm.statistics.dto.StatisticsBalanceAbnormalDTO;
import com.logpm.statistics.dto.StatisticsBalanceRecordDTO;
import com.logpm.statistics.entity.StatisticsBalanceOrderInfoEntity;
import com.logpm.statistics.vo.StatisticsBalanceOrderExcel;
import com.logpm.statistics.vo.StatisticsBalanceOrderInfoVO;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
@ -30,4 +31,7 @@ public interface IStatisticsBalanceOrderInfoService extends BaseService<Statisti
void deleteBanlanceOrderByIds(List<Long> balanceOrderIds);
R enterBalance(StatisticsBalanceRecordDTO balanceRecordDTO);
List<StatisticsBalanceOrderExcel> pageListExport(MerchantStatisticsDTO merchantStatisticsDTO);
}

35
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsBalanceOrderInfoServiceImpl.java

@ -13,11 +13,13 @@ import com.logpm.statistics.entity.*;
import com.logpm.statistics.mapper.StatisticsBalanceOrderInfoMapper;
import com.logpm.statistics.service.*;
import com.logpm.statistics.vo.StatisticsBalanceAbnormalVO;
import com.logpm.statistics.vo.StatisticsBalanceOrderExcel;
import com.logpm.statistics.vo.StatisticsBalanceOrderInfoVO;
import com.logpm.statistics.vo.StatisticsBalanceRecordVO;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.DistributionTypeConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.secure.utils.AuthUtil;
@ -329,4 +331,37 @@ public R findBalanceDetail(Long balanceOrderId) {
}
@Override
public List<StatisticsBalanceOrderExcel> pageListExport(MerchantStatisticsDTO merchantStatisticsDTO) {
List<StatisticsBalanceOrderExcel> result = new ArrayList<>();
List<Long> warehouseIds = warehouseClient.getWarehouseIds();
if(!warehouseIds.isEmpty()){
merchantStatisticsDTO.setWarehouseIds(warehouseIds);
}
List<StatisticsBalanceOrderInfoVO> dataList = baseMapper.pageListExport(merchantStatisticsDTO);
dataList.forEach(data ->{
StatisticsBalanceOrderExcel statisticsBalanceOrderExcel = BeanUtil.copy(data, StatisticsBalanceOrderExcel.class);
assert statisticsBalanceOrderExcel != null;
statisticsBalanceOrderExcel.setTypeServiceName(DistributionTypeConstant.getName(String.valueOf(data.getTypeService())));
statisticsBalanceOrderExcel.setAbnormalBalanceStatusName(1==data.getAbnormalBalanceStatus()?"是":"否");
statisticsBalanceOrderExcel.setAftersaleName(1==data.getIsAftersale()?"是":"否");
String balancesBalanceOName = "未结算";
if(data.getBalanceStatus()==2){
balancesBalanceOName = "已结算";
}else if(data.getBalanceStatus()==1){
balancesBalanceOName = "部分结算";
}
statisticsBalanceOrderExcel.setBalanceStatusName(balancesBalanceOName);
result.add(statisticsBalanceOrderExcel);
});
return result;
}
}

161
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsOrderInfoServiceImpl.java

@ -36,6 +36,8 @@ import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.DistributionTypeConstant;
import org.springblade.common.enums.BooleanZeroOneEnums;
import org.springblade.common.exception.CustomerException;
import org.springblade.common.utils.CommonUtil;
@ -45,6 +47,7 @@ import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.system.cache.DictBizCache;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
@ -1289,23 +1292,157 @@ public class StatisticsOrderInfoServiceImpl extends BaseServiceImpl<StatisticsOr
@Override
public List<StatisticsOrderInfoExportVO> orderInfoListExport(MerchantStatisticsDTO merchantStatisticsDTO) {
List<StatisticsOrderInfoExportVO> records = baseMapper.orderInfoListExport(merchantStatisticsDTO);
//把records中所有的orderInfoId放入一个集合
List<Long> orderInfoIdList = records.stream().map(StatisticsOrderInfoExportVO::getOrderInfoId).collect(Collectors.toList());
List<StatisticsPackageFeeInfoVO> orderPackageInfoList = baseMapper.findPackageListByOrderIdsGroupById(orderInfoIdList);
//把orderPackageInfoList转化成以orderInfoId为key的Map
Map<Long, StatisticsPackageFeeInfoVO> orderPackageInfoMap = orderPackageInfoList.stream()
.collect(Collectors.toMap(StatisticsPackageFeeInfoVO::getOrderInfoId, statisticsPackageFeeInfoVO -> statisticsPackageFeeInfoVO));
List<StatisticsOrderInfoExportVO> result = new ArrayList<>();
List<Long> warehouseIds = warehouseClient.getWarehouseIds();
if (!warehouseIds.isEmpty()) {
merchantStatisticsDTO.setWarehouseIds(warehouseIds);
}
List<StatisticsOrderInfoVO> statisticsOrderInfoVOIPage = baseMapper.pageList2BNoPage(merchantStatisticsDTO);
records.forEach(statisticsOrderInfoVO -> {
Long orderInfoId = statisticsOrderInfoVO.getOrderInfoId();
StatisticsPackageFeeInfoVO statisticsPackageFeeInfoVO = orderPackageInfoMap.get(orderInfoId);
BeanUtil.copy(statisticsPackageFeeInfoVO, statisticsOrderInfoVO);
Set<Long> waybillIds = statisticsOrderInfoVOIPage.stream().map(StatisticsOrderInfoVO::getWaybillId).collect(Collectors.toSet());
// 查询运单明细集合
List<WaybillDetailByWaybillNoVo> waybillDetailByWaybillId = baseMapper.findWaybillDetailByWaybillId(waybillIds);
//得到运单号
Set<String> orderCodeSet = statisticsOrderInfoVOIPage.stream().map(StatisticsOrderInfoVO::getOrderCode).collect(Collectors.toSet());
// 通过运单号进行分组
Map<Long, List<WaybillDetailByWaybillNoVo>> waybillDetailByWaybillIdMap = waybillDetailByWaybillId.stream().collect(Collectors.groupingBy(WaybillDetailByWaybillNoVo::getWaybillId));
Map<Long, StatisticsPackageFeeInfoVO> orderPackageInfoMap;
if (CollUtil.isNotEmpty(waybillIds)) {
List<StatisticsPackageFeeInfoVO> orderPackageInfoList = baseMapper.findPackageListByOrderIdsGroupByWaybillId(waybillIds);
//把orderPackageInfoList转化成以orderInfoId为key的Map
if (CollUtil.isNotEmpty(orderPackageInfoList)) {
orderPackageInfoMap = orderPackageInfoList.stream()
.collect(Collectors.toMap(StatisticsPackageFeeInfoVO::getWaybillId, statisticsPackageFeeInfoVO -> statisticsPackageFeeInfoVO));
} else {
orderPackageInfoMap = null;
}
} else {
orderPackageInfoMap = null;
}
List<AdvanceDetailDTO> advanceDetailDTOS = baseMapper.selectAdvinceDetail(waybillIds, orderCodeSet);
statisticsOrderInfoVOIPage.forEach(statisticsOrderInfoVO -> {
// Long waybillId = statisticsOrderInfoVO.getWaybillId();
Long waybillId = statisticsOrderInfoVO.getWaybillId();
String orderCode = statisticsOrderInfoVO.getOrderCode();
// 查询站存单上的
List<AdvanceDetailDTO> advanceDetailDTOList = advanceDetailDTOS.stream().
filter(advanceDetailDTO -> advanceDetailDTO.getWaybillId().equals(waybillId) && advanceDetailDTO.getOrderCode().equals(orderCode)).collect(Collectors.toList());
// 对advanceDetailDTOList 按照 incomeCategoryName 进分组 并统计数量
Map<String, List<AdvanceDetailDTO>> collect = advanceDetailDTOList.stream().filter(advanceDetailDTO -> !Objects.isNull(advanceDetailDTO.getIncomeCategoryName())).collect(Collectors.groupingBy(AdvanceDetailDTO::getIncomeCategoryName));
Long waybillId1 = statisticsOrderInfoVO.getWaybillId();
if (orderPackageInfoMap != null) {
StatisticsPackageFeeInfoVO statisticsPackageFeeInfoVO = orderPackageInfoMap.get(waybillId1);
if (statisticsPackageFeeInfoVO != null) {
// statisticsPackageFeeInfoVO.setGoodsName(statisticsOrderInfoVO.getGoodsName());
BeanUtil.copy(statisticsPackageFeeInfoVO, statisticsOrderInfoVO);
if (StringUtil.isNotBlank(statisticsOrderInfoVO.getGoodsName())) {
// String[] split = statisticsOrderInfoVO.getGoodsName().split(",");
List<WaybillDetailByWaybillNoVo> waybillDetailByWaybillNoVos = waybillDetailByWaybillIdMap.get(statisticsOrderInfoVO.getWaybillId());
StringBuffer sb = new StringBuffer();
StringBuffer sb1 = new StringBuffer();
StringBuffer sb3 = new StringBuffer();
if (collect.isEmpty()) {
if (!waybillDetailByWaybillNoVos.isEmpty()) {
for (WaybillDetailByWaybillNoVo waybillDetailByWaybillNoVo : waybillDetailByWaybillNoVos) {
if (!sb3.toString().isEmpty()) {
sb3.append(",");
}
sb3.append(waybillDetailByWaybillNoVo.getProductName());
if (!sb.toString().isEmpty()) {
sb.append(",");
}
sb.append(waybillDetailByWaybillNoVo.getNum());
if (!sb1.toString().isEmpty()) {
sb1.append(",");
}
sb1.append(waybillDetailByWaybillNoVo.getPrice());
}
}
} else {
collect.keySet().forEach(s -> {
if (!sb3.toString().isEmpty()) {
sb3.append(",");
}
sb3.append(s);
List<AdvanceDetailDTO> advanceDetailDTOS1 = collect.get(s);
Optional<WaybillDetailByWaybillNoVo> first = waybillDetailByWaybillNoVos.stream().filter(waybillDetailByWaybillNoVo -> waybillDetailByWaybillNoVo.getProductName().equals(s)).findFirst();
if (first.isPresent()) {
WaybillDetailByWaybillNoVo waybillDetailByWaybillNoVo = first.get();
if (!sb.toString().isEmpty()) {
sb.append(",");
}
//统计 advanceDetailDTOS1 这个集合种 quantity 的和值
int sum = advanceDetailDTOS1.stream().mapToInt(AdvanceDetailDTO::getQuantity).sum();
sb.append(sum);
if (!sb1.toString().isEmpty()) {
sb1.append(",");
}
sb1.append(waybillDetailByWaybillNoVo.getPrice());
}
});
}
statisticsOrderInfoVO.setGoodsName(sb3.toString());
statisticsOrderInfoVO.setGoodsNum(sb.toString());
statisticsOrderInfoVO.setGoodsPrice(sb1.toString());
}
}
}
StatisticsOrderInfoExportVO statisticsOrderInfoExportVO = new StatisticsOrderInfoExportVO();
BeanUtil.copy(statisticsOrderInfoVO, statisticsOrderInfoExportVO);
statisticsOrderInfoExportVO.setTypeServiceName(DistributionTypeConstant.getName(statisticsOrderInfoVO.getTypeService()));
statisticsOrderInfoExportVO.setPayType(DictBizCache.getValue(DictBizConstant.OPEN_ORDER_PAY_TYPE, statisticsOrderInfoVO.getPayType()));
statisticsOrderInfoExportVO.setPayWay(DictBizCache.getValue(DictBizConstant.OPEN_ORDER_PAY_WAY, statisticsOrderInfoVO.getPayWay()));
String signName = "未签收";
if (90 == statisticsOrderInfoVO.getSignStatus()) {
signName = "部分签收";
} else if (100 == statisticsOrderInfoVO.getSignStatus()) {
signName = "已签收";
}
// statisticsOrderInfoExportVO.setSignStatus();
statisticsOrderInfoExportVO.setSignStatusName(signName);
result.add(statisticsOrderInfoExportVO);
});
return result;
return records;
// return records;
}
@Override

71
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/vo/StatisticsOrderInfoExportVO.java

@ -2,6 +2,7 @@ package com.logpm.statistics.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import lombok.Data;
import java.io.Serializable;
@ -23,7 +24,7 @@ public class StatisticsOrderInfoExportVO implements Serializable {
private String orderCode;//订单号
@ExcelProperty(value = "商家服务类型")
private String typeService; // 商家服务类型
private String typeServiceName; // 商家服务类型
@ExcelProperty(value = "发货单位")
private String shipper; // 发货单位
@ -49,13 +50,15 @@ public class StatisticsOrderInfoExportVO implements Serializable {
@ExcelProperty(value = "收货地址")
private String consigneeAddress; // 收货地址
@ExcelProperty(value = "订单签收状态")
private String signStatus; // 订单签收状态
@ExcelProperty(value = "签收状态")
private String signStatusName; // 订单签收状态
@ExcelProperty(value = "签收时间")
private Date signDate; // 签收时间
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
private Date signTime; // 签收时间
@ExcelProperty(value = "开单时间")
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
private Date openTime; // 开单时间
@ExcelProperty(value = "发站仓")
@ -73,11 +76,11 @@ public class StatisticsOrderInfoExportVO implements Serializable {
@ExcelProperty(value = "客户车次号")
private String customerTrain; // 客户车次号
@ExcelProperty(value = "支付类型")
private String payType; // 支付类型
@ExcelProperty(value = "支付方式")
private String payWay; // 支付方式
private String payType;
@ExcelProperty(value = "付款方式")
private String payWay; //
@ExcelProperty(value = "品类名称")
private String goodsName; // 物料品类
@ -148,14 +151,14 @@ public class StatisticsOrderInfoExportVO implements Serializable {
@ExcelProperty(value = "配送过路费")
private BigDecimal deliveryCrossingFee;
@ExcelProperty(value = "在库周期")
private Integer cycle; // 在库周期
@ExcelProperty(value = "结算方类型")
private String cleanObjType; // 结算方
@ExcelProperty(value = "费用区间")
private String warehouseFeeInterval; // 费用区间
// @ExcelProperty(value = "在库周期")
// private Integer cycle; // 在库周期
//
// @ExcelProperty(value = "结算方类型")
// private String cleanObjType; // 结算方
//
// @ExcelProperty(value = "费用区间")
// private String warehouseFeeInterval; // 费用区间
@ExcelProperty(value = "安装费")
private BigDecimal installFee = BigDecimal.ZERO; // 安装费
@ -163,24 +166,24 @@ public class StatisticsOrderInfoExportVO implements Serializable {
@ExcelProperty(value = "其他费")
private BigDecimal otherFee = BigDecimal.ZERO; // 其他费
@ExcelProperty(value = "签收数")
@ExcelProperty(value = "签收数")
private Integer signNum;
@ExcelProperty(value = "最后签收时间")
private Date signTime; // 最晚一条
@ExcelProperty(value = "同步费用状态")
private Integer syncFeeStatus;
@ExcelProperty(value = "同步费用时间")
private Date syncFeeDate;
@ExcelProperty(value = "生成对账单状态")
private Integer createReconciliationOrderStatus; // 0未生成 1已生成
@ExcelProperty(value = "生成对账单确认人")
private String createReconciliationUserName; // 生成对账单确认人
@ExcelProperty(value = "生成对账单时间")
private Date createReconciliationDate; // 生成对账单时间
// @ExcelProperty(value = "最后签收时间")
// private Date signTime; // 最晚一条
// @ExcelProperty(value = "同步费用状态")
// private Integer syncFeeStatus;
//
// @ExcelProperty(value = "同步费用时间")
// private Date syncFeeDate;
// @ExcelProperty(value = "生成对账单状态")
// private Integer createReconciliationOrderStatus; // 0未生成 1已生成
//
// @ExcelProperty(value = "生成对账单确认人")
// private String createReconciliationUserName; // 生成对账单确认人
//
// @ExcelProperty(value = "生成对账单时间")
// private Date createReconciliationDate; // 生成对账单时间
}

6
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

@ -740,6 +740,8 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
waybillEntity.setReturnStatus(0);
waybillEntity.setCheckStatus(0);
waybillEntity.setUpdateStatus(0);
waybillEntity.setSettlementStatus("10");
waybillEntity.setPayStatus("10");
Long waybillId = warehouseWaybillClient.addEnntity(waybillEntity);
waybillEntity.setId(waybillId);
@ -1095,6 +1097,10 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
waybillEntity.setReturnStatus(0);
waybillEntity.setCheckStatus(0);
waybillEntity.setUpdateStatus(0);
waybillEntity.setPayStatus("10");
waybillEntity.setSettlementStatus("10");
Long waybillId = warehouseWaybillClient.addEnntity(waybillEntity);
waybillEntity.setId(waybillId);
List<WarehouseWayBillDetail> details = new ArrayList<>();

Loading…
Cancel
Save