企业关联人

master
shijie 4 years ago
parent 4e634f07d2
commit e1b2b6dc5f
  1. 6
      dq-financial-crms/pom.xml
  2. 115
      dq-financial-crms/src/main/java/com/daqing/financial/crms/config/MyBatisPlusCodeGenerator.java
  3. 104
      dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CrmsCompanyPersonalController.java
  4. 46
      dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CrmsCustomerRelatedController.java
  5. 23
      dq-financial-crms/src/main/java/com/daqing/financial/crms/mapper/CrmsCompanyPersonalMapper.java
  6. 22
      dq-financial-crms/src/main/java/com/daqing/financial/crms/mapper/CrmsCustomerRelatedMapper.java
  7. 20
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/ICrmsCompanyPersonalService.java
  8. 19
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/ICrmsCustomerRelatedService.java
  9. 40
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CrmsCompanyPersonalServiceImpl.java
  10. 26
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CrmsCustomerRelatedServiceImpl.java
  11. 1
      dq-financial-crms/src/main/resources/mapper/crms/CompanyCustomerDao.xml
  12. 37
      dq-financial-crms/src/main/resources/mapper/crms/CrmsCompanyPersonalMapper.xml
  13. 20
      dq-financial-crms/src/main/resources/mapper/crms/CrmsCustomerRelatedMapper.xml
  14. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgBankController.java
  15. 14
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/CrmsFeignService.java
  16. 38
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java
  17. 72
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
  18. 6
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CompanyCustomerEntity.java
  19. 140
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CrmsCompanyPersonal.java
  20. 49
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CrmsCustomerRelated.java
  21. 146
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/request/CompanyPersonalRequest.java
  22. 3
      dq-govern-gateway/src/main/resources/jwt.properties

@ -55,6 +55,12 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.28</version>
<scope>compile</scope>
</dependency>
</dependencies>
<dependencyManagement>

@ -0,0 +1,115 @@
package com.daqing.financial.crms.config;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.core.toolkit.StringPool;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.InjectionConfig;
import com.baomidou.mybatisplus.generator.config.*;
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
import com.baomidou.mybatisplus.generator.config.rules.DateType;
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine;
import java.util.ArrayList;
import java.util.List;
/**
* @Author: LvFang
* @Date: Created in 2019/6/11.
* @Description:
*/
public class MyBatisPlusCodeGenerator {
//包名
public static final String PACKAGE_NAME = "com.daqing.financial.crms";
public static void main(String[] args) {
String[] tables = new String[] {"crms_company_personal"};//表名数组
String[] tablePrefixs = new String[] {""};//去掉前缀
executeCode(PACKAGE_NAME,tables,tablePrefixs);
}
private static void executeCode(String pack,String[] tables,String[] tablePrefixs) {
// 代码生成器
AutoGenerator mpg = new AutoGenerator();
// 全局配置
GlobalConfig gc = new GlobalConfig();
// 是否覆盖已有文件
gc.setFileOverride(false);
// 生成文件的输出目录
String projectPath = System.getProperty("user.dir");//user.dir 表示当前工程路径无需替换
gc.setOutputDir(projectPath + "/dq-financial-crms/src/main/java");
//设置bean命名规范
gc.setEntityName("%s");
// 开发人员
gc.setAuthor("Qyq");
// 是否打开输出目录
gc.setOpen(false);
// 开启 BaseResultMap
gc.setBaseResultMap(true);
// 指定生成的主键的ID类型
gc.setIdType(IdType.ID_WORKER);
// 时间类型对应策略: 只使用 java.util.date 代替
gc.setDateType(DateType.ONLY_DATE);
mpg.setGlobalConfig(gc);
// 数据源配置
DataSourceConfig config= new DataSourceConfig();
// 从试图获取
config.setUrl("jdbc:mysql://192.168.31.142:3306/dq_financial_crms?serverTimezone=UTC");
config.setDriverName("com.mysql.cj.jdbc.Driver");
config.setUsername("root");
config.setPassword("root");
mpg.setDataSource(config);
// 包配置
PackageConfig pc = new PackageConfig();
// 父包名。如果为空,将下面子包名必须写全部, 否则就只需写子包名
pc.setParent(pack);
// Entity包名
pc.setEntity("guarantee");
mpg.setPackageInfo(pc);
// 自定义配置
InjectionConfig cfg = new InjectionConfig() {
@Override
public void initMap() {
// to do nothing
}
};
List<FileOutConfig> focList = new ArrayList<>();
focList.add(new FileOutConfig("/templates/mapper.xml.ftl") {
public String outputFile(TableInfo tableInfo) {
// 自定义输入文件名称
if (StringUtils.isEmpty(pc.getModuleName())) {
return projectPath + "/dq-financial-crms/src/main/resources/mapper/crms/" + tableInfo.getXmlName() + StringPool.DOT_XML;
}else {
return projectPath + "/dq-financial-crms/src/main/resources/mapper/crms/" + pc.getModuleName() + "/" + tableInfo.getXmlName() + StringPool.DOT_XML;
}
}
});
cfg.setFileOutConfigList(focList);
mpg.setCfg(cfg);
mpg.setTemplate(new TemplateConfig().setXml(null));
// 策略配置
StrategyConfig strategy = new StrategyConfig();
// 数据库表映射到实体的命名策略: 下划线转驼峰命名
strategy.setNaming(NamingStrategy.underline_to_camel);
// 数据库表字段映射到实体的命名策略: 下划线转驼峰命名
strategy.setColumnNaming(NamingStrategy.underline_to_camel);
// 【实体】是否为lombok模型(默认 false)
strategy.setEntityLombokModel(false);
// 需要包含的表名,允许正则表达式(与exclude二选一配置)
strategy.setInclude(tables);
// 驼峰转连字符
strategy.setControllerMappingHyphenStyle(true);
// 表前缀
strategy.setTablePrefix(tablePrefixs);
mpg.setStrategy(strategy);
mpg.setTemplateEngine(new FreemarkerTemplateEngine());
mpg.execute();
}
}

