申请贷款上传文件信息

master
shijie 4 years ago
parent 0d6580edc6
commit 6ae5e756a5
  1. 36
      dq-financial-api/src/main/java/com/daqing/financial/guarantee/DgApplyAmountInfoControllerApi.java
  2. 10
      dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerController.java
  3. 5
      dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CompanyCustomerDao.java
  4. 3
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/CustomerService.java
  5. 8
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java
  6. 15
      dq-financial-crms/src/main/resources/mapper/crms/CompanyCustomerDao.xml
  7. 69
      dq-financial-guarantee/pom.xml
  8. 7
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/DqFinancialGuaranteeApplication.java
  9. 92
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java
  10. 9
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/CrmsFeignService.java
  11. 163
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java
  12. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/DgApplyAmountInfoRequest.java
  13. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgApplyAmountInfoResponse.java
  14. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgApplyAmountInfoService.java
  15. 71
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
  16. 11
      dq-financial-guarantee/src/main/resources/bootstrap.properties
  17. 1
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgApplyAmountInfoMapper.xml
  18. 20
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/request/DgApplyAmountInfoRequest.java
  19. 145
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/response/CompanyCustomerResponse.java
  20. 5
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java
  21. 6
      dq-govern-gateway/src/main/resources/application.yml

@ -0,0 +1,36 @@
package com.daqing.financial.guarantee;
import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
import com.daqing.framework.domain.hrms.request.LoginRequest;
import com.daqing.framework.domain.hrms.request.ResetPwdRequest;
import com.daqing.framework.domain.hrms.request.UpdatePwdRequest;
import com.daqing.framework.domain.hrms.request.UserLoginRequest;
import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
/**
* @Author: gongsj.
* @Description: 登录controllerApi定义
* @Date:Created in 2020/09/07 11:33.
* @Modified By:
*/
@Api(value = "申请贷款信息", tags = "提供申请贷款信息")
public interface DgApplyAmountInfoControllerApi {
/**
* 根据客户编号/客户名称获取企业信息
*/
@ApiOperation(value = "根据客户编号/客户名称获取企业信息", notes = "根据客户编号/客户名称获取企业信息")
ResponseResult companyInfoBySth(DgApplyAmountInfoRequest applyAmountInfo);
/* @ApiOperation(value = "业务申请")
ResponseResult businessApplication(BusinessApplicationRequest businessApplication);*/
@ApiOperation(value = "上传文件")
ResponseResult uploadFile(MultipartFile[] files)throws IOException;
}

@ -7,6 +7,7 @@ import com.daqing.framework.domain.crms.ext.CustomerCompanyTOU;
import com.daqing.framework.domain.crms.ext.CustomerPersonalTOI; import com.daqing.framework.domain.crms.ext.CustomerPersonalTOI;
import com.daqing.framework.domain.crms.ext.CustomerPersonalTOU; import com.daqing.framework.domain.crms.ext.CustomerPersonalTOU;
import com.daqing.framework.domain.crms.request.CustomerRequest; import com.daqing.framework.domain.crms.request.CustomerRequest;
import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
import com.daqing.framework.model.response.CommonCode; import com.daqing.framework.model.response.CommonCode;
import com.daqing.framework.model.response.PromptSuccess; import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;
@ -143,4 +144,13 @@ public class CustomerController implements CustomerControllerApi {
return customerService.excelImportCustomer(file); return customerService.excelImportCustomer(file);
} }
/**
* 根据客户编号/客户名称获取企业信息
*/
@PostMapping("/queryCustomerInfoById")
public ResponseResult queryCustomerInfoById(@RequestBody DgApplyAmountInfoRequest applyAmountInfo){
return customerService.queryCustomerInfoById(applyAmountInfo);
}
} }

