list = new ArrayList();
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAssetsAssessmentAssetsLogMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAssetsAssessmentAssetsLogMapper.java
index 59eb0188..c9dc61ac 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAssetsAssessmentAssetsLogMapper.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAssetsAssessmentAssetsLogMapper.java
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.daqing.framework.domain.guarantee.DgAssetsAssessmentAssetsLog;
import org.apache.ibatis.annotations.Mapper;
+import java.util.List;
+
/**
*
* 价值评估记录 Mapper 接口
@@ -15,4 +17,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface DgAssetsAssessmentAssetsLogMapper extends BaseMapper {
+ void insertAssetsList(List assessmentList);
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAssetsInvestigationMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAssetsInvestigationMapper.java
index 13b86ec9..70691771 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAssetsInvestigationMapper.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgAssetsInvestigationMapper.java
@@ -1,18 +1,27 @@
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.AssetsInvestigationListResponse;
+import com.daqing.financial.guarantee.model.response.DgAssetsInvestigationResponse;
import com.daqing.framework.domain.guarantee.DgAssetsInvestigation;
import org.apache.ibatis.annotations.Mapper;
+import java.util.List;
+
/**
*
* 资产调查 Mapper 接口
*
*
* @author Qyq
- * @since 2020-11-05
+ * @since 2020-11-23
*/
@Mapper
public interface DgAssetsInvestigationMapper extends BaseMapper {
+ IPage pageByCondition(Page page, String customerNumberOrName, List roleIdlist, String userId, Integer status);
+
+ DgAssetsInvestigationResponse selectInfoById(Integer id);
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgGuaranteeAssignUserMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgGuaranteeAssignUserMapper.java
index 3d1b033b..15cd7987 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgGuaranteeAssignUserMapper.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgGuaranteeAssignUserMapper.java
@@ -21,5 +21,5 @@ import java.util.List;
@Mapper
public interface DgGuaranteeAssignUserMapper extends BaseMapper {
- IPage pageByCondition(Page page,@Param("customerNumberOrName") String customerNumberOrName,@Param("roleIdlist") List roleIdlist,@Param("userId") String userId);
+ IPage pageByCondition(Page page,@Param("customerNumberOrName") String customerNumberOrName,@Param("roleIdlist") List roleIdlist,@Param("userId") String userId,@Param("status") Integer status);
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApprovalAssetsRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApprovalAssetsRequest.java
new file mode 100644
index 00000000..be382cbe
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApprovalAssetsRequest.java
@@ -0,0 +1,36 @@
+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 ApprovalAssetsRequest {
+
+ @ApiModelProperty(value = "主键id")
+ private Integer id;
+
+ @ApiModelProperty(value = "状态")
+ private Integer status;
+
+ @ApiModelProperty(value = "审核意见")
+ private String applyContent;
+
+ @ApiModelProperty(value = "金额")
+ private BigDecimal amount;
+
+ @ApiModelProperty(value = "期限")
+ private String term;
+
+ @ApiModelProperty(value = "补充原因")
+ private String[] remark;
+
+
+
+}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/AssetsInvestigationRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/AssetsInvestigationRequest.java
new file mode 100644
index 00000000..ca247f9d
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/AssetsInvestigationRequest.java
@@ -0,0 +1,23 @@
+package com.daqing.financial.guarantee.model.request;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 资产调查列表请求参数
+ */
+@Data
+public class AssetsInvestigationRequest {
+
+ @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/AssetsRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/AssetsRequest.java
new file mode 100644
index 00000000..80b7dbdf
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/AssetsRequest.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 AssetsRequest {
+
+ @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/request/InvestigateAssetsRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateAssetsRequest.java
new file mode 100644
index 00000000..f536272f
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateAssetsRequest.java
@@ -0,0 +1,59 @@
+package com.daqing.financial.guarantee.model.request;
+
+import com.daqing.framework.domain.guarantee.DgAssetsAssessmentAssetsLog;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Author chen
+ * @DATE 2020/11/12 17:14
+ * @Version 1.0
+ */
+@Data
+public class InvestigateAssetsRequest {
+
+ @ApiModelProperty(value = "主键id")
+ private Integer id;
+
+ @ApiModelProperty(value = "状态 0:待指派;1:审核中;2:已审核;3:拒绝;4:驳回;5:已撤销;6:草稿;")
+ private Integer status;
+
+ @ApiModelProperty(value = "审核意见")
+ private String applyContent;
+
+ @ApiModelProperty(value = "附件")
+ private String[] file;
+
+ @ApiModelProperty(value = "资产评估报告(名称)")
+ private String assetsName;
+
+ @ApiModelProperty(value = "资产评估报告编号")
+ private String assetsCode;
+
+ @ApiModelProperty(value = "评估日期")
+ private Date assetsTime;
+
+ @ApiModelProperty(value = "合计")
+ private BigDecimal amountSum;
+
+ @ApiModelProperty(value = "审计报告(名称)")
+ private String auditName;
+
+ @ApiModelProperty(value = "审计编号")
+ private String auditCode;
+
+ @ApiModelProperty(value = "审计日期")
+ private Date auditTime;
+
+ @ApiModelProperty(value = "审计价值(万元)")
+ private BigDecimal auditAmount;
+
+ @ApiModelProperty(value = "评估价值列表")
+ private List assessmentList;
+
+
+}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateGuaranteeRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateGuaranteeRequest.java
index 1c928120..06648f3e 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateGuaranteeRequest.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateGuaranteeRequest.java
@@ -16,7 +16,7 @@ public class InvestigateGuaranteeRequest {
@ApiModelProperty(value = "主键id")
private Integer id;
- @ApiModelProperty(value = "状态")
+ @ApiModelProperty(value = "状态 0:待指派;1:审核中;2:已审核;3:拒绝;4:驳回;5:已撤销;6:草稿;")
private Integer status;
@ApiModelProperty(value = "审核意见")
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AssetsDetailResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AssetsDetailResponse.java
new file mode 100644
index 00000000..c9cd22db
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AssetsDetailResponse.java
@@ -0,0 +1,43 @@
+package com.daqing.financial.guarantee.model.response;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.daqing.framework.domain.guarantee.DgAssetsAssessmentAssetsLog;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.ToString;
+
+import java.io.Serializable;
+import java.util.LinkedHashMap;
+import java.util.List;
+
+@Data
+@ToString
+public class AssetsDetailResponse 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 DgAssetsInvestigationResponse assetsResponse;
+
+}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AssetsInvestigationListResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AssetsInvestigationListResponse.java
new file mode 100644
index 00000000..138a8657
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AssetsInvestigationListResponse.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 AssetsInvestigationListResponse 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/model/response/DgAssetsInvestigationResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgAssetsInvestigationResponse.java
new file mode 100644
index 00000000..947d3c79
--- /dev/null
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgAssetsInvestigationResponse.java
@@ -0,0 +1,162 @@
+package com.daqing.financial.guarantee.model.response;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.daqing.framework.domain.guarantee.DgAssetsAssessmentAssetsLog;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+/**
+ *
+ * 资产调查
+ *
+ *
+ * @author Qyq
+ * @since 2020-11-23
+ */
+@Data
+@TableName("dg_assets_investigation")
+public class DgAssetsInvestigationResponse implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键id
+ */
+ @TableId(value = "id", type = IdType.AUTO)
+ private Integer id;
+
+ /**
+ * 业务id
+ */
+ private Integer businessId;
+
+ /**
+ * 企业id
+ */
+ private Integer companyId;
+
+ /**
+ * 调查者id
+ */
+ private Integer empId;
+
+ /**
+ * 角色id
+ */
+ private Integer roleId;
+
+ /**
+ * 类型(1:第一审批人 2:指派人AB角 3:经理)
+ */
+ private Integer type;
+
+ /**
+ * 状态 0:待指派;1:审核中;2:已审核;3:拒绝;4:驳回;5:已撤销;6:草稿;
+ */
+ private Integer status;
+
+ /**
+ * 操作状态: 0->已发起;1->待处理;2->已处理;
+ */
+ private Integer operatingStatus;
+
+ /**
+ * 资产评估报告(名称)
+ */
+ private String assetsName;
+
+ /**
+ * 资产评估报告编号
+ */
+ private String assetsCode;
+
+ /**
+ * 评估日期
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+ private Date assetsTime;
+
+ /**
+ * 合计
+ */
+ private BigDecimal amountSum;
+
+ /**
+ * 审计报告(名称)
+ */
+ private String auditName;
+
+ /**
+ * 审计编号
+ */
+ private String auditCode;
+
+ /**
+ * 审计日期
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+ private Date auditTime;
+
+ /**
+ * 审计价值(万元)
+ */
+ private BigDecimal auditAmount;
+
+ /**
+ * 反担保措施
+ */
+ private String guaranteeMeasures;
+
+ /**
+ * 附件
+ */
+ private String file;
+
+ /**
+ * 附件
+ */
+ private List fileList;
+
+ /**
+ * 审核意见
+ */
+ private String applyContent;
+
+ /**
+ * 审核金额
+ */
+ private BigDecimal amount;
+
+ /**
+ * 期限
+ */
+ private String term;
+
+ /**
+ * 补充调查原因
+ */
+ private String remark;
+
+ /**
+ * 创建时间
+ */
+ @ApiModelProperty(value = "创建时间")
+ @TableField(fill = FieldFill.INSERT)
+ private Date createTime;
+
+ /**
+ * 修改时间
+ */
+ @ApiModelProperty(value = "更新时间")
+ @TableField(fill = FieldFill.INSERT_UPDATE)
+ private Date updateTime;
+
+ @ApiModelProperty(value = "评估价值列表")
+ private List assessmentList;
+}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgAssetsInvestigationService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgAssetsInvestigationService.java
index 35d3591c..44690fd9 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgAssetsInvestigationService.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgAssetsInvestigationService.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.ApprovalAssetsRequest;
+import com.daqing.financial.guarantee.model.request.AssetsRequest;
+import com.daqing.financial.guarantee.model.request.InvestigateAssetsRequest;
+import com.daqing.financial.guarantee.model.response.AssetsDetailResponse;
import com.daqing.framework.domain.guarantee.DgAssetsInvestigation;
+import com.daqing.framework.utils.PageUtils;
+
+import java.util.List;
/**
*
@@ -9,8 +17,17 @@ import com.daqing.framework.domain.guarantee.DgAssetsInvestigation;
*
*
* @author Qyq
- * @since 2020-11-05
+ * @since 2020-11-23
*/
public interface IDgAssetsInvestigationService extends IService {
+ PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List roleIdlist, String userId, Integer status);
+
+ Boolean assignCorners(AssetsRequest assetsRequest);
+
+ AssetsDetailResponse assetsDetail(Integer id);
+
+ int investigateGuarantee(InvestigateAssetsRequest investigateAssetsRequest);
+
+ int approvalAssets(ApprovalAssetsRequest approvalAssetsRequest);
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeAssignUserService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeAssignUserService.java
index cc11e2b8..e3fb55be 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeAssignUserService.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgGuaranteeAssignUserService.java
@@ -19,7 +19,7 @@ import java.util.List;
*/
public interface IDgGuaranteeAssignUserService extends IService {
- PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List roleIdlist, String userId);
+ PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List roleIdlist, String userId, Integer status);
GuaranteeDetailResponse guaranteeDetail(Integer id);
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java
index 4f862513..8ac54d60 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java
@@ -1,10 +1,36 @@
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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController;
+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.DgAssetsAssessmentAssetsLogMapper;
import com.daqing.financial.guarantee.mapper.DgAssetsInvestigationMapper;
+import com.daqing.financial.guarantee.model.request.ApprovalAssetsRequest;
+import com.daqing.financial.guarantee.model.request.AssetsRequest;
+import com.daqing.financial.guarantee.model.request.InvestigateAssetsRequest;
+import com.daqing.financial.guarantee.model.response.*;
import com.daqing.financial.guarantee.service.IDgAssetsInvestigationService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.daqing.financial.guarantee.util.ArraysUtil;
+import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
+import com.daqing.framework.domain.guarantee.DgAssetsAssessmentAssetsLog;
import com.daqing.framework.domain.guarantee.DgAssetsInvestigation;
+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;
/**
*
@@ -12,9 +38,197 @@ import org.springframework.stereotype.Service;
*
*
* @author Qyq
- * @since 2020-11-05
+ * @since 2020-11-23
*/
@Service
public class DgAssetsInvestigationServiceImpl extends ServiceImpl implements IDgAssetsInvestigationService {
+ @Resource
+ private DgApplyAmountInfoController dgApplyAmountInfoController;
+
+ @Resource
+ private DgAssetsInvestigationMapper dgAssetsInvestigationMapper;
+
+ @Resource
+ private HrmsFeignService hrmsFeignService;
+
+ @Resource
+ private DgApplyAmountInfoMapper dgApplyAmountInfoMapper;
+
+ @Resource
+ private CrmsFeignService crmsFeignService;
+
+ @Resource
+ private DgAssetsAssessmentAssetsLogMapper dgAssetsAssessmentAssetsLogMapper;
+
+ @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(AssetsRequest assetsRequest) {
+
+ //根据主键id修改当前记录状态为审核中,操作状态为已处理,设置审批人id为当前用户id
+ //获取当前登录用户userId
+ //String userId = dgApplyAmountInfoController.getUserId();
+ String userId ="5";
+ DgAssetsInvestigation assetsInvestigation = new DgAssetsInvestigation();
+ assetsInvestigation.setStatus(StatusCode.SP_IN_REVIEW);//状态设置为审核中
+ assetsInvestigation.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
+ assetsInvestigation.setEmpId(Integer.parseInt(userId));
+ assetsInvestigation.setId(assetsRequest.getId());
+ dgAssetsInvestigationMapper.updateById(assetsInvestigation);
+
+ //新增资产部调查员记录到资产部记录表
+ DgAssetsInvestigation dgAssetsInvestigation = new DgAssetsInvestigation();
+ dgAssetsInvestigation.setBusinessId(assetsRequest.getBusinessId());//业务id
+ dgAssetsInvestigation.setCompanyId(assetsRequest.getCompanyId());//企业id
+ dgAssetsInvestigation.setEmpId(assetsRequest.getEmpId());//资产部调查员id
+ dgAssetsInvestigation.setRoleId(PromptSuccess.ZC_ZY_ID);//角色设置为资产部专员
+ dgAssetsInvestigation.setType(1);//专员操作
+ dgAssetsInvestigation.setStatus(StatusCode.SP_IN_REVIEW);//审批状态为审核中
+ dgAssetsInvestigation.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
+ dgAssetsInvestigationMapper.insert(dgAssetsInvestigation);
+
+ //绑定角色关系
+ hrmsFeignService.insertUserRole(assetsRequest.getEmpId().longValue(),PromptSuccess.ZC_ZY_ID.longValue());
+
+ return true;
+ }
+
+ @Transactional
+ @Override
+ public AssetsDetailResponse assetsDetail(Integer id) {
+ //根据主键id查询资产调查详情
+ DgAssetsInvestigationResponse assetsResponse = this.getBaseMapper().selectInfoById(id);
+
+ //根据业务id查询评估价值List
+ List assessmentlist = dgAssetsAssessmentAssetsLogMapper.selectList(
+ new QueryWrapper().eq("business_id",assetsResponse.getBusinessId()));
+
+ assetsResponse.setAssessmentList(assessmentlist);
+
+ String files=assetsResponse.getFile();
+ if(files.length()>0){
+ String a = files.substring(1,files.length()-1);
+ String arry[]=a.split(",");
+ List demoList = Arrays.asList(arry);
+ assetsResponse.setFileList(demoList);
+ System.out.println("arry==============="+demoList);
+ }
+
+ //根据业务id查询业务申请详细信息
+ DgApplyAmountInfoResponse dgApplyAmountInfo = dgApplyAmountInfoMapper.selectApplyAmountInfoById(assetsResponse.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("业务申请详细========="+dgApplyAmountInfo);
+
+ DgApplyAmountInfoRequest applyAmountInfo = new DgApplyAmountInfoRequest();
+ applyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId());
+ //根据企业id查询企业详情
+ ResponseResult result = crmsFeignService.queryCustomerInfoById(applyAmountInfo);
+
+ LinkedHashMap linkedList = (LinkedHashMap)result.getData();
+ System.out.println("企业详细============"+linkedList);
+
+ AssetsDetailResponse assetsDetailResponse = new AssetsDetailResponse();
+ assetsDetailResponse.setDgApplyAmountInfo(dgApplyAmountInfo);
+ assetsDetailResponse.setLinkedHashMap(linkedList);
+ assetsDetailResponse.setAssetsResponse(assetsResponse);
+
+ return assetsDetailResponse;
+ }
+
+ @Transactional
+ @Override
+ public int investigateGuarantee(InvestigateAssetsRequest investigateAssetsRequest) {
+ //根据主键id查询业务id
+ DgAssetsInvestigation dgAssetsInvestigation = this.getBaseMapper().selectById(investigateAssetsRequest.getId());
+
+ //资产部调查员调查,修改审核意见以及状态,修改其他数据
+ DgAssetsInvestigation assetsInvestigation = new DgAssetsInvestigation();
+ assetsInvestigation.setId(investigateAssetsRequest.getId());//主键id
+ assetsInvestigation.setStatus(investigateAssetsRequest.getStatus());//状态
+ assetsInvestigation.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
+ assetsInvestigation.setApplyContent(investigateAssetsRequest.getApplyContent());//审核意见
+ assetsInvestigation.setAmountSum(investigateAssetsRequest.getAmountSum());//合计
+ assetsInvestigation.setAssetsName(investigateAssetsRequest.getAssetsName());
+ assetsInvestigation.setAssetsCode(investigateAssetsRequest.getAssetsCode());
+ assetsInvestigation.setAssetsTime(investigateAssetsRequest.getAssetsTime());
+ assetsInvestigation.setAuditName(investigateAssetsRequest.getAuditName());
+ assetsInvestigation.setAuditCode(investigateAssetsRequest.getAuditCode());
+ assetsInvestigation.setAuditTime(investigateAssetsRequest.getAuditTime());
+ assetsInvestigation.setAuditAmount(investigateAssetsRequest.getAuditAmount());
+ assetsInvestigation.setFile(ArraysUtil.toString(investigateAssetsRequest.getFile()));
+ this.baseMapper.updateById(assetsInvestigation);
+
+ //根据业务id批量新增数据到评估价值列表
+ dgAssetsAssessmentAssetsLogMapper.insertAssetsList(investigateAssetsRequest.getAssessmentList());
+
+ //判断资产部调查员是否调查通过,如果通过,修改资产部经理操作状态为待处理
+ if(investigateAssetsRequest.getStatus()==1){//状态为审核中
+ DgAssetsInvestigation assetsInvestigation2= new DgAssetsInvestigation();
+ assetsInvestigation2.setOperatingStatus(StatusCode.CZ_ON_HAND);
+ this.baseMapper.update(assetsInvestigation2,new QueryWrapper().
+ eq("business_id",dgAssetsInvestigation.getBusinessId()).eq("type",2));
+ }
+ return 1;
+ }
+
+ @Transactional
+ @Override
+ public int approvalAssets(ApprovalAssetsRequest approvalAssetsRequest) {
+
+ DgAssetsInvestigation dgAssetsInvestigation = new DgAssetsInvestigation();
+ dgAssetsInvestigation.setId(approvalAssetsRequest.getId());
+ dgAssetsInvestigation.setEmpId(5);//Integer.parseInt(dgApplyAmountInfoController.getUserId())
+ dgAssetsInvestigation.setRemark(ArraysUtil.toString(approvalAssetsRequest.getRemark()));//补充原因
+ dgAssetsInvestigation.setStatus(approvalAssetsRequest.getStatus());
+ dgAssetsInvestigation.setOperatingStatus(StatusCode.CZ_PROCESSED);//状态设置为已处理
+ dgAssetsInvestigation.setAmount(approvalAssetsRequest.getAmount());//金额
+ dgAssetsInvestigation.setTerm(approvalAssetsRequest.getTerm());//期限
+ dgAssetsInvestigation.setApplyContent(approvalAssetsRequest.getApplyContent());//审核意见
+ //根据主键id修改资产部记录
+ this.baseMapper.updateById(dgAssetsInvestigation);
+
+ //根据主键id查询资产部记录
+ DgAssetsInvestigation assetsInvestigation = this.baseMapper.selectById(approvalAssetsRequest.getId());
+
+ //如果资产部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核
+ if(approvalAssetsRequest.getStatus()==StatusCode.SP_IN_REVIEW && assetsInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && assetsInvestigation.getType()==2){//资产部经理审核通过
+ //根据主键id查询业务id
+ DgAssetsInvestigation assetsInvestigation2 = this.getBaseMapper().selectById(approvalAssetsRequest.getId());
+
+ DgAssetsInvestigation assets = new DgAssetsInvestigation();
+ assets.setBusinessId(assetsInvestigation2.getBusinessId());
+ assets.setCompanyId(assetsInvestigation2.getCompanyId());
+ assets.setRoleId(PromptSuccess.ZC_LD_ID);//资产部分管领导
+ assets.setType(3);//分管领导审核
+ assets.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中
+ assets.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
+ this.baseMapper.insert(assets);
+ }
+
+ //如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
+ //待完善
+
+ return 1;
+ }
}
diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java
index 1398d435..84bce63d 100644
--- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java
+++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java
@@ -18,6 +18,7 @@ import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
import com.daqing.framework.domain.guarantee.DgEnclosureInfo;
import com.daqing.framework.domain.guarantee.DgGuaranteeAssignUser;
+import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.util.RedisUtil;
@@ -56,7 +57,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl roleIdlist, String userId) {
+ public PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List roleIdlist, String userId, Integer status) {
//分页参数
if (page <= 0) {
page = 1;
@@ -64,7 +65,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl positionVO = this.getBaseMapper().pageByCondition(new Page(page, size),customerNumberOrName,roleIdlist,userId);
+ IPage positionVO = this.getBaseMapper().pageByCondition(new Page(page, size),customerNumberOrName,roleIdlist,userId,status);
return new PageUtils(positionVO);
}
@@ -161,6 +162,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl().eq("business_id",guaranteeAssignUser.getBusinessId())
- .eq("type",1).eq("status",4));
+ .eq("type",1).eq("status",StatusCode.SP_IN_REVIEW).eq("operating_status",StatusCode.CZ_PROCESSED));
int n = this.baseMapper.selectCount(new QueryWrapper().eq("business_id",guaranteeAssignUser.getBusinessId())
- .eq("type",2).eq("status",4));
+ .eq("type",2).eq("status",StatusCode.SP_IN_REVIEW).eq("operating_status",StatusCode.CZ_PROCESSED));
int sum = i+n;
if(sum==2){
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
- assignUser.setBusinessId(guaranteeAssignUser.getBusinessId());
- assignUser.setCompanyId(guaranteeAssignUser.getCompanyId());
assignUser.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理
- assignUser.setType(3);
- assignUser.setStatus(5);//状态设置为审核中
- this.baseMapper.insert(assignUser);
+ assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中
+ assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
+ this.baseMapper.update(assignUser,new QueryWrapper().eq("business_id",guaranteeAssignUser.getBusinessId())
+ .eq("type",3));
}
return 1;
@@ -208,9 +209,10 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl
-
+
+
+ INSERT INTO dg_assets_assessment_assets_log
+ (business_id,`name`,amount)
+ VALUES
+
+ (#{item.businessId},#{item.name},#{item.amount})
+
+
+
diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAssetsInvestigationMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAssetsInvestigationMapper.xml
index 9f084cfe..2285cfeb 100644
--- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAssetsInvestigationMapper.xml
+++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAssetsInvestigationMapper.xml
@@ -5,22 +5,58 @@
+
+
+
+
+
-
+
+
+
+
-
+
+
+
+
diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeAssignUserMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeAssignUserMapper.xml
index a1b7279e..7304247f 100644
--- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeAssignUserMapper.xml
+++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeAssignUserMapper.xml
@@ -31,12 +31,15 @@
#{id}
-
- AND au.emp_id =#{userId} or au.emp_id is null
-
AND ai.business_code LIKE CONCAT('%',#{customerNumberOrName},'%') OR cc.name LIKE CONCAT('%',#{customerNumberOrName},'%')
+
+ AND au.status = #{status}
+
+
+ AND au.emp_id =#{userId} or au.emp_id is null
+
diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsAssessmentAssetsLog.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsAssessmentAssetsLog.java
index 4e095c04..74b25633 100644
--- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsAssessmentAssetsLog.java
+++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsAssessmentAssetsLog.java
@@ -25,7 +25,7 @@ public class DgAssetsAssessmentAssetsLog implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
- private Integer companyId;
+ private Integer businessId;
private String name;
diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsInvestigation.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsInvestigation.java
index a1a31d29..6d728aff 100644
--- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsInvestigation.java
+++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsInvestigation.java
@@ -14,7 +14,7 @@ import java.util.Date;
*
*
* @author Qyq
- * @since 2020-11-05
+ * @since 2020-11-23
*/
@Data
@TableName("dg_assets_investigation")
@@ -28,6 +28,11 @@ public class DgAssetsInvestigation implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
+ /**
+ * 业务id
+ */
+ private Integer businessId;
+
/**
* 企业id
*/
@@ -38,6 +43,26 @@ public class DgAssetsInvestigation implements Serializable {
*/
private Integer empId;
+ /**
+ * 角色id
+ */
+ private Integer roleId;
+
+ /**
+ * 类型(1:第一审批人 2:指派人AB角 3:经理)
+ */
+ private Integer type;
+
+ /**
+ * 状态 0:待指派;1:审核中;2:已审核;3:拒绝;4:驳回;5:已撤销;6:草稿;
+ */
+ private Integer status;
+
+ /**
+ * 操作状态: 0->已发起;1->待处理;2->已处理;
+ */
+ private Integer operatingStatus;
+
/**
* 资产评估报告(名称)
*/
@@ -56,7 +81,7 @@ public class DgAssetsInvestigation implements Serializable {
/**
* 合计
*/
- private BigDecimal amount;
+ private BigDecimal amountSum;
/**
* 审计报告(名称)
@@ -91,19 +116,34 @@ public class DgAssetsInvestigation implements Serializable {
/**
* 审核意见
*/
- private String remark;
+ private String applyContent;
/**
- * 审核状态
+ * 审核金额
*/
- private Integer status;
+ private BigDecimal amount;
+
+ /**
+ * 期限
+ */
+ private String term;
+
+ /**
+ * 补充调查原因
+ */
+ private String remark;
+ /**
+ * 创建时间
+ */
@ApiModelProperty(value = "创建时间")
@TableField(fill = FieldFill.INSERT)
private Date createTime;
+ /**
+ * 修改时间
+ */
@ApiModelProperty(value = "更新时间")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
-
}