Merge remote-tracking branch 'origin/master'

master
chen 4 years ago
commit 82519e2b68
  1. 99
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgMessageInvestigationController.java
  2. 6
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgMessageInvestigationMapper.java
  3. 24
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApprovalMessageRequest.java
  4. 28
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateMessageRequest.java
  5. 26
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/MessageInvestigationRequest.java
  6. 25
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/MessageRequest.java
  7. 41
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/MessageDetailResponse.java
  8. 107
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/MessageInvestigationListResponse.java
  9. 17
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgMessageInvestigationService.java
  10. 15
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
  11. 233
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java
  12. 29
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgMessageInvestigationMapper.xml
  13. 30
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgMessageInvestigation.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;
/**
* <p>
@ -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<String> roleIdlist = Arrays.asList(ids);
data = dgMessageInvestigationService.queryPage(page, size, CustomerNumberOrName, roleIdlist, userId, status);
}
return new ResponseResult<PageUtils>().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,"审核失败!");
}
}

@ -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;
/**
* <p>
* 信息调查 Mapper 接口
@ -15,4 +20,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface DgMessageInvestigationMapper extends BaseMapper<DgMessageInvestigation> {
IPage<MessageInvestigationListResponse> pageByCondition(Page page, String customerNumberOrName, List<String> roleIdlist, String userId, Integer status);
}

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

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

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

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

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

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

@ -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;
/**
* <p>
@ -13,4 +21,13 @@ import com.daqing.framework.domain.guarantee.DgMessageInvestigation;
*/
public interface IDgMessageInvestigationService extends IService<DgMessageInvestigation> {
PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List<String> roleIdlist, String userId, Integer status);
Boolean assignCorners(MessageRequest messageRequest);
MessageDetailResponse messageDetail(Integer id);
int investigateMessage(InvestigateMessageRequest investigateMessageRequest);
int approvalMessage(ApprovalMessageRequest approvalMessageRequest);
}

@ -116,9 +116,6 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
crmsCustomerRelated.setRelatedId(businessApplication.getRelatedId());//关联人/企业id
crmsFeignService.insertCustomerRelated(crmsCustomerRelated);
String str = ArrayUtils.toString(businessApplication.getAccountingFirm(),",");
System.out.println("str======================="+str);
//上传附件信息
DgEnclosureInfo dgEnclosureInfo = new DgEnclosureInfo();
dgEnclosureInfo.setBusinessId(dgApplyAmountInfo.getId());//业务id
@ -260,6 +257,18 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
dgApplyAmountInfo.setUpdateTime(new Date());
//根据业务id修改申请贷款信息
this.baseMapper.updateById(dgApplyAmountInfo);
//业务申请重新绑定关联人
//修改是否存在关联人
crmsFeignService.updateIsExistRelated(businessApplication.getCompanyId(),businessApplication.getIsExistRelated());
//绑定关联关系
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated();
crmsCustomerRelated.setCustomerId(dgApplyAmountInfo.getCompanyId());//企业id
crmsCustomerRelated.setRelatedId(businessApplication.getRelatedId());//关联人/企业id
crmsFeignService.insertCustomerRelated(crmsCustomerRelated);
//上传附件信息
DgEnclosureInfo dgEnclosureInfo = new DgEnclosureInfo();
dgEnclosureInfo.setBusinessId(businessApplication.getId());//业务id