@ -2,7 +2,10 @@ package com.daqing.financial.crms.dao;
import com.daqing.framework.domain.crms.CompanyCustomerEntity; import com.daqing.framework.domain.crms.CompanyCustomerEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
import com.daqing.framework.domain.crms.response.CompanyCustomerResponse;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/** /**
* 企业类型客户信息表 * 企业类型客户信息表
@ -20,4 +23,6 @@ public interface CompanyCustomerDao extends BaseMapper<CompanyCustomerEntity> {
boolean updateCompanyCustomer(CompanyCustomerEntity companyCustomerEntity); boolean updateCompanyCustomer(CompanyCustomerEntity companyCustomerEntity);
CompanyCustomerResponse queryCompanyInfo(@Param("applyAmountInfo") DgApplyAmountInfoRequest applyAmountInfo);
} }

@ -6,6 +6,7 @@ import com.daqing.framework.domain.crms.ext.CustomerCompanyTOU;
import com.daqing.framework.domain.crms.ext.CustomerPersonalTOI; import com.daqing.framework.domain.crms.ext.CustomerPersonalTOI;
import com.daqing.framework.domain.crms.ext.CustomerPersonalTOU; import com.daqing.framework.domain.crms.ext.CustomerPersonalTOU;
import com.daqing.framework.domain.crms.request.CustomerRequest; import com.daqing.framework.domain.crms.request.CustomerRequest;
import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.domain.crms.CustomerEntity; import com.daqing.framework.domain.crms.CustomerEntity;
@ -42,5 +43,7 @@ public interface CustomerService extends IService<CustomerEntity> {
ResponseResult excelImportCustomer(MultipartFile excel); ResponseResult excelImportCustomer(MultipartFile excel);
void excelTemplate(HttpServletResponse response); void excelTemplate(HttpServletResponse response);
ResponseResult queryCustomerInfoById(DgApplyAmountInfoRequest applyAmountInfo);
} }

@ -15,6 +15,8 @@ import com.daqing.framework.domain.crms.CustomerEntity;
import com.daqing.framework.domain.crms.PersonalCustomerEntity; import com.daqing.framework.domain.crms.PersonalCustomerEntity;
import com.daqing.framework.domain.crms.ext.*; import com.daqing.framework.domain.crms.ext.*;
import com.daqing.framework.domain.crms.request.CustomerRequest; import com.daqing.framework.domain.crms.request.CustomerRequest;
import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
import com.daqing.framework.domain.crms.response.CompanyCustomerResponse;
import com.daqing.framework.domain.crms.response.CrmsCode; import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.domain.hrms.EmployeeEntity; import com.daqing.framework.domain.hrms.EmployeeEntity;
import com.daqing.framework.domain.hrms.ext.EmployeeTO; import com.daqing.framework.domain.hrms.ext.EmployeeTO;
@ -524,4 +526,10 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
customerPersonalVO.setManager(name); customerPersonalVO.setManager(name);
return customerPersonalVO; return customerPersonalVO;
} }
@Override
public ResponseResult queryCustomerInfoById(DgApplyAmountInfoRequest applyAmountInfo) {
CompanyCustomerResponse companyCustomerResponse = companyCustomerDao.queryCompanyInfo(applyAmountInfo);
return new ResponseResult<CompanyCustomerResponse>().SUCCESS(companyCustomerResponse);
}
} }

@ -41,4 +41,19 @@
WHERE customer_id = #{customerId} WHERE customer_id = #{customerId}
</update> </update>
<!-- 根据客户编号/客户名称获取企业信息 -->
<select id="queryCompanyInfo" parameterType="com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest" resultType="com.daqing.framework.domain.crms.response.CompanyCustomerResponse">
SELECT cu.*,cc.*
FROM crms_company_customer cu
left join crms_customer cc on cu.customer_id = cc.id
<where>
<if test="applyAmountInfo.code != null and applyAmountInfo.code != '' ">
AND cc.code LIKE CONCAT('%',#{applyAmountInfo.code},'%')
</if>
<if test="applyAmountInfo.name != null and applyAmountInfo.name != '' ">
AND cc.name LIKE CONCAT('%',#{applyAmountInfo.name},'%')
</if>
</where>
</select>
</mapper> </mapper>

@ -20,76 +20,59 @@
</properties> </properties>
<dependencies> <dependencies>
<dependency> <!-- <dependency>
<groupId>com.daqing.financial</groupId> <groupId>com.daqing.financial</groupId>
<artifactId>dq-financial-api</artifactId> <artifactId>dq-financial-hrms-auth</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>-->
<!--redis-->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-data-redis</artifactId>
<version> 2.1.8.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>com.daqing.framework</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId> <artifactId>dq-framework-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency> </dependency>
<!--<dependency> <dependency>
<groupId>com.daqing.financial</groupId> <groupId>com.daqing.financial</groupId>
<artifactId>dq-financial-hrms-auth</artifactId> <artifactId>dq-financial-api</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<scope>compile</scope> <scope>compile</scope>
</dependency>--> </dependency>
<!-- <dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>5.1.6.RELEASE</version>
</dependency>-->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId> <artifactId>spring-boot-starter-web</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-cloud-starter-openfeign</artifactId>
<scope>test</scope>
</dependency> </dependency>
<!-- web项目需要的jar包 -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter</artifactId>
</dependency> </dependency>
<!-- lombok需要的jar包 -->
<!-- <dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.12</version>
</dependency>-->
<!-- MP 核心库 --> <!-- MP 核心库 -->
<dependency> <dependency>
<groupId>com.baomidou</groupId> <groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId> <artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.0.7.1</version> <version>3.0.7.1</version>
</dependency> </dependency>
<!-- 模板引擎 -->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.30</version>
</dependency>
<!-- lombok需要的jar包 -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
</dependencies> </dependencies>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<dependency> <dependency>
@ -111,10 +94,4 @@
</plugins> </plugins>
</build> </build>
</project> </project>

@ -3,12 +3,17 @@ package com.daqing.financial.guarantee;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.EnableScheduling;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
//@EnableFeignClients(basePackages = "com.daqing.financial.guarantee.feign") @EnableFeignClients(basePackages = "com.daqing.financial.guarantee.feign")
@EnableDiscoveryClient @EnableDiscoveryClient
@SpringBootApplication @SpringBootApplication
@EnableScheduling @EnableScheduling
@EnableSwagger2
@ComponentScan(basePackages = "com.daqing")
public class DqFinancialGuaranteeApplication { public class DqFinancialGuaranteeApplication {
public static void main(String[] args) { public static void main(String[] args) {

@ -1,17 +1,28 @@
package com.daqing.financial.guarantee.controller; package com.daqing.financial.guarantee.controller;
import com.daqing.financial.guarantee.model.request.DgApplyAmountInfoRequest; import com.daqing.financial.guarantee.DgApplyAmountInfoControllerApi;
import com.daqing.framework.domain.hrms.request.UpdatePwdRequest; import com.daqing.financial.guarantee.feign.CrmsFeignService;
import com.daqing.financial.guarantee.model.request.BusinessApplicationRequest;
import com.daqing.financial.guarantee.service.IDgApplyAmountInfoService;
import com.daqing.financial.guarantee.service.impl.DgApplyAmountInfoServiceImpl;
import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping; import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid; import java.io.File;
import java.io.IOException;
import java.util.List;
/** /**
* <p> * <p>
@ -21,17 +32,74 @@ import javax.validation.Valid;
* @author Qyq * @author Qyq
* @since 2020-11-05 * @since 2020-11-05
*/ */
@Api(tags = {"申请贷款信息"})
@Slf4j
@RestController @RestController
@RequestMapping("/dg-apply-amount-info") @RequestMapping("/dg-apply-amount-info")
public class DgApplyAmountInfoController { public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerApi {
@Resource
private CrmsFeignService crmsFeignService;
@Autowired
private IDgApplyAmountInfoService applyAmountInfoService;
/**
* 根据客户编号/客户名称获取企业信息
* @param applyAmountInfo
* @return
*/
@PostMapping("/companyInfoBySth") @PostMapping("/companyInfoBySth")
@ApiOperation(value = "根据客户编号/客户名称获取企业信息") @ApiOperation(value = "根据客户编号/客户名称获取企业信息")
public ResponseResult companyInfoBySth(@RequestBody DgApplyAmountInfoRequest applyAmountInfo){ public ResponseResult companyInfoBySth(@RequestBody DgApplyAmountInfoRequest applyAmountInfo){
//远程调用crms查询企业信息 //远程调用crms查询企业信息
/* boolean result = userLoginService.updatePwd(user); return crmsFeignService.queryCustomerInfoById(applyAmountInfo);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();*/ }
return ResponseResult.SUCCESS();
/**
* 业务申请
* @param businessApplication
* @return
*/
@PostMapping("/businessApplication")
@ApiOperation(value = "业务申请")
public ResponseResult businessApplication(@RequestBody BusinessApplicationRequest businessApplication){
int result = applyAmountInfoService.businessApplication(businessApplication);
return result>0 ? ResponseResult.SUCCESS("上传成功"):ResponseResult.FAIL(40004,"上传失败");
}
/**
* 上传文件
* @param files
* @return
*/
@PostMapping("/uploadFile")// 浏览器地址栏输入的路径
@ResponseBody
public ResponseResult uploadFile(@RequestParam("file")MultipartFile[] files) throws IOException {
/**
* MultipartFile类是用来接收前台传过来的文件常用的方法如下
* String getContentType() //获取文件MIME类型
* InputStream getInputStream() //获取文件流
* String getName() //获取表单中文件组件的名字
* String getOriginalFilename() //获取上传文件的原名
* long getSize() //获取文件的字节大小,单位byte,除以1024就是kb
* boolean isEmpty() //是否为空
* void transferTo(File dest) //保存到一个目标文件中。
*/
for (MultipartFile file : files) { //因为有上传多个文件,所以用的是MultipartFile[]数组,所以要遍历数组保存里面的每一个文件
String filePath = "D:\\myfile\\i\\"; // 暂时设置保存在D盘的files目录下
System.out.println(" 文件名称: " + file.getOriginalFilename());
System.out.println(" 文件大小: " + file.getSize() / 1024D + "Kb");
System.out.println(" 文件类型: " + file.getContentType());
System.out.println(" 属性名称: " + file.getName());
System.out.println();
//在这里执行调用文件保存的方法....
filePath = filePath + file.getOriginalFilename();
file.transferTo(new File(filePath));
filePath = "";
}
return ResponseResult.SUCCESS("上传成功");
} }
} }

