From 6c7d9ddea70063603d23cb8e49607f0284e5d5b4 Mon Sep 17 00:00:00 2001
From: shijie <648688341@qq.com>
Date: Tue, 24 Nov 2020 09:25:29 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=83=A8=E8=B0=83=E6=9F=A5?=
=?UTF-8?q?=E6=A8=A1=E5=9D=97=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../DgMessageInvestigationController.java | 99 +++++++-
.../mapper/DgMessageInvestigationMapper.java | 6 +
.../model/request/ApprovalMessageRequest.java | 24 ++
.../request/InvestigateMessageRequest.java | 28 +++
.../request/MessageInvestigationRequest.java | 26 ++
.../model/request/MessageRequest.java | 25 ++
.../model/response/MessageDetailResponse.java | 41 +++
.../MessageInvestigationListResponse.java | 107 ++++++++
.../IDgMessageInvestigationService.java | 17 ++
.../impl/DgApplyAmountInfoServiceImpl.java | 15 +-
.../DgMessageInvestigationServiceImpl.java | 233 +++++++++++++++++-
.../DgMessageInvestigationMapper.xml | 29 +++
.../guarantee/DgMessageInvestigation.java | 30 ++-
13 files changed, 669 insertions(+), 11 deletions(-)
create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApprovalMessageRequest.java
create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateMessageRequest.java
create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/MessageInvestigationRequest.java
create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/MessageRequest.java
create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/MessageDetailResponse.java
create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/MessageInvestigationListResponse.java
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgMessageInvestigationController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgMessageInvestigationController.java
index f47da1d3..0ae29604 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgMessageInvestigationController.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgMessageInvestigationController.java
@@ -1,9 +1,21 @@
package com.daqing.financial.guarantee.controller;
-import org.springframework.web.bind.annotation.RequestMapping;
+import com.daqing.financial.guarantee.model.request.*;
+import com.daqing.financial.guarantee.model.response.AssetsDetailResponse;
+import com.daqing.financial.guarantee.model.response.MessageDetailResponse;
+import com.daqing.financial.guarantee.service.IDgMessageInvestigationService;
+import com.daqing.framework.model.response.ResponseResult;
+import com.daqing.framework.util.RedisUtil;
+import com.daqing.framework.utils.PageUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
-import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+import java.util.Arrays;
+import java.util.List;
/**
*
@@ -13,8 +25,91 @@ import org.springframework.web.bind.annotation.RestController;
* @author Qyq
* @since 2020-11-05
*/
+@Api(tags = {"信息部调查信息"})
@RestController
@RequestMapping("/dg-message-investigation")
public class DgMessageInvestigationController {
+ @Resource
+ private IDgMessageInvestigationService dgMessageInvestigationService;
+
+ /**
+ * 信息部调查列表
+ * @param
+ * @return
+ */
+ @GetMapping("/messageList")
+ @ApiOperation(value = "信息部调查列表")
+ public ResponseResult messageList(MessageInvestigationRequest messageInvestigationRequest){
+ Integer page=messageInvestigationRequest.getPage();
+ Integer size=messageInvestigationRequest.getSize();
+ String CustomerNumberOrName=messageInvestigationRequest.getCustomerNumberOrName();
+ Integer status=messageInvestigationRequest.getStatus();
+
+ //获取当前登录用户userId
+ //String userId = dgApplyAmountInfoController.getUserId();
+ String userId = "5";
+ //根据角色查询担保部调查列表
+ String roleIds = RedisUtil.get("dq:userRole:" + userId);
+ PageUtils data = null;
+ if(roleIds != null) {
+ String[] ids = roleIds.split(",");
+ List roleIdlist = Arrays.asList(ids);
+
+ data = dgMessageInvestigationService.queryPage(page, size, CustomerNumberOrName, roleIdlist, userId, status);
+ }
+ return new ResponseResult().SUCCESS(data);
+ }
+
+ /**
+ * 指派信息部调查员
+ * @param
+ * @return
+ */
+ @PostMapping("/assignCorners")
+ @ApiOperation(value = "指派信息部调查员")
+ @Transactional
+ public ResponseResult assignCorners(@RequestBody MessageRequest messageRequest){
+
+ Boolean b = dgMessageInvestigationService.assignCorners(messageRequest);
+ return new ResponseResult<>().SUCCESS(b);
+ }
+
+ /**
+ * 根据信息部id查询信息部记录详情
+ * @param id
+ * @return
+ */
+ @GetMapping("/messageDetail")
+ @ApiOperation(value = "查看详情")
+ public ResponseResult messageDetail(Integer id){
+ MessageDetailResponse response = dgMessageInvestigationService.messageDetail(id);
+ return ResponseResult.SUCCESS(response);
+ }
+
+ /**
+ * 根据信息部id调查信息部记录
+ * @param investigateMessageRequest
+ * @return
+ */
+ @PostMapping("/investigateMessage")
+ @ApiOperation(value = "调查")
+ public ResponseResult investigateMessage(@RequestBody InvestigateMessageRequest investigateMessageRequest){
+ int result = dgMessageInvestigationService.investigateMessage(investigateMessageRequest);
+ return result>0 ? ResponseResult.SUCCESS("调查成功!"):ResponseResult.FAIL(41001,"调查失败!");
+ }
+
+
+ /**
+ * 根据信息部id审核信息部记录,包括信息部经理审核以及信息部分管领导审核
+ * @param approvalMessageRequest
+ * @return
+ */
+ @PostMapping("/approvalMessage")
+ @ApiOperation(value = "审核")
+ public ResponseResult approvalMessage(@RequestBody ApprovalMessageRequest approvalMessageRequest){
+ int result = dgMessageInvestigationService.approvalMessage(approvalMessageRequest);
+ return result>0 ? ResponseResult.SUCCESS("审核成功!"):ResponseResult.FAIL(41002,"审核失败!");
+ }
+
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgMessageInvestigationMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgMessageInvestigationMapper.java
index 145103e7..12ac7761 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgMessageInvestigationMapper.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgMessageInvestigationMapper.java
@@ -1,9 +1,14 @@
package com.daqing.financial.guarantee.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.daqing.financial.guarantee.model.response.MessageInvestigationListResponse;
import com.daqing.framework.domain.guarantee.DgMessageInvestigation;
import org.apache.ibatis.annotations.Mapper;
+import java.util.List;
+
/**
*
* 信息调查 Mapper 接口
@@ -15,4 +20,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface DgMessageInvestigationMapper extends BaseMapper {
+ IPage pageByCondition(Page page, String customerNumberOrName, List roleIdlist, String userId, Integer status);
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApprovalMessageRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApprovalMessageRequest.java
new file mode 100644
index 00000000..10ca038b
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApprovalMessageRequest.java
@@ -0,0 +1,24 @@
+package com.daqing.financial.guarantee.model.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * @Author chen
+ * @DATE 2020/11/12 17:14
+ * @Version 1.0
+ */
+@Data
+public class ApprovalMessageRequest {
+
+ @ApiModelProperty(value = "主键id")
+ private Integer id;
+
+ @ApiModelProperty(value = "状态")
+ private Integer status;
+
+ @ApiModelProperty(value = "审核意见")
+ private String remark;
+}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateMessageRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateMessageRequest.java
new file mode 100644
index 00000000..272ed346
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateMessageRequest.java
@@ -0,0 +1,28 @@
+package com.daqing.financial.guarantee.model.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @Author chen
+ * @DATE 2020/11/12 17:14
+ * @Version 1.0
+ */
+@Data
+public class InvestigateMessageRequest {
+
+ @ApiModelProperty(value = "主键id")
+ private Integer id;
+
+ @ApiModelProperty(value = "状态 0:待指派;1:审核中;2:已审核;3:拒绝;4:驳回;5:已撤销;6:草稿;")
+ private Integer status;
+
+ @ApiModelProperty(value = "审核意见")
+ private String remark;
+
+ @ApiModelProperty(value = "附件")
+ private String[] file;
+
+
+
+}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/MessageInvestigationRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/MessageInvestigationRequest.java
new file mode 100644
index 00000000..0e395813
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/MessageInvestigationRequest.java
@@ -0,0 +1,26 @@
+package com.daqing.financial.guarantee.model.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 信息调查列表请求参数
+ */
+@Data
+public class MessageInvestigationRequest {
+
+ @ApiModelProperty(value = "页数")
+ private Integer page;
+
+ @ApiModelProperty(value = "页长")
+ private Integer size;
+
+ @ApiModelProperty(value = "业务编号/客户名称")
+ private String CustomerNumberOrName;
+
+ @ApiModelProperty(value = "流程状态")
+ private Integer status;
+
+}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/MessageRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/MessageRequest.java
new file mode 100644
index 00000000..6bb3202c
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/MessageRequest.java
@@ -0,0 +1,25 @@
+package com.daqing.financial.guarantee.model.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @Author chen
+ * @DATE 2020/11/12 17:14
+ * @Version 1.0
+ */
+@Data
+public class MessageRequest {
+
+ @ApiModelProperty(value = "主键id")
+ private Integer id;
+
+ @ApiModelProperty(value = "业务id")
+ private Integer businessId;
+
+ @ApiModelProperty(value = "企业id")
+ private Integer companyId;
+
+ @ApiModelProperty(value = "被指派信息部调查专员id")
+ private Integer empId;
+}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/MessageDetailResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/MessageDetailResponse.java
new file mode 100644
index 00000000..ef6705b8
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/MessageDetailResponse.java
@@ -0,0 +1,41 @@
+package com.daqing.financial.guarantee.model.response;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.ToString;
+
+import java.io.Serializable;
+import java.util.LinkedHashMap;
+
+@Data
+@ToString
+public class MessageDetailResponse implements Serializable {
+
+ /**
+ * 主键id
+ */
+ @ApiModelProperty(value = "id")
+ @TableId(value = "id", type = IdType.AUTO)
+ private Integer id;
+
+ /**
+ * 业务申请详细
+ */
+ @ApiModelProperty(value = "业务申请详细")
+ private DgApplyAmountInfoResponse dgApplyAmountInfo;
+
+ /**
+ * 企业详细
+ */
+ @ApiModelProperty(value = "企业详细")
+ private LinkedHashMap linkedHashMap;
+
+ /**
+ * 附件详细
+ */
+ @ApiModelProperty(value = "附件详细")
+ private DgEnclosureInfoResponse dgEnclosureInfo;
+
+}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/MessageInvestigationListResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/MessageInvestigationListResponse.java
new file mode 100644
index 00000000..09fc2b01
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/MessageInvestigationListResponse.java
@@ -0,0 +1,107 @@
+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.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 MessageInvestigationListResponse extends BaseRowModel implements Serializable {
+
+ /**
+ * 主键id
+ */
+ @ApiModelProperty(value = "id")
+ @TableId(value = "id", type = IdType.AUTO)
+ private Integer id;
+ /**
+ * 业务id
+ */
+ @ApiModelProperty(value = "业务id")
+ private Integer businessId;
+ /**
+ * 企业id
+ */
+ @ApiModelProperty(value = "企业id")
+ private Integer companyId;
+
+ /**
+ * 申请额度
+ */
+ @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;
+
+ /**
+ * 业务类型
+ */
+ @ExcelProperty(value = "业务类别",index = 3)
+ @ApiModelProperty(value = "业务类型")
+ private String businessType;
+
+ /**
+ * 业务编号
+ */
+ @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 = 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/service/IDgMessageInvestigationService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgMessageInvestigationService.java
index b0738851..5d90cc7b 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgMessageInvestigationService.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgMessageInvestigationService.java
@@ -1,7 +1,15 @@
package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.daqing.financial.guarantee.model.request.ApprovalMessageRequest;
+import com.daqing.financial.guarantee.model.request.AssetsInvestigationRequest;
+import com.daqing.financial.guarantee.model.request.InvestigateMessageRequest;
+import com.daqing.financial.guarantee.model.request.MessageRequest;
+import com.daqing.financial.guarantee.model.response.MessageDetailResponse;
import com.daqing.framework.domain.guarantee.DgMessageInvestigation;
+import com.daqing.framework.utils.PageUtils;
+
+import java.util.List;
/**
*
@@ -13,4 +21,13 @@ import com.daqing.framework.domain.guarantee.DgMessageInvestigation;
*/
public interface IDgMessageInvestigationService extends IService {
+ PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List roleIdlist, String userId, Integer status);
+
+ Boolean assignCorners(MessageRequest messageRequest);
+
+ MessageDetailResponse messageDetail(Integer id);
+
+ int investigateMessage(InvestigateMessageRequest investigateMessageRequest);
+
+ int approvalMessage(ApprovalMessageRequest approvalMessageRequest);
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
index 41a0e5eb..148c8b14 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
@@ -116,9 +116,6 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl
@@ -17,4 +41,211 @@ import org.springframework.stereotype.Service;
@Service
public class DgMessageInvestigationServiceImpl extends ServiceImpl implements IDgMessageInvestigationService {
+ @Resource
+ private DgMessageInvestigationMapper dgMessageInvestigationMapper;
+
+ @Resource
+ private HrmsFeignService hrmsFeignService;
+
+ @Resource
+ private DgApplyAmountInfoMapper dgApplyAmountInfoMapper;
+
+ @Resource
+ private CrmsFeignService crmsFeignService;
+
+ @Resource
+ private DgEnclosureInfoMapper dgEnclosureInfoMapper;
+
+ @Override
+ public PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List roleIdlist, String userId, Integer status) {
+ //分页参数
+ if (page <= 0) {
+ page = 1;
+ }
+ if (size <= 0) {
+ size = 10;
+ }
+ IPage positionVO = this.getBaseMapper().pageByCondition(new Page(page, size),customerNumberOrName,roleIdlist,userId,status);
+
+ return new PageUtils(positionVO);
+ }
+
+ @Transactional
+ @Override
+ public Boolean assignCorners(MessageRequest messageRequest) {
+
+ //根据主键id修改当前记录状态为审核中,操作状态为已处理,设置审批人id为当前用户id
+ //获取当前登录用户userId
+ //String userId = dgApplyAmountInfoController.getUserId();
+ String userId ="5";
+ DgMessageInvestigation dgMessageInvestigation = new DgMessageInvestigation();
+ dgMessageInvestigation.setStatus(StatusCode.SP_IN_REVIEW);//状态设置为审核中
+ dgMessageInvestigation.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
+ dgMessageInvestigation.setEmpId(Integer.parseInt(userId));
+ dgMessageInvestigation.setId(messageRequest.getId());
+ dgMessageInvestigationMapper.updateById(dgMessageInvestigation);
+
+ //新增信息部调查员记录到信息部记录表
+ DgMessageInvestigation messageInvestigation = new DgMessageInvestigation();
+ messageInvestigation.setBusinessId(messageRequest.getBusinessId());//业务id
+ messageInvestigation.setCompanyId(messageRequest.getCompanyId());//企业id
+ messageInvestigation.setEmpId(messageRequest.getEmpId());//信息部调查员id
+ messageInvestigation.setRoleId(PromptSuccess.ZC_ZY_ID);//角色设置为信息部专员
+ messageInvestigation.setType(1);//专员操作
+ messageInvestigation.setStatus(StatusCode.SP_IN_REVIEW);//审批状态为审核中
+ messageInvestigation.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
+ dgMessageInvestigationMapper.insert(messageInvestigation);
+
+ //绑定角色关系
+ hrmsFeignService.insertUserRole(messageRequest.getEmpId().longValue(),PromptSuccess.XX_ZY_ID.longValue());
+
+ return true;
+ }
+
+ @Transactional
+ @Override
+ public MessageDetailResponse messageDetail(Integer id) {
+ //根据主键id查询业务id
+ DgMessageInvestigation dgMessageInvestigation = this.getBaseMapper().selectById(id);
+
+ //根据业务id查询业务申请详细信息
+ DgApplyAmountInfoResponse dgApplyAmountInfo = dgApplyAmountInfoMapper.selectApplyAmountInfoById(dgMessageInvestigation.getBusinessId());
+ String measures=dgApplyAmountInfo.getEnGuaranteeMeasures();
+ if(measures.length()>0){
+ String a = measures.substring(1,measures.length()-1);
+ String arry[]=a.split(",");
+ List demoList = Arrays.asList(arry);
+ dgApplyAmountInfo.setEnGuaranteeMeasure(demoList);
+ System.out.println("arry==============="+demoList);
+ }
+
+ System.out.println("业务申请详细========="+dgApplyAmountInfo);
+
+ DgApplyAmountInfoRequest applyAmountInfo = new DgApplyAmountInfoRequest();
+ applyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId());
+ //根据企业id查询企业详情
+ ResponseResult result = crmsFeignService.queryCustomerInfoById(applyAmountInfo);
+
+ LinkedHashMap linkedList = (LinkedHashMap)result.getData();
+ System.out.println("企业详细============"+linkedList);
+
+ //查询附件详细,附件关联业务主键id
+ DgEnclosureInfoResponse dgEnclosureInfo = dgEnclosureInfoMapper.selectByCompanyId(dgMessageInvestigation.getBusinessId());
+
+ Listlist = new ArrayList<>();
+ list.add(dgEnclosureInfo.getAccountingFirm());
+ list.add(dgEnclosureInfo.getAssessmentReport());
+ list.add(dgEnclosureInfo.getBusinessLicense());
+ list.add(dgEnclosureInfo.getCertificateAuthorization());
+ list.add(dgEnclosureInfo.getCompanyConstitution());
+ list.add(dgEnclosureInfo.getCompanyCredit());
+ list.add(dgEnclosureInfo.getConversationSummary());
+ list.add(dgEnclosureInfo.getCreditReport());
+ list.add(dgEnclosureInfo.getInspectionPhotos());
+ list.add(dgEnclosureInfo.getLegalCardCopy());
+ list.add(dgEnclosureInfo.getLegalCopy());
+ list.add(dgEnclosureInfo.getTaxCertificate());
+ list.add(dgEnclosureInfo.getMeetingMinutes());
+ list.add(dgEnclosureInfo.getMarriageCopy());
+
+ List arr1List2 = new ArrayList<>();
+
+ for(int i=0;i arr1List;
+ if(list.get(i)!=null){
+ String a1 = list.get(i).substring(1,list.get(i).length()-1);
+ String arr1[]=a1.split(",");
+ arr1List = Arrays.asList(arr1);
+ arr1List2.add(i,arr1List);
+ System.out.println("arr1LIst===="+arr1List);
+ }else{
+ arr1List2.add(i,null);
+ }
+ }
+ dgEnclosureInfo.setAccountingFirmList((List) arr1List2.get(0));
+ dgEnclosureInfo.setAssessmentReportList((List) arr1List2.get(1));
+ dgEnclosureInfo.setBusinessLicenseList((List) arr1List2.get(2));
+ dgEnclosureInfo.setCertificateAuthorizationList((List) arr1List2.get(3));
+ dgEnclosureInfo.setCompanyConstitutionList((List) arr1List2.get(4));
+ dgEnclosureInfo.setCompanyCreditList((List) arr1List2.get(5));
+ dgEnclosureInfo.setConversationSummaryList((List) arr1List2.get(6));
+ dgEnclosureInfo.setCreditReportList((List) arr1List2.get(7));
+ dgEnclosureInfo.setInspectionPhotosList((List) arr1List2.get(8));
+ dgEnclosureInfo.setLegalCardCopyList((List) arr1List2.get(9));
+ dgEnclosureInfo.setLegalCopyList((List) arr1List2.get(10));
+ dgEnclosureInfo.setTaxCertificateList((List) arr1List2.get(11));
+ dgEnclosureInfo.setMeetingMinutesList((List) arr1List2.get(12));
+ dgEnclosureInfo.setMarriageCopyList((List) arr1List2.get(13));
+
+ System.out.println("附件详细=============="+dgEnclosureInfo);
+ MessageDetailResponse messageDetailResponse= new MessageDetailResponse();
+ messageDetailResponse.setDgApplyAmountInfo(dgApplyAmountInfo);
+ messageDetailResponse.setDgEnclosureInfo(dgEnclosureInfo);
+ messageDetailResponse.setLinkedHashMap(linkedList);
+ return messageDetailResponse;
+ }
+
+ @Transactional
+ @Override
+ public int investigateMessage(InvestigateMessageRequest investigateMessageRequest) {
+ //根据主键id查询业务id
+ DgMessageInvestigation messageInvestigation = this.getBaseMapper().selectById(investigateMessageRequest.getId());
+
+ //AB角调查,修改审核意见以及状态
+ DgMessageInvestigation dgMessageInvestigation = new DgMessageInvestigation();
+ dgMessageInvestigation.setId(investigateMessageRequest.getId());//主键id
+ dgMessageInvestigation.setStatus(investigateMessageRequest.getStatus());//状态
+ dgMessageInvestigation.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
+ dgMessageInvestigation.setRemark(investigateMessageRequest.getRemark());//审核意见
+ dgMessageInvestigation.setFile(ArraysUtil.toString(investigateMessageRequest.getFile()));
+ this.baseMapper.updateById(dgMessageInvestigation);
+
+ //判断信息部专员是否调查通过,如果通过,修改信息部经理操作状态为待处理
+ if(investigateMessageRequest.getStatus()==StatusCode.SP_IN_REVIEW ){
+ DgMessageInvestigation messageInvestigation2 = new DgMessageInvestigation();
+ messageInvestigation2.setOperatingStatus(StatusCode.CZ_ON_HAND);
+ this.baseMapper.update(messageInvestigation2,new QueryWrapper()
+ .eq("business_id",messageInvestigation.getBusinessId())
+ .eq("type",2));
+ }
+
+ return 1;
+ }
+
+ @Transactional
+ @Override
+ public int approvalMessage(ApprovalMessageRequest approvalMessageRequest) {
+
+ DgMessageInvestigation dgMessageInvestigation = new DgMessageInvestigation();
+ dgMessageInvestigation.setId(approvalMessageRequest.getId());
+ dgMessageInvestigation.setEmpId(5);//Integer.parseInt(dgApplyAmountInfoController.getUserId())
+ dgMessageInvestigation.setStatus(approvalMessageRequest.getStatus());//状态
+ dgMessageInvestigation.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
+ dgMessageInvestigation.setRemark(approvalMessageRequest.getRemark());//审核意见
+ //根据主键id修改信息部记录
+ this.baseMapper.updateById(dgMessageInvestigation);
+
+ //根据主键id查询信息部记录
+ DgMessageInvestigation messageInvestigation = this.baseMapper.selectById(approvalMessageRequest.getId());
+
+ //如果信息部经理审核通过,则往信息部分管领导处加一条记录,由分管领导审核
+ if(approvalMessageRequest.getStatus()==StatusCode.SP_IN_REVIEW && messageInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && messageInvestigation.getType()==2){//信息部经理审核通过
+ //根据主键id查询业务id
+ DgMessageInvestigation messageInvestigation2 = this.getBaseMapper().selectById(approvalMessageRequest.getId());
+
+ DgMessageInvestigation message = new DgMessageInvestigation();
+ message.setBusinessId(messageInvestigation2.getBusinessId());
+ message.setCompanyId(messageInvestigation2.getCompanyId());
+ message.setRoleId(PromptSuccess.XX_LD_ID);//担保部分管领导
+ message.setType(3);//分管领导审核
+ message.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中
+ message.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
+ this.baseMapper.insert(message);
+ }
+
+ //如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
+ //待完善
+
+ return 1;
+ }
}
diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgMessageInvestigationMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgMessageInvestigationMapper.xml
index a3536471..e46c786f 100644
--- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgMessageInvestigationMapper.xml
+++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgMessageInvestigationMapper.xml
@@ -7,6 +7,10 @@
+
+
+
+
@@ -14,4 +18,29 @@
+
+
diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgMessageInvestigation.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgMessageInvestigation.java
index ffc9fc44..f9f7372b 100644
--- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgMessageInvestigation.java
+++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgMessageInvestigation.java
@@ -27,6 +27,11 @@ public class DgMessageInvestigation implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
+ /**
+ * 业务id
+ */
+ private Integer businessId;
+
/**
* 企业id
*/
@@ -38,20 +43,35 @@ public class DgMessageInvestigation implements Serializable {
private Integer empId;
/**
- * 附件
+ * 角色id
*/
- private String file;
+ private Integer roleId;
/**
- * 审核意见
+ * 类型(1->信息部调查员审核;2->信息部经理审核;3->分管领导审核)
*/
- private String remark;
+ private Integer type;
/**
- * 审核状态
+ * 状态 0:待指派;1:审核中;2:已审核;3:拒绝;4:驳回;5:已撤销;6:草稿;
*/
private Integer status;
+ /**
+ * 操作状态: 0->已发起;1->待处理;2->已处理;
+ */
+ private Integer operatingStatus;
+
+ /**
+ * 附件
+ */
+ private String file;
+
+ /**
+ * 审核意见
+ */
+ private String remark;
+
@ApiModelProperty(value = "创建时间")
@TableField(fill = FieldFill.INSERT)
private Date createTime;