From e1a5699df805705945d13897c83ab44822ff3b50 Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Thu, 26 Nov 2020 17:14:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dq-financial-guarantee/pom.xml | 1 + .../DgApplyAmountInfoController.java | 8 +- .../controller/DgAuditProcessController.java | 2 - .../model/request/ApplyAmountListRequest.java | 3 +- .../request/InvestigateAssetsRequest.java | 3 + .../BusinessApplicationExportResponse.java | 119 ++++++++++++++++++ .../BusinessApplicationListResponse.java | 80 ++++++------ .../DgAssetsInvestigationResponse.java | 6 + .../DgAssetsInvestigationServiceImpl.java | 16 ++- .../guarantee/DgAssetsInvestigationMapper.xml | 1 + .../guarantee/DgAssetsInvestigation.java | 5 + .../utils/excel/BusinessStatusConverter.java | 2 + .../framework/utils/excel/EasyExcelUtil.java | 2 +- .../utils/excel/OperatingStatusConverter.java | 4 + .../src/main/resources/jwt.properties | 2 +- 15 files changed, 203 insertions(+), 51 deletions(-) create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/BusinessApplicationExportResponse.java diff --git a/dq-financial-guarantee/pom.xml b/dq-financial-guarantee/pom.xml index 7f2fbe96..34b8e4d5 100644 --- a/dq-financial-guarantee/pom.xml +++ b/dq-financial-guarantee/pom.xml @@ -77,6 +77,7 @@ 3.0.7.1 + diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java index 87ee35db..e7292a1e 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java @@ -9,6 +9,7 @@ import com.daqing.financial.guarantee.model.request.ApprovalBusinessRequest; import com.daqing.financial.guarantee.model.request.BusinessApplicationRequest; import com.daqing.financial.guarantee.model.request.GuaranteeLetterListRequest; import com.daqing.financial.guarantee.model.response.BusinessApplicationDetailResponse; +import com.daqing.financial.guarantee.model.response.BusinessApplicationExportResponse; import com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse; import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse; import com.daqing.financial.guarantee.service.IDgApplyAmountInfoService; @@ -250,13 +251,14 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA public void applyAmountListExport( @ApiParam(name = "applyAmountListRequest", value = "业务申请列表数据", required = true) @RequestBody ApplyAmountListRequest applyAmountListRequest, HttpServletResponse response){ - //获取担保函列表数据 - List businessAppListResList = applyAmountListRequest.getBusinessAppListResList(); + //获取业务申请列表数据 + List businessAppListResList = applyAmountListRequest.getBusinessAppListResList(); try { //导出excel文件 - EasyExcelUtil.download(response, BusinessApplicationListResponse.class, businessAppListResList,"业务申请列表","第一页"); + EasyExcelUtil.download(response, BusinessApplicationExportResponse.class, businessAppListResList,"业务申请列表","第一页"); } catch (IOException e) { e.printStackTrace(); + } } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java index cbe846d5..bc7a05ea 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java @@ -1,9 +1,7 @@ package com.daqing.financial.guarantee.controller; -import com.daqing.financial.guarantee.model.response.PaymentConfirmationListResponse; import com.daqing.financial.guarantee.service.IDgAuditProcessService; -import com.daqing.financial.guarantee.service.IDgProcessService; import com.daqing.framework.model.response.ResponseResult; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApplyAmountListRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApplyAmountListRequest.java index c24ab442..6ebcf664 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApplyAmountListRequest.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApplyAmountListRequest.java @@ -1,5 +1,6 @@ package com.daqing.financial.guarantee.model.request; +import com.daqing.financial.guarantee.model.response.BusinessApplicationExportResponse; import com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse; import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse; import io.swagger.annotations.ApiModelProperty; @@ -17,6 +18,6 @@ import java.util.List; public class ApplyAmountListRequest { @ApiModelProperty(value = "业务申请导出数据") - private List businessAppListResList; + private List businessAppListResList; } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateAssetsRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateAssetsRequest.java index 37d5557a..73f8fee6 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateAssetsRequest.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateAssetsRequest.java @@ -37,6 +37,9 @@ public class InvestigateAssetsRequest { @ApiModelProperty(value = "评估日期") private Date assetsTime; + @ApiModelProperty(value = "评估价值") + private String[] assetsAmount; + @ApiModelProperty(value = "合计") private BigDecimal amountSum; diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/BusinessApplicationExportResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/BusinessApplicationExportResponse.java new file mode 100644 index 00000000..31dbd3aa --- /dev/null +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/BusinessApplicationExportResponse.java @@ -0,0 +1,119 @@ +package com.daqing.financial.guarantee.model.response; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.metadata.BaseRowModel; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.daqing.framework.utils.excel.ApprovalStatusConverter; +import com.daqing.framework.utils.excel.BusinessStatusConverter; +import com.daqing.framework.utils.excel.OperatingStatusConverter; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.ToString; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +@Data +@ToString +public class BusinessApplicationExportResponse extends BaseRowModel implements Serializable { + + /* *//** + * 主键id + *//* + @ApiModelProperty(value = "id") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + *//** + * 企业id + *//* + @ApiModelProperty(value = "企业id") + private Integer companyId; + + @ApiModelProperty(value = "业务id") + private Integer businessId; + + *//** + * 提单人id + *//* + @ApiModelProperty(value = "提单人id") + private Integer presenterId;*/ + + /** + * 业务编号 + */ + @ExcelProperty(value = "业务编号",index = 0) + @ApiModelProperty(value = "业务编号") + private String businessCode; + + /** + * 客户名称 + */ + @ExcelProperty(value = "客户名称",index = 1) + @ApiModelProperty(value = "客户名称") + private String name; + + /** + * 联系电话 + */ + @ExcelProperty(value = "联系电话",index = 2) + @ApiModelProperty(value = "联系电话") + private String phone; + /** + * 业务类型 + */ + @ExcelProperty(value = "业务类别",index = 3) + @ApiModelProperty(value = "业务类型") + private String businessType; + /** + * 申请额度 + */ + @ExcelProperty(value = "申请额度",index = 4) + @ApiModelProperty(value = "申请额度") + private BigDecimal applyAmount; + + /** + * 申请期限 + */ + @ExcelProperty(value = "申请期限",index = 5) + @ApiModelProperty(value = "申请期限") + private String applyTime; + + /** + * 申请时间 + */ + @ExcelProperty(value = "申请日期",index = 6) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "申请时间") + private Date createTime; + + @ApiModelProperty("审核状态") + @ExcelProperty(value = "审核状态",index = 7,converter = ApprovalStatusConverter.class) + private Integer status; + + @ApiModelProperty("业务状态") + @ExcelProperty(value = "业务状态",index = 8,converter = BusinessStatusConverter.class) + private Integer businessStatus; + + @ApiModelProperty("操作状态") + @ExcelProperty(value = "操作状态",index = 9,converter = OperatingStatusConverter.class) + private Integer operatingStatus; + + /** + * 提单人 + */ + @ExcelProperty(value = "提单人",index = 10) + @ApiModelProperty(value = "提单人") + private String account; + + /** + * 部门名称 + */ + @ExcelProperty(value = "部门名称",index = 11) + @ApiModelProperty(value = "部门名称") + private String deptName; + +} diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/BusinessApplicationListResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/BusinessApplicationListResponse.java index d22cec7c..50717950 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/BusinessApplicationListResponse.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/BusinessApplicationListResponse.java @@ -4,6 +4,9 @@ import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.metadata.BaseRowModel; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; +import com.daqing.framework.utils.excel.ApprovalStatusConverter; +import com.daqing.framework.utils.excel.BusinessStatusConverter; +import com.daqing.framework.utils.excel.OperatingStatusConverter; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -39,6 +42,32 @@ public class BusinessApplicationListResponse extends BaseRowModel implements Ser @ApiModelProperty(value = "提单人id") private Integer presenterId; + /** + * 业务编号 + */ + @ExcelProperty(value = "业务编号",index = 0) + @ApiModelProperty(value = "业务编号") + private String businessCode; + + /** + * 客户名称 + */ + @ExcelProperty(value = "客户名称",index = 1) + @ApiModelProperty(value = "客户名称") + private String name; + + /** + * 联系电话 + */ + @ExcelProperty(value = "联系电话",index = 2) + @ApiModelProperty(value = "联系电话") + private String phone; + /** + * 业务类型 + */ + @ExcelProperty(value = "业务类别",index = 3) + @ApiModelProperty(value = "业务类型") + private String businessType; /** * 申请额度 */ @@ -61,62 +90,33 @@ public class BusinessApplicationListResponse extends BaseRowModel implements Ser @ApiModelProperty(value = "申请时间") private Date createTime; - /** - * 业务类型 - */ - @ExcelProperty(value = "业务类别",index = 3) - @ApiModelProperty(value = "业务类型") - private String businessType; - - /** - * 业务编号 - */ - @ExcelProperty(value = "业务编号",index = 0) - @ApiModelProperty(value = "业务编号") - private String businessCode; + @ApiModelProperty("审核状态") + @ExcelProperty(value = "审核状态",index = 7) + private Integer status; - /** - * 客户名称 - */ - @ExcelProperty(value = "客户名称",index = 1) - @ApiModelProperty(value = "客户名称") - private String name; + @ApiModelProperty("业务状态") + @ExcelProperty(value = "业务状态",index = 8) + private Integer businessStatus; - /** - * 联系电话 - */ - @ExcelProperty(value = "联系电话",index = 2) - @ApiModelProperty(value = "联系电话") - private String phone; + @ApiModelProperty("操作状态") + @ExcelProperty(value = "操作状态",index = 9) + private Integer operatingStatus; /** * 提单人 */ - @ExcelProperty(value = "提单人",index = 8) + @ExcelProperty(value = "提单人",index = 10) @ApiModelProperty(value = "提单人") private String account; /** * 部门名称 */ - @ExcelProperty(value = "部门名称",index = 9) + @ExcelProperty(value = "部门名称",index = 11) @ApiModelProperty(value = "部门名称") private String deptName; - /** - * 状态 - */ - @ExcelProperty(value = "审批状态",index = 7) - @ApiModelProperty(value = "审批状态") - private Integer status; - - @ExcelProperty(value = "业务状态",index = 8) - @ApiModelProperty(value = "业务状态") - private Integer businessStatus; - @ExcelProperty(value = "操作状态",index = 9) - @ApiModelProperty(value = "操作状态") - private Integer operatingStatus; } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgAssetsInvestigationResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgAssetsInvestigationResponse.java index 525f2aa9..87ed4950 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgAssetsInvestigationResponse.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgAssetsInvestigationResponse.java @@ -82,6 +82,12 @@ public class DgAssetsInvestigationResponse implements Serializable { @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date assetsTime; + /** + * 评估价值 + */ + private String assetsAmount; + + private List assetsAmountList; /** * 合计 */ diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java index 639fc43d..8891eb19 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java @@ -112,12 +112,21 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl0){ + String a = assetsAmount.substring(1,assetsAmount.length()-1); + String arry[]=a.split(","); + List demoList = Arrays.asList(arry); + assetsResponse.setAssetsAmountList(demoList); + } + } //根据业务id查询评估价值List - List assessmentlist = dgAssetsAssessmentAssetsLogMapper.selectList( +/* List assessmentlist = dgAssetsAssessmentAssetsLogMapper.selectList( new QueryWrapper().eq("business_id",assetsResponse.getBusinessId())); - assetsResponse.setAssessmentList(assessmentlist); + assetsResponse.setAssessmentList(assessmentlist);*/ String files=assetsResponse.getFile(); if(files != null){ @@ -170,6 +179,7 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl + diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsInvestigation.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsInvestigation.java index 6d728aff..e7dac5c9 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsInvestigation.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsInvestigation.java @@ -78,6 +78,11 @@ public class DgAssetsInvestigation implements Serializable { */ private Date assetsTime; + /** + * 评估价值 + */ + private String assetsAmount; + /** * 合计 */ diff --git a/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/BusinessStatusConverter.java b/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/BusinessStatusConverter.java index f3d09648..29862127 100644 --- a/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/BusinessStatusConverter.java +++ b/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/BusinessStatusConverter.java @@ -57,6 +57,8 @@ public class BusinessStatusConverter implements Converter { GlobalConfiguration globalConfiguration) { switch (value){ + case 0: + return new CellData("已撤销"); case 1: return new CellData("进行中"); case 2: diff --git a/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/EasyExcelUtil.java b/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/EasyExcelUtil.java index a9c5740f..c59081b6 100644 --- a/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/EasyExcelUtil.java +++ b/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/EasyExcelUtil.java @@ -15,7 +15,7 @@ public class EasyExcelUtil { public static void download(HttpServletResponse response, Class head, List list, String fileName, String sheetName) throws IOException { response.setContentType("application/vnd.ms-excel"); response.setCharacterEncoding("utf-8"); - response.setHeader("Content-disposition", "attachment;filename="+fileName+""); + response.setHeader("Content-disposition", "attachment;filename="+fileName+".xlsx"); EasyExcel.write(response.getOutputStream(), head).sheet(sheetName).doWrite(list); } } diff --git a/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/OperatingStatusConverter.java b/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/OperatingStatusConverter.java index 08d03e69..50f35109 100644 --- a/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/OperatingStatusConverter.java +++ b/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/OperatingStatusConverter.java @@ -63,6 +63,10 @@ public class OperatingStatusConverter implements Converter { return new CellData("待处理"); case 2: return new CellData("已处理"); + case 3: + return new CellData("待提交"); + case 4: + return new CellData(""); default: return new CellData(String.valueOf(value)); } diff --git a/dq-govern-gateway/src/main/resources/jwt.properties b/dq-govern-gateway/src/main/resources/jwt.properties index 4b24fd18..5cc28ed2 100644 --- a/dq-govern-gateway/src/main/resources/jwt.properties +++ b/dq-govern-gateway/src/main/resources/jwt.properties @@ -12,6 +12,6 @@ jwt.ignoreUrlList=/apiHrmsAuth/hrms/auth/userlogin/getBackPwd,\ /apiHrmsAuth/hrms/auth/userlogin/bindPhoneAndOpenId,\ /apiHrmsAuth/hrms/auth/userlogin/sendCode,\ /apiHrmsAuth/hrms/auth/userlogin/isPhoneExist,\ - /api-guarantee/dg-apply-amount-info/excelExport + /api-guarantee/dg-apply-amount-info/applyAmountListExport