@@ -0,0 +1,148 @@ | |||
package com.ningdatech.pmapi.common.enums; | |||
import lombok.AllArgsConstructor; | |||
import lombok.Getter; | |||
import lombok.NoArgsConstructor; | |||
/** | |||
* 导出选项枚举 | |||
* | |||
* @author CMM | |||
* @since 2023/02/10 16:38 | |||
*/ | |||
@Getter | |||
@AllArgsConstructor | |||
@NoArgsConstructor | |||
public enum ExportOptionEnum { | |||
/** | |||
* 导出选项 | |||
*/ | |||
id(1,"项目ID"), | |||
projectName(2,"项目名称"), | |||
areaCode(3,"行政区划编码"), | |||
area(4,"行政区划名称"), | |||
responsibleMan(5,"项目负责人"), | |||
responsibleManMobile(6,"项目负责人手机号"), | |||
contactName(7,"项目联系人"), | |||
contactPhone(8,"项目联系人手机号"), | |||
higherSuperOrg(9,"上级业务主管单位"), | |||
higherSuperOrgCode(10,"上级主管单位浙政钉ID"), | |||
superOrg(11,"本级主管部门"), | |||
superOrgCode(12,"本级主管部门浙政钉ID"), | |||
buildOrgName(13,"建设单位名称"), | |||
buildOrgZheJiangGovDingId(14,"建设单位浙政钉ID"), | |||
buildOrgCode(15,"建设单位统一信用代码"), | |||
projectType(16,"项目类型"), | |||
isFirst(17,"是否首次新建"), | |||
relatedExistsApplication(18,"关联应用"), | |||
relatedExistsApplicationCode(19,"关联应用IRS编码"), | |||
declareAmount(20,"申报金额(万元)"), | |||
approvedTotalInvestmentIncrease(21,"批复金额"), | |||
/** | |||
* 表里没有 | |||
*/ | |||
budgetSource(22,"预算来源"), | |||
projectYear(23,"预算年度"), | |||
projectIntroduction(24,"项目简介"), | |||
buildBasis(25,"立项依据"), | |||
buildLevel(26,"建设层级"), | |||
developCode(27,"发改编码"), | |||
financialCode(28,"财政编码"), | |||
/** | |||
* 表里没有 | |||
*/ | |||
informationValidity(29,"信息是否有效"), | |||
isDigitalReform(30,"是否数字化改革项目"), | |||
bizDomain(31,"综合应用领域"), | |||
isCloud(32,"是否上云"), | |||
cloudType(33,"云类型"), | |||
fourSystems(34,"四大体系"), | |||
isTemporaryAugment(35,"是否临时增补"), | |||
protectionLevel(36,"等保级别"), | |||
isSecretComments(37,"是否密评"), | |||
businessNumber(38,"业务编号"), | |||
businessName(39,"业务名称"), | |||
orgName(40,"单位名称"), | |||
softwareDevelopmentAmount(41,"软件开发(万元)"), | |||
cloudHardwarePurchaseAmount(42,"云资源、硬件购置(万元)"), | |||
thirdPartyAmount(43,"第三方服务(万元)"), | |||
safetyInputTitle(44,"投入项"), | |||
safetyInputDescribe(45,"内容描述"), | |||
safetyInputAmount(46,"金额"), | |||
annualPlanAmount(47,"年度支付金额(万元)"), | |||
annualPlanHaveAmount(48,"自有资金(万元)"), | |||
declareGovOwnFinanceAmount(49,"政府投资-本级财政资金(万元)"), | |||
declareGovSuperiorFinanceAmount(50,"政府投资-上级补助资金(万元)"), | |||
declareBankLendingAmount(51,"银行贷款(万元)"), | |||
declareOtherAmount(52,"其它资金(万元)"), | |||
engineeringSpeedOne(53,"第一季度"), | |||
engineeringSpeedTwo(54,"第二季度"), | |||
engineeringSpeedThree(55,"第三季度"), | |||
engineeringSpeedFour(56,"第四季度"), | |||
preliminaryPlanFile(57,"初步方案"), | |||
supportingMaterialsFile(58,"附件-佐证材料"), | |||
projectRemarks(59,"备注"); | |||
private Integer code; | |||
private String desc; | |||
} |
@@ -10,13 +10,11 @@ import java.util.function.BiConsumer; | |||
import javax.servlet.http.HttpServletResponse; | |||
import com.alibaba.druid.wall.violation.ErrorCode; | |||
import com.alibaba.excel.EasyExcel; | |||
import com.alibaba.excel.ExcelWriter; | |||
import com.alibaba.excel.write.metadata.WriteSheet; | |||
import com.ningdatech.basic.exception.BizException; | |||
import com.ningdatech.pmapi.common.model.entity.ExcelExportWriter; | |||
import com.ningdatech.pmapi.todocenter.bean.entity.ExportOption; | |||
import org.apache.commons.collections4.CollectionUtils; | |||
import org.apache.http.HttpStatus; | |||
@@ -93,7 +91,6 @@ public class ExcelDownUtil { | |||
}else { | |||
writer = EasyExcel.write(response.getOutputStream()).build(); | |||
} | |||
int sheetNum = 0; | |||
if (CollectionUtils.isNotEmpty(excelExport.getSheets())){ | |||
sheetNum = excelExport.getSheets().size(); | |||
@@ -108,7 +105,7 @@ public class ExcelDownUtil { | |||
} | |||
for (int i = 0; i < sheetNum; i++) { | |||
WriteSheet sheet = EasyExcel.writerSheet(i).build(); | |||
WriteSheet sheet = EasyExcel.writerSheet(i).automaticMergeHead(false).build(); | |||
if (CollectionUtils.isNotEmpty(excelExport.getSheets())){ | |||
sheet.setSheetName(excelExport.getSheets().get(i)); | |||
} | |||
@@ -1,199 +0,0 @@ | |||
package com.ningdatech.pmapi.todocenter.bean.entity; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.AllArgsConstructor; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
/** | |||
* 导出选项实体类 | |||
* | |||
* @author CMM | |||
* @since 2023/02/10 16:38 | |||
*/ | |||
@Data | |||
@AllArgsConstructor | |||
@NoArgsConstructor | |||
public class ExportOption { | |||
/** | |||
* 导出选项 | |||
*/ | |||
@ApiModelProperty("项目ID") | |||
private Boolean id; | |||
@ApiModelProperty("项目名称") | |||
private Boolean projectName; | |||
@ApiModelProperty("行政区划编码") | |||
private Boolean areaCode; | |||
@ApiModelProperty("行政区划名称") | |||
private Boolean area; | |||
@ApiModelProperty("项目负责人") | |||
private Boolean responsibleMan; | |||
@ApiModelProperty("项目负责人手机号") | |||
private Boolean responsibleManMobile; | |||
@ApiModelProperty("项目联系人") | |||
private Boolean contactName; | |||
@ApiModelProperty("项目联系人手机号") | |||
private Boolean contactPhone; | |||
@ApiModelProperty("上级业务主管单位") | |||
private Boolean higherSuperOrg; | |||
@ApiModelProperty("上级主管单位浙政钉ID") | |||
private Boolean higherSuperOrgCode; | |||
@ApiModelProperty("本级主管部门") | |||
private Boolean superOrg; | |||
@ApiModelProperty("本级主管部门浙政钉ID") | |||
private Boolean superOrgCode; | |||
@ApiModelProperty("建设单位名称") | |||
private Boolean buildOrgName; | |||
@ApiModelProperty("建设单位浙政钉ID") | |||
private Boolean buildOrgZheJiangGovDingId; | |||
@ApiModelProperty("建设单位统一信用代码") | |||
private Boolean buildOrgCode; | |||
@ApiModelProperty("项目类型") | |||
private Boolean projectType; | |||
@ApiModelProperty("是否首次新建") | |||
private Boolean isFirst; | |||
@ApiModelProperty("关联应用") | |||
private Boolean relatedExistsApplication; | |||
@ApiModelProperty("关联应用IRS编码") | |||
private Boolean relatedExistsApplicationCode; | |||
@ApiModelProperty("申报金额(万元)") | |||
private Boolean declareAmount; | |||
@ApiModelProperty("批复金额") | |||
private Boolean approvedTotalInvestmentIncrease; | |||
@ApiModelProperty("预算来源") | |||
private Boolean budgetSource; | |||
@ApiModelProperty("预算年度") | |||
private Boolean projectYear; | |||
@ApiModelProperty("项目简介") | |||
private Boolean projectIntroduction; | |||
@ApiModelProperty("立项依据") | |||
private Boolean buildBasis; | |||
@ApiModelProperty("建设层级") | |||
private Boolean buildLevel; | |||
@ApiModelProperty("发改编码") | |||
private Boolean developCode; | |||
@ApiModelProperty("财政编码") | |||
private Boolean financialCode; | |||
@ApiModelProperty("信息是否有效") | |||
private Boolean informationValidity; | |||
@ApiModelProperty("是否数字化改革项目") | |||
private Boolean isDigitalReform; | |||
@ApiModelProperty("综合应用领域") | |||
private Boolean bizDomain; | |||
@ApiModelProperty("是否上云") | |||
private Boolean isCloud; | |||
@ApiModelProperty("云类型") | |||
private Boolean cloudType; | |||
@ApiModelProperty("四大体系") | |||
private Boolean fourSystems; | |||
@ApiModelProperty("是否临时增补") | |||
private Boolean isTemporaryAugment; | |||
@ApiModelProperty("等保级别") | |||
private Boolean protectionLevel; | |||
@ApiModelProperty("是否密评 0:否 1:是") | |||
private Boolean isSecretComments; | |||
@ApiModelProperty("业务编号") | |||
private Boolean businessNumber; | |||
@ApiModelProperty("业务名称") | |||
private Boolean businessName; | |||
@ApiModelProperty("单位名称") | |||
private Boolean orgName; | |||
@ApiModelProperty("软件开发(万元)") | |||
private Boolean softwareDevelopmentAmount; | |||
@ApiModelProperty("云资源、硬件购置(万元)") | |||
private Boolean cloudHardwarePurchaseAmount; | |||
@ApiModelProperty("第三方服务(万元)") | |||
private Boolean thirdPartyAmount; | |||
@ApiModelProperty("投入项") | |||
private Boolean safetyInputTitle; | |||
@ApiModelProperty("内容描述") | |||
private Boolean safetyInputDescribe; | |||
@ApiModelProperty("金额(万元)") | |||
private Boolean safetyInputAmount; | |||
@ApiModelProperty("年度支付金额(万元)") | |||
private Boolean annualPlanAmount; | |||
@ApiModelProperty("自有资金(万元)") | |||
private Boolean annualPlanHaveAmount; | |||
@ApiModelProperty("政府投资-本级财政资金(万元)") | |||
private Boolean declareGovOwnFinanceAmount; | |||
@ApiModelProperty("政府投资-上级补助资金(万元)") | |||
private Boolean declareGovSuperiorFinanceAmount; | |||
@ApiModelProperty("银行贷款(万元)") | |||
private Boolean declareBankLendingAmount; | |||
@ApiModelProperty("其它资金(万元)") | |||
private Boolean declareOtherAmount; | |||
@ApiModelProperty("第一季度") | |||
private Boolean engineeringSpeedOne; | |||
@ApiModelProperty("第二季度") | |||
private Boolean engineeringSpeedTwo; | |||
@ApiModelProperty("第三季度") | |||
private Boolean engineeringSpeedThree; | |||
@ApiModelProperty("第四季度") | |||
private Boolean engineeringSpeedFour; | |||
@ApiModelProperty("初步方案") | |||
private Boolean preliminaryPlanFile; | |||
@ApiModelProperty("附件-佐证材料") | |||
private Boolean supportingMaterialsFile; | |||
@ApiModelProperty("备注") | |||
private Boolean projectRemarks; | |||
} |
@@ -57,7 +57,6 @@ public class TodoCenterController { | |||
@PostMapping("/exportPending") | |||
public void exportPendingProjectList(@Valid @RequestBody ReqToBeProcessedDTO param, HttpServletResponse response){ | |||
todoCenterManage.exportPendingProjectList(response,param); | |||
// ExcelDownUtil.downXlsx(response,param,todoCenterManage::exportPendingProjectList); | |||
} | |||
/** | |||
@@ -101,9 +100,9 @@ public class TodoCenterController { | |||
* @param response | |||
* @return void | |||
*/ | |||
@GetMapping("/exportHandled") | |||
public void exportHandledProjectList(ReqToBeProcessedDTO param, HttpServletResponse response){ | |||
ExcelDownUtil.downXlsx(response,param,todoCenterManage::exportHandledProjectList); | |||
@PostMapping("/exportHandled") | |||
public void exportHandledProjectList(@Valid @RequestBody ReqToBeProcessedDTO param, HttpServletResponse response){ | |||
todoCenterManage.exportHandledProjectList(response,param); | |||
} | |||
/** | |||
@@ -124,9 +123,9 @@ public class TodoCenterController { | |||
* @param response | |||
* @return void | |||
*/ | |||
@GetMapping("/exportMySubmitted") | |||
public void exportMySubmittedProjectList(ReqToBeProcessedDTO param, HttpServletResponse response){ | |||
ExcelDownUtil.downXlsx(response,param,todoCenterManage::exportMySubmittedProjectList); | |||
@PostMapping("/exportMySubmitted") | |||
public void exportMySubmittedProjectList(@Valid @RequestBody ReqToBeProcessedDTO param, HttpServletResponse response){ | |||
todoCenterManage.exportMySubmittedProjectList(response,param); | |||
} | |||
/** | |||
@@ -147,10 +146,8 @@ public class TodoCenterController { | |||
* @param response | |||
* @return void | |||
*/ | |||
@GetMapping("/exportCcMe") | |||
public void exportCcMeProjectList(ReqToBeProcessedDTO param, HttpServletResponse response){ | |||
ExcelDownUtil.downXlsx(response,param,todoCenterManage::exportCcMeProjectList); | |||
@PostMapping("/exportCcMe") | |||
public void exportCcMeProjectList(@Valid @RequestBody ReqToBeProcessedDTO param, HttpServletResponse response){ | |||
todoCenterManage.exportCcMeProjectList(response,param); | |||
} | |||
} |
@@ -1,16 +1,12 @@ | |||
package com.ningdatech.pmapi.todocenter.model.dto.req; | |||
import java.io.Serializable; | |||
import java.math.BigDecimal; | |||
import java.time.LocalDateTime; | |||
import java.util.List; | |||
import java.util.Map; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.ningdatech.basic.model.PagePo; | |||
import com.ningdatech.pmapi.todocenter.bean.entity.ExportOption; | |||
import com.ningdatech.pmapi.common.enums.ExportOptionEnum; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.AllArgsConstructor; | |||
import lombok.Data; | |||
@@ -50,6 +46,6 @@ public class ReqToBeProcessedDTO extends PagePo implements Serializable { | |||
private Integer isSupplement; | |||
@ApiModelProperty("导出选项") | |||
private List<String> exportOptionList; | |||
private List<ExportOptionEnum> exportOptionList; | |||
} |