Merge remote-tracking branch 'origin/master'

# Conflicts:
#	dq-financial-crms/src/main/resources/bootstrap.properties
#	dq-financial-guarantee/src/main/resources/bootstrap.properties
#	dq-financial-hrms-auth/src/main/resources/bootstrap.properties
master
shijie 4 years ago
commit 5e79ce0b9c
  1. 3
      dq-financial-api/src/main/java/com/daqing/financial/hrms/UserControllerApi.java
  2. BIN
      dq-financial-api/target/classes/com/daqing/financial/config/SwaggerConfig.class
  3. BIN
      dq-financial-api/target/classes/com/daqing/financial/crms/CustomerControllerApi.class
  4. BIN
      dq-financial-api/target/classes/com/daqing/financial/hrauth/UserLoginControllerApi.class
  5. BIN
      dq-financial-api/target/classes/com/daqing/financial/hrms/DeptControllerApi.class
  6. BIN
      dq-financial-api/target/classes/com/daqing/financial/hrms/EmployeeControllerApi.class
  7. BIN
      dq-financial-api/target/classes/com/daqing/financial/hrms/PermissionControllerApi.class
  8. BIN
      dq-financial-api/target/classes/com/daqing/financial/hrms/PositionControllerApi.class
  9. 33
      dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerAppletController.java
  10. 13
      dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CustomerAppletDao.java
  11. 5
      dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyAppletRequest.java
  12. 3
      dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/PersonalAppletRequest.java
  13. 43
      dq-financial-crms/src/main/java/com/daqing/financial/crms/model/response/ApplicationRecordResponse.java
  14. 25
      dq-financial-crms/src/main/java/com/daqing/financial/crms/model/response/ApplyDetailResponse.java
  15. 10
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/CustomerAppletService.java
  16. 143
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerAppletServiceImpl.java
  17. 50
      dq-financial-crms/src/main/resources/mapper/crms/CustomerAppletDao.xml
  18. 2
      dq-financial-crms/src/main/resources/mapper/crms/PersonalCustomerDao.xml
  19. 12
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/UserController.java
  20. 2
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/UserDao.java
  21. 2
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/UserService.java
  22. 14
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/UserServiceImpl.java
  23. 2
      dq-financial-hrms/src/main/resources/bootstrap.properties
  24. 4
      dq-financial-hrms/src/main/resources/mapper/hrms/UserDao.xml
  25. BIN
      dq-framework-common/target/classes/com/daqing/framework/SpringContextHolder.class
  26. BIN
      dq-framework-common/target/classes/com/daqing/framework/client/DqFinancialList.class
  27. BIN
      dq-framework-common/target/classes/com/daqing/framework/exception/CustomException.class
  28. BIN
      dq-framework-common/target/classes/com/daqing/framework/exception/ExceptionCast.class
  29. BIN
      dq-framework-common/target/classes/com/daqing/framework/exception/ExceptionCatch.class
  30. BIN
      dq-framework-common/target/classes/com/daqing/framework/model/Constant$CloudService.class
  31. BIN
      dq-framework-common/target/classes/com/daqing/framework/model/Constant$MenuType.class
  32. BIN
      dq-framework-common/target/classes/com/daqing/framework/model/Constant$ScheduleStatus.class
  33. BIN
      dq-framework-common/target/classes/com/daqing/framework/model/Constant.class
  34. BIN
      dq-framework-common/target/classes/com/daqing/framework/model/request/RequestData.class
  35. BIN
      dq-framework-common/target/classes/com/daqing/framework/model/response/CommonCode.class
  36. BIN
      dq-framework-common/target/classes/com/daqing/framework/model/response/PromptSuccess.class
  37. BIN
      dq-framework-common/target/classes/com/daqing/framework/model/response/ResponseResult.class
  38. BIN
      dq-framework-common/target/classes/com/daqing/framework/model/response/ResultCode.class
  39. BIN
      dq-framework-common/target/classes/com/daqing/framework/util/BasePage.class
  40. BIN
      dq-framework-common/target/classes/com/daqing/framework/util/JwtUtils.class
  41. BIN
      dq-framework-common/target/classes/com/daqing/framework/util/Md5Util.class
  42. BIN
      dq-framework-common/target/classes/com/daqing/framework/util/RandomUtil.class
  43. BIN
      dq-framework-common/target/classes/com/daqing/framework/util/RedisUtil.class
  44. BIN
      dq-framework-common/target/classes/com/daqing/framework/util/SendSMS.class
  45. BIN
      dq-framework-common/target/classes/com/daqing/framework/web/BaseController.class
  46. BIN
      dq-framework-common/target/classes/com/daqing/framework/xss/SQLFilter.class
  47. 50
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/ApplicationRecordPO.java
  48. 33
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/ApplyDetailPO.java
  49. 1
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyDTO.java
  50. 5
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/response/CrmsCode.java
  51. 1
      dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/response/HrmsCode.java
  52. BIN
      dq-framework-model/target/classes/META-INF/dq-framework-model.kotlin_module
  53. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/CompanyCustomerEntity.class
  54. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/CustomerEntity.class
  55. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/PersonalCustomerEntity.class
  56. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/ext/CompanyTemplate.class
  57. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/ext/CrmsConstant$CustomerType.class
  58. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/ext/CrmsConstant.class
  59. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/ext/CustomerCompanyDTO.class
  60. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/ext/CustomerCompanyTOI.class
  61. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/ext/CustomerCompanyTOU.class
  62. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/ext/CustomerCompanyVO.class
  63. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/ext/CustomerPersonalDTO.class
  64. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/ext/CustomerPersonalTOI.class
  65. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/ext/CustomerPersonalTOU.class
  66. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/ext/CustomerPersonalVO.class
  67. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/ext/CustomerTO.class
  68. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/ext/ManagerName.class
  69. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/ext/PersonalTemplate.class
  70. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/request/CustomerRequest.class
  71. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/response/CrmsCode.class
  72. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/DepartmentVO.class
  73. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/DeptEntity.class
  74. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/DeptPositionEntity.class
  75. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/EmployeeDeptEntity.class
  76. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/EmployeeEntity.class
  77. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/EmployeePositionEntity.class
  78. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/EmployeeRoleEntity.class
  79. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/LoginLog.class
  80. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/PermissionEntity.class
  81. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/PositionEntity.class
  82. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/RoleEntity.class
  83. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/RolePermissionEntity.class
  84. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/SystemLog$SystemLogBuilder.class
  85. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/SystemLog.class
  86. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/Token.class
  87. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/UserEntity.class
  88. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/ext/EmployeeTO.class
  89. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/ext/EmployeeVO.class
  90. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/ext/PositionVO.class
  91. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/request/DeptAddRequest.class
  92. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/request/DeptUpdateSortRequest.class
  93. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/request/LoginRequest.class
  94. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/request/PermissionAddRequest.class
  95. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/request/PositionRequest.class
  96. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/request/UserLoginRequest.class
  97. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/response/HrmsCode.class
  98. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/response/LoginResponse.class
  99. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/response/PositionResponse.class
  100. BIN
      dq-framework-utils/target/classes/com/daqing/framework/utils/PageUtils.class
  101. Some files were not shown because too many files have changed in this diff Show More

