完善功能

master
chen 4 years ago
parent 9820e9aa56
commit bdedfebbb9
  1. 11
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java
  2. 24
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgBusinessProcessStatusController.java
  3. 12
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java
  4. 0
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgProcessController.java
  5. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAuditProcessMapper.java
  6. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgGuaranteeLetterAssignUserMapper.java
  7. 18
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeLetterListResponse.java
  8. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgAuditProcessService.java
  9. 6
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeLetterAssignUserService.java
  10. 8
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAuditProcessServiceImpl.java
  11. 19
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java
  12. 37
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/AuditProcessUtil.java
  13. 17
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAuditProcessMapper.xml
  14. 16
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml
  15. 49
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAuditProcess.java
  16. 2
      dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/EasyExcelUtil.java

@ -1,9 +1,8 @@
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.domain.guarantee.DgAuditProcess;
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;
@ -14,6 +13,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/** /**
* <p> * <p>
* 审核流程进程 前端控制器 * 审核流程进程 前端控制器
@ -29,13 +30,13 @@ public class DgAuditProcessController {
@Autowired @Autowired
private IDgAuditProcessService auditProcessService; private IDgAuditProcessService auditProcessService;
@ApiOperation(value = "审核流程进程列表") @ApiOperation(value = "审核流程进程列表",response = DgAuditProcess.class)
@GetMapping("/auditProcessList") @GetMapping("/auditProcessList")
public ResponseResult processList( public ResponseResult processList(
@ApiParam(name = "businessId", value = "业务id", required = true) @ApiParam(name = "businessId", value = "业务id", required = true)
@RequestParam String businessId){ @RequestParam String businessId){
return ResponseResult.SUCCESS(); List<DgAuditProcess> auditProcessList = auditProcessService.auditProcessList(businessId);
return ResponseResult.SUCCESS(auditProcessList);
} }
} }

@ -1,10 +1,18 @@
package com.daqing.financial.guarantee.controller; 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.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/** /**
* <p> * <p>
@ -18,4 +26,16 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/dg-business-process-status") @RequestMapping("/dg-business-process-status")
public class DgBusinessProcessStatusController { 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();
}
} }

@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@ -48,15 +49,12 @@ public class DgGuaranteeLetterAssignUserController {
@ApiOperation(value = "导出担保函列表数据") @ApiOperation(value = "导出担保函列表数据")
@PostMapping("/guaranteeLetterListExport") @GetMapping("/guaranteeLetterListExport")
public void guaranteeLetterListExport( public void guaranteeLetterListExport(
@ApiParam(name = "guaranteeLetterListRequest", value = "担保函列表数据", required = true) @ApiParam(name = "ids", value = "多个id", required = true)
@RequestBody GuaranteeLetterListRequest guaranteeLetterListRequest, HttpServletResponse response){ @RequestParam("ids") List<String> ids,HttpServletResponse response){
//获取担保函列表数据
List<GuaranteeLetterListResponse> guaranteeLetterListResponseList = guaranteeLetterListRequest.getGuaranteeLetterListResponseList();
try { try {
//导出excel文件 guaranteeLetterAssignUserService.batchExport(response,ids);
EasyExcelUtil.download(response, GuaranteeLetterListResponse.class, guaranteeLetterListResponseList,"担保函列表","第一页");
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }

@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.daqing.framework.domain.guarantee.DgAuditProcess; import com.daqing.framework.domain.guarantee.DgAuditProcess;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/** /**
* <p> * <p>
* 审核流程进程 Mapper 接口 * 审核流程进程 Mapper 接口
@ -15,4 +17,6 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface DgAuditProcessMapper extends BaseMapper<DgAuditProcess> { public interface DgAuditProcessMapper extends BaseMapper<DgAuditProcess> {
List<DgAuditProcess> selectAuditProcessList(String businessId);
} }

@ -23,4 +23,6 @@ public interface DgGuaranteeLetterAssignUserMapper extends BaseMapper<DgGuarante
IPage<GuaranteeLetterListResponse> pageByCondition(Page page, Integer userId, List<String> roleIdList, Integer status, String customerNumberOrName); IPage<GuaranteeLetterListResponse> pageByCondition(Page page, Integer userId, List<String> roleIdList, Integer status, String customerNumberOrName);
List<GuaranteeLetterListResponse> selectBatchData(List<String> ids);
} }

@ -1,5 +1,6 @@
package com.daqing.financial.guarantee.model.response; package com.daqing.financial.guarantee.model.response;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.daqing.framework.utils.excel.ApprovalStatusConverter; import com.daqing.framework.utils.excel.ApprovalStatusConverter;
import com.daqing.framework.utils.excel.BusinessStatusConverter; import com.daqing.framework.utils.excel.BusinessStatusConverter;
@ -19,20 +20,29 @@ import java.util.Date;
@Data @Data
public class GuaranteeLetterListResponse { public class GuaranteeLetterListResponse {
@ExcelIgnore
@ApiModelProperty("法规经理唯一标识")
private Integer isFgJl;
@ExcelIgnore
@ApiModelProperty("唯一标识") @ApiModelProperty("唯一标识")
private Integer id; private Integer id;
@ExcelIgnore
@ApiModelProperty("银行名称") @ApiModelProperty("银行名称")
private String bank; private String bank;
@ExcelIgnore
@ApiModelProperty(value = "审核意见") @ApiModelProperty(value = "审核意见")
private String auditOpinion; private String auditOpinion;
@ExcelIgnore
@ApiModelProperty("贷审会同意时间") @ApiModelProperty("贷审会同意时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date passingTime; private Date passingTime;
@ApiModelProperty("附件(会议记录)") @ApiModelProperty("附件(会议记录)")
@ExcelIgnore
private String file; private String file;
@ApiModelProperty("业务编号") @ApiModelProperty("业务编号")
@ -51,12 +61,12 @@ public class GuaranteeLetterListResponse {
@ExcelProperty(value = "业务类别",index = 3) @ExcelProperty(value = "业务类别",index = 3)
private String businessType; private String businessType;
@ApiModelProperty("金额") @ApiModelProperty("申请额度")
@ExcelProperty(value = "金额",index = 4) @ExcelProperty(value = "申请额度",index = 4)
private Double loanMoney; private Double loanMoney;
@ApiModelProperty("期限") @ApiModelProperty("申请期限")
@ExcelProperty(value = "期数",index = 5) @ExcelProperty(value = "申请期限",index = 5)
private String loanTern; private String loanTern;
@ApiModelProperty("申请日期") @ApiModelProperty("申请日期")

@ -3,6 +3,8 @@ package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.framework.domain.guarantee.DgAuditProcess; import com.daqing.framework.domain.guarantee.DgAuditProcess;
import java.util.List;
/** /**
* <p> * <p>
* 审核流程进程 服务类 * 审核流程进程 服务类
@ -13,4 +15,6 @@ import com.daqing.framework.domain.guarantee.DgAuditProcess;
*/ */
public interface IDgAuditProcessService extends IService<DgAuditProcess> { public interface IDgAuditProcessService extends IService<DgAuditProcess> {
List<DgAuditProcess> auditProcessList(String businessId);
} }