@ -0,0 +1,104 @@
package com.daqing.financial.crms.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.daqing.financial.crms.service.ICrmsCompanyPersonalService;
import com.daqing.financial.crms.service.ICrmsCustomerRelatedService;
import com.daqing.framework.domain.crms.CrmsCompanyPersonal;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.PageUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.Arrays;
import java.util.List;
/**
* <p>
* 关联人/关联企业 前端控制器
* </p>
*
* @author Qyq
* @since 2020-11-13
*/
@Api(tags = {"关联人/关联企业"})
@RestController
@RequestMapping("/crms-company-personal")
public class CrmsCompanyPersonalController {
@Resource
private ICrmsCompanyPersonalService crmsCompanyPersonalService;
@Resource
private ICrmsCustomerRelatedService crmsCustomerRelatedService;
/**
* 个人/企业关联人列表
*/
@GetMapping("/companyPersonalList")
@ApiOperation(value = "个人/企业关联人列表")
public ResponseResult companyPersonalList(@RequestParam("page") Integer page, @RequestParam("size") Integer size) {
PageUtils data = crmsCompanyPersonalService.queryPage(page, size);
return new ResponseResult<PageUtils>().SUCCESS(data);
}
/**
* 新增个人/企业关联人
*/
@PostMapping("/insertCompanyPersonal")
@ApiOperation(value = "新增个人/企业关联人")
public ResponseResult insertCompanyPersonal(@RequestBody @Valid CrmsCompanyPersonal crmsCompanyPersonal) {
boolean result = crmsCompanyPersonalService.save(crmsCompanyPersonal);
return result ? ResponseResult.SUCCESS("返回的关联人id="+crmsCompanyPersonal.getId()) : ResponseResult.FAIL();
}
/**
* 编辑个人/企业关联人
* @param crmsCompanyPersonal
* @return
*/
@PostMapping("/updateCompanyPersonal")
@ApiOperation(value = "编辑个人/企业关联人")
public ResponseResult updateCompanyPersonal(@RequestBody CrmsCompanyPersonal crmsCompanyPersonal){
boolean result = crmsCompanyPersonalService.updateById(crmsCompanyPersonal);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
/**
* 删除个人/企业关联人
*/
@GetMapping("/deleteCompanyPersonal")
@ApiOperation(value = "删除个人/企业关联人")
public ResponseResult deleteCompanyPersonal(@RequestParam("ids") Long[] ids) {
boolean result = crmsCompanyPersonalService.removeByIds(Arrays.asList(ids));
//同时删除关联关系
boolean relate = crmsCustomerRelatedService.deleteByRelateIds(Arrays.asList(ids));
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
/**
* 编辑是否存在关联人
* @param
* @return
*/
@PostMapping("/updateIsExistRelated")
@ApiOperation(value = "编辑是否存在关联人")
public ResponseResult updateIsExistRelated(@RequestParam("id")Integer id,@RequestParam("isExistRelated")Integer isExistRelated){
boolean result = crmsCompanyPersonalService.updateIsExistRelated(id,isExistRelated);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
/**
* 查询个人/企业关联人
*/
@GetMapping("/selectCompanyPersonal")
@ApiOperation(value = "查询个人/企业关联人")
public ResponseResult selectCompanyPersonal(@RequestParam("id")Integer id) {
CrmsCompanyPersonal crmsCompanyPersonal = crmsCompanyPersonalService.getOne(new QueryWrapper<CrmsCompanyPersonal>().eq("id",id));
return ResponseResult.SUCCESS(crmsCompanyPersonal);
}
}

@ -0,0 +1,46 @@
package com.daqing.financial.crms.controller;
import com.daqing.financial.crms.service.ICrmsCustomerRelatedService;
import com.daqing.framework.domain.crms.CrmsCompanyPersonal;
import com.daqing.framework.domain.crms.CrmsCustomerRelated;
import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.validation.Valid;
/**
* <p>
* 客户关联表 前端控制器
* </p>
*
* @author Qyq
* @since 2020-11-12
*/
@Api(tags = {"关联关系"})
@RestController
@RequestMapping("/crms-customer-related")
public class CrmsCustomerRelatedController {
@Resource
private ICrmsCustomerRelatedService crmsCustomerRelatedService;
/**
* 新增关联关系
*/
@PostMapping("/insertCustomerRelated")
@ApiOperation(value = "新增关联关系")
public ResponseResult insertCustomerRelated(@RequestBody @Valid CrmsCustomerRelated crmsCustomerRelated) {
boolean result = crmsCustomerRelatedService.save(crmsCustomerRelated);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
}

@ -0,0 +1,23 @@
package com.daqing.financial.crms.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.framework.domain.crms.CrmsCompanyPersonal;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* <p>
* 关联人/关联企业 Mapper 接口
* </p>
*
* @author Qyq
* @since 2020-11-13
*/
@Mapper
public interface CrmsCompanyPersonalMapper extends BaseMapper<CrmsCompanyPersonal> {
IPage<CrmsCompanyPersonal> pageByCondition(Page page);
boolean updateIsExistRelated(@Param("id") Integer id, @Param("isExistRelated") Integer isExistRelated);
}

@ -0,0 +1,22 @@
package com.daqing.financial.crms.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.daqing.framework.domain.crms.CrmsCustomerRelated;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* <p>
* 客户关联表 Mapper 接口
* </p>
*
* @author Qyq
* @since 2020-11-12
*/
@Mapper
public interface CrmsCustomerRelatedMapper extends BaseMapper<CrmsCustomerRelated> {
boolean deleteByIds(@Param("ids") List<Long> ids);
}

@ -0,0 +1,20 @@
package com.daqing.financial.crms.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.framework.domain.crms.CrmsCompanyPersonal;
import com.daqing.framework.utils.PageUtils;
/**
* <p>
* 关联人/关联企业 服务类
* </p>
*
* @author Qyq
* @since 2020-11-13
*/
public interface ICrmsCompanyPersonalService extends IService<CrmsCompanyPersonal> {
PageUtils queryPage(Integer page, Integer size);
boolean updateIsExistRelated(Integer id, Integer isExistRelated);
}

@ -0,0 +1,19 @@
package com.daqing.financial.crms.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.framework.domain.crms.CrmsCustomerRelated;
import java.util.List;
/**
* <p>
* 客户关联表 服务类
* </p>
*
* @author Qyq
* @since 2020-11-12
*/
public interface ICrmsCustomerRelatedService extends IService<CrmsCustomerRelated> {
boolean deleteByRelateIds(List<Long> asList);
}

@ -0,0 +1,40 @@
package com.daqing.financial.crms.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.daqing.financial.crms.mapper.CrmsCompanyPersonalMapper;
import com.daqing.financial.crms.service.ICrmsCompanyPersonalService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.framework.domain.crms.CrmsCompanyPersonal;
import com.daqing.framework.utils.PageUtils;
import org.springframework.stereotype.Service;
/**
* <p>
* 关联人/关联企业 服务实现类
* </p>
*
* @author Qyq
* @since 2020-11-13
*/
@Service
public class CrmsCompanyPersonalServiceImpl extends ServiceImpl<CrmsCompanyPersonalMapper, CrmsCompanyPersonal> implements ICrmsCompanyPersonalService {
@Override
public PageUtils queryPage(Integer page, Integer size) {
//分页参数
if (page <= 0) {
page = 1;
}
if (size <= 0) {
size = 10;
}
IPage<CrmsCompanyPersonal> positionVO = this.getBaseMapper().pageByCondition(new Page(page, size));
return new PageUtils(positionVO);
}
@Override
public boolean updateIsExistRelated(Integer id, Integer isExistRelated) {
return this.getBaseMapper().updateIsExistRelated(id,isExistRelated);
}
}

@ -0,0 +1,26 @@
package com.daqing.financial.crms.service.impl;
import com.daqing.financial.crms.mapper.CrmsCustomerRelatedMapper;
import com.daqing.financial.crms.service.ICrmsCustomerRelatedService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.framework.domain.crms.CrmsCustomerRelated;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 客户关联表 服务实现类
* </p>
*
* @author Qyq
* @since 2020-11-12
*/
@Service
public class CrmsCustomerRelatedServiceImpl extends ServiceImpl<CrmsCustomerRelatedMapper, CrmsCustomerRelated> implements ICrmsCustomerRelatedService {
@Override
public boolean deleteByRelateIds(List<Long> ids) {
return this.getBaseMapper().deleteByIds(ids);
}
}

@ -15,6 +15,7 @@
<result property="empNum" column="emp_num"/>
<result property="linkman" column="linkman"/>
<result property="businessSource" column="business_source"/>
<result property="isExistRelated" column="is_exist_related"/>
<result property="customerId" column="customer_id"/>
</resultMap>

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.daqing.financial.crms.mapper.CrmsCompanyPersonalMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.daqing.framework.domain.crms.CrmsCompanyPersonal">
<id column="id" property="id" />
<result column="related_name" property="relatedName" />
<result column="address" property="address" />
<result column="social_unified_code" property="socialUnifiedCode" />
<result column="registered_capital" property="registeredCapital" />
<result column="registered_time" property="registeredTime" />
<result column="industry" property="industry" />
<result column="legal_person_name" property="legalPersonName" />
<result column="phone" property="phone" />
<result column="relationship" property="relationship" />
<result column="shareholders_situation" property="shareholdersSituation" />
<result column="marital_status" property="maritalStatus" />
<result column="id_card" property="idCard" />
<result column="age" property="age" />
<result column="gender" property="gender" />
<result column="education" property="education" />
<result column="employer" property="employer" />
<result column="position" property="position" />
<result column="type" property="type" />
</resultMap>
<update id="updateIsExistRelated" parameterType="int">
update crms_company_customer set is_exist_related=#{isExistRelated} where id=#{id}
</update>
<select id="pageByCondition" resultMap="BaseResultMap">
select cp.id,cp.relationship,cp.`type`,cp.related_name,cp.phone,cp.address
from crms_company_personal cp
left join crms_customer_related cr on cr.related_id=cp.id
</select>
</mapper>

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.daqing.financial.crms.mapper.CrmsCustomerRelatedMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.daqing.framework.domain.crms.CrmsCustomerRelated">
<id column="id" property="id" />
<result column="customer_id" property="customerId" />
<result column="related_id" property="relatedId" />
<result column="related_type" property="relatedType" />
</resultMap>
<delete id="deleteByIds" >
delete from crms_customer_related where related_id in
<foreach collection="ids" open="(" separator="," close=")" item="id">
#{id}
</foreach>
</delete>
</mapper>

@ -4,6 +4,7 @@ package com.daqing.financial.guarantee.controller;
import com.daqing.financial.guarantee.service.IDgBankService;
import com.daqing.framework.domain.guarantee.DgBank;
import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
@ -20,6 +21,7 @@ import java.util.List;
* @author Qyq
* @since 2020-11-12
*/
@Api(tags = {"银行管理"})
@RestController
@RequestMapping("/dg-bank")
public class DgBankController {

@ -1,10 +1,13 @@
package com.daqing.financial.guarantee.feign;
import com.daqing.framework.domain.crms.CrmsCompanyPersonal;
import com.daqing.framework.domain.crms.CrmsCustomerRelated;
import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
import com.daqing.framework.model.response.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
/**
@ -19,4 +22,15 @@ public interface CrmsFeignService {
@PostMapping("/crms/customer/queryCustomerInfoById")
ResponseResult queryCustomerInfoById(@RequestBody DgApplyAmountInfoRequest applyAmountInfo);
/**
* 新增个人/企业关联人
*/
@PostMapping("/crms-customer-related/insertCustomerRelated")
ResponseResult insertCustomerRelated(@RequestBody CrmsCustomerRelated crmsCustomerRelated);
/**
* 编辑是否存在关联人
*/
@PostMapping("/crms-company-personal/updateIsExistRelated")
ResponseResult updateIsExistRelated(@RequestParam("id")Integer id, @RequestParam("isExistRelated")Integer isExistRelated);
}

@ -61,7 +61,7 @@ public class BusinessApplicationRequest implements Serializable {
* 反担保措施中划线隔开
*/
@ApiModelProperty(value = "反担保措施(中划线隔开)")
private String enGuaranteeMeasures;
private String[] enGuaranteeMeasures;
/**
* 反担保措施描述
@ -92,73 +92,73 @@ public class BusinessApplicationRequest implements Serializable {
* 营业执照复印件
*/
@ApiModelProperty(value = "营业执照复印件")
private String businessLicense;
private String[] businessLicense;
/**
* 上传法定代表人夫妻及企业实际经营者身份证复印件
*/
@ApiModelProperty(value = "上传法定代表人夫妻及企业实际经营者身份证复印件")
private String legalCardCopy;
private String[] legalCardCopy;
/**
* 法定代表人夫妻户口本结婚证离婚证复印件
*/
@ApiModelProperty(value = "法定代表人夫妻户口本,结婚证(离婚证)复印件")
private String marriageCopy;
private String[] marriageCopy;
/**
* 法定代表人身份证明
*/
@ApiModelProperty(value = "法定代表人身份证明")
private String legalCopy;
private String[] legalCopy;
/**
* 公司章程
*/
@ApiModelProperty(value = "公司章程")
private String companyConstitution;
private String[] companyConstitution;
/**
* 会计师事务所审计的上一年度及本年度审计报告
*/
@ApiModelProperty(value = "会计师事务所审计的上一年度及本年度审计报告")
private String accountingFirm;
private String[] accountingFirm;
/**
* 企业信用报告
*/
@ApiModelProperty(value = "企业信用报告")
private String companyCredit;
private String[] companyCredit;
/**
* 企业法人夫妇信用报告实际经营者信用报告
*/
@ApiModelProperty(value = "企业法人夫妇信用报告,实际经营者信用报告")
private String creditReport;
private String[] creditReport;
/**
* 征信业务授权书承诺书
*/
@ApiModelProperty(value = "征信业务授权书,承诺书")
private String certificateAuthorization;
private String[] certificateAuthorization;
/**
* 增值税纳税申报表首表复印件/完税证明
*/
@ApiModelProperty(value = "增值税纳税申报表首表复印件/完税证明")
private String taxCertificate;
private String[] taxCertificate;
/**
* 股东会会议纪要
*/
@ApiModelProperty(value = "股东会会议纪要")
private String meetingMinutes;
private String[] meetingMinutes;
/**
* 反担保资料和评估报告
*/
@ApiModelProperty(value = "反担保资料和评估报告")
private String assessmentReport;
private String[] assessmentReport;
/**
* 区分保存和提交按钮 true->commit
@ -166,4 +166,16 @@ public class BusinessApplicationRequest implements Serializable {
@ApiModelProperty(value = "区分保存和提交按钮")
private boolean isSaveOrCommit;
/**
* 关联人id
*/
@ApiModelProperty(value = "关联人id")
private Integer relatedId;
/**
* 是否存在关联人
*/
@ApiModelProperty(value = "是否存在关联人")
private Integer isExistRelated;
}

@ -12,6 +12,7 @@ import com.daqing.financial.guarantee.model.response.BusinessApplicationDetailRe
import com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse;
import com.daqing.financial.guarantee.service.IDgApplyAmountInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.framework.domain.crms.CrmsCustomerRelated;
import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
import com.daqing.framework.domain.crms.response.CompanyCustomerResponse;
import com.daqing.framework.domain.crms.response.CrmsCode;
@ -28,6 +29,7 @@ import com.daqing.framework.utils.excel.ExcelUtil;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -83,15 +85,16 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
log.error("LogAspect 操作失败:" + e.getMessage());
e.printStackTrace();
}
System.out.println("反担保措施======"+ArrayUtils.toString(businessApplication.getEnGuaranteeMeasures(),","));
//申请贷款相关信息
DgApplyAmountInfo dgApplyAmountInfo = new DgApplyAmountInfo();
dgApplyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId());
dgApplyAmountInfo.setPresenterId(Integer.parseInt(userId));
dgApplyAmountInfo.setPresenterId(5);//Integer.parseInt(userId)
dgApplyAmountInfo.setApplyAmount(businessApplication.getApplyAmount());//申请额度
dgApplyAmountInfo.setApplyTime(businessApplication.getApplyTime());//申请期限
dgApplyAmountInfo.setBank(businessApplication.getBank());//贷款银行
dgApplyAmountInfo.setAmountWide(businessApplication.getAmountWide());//贷款用途
dgApplyAmountInfo.setEnGuaranteeMeasures(businessApplication.getEnGuaranteeMeasures());//反担保措施
dgApplyAmountInfo.setEnGuaranteeMeasures(ArrayUtils.toString(businessApplication.getEnGuaranteeMeasures(),","));//反担保措施
dgApplyAmountInfo.setDescription(businessApplication.getDescription());//反担保措施描述
dgApplyAmountInfo.setBusinessType(businessApplication.getBusinessType());//业务类型
dgApplyAmountInfo.setCreateTime(new Date());
@ -104,22 +107,34 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
dgApplyAmountInfoMapper.insert(dgApplyAmountInfo);
//修改是否存在关联人
crmsFeignService.updateIsExistRelated(dgApplyAmountInfo.getCompanyId(),businessApplication.getIsExistRelated());
//绑定关联关系
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated();
crmsCustomerRelated.setCustomerId(dgApplyAmountInfo.getCompanyId());//企业id
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
dgEnclosureInfo.setCompanyId(businessApplication.getCompanyId());//企业Id
dgEnclosureInfo.setBusinessLicense(businessApplication.getBusinessLicense());//营业执照复印件
dgEnclosureInfo.setLegalCardCopy(businessApplication.getLegalCardCopy());//上传法定代表人夫妻及企业实际经营者身份证复印件
dgEnclosureInfo.setMarriageCopy(businessApplication.getMarriageCopy());//法定代表人夫妻户口本,结婚证(离婚证)复印件
dgEnclosureInfo.setLegalCopy(businessApplication.getLegalCopy());//法定代表人身份证明
dgEnclosureInfo.setCompanyConstitution(businessApplication.getCompanyConstitution());//公司章程
dgEnclosureInfo.setAccountingFirm(businessApplication.getAccountingFirm());//会计师事务所审计的上一年度及本年度审计报告
dgEnclosureInfo.setCompanyCredit(businessApplication.getCompanyCredit());//企业信用报告
dgEnclosureInfo.setCreditReport(businessApplication.getCreditReport());//企业法人夫妇信用报告,实际经营者信用报告
dgEnclosureInfo.setCertificateAuthorization(businessApplication.getCertificateAuthorization());//征信业务授权书,承诺书
dgEnclosureInfo.setTaxCertificate(businessApplication.getTaxCertificate());//增值税纳税申报表首表复印件/完税证明
dgEnclosureInfo.setMeetingMinutes(businessApplication.getMeetingMinutes());//股东会会议纪要
dgEnclosureInfo.setAssessmentReport(businessApplication.getAssessmentReport());//反担保资料和评估报告
dgEnclosureInfo.setBusinessLicense(ArrayUtils.toString(businessApplication.getBusinessLicense(),","));//营业执照复印件
dgEnclosureInfo.setLegalCardCopy(ArrayUtils.toString(businessApplication.getLegalCardCopy(),","));//上传法定代表人夫妻及企业实际经营者身份证复印件
dgEnclosureInfo.setMarriageCopy(ArrayUtils.toString(businessApplication.getMarriageCopy(),","));//法定代表人夫妻户口本,结婚证(离婚证)复印件
dgEnclosureInfo.setLegalCopy(ArrayUtils.toString(businessApplication.getLegalCopy(),","));//法定代表人身份证明
dgEnclosureInfo.setCompanyConstitution(ArrayUtils.toString(businessApplication.getCompanyConstitution(),","));//公司章程
dgEnclosureInfo.setAccountingFirm(ArrayUtils.toString(businessApplication.getAccountingFirm(),","));//会计师事务所审计的上一年度及本年度审计报告
dgEnclosureInfo.setCompanyCredit(ArrayUtils.toString(businessApplication.getCompanyCredit(),","));//企业信用报告
dgEnclosureInfo.setCreditReport(ArrayUtils.toString(businessApplication.getCreditReport(),","));//企业法人夫妇信用报告,实际经营者信用报告
dgEnclosureInfo.setCertificateAuthorization(ArrayUtils.toString(businessApplication.getCertificateAuthorization(),","));//征信业务授权书,承诺书
dgEnclosureInfo.setTaxCertificate(ArrayUtils.toString(businessApplication.getTaxCertificate(),","));//增值税纳税申报表首表复印件/完税证明
dgEnclosureInfo.setMeetingMinutes(ArrayUtils.toString(businessApplication.getMeetingMinutes(),","));//股东会会议纪要
dgEnclosureInfo.setAssessmentReport(ArrayUtils.toString(businessApplication.getAssessmentReport(),","));//反担保资料和评估报告
return dgEnclosureInfoMapper.insert(dgEnclosureInfo);
}
@ -177,7 +192,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
dgApplyAmountInfo.setApplyTime(businessApplication.getApplyTime());//申请期限
dgApplyAmountInfo.setBank(businessApplication.getBank());//贷款银行
dgApplyAmountInfo.setAmountWide(businessApplication.getAmountWide());//贷款用途
dgApplyAmountInfo.setEnGuaranteeMeasures(businessApplication.getEnGuaranteeMeasures());//反担保措施
dgApplyAmountInfo.setEnGuaranteeMeasures(ArrayUtils.toString(businessApplication.getEnGuaranteeMeasures(),","));//反担保措施
dgApplyAmountInfo.setDescription(businessApplication.getDescription());//反担保措施描述
dgApplyAmountInfo.setBusinessType(businessApplication.getBusinessType());//业务类型
dgApplyAmountInfo.setUpdateTime(new Date());
@ -188,18 +203,19 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
DgEnclosureInfo dgEnclosureInfo = new DgEnclosureInfo();
dgEnclosureInfo.setBusinessId(businessApplication.getId());//业务id
dgEnclosureInfo.setCompanyId(businessApplication.getCompanyId());//企业Id
dgEnclosureInfo.setBusinessLicense(businessApplication.getBusinessLicense());//营业执照复印件
dgEnclosureInfo.setLegalCardCopy(businessApplication.getLegalCardCopy());//上传法定代表人夫妻及企业实际经营者身份证复印件
dgEnclosureInfo.setMarriageCopy(businessApplication.getMarriageCopy());//法定代表人夫妻户口本,结婚证(离婚证)复印件
dgEnclosureInfo.setLegalCopy(businessApplication.getLegalCopy());//法定代表人身份证明
dgEnclosureInfo.setCompanyConstitution(businessApplication.getCompanyConstitution());//公司章程
dgEnclosureInfo.setAccountingFirm(businessApplication.getAccountingFirm());//会计师事务所审计的上一年度及本年度审计报告
dgEnclosureInfo.setCompanyCredit(businessApplication.getCompanyCredit());//企业信用报告
dgEnclosureInfo.setCreditReport(businessApplication.getCreditReport());//企业法人夫妇信用报告,实际经营者信用报告
dgEnclosureInfo.setCertificateAuthorization(businessApplication.getCertificateAuthorization());//征信业务授权书,承诺书
dgEnclosureInfo.setTaxCertificate(businessApplication.getTaxCertificate());//增值税纳税申报表首表复印件/完税证明
dgEnclosureInfo.setMeetingMinutes(businessApplication.getMeetingMinutes());//股东会会议纪要
dgEnclosureInfo.setAssessmentReport(businessApplication.getAssessmentReport());//反担保资料和评估报告
dgEnclosureInfo.setBusinessLicense(ArrayUtils.toString(businessApplication.getBusinessLicense(),","));//营业执照复印件
dgEnclosureInfo.setLegalCardCopy(ArrayUtils.toString(businessApplication.getLegalCardCopy(),","));//上传法定代表人夫妻及企业实际经营者身份证复印件
dgEnclosureInfo.setMarriageCopy(ArrayUtils.toString(businessApplication.getMarriageCopy(),","));//法定代表人夫妻户口本,结婚证(离婚证)复印件
dgEnclosureInfo.setLegalCopy(ArrayUtils.toString(businessApplication.getLegalCopy(),","));//法定代表人身份证明
dgEnclosureInfo.setCompanyConstitution(ArrayUtils.toString(businessApplication.getCompanyConstitution(),","));//公司章程
dgEnclosureInfo.setAccountingFirm(ArrayUtils.toString(businessApplication.getAccountingFirm(),","));//会计师事务所审计的上一年度及本年度审计报告
dgEnclosureInfo.setCompanyCredit(ArrayUtils.toString(businessApplication.getCompanyCredit(),","));//企业信用报告
dgEnclosureInfo.setCreditReport(ArrayUtils.toString(businessApplication.getCreditReport(),","));//企业法人夫妇信用报告,实际经营者信用报告
dgEnclosureInfo.setCertificateAuthorization(ArrayUtils.toString(businessApplication.getCertificateAuthorization(),","));//征信业务授权书,承诺书
dgEnclosureInfo.setTaxCertificate(ArrayUtils.toString(businessApplication.getTaxCertificate(),","));//增值税纳税申报表首表复印件/完税证明
dgEnclosureInfo.setMeetingMinutes(ArrayUtils.toString(businessApplication.getMeetingMinutes(),","));//股东会会议纪要
dgEnclosureInfo.setAssessmentReport(ArrayUtils.toString(businessApplication.getAssessmentReport(),","));//反担保资料和评估报告
//根据业务id删除对应的附件信息
dgEnclosureInfoMapper.delete(new QueryWrapper<DgEnclosureInfo>().eq("business_id",businessApplication.getId()));
@ -231,7 +247,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
e.printStackTrace();
}
//根据userId获取用户名以及部门名称
ResponseResult<EmployeeMessageResponse> employeeMessage = hrmsFeignService.getAccountAndDeptNameById(Long.valueOf(userId));
ResponseResult<EmployeeMessageResponse> employeeMessage = hrmsFeignService.getAccountAndDeptNameById(5l);
try {
List<BusinessApplicationListResponse> list = this.getBaseMapper().excelList();

@ -84,4 +84,10 @@ public class CompanyCustomerEntity implements Serializable {
@ApiModelProperty(value = "客户基本信息表id")
private Long customerId;
/**
* 是否存在关联人
*/
@ApiModelProperty(value = "是否存在关联人")
private Integer isExistRelated;
}

@ -0,0 +1,140 @@
package com.daqing.framework.domain.crms;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
* 关联人/关联企业
* </p>
*
* @author Qyq
* @since 2020-11-13
*/
@Data
@TableName("crms_company_personal")
public class CrmsCompanyPersonal implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 关联人名称
*/
@ApiModelProperty(value = "关联人名称")
private String relatedName;
/**
* 联系地址
*/
@ApiModelProperty(value = "联系地址")
private String address;
/**
* 社会统一代码
*/
@ApiModelProperty(value = "社会统一代码")
private String socialUnifiedCode;
/**
* 注册资金
*/
@ApiModelProperty(value = "注册资金(元)")
private String registeredCapital;
/**
* 注册时间
*/
@ApiModelProperty(value = "注册时间")
private Date registeredTime;
/**
* 所属行业
*/
@ApiModelProperty(value = "所属行业")
private String industry;
/**
* 法人姓名
*/
@ApiModelProperty(value = "法人姓名")
private String legalPersonName;
/**
* 联系电话
*/
@ApiModelProperty(value = "联系电话")
private String phone;
/**
* 关联关系
*/
@ApiModelProperty(value = "关联关系")
private String relationship;
/**
* 股东情况
*/
@ApiModelProperty(value = "股东情况")
private String shareholdersSituation;
/**
* 婚姻状况,0:未婚,1:已婚,2:离异,3:再婚
*/
@ApiModelProperty(value = "婚姻状况,0:未婚,1:已婚,2:离异,3:再婚")
private Integer maritalStatus;
/**
* 身份证号
*/
@ApiModelProperty(value = "身份证号")
private String idCard;
/**
* 年龄
*/
@ApiModelProperty(value = "年龄")
private Integer age;
/**
* 性别10
*/
@ApiModelProperty(value = "性别:1、男,0、女")
private Integer gender;
/**
* 学历,0:本科,1:大专,2:高职,3:中专,4:其他
*/
@ApiModelProperty(value = "学历,0:本科,1:大专,2:高职,3:中专,4:其他")
private Integer education;
/**
* 工作单位
*/
@ApiModelProperty(value = "工作单位")
private String employer;
/**
* 职务
*/
@ApiModelProperty(value = "职务")
private String position;
/**
* 关联人类型
*/
@ApiModelProperty(value = "关联人类型")
private String type;
}