@ -36,4 +36,7 @@ public interface UserControllerApi {
@ApiOperation(value = "图像文件上传", notes = "图像文件上传")
ResponseResult uploadFile(MultipartFile file);
@ApiOperation(value = "更新员工图像(小程序端)", notes = "更新员工图像(小程序端)")
ResponseResult updateHeadPortraitUrl(String headPortraitUrl);
}

@ -3,6 +3,8 @@ package com.daqing.financial.crms.controller;
import com.daqing.financial.crms.model.request.CompanyAppletRequest;
import com.daqing.financial.crms.model.request.CompanyCustomerRequest;
import com.daqing.financial.crms.model.request.PersonalAppletRequest;
import com.daqing.financial.crms.model.response.ApplicationRecordResponse;
import com.daqing.financial.crms.model.response.ApplyDetailResponse;
import com.daqing.financial.crms.service.CustomerAppletService;
import com.daqing.framework.domain.crms.ext.CustomerPersonalTOI;
import com.daqing.framework.model.response.ResponseResult;
@ -94,4 +96,35 @@ public class CustomerAppletController {
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
/**
* 申请记录
*/
@GetMapping("/get/record")
@ApiOperation(value = "获取申请记录", response = ApplicationRecordResponse.class)
public ResponseResult getApplicationRecord(@RequestParam("page") Integer page,
@RequestParam("size") Integer size, Integer type, Integer status) {
return ResponseResult.SUCCESS(customerAppletService.getApplicationRecord(page, size, type, status));
}
/**
* 获取申请额度
*/
@GetMapping("/get/apply/mount")
@ApiOperation(value = "获取已申请额度")
public ResponseResult getApplyMount() {
return ResponseResult.SUCCESS(customerAppletService.getApplyMount());
}
/**
* 获取申请记录详情
*/
@GetMapping("/get/apply/detail")
@ApiOperation(value = "获取申请记录详情", response = ApplyDetailResponse.class)
public ResponseResult getApplyDetail(@RequestParam("id") Integer id) {
return ResponseResult.SUCCESS(customerAppletService.getApplyDetail(id));
}
}