@ -1,8 +1,11 @@
package com.daqing.financial.guarantee.feign; package com.daqing.financial.guarantee.feign;
import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import java.util.Map; import java.util.Map;
@ -15,10 +18,10 @@ public interface CrmsFeignService {
/** /**
* 根据客户编号/客户名称获取企业信息 * 根据客户编号/客户名称获取企业信息
* @param params * @param
* @return * @return
*/ */
@GetMapping("/crms/customer/list") @PostMapping("/crms/customer/queryCustomerInfoById")
ResponseResult list(@RequestParam Map<String, Object> params); ResponseResult queryCustomerInfoById(@RequestBody DgApplyAmountInfoRequest applyAmountInfo);
} }

@ -0,0 +1,163 @@
package com.daqing.financial.guarantee.model.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.math.BigDecimal;
import java.util.Date;
@Data
@ToString
public class BusinessApplicationRequest implements Serializable {
/**
* 主键id
*/
@ApiModelProperty(value = "id")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 企业id
*/
@ApiModelProperty(value = "企业id")
private Integer companyId;
/**
* 提单人id
*/
@ApiModelProperty(value = "提单人id")
private Integer presenterId;
/**
* 申请额度
*/
@ApiModelProperty(value = "申请额度")
private BigDecimal applyAmount;
/**
* 申请期限
*/
@ApiModelProperty(value = "申请期限")
private String applyTime;
/**
* 贷款银行用中划线隔开
*/
@ApiModelProperty(value = "贷款银行(用中划线隔开)")
private String bank;
/**
* 贷款用途
*/
@ApiModelProperty(value = "贷款用途")
private String amountWide;
/**
* 反担保措施中划线隔开
*/
@ApiModelProperty(value = "反担保措施(中划线隔开)")
private String enGuaranteeMeasures;
/**
* 反担保措施描述
*/
@ApiModelProperty(value = "反担保措施描述")
private String description;
/**
* 业务类型
*/
@ApiModelProperty(value = "业务类型")
private String businessType;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**
* 修改时间
*/
@ApiModelProperty(value = "修改时间")
private Date updateTime;
/**
* 营业执照复印件
*/
@ApiModelProperty(value = "营业执照复印件")
private String businessLicense;
/**
* 上传法定代表人夫妻及企业实际经营者身份证复印件
*/
@ApiModelProperty(value = "上传法定代表人夫妻及企业实际经营者身份证复印件")
private String legalCardCopy;
/**
* 法定代表人夫妻户口本结婚证离婚证复印件
*/
@ApiModelProperty(value = "法定代表人夫妻户口本,结婚证(离婚证)复印件")
private String marriageCopy;
/**
* 法定代表人身份证明
*/
@ApiModelProperty(value = "法定代表人身份证明")
private String legalCopy;
/**
* 公司章程
*/
@ApiModelProperty(value = "公司章程")
private String companyConstitution;
/**
* 会计师事务所审计的上一年度及本年度审计报告
*/
@ApiModelProperty(value = "会计师事务所审计的上一年度及本年度审计报告")
private String accountingFirm;
/**
* 企业信用报告
*/
@ApiModelProperty(value = "企业信用报告")
private String companyCredit;
/**
* 企业法人夫妇信用报告实际经营者信用报告
*/
@ApiModelProperty(value = "企业法人夫妇信用报告,实际经营者信用报告")
private String creditReport;
/**
* 征信业务授权书承诺书
*/
@ApiModelProperty(value = "征信业务授权书,承诺书")
private String certificateAuthorization;
/**
* 增值税纳税申报表首表复印件/完税证明
*/
@ApiModelProperty(value = "增值税纳税申报表首表复印件/完税证明")
private String taxCertificate;
/**
* 股东会会议纪要
*/
@ApiModelProperty(value = "股东会会议纪要")
private String meetingMinutes;
/**
* 反担保资料和评估报告
*/
@ApiModelProperty(value = "反担保资料和评估报告")
private String assessmentReport;
}