@ -0,0 +1,49 @@
package com.daqing.framework.domain.crms;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* <p>
* 客户关联表
* </p>
*
* @author Qyq
* @since 2020-11-12
*/
@Data
@TableName("crms_customer_related")
public class CrmsCustomerRelated implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
@ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 企业id
*/
@ApiModelProperty(value = "企业id")
private Integer customerId;
/**
* 关联人id
*/
@ApiModelProperty(value = "关联人id")
private Integer relatedId;
/**
* 关联客户类型1->企业类型0->个人类型
*/
@ApiModelProperty(value = "关联客户类型:1->企业类型;0->个人类型")
private Integer relatedType;
}

@ -0,0 +1,146 @@
package com.daqing.framework.domain.crms.request;
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.Date;
/**
* 记录客户基本信息
*
* @author gongsj
* @email gongsj@gmail.com
* @date 2020-09-08 11:23:28
*/
@Data
@ToString
public class CompanyPersonalRequest implements Serializable {
/**
* 主键
*/
@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 关联人名称
*/
@ApiModelProperty(value = "关联人名称")
private String relatedName;
/**
* 联系地址
*/
@ApiModelProperty(value = "联系地址")
private String address;
/**
* 社会统一代码
*/
@ApiModelProperty(value = "社会统一代码")
private String socialUnifiedCode;
/**
* 注册资金
*/
@ApiModelProperty(value = "注册资金(元)")
private String registeredCapital;
/**
* 注册时间
*/
@ApiModelProperty(value = "注册时间")
private Date registeredTime;
/**
* 所属行业
*/
@ApiModelProperty(value = "所属行业")
private String industry;
/**
* 法人姓名
*/
@ApiModelProperty(value = "法人姓名")
private String legalPersonName;
/**
* 联系电话
*/
@ApiModelProperty(value = "联系电话")
private String phone;
/**
* 关联关系
*/
@ApiModelProperty(value = "关联关系")
private String relationship;
/**
* 股东情况
*/
@ApiModelProperty(value = "股东情况")
private String shareholdersSituation;
/**
* 婚姻状况,0:未婚,1:已婚,2:离异,3:再婚
*/
@ApiModelProperty(value = "婚姻状况,0:未婚,1:已婚,2:离异,3:再婚")
private Integer maritalStatus;
/**
* 身份证号
*/
@ApiModelProperty(value = "身份证号")
private String idCard;
/**
* 年龄
*/
@ApiModelProperty(value = "年龄")
private Integer age;
/**
* 性别10
*/
@ApiModelProperty(value = "性别:1、男,0、女")
private Integer gender;
/**
* 学历,0:本科,1:大专,2:高职,3:中专,4:其他
*/
@ApiModelProperty(value = "学历,0:本科,1:大专,2:高职,3:中专,4:其他")
private Integer education;
/**
* 工作单位
*/
@ApiModelProperty(value = "工作单位")
private String employer;
/**
* 职务
*/
@ApiModelProperty(value = "职务")
private String position;
/**
* 关联人类型
*/
@ApiModelProperty(value = "关联人类型")
private String type;
/**
* 企业id
*/
@ApiModelProperty(value = "企业id")
private Integer companyId;
}

@ -11,6 +11,7 @@ jwt.ignoreUrlList=/apiHrmsAuth/hrms/auth/userlogin/getBackPwd,\
/api-hrms/hrms/employee/excelTemplate,\
/apiHrmsAuth/hrms/auth/userlogin/bindPhoneAndOpenId,\
/apiHrmsAuth/hrms/auth/userlogin/sendCode,\
/apiHrmsAuth/hrms/auth/userlogin/isPhoneExist
/apiHrmsAuth/hrms/auth/userlogin/isPhoneExist,\
/api-guarantee/dg-apply-amount-info/excelExport

Loading…
Cancel
Save