diff --git a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesSettlementEntity.java b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesSettlementEntity.java index 33463b8b0..8e06a48ff 100644 --- a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesSettlementEntity.java +++ b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesSettlementEntity.java @@ -1,5 +1,6 @@ package com.logpm.aftersales.entity; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import lombok.Data; @@ -68,7 +69,14 @@ public class AftersalesSettlementEntity extends TenantEntity { private Date overTime; - + @TableField(exist=false) + private String workOrderNumbers; + @TableField(exist=false) + private String orderCodes; + @TableField(exist=false) + private Date startCreateTime; + @TableField(exist=false) + private Date endCreateTime; diff --git a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesWorkOrderEntity.java b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesWorkOrderEntity.java index f8bc575e2..d8d104013 100644 --- a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesWorkOrderEntity.java +++ b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesWorkOrderEntity.java @@ -19,15 +19,14 @@ package com.logpm.aftersales.entity; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; -import lombok.Data; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; - -import java.math.BigDecimal; -import java.util.Date; +import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.tenant.mp.TenantEntity; +import java.util.Date; + /** * 客服异常工单 实体类 * @@ -332,6 +331,15 @@ public class AftersalesWorkOrderEntity extends TenantEntity { /** * 金额总和 */ + @TableField(exist=false) + private String workOrderNumbers; + @TableField(exist=false) + private String orderCodes; + @TableField(exist=false) + private Date startCreateTime; + @TableField(exist=false) + private Date endCreateTime; + @TableField(exist=false) private String totalAmountNum; @TableField(exist=false) diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesAppealDTO.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesAppealDTO.java index d7ab92fe8..fe27fa427 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesAppealDTO.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesAppealDTO.java @@ -21,6 +21,7 @@ import com.logpm.aftersales.entity.AftersalesAppealPeopleEntity; import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.Date; import java.util.List; /** @@ -66,5 +67,12 @@ public class AftersalesAppealDTO extends AftersalesAppealEntity { */ private Long createUserId; + /** 范围查找工单 */ + private String workOrderNumbers; + /** 范围查找订单 */ + private String orderCodes; + /** 范围查找创建时间 */ + private Date startCreateTime; + private Date endCreateTime; } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAppealMapper.xml b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAppealMapper.xml index e8189e8cd..778bc19b8 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAppealMapper.xml +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAppealMapper.xml @@ -57,6 +57,21 @@ LEFT JOIN logpm_aftersales_completion_record lacr on laa.work_order_id = lacr.work_order_id LEFT JOIN logpm_aftersales_work_order lawo ON lawo.id = lacr.work_order_id laa.is_deleted = 0 + + and lawo.work_order_number in + + #{workOrderNumber} + + + + and lawo.order_code in + + #{orderCode} + + + + and lawo.create_time between #{param.startCreateTime} and #{param.endCreateTime} + and (lacr.warehouse_id = #{param.warehouseId } or laa.create_user = #{param.createUserId}) diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml index 83bc2ef35..17762225f 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml @@ -116,6 +116,21 @@ LEFT JOIN logpm_aftersales_processing_results AS lapr ON lapr.work_order_id = lawo.id AND lapr.is_deleted = 0 lawo.is_deleted = 0 + + and lawo.work_order_number in + + #{workOrderNumber} + + + + and lawo.order_code in + + #{orderCode} + + + + and lawo.create_time between #{param.startCreateTime} and #{param.endCreateTime} + and lawo.work_order_status = #{param.workOrderStatusNameS } and lawo.id = #{param.id } and lawo.work_order_type = #{param.workOrderType } @@ -554,6 +569,21 @@ lap.conditions != '3' and lap.is_deleted = 0 and law.id is not null and lap.processing_status in ('1','3') and lap.types_of = '2' and law.work_order_status in ('10','20','30') + + and law.work_order_number in + + #{workOrderNumber} + + + + and law.order_code in + + #{orderCode} + + + + and law.create_time between #{param.startCreateTime} and #{param.endCreateTime} + and law.work_order_status = #{param.workOrderStatusNameS } and law.operator = #{param.operator } and law.work_order_status = #{param.workOrderStatus} @@ -681,6 +711,21 @@ LEFT JOIN logpm_aftersales_completion_record lacr ON lacr.work_order_id = lapr.work_order_id lawo.work_order_status = 90 and lap.is_deleted = 0 + + and lawo.work_order_number in + + #{workOrderNumber} + + + + and lawo.order_code in + + #{orderCode} + + + + and lawo.create_time between #{param.startCreateTime} and #{param.endCreateTime} + and lap.business_id =#{param.businessId} and lap.business_name LIKE CONCAT( #{param.businessName}, '%') and lawo.work_order_number LIKE CONCAT( #{param.workOrderNumber}, '%') diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportDeliverServiceImpl.java b/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportDeliverServiceImpl.java index 34d49cde0..6191dba4c 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportDeliverServiceImpl.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportDeliverServiceImpl.java @@ -478,35 +478,43 @@ public class ReportDeliverServiceImpl implements ReportDeliverService { if (more == 1) { // 单仓,最多导出1个月的数据 if (StrUtil.isNotEmpty(query.getTrainNumber()) || StrUtil.isNotEmpty(query.getOrderPackageCode()) || StrUtil.isNotEmpty(query.getReservationCode()) || StrUtil.isNotEmpty(query.getStockArticleId())) { - }else{ + } else { if (ObjectUtil.isNotEmpty(query.getStartTaskTime()) || ObjectUtil.isNotEmpty(query.getEndTaskTime())) { boolean withinOneMonth = DateUtil.between(query.getStartTaskTime(), query.getEndTaskTime(), DateUnit.DAY) <= 30; if (!withinOneMonth) { throw new ServiceException("配送日期必选且时间不超过一个月"); } + } else { + throw new ServiceException("导出时配送日期必填"); } if (ObjectUtil.isNotEmpty(query.getStartSjsigningTime()) || ObjectUtil.isNotEmpty(query.getEndSjsigningTime())) { boolean withinOneMonth = DateUtil.between(query.getStartSjsigningTime(), query.getEndSjsigningTime(), DateUnit.DAY) <= 30; if (!withinOneMonth) { throw new ServiceException("签收日期必选且时间不超过一个月"); } + } else { + throw new ServiceException("导出时签收日期必填"); } } } else { // 多仓,最多导出1个星期的数据 if (StrUtil.isNotEmpty(query.getTrainNumber()) || StrUtil.isNotEmpty(query.getOrderPackageCode()) || StrUtil.isNotEmpty(query.getReservationCode()) || StrUtil.isNotEmpty(query.getStockArticleId())) { - }else{ + } else { if (ObjectUtil.isNotEmpty(query.getStartTaskTime()) || ObjectUtil.isNotEmpty(query.getEndTaskTime())) { boolean withinOneMonth = DateUtil.between(query.getStartTaskTime(), query.getEndTaskTime(), DateUnit.DAY) <= 7; if (!withinOneMonth) { throw new ServiceException("配送日期必选且时间不超过7天"); } + } else { + throw new ServiceException("导出时配送日期必填"); } if (ObjectUtil.isNotEmpty(query.getStartSjsigningTime()) || ObjectUtil.isNotEmpty(query.getEndSjsigningTime())) { boolean withinOneMonth = DateUtil.between(query.getStartSjsigningTime(), query.getEndSjsigningTime(), DateUnit.DAY) <= 7; if (!withinOneMonth) { throw new ServiceException("签收日期必选且时间不超过7天 "); } + } else { + throw new ServiceException("导出时签收日期必填"); } } }