From 6ae5e756a5787b8e0de236d2b05f9da48ded2641 Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Fri, 6 Nov 2020 21:05:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E8=B4=B7=E6=AC=BE=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E6=96=87=E4=BB=B6=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DgApplyAmountInfoControllerApi.java | 36 ++++ .../crms/controller/CustomerController.java | 10 ++ .../crms/dao/CompanyCustomerDao.java | 5 + .../crms/service/CustomerService.java | 3 + .../service/impl/CustomerServiceImpl.java | 8 + .../mapper/crms/CompanyCustomerDao.xml | 15 ++ dq-financial-guarantee/pom.xml | 77 +++------ .../DqFinancialGuaranteeApplication.java | 7 +- .../DgApplyAmountInfoController.java | 92 ++++++++-- .../guarantee/feign/CrmsFeignService.java | 9 +- .../request/BusinessApplicationRequest.java | 163 ++++++++++++++++++ .../request/DgApplyAmountInfoRequest.java | 4 - .../response/DgApplyAmountInfoResponse.java | 4 - .../service/IDgApplyAmountInfoService.java | 2 + .../impl/DgApplyAmountInfoServiceImpl.java | 71 ++++++++ .../src/main/resources/bootstrap.properties | 11 ++ .../guarantee/DgApplyAmountInfoMapper.xml | 1 + .../request/DgApplyAmountInfoRequest.java | 20 +++ .../response/CompanyCustomerResponse.java | 145 ++++++++++++++++ .../domain/guarantee/DgApplyAmountInfo.java | 5 + .../src/main/resources/application.yml | 8 +- 21 files changed, 621 insertions(+), 75 deletions(-) create mode 100644 dq-financial-api/src/main/java/com/daqing/financial/guarantee/DgApplyAmountInfoControllerApi.java create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java delete mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/DgApplyAmountInfoRequest.java delete mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgApplyAmountInfoResponse.java create mode 100644 dq-framework-model/src/main/java/com/daqing/framework/domain/crms/request/DgApplyAmountInfoRequest.java create mode 100644 dq-framework-model/src/main/java/com/daqing/framework/domain/crms/response/CompanyCustomerResponse.java diff --git a/dq-financial-api/src/main/java/com/daqing/financial/guarantee/DgApplyAmountInfoControllerApi.java b/dq-financial-api/src/main/java/com/daqing/financial/guarantee/DgApplyAmountInfoControllerApi.java new file mode 100644 index 00000000..ed203a8d --- /dev/null +++ b/dq-financial-api/src/main/java/com/daqing/financial/guarantee/DgApplyAmountInfoControllerApi.java @@ -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; + +} diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerController.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerController.java index 19061103..d6d021c4 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerController.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerController.java @@ -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.CustomerPersonalTOU; 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.PromptSuccess; import com.daqing.framework.model.response.ResponseResult; @@ -143,4 +144,13 @@ public class CustomerController implements CustomerControllerApi { return customerService.excelImportCustomer(file); } + + /** + * 根据客户编号/客户名称获取企业信息 + */ + @PostMapping("/queryCustomerInfoById") + public ResponseResult queryCustomerInfoById(@RequestBody DgApplyAmountInfoRequest applyAmountInfo){ + + return customerService.queryCustomerInfoById(applyAmountInfo); + } } diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CompanyCustomerDao.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CompanyCustomerDao.java index c03e0529..33914479 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CompanyCustomerDao.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CompanyCustomerDao.java @@ -2,7 +2,10 @@ package com.daqing.financial.crms.dao; import com.daqing.framework.domain.crms.CompanyCustomerEntity; 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.Param; /** * 企业类型客户信息表 @@ -20,4 +23,6 @@ public interface CompanyCustomerDao extends BaseMapper { boolean updateCompanyCustomer(CompanyCustomerEntity companyCustomerEntity); + CompanyCustomerResponse queryCompanyInfo(@Param("applyAmountInfo") DgApplyAmountInfoRequest applyAmountInfo); + } diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/CustomerService.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/CustomerService.java index 1b27c409..c2e7cf89 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/CustomerService.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/CustomerService.java @@ -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.CustomerPersonalTOU; 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.utils.PageUtils; import com.daqing.framework.domain.crms.CustomerEntity; @@ -42,5 +43,7 @@ public interface CustomerService extends IService { ResponseResult excelImportCustomer(MultipartFile excel); void excelTemplate(HttpServletResponse response); + + ResponseResult queryCustomerInfoById(DgApplyAmountInfoRequest applyAmountInfo); } diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java index 554020df..c929ccbc 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java @@ -15,6 +15,8 @@ import com.daqing.framework.domain.crms.CustomerEntity; import com.daqing.framework.domain.crms.PersonalCustomerEntity; import com.daqing.framework.domain.crms.ext.*; 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.hrms.EmployeeEntity; import com.daqing.framework.domain.hrms.ext.EmployeeTO; @@ -524,4 +526,10 @@ public class CustomerServiceImpl extends ServiceImpl().SUCCESS(companyCustomerResponse); + } } \ No newline at end of file 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 7ca13ac9..a7c56b6a 100644 --- a/dq-financial-crms/src/main/resources/mapper/crms/CompanyCustomerDao.xml +++ b/dq-financial-crms/src/main/resources/mapper/crms/CompanyCustomerDao.xml @@ -41,4 +41,19 @@ WHERE customer_id = #{customerId} + + + \ No newline at end of file diff --git a/dq-financial-guarantee/pom.xml b/dq-financial-guarantee/pom.xml index 01d10e51..b562ea92 100644 --- a/dq-financial-guarantee/pom.xml +++ b/dq-financial-guarantee/pom.xml @@ -20,76 +20,59 @@ - + + org.springframework.boot - spring-boot-starter-web + spring-boot-starter-data-redis + 2.1.8.RELEASE - org.springframework.cloud - spring-cloud-starter-openfeign + com.daqing.framework + dq-framework-common + 1.0-SNAPSHOT - - - - - org.springframework.boot - spring-boot-starter - - - org.springframework.boot - spring-boot-starter-test - test - - - org.springframework.boot spring-boot-starter-web - - - - com.baomidou - mybatis-plus-boot-starter - 3.0.7.1 - - - org.apache.velocity - velocity-engine-core - 2.0 + org.springframework.cloud + spring-cloud-starter-openfeign + - org.freemarker - freemarker - 2.3.30 + org.springframework.boot + spring-boot-starter - - + + + + + com.baomidou + mybatis-plus-boot-starter + 3.0.7.1 + + @@ -111,10 +94,4 @@ - - - - - - diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/DqFinancialGuaranteeApplication.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/DqFinancialGuaranteeApplication.java index 4bdf632e..5702e99f 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/DqFinancialGuaranteeApplication.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/DqFinancialGuaranteeApplication.java @@ -3,12 +3,17 @@ package com.daqing.financial.guarantee; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; 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 springfox.documentation.swagger2.annotations.EnableSwagger2; -//@EnableFeignClients(basePackages = "com.daqing.financial.guarantee.feign") +@EnableFeignClients(basePackages = "com.daqing.financial.guarantee.feign") @EnableDiscoveryClient @SpringBootApplication @EnableScheduling +@EnableSwagger2 +@ComponentScan(basePackages = "com.daqing") public class DqFinancialGuaranteeApplication { public static void main(String[] args) { diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java index 4acb5849..8dade081 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java @@ -1,17 +1,28 @@ package com.daqing.financial.guarantee.controller; -import com.daqing.financial.guarantee.model.request.DgApplyAmountInfoRequest; -import com.daqing.framework.domain.hrms.request.UpdatePwdRequest; +import com.daqing.financial.guarantee.DgApplyAmountInfoControllerApi; +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 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 lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +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.validation.Valid; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import java.io.File; +import java.io.IOException; +import java.util.List; /** *

@@ -21,17 +32,74 @@ import javax.validation.Valid; * @author Qyq * @since 2020-11-05 */ +@Api(tags = {"申请贷款信息"}) +@Slf4j @RestController @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") @ApiOperation(value = "根据客户编号/客户名称获取企业信息") public ResponseResult companyInfoBySth(@RequestBody DgApplyAmountInfoRequest applyAmountInfo){ //远程调用crms查询企业信息 -/* boolean result = userLoginService.updatePwd(user); - return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();*/ -return ResponseResult.SUCCESS(); + return crmsFeignService.queryCustomerInfoById(applyAmountInfo); + } + + /** + * 业务申请 + * @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("上传成功"); } } 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 eab14cab..0368dd4b 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,8 +1,11 @@ package com.daqing.financial.guarantee.feign; +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.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; import java.util.Map; @@ -15,10 +18,10 @@ public interface CrmsFeignService { /** * 根据客户编号/客户名称获取企业信息 - * @param params + * @param * @return */ - @GetMapping("/crms/customer/list") - ResponseResult list(@RequestParam Map params); + @PostMapping("/crms/customer/queryCustomerInfoById") + ResponseResult queryCustomerInfoById(@RequestBody DgApplyAmountInfoRequest applyAmountInfo); } 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 new file mode 100644 index 00000000..5d1dbdd9 --- /dev/null +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java @@ -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; + +} diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/DgApplyAmountInfoRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/DgApplyAmountInfoRequest.java deleted file mode 100644 index 0aa2fb86..00000000 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/DgApplyAmountInfoRequest.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.daqing.financial.guarantee.model.request; - -public class DgApplyAmountInfoRequest { -} diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgApplyAmountInfoResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgApplyAmountInfoResponse.java deleted file mode 100644 index 0bb9815e..00000000 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgApplyAmountInfoResponse.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.daqing.financial.guarantee.model.response; - -public class DgApplyAmountInfoResponse { -} diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgApplyAmountInfoService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgApplyAmountInfoService.java index 8e4c03b0..1ecb00b6 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgApplyAmountInfoService.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgApplyAmountInfoService.java @@ -1,6 +1,7 @@ package com.daqing.financial.guarantee.service; import com.baomidou.mybatisplus.extension.service.IService; +import com.daqing.financial.guarantee.model.request.BusinessApplicationRequest; import com.daqing.framework.domain.guarantee.DgApplyAmountInfo; /** @@ -13,4 +14,5 @@ import com.daqing.framework.domain.guarantee.DgApplyAmountInfo; */ public interface IDgApplyAmountInfoService extends IService { + int businessApplication(BusinessApplicationRequest businessApplication); } 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 e283b05a..85f2d4a7 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 @@ -1,10 +1,22 @@ package com.daqing.financial.guarantee.service.impl; 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.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 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.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; /** *

