From bdedfebbb969b86fcac88b59e28db391d9277027 Mon Sep 17 00:00:00 2001
From: chen <1251790704@qq.com>
Date: Thu, 26 Nov 2020 17:12:48 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/DgAuditProcessController.java | 11 +++--
.../DgBusinessProcessStatusController.java | 24 ++++++++-
...DgGuaranteeLetterAssignUserController.java | 12 ++---
.../controller/DgProcessController.java | 0
.../mapper/DgAuditProcessMapper.java | 4 ++
.../DgGuaranteeLetterAssignUserMapper.java | 2 +
.../response/GuaranteeLetterListResponse.java | 18 +++++--
.../service/IDgAuditProcessService.java | 4 ++
.../IDgGuaranteeLetterAssignUserService.java | 6 +++
.../impl/DgAuditProcessServiceImpl.java | 8 +++
...gGuaranteeLetterAssignUserServiceImpl.java | 19 ++++++-
.../guarantee/util/AuditProcessUtil.java | 37 ++++++++++++++
.../mapper/guarantee/DgAuditProcessMapper.xml | 19 ++++---
.../DgGuaranteeLetterAssignUserMapper.xml | 16 ++++++
.../domain/guarantee/DgAuditProcess.java | 49 +++++--------------
.../framework/utils/excel/EasyExcelUtil.java | 2 +-
16 files changed, 165 insertions(+), 66 deletions(-)
delete mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgProcessController.java
create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/AuditProcessUtil.java
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..ef56ca95 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,8 @@
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.domain.guarantee.DgAuditProcess;
import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@@ -14,6 +13,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
+import java.util.List;
+
/**
*
* 审核流程进程 前端控制器
@@ -29,13 +30,13 @@ public class DgAuditProcessController {
@Autowired
private IDgAuditProcessService auditProcessService;
- @ApiOperation(value = "审核流程进程列表")
+ @ApiOperation(value = "审核流程进程列表",response = DgAuditProcess.class)
@GetMapping("/auditProcessList")
public ResponseResult processList(
@ApiParam(name = "businessId", value = "业务id", required = true)
@RequestParam String businessId){
- return ResponseResult.SUCCESS();
+ List auditProcessList = auditProcessService.auditProcessList(businessId);
+ return ResponseResult.SUCCESS(auditProcessList);
}
-
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgBusinessProcessStatusController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgBusinessProcessStatusController.java
index 218f5736..5245b3af 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgBusinessProcessStatusController.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgBusinessProcessStatusController.java
@@ -1,10 +1,18 @@
package com.daqing.financial.guarantee.controller;
-import org.springframework.web.bind.annotation.RequestMapping;
+import com.daqing.financial.guarantee.service.IDgBusinessProcessStatusService;
+import com.daqing.framework.domain.guarantee.DgAuditProcess;
+import com.daqing.framework.domain.guarantee.DgBusinessProcessStatus;
+import com.daqing.framework.model.response.ResponseResult;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
/**
*
@@ -18,4 +26,16 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/dg-business-process-status")
public class DgBusinessProcessStatusController {
+ @Autowired
+ private IDgBusinessProcessStatusService businessProcessStatusService;
+
+ @ApiOperation(value = "添加业务流程状态")
+ @PostMapping("/businessProcessStatus")
+ public ResponseResult businessProcessStatus(
+ @ApiParam(name = "businessId", value = "业务id", required = true)
+ @RequestBody DgBusinessProcessStatus businessProcessStatus){
+ boolean save = businessProcessStatusService.save(businessProcessStatus);
+ return save ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
+ }
+
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java
index 84d89859..2433d090 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java
@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.List;
/**
@@ -48,15 +49,12 @@ public class DgGuaranteeLetterAssignUserController {
@ApiOperation(value = "导出担保函列表数据")
- @PostMapping("/guaranteeLetterListExport")
+ @GetMapping("/guaranteeLetterListExport")
public void guaranteeLetterListExport(
- @ApiParam(name = "guaranteeLetterListRequest", value = "担保函列表数据", required = true)
- @RequestBody GuaranteeLetterListRequest guaranteeLetterListRequest, HttpServletResponse response){
- //获取担保函列表数据
- List guaranteeLetterListResponseList = guaranteeLetterListRequest.getGuaranteeLetterListResponseList();
+ @ApiParam(name = "ids", value = "多个id", required = true)
+ @RequestParam("ids") List ids,HttpServletResponse response){
try {
- //导出excel文件
- EasyExcelUtil.download(response, GuaranteeLetterListResponse.class, guaranteeLetterListResponseList,"担保函列表","第一页");
+ guaranteeLetterAssignUserService.batchExport(response,ids);
} catch (IOException e) {
e.printStackTrace();
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgProcessController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgProcessController.java
deleted file mode 100644
index e69de29b..00000000
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAuditProcessMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAuditProcessMapper.java
index 04290b0a..92f52bf5 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAuditProcessMapper.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAuditProcessMapper.java
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.daqing.framework.domain.guarantee.DgAuditProcess;
import org.apache.ibatis.annotations.Mapper;
+import java.util.List;
+
/**
*
* 审核流程进程 Mapper 接口
@@ -15,4 +17,6 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface DgAuditProcessMapper extends BaseMapper {
+ List selectAuditProcessList(String businessId);
+
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgGuaranteeLetterAssignUserMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgGuaranteeLetterAssignUserMapper.java
index 9ec4baf6..6e927d57 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgGuaranteeLetterAssignUserMapper.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgGuaranteeLetterAssignUserMapper.java
@@ -23,4 +23,6 @@ public interface DgGuaranteeLetterAssignUserMapper extends BaseMapper pageByCondition(Page page, Integer userId, List roleIdList, Integer status, String customerNumberOrName);
+ List selectBatchData(List ids);
+
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeLetterListResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeLetterListResponse.java
index 4ebf905b..770d27e4 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeLetterListResponse.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeLetterListResponse.java
@@ -1,5 +1,6 @@
package com.daqing.financial.guarantee.model.response;
+import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.daqing.framework.utils.excel.ApprovalStatusConverter;
import com.daqing.framework.utils.excel.BusinessStatusConverter;
@@ -19,20 +20,29 @@ import java.util.Date;
@Data
public class GuaranteeLetterListResponse {
+ @ExcelIgnore
+ @ApiModelProperty("法规经理唯一标识")
+ private Integer isFgJl;
+
+ @ExcelIgnore
@ApiModelProperty("唯一标识")
private Integer id;
+ @ExcelIgnore
@ApiModelProperty("银行名称")
private String bank;
+ @ExcelIgnore
@ApiModelProperty(value = "审核意见")
private String auditOpinion;
+ @ExcelIgnore
@ApiModelProperty("贷审会同意时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date passingTime;
@ApiModelProperty("附件(会议记录)")
+ @ExcelIgnore
private String file;
@ApiModelProperty("业务编号")
@@ -51,12 +61,12 @@ public class GuaranteeLetterListResponse {
@ExcelProperty(value = "业务类别",index = 3)
private String businessType;
- @ApiModelProperty("金额")
- @ExcelProperty(value = "金额",index = 4)
+ @ApiModelProperty("申请额度")
+ @ExcelProperty(value = "申请额度",index = 4)
private Double loanMoney;
- @ApiModelProperty("期限")
- @ExcelProperty(value = "期数",index = 5)
+ @ApiModelProperty("申请期限")
+ @ExcelProperty(value = "申请期限",index = 5)
private String loanTern;
@ApiModelProperty("申请日期")
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgAuditProcessService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgAuditProcessService.java
index d803d7b0..d52ba007 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgAuditProcessService.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgAuditProcessService.java
@@ -3,6 +3,8 @@ package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.framework.domain.guarantee.DgAuditProcess;
+import java.util.List;
+
/**
*
* 审核流程进程 服务类
@@ -13,4 +15,6 @@ import com.daqing.framework.domain.guarantee.DgAuditProcess;
*/
public interface IDgAuditProcessService extends IService {
+ List auditProcessList(String businessId);
+
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeLetterAssignUserService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeLetterAssignUserService.java
index da08e12e..a57d9ab6 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeLetterAssignUserService.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeLetterAssignUserService.java
@@ -6,6 +6,10 @@ import com.daqing.financial.guarantee.model.request.GuaranteeLetterUpdateStatusR
import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser;
import com.daqing.framework.utils.PageUtils;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.List;
+
/**
*
* 担保函记录 服务类
@@ -21,4 +25,6 @@ public interface IDgGuaranteeLetterAssignUserService extends IService ids) throws IOException;
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAuditProcessServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAuditProcessServiceImpl.java
index 67b984e1..8d637691 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAuditProcessServiceImpl.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAuditProcessServiceImpl.java
@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.framework.domain.guarantee.DgAuditProcess;
import org.springframework.stereotype.Service;
+import java.util.List;
+
/**
*
* 审核流程进程 服务实现类
@@ -17,4 +19,10 @@ import org.springframework.stereotype.Service;
@Service
public class DgAuditProcessServiceImpl extends ServiceImpl implements IDgAuditProcessService {
+ @Override
+ public List auditProcessList(String businessId) {
+ List auditProcessList = baseMapper.selectAuditProcessList(businessId);
+ return auditProcessList;
+ }
+
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java
index 8095241a..a15f9797 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java
@@ -18,6 +18,7 @@ import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.utils.PageUtils;
+import com.daqing.framework.utils.excel.EasyExcelUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -26,9 +27,11 @@ import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
import java.util.Arrays;
import java.util.List;
-import java.util.spi.CurrencyNameProvider;
+
/**
*
@@ -58,6 +61,12 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl ids) throws IOException {
+ List excelDataList = baseMapper.selectBatchData(ids);
+ EasyExcelUtil.download(response,GuaranteeLetterListResponse.class,excelDataList,"GuaranteeLetterList","第一页");
+ }
+
@Override
public PageUtils queryPage(GuaranteeLetterQueryRequest guaranteeLetterQueryRequest) {
//取出条件
@@ -76,8 +85,14 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl roleIdList = Arrays.asList(ids);
//分页条件查询
guaranteeLetterVO = baseMapper.pageByCondition(new Page(page,size),userId,roleIdList,status,customerNumberOrName);
+ List records = guaranteeLetterVO.getRecords();
+ records.forEach(guaranteeLetterListResponse -> {
+ //角色为法规部经理则设置值
+ if (roleIdList.contains(PromptSuccess.FG_JL_ID)){
+ guaranteeLetterListResponse.setIsFgJl(1);
+ }
+ });
}
-
return new PageUtils(guaranteeLetterVO);
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/AuditProcessUtil.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/AuditProcessUtil.java
new file mode 100644
index 00000000..e7c35e9b
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/AuditProcessUtil.java
@@ -0,0 +1,37 @@
+package com.daqing.financial.guarantee.util;
+
+import com.daqing.financial.guarantee.mapper.DgAuditProcessMapper;
+import com.daqing.framework.domain.guarantee.DgAuditProcess;
+import lombok.Data;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @Author chen
+ * @DATE 2020/11/26 15:45
+ * @Version 1.0
+ */
+@Data
+@Configuration
+public class AuditProcessUtil {
+
+ private Integer businessId;
+ private String approver;
+ private String deptName;
+ private String auditOpinion;
+
+ @Autowired
+ private DgAuditProcessMapper auditProcessMapper;
+
+ public AuditProcessUtil(Integer businessId, String approver, String deptName, String auditOpinion) {
+ DgAuditProcess auditProcess = new DgAuditProcess();
+ auditProcess.setApprover(approver);
+ auditProcess.setAuditOpinion(auditOpinion);
+ auditProcess.setBusinessId(businessId);
+ auditProcess.setDeptName(deptName);
+ auditProcessMapper.insert(auditProcess);
+ }
+
+ public AuditProcessUtil() {
+ }
+}
diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml
index 1fe65e95..c5bce3c3 100644
--- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml
+++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml
@@ -5,14 +5,19 @@
-
-
-
-
-
+
+
+
+
-
-
+
+
+
diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml
index 23b72cec..49a23f39 100644
--- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml
+++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml
@@ -57,4 +57,20 @@
+
+
+
diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAuditProcess.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAuditProcess.java
index 85208db8..282e29e5 100644
--- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAuditProcess.java
+++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAuditProcess.java
@@ -1,8 +1,6 @@
package com.daqing.framework.domain.guarantee;
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -23,52 +21,27 @@ public class DgAuditProcess implements Serializable {
private static final long serialVersionUID = 1L;
- /**
- * 主键id
- */
+ @ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "业务id")
private Integer businessId;
- /**
- * 企业id
- */
- private Integer companyId;
- /**
- * 审批人id
- */
- private Integer empId;
+ @ApiModelProperty(value = "审批人")
+ private String approver;
- /**
- * 贷款信息表id
- */
- private Integer dgApplyAmountInfoId;
-
- /**
- * 部门名称
- */
+ @ApiModelProperty(value = "部门名称")
private String deptName;
- /**
- * 时间
- */
- private Date dateTime;
+ @ApiModelProperty(value = "通过时间")
+ @TableField(fill = FieldFill.INSERT)
+ private Date createTime;
- /**
- * 状态
- */
+ @ApiModelProperty(value = "状态")
private String status;
- /**
- * 审批人
- */
- private String empName;
-
- /**
- * 审批意见
- */
- private String remark;
+ @ApiModelProperty(value = "审批意见")
+ private String auditOpinion;
}
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);
}
}