Merge branch 'lc20240808'
This commit is contained in:
commit
5271ebe0bd
|
|
@ -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;
|
||||
|
||||
|
|
@ -51,17 +52,20 @@ public class SltAgreementInfo {
|
|||
/**
|
||||
* 领料数量
|
||||
*/
|
||||
@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退回
|
||||
|
|
@ -82,7 +86,8 @@ public class SltAgreementInfo {
|
|||
/**
|
||||
* 租赁单价
|
||||
*/
|
||||
@Excel(name = "台班费单价(元/天)")
|
||||
// @Excel(name = "台班费单价(元/天)",sort = 5)
|
||||
@ExcelProperty(index = 5, value = "台班费单价(元/天)")
|
||||
private String leasePrice;
|
||||
/**
|
||||
* 原值
|
||||
|
|
@ -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;
|
||||
/**
|
||||
* 调整天数
|
||||
|
|
@ -178,6 +192,8 @@ public class SltAgreementInfo {
|
|||
/**
|
||||
* 月份
|
||||
*/
|
||||
// @Excel(name = "月份")
|
||||
@ExcelProperty(value = "月份")
|
||||
private String month;
|
||||
/**
|
||||
* 月份
|
||||
|
|
|
|||
|
|
@ -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,12 +69,14 @@ public class SltAgreementInfoController extends BaseController {
|
|||
return AjaxResult.success(sltAgreementInfoService.getSltInfoMonth(list));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "月结明细导出")
|
||||
/* @ApiOperation(value = "月结明细导出")
|
||||
@PostMapping("/exportSltInfoMonth")
|
||||
public void exportSltInfoMonth(HttpServletResponse response, @RequestBody List<AgreementInfo> list) {
|
||||
List<SltAgreementInfo> sltInfoMonth = sltAgreementInfoService.getSltInfoMonth(list);
|
||||
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())) {
|
||||
|
|
@ -77,20 +85,43 @@ public class SltAgreementInfoController extends BaseController {
|
|||
util.exportExcel(response, node, "月结明细导出数据");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "批量月结明细导出")
|
||||
@PostMapping("/exportBatchSltInfoMonth")
|
||||
public void exportBatchSltInfoMonth(HttpServletResponse response, @RequestBody List<AgreementInfo> list) {
|
||||
List<SltAgreementInfo> sltInfoMonth = sltAgreementInfoService.getSltInfoMonth(list);
|
||||
for (SltAgreementInfo sltAgreementInfo : sltInfoMonth) {
|
||||
} else {
|
||||
// 多个协议导出
|
||||
List<SltAgreementInfo> node = sltAgreementInfo.getNode();
|
||||
ExcelUtil<SltAgreementInfo> util = new ExcelUtil<SltAgreementInfo>(SltAgreementInfo.class);
|
||||
util.exportExcel(response, node, "月结明细导出数据");
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
@ApiOperation(value = "月结明细导出")
|
||||
@PostMapping("/exportSltInfoMonth")
|
||||
public void exportSltInfoMonth(HttpServletResponse response, @RequestBody List<AgreementInfo> list) throws IOException {
|
||||
List<SltAgreementInfo> sltInfoMonth = sltAgreementInfoService.getSltInfoMonth(list);
|
||||
List<List<MonthRepairInfo>> 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<SltAgreementInfo> node = sltAgreementInfo.getNode();
|
||||
List<MonthRepairInfo> leaseInfoList = Convert.toList(MonthRepairInfo.class, node);
|
||||
allLists.add(leaseInfoList);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 多个协议导出
|
||||
List<SltAgreementInfo> node = sltAgreementInfo.getNode();
|
||||
List<MonthRepairInfo> 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<AgreementInfo> list) {
|
||||
public void exportRepair(HttpServletResponse response, @RequestBody List<AgreementInfo> list) {
|
||||
List<SltAgreementInfo> explist = sltAgreementInfoService.getRepairList(list);
|
||||
List<RepairInfo> leaseInfoList = Convert.toList(RepairInfo.class, explist);
|
||||
ExcelUtil<RepairInfo> util = new ExcelUtil<RepairInfo>(RepairInfo.class);
|
||||
|
|
@ -158,7 +189,7 @@ public class SltAgreementInfoController extends BaseController {
|
|||
*/
|
||||
@Log(title = "报废明细导出", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/exportScrap")
|
||||
public void exportScrap(HttpServletResponse response, List<AgreementInfo> list) {
|
||||
public void exportScrap(HttpServletResponse response, @RequestBody List<AgreementInfo> list) {
|
||||
List<SltAgreementInfo> explist = sltAgreementInfoService.getScrapList(list);
|
||||
List<ScrapInfo> leaseInfoList = Convert.toList(ScrapInfo.class, explist);
|
||||
ExcelUtil<ScrapInfo> util = new ExcelUtil<ScrapInfo>(ScrapInfo.class);
|
||||
|
|
@ -170,7 +201,7 @@ public class SltAgreementInfoController extends BaseController {
|
|||
*/
|
||||
@Log(title = "预报废明细导出", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/exportPreScrap")
|
||||
public void exportPreScrap(HttpServletResponse response, List<AgreementInfo> list) {
|
||||
public void exportPreScrap(HttpServletResponse response, @RequestBody List<AgreementInfo> list) {
|
||||
List<SltAgreementInfo> explist = sltAgreementInfoService.getPreScrapList(list);
|
||||
List<preScrapInfo> leaseInfoList = Convert.toList(preScrapInfo.class, explist);
|
||||
ExcelUtil<preScrapInfo> util = new ExcelUtil<preScrapInfo>(preScrapInfo.class);
|
||||
|
|
@ -243,5 +274,20 @@ public class SltAgreementInfoController extends BaseController {
|
|||
return toAjax(sltAgreementInfoService.settlementReview(apply));
|
||||
}
|
||||
|
||||
public void exportMultipleLists(List<List<MonthRepairInfo>> 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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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;
|
||||
/**
|
||||
* 实际结算金额
|
||||
|
|
|
|||
|
|
@ -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收费)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
/**
|
||||
*领料时间
|
||||
|
|
|
|||
|
|
@ -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<SltAgreementInfo> leaseListOneMonth = getLeaseListOneMonth(agreementInfo, sltAgreementInfo);
|
||||
|
|
|
|||
Loading…
Reference in New Issue