@ -1,4 +0,0 @@
package com.daqing.financial.guarantee.model.request;
public class DgApplyAmountInfoRequest {
}

@ -1,4 +0,0 @@
package com.daqing.financial.guarantee.model.response;
public class DgApplyAmountInfoResponse {
}

@ -1,6 +1,7 @@
package com.daqing.financial.guarantee.service; package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.financial.guarantee.model.request.BusinessApplicationRequest;
import com.daqing.framework.domain.guarantee.DgApplyAmountInfo; import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
/** /**
@ -13,4 +14,5 @@ import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
*/ */
public interface IDgApplyAmountInfoService extends IService<DgApplyAmountInfo> { public interface IDgApplyAmountInfoService extends IService<DgApplyAmountInfo> {
int businessApplication(BusinessApplicationRequest businessApplication);
} }

@ -1,10 +1,22 @@
package com.daqing.financial.guarantee.service.impl; package com.daqing.financial.guarantee.service.impl;
import com.daqing.financial.guarantee.mapper.DgApplyAmountInfoMapper; import com.daqing.financial.guarantee.mapper.DgApplyAmountInfoMapper;
import com.daqing.financial.guarantee.mapper.DgEnclosureInfoMapper;
import com.daqing.financial.guarantee.model.request.BusinessApplicationRequest;
import com.daqing.financial.guarantee.service.IDgApplyAmountInfoService; import com.daqing.financial.guarantee.service.IDgApplyAmountInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.framework.domain.guarantee.DgApplyAmountInfo; import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
import com.daqing.framework.domain.guarantee.DgEnclosureInfo;
import com.daqing.framework.util.RedisUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
/** /**
* <p> * <p>
@ -14,7 +26,66 @@ import org.springframework.stereotype.Service;
* @author Qyq * @author Qyq
* @since 2020-11-05 * @since 2020-11-05
*/ */
@Slf4j
@Service @Service
public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoMapper, DgApplyAmountInfo> implements IDgApplyAmountInfoService { public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoMapper, DgApplyAmountInfo> implements IDgApplyAmountInfoService {
@Resource
private DgApplyAmountInfoMapper dgApplyAmountInfoMapper;
@Resource
private DgEnclosureInfoMapper dgEnclosureInfoMapper;
@Resource
private RedisTemplate<String,String> redisTemplate;
@Override
@Transactional
public int businessApplication(BusinessApplicationRequest businessApplication) {
//获取当前登录的用户信息
String userId = null;
try{
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String token = request.getHeader("token");
userId = RedisUtil.get("dq:token:"+token);
System.out.println(userId);
} catch (Exception e) {
log.error("LogAspect 操作失败:" + e.getMessage());
e.printStackTrace();
}
//申请贷款相关信息
DgApplyAmountInfo dgApplyAmountInfo = new DgApplyAmountInfo();
dgApplyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId());
dgApplyAmountInfo.setPresenterId(Integer.parseInt(userId));
dgApplyAmountInfo.setApplyAmount(businessApplication.getApplyAmount());//申请额度
dgApplyAmountInfo.setApplyTime(businessApplication.getApplyTime());//申请期限
dgApplyAmountInfo.setBank(businessApplication.getBank());//贷款银行
dgApplyAmountInfo.setAmountWide(businessApplication.getAmountWide());//贷款用途
dgApplyAmountInfo.setEnGuaranteeMeasures(businessApplication.getEnGuaranteeMeasures());//反担保措施
dgApplyAmountInfo.setDescription(businessApplication.getDescription());//反担保措施描述
dgApplyAmountInfo.setBusinessType(businessApplication.getBusinessType());//业务类型
dgApplyAmountInfoMapper.insert(dgApplyAmountInfo);
//上传附件信息
DgEnclosureInfo dgEnclosureInfo = new DgEnclosureInfo();
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());//反担保资料和评估报告
dgEnclosureInfoMapper.insert(dgEnclosureInfo);
return 0;
}
} }