@ -1,10 +1,16 @@
package com.daqing.financial.crms.dao;
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.CustomerEntity;
import com.daqing.framework.domain.crms.ext.ApplicationRecordPO;
import com.daqing.framework.domain.crms.ext.ApplyDetailPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 客户小程序认证(录入)
*
@ -23,4 +29,11 @@ public interface CustomerAppletDao extends BaseMapper<CustomerEntity> {
Boolean updateCustomer(@Param("customer") CustomerEntity customerEntity);
Integer getCompanyId(Integer customerId);
IPage<ApplicationRecordPO> getApplicationRecord(Page page, @Param("companyId")Integer companyId, @Param("status")Integer status);
List<ApplicationRecordPO> getApplyMount(Integer companyId);
ApplyDetailPO getApplyDetail(Integer id);
}

@ -1,5 +1,6 @@
package com.daqing.financial.crms.model.request;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
@ -33,6 +34,7 @@ public class CompanyAppletRequest implements Serializable {
@ApiModelProperty(value = "联系电话")
private String phone;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value = "注册时间")
private Date registerTime;
@ -89,4 +91,7 @@ public class CompanyAppletRequest implements Serializable {
@ApiModelProperty(value = "关联人id")
private List<Integer> relatedId;
@ApiModelProperty("企业客户表id,即查询关联人所需的id")
private Integer customerId;
}

