From aa9fbe8759ff07c47a2cc8934844376eff3528c7 Mon Sep 17 00:00:00 2001 From: mashuai Date: Thu, 11 Dec 2025 13:17:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=93=E7=AE=97=E9=A1=B5=E9=9D=A2=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SltAgreementInfoController.java | 38 ++++- .../domain/dto/PeriodCostQueryDto.java | 3 + .../domain/vo/PeriodCostResultVo.java | 12 ++ .../domain/vo/PeriodCostSummaryVo.java | 12 ++ .../domain/vo/SltAgreementInfoLose.java | 36 +++-- .../domain/vo/SltAgreementInfoRepair.java | 44 ++++-- .../domain/vo/SltAgreementInfoScrap.java | 34 +++-- .../settlement/SltAgreementInfoMapper.xml | 132 ++++++++++++++++-- 8 files changed, 264 insertions(+), 47 deletions(-) diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/controller/SltAgreementInfoController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/controller/SltAgreementInfoController.java index 485d912e..c9668782 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/controller/SltAgreementInfoController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/controller/SltAgreementInfoController.java @@ -28,6 +28,7 @@ import com.bonus.common.biz.constant.GlobalConstants; import com.bonus.common.biz.utils.RequestContext; import com.bonus.common.biz.utils.StringHelper; import com.bonus.common.core.exception.ServiceException; +import com.bonus.common.core.utils.DateUtils; import com.bonus.common.core.utils.ServletUtils; import com.bonus.common.log.enums.OperaType; import com.bonus.common.log.enums.OperatorType; @@ -1608,11 +1609,15 @@ public class SltAgreementInfoController extends BaseController { */ @ApiOperation(value = "丢失报表list查询") @GetMapping("/getLostReportList") - public TableDataInfo getLostReportList(SltAgreementInfo bean) { - startPage(); + public AjaxResult getLostReportList(SltAgreementInfo bean) { + /*startPage(); List list = sltAgreementInfoService.getLostReportList(bean); - return getDataTable(list); + return getDataTable(list);*/ + Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1); + Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10); + List list = sltAgreementInfoService.getLostReportList(bean); + return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list)); } /** @@ -1624,9 +1629,16 @@ public class SltAgreementInfoController extends BaseController { @PostMapping("/exportLostList") public void exportLostList(HttpServletResponse response, SltAgreementInfoLose bean) { + String fileName = "丢失费用报表"; List list = sltAgreementInfoService.getLostReportListExport(bean); + // 根据list集合数,去填充序号 + for (int i = 0; i < list.size(); i++) { + list.get(i).setSeq(i + 1); + } ExcelUtil util = new ExcelUtil<>(SltAgreementInfoLose.class); - util.exportExcel(response, list, "导出丢失费用报表"); + // 获取当前年月日时分秒导出时间,用括号拼接在后面 + String title = "丢失费用报表" + "(" + "导出时间:" + DateUtils.getTime() + ")"; + util.exportExcel(response, list, fileName, title); } /** @@ -1649,9 +1661,16 @@ public class SltAgreementInfoController extends BaseController { @PostMapping("/exportRepairList") public void exportRepairList(HttpServletResponse response, SltAgreementInfoRepair bean) { + String fileName = "维修费用报表"; List list = sltAgreementInfoService.getRepairReportListExport(bean); + // 根据list集合数,去填充序号 + for (int i = 0; i < list.size(); i++) { + list.get(i).setSeq(i + 1); + } ExcelUtil util = new ExcelUtil<>(SltAgreementInfoRepair.class); - util.exportExcel(response, list, "导出维修费用报表"); + // 获取当前年月日时分秒导出时间,用括号拼接在后面 + String title = "维修费用报表" + "(" + "导出时间:" + DateUtils.getTime() + ")"; + util.exportExcel(response, list, fileName, title); } /** @@ -1674,9 +1693,16 @@ public class SltAgreementInfoController extends BaseController { @PostMapping("/exportScrapList") public void exportScrapList(HttpServletResponse response, SltAgreementInfoScrap bean) { + String fileName = "报废费用报表"; List list = sltAgreementInfoService.getScrapReportListExport(bean); + // 根据list集合数,去填充序号 + for (int i = 0; i < list.size(); i++) { + list.get(i).setSeq(i + 1); + } ExcelUtil util = new ExcelUtil<>(SltAgreementInfoScrap.class); - util.exportExcel(response, list, "导出报废费用报表"); + // 获取当前年月日时分秒导出时间,用括号拼接在后面 + String title = "报废费用报表" + "(" + "导出时间:" + DateUtils.getTime() + ")"; + util.exportExcel(response, list, fileName, title); } /** diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/dto/PeriodCostQueryDto.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/dto/PeriodCostQueryDto.java index 8e80ae16..cfcaff70 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/dto/PeriodCostQueryDto.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/dto/PeriodCostQueryDto.java @@ -63,4 +63,7 @@ public class PeriodCostQueryDto { @ApiModelProperty(value = "数据所属组织ID") private Long companyId; + + @ApiModelProperty(value = "竣工状态 0=未竣工,1=已竣工") + private String isFinish; } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/PeriodCostResultVo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/PeriodCostResultVo.java index 6fa9a356..0014c802 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/PeriodCostResultVo.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/PeriodCostResultVo.java @@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; import java.math.BigDecimal; import java.util.Date; @@ -116,4 +117,15 @@ public class PeriodCostResultVo { private Integer comsumable; private String settlementStatus; + + @ApiModelProperty(value = "竣工状态 0=未竣工,1=已竣工") + private String isFinish; + + @ApiModelProperty(value = "竣工状态 汉字") + private String proStatus; + + @ApiModelProperty(value = "竣工日期") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date actualEndDate; } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/PeriodCostSummaryVo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/PeriodCostSummaryVo.java index 4b32ddee..4f117408 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/PeriodCostSummaryVo.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/PeriodCostSummaryVo.java @@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import com.bonus.common.core.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; import java.math.BigDecimal; import java.util.Date; @@ -104,4 +105,15 @@ public class PeriodCostSummaryVo { @ApiModelProperty(value = "备注") @Excel(name = "备注") private String remark; + + @ApiModelProperty(value = "竣工状态 0=未竣工,1=已竣工") + private String isFinish; + + @ApiModelProperty(value = "竣工状态 汉字") + private String proStatus; + + @ApiModelProperty(value = "竣工日期") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date actualEndDate; } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/SltAgreementInfoLose.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/SltAgreementInfoLose.java index 6a9e89be..85eab4fd 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/SltAgreementInfoLose.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/SltAgreementInfoLose.java @@ -8,6 +8,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import lombok.experimental.Accessors; +import org.apache.poi.ss.usermodel.HorizontalAlignment; +import org.springframework.format.annotation.DateTimeFormat; import java.math.BigDecimal; import java.util.Date; @@ -36,13 +38,21 @@ public class SltAgreementInfoLose extends BaseEntity { */ private List agreementIds; + @ApiModelProperty(value = "序号") + @Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC, width = 5, sort = 0) + private Integer seq; + /** * 协议编号 */ - @Excel(name = "协议编号",sort = 1) + @Excel(name = "协议号",sort = 1) @ApiModelProperty(value = "协议编号") private String agreementCode; + @ApiModelProperty(value = "分公司") + @Excel(name = "分公司", sort = 2) + private String impUnitName; + @ApiModelProperty("结算申请单号") private String sltApplyCode; @@ -52,20 +62,20 @@ public class SltAgreementInfoLose extends BaseEntity { /** * 设备名称 */ - @Excel(name = "机具名称",sort = 4) + @Excel(name = "机具名称",sort = 5) @ApiModelProperty(value = "机具名称") private String typeName; /** * 规格型号 */ - @Excel(name = "规格型号",sort = 5) + @Excel(name = "规格型号",sort = 6) @ApiModelProperty(value = "规格型号") private String modelName; /** * 计量单位 */ - @Excel(name = "单位",sort = 6) + @Excel(name = "单位",sort = 7) @ApiModelProperty(value = "计量单位") private String mtUnitName; /** @@ -78,7 +88,7 @@ public class SltAgreementInfoLose extends BaseEntity { private Long maId; /** 领料数量 */ - @Excel(name = "丢失数量",sort = 7, cellType = Excel.ColumnType.NUMERIC) + @Excel(name = "丢失数量",sort = 8, cellType = Excel.ColumnType.NUMERIC, align = HorizontalAlignment.RIGHT) @ApiModelProperty(value = "丢失数量") private BigDecimal num; @@ -113,7 +123,7 @@ public class SltAgreementInfoLose extends BaseEntity { private BigDecimal leasePrice; /** 原值 */ - @Excel(name = "单价(元)",sort = 8, cellType = Excel.ColumnType.NUMERIC) + @Excel(name = "单价(元)",sort = 9, cellType = Excel.ColumnType.NUMERIC, align = HorizontalAlignment.RIGHT) @ApiModelProperty(value = "原值") private BigDecimal buyPrice; @@ -156,12 +166,12 @@ public class SltAgreementInfoLose extends BaseEntity { /** * 项目名称 */ - @Excel(name = "结算单位",sort = 2) + @Excel(name = "结算单位",sort = 3, width = 30) private String unitName; /** * 工程名称 */ - @Excel(name = "结算工程",sort = 3) + @Excel(name = "结算工程",sort = 4, width = 40) private String projectName; @ApiModelProperty(value = "往来单位id") @@ -234,7 +244,7 @@ public class SltAgreementInfoLose extends BaseEntity { private BigDecimal repairCost; private BigDecimal scrapCost; - @Excel(name = "丢失费用(元)",sort = 9, cellType = Excel.ColumnType.NUMERIC) + @Excel(name = "丢失费用(元)",sort = 10, cellType = Excel.ColumnType.NUMERIC, align = HorizontalAlignment.RIGHT) private BigDecimal loseCost; private BigDecimal reductionCost; @@ -265,5 +275,13 @@ public class SltAgreementInfoLose extends BaseEntity { @ApiModelProperty("年月") private String yearMonth; + @ApiModelProperty(value = "竣工状态") + @Excel(name = "竣工状态", readConverterExp = "0=未竣工,1=已竣工") + private String isFinish; + @ApiModelProperty(value = "竣工日期") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @Excel(name = "竣工日期", dateFormat = "yyyy-MM-dd") + private Date actualEndDate; } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/SltAgreementInfoRepair.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/SltAgreementInfoRepair.java index 9a33c333..866fd877 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/SltAgreementInfoRepair.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/SltAgreementInfoRepair.java @@ -8,6 +8,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import lombok.experimental.Accessors; +import org.apache.poi.ss.usermodel.HorizontalAlignment; +import org.springframework.format.annotation.DateTimeFormat; import java.math.BigDecimal; import java.util.Date; @@ -27,6 +29,10 @@ public class SltAgreementInfoRepair extends BaseEntity { /** ID */ private Long id; + @ApiModelProperty(value = "序号") + @Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC, width = 5, sort = 0) + private Integer seq; + /** 协议id */ @ApiModelProperty(value = "协议id") private Long agreementId; @@ -39,10 +45,14 @@ public class SltAgreementInfoRepair extends BaseEntity { /** * 协议编号 */ - @Excel(name = "协议编号",sort = 1) + @Excel(name = "协议号",sort = 1) @ApiModelProperty(value = "协议编号") private String agreementCode; + @ApiModelProperty(value = "分公司") + @Excel(name = "分公司", sort = 2) + private String impUnitName; + @ApiModelProperty("结算申请单号") private String sltApplyCode; @@ -52,20 +62,20 @@ public class SltAgreementInfoRepair extends BaseEntity { /** * 设备名称 */ - @Excel(name = "机具名称",sort = 4) + @Excel(name = "机具名称",sort = 5) @ApiModelProperty(value = "机具名称") private String typeName; /** * 规格型号 */ - @Excel(name = "规格型号",sort = 5) + @Excel(name = "规格型号",sort = 6) @ApiModelProperty(value = "规格型号") private String modelName; /** * 计量单位 */ - @Excel(name = "单位",sort = 6) + @Excel(name = "单位",sort = 7) @ApiModelProperty(value = "计量单位") private String mtUnitName; /** @@ -78,8 +88,8 @@ public class SltAgreementInfoRepair extends BaseEntity { private Long maId; /** 领料数量 */ - @Excel(name = "报废数量",sort = 7, cellType = Excel.ColumnType.NUMERIC) - @ApiModelProperty(value = "报废数量") + @Excel(name = "维修数量",sort = 8, cellType = Excel.ColumnType.NUMERIC, align = HorizontalAlignment.RIGHT) + @ApiModelProperty(value = "维修数量") private BigDecimal num; private Long userId; @@ -147,21 +157,21 @@ public class SltAgreementInfoRepair extends BaseEntity { private Long leaseDay; /** - * 租赁费用 + * 维修费用 */ - @ApiModelProperty(value = "租赁费用") - @Excel(name = "报废费用(元)",sort = 8) + @ApiModelProperty(value = "维修费用") + @Excel(name = "维修费用(元)",sort = 9, cellType = Excel.ColumnType.NUMERIC, align = HorizontalAlignment.RIGHT) private BigDecimal costs; /** * 项目名称 */ - @Excel(name = "结算单位",sort = 2) + @Excel(name = "结算单位",sort = 3, width = 30) private String unitName; /** * 工程名称 */ - @Excel(name = "结算工程",sort = 3) + @Excel(name = "结算工程",sort = 4, width = 40) private String projectName; @ApiModelProperty(value = "往来单位id") @@ -180,14 +190,14 @@ public class SltAgreementInfoRepair extends BaseEntity { /** * 维修类型 */ - @Excel(name = "维修方式",sort = 9) + @Excel(name = "维修方式",sort = 10) @ApiModelProperty(value = "维修类型") private String repairType; /** * 是否收费 */ - @Excel(name = "费用类型",sort = 10) + @Excel(name = "费用类型",sort = 11) @ApiModelProperty(value = "是否收费") private String partType; @@ -268,5 +278,13 @@ public class SltAgreementInfoRepair extends BaseEntity { @ApiModelProperty("年月") private String yearMonth; + @ApiModelProperty(value = "竣工状态") + @Excel(name = "竣工状态", readConverterExp = "0=未竣工,1=已竣工") + private String isFinish; + @ApiModelProperty(value = "竣工日期") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @Excel(name = "竣工日期", dateFormat = "yyyy-MM-dd") + private Date actualEndDate; } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/SltAgreementInfoScrap.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/SltAgreementInfoScrap.java index 0c228c87..9b8ac3c1 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/SltAgreementInfoScrap.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/SltAgreementInfoScrap.java @@ -8,6 +8,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import lombok.experimental.Accessors; +import org.apache.poi.ss.usermodel.HorizontalAlignment; +import org.springframework.format.annotation.DateTimeFormat; import java.math.BigDecimal; import java.util.Date; @@ -27,6 +29,10 @@ public class SltAgreementInfoScrap extends BaseEntity { /** ID */ private Long id; + @ApiModelProperty(value = "序号") + @Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC, width = 5, sort = 0) + private Integer seq; + /** 协议id */ @ApiModelProperty(value = "协议id") private Long agreementId; @@ -39,10 +45,14 @@ public class SltAgreementInfoScrap extends BaseEntity { /** * 协议编号 */ - @Excel(name = "协议编号",sort = 1) + @Excel(name = "协议号",sort = 1) @ApiModelProperty(value = "协议编号") private String agreementCode; + @ApiModelProperty(value = "分公司") + @Excel(name = "分公司", sort = 2) + private String impUnitName; + @ApiModelProperty("结算申请单号") private String sltApplyCode; @@ -52,20 +62,20 @@ public class SltAgreementInfoScrap extends BaseEntity { /** * 设备名称 */ - @Excel(name = "机具名称",sort = 4) + @Excel(name = "机具名称",sort = 5) @ApiModelProperty(value = "机具名称") private String typeName; /** * 规格型号 */ - @Excel(name = "规格型号",sort = 5) + @Excel(name = "规格型号",sort = 6) @ApiModelProperty(value = "规格型号") private String modelName; /** * 计量单位 */ - @Excel(name = "单位",sort = 6) + @Excel(name = "单位",sort = 7) @ApiModelProperty(value = "计量单位") private String mtUnitName; /** @@ -78,7 +88,7 @@ public class SltAgreementInfoScrap extends BaseEntity { private Long maId; /** 领料数量 */ - @Excel(name = "报废数量",sort = 7, cellType = Excel.ColumnType.NUMERIC) + @Excel(name = "报废数量",sort = 8, cellType = Excel.ColumnType.NUMERIC, align = HorizontalAlignment.RIGHT) @ApiModelProperty(value = "报废数量") private BigDecimal num; @@ -150,18 +160,18 @@ public class SltAgreementInfoScrap extends BaseEntity { * 租赁费用 */ @ApiModelProperty(value = "租赁费用") - @Excel(name = "报废费用(元)",sort = 9, cellType = Excel.ColumnType.NUMERIC) + @Excel(name = "报废费用(元)",sort = 9, cellType = Excel.ColumnType.NUMERIC, align = HorizontalAlignment.RIGHT) private BigDecimal costs; /** * 项目名称 */ - @Excel(name = "结算单位",sort = 2) + @Excel(name = "结算单位",sort = 3) private String unitName; /** * 工程名称 */ - @Excel(name = "结算工程",sort = 3) + @Excel(name = "结算工程",sort = 4) private String projectName; @ApiModelProperty(value = "往来单位id") @@ -265,5 +275,13 @@ public class SltAgreementInfoScrap extends BaseEntity { @ApiModelProperty("年月") private String yearMonth; + @ApiModelProperty(value = "竣工状态") + @Excel(name = "竣工状态", readConverterExp = "0=未竣工,1=已竣工") + private String isFinish; + @ApiModelProperty(value = "竣工日期") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @Excel(name = "竣工日期", dateFormat = "yyyy-MM-dd") + private Date actualEndDate; } diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml index da7cd4f9..91db9bc0 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml @@ -1126,7 +1126,12 @@ case rc.repair_type when '1' then '内部维修' when '2' then '返厂维修' else '' end as repairType, rc.company_id as companyId, case rc.status when '0' then '未审核' when '1' then '已审核' when '2' then '已驳回' else '' end as repairStatus, - sd.dept_name AS impUnitName + sd.dept_name AS impUnitName, + CASE + WHEN bp.actual_end_date is not null THEN '1' + ELSE '0' + END as isFinish, + bp.actual_end_date as actualEndDate from repair_cost rc left join tm_task_agreement tta on rc.task_id = tta.task_id left join tm_task tt on rc.task_id = tt.task_id @@ -1156,7 +1161,13 @@ and bai.agreement_code like concat('%',#{info.agreementCode},'%') - AND sd.dept_name = #{info.impUnitName} + and sd.dept_name = #{info.impUnitName} + + + and bp.actual_end_date is not null + + + and bp.actual_end_date is null @@ -1177,7 +1188,13 @@ case rc.part_type when '0' then '不收费' when '1' then '收费' else '' end as partType, case rc.repair_type when '1' then '内部维修' when '2' then '返厂维修' else '' end as repairType, rc.company_id as companyId, - case rc.status when '0' then '未审核' when '1' then '已审核' when '2' then '已驳回' else '' end as repairStatus + case rc.status when '0' then '未审核' when '1' then '已审核' when '2' then '已驳回' else '' end as repairStatus, + CASE + WHEN bp.actual_end_date is not null THEN '1' + ELSE '0' + END as isFinish, + bp.actual_end_date as actualEndDate, + sd.dept_name AS impUnitName from repair_cost rc left join tm_task_agreement tta on rc.task_id = tta.task_id left join tm_task tt on rc.task_id = tt.task_id @@ -1186,6 +1203,7 @@ left join bm_unit bui ON bui.unit_id = bai.unit_id left join ma_type mt on rc.type_id = mt.type_id left join ma_type mt1 on mt.parent_id = mt1.type_id + LEFT JOIN sys_dept sd ON sd.dept_id = bp.imp_unit where rc.status in ('0','1') and rc.repair_type in ('1','2') @@ -1197,9 +1215,18 @@ #{aid} + + and tt.create_time between #{info.startTime} and #{info.endTime} + and bai.agreement_code like concat('%',#{info.agreementCode},'%') + + and bp.actual_end_date is not null + + + and bp.actual_end_date is null +