@ -24,6 +24,17 @@ spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8 spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0 spring.redis.jedis.pool.min-idle=0
# 上传文件总的最大值
spring.servlet.multipart.max-request-size=10MB
# 单个文件的最大值
spring.servlet.multipart.max-file-size=10MB
## jsp
spring.mvc.view.prefix=/WEB-INF/jsp/
spring.mvc.view.suffix=.jsp
# 正式环境(prod) # 正式环境(prod)
#服务名称 #服务名称

@ -12,6 +12,7 @@
<result column="bank" property="bank" /> <result column="bank" property="bank" />
<result column="amount_wide" property="amountWide" /> <result column="amount_wide" property="amountWide" />
<result column="en_guarantee_measures" property="enGuaranteeMeasures" /> <result column="en_guarantee_measures" property="enGuaranteeMeasures" />
<result column="description" property="description" />
<result column="business_type" property="businessType" /> <result column="business_type" property="businessType" />
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" /> <result column="update_time" property="updateTime" />

@ -0,0 +1,20 @@
package com.daqing.framework.domain.crms.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
@Data
@ToString
public class DgApplyAmountInfoRequest implements Serializable {
@ApiModelProperty(value = "客户编号")
private String code;
@ApiModelProperty(value = "客户名称")
private String name;
}

