导出功能

master
shijie 4 years ago
parent 9820e9aa56
commit e1a5699df8
  1. 1
      dq-financial-guarantee/pom.xml
  2. 8
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java
  3. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java
  4. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApplyAmountListRequest.java
  5. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateAssetsRequest.java
  6. 119
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/BusinessApplicationExportResponse.java
  7. 80
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/BusinessApplicationListResponse.java
  8. 6
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgAssetsInvestigationResponse.java
  9. 16
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java
  10. 1
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAssetsInvestigationMapper.xml
  11. 5
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsInvestigation.java
  12. 2
      dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/BusinessStatusConverter.java
  13. 2
      dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/EasyExcelUtil.java
  14. 4
      dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/OperatingStatusConverter.java
  15. 2
      dq-govern-gateway/src/main/resources/jwt.properties

@ -77,6 +77,7 @@
<version>3.0.7.1</version> <version>3.0.7.1</version>
</dependency> </dependency>
</dependencies> </dependencies>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>

@ -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.BusinessApplicationRequest;
import com.daqing.financial.guarantee.model.request.GuaranteeLetterListRequest; import com.daqing.financial.guarantee.model.request.GuaranteeLetterListRequest;
import com.daqing.financial.guarantee.model.response.BusinessApplicationDetailResponse; 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.BusinessApplicationListResponse;
import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse; import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse;
import com.daqing.financial.guarantee.service.IDgApplyAmountInfoService; import com.daqing.financial.guarantee.service.IDgApplyAmountInfoService;
@ -250,13 +251,14 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA
public void applyAmountListExport( public void applyAmountListExport(
@ApiParam(name = "applyAmountListRequest", value = "业务申请列表数据", required = true) @ApiParam(name = "applyAmountListRequest", value = "业务申请列表数据", required = true)
@RequestBody ApplyAmountListRequest applyAmountListRequest, HttpServletResponse response){ @RequestBody ApplyAmountListRequest applyAmountListRequest, HttpServletResponse response){
//获取担保函列表数据 //获取业务申请列表数据
List<BusinessApplicationListResponse> businessAppListResList = applyAmountListRequest.getBusinessAppListResList(); List<BusinessApplicationExportResponse> businessAppListResList = applyAmountListRequest.getBusinessAppListResList();
try { try {
//导出excel文件 //导出excel文件
EasyExcelUtil.download(response, BusinessApplicationListResponse.class, businessAppListResList,"业务申请列表","第一页"); EasyExcelUtil.download(response, BusinessApplicationExportResponse.class, businessAppListResList,"业务申请列表","第一页");
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
} }

@ -1,9 +1,7 @@
package com.daqing.financial.guarantee.controller; 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.IDgAuditProcessService;
import com.daqing.financial.guarantee.service.IDgProcessService;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;

@ -1,5 +1,6 @@
package com.daqing.financial.guarantee.model.request; 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.BusinessApplicationListResponse;
import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse; import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
@ -17,6 +18,6 @@ import java.util.List;
public class ApplyAmountListRequest { public class ApplyAmountListRequest {
@ApiModelProperty(value = "业务申请导出数据") @ApiModelProperty(value = "业务申请导出数据")
private List<BusinessApplicationListResponse> businessAppListResList; private List<BusinessApplicationExportResponse> businessAppListResList;
} }

@ -37,6 +37,9 @@ public class InvestigateAssetsRequest {
@ApiModelProperty(value = "评估日期") @ApiModelProperty(value = "评估日期")
private Date assetsTime; private Date assetsTime;
@ApiModelProperty(value = "评估价值")
private String[] assetsAmount;
@ApiModelProperty(value = "合计") @ApiModelProperty(value = "合计")
private BigDecimal amountSum; private BigDecimal amountSum;

@ -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;
}

@ -4,6 +4,9 @@ import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel; import com.alibaba.excel.metadata.BaseRowModel;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; 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 com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -39,6 +42,32 @@ public class BusinessApplicationListResponse extends BaseRowModel implements Ser
@ApiModelProperty(value = "提单人id") @ApiModelProperty(value = "提单人id")
private Integer presenterId; 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 = "申请时间") @ApiModelProperty(value = "申请时间")
private Date createTime; private Date createTime;
/** @ApiModelProperty("审核状态")
* 业务类型 @ExcelProperty(value = "审核状态",index = 7)
*/ private Integer status;
@ExcelProperty(value = "业务类别",index = 3)
@ApiModelProperty(value = "业务类型")
private String businessType;
/**
* 业务编号
*/
@ExcelProperty(value = "业务编号",index = 0)
@ApiModelProperty(value = "业务编号")
private String businessCode;
/** @ApiModelProperty("业务状态")
* 客户名称 @ExcelProperty(value = "业务状态",index = 8)
*/ private Integer businessStatus;
@ExcelProperty(value = "客户名称",index = 1)
@ApiModelProperty(value = "客户名称")
private String name;
/** @ApiModelProperty("操作状态")
* 联系电话 @ExcelProperty(value = "操作状态",index = 9)
*/ private Integer operatingStatus;
@ExcelProperty(value = "联系电话",index = 2)
@ApiModelProperty(value = "联系电话")
private String phone;
/** /**
* 提单人 * 提单人
*/ */
@ExcelProperty(value = "提单人",index = 8) @ExcelProperty(value = "提单人",index = 10)
@ApiModelProperty(value = "提单人") @ApiModelProperty(value = "提单人")
private String account; private String account;
/** /**
* 部门名称 * 部门名称
*/ */
@ExcelProperty(value = "部门名称",index = 9) @ExcelProperty(value = "部门名称",index = 11)
@ApiModelProperty(value = "部门名称") @ApiModelProperty(value = "部门名称")
private String deptName; 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;
} }