@@ -14,7 +26,66 @@ import org.springframework.stereotype.Service; * @author Qyq * @since 2020-11-05 */ +@Slf4j @Service public class DgApplyAmountInfoServiceImpl extends ServiceImpl implements IDgApplyAmountInfoService { + @Resource + private DgApplyAmountInfoMapper dgApplyAmountInfoMapper; + + @Resource + private DgEnclosureInfoMapper dgEnclosureInfoMapper; + @Resource + private RedisTemplate 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; + } } diff --git a/dq-financial-guarantee/src/main/resources/bootstrap.properties b/dq-financial-guarantee/src/main/resources/bootstrap.properties index c7744551..3c959dd4 100644 --- a/dq-financial-guarantee/src/main/resources/bootstrap.properties +++ b/dq-financial-guarantee/src/main/resources/bootstrap.properties @@ -24,6 +24,17 @@ spring.redis.jedis.pool.max-wait=-1 spring.redis.jedis.pool.max-idle=8 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) #服务名称 diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgApplyAmountInfoMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgApplyAmountInfoMapper.xml index 7b066409..35f65277 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgApplyAmountInfoMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgApplyAmountInfoMapper.xml @@ -12,6 +12,7 @@ + diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/request/DgApplyAmountInfoRequest.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/request/DgApplyAmountInfoRequest.java new file mode 100644 index 00000000..aada3da3 --- /dev/null +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/request/DgApplyAmountInfoRequest.java @@ -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; + + +} diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/response/CompanyCustomerResponse.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/response/CompanyCustomerResponse.java new file mode 100644 index 00000000..a171afa2 --- /dev/null +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/response/CompanyCustomerResponse.java @@ -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; + +} diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java index b8360a3c..a7eff86e 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java @@ -79,4 +79,9 @@ public class DgApplyAmountInfo implements Serializable { */ private Date updateTime; + /** + * 反担保措施描述 + */ + private String description; + } diff --git a/dq-govern-gateway/src/main/resources/application.yml b/dq-govern-gateway/src/main/resources/application.yml index c742607e..9a59ab1a 100644 --- a/dq-govern-gateway/src/main/resources/application.yml +++ b/dq-govern-gateway/src/main/resources/application.yml @@ -29,4 +29,10 @@ spring: predicates: - Path=/apiHrmsAuth/** filters: - - RewritePath=/apiHrmsAuth/(?.*), /$\{segment} \ No newline at end of file + - RewritePath=/apiHrmsAuth/(?.*), /$\{segment} + - id: guarantee_route + uri: http://localhost:8090/dq-financial-guarantee + predicates: + - Path=/api-guarantee/** + filters: + - RewritePath=/api-guarantee/(?.*), /$\{segment} \ No newline at end of file