@ -20,6 +20,9 @@ import java.io.Serializable;
@ToString
public class PersonalAppletRequest implements Serializable {
@ApiModelProperty("客户表id")
private Long companyId;
@NotNull(message = "客户名称不能为空")
@ApiModelProperty(value = "客户名称")
private String name;

@ -0,0 +1,43 @@
package com.daqing.financial.crms.model.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.util.Date;
/**
* 申请记录响应类
*
* @auther River
* @date 2021/2/22 11:33
*/
@Data
@ToString
public class ApplicationRecordResponse implements Serializable {
@ApiModelProperty("id")
private Integer id;
@ApiModelProperty("客户类型")
private Integer type;
@ApiModelProperty("贷款用途")
private String amountWide;
@ApiModelProperty("申请额度")
private Double applyAmount;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty("申请日期")
private Date applyDate;
@ApiModelProperty("申请期限")
private String applyTime;
@ApiModelProperty("状态,0:已完成,1:已受理,2:审核中,3:拒绝,4:驳回,5:撤销")
private Integer status;
}

@ -0,0 +1,25 @@
package com.daqing.financial.crms.model.response;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
/**
* 申请记录详情返回类
*
* @auther River
* @date 2021/2/24 10:12
*/
@Data
@ToString
public class ApplyDetailResponse implements Serializable {
@ApiModelProperty("状态")
private Integer status;
@ApiModelProperty("审核意见/拒绝、驳回意见")
private String remark;
}

@ -3,8 +3,12 @@ package com.daqing.financial.crms.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.financial.crms.model.request.CompanyAppletRequest;
import com.daqing.financial.crms.model.request.PersonalAppletRequest;
import com.daqing.financial.crms.model.response.ApplicationRecordResponse;
import com.daqing.financial.crms.model.response.ApplyDetailResponse;
import com.daqing.framework.domain.crms.CustomerEntity;
import com.daqing.framework.utils.PageUtils;
import java.util.List;
import java.util.Map;
/**
@ -26,4 +30,10 @@ public interface CustomerAppletService extends IService<CustomerEntity> {
Boolean updatePersonal(PersonalAppletRequest personalAppletRequest);
Boolean updateCompany(CompanyAppletRequest companyAppletRequest);
PageUtils getApplicationRecord(Integer page, Integer size, Integer type, Integer status);
Map getApplyMount();
ApplyDetailResponse getApplyDetail(Integer id);
}

@ -1,6 +1,8 @@
package com.daqing.financial.crms.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.crms.dao.CompanyCustomerDao;
import com.daqing.financial.crms.dao.CustomerAppletDao;
@ -8,23 +10,24 @@ import com.daqing.financial.crms.dao.CustomerDao;
import com.daqing.financial.crms.dao.PersonalCustomerDao;
import com.daqing.financial.crms.mapper.CrmsCustomerRelatedMapper;
import com.daqing.financial.crms.model.request.CompanyAppletRequest;
import com.daqing.financial.crms.model.request.CompanyCustomerRequest;
import com.daqing.financial.crms.model.request.PersonalAppletRequest;
import com.daqing.financial.crms.model.response.ApplicationRecordResponse;
import com.daqing.financial.crms.model.response.ApplyDetailResponse;
import com.daqing.financial.crms.service.CustomerAppletService;
import com.daqing.financial.crms.service.CustomerService;
import com.daqing.financial.crms.service.ICrmsCustomerRelatedService;
import com.daqing.framework.domain.crms.CompanyCustomerEntity;
import com.daqing.framework.domain.crms.CrmsCustomerRelated;
import com.daqing.framework.domain.crms.CustomerEntity;
import com.daqing.framework.domain.crms.PersonalCustomerEntity;
import com.daqing.framework.domain.crms.ext.ApplicationRecordPO;
import com.daqing.framework.domain.crms.ext.ApplyDetailPO;
import com.daqing.framework.domain.crms.ext.CrmsConstant;
import com.daqing.framework.domain.crms.ext.CustomerPersonalTOU;
import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.model.response.CommonCode;
import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.utils.PageUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -200,6 +203,7 @@ public class CustomerAppletServiceImpl extends ServiceImpl<CustomerAppletDao, Cu
PersonalCustomerEntity personalCustomerEntity = personalCustomerDao.queryPersonalCustomerById((long) customerId);
BeanUtils.copyProperties(customer, personalAppletRequest);
BeanUtils.copyProperties(personalCustomerEntity, personalAppletRequest);
personalAppletRequest.setCompanyId(personalCustomerEntity.getId());
return personalAppletRequest;
}
if (type == 1) {
@ -208,6 +212,13 @@ public class CustomerAppletServiceImpl extends ServiceImpl<CustomerAppletDao, Cu
.eq("customer_id", (long) customerId));
BeanUtils.copyProperties(customer, companyAppletRequest);
BeanUtils.copyProperties(companyCustomerEntity, companyAppletRequest);
/*if (companyAppletRequest.getIsExistRelated() == 1) {
Integer companyId = this.getBaseMapper().getCompanyId(customerId);
if (companyId != null) {
companyAppletRequest.setCustomerId(companyId);
}
}*/
companyAppletRequest.setCustomerId(this.getBaseMapper().getCompanyId(customerId));
return companyAppletRequest;
}
return null;
@ -302,18 +313,136 @@ public class CustomerAppletServiceImpl extends ServiceImpl<CustomerAppletDao, Cu
return false;
}
/**
* 申请记录
*/
@Transactional
@Override
public PageUtils getApplicationRecord(Integer page, Integer size, Integer type, Integer status) {
if (page == null || size == null || page < 1 || size < 1) {
page = 1;
size = 10;
}
List<ApplicationRecordResponse> applicationRecordResponseList = new ArrayList<>();
IPage<ApplicationRecordResponse> applicationRecordResponseIPage = new Page<>();
// 获取客户的登录信息/暂时没有个人类型申请信息,所以个人类型返回空而企业类型返回所有
if (type == null || (type != 0 && type != 1) || type == 1) {
Integer customerId = this.getBaseMapper().getCustomerId(Integer.parseInt(this.getUserId()), 1);
if (customerId == null) {
ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_IS_NULL);
}
Integer companyId = this.getBaseMapper().getCompanyId(customerId);
// 查询申请记录信息
IPage<ApplicationRecordPO> iPage = this.getBaseMapper().getApplicationRecord(new Page(page, size), companyId, status);
List<ApplicationRecordPO> applicationRecordPOList = iPage.getRecords();
for (ApplicationRecordPO applicationRecordPO : applicationRecordPOList) {
ApplicationRecordResponse applicationRecordResponse = new ApplicationRecordResponse();
// 状态为已受理、审核中、拒绝、驳回、已撤销情况
if (applicationRecordPO.getAuditStatus() != null && (applicationRecordPO.getAuditStatus() == 1
|| applicationRecordPO.getAuditStatus() == 2 || applicationRecordPO.getAuditStatus() == 3
|| applicationRecordPO.getAuditStatus() == 4 || applicationRecordPO.getAuditStatus() == 5)) {
BeanUtils.copyProperties(applicationRecordPO, applicationRecordResponse);
applicationRecordResponse.setStatus(applicationRecordPO.getAuditStatus());
applicationRecordResponse.setType(1);
}
// 状态为已完成的情况,如果同时存在已完成会覆盖以上情况
if (applicationRecordPO.getBusinessStatus() != null && applicationRecordPO.getBusinessStatus() == 2) {
BeanUtils.copyProperties(applicationRecordPO, applicationRecordResponse);
applicationRecordResponse.setStatus(0);
applicationRecordResponse.setType(1);
}
applicationRecordResponseList.add(applicationRecordResponse);
}
// 设置分页数据
BeanUtils.copyProperties(iPage, applicationRecordResponseIPage);
applicationRecordResponseIPage.setRecords(applicationRecordResponseList);
}
return new PageUtils(applicationRecordResponseIPage);
}
/**
* 获取申请额度
*/
@Override
public Map getApplyMount() {
Double company = 0.00;
Map<String, Double> map = new HashMap<>();
map.put("company", company);
// 个人类型暂时没有
map.put("personal", 0.00);
Integer customerId = this.getBaseMapper().getCustomerId(Integer.parseInt(this.getUserId()), 1);
// 如果查询不到认证信息,直接返回0.00
if (customerId == null) {
map.put("company", company);
} else {
Integer companyId = this.getBaseMapper().getCompanyId(customerId);
// 查询申请记录信息
List<ApplicationRecordPO> applicationRecordPOList = this.getBaseMapper().getApplyMount(companyId);
if (applicationRecordPOList.size() < 1) {
return map;
}
for (ApplicationRecordPO applicationRecordPO : applicationRecordPOList) {
company += applicationRecordPO.getApplyAmount() == null ? 0.00 : applicationRecordPO.getApplyAmount();
}
map.put("company", company);
}
return map;
}
/**
* 获取申请记录详情
*/
@Override
public ApplyDetailResponse getApplyDetail(Integer id) {
if (id == null) {
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
ApplyDetailResponse applyDetailResponse = new ApplyDetailResponse();
ApplyDetailPO applyDetail = this.getBaseMapper().getApplyDetail(id);
if (applyDetail == null) {
ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_STATUS_IS_NULL);
}
// 判断当前申请信息的状态
if (applyDetail.getBusinessStatus() != null && applyDetail.getBusinessStatus() == 2) {
// 已完成
applyDetailResponse.setStatus(0);
return applyDetailResponse;
}
if (applyDetail.getAuditStatus() == null) {
ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_STATUS_IS_NULL);
}
switch (applyDetail.getAuditStatus()) {
case 1:
applyDetailResponse.setStatus(applyDetail.getAuditStatus());
break;
case 2:
applyDetailResponse.setStatus(applyDetail.getAuditStatus());
break;
case 3: // 拒绝
applyDetailResponse.setStatus(applyDetail.getAuditStatus());
applyDetailResponse.setRemark(applyDetail.getRemark());
break;
case 4: // 驳回
applyDetailResponse.setStatus(applyDetail.getAuditStatus());
applyDetailResponse.setRemark(applyDetail.getRemark());
break;
default:
ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_STATUS_IS_NULL);
}
return applyDetailResponse;
}
/**
* 获取当前登录用户信息
*/
private String getUserId() {
/*HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String token = request.getHeader("token");
String userId = RedisUtil.get("dq:token:" + token);
if (userId == null || userId.length() == 0) {
ExceptionCast.cast(CommonCode.GET_LOGIN_USER_FAIL);
}*/
String userId = "63";
}
// String userId = "63";
return userId;
}