@ -0,0 +1,145 @@
package com.daqing.framework.domain.crms.response;
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 javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.Date;
/**
* 企业类型客户信息表
*
* @author gongsj
* @email gongsj@gmail.com
* @date 2020-09-08 09:57:32
*/
@Data
@TableName("crms_company_customer")
public class CompanyCustomerResponse implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键 companyId
*/
@ApiModelProperty(value = "id")
private Long id;
/**
* 注册资金
*/
@ApiModelProperty(value = "注册资金")
private String registeredCapital;
/**
* 所属行业
*/
@ApiModelProperty(value = "所属行业")
private String industry;
/**
* 成立年限
*/
@ApiModelProperty(value = "成立年限")
private Integer years;
/**
* 所在区域
*/
@ApiModelProperty(value = "所在区域")
private String region;
/**
* 股东名称
*/
@ApiModelProperty(value = "股东名称")
private String shareholder;
/**
* 关联企业
*/
@ApiModelProperty(value = "关联企业")
private String affiliatedCompany;
/**
* 员工个数
*/
@ApiModelProperty(value = "员工个数")
private String empNum;
/**
* 联系人
*/
@ApiModelProperty(value = "联系人")
private String linkman;
/**
* 业务来源
*/
@ApiModelProperty(value = "业务来源")
private String businessSource;
/**
* 客户基本信息表id
*/
@ApiModelProperty(value = "客户基本信息表id")
private Long customerId;
/**
* 客户编号
*/
@ApiModelProperty(value = "客户编号")
private String code;
/**
* 客户类型1企业类型0个人类型
*/
@NotNull(message = "客户类型不能为空")
@ApiModelProperty(value = "客户类型")
//@Pattern(regexp = "^\\\\d+$",message = "成立年限只能为整形数字")
private Integer type;
/**
* 客户的经理人id
*/
@ApiModelProperty(value = "客户经理人id")
private Long manager;
/**
* 客户名称
*/
@ApiModelProperty(value = "客户名称")
private String name;
/**
* 联系地址
*/
@ApiModelProperty(value = "联系地址")
private String addr;
/**
* 联系电话
*/
@NotNull(message = "联系电话不能为空")
@ApiModelProperty(value = "联系电话")
private String phone;
/**
* 密码
*/
@ApiModelProperty(value = "密码")
private String password;
/**
* 微信唯一标识
*/
@ApiModelProperty(value = "微信唯一标识")
private String wechatId;
/**
* 0未删除1已删除
*/
@ApiModelProperty(value = "是否删除")
private Integer delOrNot;
/**
* 0启用1禁用
*/
@ApiModelProperty(value = "是否禁用")
private Integer status;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**
* 修改时间
*/
@ApiModelProperty(value = "修改时间")
private Date motifyTime;
}

@ -79,4 +79,9 @@ public class DgApplyAmountInfo implements Serializable {
*/ */
private Date updateTime; private Date updateTime;
/**
* 反担保措施描述
*/
private String description;
} }

@ -30,3 +30,9 @@ spring:
- Path=/apiHrmsAuth/** - Path=/apiHrmsAuth/**
filters: filters:
- RewritePath=/apiHrmsAuth/(?<segment>.*), /$\{segment} - RewritePath=/apiHrmsAuth/(?<segment>.*), /$\{segment}
- id: guarantee_route
uri: http://localhost:8090/dq-financial-guarantee
predicates:
- Path=/api-guarantee/**
filters:
- RewritePath=/api-guarantee/(?<segment>.*), /$\{segment}
Loading…
Cancel
Save