@ -1,10 +1,34 @@
package com.daqing.financial.guarantee.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.daqing.financial.guarantee.feign.CrmsFeignService;
import com.daqing.financial.guarantee.feign.HrmsFeignService;
import com.daqing.financial.guarantee.mapper.DgApplyAmountInfoMapper;
import com.daqing.financial.guarantee.mapper.DgEnclosureInfoMapper;
import com.daqing.financial.guarantee.mapper.DgMessageInvestigationMapper;
import com.daqing.financial.guarantee.model.request.ApprovalMessageRequest;
import com.daqing.financial.guarantee.model.request.InvestigateMessageRequest;
import com.daqing.financial.guarantee.model.request.MessageRequest;
import com.daqing.financial.guarantee.model.response.*;
import com.daqing.financial.guarantee.service.IDgMessageInvestigationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.framework.domain.guarantee.DgMessageInvestigation;
import com.daqing.financial.guarantee.util.ArraysUtil;
import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
import com.daqing.framework.domain.guarantee.*;
import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.PageUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
/**
* <p>
@ -17,4 +41,211 @@ import org.springframework.stereotype.Service;
@Service
public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInvestigationMapper, DgMessageInvestigation> 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<String> roleIdlist, String userId, Integer status) {
//分页参数
if (page <= 0) {
page = 1;
}
if (size <= 0) {
size = 10;
}
IPage<MessageInvestigationListResponse> 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<String> 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());
List<String>list = 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<list.size();i++){
List<String> 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<String>) arr1List2.get(0));
dgEnclosureInfo.setAssessmentReportList((List<String>) arr1List2.get(1));
dgEnclosureInfo.setBusinessLicenseList((List<String>) arr1List2.get(2));
dgEnclosureInfo.setCertificateAuthorizationList((List<String>) arr1List2.get(3));
dgEnclosureInfo.setCompanyConstitutionList((List<String>) arr1List2.get(4));
dgEnclosureInfo.setCompanyCreditList((List<String>) arr1List2.get(5));
dgEnclosureInfo.setConversationSummaryList((List<String>) arr1List2.get(6));
dgEnclosureInfo.setCreditReportList((List<String>) arr1List2.get(7));
dgEnclosureInfo.setInspectionPhotosList((List<String>) arr1List2.get(8));
dgEnclosureInfo.setLegalCardCopyList((List<String>) arr1List2.get(9));
dgEnclosureInfo.setLegalCopyList((List<String>) arr1List2.get(10));
dgEnclosureInfo.setTaxCertificateList((List<String>) arr1List2.get(11));
dgEnclosureInfo.setMeetingMinutesList((List<String>) arr1List2.get(12));
dgEnclosureInfo.setMarriageCopyList((List<String>) 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<DgMessageInvestigation>()
.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;
}
}

@ -7,6 +7,10 @@
<id column="id" property="id" />
<result column="company_id" property="companyId" />
<result column="emp_id" property="empId" />
<result column="business_id" property="businessId" />
<result column="role_id" property="roleId" />
<result column="type" property="type" />
<result column="operating_status" property="operatingStatus" />
<result column="file" property="file" />
<result column="remark" property="remark" />
<result column="status" property="status" />
@ -14,4 +18,29 @@
<result column="update_time" property="updateTime" />
</resultMap>
<select id="pageByCondition" resultType="com.daqing.financial.guarantee.model.response.MessageInvestigationListResponse">
select au.id,au.company_id,au.business_id,ai.business_code,ai.business_type,ai.apply_amount,ai.apply_time,au.create_time,
au.status,au.operating_status,cc.name,cc.phone,ps.business_status
from dg_message_investigation au
left join dg_apply_amount_info ai on au.business_id = ai.id
left join crms_company_customer ccl on ai.company_id = ccl.id
left join crms_customer cc on cc.id = ccl.customer_id
left JOIN dg_business_process_status ps ON ps.business_id = au.business_id
<where>
au.role_id in
<foreach collection="roleIdlist" open="(" separator="," close=")" item="id">
#{id}
</foreach>
<if test="customerNumberOrName != null and customerNumberOrName != ''">
AND (ai.business_code LIKE CONCAT('%',#{customerNumberOrName},'%') OR cc.name LIKE CONCAT('%',#{customerNumberOrName},'%'))
</if>
<if test="status != null">
AND au.status = #{status}
</if>
<if test="userId != null and userId != ''">
AND (au.emp_id =#{userId} or au.emp_id is null)
</if>
</where>
</select>
</mapper>

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

Loading…
Cancel
Save