@ -22,4 +22,54 @@
WHERE id = #{customer.id}
</update>
<!-- 获取企业类型客户的id -->
<select id="getCompanyId" parameterType="integer" resultType="integer">
SELECT id FROM crms_company_customer WHERE customer_id = #{customerId}
</select>
<!-- 申请记录 -->
<select id="getApplicationRecord" resultType="com.daqing.framework.domain.crms.ext.ApplicationRecordPO">
SELECT l.id AS id,a.create_time AS apply_date,a.amount_wide AS amount_wide,a.apply_time AS apply_time,l.status AS audit_status,
a.apply_amount AS apply_amount,b.business_status AS business_status
FROM dg_apply_amount_info AS a
LEFT JOIN dg_business_process_status AS b
ON a.id = b.business_id
LEFT JOIN dg_apply_amount_list AS l
ON l.business_id = a.id
WHERE a.company_id = #{companyId}
<if test="status == null or (status != 0 and status != 1 and status != 2 and status != 3 and status != 4 and status != 5)">
AND (b.business_status = 2 OR l.status IN (1,2,3,4,5))
</if>
<if test="status == 0">
AND b.business_status = 2
</if>
<if test="status == 1 or status == 2 or status == 3 or status == 4 or status == 5">
AND l.status = #{status}
</if>
AND l.role_id = 58
</select>
<!-- 获取已申请额度 -->
<select id="getApplyMount" parameterType="integer" resultType="com.daqing.framework.domain.crms.ext.ApplicationRecordPO">
SELECT a.id AS id,a.create_time AS apply_date,a.amount_wide AS amount_wide,a.apply_time AS apply_time,l.status AS audit_status,
a.apply_amount AS apply_amount,b.business_status AS business_status
FROM dg_apply_amount_info AS a
LEFT JOIN dg_business_process_status AS b
ON a.id = b.business_id
LEFT JOIN dg_apply_amount_list AS l
ON l.business_id = a.id
WHERE a.company_id = #{companyId}
AND (b.business_status = 2 OR l.status IN (1,2,3,4,5))
GROUP BY a.id
</select>
<!-- 获取申请记录详情 -->
<select id="getApplyDetail" parameterType="integer" resultType="com.daqing.framework.domain.crms.ext.ApplyDetailPO">
SELECT l.status AS audit_status,l.apply_content AS remark,b.business_status AS business_status
FROM dg_apply_amount_list AS l
LEFT JOIN dg_business_process_status AS b
ON l.business_id = b.business_id
WHERE l.id = #{id}
</select>
</mapper>