@ -6,6 +6,10 @@ import com.daqing.financial.guarantee.model.request.GuaranteeLetterUpdateStatusR
import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser; import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser;
import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.PageUtils;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
/** /**
* <p> * <p>
* 担保函记录 服务类 * 担保函记录 服务类
@ -21,4 +25,6 @@ public interface IDgGuaranteeLetterAssignUserService extends IService<DgGuarante
boolean saveGuaranteeLetter(DgGuaranteeLetterAssignUser guaranteeLetterAssignUser); boolean saveGuaranteeLetter(DgGuaranteeLetterAssignUser guaranteeLetterAssignUser);
boolean updateGuaranteeLetterStatus(GuaranteeLetterUpdateStatusRequest guaranteeLetterUpdateStatusRequest); boolean updateGuaranteeLetterStatus(GuaranteeLetterUpdateStatusRequest guaranteeLetterUpdateStatusRequest);
void batchExport(HttpServletResponse response, List<String> ids) throws IOException;
} }

@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.framework.domain.guarantee.DgAuditProcess; import com.daqing.framework.domain.guarantee.DgAuditProcess;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* <p> * <p>
* 审核流程进程 服务实现类 * 审核流程进程 服务实现类
@ -17,4 +19,10 @@ import org.springframework.stereotype.Service;
@Service @Service
public class DgAuditProcessServiceImpl extends ServiceImpl<DgAuditProcessMapper, DgAuditProcess> implements IDgAuditProcessService { public class DgAuditProcessServiceImpl extends ServiceImpl<DgAuditProcessMapper, DgAuditProcess> implements IDgAuditProcessService {
@Override
public List<DgAuditProcess> auditProcessList(String businessId) {
List<DgAuditProcess> auditProcessList = baseMapper.selectAuditProcessList(businessId);
return auditProcessList;
}
} }

@ -18,6 +18,7 @@ import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.PromptSuccess; import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.util.RedisUtil; import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.excel.EasyExcelUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -26,9 +27,11 @@ import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.spi.CurrencyNameProvider;
/** /**
* <p> * <p>
@ -58,6 +61,12 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
return RedisUtil.get("dq:token:"+token); return RedisUtil.get("dq:token:"+token);
} }
@Override
public void batchExport(HttpServletResponse response, List<String> ids) throws IOException {
List<GuaranteeLetterListResponse> excelDataList = baseMapper.selectBatchData(ids);
EasyExcelUtil.download(response,GuaranteeLetterListResponse.class,excelDataList,"GuaranteeLetterList","第一页");
}
@Override @Override
public PageUtils queryPage(GuaranteeLetterQueryRequest guaranteeLetterQueryRequest) { public PageUtils queryPage(GuaranteeLetterQueryRequest guaranteeLetterQueryRequest) {
//取出条件 //取出条件
@ -76,8 +85,14 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
List<String> roleIdList = Arrays.asList(ids); List<String> roleIdList = Arrays.asList(ids);
//分页条件查询 //分页条件查询
guaranteeLetterVO = baseMapper.pageByCondition(new Page(page,size),userId,roleIdList,status,customerNumberOrName); guaranteeLetterVO = baseMapper.pageByCondition(new Page(page,size),userId,roleIdList,status,customerNumberOrName);
List<GuaranteeLetterListResponse> records = guaranteeLetterVO.getRecords();
records.forEach(guaranteeLetterListResponse -> {
//角色为法规部经理则设置值
if (roleIdList.contains(PromptSuccess.FG_JL_ID)){
guaranteeLetterListResponse.setIsFgJl(1);
}
});
} }
return new PageUtils(guaranteeLetterVO); return new PageUtils(guaranteeLetterVO);
} }

@ -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() {
}
}

@ -5,14 +5,19 @@
<!-- 通用查询映射结果 --> <!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.daqing.framework.domain.guarantee.DgAuditProcess"> <resultMap id="BaseResultMap" type="com.daqing.framework.domain.guarantee.DgAuditProcess">
<id column="id" property="id" /> <id column="id" property="id" />
<result column="company_id" property="companyId" /> <result column="business_id" property="businessId" />
<result column="emp_id" property="empId" /> <result column="approver" property="approver" />
<result column="dg_apply_amount_info_id" property="dgApplyAmountInfoId"/>
<result column="dept_name" property="deptName"/> <result column="dept_name" property="deptName"/>
<result column="date_time" property="dateTime" /> <result column="create_time" property="createTime" />
<result column="status" property="status" /> <result column="status" property="status" />
<result column="emp_name" property="empName" /> <result column="audit_opinion" property="auditOpinion" />
<result column="remark" property="remark" />
</resultMap> </resultMap>
<select id="selectAuditProcessList" resultMap="BaseResultMap">
select dap.id,dap.business_id,dap.approver,dap.dept_name,dap.create_time,dap.audit_opinion,dbps.business_status as status
from dg_audit_process dap
left join dg_business_process_status dbps on dbps.business_id = dap.business_id
where dap.business_id = #{businessId}
</select>
</mapper> </mapper>

@ -57,4 +57,20 @@
</where> </where>
</select> </select>
<select id="selectBatchData" resultType="com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse">
select lau.id,aai.business_code,cc.name,cc.phone,aai.business_type,lcc.loan_money,lcc.loan_tern,aai.create_time,
lau.status,lau.operating_status,bps.business_status
from dg_guarantee_letter_assign_user lau
left join dg_apply_amount_info aai on lau.business_id = aai.id
left join crms_company_customer ccc on lau.company_id = ccc.id
left join crms_customer cc on ccc.customer_id = cc.id
left join dg_loan_committee_consider lcc on lau.business_id = lcc.business_id
left join dg_business_process_status bps on lau.business_id = bps.business_id
where lau.id in
<foreach collection="list" close=")" open="(" item="id" separator=",">
#{id}
</foreach>
</select>
</mapper> </mapper>

@ -1,8 +1,6 @@
package com.daqing.framework.domain.guarantee; package com.daqing.framework.domain.guarantee;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -23,52 +21,27 @@ public class DgAuditProcess implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** @ApiModelProperty(value = "主键id")
* 主键id
*/
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Integer id; private Integer id;
@ApiModelProperty(value = "业务id") @ApiModelProperty(value = "业务id")
private Integer businessId; private Integer businessId;
/**
* 企业id
*/
private Integer companyId;
/**
* 审批人id
*/
private Integer empId;
/** @ApiModelProperty(value = "审批人")
* 贷款信息表id private String approver;
*/
private Integer dgApplyAmountInfoId;
/** @ApiModelProperty(value = "部门名称")
* 部门名称
*/
private String deptName; private String deptName;
/** @ApiModelProperty(value = "通过时间")
* 时间 @TableField(fill = FieldFill.INSERT)
*/ private Date createTime;
private Date dateTime;
/** @ApiModelProperty(value = "状态")
* 状态
*/
private String status; private String status;
/** @ApiModelProperty(value = "审批意见")
* 审批人 private String auditOpinion;
*/
private String empName;
/**
* 审批意见
*/
private String remark;
} }

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

Loading…
Cancel
Save