diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltAgreementInfo.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltAgreementInfo.java index 558bf9b..5bd3751 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltAgreementInfo.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltAgreementInfo.java @@ -1,5 +1,6 @@ package com.bonus.sgzb.base.api.domain; +import com.alibaba.excel.annotation.ExcelProperty; import com.bonus.sgzb.common.core.annotation.Excel; import lombok.Data; @@ -13,7 +14,7 @@ import java.util.List; @Data public class SltAgreementInfo { /** - * + * */ private Long id; /** @@ -21,15 +22,15 @@ public class SltAgreementInfo { */ private String ids; /** - *协议id + * 协议id */ private String agreementId; /** - *编码 + * 编码 */ private String maCode; /** - *当前在用量 + * 当前在用量 */ private Integer useNum; /** @@ -37,55 +38,59 @@ public class SltAgreementInfo { */ private String typeModelName; /** - *机具规格id + * 机具规格id */ private String typeId; /** - *机具id + * 机具id */ private String maId; /** - *配件单价 + * 配件单价 */ private String partPrice; /** - *领料数量 + * 领料数量 */ - @Excel(name = "数量") +// @Excel(name = "数量",sort = 4) + @ExcelProperty(index = 4, value = "数量") private String num; /** - *领料时间 + * 领料时间 */ - @Excel(name = "开始日期") +// @Excel(name = "开始日期",sort = 6) + @ExcelProperty(index = 6, value = "开始日期") private String startTime; /** - *退料时间 + * 退料时间 */ - @Excel(name = "结算日期") +// @Excel(name = "结算日期",sort = 7) + @ExcelProperty(index = 7, value = "结算日期") private String endTime; /** - *0在用1退回 + * 0在用1退回 */ private String status; /** - *领料id + * 领料id */ private String leaseId; /** - *配件数量 + * 配件数量 */ private String partNum; /** - *退料id + * 退料id */ private String backId; /** - *租赁单价 + * 租赁单价 */ - @Excel(name = "台班费单价(元/天)") +// @Excel(name = "台班费单价(元/天)",sort = 5) + @ExcelProperty(index = 5, value = "台班费单价(元/天)") private String leasePrice; /** - *原值 + * 原值 */ private String buyPrice; /** @@ -95,37 +100,44 @@ public class SltAgreementInfo { /** * 项目名称 */ - @Excel(name = "领用单位") +// @Excel(name = "领用单位") + @ExcelProperty(value = "领用单位") private String unitName; /** * 工程名称 */ - @Excel(name = "工程名称") +// @Excel(name = "工程名称") + @ExcelProperty(value = "工程名称") private String projectName; /** * 设备名称 */ - @Excel(name = "设备名称") +// @Excel(name = "设备名称",sort = 1) + @ExcelProperty(index = 1, value = "设备名称") private String typeName; /** * 规格型号 */ - @Excel(name = "规格型号") +// @Excel(name = "规格型号", sort = 2) + @ExcelProperty(index = 2, value = "规格型号") private String modelName; /** * 计量单位 */ - @Excel(name = "单位") +// @Excel(name = "单位", sort = 3) + @ExcelProperty(index = 3, value = "单位") private String nuitName; /** * 租赁天数 */ - @Excel(name = "结算天数") +// @Excel(name = "结算天数",sort = 8) + @ExcelProperty(index = 8, value = "结算天数") private String leaseDays; /** * 租赁费用 */ - @Excel(name = "结算金额") +// @Excel(name = "结算金额",sort = 9) + @ExcelProperty(index = 9, value = "结算金额") private String costs; /** * 配件总价 @@ -138,7 +150,8 @@ public class SltAgreementInfo { /** * 真实租赁费用 */ - @Excel(name = "本月暂计金额") +// @Excel(name = "本月暂计金额",sort = 10) + @ExcelProperty(index = 10, value = "本月暂计金额") private String realCosts; /** * 类型(0不收费,1收费) @@ -161,7 +174,8 @@ public class SltAgreementInfo { /** * 费用承担方 */ - @Excel(name = "费用承担方(01项目,03分包)") +// @Excel(name = "费用承担方(01项目,03分包)") + @ExcelProperty(value = "费用承担方(01项目,03分包)") private String costBearingParty; /** * 调整天数 @@ -172,19 +186,21 @@ public class SltAgreementInfo { */ private BigDecimal realDays; /** - * 是否结算(0 未结算 1已结算) + * 是否结算(0 未结算 1已结算) */ private String isSlt; /** - * 月份 + * 月份 */ +// @Excel(name = "月份") + @ExcelProperty(value = "月份") private String month; /** - * 月份 + * 月份 */ private String nextMonth; /** - * 委外维修费用 + * 委外维修费用 */ private String outSourceCosts; private String beginTime; diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/SltAgreementInfoController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/SltAgreementInfoController.java index c3c61bb..2899990 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/SltAgreementInfoController.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/SltAgreementInfoController.java @@ -2,6 +2,9 @@ package com.bonus.sgzb.material.controller; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.convert.Convert; +import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.ExcelWriter; +import com.alibaba.excel.write.metadata.WriteSheet; import com.bonus.sgzb.base.api.domain.SltAgreementApply; import com.bonus.sgzb.base.api.domain.SltAgreementDetails; import com.bonus.sgzb.base.api.domain.SltAgreementInfo; @@ -15,11 +18,14 @@ import com.bonus.sgzb.common.log.enums.BusinessType; import com.bonus.sgzb.material.domain.*; import com.bonus.sgzb.material.service.SltAgreementInfoService; import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.net.URLEncoder; import java.util.ArrayList; import java.util.List; @@ -63,33 +69,58 @@ public class SltAgreementInfoController extends BaseController { return AjaxResult.success(sltAgreementInfoService.getSltInfoMonth(list)); } - @ApiOperation(value = "月结明细导出") + /* @ApiOperation(value = "月结明细导出") @PostMapping("/exportSltInfoMonth") public void exportSltInfoMonth(HttpServletResponse response, @RequestBody List list) { List sltInfoMonth = sltAgreementInfoService.getSltInfoMonth(list); for (AgreementInfo agreementInfo : list) { for (SltAgreementInfo sltAgreementInfo : sltInfoMonth) { - String[] split = agreementInfo.getCodeNum().split(","); - for (String s : split) { - if (s.equals(sltAgreementInfo.getCodeNum().toString())) { - List node = sltAgreementInfo.getNode(); - ExcelUtil util = new ExcelUtil(SltAgreementInfo.class); - util.exportExcel(response, node, "月结明细导出数据"); + // 单个协议导出 + if (StringUtils.isNotBlank(agreementInfo.getCodeNum())) { + String[] split = agreementInfo.getCodeNum().split(","); + for (String s : split) { + if (s.equals(sltAgreementInfo.getCodeNum().toString())) { + List node = sltAgreementInfo.getNode(); + ExcelUtil util = new ExcelUtil(SltAgreementInfo.class); + util.exportExcel(response, node, "月结明细导出数据"); + } } + } else { + // 多个协议导出 + List node = sltAgreementInfo.getNode(); + ExcelUtil util = new ExcelUtil(SltAgreementInfo.class); + util.exportExcel(response, node, "月结明细导出数据"); } } } - } + }*/ - @ApiOperation(value = "批量月结明细导出") - @PostMapping("/exportBatchSltInfoMonth") - public void exportBatchSltInfoMonth(HttpServletResponse response, @RequestBody List list) { + @ApiOperation(value = "月结明细导出") + @PostMapping("/exportSltInfoMonth") + public void exportSltInfoMonth(HttpServletResponse response, @RequestBody List list) throws IOException { List sltInfoMonth = sltAgreementInfoService.getSltInfoMonth(list); - for (SltAgreementInfo sltAgreementInfo : sltInfoMonth) { - List node = sltAgreementInfo.getNode(); - ExcelUtil util = new ExcelUtil(SltAgreementInfo.class); - util.exportExcel(response, node, "月结明细导出数据"); + List> allLists = new ArrayList<>(); + for (AgreementInfo agreementInfo : list) { + for (SltAgreementInfo sltAgreementInfo : sltInfoMonth) { + // 单个协议导出 + if (StringUtils.isNotBlank(agreementInfo.getCodeNum())) { + String[] split = agreementInfo.getCodeNum().split(","); + for (String s : split) { + if (s.equals(sltAgreementInfo.getCodeNum().toString())) { + List node = sltAgreementInfo.getNode(); + List leaseInfoList = Convert.toList(MonthRepairInfo.class, node); + allLists.add(leaseInfoList); + } + } + } else { + // 多个协议导出 + List node = sltAgreementInfo.getNode(); + List leaseInfoList = Convert.toList(MonthRepairInfo.class, node); + allLists.add(leaseInfoList); + } + } } + exportMultipleLists(allLists, response); } /** @@ -146,7 +177,7 @@ public class SltAgreementInfoController extends BaseController { */ @Log(title = "维修明细导出", businessType = BusinessType.EXPORT) @PostMapping("/exportRepair") - public void exportRepair(HttpServletResponse response, List list) { + public void exportRepair(HttpServletResponse response, @RequestBody List list) { List explist = sltAgreementInfoService.getRepairList(list); List leaseInfoList = Convert.toList(RepairInfo.class, explist); ExcelUtil util = new ExcelUtil(RepairInfo.class); @@ -158,7 +189,7 @@ public class SltAgreementInfoController extends BaseController { */ @Log(title = "报废明细导出", businessType = BusinessType.EXPORT) @PostMapping("/exportScrap") - public void exportScrap(HttpServletResponse response, List list) { + public void exportScrap(HttpServletResponse response, @RequestBody List list) { List explist = sltAgreementInfoService.getScrapList(list); List leaseInfoList = Convert.toList(ScrapInfo.class, explist); ExcelUtil util = new ExcelUtil(ScrapInfo.class); @@ -170,7 +201,7 @@ public class SltAgreementInfoController extends BaseController { */ @Log(title = "预报废明细导出", businessType = BusinessType.EXPORT) @PostMapping("/exportPreScrap") - public void exportPreScrap(HttpServletResponse response, List list) { + public void exportPreScrap(HttpServletResponse response, @RequestBody List list) { List explist = sltAgreementInfoService.getPreScrapList(list); List leaseInfoList = Convert.toList(preScrapInfo.class, explist); ExcelUtil util = new ExcelUtil(preScrapInfo.class); @@ -243,5 +274,20 @@ public class SltAgreementInfoController extends BaseController { return toAjax(sltAgreementInfoService.settlementReview(apply)); } + public void exportMultipleLists(List> lists, HttpServletResponse response) throws IOException { + String fileName = "月结明细导出数据.xlsx"; + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode(fileName, "UTF-8")); + // 使用 EasyExcel 创建一个写入器 + ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream(), MonthRepairInfo.class).build(); + + for (int i = 0; i < lists.size(); i++) { + WriteSheet writeSheet = EasyExcel.writerSheet("Sheet" + (i + 1)).build(); + excelWriter.write(lists.get(i), writeSheet); + } + + // 关闭写入器 + excelWriter.finish(); + } } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/MonthRepairInfo.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/MonthRepairInfo.java new file mode 100644 index 0000000..eea8b38 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/MonthRepairInfo.java @@ -0,0 +1,215 @@ +package com.bonus.sgzb.material.domain; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.bonus.sgzb.base.api.domain.SltAgreementInfo; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @Author:liang.chao + * @Date:2024/8/15 - 19:44 + */ +public class MonthRepairInfo { + /** + * 领料数量 + */ +// @Excel(name = "数量",sort = 4) + @ExcelProperty(index = 4, value = "数量") + private String num; + + public String getNum() { + return num; + } + + public void setNum(String num) { + this.num = num; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getLeasePrice() { + return leasePrice; + } + + public void setLeasePrice(String leasePrice) { + this.leasePrice = leasePrice; + } + + public String getUnitName() { + return unitName; + } + + public void setUnitName(String unitName) { + this.unitName = unitName; + } + + public String getProjectName() { + return projectName; + } + + public void setProjectName(String projectName) { + this.projectName = projectName; + } + + public String getTypeName() { + return typeName; + } + + public void setTypeName(String typeName) { + this.typeName = typeName; + } + + public String getModelName() { + return modelName; + } + + public void setModelName(String modelName) { + this.modelName = modelName; + } + + public String getNuitName() { + return nuitName; + } + + public void setNuitName(String nuitName) { + this.nuitName = nuitName; + } + + public String getLeaseDays() { + return leaseDays; + } + + public void setLeaseDays(String leaseDays) { + this.leaseDays = leaseDays; + } + + public String getCosts() { + return costs; + } + + public void setCosts(String costs) { + this.costs = costs; + } + + public String getRealCosts() { + return realCosts; + } + + public void setRealCosts(String realCosts) { + this.realCosts = realCosts; + } + + public String getCostBearingParty() { + return costBearingParty; + } + + public void setCostBearingParty(String costBearingParty) { + this.costBearingParty = costBearingParty; + } + + public String getMonth() { + return month; + } + + public void setMonth(String month) { + this.month = month; + } + + /** + * 领料时间 + */ +// @Excel(name = "开始日期",sort = 6) + @ExcelProperty(index = 6, value = "开始日期") + private String startTime; + /** + * 退料时间 + */ +// @Excel(name = "结算日期",sort = 7) + @ExcelProperty(index = 7, value = "结算日期") + private String endTime; + /** + * 租赁单价 + */ +// @Excel(name = "台班费单价(元/天)",sort = 5) + @ExcelProperty(index = 5, value = "台班费单价(元/天)") + private String leasePrice; + + /** + * 项目名称 + */ +// @Excel(name = "领用单位") + @ExcelProperty(index = 11,value = "领用单位") + private String unitName; + /** + * 工程名称 + */ +// @Excel(name = "工程名称") + @ExcelProperty(index = 12,value = "工程名称") + private String projectName; + /** + * 设备名称 + */ +// @Excel(name = "设备名称",sort = 1) + @ExcelProperty(index = 1, value = "设备名称") + private String typeName; + /** + * 规格型号 + */ +// @Excel(name = "规格型号", sort = 2) + @ExcelProperty(index = 2, value = "规格型号") + private String modelName; + /** + * 计量单位 + */ +// @Excel(name = "单位", sort = 3) + @ExcelProperty(index = 3, value = "单位") + private String nuitName; + /** + * 租赁天数 + */ +// @Excel(name = "结算天数",sort = 8) + @ExcelProperty(index = 8, value = "结算天数") + private String leaseDays; + /** + * 租赁费用 + */ +// @Excel(name = "结算金额",sort = 9) + @ExcelProperty(index = 9, value = "结算金额") + private String costs; + + /** + * 真实租赁费用 + */ +// @Excel(name = "本月暂计金额",sort = 10) + @ExcelProperty(index = 10, value = "本月暂计金额") + private String realCosts; + + /** + * 费用承担方 + */ +// @Excel(name = "费用承担方(01项目,03分包)") + @ExcelProperty(value = "费用承担方(01项目,03分包)") + private String costBearingParty; + /** + * 月份 + */ +// @Excel(name = "月份") + @ExcelProperty(value = "月份") + private String month; +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairInfo.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairInfo.java index e3140e1..cab0d9d 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairInfo.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairInfo.java @@ -49,37 +49,35 @@ public class RepairInfo { /** * 配件名称 */ - @Excel(name = "配件名称") + @Excel(name = "配件名称",sort = 4) private String partName; /** *配件型号 */ - @Excel(name = "配件型号") + @Excel(name = "配件型号",sort = 5) private String partModelName; /** * 项目名称 */ - @Excel(name = "结算单位名称") private String unitName; /** * 工程名称 */ - @Excel(name = "结算工程名称") private String projectName; /** * 设备名称 */ - @Excel(name = "设备名称") + @Excel(name = "设备名称",sort = 1) private String typeName; /** * 规格型号 */ - @Excel(name = "规格型号") + @Excel(name = "规格型号",sort = 2) private String modelName; /** * 计量单位 */ - @Excel(name = "计量单位") + @Excel(name = "计量单位",sort = 3) private String nuitName; /** *租赁单价 @@ -88,8 +86,12 @@ public class RepairInfo { /** *领料数量 */ - @Excel(name = "数量") private String num; + /** + *领料数量 + */ + @Excel(name = "配件数量",sort = 6) + private String partNum; /** *领料时间 */ @@ -109,27 +111,29 @@ public class RepairInfo { /** * 应结算金额 */ - @Excel(name = "配件单价") private String costs; + + @Excel(name = "配件单价",sort = 7) + private String partPrice; /** * 实际结算金额 */ - @Excel(name = "实际结算金额(元)") +// @Excel(name = "实际结算金额(元)") private String realCosts; /** * 配件总价 */ - @Excel(name = "配件总价(元)") + @Excel(name = "配件总价(元)",sort = 8) private String partAllCosts; /** * 费用总价 */ - @Excel(name = "费用总价") +// @Excel(name = "费用总价") private String allCosts; /** * 委外维修费用 */ - @Excel(name = "委外维修费用") +// @Excel(name = "委外维修费用") private String outSourceCosts; /** * 实际结算金额 diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ScrapInfo.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ScrapInfo.java index 548205d..6d179f5 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ScrapInfo.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ScrapInfo.java @@ -28,7 +28,7 @@ public class ScrapInfo { /** *设备编码 */ - @Excel(name = "设备编码") + @Excel(name = "设备编码",sort = 4) private String maCode; /** @@ -46,7 +46,7 @@ public class ScrapInfo { /** *原值 */ - @Excel(name = "赔偿单价") + @Excel(name = "赔偿单价",sort = 6) private String buyPrice; /** * @@ -55,27 +55,25 @@ public class ScrapInfo { /** * 项目名称 */ - @Excel(name = "结算单位名称") private String unitName; /** * 工程名称 */ - @Excel(name = "结算工程名称") private String projectName; /** * 设备名称 */ - @Excel(name = "设备名称") + @Excel(name = "设备名称",sort = 1) private String typeName; /** * 规格型号 */ - @Excel(name = "规格型号") + @Excel(name = "规格型号",sort = 2) private String modelName; /** * 计量单位 */ - @Excel(name = "计量单位") + @Excel(name = "计量单位",sort = 3) private String nuitName; /** *租赁单价 @@ -84,7 +82,7 @@ public class ScrapInfo { /** *领料数量 */ - @Excel(name = "报废数量") + @Excel(name = "报废数量",sort = 5) private String num; /** *领料时间 @@ -105,7 +103,7 @@ public class ScrapInfo { /** * 租赁费用 */ - @Excel(name = "报废费用") + @Excel(name = "赔偿金额",sort = 7) private String costs; /** * 类型(0不收费,1收费) diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/preScrapInfo.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/preScrapInfo.java index 0e64ad4..6e2db97 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/preScrapInfo.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/preScrapInfo.java @@ -28,12 +28,13 @@ public class preScrapInfo { /** *设备编码 */ - @Excel(name = "设备编码") + @Excel(name = "设备编码",sort = 4) private String maCode; /** *0在用1退回 */ + @Excel(name = "状态",defaultValue = "待报废",sort = 100) private String status; /** *领料id @@ -62,26 +63,28 @@ public class preScrapInfo { /** * 设备名称 */ - @Excel(name = "设备名称") + @Excel(name = "设备名称",sort = 1) private String typeName; /** * 规格型号 */ - @Excel(name = "规格型号") + @Excel(name = "规格型号",sort = 2) private String modelName; /** * 计量单位 */ - @Excel(name = "计量单位") + @Excel(name = "计量单位",sort = 3) private String nuitName; /** *租赁单价 */ private String leasePrice; + + /** *领料数量 */ - @Excel(name = "报废数量") + @Excel(name = "报废数量",sort = 5) private String num; /** *领料时间 diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/SltAgreementInfoServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/SltAgreementInfoServiceImpl.java index f1889fa..c9066c1 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/SltAgreementInfoServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/SltAgreementInfoServiceImpl.java @@ -1,5 +1,7 @@ package com.bonus.sgzb.material.service.impl; +import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.write.metadata.WriteSheet; import com.bonus.sgzb.base.api.domain.SltAgreementApply; import com.bonus.sgzb.base.api.domain.SltAgreementInfo; import com.bonus.sgzb.base.api.domain.SltAgreementRelation; @@ -11,8 +13,6 @@ import com.bonus.sgzb.common.core.utils.DateUtils; import com.bonus.sgzb.common.core.web.domain.AjaxResult; import com.bonus.sgzb.common.security.utils.SecurityUtils; import com.bonus.sgzb.material.domain.AgreementInfo; -import com.bonus.sgzb.material.domain.ProjectMonthCosts; -import com.bonus.sgzb.material.domain.ProjectMonthDetail; import com.bonus.sgzb.material.domain.TmTask; import com.bonus.sgzb.material.mapper.CalMonthlyMapper; @@ -20,11 +20,12 @@ import com.bonus.sgzb.material.mapper.SltAgreementInfoMapper; import com.bonus.sgzb.material.service.SltAgreementInfoService; import com.bonus.sgzb.material.vo.GlobalContants; import org.apache.commons.lang3.StringUtils; -import org.apache.poi.ss.formula.functions.T; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; import java.math.BigDecimal; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -481,7 +482,7 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService { agreementInfo.setCostBearingParty(sltAgreementInfo.getCostBearingParty()); agreementInfo.setStartTime(sltAgreementInfo.getBeginTime()); agreementInfo.setIds(sltAgreementInfo.getIds()); - sltAgreementInfo.setMonth(bean.getMonth()); + sltAgreementInfo.setMonth(DateTimeHelper.getNowMonth(DateTimeHelper.parse(bean.getEndTime(), "yyyy-MM"))); sltAgreementInfo.setCodeNum(num++); agreementInfo.setEndTime(sltAgreementInfo.getOffTime()); List leaseListOneMonth = getLeaseListOneMonth(agreementInfo, sltAgreementInfo);