@ -82,6 +82,12 @@ public class DgAssetsInvestigationResponse implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date assetsTime; private Date assetsTime;
/**
* 评估价值
*/
private String assetsAmount;
private List<String> assetsAmountList;
/** /**
* 合计 * 合计
*/ */

@ -112,12 +112,21 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
public AssetsDetailResponse assetsDetail(Integer id) { public AssetsDetailResponse assetsDetail(Integer id) {
//根据主键id查询资产调查详情 //根据主键id查询资产调查详情
DgAssetsInvestigationResponse assetsResponse = this.getBaseMapper().selectInfoById(id); DgAssetsInvestigationResponse assetsResponse = this.getBaseMapper().selectInfoById(id);
String assetsAmount=assetsResponse.getAssetsAmount();
if(assetsAmount != null){
if(assetsAmount.length()>0){
String a = assetsAmount.substring(1,assetsAmount.length()-1);
String arry[]=a.split(",");
List<String> demoList = Arrays.asList(arry);
assetsResponse.setAssetsAmountList(demoList);
}
}
//根据业务id查询评估价值List //根据业务id查询评估价值List
List<DgAssetsAssessmentAssetsLog> assessmentlist = dgAssetsAssessmentAssetsLogMapper.selectList( /* List<DgAssetsAssessmentAssetsLog> assessmentlist = dgAssetsAssessmentAssetsLogMapper.selectList(
new QueryWrapper<DgAssetsAssessmentAssetsLog>().eq("business_id",assetsResponse.getBusinessId())); new QueryWrapper<DgAssetsAssessmentAssetsLog>().eq("business_id",assetsResponse.getBusinessId()));
assetsResponse.setAssessmentList(assessmentlist); assetsResponse.setAssessmentList(assessmentlist);*/
String files=assetsResponse.getFile(); String files=assetsResponse.getFile();
if(files != null){ if(files != null){
@ -170,6 +179,7 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
assetsInvestigation.setStatus(investigateAssetsRequest.getStatus());//状态 assetsInvestigation.setStatus(investigateAssetsRequest.getStatus());//状态
assetsInvestigation.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理 assetsInvestigation.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
assetsInvestigation.setApplyContent(investigateAssetsRequest.getApplyContent());//审核意见 assetsInvestigation.setApplyContent(investigateAssetsRequest.getApplyContent());//审核意见
assetsInvestigation.setAssetsAmount(ArraysUtil.toString(investigateAssetsRequest.getAssetsAmount()));
assetsInvestigation.setAmountSum(investigateAssetsRequest.getAmountSum());//合计 assetsInvestigation.setAmountSum(investigateAssetsRequest.getAmountSum());//合计
assetsInvestigation.setAssetsName(investigateAssetsRequest.getAssetsName()); assetsInvestigation.setAssetsName(investigateAssetsRequest.getAssetsName());
assetsInvestigation.setAssetsCode(investigateAssetsRequest.getAssetsCode()); assetsInvestigation.setAssetsCode(investigateAssetsRequest.getAssetsCode());
@ -190,7 +200,7 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
//根据业务id批量新增数据到评估价值列表 //根据业务id批量新增数据到评估价值列表
dgAssetsAssessmentAssetsLogMapper.insertAssetsList(investigateAssetsRequest.getAssessmentList()); //dgAssetsAssessmentAssetsLogMapper.insertAssetsList(investigateAssetsRequest.getAssessmentList());
//判断资产部调查员是否调查通过,如果通过,修改资产部经理操作状态为待处理 //判断资产部调查员是否调查通过,如果通过,修改资产部经理操作状态为待处理
if(investigateAssetsRequest.getStatus()==1){//状态为审核中 if(investigateAssetsRequest.getStatus()==1){//状态为审核中

@ -23,6 +23,7 @@
<result column="guarantee_measures" property="guaranteeMeasures" /> <result column="guarantee_measures" property="guaranteeMeasures" />
<result column="file" property="file" /> <result column="file" property="file" />
<result column="apply_content" property="applyContent" /> <result column="apply_content" property="applyContent" />
<result column="assets_amount" property="assetsAmount" />
<result column="amount" property="amount" /> <result column="amount" property="amount" />
<result column="term" property="term" /> <result column="term" property="term" />
<result column="remark" property="remark" /> <result column="remark" property="remark" />

@ -78,6 +78,11 @@ public class DgAssetsInvestigation implements Serializable {
*/ */
private Date assetsTime; private Date assetsTime;
/**
* 评估价值
*/
private String assetsAmount;
/** /**
* 合计 * 合计
*/ */

@ -57,6 +57,8 @@ public class BusinessStatusConverter implements Converter<Integer> {
GlobalConfiguration globalConfiguration) { GlobalConfiguration globalConfiguration) {
switch (value){ switch (value){
case 0:
return new CellData("已撤销");
case 1: case 1:
return new CellData("进行中"); return new CellData("进行中");
case 2: case 2:

@ -15,7 +15,7 @@ public class EasyExcelUtil {
public static void download(HttpServletResponse response, Class head, List list, String fileName, String sheetName) throws IOException { public static void download(HttpServletResponse response, Class head, List list, String fileName, String sheetName) throws IOException {
response.setContentType("application/vnd.ms-excel"); response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf-8"); 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); EasyExcel.write(response.getOutputStream(), head).sheet(sheetName).doWrite(list);
} }
} }

@ -63,6 +63,10 @@ public class OperatingStatusConverter implements Converter<Integer> {
return new CellData("待处理"); return new CellData("待处理");
case 2: case 2:
return new CellData("已处理"); return new CellData("已处理");
case 3:
return new CellData("待提交");
case 4:
return new CellData("");
default: default:
return new CellData(String.valueOf(value)); return new CellData(String.valueOf(value));
} }

@ -12,6 +12,6 @@ jwt.ignoreUrlList=/apiHrmsAuth/hrms/auth/userlogin/getBackPwd,\
/apiHrmsAuth/hrms/auth/userlogin/bindPhoneAndOpenId,\ /apiHrmsAuth/hrms/auth/userlogin/bindPhoneAndOpenId,\
/apiHrmsAuth/hrms/auth/userlogin/sendCode,\ /apiHrmsAuth/hrms/auth/userlogin/sendCode,\
/apiHrmsAuth/hrms/auth/userlogin/isPhoneExist,\ /apiHrmsAuth/hrms/auth/userlogin/isPhoneExist,\
/api-guarantee/dg-apply-amount-info/excelExport /api-guarantee/dg-apply-amount-info/applyAmountListExport

Loading…
Cancel
Save