@ -26,7 +26,7 @@
<!-- 根据客户基本信息id查询个人类型客户的信息 -->
<select id="queryPersonalCustomerById" parameterType="long" resultType="com.daqing.framework.domain.crms.PersonalCustomerEntity">
SELECT id_card,age,gender,marital_status,education,employer,position,working_years,social_security_num,
SELECT id,id_card,age,gender,marital_status,education,employer,position,working_years,social_security_num,
living_situation,residence_addr,business_source,emergency_linkman,emergency_linkman_relationship,
emergency_linkman_phone
FROM crms_personal_customer

@ -118,6 +118,18 @@ public class UserController implements UserControllerApi {
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
/**
* 更新员工图像(小程序端)
* @param headPortraitUrl 图像路径
*/
@GetMapping("/update/url")
public ResponseResult updateHeadPortraitUrl(@RequestParam("headPortraitUrl") String headPortraitUrl){
Boolean result = userService.updateHeadPortraitUrl(headPortraitUrl);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
/**
* 只有当访问用户具有 ROLE_ADMIN 权限时才能访问否则返回 401 未授权
* 通过 Authentication 参数或者 SecurityContextHolder.getContext().getAuthentication() 可以拿到授权信息进行查看

@ -32,4 +32,6 @@ public interface UserDao extends BaseMapper<UserEntity> {
Long getEmployeeIdByUserId(Long userId);
List<String> listPhoneAccount();
Boolean updateHeadPortraitUrl(@Param("id") Long employee_id, @Param("url") String headPortraitUrl);
}

@ -28,5 +28,7 @@ public interface UserService extends IService<UserEntity> {
Boolean bindingPhoneAccount(String phone,String code);
Boolean cancel();
Boolean updateHeadPortraitUrl(String headPortraitUrl);
}

@ -14,6 +14,7 @@ import com.daqing.framework.util.Md5Util;
import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.util.SendSMS;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -244,6 +245,19 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
return this.getBaseMapper().updateWeChat(Long.parseLong(userId), null);
}
/**
* 更新图像(小程序端)
* @param headPortraitUrl 图像路径
*/
@Override
public Boolean updateHeadPortraitUrl(String headPortraitUrl) {
if (StringUtils.isEmpty(headPortraitUrl) || headPortraitUrl.trim().length() == 0) {
ExceptionCast.cast(HrmsCode.USER_HEAD_PORTRAIT_URL_IS_NULL);
}
String userId = this.getUserId();
return this.getBaseMapper().updateHeadPortraitUrl(this.getBaseMapper().getEmployeeIdByUserId(Long.parseLong(userId)), headPortraitUrl);
}
/**
* 获取当前登录用户信息
*/

@ -1,7 +1,7 @@
#服务名称
spring.application.name=dq-financial-hrms
#配置中心地址
spring.cloud.nacos.config.server-addr=127.0.0.1:8848
spring.cloud.nacos.config.server-addr=192.168.31.140:8848
spring.cloud.nacos.config.file-extension=yml
#redis配置
spring.redis.host=127.0.0.1

@ -59,4 +59,8 @@
SELECT phone_account FROM hrms_user WHERE del_or_not = 0
</select>
<!-- 更新员工表的图像 -->
<update id="updateHeadPortraitUrl">
UPDATE hrms_employee SET head_portarit_url = #{url} WHERE id = #{id}
</update>
</mapper>

@ -0,0 +1,50 @@
package com.daqing.framework.domain.crms.ext;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.util.Date;
/**
* 申请记录接收类
*
* @auther River
* @date 2021/2/22 14:11
*/
@Data
@ToString
public class ApplicationRecordPO implements Serializable {
private Integer id;
/**
* 申请日期
*/
private Date applyDate;
/**
* 申请额度
*/
private Double applyAmount;
/**
* 贷款用途
*/
private String amountWide;
/**
* 申请期限
*/
private String applyTime;
/**
* 业务状态
*/
private Integer businessStatus;
/**
* 审批状态(是否受理)
*/
private Integer auditStatus;
}

@ -0,0 +1,33 @@
package com.daqing.framework.domain.crms.ext;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
/**
* 获取申请记录详情持久层接收类
*
* @auther River
* @date 2021/2/24 10:25
*/
@Data
@ToString
public class ApplyDetailPO implements Serializable {
/**
* 审核状态
*/
private Integer auditStatus;
/**
* 业务状态
*/
private Integer businessStatus;
/**
* 审核意见
*/
private String remark;
}

@ -132,5 +132,4 @@ public class CustomerCompanyDTO implements Serializable {
@ApiModelProperty(value = "是否存在关联人 0->否;1->是")
private Integer isExistRelated;
}

@ -21,8 +21,9 @@ public enum CrmsCode implements ResultCode {
NOT_NULL(false,20004,"上传的文件不能为空"),
CUSTOMER_IS_NULL(false,20005,"导入数据失败,当前员工不存在!"),
CUSTOMER_NAME_REPETITION(false, 20006, "当前客户名称已存在!"),
CUSTOMER_APPLET_IS_NULL(false, 20007,"未查询到你的信息,请先录入(认证)你的信息!"),
CUSTOMER_APPLET_EXIST(false, 20008,"你已认证自己的信息,无需再次认证!");
CUSTOMER_APPLET_IS_NULL(false, 20007,"未查询到你的认证信息,请先认证你的信息!"),
CUSTOMER_APPLET_EXIST(false, 20008,"你已认证自己的信息,无需再次认证!"),
CUSTOMER_APPLET_STATUS_IS_NULL(false, 20009, "当前申请贷款信息状态异常,请刷新重试!");
/**
* 操作是否成功

@ -61,6 +61,7 @@ public enum HrmsCode implements ResultCode {
USER_FILE_TYPE_MISTAKE(false,88013,"文件格式不正确,请重新选择图片文件!"),
USER_FILE_UPLOAD_FAIL(false,88014,"上传图像失败,请稍后刷新再试!"),
USER_PHONE_ACCOUNT_REPETITION(false,88015,"该手机号已绑定过用户,请更换手机号!"),
USER_HEAD_PORTRAIT_URL_IS_NULL(false, 88016, "当前图片不存在,请重新选择!"),
PHNOE_ACCOUNT_NOT_EMPTY(false,33001,"手机号码为空!"),
VERIFY_CODE_NOT_EMPTY(false,33002,"短信验证码为空!"),

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save