58 changed files with 3704 additions and 71 deletions
@ -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; |
||||||
|
|
||||||
|
} |
@ -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; |
||||||
|
|
||||||
|
} |
@ -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; |
||||||
|
|
||||||
|
} |
@ -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; |
||||||
|
|
||||||
|
} |
@ -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; |
||||||
|
|
||||||
|
} |
@ -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; // 异常备注
|
||||||
|
|
||||||
|
} |
@ -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); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -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); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} |
@ -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; |
||||||
|
|
||||||
|
|
||||||
|
} |
@ -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; |
||||||
|
|
||||||
|
|
||||||
|
} |
@ -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); |
||||||
|
} |
@ -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> |
@ -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); |
||||||
|
} |
@ -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> |
@ -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); |
||||||
|
} |
@ -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> |
@ -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); |
||||||
|
} |
@ -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> |
@ -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); |
||||||
|
} |
@ -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> |
@ -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); |
||||||
|
} |
@ -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 >= #{param.startTime} |
||||||
|
</if> |
||||||
|
<if test="param.endTime != null "> |
||||||
|
and lww.create_time <= #{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 >= #{param.startTime} |
||||||
|
</if> |
||||||
|
<if test="param.endTime != null "> |
||||||
|
and lww.create_time <= #{param.endTime} |
||||||
|
</if> |
||||||
|
group by waw.business_line, |
||||||
|
lww.departure_warehouse_name, |
||||||
|
lww.destination_warehouse_name, |
||||||
|
lww.brand |
||||||
|
</select> |
||||||
|
|
||||||
|
</mapper> |
File diff suppressed because it is too large
Load Diff
@ -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); |
||||||
|
} |
@ -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); |
||||||
|
} |
@ -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); |
||||||
|
} |
@ -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); |
||||||
|
} |
@ -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); |
||||||
|
} |
@ -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); |
||||||
|
|
||||||
|
} |
@ -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("删除成功"); |
||||||
|
} |
||||||
|
} |
@ -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("删除成功"); |
||||||
|
} |
||||||
|
} |
@ -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("删除成功"); |
||||||
|
} |
||||||
|
} |
@ -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("删除成功"); |
||||||
|
} |
||||||
|
} |
@ -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("删除成功"); |
||||||
|
} |
||||||
|
} |
@ -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); |
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -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; |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} |
@ -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; |
||||||
|
|
||||||
|
|
||||||
|
} |
@ -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; |
||||||
|
|
||||||
|
} |
@ -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; |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue