diff --git a/dq-financial-crms/pom.xml b/dq-financial-crms/pom.xml index 6f2f5867..4b6eac05 100644 --- a/dq-financial-crms/pom.xml +++ b/dq-financial-crms/pom.xml @@ -55,6 +55,12 @@ + + org.freemarker + freemarker + 2.3.28 + compile + diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/config/MyBatisPlusCodeGenerator.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/config/MyBatisPlusCodeGenerator.java new file mode 100644 index 00000000..3ecfb5e6 --- /dev/null +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/config/MyBatisPlusCodeGenerator.java @@ -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 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(); + } +} diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CrmsCompanyPersonalController.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CrmsCompanyPersonalController.java new file mode 100644 index 00000000..af85d191 --- /dev/null +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CrmsCompanyPersonalController.java @@ -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; + +/** + *

+ * 关联人/关联企业 前端控制器 + *

+ * + * @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().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().eq("id",id)); + + return ResponseResult.SUCCESS(crmsCompanyPersonal); + } +} diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CrmsCustomerRelatedController.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CrmsCustomerRelatedController.java new file mode 100644 index 00000000..4da79e82 --- /dev/null +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CrmsCustomerRelatedController.java @@ -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; + +/** + *

+ * 客户关联表 前端控制器 + *

+ * + * @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(); + } +} diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/mapper/CrmsCompanyPersonalMapper.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/mapper/CrmsCompanyPersonalMapper.java new file mode 100644 index 00000000..8bd2b943 --- /dev/null +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/mapper/CrmsCompanyPersonalMapper.java @@ -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; + +/** + *

+ * 关联人/关联企业 Mapper 接口 + *

+ * + * @author Qyq + * @since 2020-11-13 + */ +@Mapper +public interface CrmsCompanyPersonalMapper extends BaseMapper { + IPage pageByCondition(Page page); + + boolean updateIsExistRelated(@Param("id") Integer id, @Param("isExistRelated") Integer isExistRelated); +} diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/mapper/CrmsCustomerRelatedMapper.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/mapper/CrmsCustomerRelatedMapper.java new file mode 100644 index 00000000..e3690807 --- /dev/null +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/mapper/CrmsCustomerRelatedMapper.java @@ -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; + +/** + *

+ * 客户关联表 Mapper 接口 + *

+ * + * @author Qyq + * @since 2020-11-12 + */ +@Mapper +public interface CrmsCustomerRelatedMapper extends BaseMapper { + + boolean deleteByIds(@Param("ids") List ids); +} diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/ICrmsCompanyPersonalService.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/ICrmsCompanyPersonalService.java new file mode 100644 index 00000000..a95768b3 --- /dev/null +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/ICrmsCompanyPersonalService.java @@ -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; + +/** + *

+ * 关联人/关联企业 服务类 + *

+ * + * @author Qyq + * @since 2020-11-13 + */ +public interface ICrmsCompanyPersonalService extends IService { + + PageUtils queryPage(Integer page, Integer size); + + boolean updateIsExistRelated(Integer id, Integer isExistRelated); +} diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/ICrmsCustomerRelatedService.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/ICrmsCustomerRelatedService.java new file mode 100644 index 00000000..a1696555 --- /dev/null +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/ICrmsCustomerRelatedService.java @@ -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; + +/** + *

+ * 客户关联表 服务类 + *

+ * + * @author Qyq + * @since 2020-11-12 + */ +public interface ICrmsCustomerRelatedService extends IService { + + boolean deleteByRelateIds(List asList); +} diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CrmsCompanyPersonalServiceImpl.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CrmsCompanyPersonalServiceImpl.java new file mode 100644 index 00000000..bc7ee781 --- /dev/null +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CrmsCompanyPersonalServiceImpl.java @@ -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; + +/** + *

+ * 关联人/关联企业 服务实现类 + *

+ * + * @author Qyq + * @since 2020-11-13 + */ +@Service +public class CrmsCompanyPersonalServiceImpl extends ServiceImpl implements ICrmsCompanyPersonalService { + @Override + public PageUtils queryPage(Integer page, Integer size) { + //分页参数 + if (page <= 0) { + page = 1; + } + if (size <= 0) { + size = 10; + } + IPage 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); + } +} diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CrmsCustomerRelatedServiceImpl.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CrmsCustomerRelatedServiceImpl.java new file mode 100644 index 00000000..1bf9796b --- /dev/null +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CrmsCustomerRelatedServiceImpl.java @@ -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; + +/** + *

+ * 客户关联表 服务实现类 + *

+ * + * @author Qyq + * @since 2020-11-12 + */ +@Service +public class CrmsCustomerRelatedServiceImpl extends ServiceImpl implements ICrmsCustomerRelatedService { + + @Override + public boolean deleteByRelateIds(List ids) { + return this.getBaseMapper().deleteByIds(ids); + } +} diff --git a/dq-financial-crms/src/main/resources/mapper/crms/CompanyCustomerDao.xml b/dq-financial-crms/src/main/resources/mapper/crms/CompanyCustomerDao.xml index 2d05cc87..b0bbc85d 100644 --- a/dq-financial-crms/src/main/resources/mapper/crms/CompanyCustomerDao.xml +++ b/dq-financial-crms/src/main/resources/mapper/crms/CompanyCustomerDao.xml @@ -15,6 +15,7 @@ + diff --git a/dq-financial-crms/src/main/resources/mapper/crms/CrmsCompanyPersonalMapper.xml b/dq-financial-crms/src/main/resources/mapper/crms/CrmsCompanyPersonalMapper.xml new file mode 100644 index 00000000..e50107d1 --- /dev/null +++ b/dq-financial-crms/src/main/resources/mapper/crms/CrmsCompanyPersonalMapper.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + update crms_company_customer set is_exist_related=#{isExistRelated} where id=#{id} + + + + + diff --git a/dq-financial-crms/src/main/resources/mapper/crms/CrmsCustomerRelatedMapper.xml b/dq-financial-crms/src/main/resources/mapper/crms/CrmsCustomerRelatedMapper.xml new file mode 100644 index 00000000..2b0cda30 --- /dev/null +++ b/dq-financial-crms/src/main/resources/mapper/crms/CrmsCustomerRelatedMapper.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + delete from crms_customer_related where related_id in + + #{id} + + + + diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgBankController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgBankController.java index e8cb9a8a..c3ab02c2 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgBankController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgBankController.java @@ -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 { diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/CrmsFeignService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/CrmsFeignService.java index e8d4f79a..70129446 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/CrmsFeignService.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/CrmsFeignService.java @@ -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); } \ No newline at end of file diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java index 1b031eca..34934264 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java @@ -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; + } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java index 8c99c2a1..ca685dbb 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java @@ -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().eq("business_id",businessApplication.getId())); @@ -231,7 +247,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl employeeMessage = hrmsFeignService.getAccountAndDeptNameById(Long.valueOf(userId)); + ResponseResult employeeMessage = hrmsFeignService.getAccountAndDeptNameById(5l); try { List list = this.getBaseMapper().excelList(); diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CompanyCustomerEntity.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CompanyCustomerEntity.java index a56b57f8..6e25b3b5 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CompanyCustomerEntity.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CompanyCustomerEntity.java @@ -84,4 +84,10 @@ public class CompanyCustomerEntity implements Serializable { @ApiModelProperty(value = "客户基本信息表id") private Long customerId; + /** + * 是否存在关联人 + */ + @ApiModelProperty(value = "是否存在关联人") + private Integer isExistRelated; + } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CrmsCompanyPersonal.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CrmsCompanyPersonal.java new file mode 100644 index 00000000..c9707fd1 --- /dev/null +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CrmsCompanyPersonal.java @@ -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; + +/** + *

+ * 关联人/关联企业 + *

+ * + * @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; + + /** + * 性别:1、男,0、女 + */ + @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; +} diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CrmsCustomerRelated.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CrmsCustomerRelated.java new file mode 100644 index 00000000..d1d6bc02 --- /dev/null +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CrmsCustomerRelated.java @@ -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; + +/** + *

+ * 客户关联表 + *

+ * + * @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; +} diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/request/CompanyPersonalRequest.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/request/CompanyPersonalRequest.java new file mode 100644 index 00000000..6abe2738 --- /dev/null +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/request/CompanyPersonalRequest.java @@ -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; + + /** + * 性别:1、男,0、女 + */ + @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; + +} diff --git a/dq-govern-gateway/src/main/resources/jwt.properties b/dq-govern-gateway/src/main/resources/jwt.properties index c4f46e52..4b24fd18 100644 --- a/dq-govern-gateway/src/main/resources/jwt.properties +++ b/dq-govern-gateway/src/main/resources/jwt.properties @@ -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