Merge remote-tracking branch 'origin/master'

master
chen 4 years ago
commit 57e5b55fa9
  1. 4
      dq-financial-api/src/main/java/com/daqing/financial/guarantee/DgApplyAmountInfoControllerApi.java
  2. 97
      dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerAppletController.java
  3. 26
      dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CustomerAppletDao.java
  4. 92
      dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyAppletRequest.java
  5. 4
      dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CompanyCustomerRequest.java
  6. 102
      dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/PersonalAppletRequest.java
  7. 29
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/CustomerAppletService.java
  8. 320
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerAppletServiceImpl.java
  9. 2
      dq-financial-crms/src/main/resources/mapper/crms/CrmsCompanyPersonalMapper.xml
  10. 25
      dq-financial-crms/src/main/resources/mapper/crms/CustomerAppletDao.xml
  11. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java
  12. 21
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountListController.java
  13. 20
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAssetsAssessmentAssetsLogController.java
  14. 21
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAssetsMoneyController.java
  15. 20
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgComplianceAssignUserController.java
  16. 1
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java
  17. 20
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEnclosureInfoController.java
  18. 20
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgLegalInfoController.java
  19. 40
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgProcessManageController.java
  20. 21
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgProcessManageVisualController.java
  21. 19
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgBusinessCompanyMapper.java
  22. 18
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgComplianceAssignUserMapper.java
  23. 129
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java
  24. 30
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ProcessManageRequest.java
  25. 24
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/UpdateUserVisualReq.java
  26. 8
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AssetsDetailResponse.java
  27. 6
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AuditOpinionResponse.java
  28. 12
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/BusinessApplicationDetailResponse.java
  29. 78
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgNoticeListResponse.java
  30. 8
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeDetailResponse.java
  31. 8
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/MessageDetailResponse.java
  32. 17
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgBusinessCompanyService.java
  33. 16
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgComplianceAssignUserService.java
  34. 7
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgProcessManageService.java
  35. 72
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
  36. 13
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java
  37. 6
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAuditProcessServiceImpl.java
  38. 20
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgBusinessCompanyServiceImpl.java
  39. 20
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceAssignUserServiceImpl.java
  40. 1
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgCopyForServiceImpl.java
  41. 5
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgCopyUserServiceImpl.java
  42. 10
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java
  43. 13
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java
  44. 13
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java
  45. 28
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgProcessManageServiceImpl.java
  46. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java
  47. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/MyBatisPlusCodeGenerator.java
  48. 93
      dq-financial-guarantee/src/main/resources/bootstrap.properties
  49. 5
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgApplyAmountInfoMapper.xml
  50. 11
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgApplyAmountListMapper.xml
  51. 16
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgAssetsInvestigationMapper.xml
  52. 34
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgBusinessCompanyMapper.xml
  53. 20
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgComplianceAssignUserMapper.xml
  54. 24
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgComplianceInvestigationMapper.xml
  55. 4
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgEfficiencyMapper.xml
  56. 16
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeAssignUserMapper.xml
  57. 16
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml
  58. 24
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgLoanCommitteeConsiderMapper.xml
  59. 16
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgLoanNoticeMapper.xml
  60. 16
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgMessageInvestigationMapper.xml
  61. 16
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgPaymentConfirmationConsiderMapper.xml
  62. 1
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgProcessManageMapper.xml
  63. 51
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgWorkConferenceConsiderMapper.xml
  64. 29
      dq-financial-hrms-auth/pom.xml
  65. 21
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/config/SecurityConfig.java
  66. 17
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/config/WeChatConfig.java
  67. 28
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java
  68. 1
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/filter/AdminAuthenticationProcessingFilter.java
  69. 30
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/filter/MyAuthenticationFilter.java
  70. 2
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/handle/AdminAuthenticationProvider.java
  71. 66
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/handle/CustomAccessDeniedHandler.java
  72. 25
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/model/XccLoginReq.java
  73. 4
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/UserLoginService.java
  74. 286
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java
  75. 12
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserServiceImpl.java
  76. 73
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/util/AES.java
  77. 171
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/util/AesCbcUtil.java
  78. 137
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/util/HttpRequest.java
  79. 65
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/util/PKCS7Encoder.java
  80. 198
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/util/TestUtil.java
  81. 115
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/util/WXBizDataCrypt.java
  82. 84
      dq-financial-hrms-auth/src/main/resources/bootstrap.properties
  83. 145
      dq-financial-hrms-auth/src/test/java/com/daqing/financial/hrauth/DqFinancialHrmsAuthApplicationTests.java
  84. 41
      dq-financial-hrms-auth/src/test/java/com/daqing/financial/hrauth/Student.java
  85. 4
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/PermissionController.java
  86. 2
      dq-financial-hrms/src/main/resources/bootstrap.properties
  87. 12
      dq-framework-common/src/main/java/com/daqing/framework/model/response/PromptSuccess.java
  88. 4
      dq-framework-common/src/main/java/com/daqing/framework/model/response/ResponseResult.java
  89. 2
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CrmsCompanyPersonal.java
  90. 3
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerPersonalTOI.java
  91. 5
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/response/CrmsCode.java
  92. 2
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountList.java
  93. 152
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgBusinessCompany.java
  94. 79
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgComplianceAssignUser.java
  95. 5
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgProcessManage.java
  96. 33
      dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/Login.java
  97. 2
      dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/ext/EmployeeVO.java
  98. 2
      dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/response/HrmsCode.java
  99. 2
      dq-govern-gateway/src/main/resources/bootstrap.properties
  100. 4
      dq-govern-gateway/src/main/resources/jwt.properties

@ -26,8 +26,8 @@ public interface DgApplyAmountInfoControllerApi {
/* @ApiOperation(value = "业务申请") /* @ApiOperation(value = "业务申请")
ResponseResult businessApplication(BusinessApplicationRequest businessApplication);*/ ResponseResult businessApplication(BusinessApplicationRequest businessApplication);*/
@ApiOperation(value = "上传文件") /* @ApiOperation(value = "上传文件")
ResponseResult uploadFile(MultipartFile[] files)throws IOException; ResponseResult uploadFile(MultipartFile[] files)throws IOException;*/
@ApiOperation(value = "删除服务器文件") @ApiOperation(value = "删除服务器文件")
boolean deleteServerFile(String filePath); boolean deleteServerFile(String filePath);

@ -0,0 +1,97 @@
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.service.CustomerAppletService;
import com.daqing.framework.domain.crms.ext.CustomerPersonalTOI;
import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
/**
* 小程序客户模块数据录入(认证)
*
* @auther River
* @date 2021/1/28 14:08
*/
@RestController
@RequestMapping("/customer/applet")
@Api(value = "客户数据录入(认证)", tags = "小程序客户数据录入(认证)")
public class CustomerAppletController {
@Autowired
private CustomerAppletService customerAppletService;
/**
* 个人类型客户数据录入(认证)
*/
@PostMapping("/save/personal")
@ApiOperation(value = "个人类型客户数据录入(认证)")
public ResponseResult savePersonal(@RequestBody @Valid PersonalAppletRequest personalAppletRequest) {
Boolean result = customerAppletService.savePersonal(personalAppletRequest);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
/**
* 企业类型客户数据录入(认证)
*/
@PostMapping("/save/company")
@ApiOperation(value = "企业类型客户数据录入(认证)")
public ResponseResult saveCompany(@RequestBody @Valid CompanyAppletRequest companyAppletRequest) {
Boolean result = customerAppletService.saveCompany(companyAppletRequest);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
/**
* 获取当前客户认证(录入)状态
*/
@GetMapping("/get/status")
@ApiOperation(value = "获取当前客户认证(录入)状态")
public ResponseResult getCustomerStatus() {
return ResponseResult.SUCCESS(customerAppletService.getCustomerStatus());
}
/**
* 获取已认证(录入)的客户信息
*/
@GetMapping("/get/customer")
@ApiOperation(value = "获取已认证(录入)的客户信息")
public ResponseResult getCustomer(@RequestParam("type") Integer type) {
return ResponseResult.SUCCESS(customerAppletService.getCustomer(type));
}
/**
* 更新个人类型客户信息
*/
@ApiOperation(value = "更新个人类型的客户信息")
@PostMapping("/update/personal")
public ResponseResult updatePersonal(@RequestBody @Valid PersonalAppletRequest personalAppletRequest) {
Boolean result = customerAppletService.updatePersonal(personalAppletRequest);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
/**
* 更新企业类型的客户信息
*/
@PostMapping("/update/company")
@ApiOperation(value = "更新企业类型的客户信息")
public ResponseResult updateCompany(@RequestBody @Valid CompanyAppletRequest companyAppletRequest) {
Boolean result = customerAppletService.updateCompany(companyAppletRequest);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
}

@ -0,0 +1,26 @@
package com.daqing.financial.crms.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.daqing.framework.domain.crms.CustomerEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 客户小程序认证(录入)
*
* @auther River
* @date 2021/1/27 15:54
*/
@Mapper
public interface CustomerAppletDao extends BaseMapper<CustomerEntity> {
Boolean saveCustomerIdAndUserId(@Param("customerId") Integer customerId, @Param("userId") Integer userId,
@Param("type") Integer type);
Integer getCustomerStatus(@Param("userId") Integer userId, @Param("type") Integer type);
Integer getCustomerId(@Param("userId") Integer userId, @Param("type") Integer type);
Boolean updateCustomer(@Param("customer") CustomerEntity customerEntity);
}

@ -0,0 +1,92 @@
package com.daqing.financial.crms.model.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 小程序客户模块企业类型数据录入(认证)
*
* @auther River
* @date 2021/1/29 11:16
*/
@Data
@ToString
public class CompanyAppletRequest implements Serializable {
@NotNull(message = "客户名称不能为空")
@ApiModelProperty(value = "客户名称")
private String name;
@NotNull(message = "社会统一代码不能为空")
@ApiModelProperty(value = "社会统一代码")
private String socialUnifiedCode;
@NotNull(message = "联系电话不能为空")
@Pattern(regexp = "^[0-9]*$",message = "联系电话格式错误")
@ApiModelProperty(value = "联系电话")
private String phone;
@ApiModelProperty(value = "注册时间")
private Date registerTime;
@Pattern(regexp = "^[0-9]+\\.{0,1}[0-9]{0,2}$",message = "注册资金格式有误")
@NotNull(message = "注册资金不能为空")
@ApiModelProperty(value = "注册资金")
private String registeredCapital;
@Pattern(regexp = "^[0-9]*$",message = "员工人数格式错误")
@NotNull(message = "员工人数不能为空")
@ApiModelProperty(value = "员工人数")
private String empNum;
@ApiModelProperty(value = "注册地址")
private String registerAddr;
@NotNull(message = "联系人不能为空")
@ApiModelProperty(value = "联系人")
private String linkman;
@ApiModelProperty(value = "联系人电话")
private String linkPhone;
@ApiModelProperty(value = "经营地址")
private String businessAddr;
@NotNull(message = "业务来源不能为空")
@ApiModelProperty(value = "业务来源")
private String businessSource;
@ApiModelProperty(value = "经营范围")
private String businessScope;
@ApiModelProperty(value = "法人-姓名")
private String legalName;
@ApiModelProperty(value = "法人-性别 1、男,0、女")
private Integer legalGender;
@ApiModelProperty(value = "法人-身份证号")
private String legalIdNumber;
@ApiModelProperty(value = "法人-户口所在地")
private String legalHukouAddr;
@ApiModelProperty(value = "法人-联系电话")
private String legalPhone;
@ApiModelProperty(value = "法人-家庭住址")
private String legalHomeAddr;
@ApiModelProperty(value = "是否存在关联人 0->否;1->是")
private Integer isExistRelated;
@ApiModelProperty(value = "关联人id")
private List<Integer> relatedId;
}

@ -26,9 +26,6 @@ public class CompanyCustomerRequest implements Serializable {
@TableId(value = "id", type = IdType.INPUT) @TableId(value = "id", type = IdType.INPUT)
private Long id; private Long id;
@Min(value = 0,message = "客户类型格式有误")
@Max(value = 1,message = "客户类型格式有误")
@NotNull(message = "客户类型不能为空")
@ApiModelProperty(value = "客户类型") @ApiModelProperty(value = "客户类型")
private Integer type; private Integer type;
@ -39,6 +36,7 @@ public class CompanyCustomerRequest implements Serializable {
@ApiModelProperty(value = "客户名称") @ApiModelProperty(value = "客户名称")
private String name; private String name;
@NotNull(message = "社会统一代码不能为空")
@ApiModelProperty(value = "社会统一代码") @ApiModelProperty(value = "社会统一代码")
private String socialUnifiedCode; private String socialUnifiedCode;

@ -0,0 +1,102 @@
package com.daqing.financial.crms.model.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
/**
* 小程序客户模块个人类型数据录入(认证)
*
* @auther River
* @date 2021/1/29 11:04
*/
@Data
@ToString
public class PersonalAppletRequest implements Serializable {
@NotNull(message = "客户名称不能为空")
@ApiModelProperty(value = "客户名称")
private String name;
@NotNull(message = "联系地址不能为空")
@ApiModelProperty(value = "联系地址")
private String addr;
@Pattern(regexp = "^[0-9]*$",message = "联系电话格式错误")
@NotNull(message = "联系电话不能为空")
@ApiModelProperty(value = "联系电话")
private String phone;
@NotNull(message = "身份证号不能为空")
@ApiModelProperty(value = "身份证号")
private String idCard;
@NotNull(message = "年龄不能为空")
@ApiModelProperty(value = "年龄")
private Integer age;
@Min(value = 0,message = "性别格式有误")
@Max(value = 1,message = "性别格式有误")
@NotNull(message = "性别不能为空")
@ApiModelProperty(value = "性别,1、男,0、女")
private Integer gender;
@Min(value = 0,message = "婚姻状况格式有误")
@Max(value = 3,message = "婚姻状况格式有误")
@NotNull(message = "婚姻状况不能为空")
@ApiModelProperty(value = "婚姻状况,0:未婚,1:已婚,2:离异,3:再婚")
private Integer maritalStatus;
@Min(value = 0,message = "学历格式有误")
@Max(value = 4,message = "学历格式有误")
@NotNull(message = "学历不能为空")
@ApiModelProperty(value = "学历,0:本科,1:大专,2:高职,3:中专,4:其他")
private Integer education;
@NotNull(message = "工作单位不能为空")
@ApiModelProperty(value = "工作单位")
private String employer;
@NotNull(message = "职务不能为空")
@ApiModelProperty(value = "职务")
private String position;
@NotNull(message = "工作年限不能为空")
@ApiModelProperty(value = "工作年限")
private Integer workingYears;
@NotNull(message = "社保账号不能为空")
@ApiModelProperty(value = "社保账号")
private String socialSecurityNum;
@NotNull(message = "居住情况不能为空")
@ApiModelProperty(value = "居住情况")
private String livingSituation;
@NotNull(message = "户籍地址不能为空")
@ApiModelProperty(value = "户籍地址")
private String residenceAddr;
@NotNull(message = "业务来源不能为空")
@ApiModelProperty(value = "业务来源")
private String businessSource;
@NotNull(message = "紧急联系人不能为空")
@ApiModelProperty(value = "紧急联系人")
private String emergencyLinkman;
@NotNull(message = "紧急联系人关系不能为空")
@ApiModelProperty(value = "紧急联系人关系")
private String emergencyLinkmanRelationship;
@Pattern(regexp = "^[0-9]*$",message = "紧急联系人电话格式错误")
@NotNull(message = "紧急联系人电话不能为空")
@ApiModelProperty(value = "紧急联系人电话")
private String emergencyLinkmanPhone;
}

@ -0,0 +1,29 @@
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.framework.domain.crms.CustomerEntity;
import java.util.Map;
/**
* 客户小程序认证(数据录入)
*
* @auther River
* @date 2021/1/27 15:51
*/
public interface CustomerAppletService extends IService<CustomerEntity> {
Boolean savePersonal(PersonalAppletRequest personalAppletRequest);
Boolean saveCompany(CompanyAppletRequest companyAppletRequest);
Map getCustomerStatus();
Object getCustomer(Integer type);
Boolean updatePersonal(PersonalAppletRequest personalAppletRequest);
Boolean updateCompany(CompanyAppletRequest companyAppletRequest);
}

@ -0,0 +1,320 @@
package com.daqing.financial.crms.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.crms.dao.CompanyCustomerDao;
import com.daqing.financial.crms.dao.CustomerAppletDao;
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.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.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 org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
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;
import java.util.*;
/**
* 客户小程序认证(录入)
*
* @auther River
* @date 2021/1/27 15:53
*/
@Service
public class CustomerAppletServiceImpl extends ServiceImpl<CustomerAppletDao, CustomerEntity> implements CustomerAppletService {
@Autowired
private CustomerDao customerDao;
@Autowired
private PersonalCustomerDao personalCustomerDao;
@Autowired
private CompanyCustomerDao companyCustomerDao;
@Autowired
private ICrmsCustomerRelatedService crmsCustomerRelatedService;
@Resource
private CrmsCustomerRelatedMapper crmsCustomerRelatedMapper;
/**
* 录入(认证)个人类型客户数据
*/
@Transactional
@Override
public Boolean savePersonal(PersonalAppletRequest personalAppletRequest) {
if (this.getBaseMapper().getCustomerStatus(Integer.parseInt(this.getUserId()), 0) > 0) {
ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_EXIST);
}
if (personalAppletRequest.getName() != null && personalAppletRequest.getName().length() != 0) {
// 客户姓名判重
List<String> names = customerDao.listCustomerName(0); // 个人类型客户名称
for (String name : names) {
if (personalAppletRequest.getName().equals(name)) {
ExceptionCast.cast(CrmsCode.CUSTOMER_NAME_REPETITION);
}
}
}
CustomerEntity customerEntity = new CustomerEntity();
PersonalCustomerEntity personalCustomerEntity = new PersonalCustomerEntity();
BeanUtils.copyProperties(personalAppletRequest, customerEntity);
BeanUtils.copyProperties(personalAppletRequest, personalCustomerEntity);
// 设置客户编号
String code = customerDao.getCodeByType(CrmsConstant.CustomerType.PERSONAL_CUSTOMER.getType());
if (code == null || code.length() == 0) {
code = PromptSuccess.PERSONAL_START_CODE;
}
int codeNumber = Integer.parseInt(code.substring(code.length() - 4));
customerEntity.setCode(PromptSuccess.PERSONAL_CODE + String.format("%04d", (codeNumber + 1)));
customerEntity.setCreateTime(new Date());
customerEntity.setMotifyTime(new Date());
customerEntity.setType(CrmsConstant.CustomerType.PERSONAL_CUSTOMER.getType());
boolean customer = customerDao.saveCustomer(customerEntity);
// 将自增的客户id返回给工作台
personalCustomerEntity.setCustomerId(customerEntity.getId());
boolean personal = personalCustomerDao.savePersonalCustomer(personalCustomerEntity);
Boolean user = this.getBaseMapper().saveCustomerIdAndUserId(customerEntity.getId().intValue(), Integer.parseInt(this.getUserId()), 0);
return customer && personal && user;
}
/**
* 录入(认证)企业类型的客户数据
*/
@Transactional
@Override
public Boolean saveCompany(CompanyAppletRequest companyAppletRequest) {
if (this.getBaseMapper().getCustomerStatus(Integer.parseInt(this.getUserId()), 1) > 0) {
ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_EXIST);
}
// 客户名称判重
if (companyAppletRequest.getName() != null && companyAppletRequest.getName().length() != 0) {
List<String> names = customerDao.listCustomerName(1); // 企业类型客户名称
for (String name : names) {
if (companyAppletRequest.getName().equals(name)) {
ExceptionCast.cast(CrmsCode.CUSTOMER_NAME_REPETITION);
}
}
}
CustomerEntity customerEntity = new CustomerEntity();
CompanyCustomerEntity companyCustomerEntity = new CompanyCustomerEntity();
BeanUtils.copyProperties(companyAppletRequest, customerEntity);
BeanUtils.copyProperties(companyAppletRequest, companyCustomerEntity);
// 设置客户编号
String code = customerDao.getCodeByType(CrmsConstant.CustomerType.COMPANY_CUSTOMER.getType());
if (code == null || code.length() == 0) {
code = PromptSuccess.COMPANY_START_CODE;
}
int codeNumber = Integer.parseInt(code.substring(code.length() - 4));
customerEntity.setCode(PromptSuccess.COMPANY_CODE + String.format("%04d", (codeNumber + 1)));
customerEntity.setMotifyTime(new Date());
customerEntity.setCreateTime(new Date());
customerEntity.setType(CrmsConstant.CustomerType.COMPANY_CUSTOMER.getType());
boolean customer = customerDao.saveCustomer(customerEntity);
companyCustomerEntity.setCustomerId(customerEntity.getId());
int company = companyCustomerDao.insert(companyCustomerEntity);
// 绑定客户信息和客户的用户信息
Boolean user = this.getBaseMapper().saveCustomerIdAndUserId(customerEntity.getId().intValue(), Integer.parseInt(this.getUserId()), 1);
if (companyAppletRequest.getIsExistRelated() == 1) {//有关联人的情况下才绑定关联关系
//绑定关联关系
List<CrmsCustomerRelated> relatedList = new ArrayList<>();
List<Integer> intList = companyAppletRequest.getRelatedId();
for (int i = 0; i < intList.size(); i++) {
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated();
Integer integer = intList.get(i);
crmsCustomerRelated.setCustomerId(companyCustomerEntity.getId().intValue());//企业id
crmsCustomerRelated.setRelatedId(integer);//关联人/企业id
relatedList.add(crmsCustomerRelated);
}
crmsCustomerRelatedService.insertCustomerRelated(relatedList);
}
if (customer && company > 0 && user) {
return true;
}
return false;
}
/**
* 获取当前客户的认证状态
*
* @return
*/
@Transactional
@Override
public Map getCustomerStatus() {
Map<String, Boolean> map = new HashMap<>();
Integer personalCount = this.getBaseMapper().getCustomerStatus(Integer.parseInt(this.getUserId()), 0);
Integer companyCount = this.getBaseMapper().getCustomerStatus(Integer.parseInt(this.getUserId()), 1);
if (personalCount > 0) {
map.put("personal", true);
} else {
map.put("personal", false);
}
if (companyCount > 0) {
map.put("company", true);
} else {
map.put("company", false);
}
return map;
}
/**
* 查看认证的详情
*/
@Override
public Object getCustomer(Integer type) {
String userId = this.getUserId();
Integer customerId = this.getBaseMapper().getCustomerId(Integer.parseInt(userId), type);
if (customerId == null) {
ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_IS_NULL);
}
// 员工基本信息
CustomerEntity customer = customerDao.queryCustomerById((long) customerId);
// 判断该客户的类型
if (type == 0) {
PersonalAppletRequest personalAppletRequest = new PersonalAppletRequest();
PersonalCustomerEntity personalCustomerEntity = personalCustomerDao.queryPersonalCustomerById((long) customerId);
BeanUtils.copyProperties(customer, personalAppletRequest);
BeanUtils.copyProperties(personalCustomerEntity, personalAppletRequest);
return personalAppletRequest;
}
if (type == 1) {
CompanyAppletRequest companyAppletRequest = new CompanyAppletRequest();
CompanyCustomerEntity companyCustomerEntity = companyCustomerDao.selectOne(new QueryWrapper<CompanyCustomerEntity>()
.eq("customer_id", (long) customerId));
BeanUtils.copyProperties(customer, companyAppletRequest);
BeanUtils.copyProperties(companyCustomerEntity, companyAppletRequest);
return companyAppletRequest;
}
return null;
}
/**
* 修改个人类型的认证信息
*/
@Override
public Boolean updatePersonal(PersonalAppletRequest personalAppletRequest) {
Integer customerId = this.getBaseMapper().getCustomerId(Integer.parseInt(this.getUserId()), 0);
if (customerId == null) {
ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_IS_NULL);
}
// 客户名称判重,注意判断是否与原来相同
if (personalAppletRequest.getName() != null && personalAppletRequest.getName().length() != 0) {
String customerName = customerDao.getNameByCustomerId((long) customerId);
if (!personalAppletRequest.getName().equals(customerName)) {
List<String> names = customerDao.listCustomerName(0);
for (String name : names) {
if (personalAppletRequest.getName().equals(name)) {
ExceptionCast.cast(CrmsCode.CUSTOMER_NAME_REPETITION);
}
}
}
}
CustomerEntity customerEntity = new CustomerEntity();
PersonalCustomerEntity personalCustomerEntity = new PersonalCustomerEntity();
BeanUtils.copyProperties(personalAppletRequest, customerEntity);
BeanUtils.copyProperties(personalAppletRequest, personalCustomerEntity);
customerEntity.setId((long) customerId);
customerEntity.setMotifyTime(new Date());
boolean customer = this.getBaseMapper().updateCustomer(customerEntity);
personalCustomerEntity.setCustomerId(customerEntity.getId());
boolean personal = personalCustomerDao.updatePersonalCustomer(personalCustomerEntity);
return customer && personal;
}
/**
* 修改企业类型的认证信息
*/
@Override
public Boolean updateCompany(CompanyAppletRequest companyAppletRequest) {
Integer customerId = this.getBaseMapper().getCustomerId(Integer.parseInt(this.getUserId()), 1);
if (customerId == null) {
ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_IS_NULL);
}
// 客户名称判重,注意判断是否与原来相同
if (companyAppletRequest.getName() != null && companyAppletRequest.getName().length() != 0) {
String customerName = customerDao.getNameByCustomerId((long) customerId);
if (!companyAppletRequest.getName().equals(customerName)) {
List<String> names = customerDao.listCustomerName(1);
for (String name : names) {
if (companyAppletRequest.getName().equals(name)) {
ExceptionCast.cast(CrmsCode.CUSTOMER_NAME_REPETITION);
}
}
}
}
CustomerEntity customerEntity = new CustomerEntity();
CompanyCustomerEntity companyCustomerEntity = new CompanyCustomerEntity();
BeanUtils.copyProperties(companyAppletRequest, customerEntity);
BeanUtils.copyProperties(companyAppletRequest, companyCustomerEntity);
customerEntity.setId((long) customerId);
customerEntity.setMotifyTime(new Date());
boolean customer = this.getBaseMapper().updateCustomer(customerEntity);
companyCustomerEntity.setCustomerId(customerEntity.getId());
int company = companyCustomerDao.update(companyCustomerEntity, new QueryWrapper<CompanyCustomerEntity>()
.eq("customer_id", companyCustomerEntity.getCustomerId()));
//根据企业id删除关联关系
crmsCustomerRelatedMapper.delete(new QueryWrapper<CrmsCustomerRelated>().eq("customer_id", companyCustomerEntity.getId()));
//绑定关联关系
List<CrmsCustomerRelated> relatedList = new ArrayList<>();
List<Integer> intList = companyAppletRequest.getRelatedId();
for (int i = 0; i < intList.size(); i++) {
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated();
Integer integer = intList.get(i);
crmsCustomerRelated.setCustomerId(companyCustomerEntity.getId().intValue());//企业id
crmsCustomerRelated.setRelatedId(integer);//关联人/企业id
relatedList.add(crmsCustomerRelated);
}
if (relatedList.size() > 0) {
crmsCustomerRelatedService.insertCustomerRelated(relatedList);
}
if (customer && company > 0) {
return true;
}
return false;
}
/**
* 获取当前登录用户信息
*/
private String getUserId() {
/*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";
return userId;
}
}

@ -31,7 +31,7 @@
</update> </update>
<select id="pageByCondition" resultMap="BaseResultMap"> <select id="pageByCondition" resultMap="BaseResultMap">
select cp.id,cp.relationship,cp.`type`,cp.related_name,cp.phone,cp.address select cp.*
from crms_company_personal cp from crms_company_personal cp
left join crms_customer_related cr on cr.related_id=cp.id left join crms_customer_related cr on cr.related_id=cp.id
<where> <where>

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.daqing.financial.crms.dao.CustomerAppletDao">
<insert id="saveCustomerIdAndUserId">
INSERT INTO crms_customer_user (customer_id, user_id, type) VALUES (#{customerId}, #{userId}, #{type})
</insert>
<select id="getCustomerStatus" resultType="integer">
SELECT COUNT(id) FROM crms_customer_user WHERE user_id = #{userId} AND type = #{type}
</select>
<select id="getCustomerId" resultType="integer">
SELECT customer_id FROM crms_customer_user WHERE user_id = #{userId} AND type = #{type}
</select>
<!-- 更新客户基本信息 -->
<update id="updateCustomer" parameterType="com.daqing.framework.domain.crms.CustomerEntity">
UPDATE crms_customer
SET name=#{customer.name},addr=#{customer.addr},phone=#{customer.phone},motify_time=#{customer.motifyTime}
WHERE id = #{customer.id}
</update>
</mapper>

@ -109,6 +109,7 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA
@PostMapping("/uploadFile")// 浏览器地址栏输入的路径 @PostMapping("/uploadFile")// 浏览器地址栏输入的路径
@ResponseBody @ResponseBody
public ResponseResult uploadFile(@RequestParam("file")MultipartFile[] files) throws IOException { public ResponseResult uploadFile(@RequestParam("file")MultipartFile[] files) throws IOException {
System.out.println(" 文件名称: 来了来了");
/** /**
* MultipartFile类是用来接收前台传过来的文件常用的方法如下 * MultipartFile类是用来接收前台传过来的文件常用的方法如下
* String getContentType() //获取文件MIME类型 * String getContentType() //获取文件MIME类型
@ -198,7 +199,9 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA
if(responseResult.getData() != null){ if(responseResult.getData() != null){
employeeMessage = (List<LinkedHashMap>) responseResult.getData(); employeeMessage = (List<LinkedHashMap>) responseResult.getData();
} }
System.out.println("employeeMessage==================="+employeeMessage);
if(employeeMessage!= null){
for (BusinessApplicationListResponse response:list) { for (BusinessApplicationListResponse response:list) {
for(LinkedHashMap res : employeeMessage){ for(LinkedHashMap res : employeeMessage){
if(response.getPresenterId().equals(res.get("id"))){//如果提单人id相同情况下,就往对象里面赋值 if(response.getPresenterId().equals(res.get("id"))){//如果提单人id相同情况下,就往对象里面赋值
@ -209,6 +212,7 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA
} }
} }
} }
}
return new ResponseResult<PageUtils>().SUCCESS(data); return new ResponseResult<PageUtils>().SUCCESS(data);
} }

@ -1,21 +0,0 @@
package com.daqing.financial.guarantee.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author Qyq
* @since 2020-11-24
*/
@RestController
@RequestMapping("/dg-apply-amount-list")
public class DgApplyAmountListController {
}

@ -1,20 +0,0 @@
package com.daqing.financial.guarantee.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 价值评估记录 前端控制器
* </p>
*
* @author Qyq
* @since 2020-11-05
*/
@RestController
@RequestMapping("/dg-assets-assessment-assets-log")
public class DgAssetsAssessmentAssetsLogController {
}

@ -1,21 +0,0 @@
package com.daqing.financial.guarantee.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author Qyq
* @since 2020-11-26
*/
@RestController
@RequestMapping("/dg-assets-money")
public class DgAssetsMoneyController {
}

@ -1,20 +0,0 @@
package com.daqing.financial.guarantee.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 合规调查记录 前端控制器
* </p>
*
* @author Qyq
* @since 2020-11-05
*/
@RestController
@RequestMapping("/dg-compliance-assign-user")
public class DgComplianceAssignUserController {
}

@ -100,7 +100,6 @@ public class DgEfficiencyController {
return ResponseResult.SUCCESS(dgEfficiencyService.getTodayBusinessCount()); return ResponseResult.SUCCESS(dgEfficiencyService.getTodayBusinessCount());
} }
@ApiOperation(value = "个人效率记录列表")
/** /**
* 首页-通知 * 首页-通知
* @Param title 标题 * @Param title 标题

@ -1,20 +0,0 @@
package com.daqing.financial.guarantee.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 附件 前端控制器
* </p>
*
* @author Qyq
* @since 2020-11-05
*/
@RestController
@RequestMapping("/dg-enclosure-info")
public class DgEnclosureInfoController {
}

@ -1,20 +0,0 @@
package com.daqing.financial.guarantee.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 企业法人信息 前端控制器
* </p>
*
* @author Qyq
* @since 2020-11-05
*/
@RestController
@RequestMapping("/dg-legal-info")
public class DgLegalInfoController {
}

@ -2,23 +2,27 @@ package com.daqing.financial.guarantee.controller;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.daqing.financial.guarantee.model.request.ProcessManageRequest;
import com.daqing.financial.guarantee.model.request.UpdateUserVisualReq;
import com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse; import com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse;
import com.daqing.financial.guarantee.model.response.DgProessManageRes; import com.daqing.financial.guarantee.model.response.DgProessManageRes;
import com.daqing.financial.guarantee.service.IDgProcessManageService; import com.daqing.financial.guarantee.service.IDgProcessManageService;
import com.daqing.framework.domain.guarantee.DgProcessManage; import com.daqing.framework.domain.guarantee.DgProcessManage;
import com.daqing.framework.domain.hrms.ext.EmployeeVO;
import com.daqing.framework.domain.hrms.ext.UserDeptVO;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.util.RedisUtil; import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.PageUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import java.util.ArrayList; import java.util.*;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
/** /**
* <p> * <p>
@ -29,6 +33,7 @@ import java.util.List;
* @since 2021-01-15 * @since 2021-01-15
*/ */
@RestController @RestController
@Api(tags = {"流程管理"})
@RequestMapping("/dg-process-manage") @RequestMapping("/dg-process-manage")
public class DgProcessManageController { public class DgProcessManageController {
@ -61,21 +66,40 @@ public class DgProcessManageController {
@ApiOperation(value = "查询审批模板对应的可见人员") @ApiOperation(value = "查询审批模板对应的可见人员")
public ResponseResult processVisualList(@RequestParam(value = "id") Integer id){ public ResponseResult processVisualList(@RequestParam(value = "id") Integer id){
//查询可见范围内的人可见列表 //查询可见范围内的人可见列表
List<Integer> list = iDgProcessManageService.processVisualList(id); List<EmployeeVO> list = iDgProcessManageService.processVisualList(id);
return new ResponseResult<PageUtils>().SUCCESS(list); return new ResponseResult<PageUtils>().SUCCESS(list);
} }
/** /**
* 修改人员可以看到审批模板 * 修改人员可以看到审批模板
* @param id 流程管理id ids 可见人id * @param updateUserVisualReq
* @return * @return
*/ */
@GetMapping("/updateUserVisual") @PostMapping("/updateUserVisual")
@ApiOperation(value = "修改人员可以看到审批模板") @ApiOperation(value = "修改人员可以看到审批模板")
public ResponseResult updateUserVisual(@RequestParam(value="id") Integer id,@RequestParam(value = "ids") List<Integer>ids){ @Transactional
public ResponseResult updateUserVisual(@RequestBody UpdateUserVisualReq updateUserVisualReq){
Integer id = updateUserVisualReq.getId();
List<Integer>ids = updateUserVisualReq.getIds();
//查询可见范围内的人可见列表 //查询可见范围内的人可见列表
Boolean a= iDgProcessManageService.updateUserVisual(id,ids); Boolean a= iDgProcessManageService.updateUserVisual(id,ids);
return new ResponseResult<PageUtils>().SUCCESS(a); return new ResponseResult<PageUtils>().SUCCESS(a);
} }
/**
* 修改基础设置
* @param processManageReq
* @return
*/
@PostMapping("/updateProcessManage")
@ApiOperation(value = "修改基础设置")
@Transactional
public ResponseResult updateProcessManage(@RequestBody ProcessManageRequest processManageReq){
processManageReq.setUpdateTime(new Date());
//根据id修改基础设置
int a= iDgProcessManageService.updateProcessManage(processManageReq);
return a>0 ? ResponseResult.SUCCESS("修改成功!"):ResponseResult.FAIL(40008,"修改失败!");
}
} }

@ -1,21 +0,0 @@
package com.daqing.financial.guarantee.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 流程管理可见表 前端控制器
* </p>
*
* @author Qyq
* @since 2021-01-15
*/
@RestController
@RequestMapping("/dg-process-manage-visual")
public class DgProcessManageVisualController {
}

@ -0,0 +1,19 @@
package com.daqing.financial.guarantee.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.daqing.framework.domain.guarantee.DgBusinessCompany;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* 业务关联企业表 Mapper 接口
* </p>
*
* @author Qyq
* @since 2021-01-27
*/
@Mapper
public interface DgBusinessCompanyMapper extends BaseMapper<DgBusinessCompany> {
}

@ -1,18 +0,0 @@
package com.daqing.financial.guarantee.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.daqing.framework.domain.guarantee.DgComplianceAssignUser;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* 合规调查记录 Mapper 接口
* </p>
*
* @author Qyq
* @since 2020-11-05
*/
@Mapper
public interface DgComplianceAssignUserMapper extends BaseMapper<DgComplianceAssignUser> {
}

@ -209,4 +209,133 @@ public class BusinessApplicationRequest implements Serializable {
@ApiModelProperty(value = "申请类型:0->员工申请;1->客户申请") @ApiModelProperty(value = "申请类型:0->员工申请;1->客户申请")
private Integer applyType; private Integer applyType;
/**
* 注册资金万元
*/
@ApiModelProperty(value = "注册资金(万元)")
private String registeredCapital;
/**
* 社会统一代码
*/
@ApiModelProperty(value = "社会统一代码")
private String socialUnifiedCode;
/**
* 员工人数
*/
@ApiModelProperty(value = "员工人数")
private String empNum;
/**
* 联系人
*/
@ApiModelProperty(value = "联系人")
private String linkman;
/**
* 联系人的联系电话
*/
@ApiModelProperty(value = "联系人的联系电话")
private String linkPhone;
/**
* 业务来源
*/
@ApiModelProperty(value = "业务来源")
private String businessSource;
/**
* 经营范围
*/
@ApiModelProperty(value = "经营范围")
private String businessScope;
/**
* 经营地址
*/
@ApiModelProperty(value = "经营地址")
private String businessAddr;
/**
* 注册时间
*/
@ApiModelProperty(value = "注册时间")
private String registerTime;
/**
* 注册地址
*/
@ApiModelProperty(value = "注册地址")
private String registerAddr;
/**
* 法人-身份证号
*/
@ApiModelProperty(value = "法人-身份证号")
private String legalIdNumber;
/**
* 法人-户口所在地
*/
@ApiModelProperty(value = "法人-户口所在地")
private String legalHukouAddr;
/**
* 法人-联系电话
*/
@ApiModelProperty(value = "法人-联系电话")
private String legalPhone;
/**
* 法人-家庭住址
*/
@ApiModelProperty(value = "法人-家庭住址")
private String legalHomeAddr;
/**
* 法人-性别 10
*/
@ApiModelProperty(value = "法人-性别 1、男,0、女")
private Integer legalGender;
/**
* 法人-姓名
*/
@ApiModelProperty(value = "法人-姓名")
private String legalName;
/**
* 客户编号
*/
@ApiModelProperty(value = "客户编号")
private String code;
/**
* 客户类型1企业类型0个人类型
*/
@ApiModelProperty(value = "客户类型:1、企业类型,0:个人类型")
private Integer type;
/**
* 客户名称
*/
@ApiModelProperty(value = "客户名称")
private String name;
/**
* 联系地址(指个人的)
*/
@ApiModelProperty(value = "联系地址(指个人的)")
private String addr;
/**
* 联系电话指个人或企业的
*/
@ApiModelProperty(value = "联系电话(指个人或企业的)")
private String phone;
@ApiModelProperty(value = "客户基本信息表id")
private Long customerId;
} }

@ -0,0 +1,30 @@
package com.daqing.financial.guarantee.model.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @Author chen
* @DATE 2020/11/16 20:16
* @Version 1.0
* 业务申请列表导出
*/
@Data
public class ProcessManageRequest {
@ApiModelProperty("流程管理模板id")
private Integer id;
@ApiModelProperty("图标")
private String iconImg;
@ApiModelProperty("审批说明")
private String approvalInstructions;
@ApiModelProperty("更新时间")
private Date updateTime;
}

@ -0,0 +1,24 @@
package com.daqing.financial.guarantee.model.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* @Author chen
* @DATE 2020/11/16 20:16
* @Version 1.0
* 业务申请列表导出
*/
@Data
public class UpdateUserVisualReq {
@ApiModelProperty("流程管理模板id")
private Integer id;
@ApiModelProperty("可见人id")
private List<Integer> ids;
}

@ -3,6 +3,7 @@ package com.daqing.financial.guarantee.model.response;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.daqing.framework.domain.guarantee.DgAssetsAssessmentAssetsLog; import com.daqing.framework.domain.guarantee.DgAssetsAssessmentAssetsLog;
import com.daqing.framework.domain.guarantee.DgBusinessCompany;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.ToString; import lombok.ToString;
@ -31,8 +32,8 @@ public class AssetsDetailResponse implements Serializable {
/** /**
* 企业详细 * 企业详细
*/ */
@ApiModelProperty(value = "企业详细") /* @ApiModelProperty(value = "企业详细")
private LinkedHashMap linkedHashMap; private LinkedHashMap linkedHashMap;*/
/** /**
* 资产调查详细 * 资产调查详细
@ -40,4 +41,7 @@ public class AssetsDetailResponse implements Serializable {
@ApiModelProperty(value = "资产调查详细") @ApiModelProperty(value = "资产调查详细")
private DgAssetsInvestigationResponse assetsResponse; private DgAssetsInvestigationResponse assetsResponse;
@ApiModelProperty(value = "企业详细")
private DgBusinessCompany dgBusinessCompany;
} }

@ -1,5 +1,6 @@
package com.daqing.financial.guarantee.model.response; package com.daqing.financial.guarantee.model.response;
import com.daqing.framework.domain.guarantee.DgBusinessCompany;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -78,6 +79,9 @@ public class AuditOpinionResponse implements Serializable {
/** /**
* 企业详细 * 企业详细
*/ */
/* @ApiModelProperty(value = "企业详细")
private LinkedHashMap linkedHashMap;*/
@ApiModelProperty(value = "企业详细") @ApiModelProperty(value = "企业详细")
private LinkedHashMap linkedHashMap; private DgBusinessCompany dgBusinessCompany;
} }

@ -3,6 +3,7 @@ package com.daqing.financial.guarantee.model.response;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.daqing.framework.domain.guarantee.DgApplyAmountInfo; import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
import com.daqing.framework.domain.guarantee.DgBusinessCompany;
import com.daqing.framework.domain.guarantee.DgEnclosureInfo; import com.daqing.framework.domain.guarantee.DgEnclosureInfo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -31,8 +32,8 @@ public class BusinessApplicationDetailResponse implements Serializable {
/** /**
* 企业详细 * 企业详细
*/ */
@ApiModelProperty(value = "企业详细") /* @ApiModelProperty(value = "企业详细")
private LinkedHashMap linkedHashMap; private LinkedHashMap linkedHashMap;*/
/** /**
* 附件详细 * 附件详细
@ -43,8 +44,11 @@ public class BusinessApplicationDetailResponse implements Serializable {
/** /**
* 关联人信息列表 * 关联人信息列表
*/ */
@ApiModelProperty(value = "关联人信息列表") /* @ApiModelProperty(value = "关联人信息列表")
private LinkedHashMap linkedHashMap2; private LinkedHashMap linkedHashMap2;*/
@ApiModelProperty(value = "备份企业详细")
private DgBusinessCompany dgBusinessCompany;

@ -1,34 +1,94 @@
package com.daqing.financial.guarantee.model.response; package com.daqing.financial.guarantee.model.response;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel; import com.alibaba.excel.metadata.BaseRowModel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.daqing.framework.utils.excel.ApprovalStatusConverter;
import com.daqing.framework.utils.excel.BusinessStatusConverter;
import com.daqing.framework.utils.excel.OperatingStatusConverter;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.ToString; import lombok.ToString;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@Data @Data
@ToString @ToString
public class DgNoticeListResponse extends BaseRowModel implements Serializable { public class DgNoticeListResponse extends BaseRowModel implements Serializable {
/**
* 业务编号
*/
@ExcelProperty(value = "业务编号",index = 0)
@ApiModelProperty(value = "业务编号") @ApiModelProperty(value = "业务编号")
private String businessCode; private String businessCode;
/**
* 申请时间
*/
@ExcelProperty(value = "申请日期",index = 6)
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value = "申请时间") @ApiModelProperty(value = "申请时间")
private Date createTime; private Date createTime;
@ApiModelProperty(value = "id")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "企业id")
private Integer companyId;
@ExcelIgnore
@ApiModelProperty(value = "业务id")
private Integer businessId;
@ExcelIgnore
@ApiModelProperty(value = "角色id")
private Integer roleId;
@ApiModelProperty(value = "提单人id")
private Integer presenterId;
@ApiModelProperty(value = "客户名称")
private String name;
@ApiModelProperty(value = "联系电话")
private String phone;
@ApiModelProperty(value = "业务类型")
private String businessType;
@ApiModelProperty(value = "申请额度")
private BigDecimal applyAmount;
@ApiModelProperty(value = "申请期限")
private String applyTime;
@ApiModelProperty("审核状态")
private Integer status;
@ApiModelProperty("业务状态")
private Integer businessStatus;
@ApiModelProperty("操作状态")
private Integer operatingStatus;
//--------------工作会需要内容--------------------------
@ApiModelProperty("A角")
private Integer aUserId;
@ApiModelProperty("B角")
private Integer bUserId;
@ApiModelProperty("法规部领导")
private Integer iUserId;
@ApiModelProperty("资产部领导")
private Integer assUserId;
@ApiModelProperty("信息部领导")
private Integer mUserId;
//-------------------结束-----------------------------
@ApiModelProperty("业务管理模块id")
private Integer modelId;
} }

@ -2,6 +2,7 @@ package com.daqing.financial.guarantee.model.response;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.daqing.framework.domain.guarantee.DgBusinessCompany;
import com.daqing.framework.domain.guarantee.DgGuaranteeAssignUser; import com.daqing.framework.domain.guarantee.DgGuaranteeAssignUser;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -30,8 +31,8 @@ public class GuaranteeDetailResponse implements Serializable {
/** /**
* 企业详细 * 企业详细
*/ */
@ApiModelProperty(value = "企业详细") /* @ApiModelProperty(value = "企业详细")
private LinkedHashMap linkedHashMap; private LinkedHashMap linkedHashMap;*/
/** /**
* 附件详细 * 附件详细
@ -45,5 +46,8 @@ public class GuaranteeDetailResponse implements Serializable {
@ApiModelProperty(value = "担保详细") @ApiModelProperty(value = "担保详细")
private DgGuaranteeAssignUserResponse assignUser; private DgGuaranteeAssignUserResponse assignUser;
@ApiModelProperty(value = "企业详细")
private DgBusinessCompany dgBusinessCompany;
} }

@ -2,6 +2,7 @@ package com.daqing.financial.guarantee.model.response;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.daqing.framework.domain.guarantee.DgBusinessCompany;
import com.daqing.framework.domain.guarantee.DgMessageInvestigation; import com.daqing.framework.domain.guarantee.DgMessageInvestigation;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -31,8 +32,8 @@ public class MessageDetailResponse implements Serializable {
/** /**
* 企业详细 * 企业详细
*/ */
@ApiModelProperty(value = "企业详细") /* @ApiModelProperty(value = "企业详细")
private LinkedHashMap linkedHashMap; private LinkedHashMap linkedHashMap;*/
/** /**
* 附件详细 * 附件详细
@ -49,4 +50,7 @@ public class MessageDetailResponse implements Serializable {
@ApiModelProperty(value = "信息部调查专员") @ApiModelProperty(value = "信息部调查专员")
private String CName; private String CName;
@ApiModelProperty(value = "企业详细")
private DgBusinessCompany dgBusinessCompany;
} }

@ -0,0 +1,17 @@
package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.framework.domain.guarantee.DgBusinessCompany;
/**
* <p>
* 业务关联企业表 服务类
* </p>
*
* @author Qyq
* @since 2021-01-27
*/
public interface IDgBusinessCompanyService extends IService<DgBusinessCompany> {
}

@ -1,16 +0,0 @@
package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.framework.domain.guarantee.DgComplianceAssignUser;
/**
* <p>
* 合规调查记录 服务类
* </p>
*
* @author Qyq
* @since 2020-11-05
*/
public interface IDgComplianceAssignUserService extends IService<DgComplianceAssignUser> {
}

@ -2,8 +2,11 @@ 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.ProcessManageRequest;
import com.daqing.financial.guarantee.model.response.DgProessManageRes; import com.daqing.financial.guarantee.model.response.DgProessManageRes;
import com.daqing.framework.domain.guarantee.DgProcessManage; import com.daqing.framework.domain.guarantee.DgProcessManage;
import com.daqing.framework.domain.hrms.ext.EmployeeVO;
import com.daqing.framework.domain.hrms.ext.UserDeptVO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@ -20,7 +23,9 @@ public interface IDgProcessManageService extends IService<DgProcessManage> {
List<DgProcessManage> processManageList(String userId); List<DgProcessManage> processManageList(String userId);
List<Integer> processVisualList(Integer id); List<EmployeeVO> processVisualList(Integer id);
Boolean updateUserVisual(@Param("id") Integer id, @Param("ids") List<Integer> ids); Boolean updateUserVisual(@Param("id") Integer id, @Param("ids") List<Integer> ids);
int updateProcessManage(@Param("processManageReq")ProcessManageRequest processManageReq);
} }

@ -31,6 +31,7 @@ import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.excel.ExcelUtil; import com.daqing.framework.utils.excel.ExcelUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.data.redis.core.RedisTemplate; 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.transaction.annotation.Transactional;
@ -86,6 +87,8 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
private DgBusinessProcessStatusMapper dgBusinessProcessStatusMapper; private DgBusinessProcessStatusMapper dgBusinessProcessStatusMapper;
@Resource @Resource
private DgApplyAmountInfoController dgApplyAmountInfoController; private DgApplyAmountInfoController dgApplyAmountInfoController;
@Resource
private DgBusinessCompanyMapper dgBusinessCompanyMapper;
@Override @Override
public String getRoles() { public String getRoles() {
@ -153,7 +156,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
String timeCode=dateTime.replaceAll("-",""); String timeCode=dateTime.replaceAll("-","");
int count = dgApplyAmountInfoMapper.selectBusinessTaday(dateTime); int count = dgApplyAmountInfoMapper.selectBusinessTaday(dateTime);
if(count ==0){//今天没有申请过业务,所以编号从001开始 if(count ==0){//今天没有申请过业务,所以编号从001开始
if(businessApplication.getBusinessType().equals("融资担保")){//融资业务:RZ-20201231001 if(businessApplication.getBusinessType()!= null && businessApplication.getBusinessType().equals("融资担保")){//融资业务:RZ-20201231001
businessCode="RZ-"+timeCode+"001"; businessCode="RZ-"+timeCode+"001";
}else{//非融资业务:FRZ-20201231001 }else{//非融资业务:FRZ-20201231001
businessCode="FRZ-"+timeCode+"001"; businessCode="FRZ-"+timeCode+"001";
@ -163,7 +166,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
String code = dgApplyAmountInfoMapper.selectMaxBusinessTaday(dateTime); String code = dgApplyAmountInfoMapper.selectMaxBusinessTaday(dateTime);
int codeNumber = Integer.parseInt(code.substring(code.length() - 3)); int codeNumber = Integer.parseInt(code.substring(code.length() - 3));
String newBusinessCode = String.format("%03d", (codeNumber + 1)); String newBusinessCode = String.format("%03d", (codeNumber + 1));
if(businessApplication.getBusinessType().equals("融资担保")){//融资业务:RZ-20201231001 if(businessApplication.getBusinessType()!= null && businessApplication.getBusinessType().equals("融资担保")){//融资业务:RZ-20201231001
businessCode="RZ-"+timeCode+newBusinessCode; businessCode="RZ-"+timeCode+newBusinessCode;
}else{//非融资业务:FRZ-20201231001 }else{//非融资业务:FRZ-20201231001
businessCode="FRZ-"+timeCode+newBusinessCode; businessCode="FRZ-"+timeCode+newBusinessCode;
@ -171,7 +174,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
} }
dgApplyAmountInfo.setBusinessCode(businessCode); dgApplyAmountInfo.setBusinessCode(businessCode);
dgApplyAmountInfoMapper.insert(dgApplyAmountInfo); int insert = dgApplyAmountInfoMapper.insert(dgApplyAmountInfo);
//新增到业务列表 //新增到业务列表
DgApplyAmountList dgApplyAmountList = new DgApplyAmountList(); DgApplyAmountList dgApplyAmountList = new DgApplyAmountList();
@ -229,6 +232,22 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
dgEnclosureInfo.setInspectionPhotos(ArraysUtil.toString(businessApplication.getInspectionPhotos())); dgEnclosureInfo.setInspectionPhotos(ArraysUtil.toString(businessApplication.getInspectionPhotos()));
dgEnclosureInfoMapper.insert(dgEnclosureInfo); dgEnclosureInfoMapper.insert(dgEnclosureInfo);
//根据企业id查询企业详情
DgApplyAmountInfoRequest applyAmountInfo = new DgApplyAmountInfoRequest();
applyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId());
ResponseResult result = crmsFeignService.queryCustomerInfoById(applyAmountInfo);
LinkedHashMap linkedList = (LinkedHashMap)result.getData();
Object o1 = linkedList.get("linkman");
Object o2 = linkedList.get("linkPhone");
//备份企业信息,以防企业信息改动从而影响业务信息变更
DgBusinessCompany dgBusinessCompany = new DgBusinessCompany();
BeanUtils.copyProperties(businessApplication,dgBusinessCompany);
dgBusinessCompany.setBusinessId(dgApplyAmountInfo.getId());
dgBusinessCompany.setLinkman(o1.toString());
dgBusinessCompany.setLinkPhone(o2.toString());
dgBusinessCompanyMapper.insert(dgBusinessCompany);
//如果审批状态为审核中,操作状态为已发起,则往担保部经理添加一条待审核的记录 //如果审批状态为审核中,操作状态为已发起,则往担保部经理添加一条待审核的记录
if(dgApplyAmountList.getStatus().equals(StatusCode.SP_IN_REVIEW) && dgApplyAmountList.getOperatingStatus().equals(StatusCode.CZ_LAUNCH)){ if(dgApplyAmountList.getStatus().equals(StatusCode.SP_IN_REVIEW) && dgApplyAmountList.getOperatingStatus().equals(StatusCode.CZ_LAUNCH)){
DgApplyAmountList applyAmountList = new DgApplyAmountList(); DgApplyAmountList applyAmountList = new DgApplyAmountList();
@ -238,6 +257,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
applyAmountList.setType(2);//设置类型 applyAmountList.setType(2);//设置类型
applyAmountList.setStatus(StatusCode.SP_IN_REVIEW);//状态设置为审核中 applyAmountList.setStatus(StatusCode.SP_IN_REVIEW);//状态设置为审核中
applyAmountList.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理 applyAmountList.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
applyAmountList.setVer(1);//设置担保部经理的初始版本号
dgApplyAmountListMapper.insert(applyAmountList); dgApplyAmountListMapper.insert(applyAmountList);
//同时往业务流程状态表新增一条记录 //同时往业务流程状态表新增一条记录
@ -288,12 +308,16 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
} }
dgApplyAmountInfo.setRemark(dgApplyAmountList.getApplyContent()); dgApplyAmountInfo.setRemark(dgApplyAmountList.getApplyContent());
DgApplyAmountInfoRequest applyAmountInfo = new DgApplyAmountInfoRequest(); /* DgApplyAmountInfoRequest applyAmountInfo = new DgApplyAmountInfoRequest();
applyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId()); applyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId());
//根据企业id查询企业详情 //根据企业id查询企业详情
ResponseResult result = crmsFeignService.queryCustomerInfoById(applyAmountInfo); ResponseResult result = crmsFeignService.queryCustomerInfoById(applyAmountInfo);
LinkedHashMap linkedList = (LinkedHashMap)result.getData(); LinkedHashMap linkedList = (LinkedHashMap)result.getData();*/
//根据业务id查询备份企业信息
DgBusinessCompany dgBusinessCompany = dgBusinessCompanyMapper.selectOne(new QueryWrapper<DgBusinessCompany>()
.eq("business_id", dgApplyAmountList.getBusinessId()));
//查询附件详细,附件关联业务主键id //查询附件详细,附件关联业务主键id
DgEnclosureInfoResponse dgEnclosureInfo = dgEnclosureInfoMapper.selectByCompanyId(dgApplyAmountList.getBusinessId()); DgEnclosureInfoResponse dgEnclosureInfo = dgEnclosureInfoMapper.selectByCompanyId(dgApplyAmountList.getBusinessId());
@ -342,18 +366,10 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
dgEnclosureInfo.setMeetingMinutesList((List<String>) arr1List2.get(12)); dgEnclosureInfo.setMeetingMinutesList((List<String>) arr1List2.get(12));
dgEnclosureInfo.setMarriageCopyList((List<String>) arr1List2.get(13)); dgEnclosureInfo.setMarriageCopyList((List<String>) arr1List2.get(13));
/* int page=1;
int size=10;
//关联人信息列表展示
ResponseResult list = crmsFeignService.companyPersonalList(page,size,dgApplyAmountInfo.getCompanyId());
LinkedHashMap personalList = (LinkedHashMap)list.getData();
System.out.println("关联人信息列表======================="+personalList);*/
BusinessApplicationDetailResponse businessApplicationDetail= new BusinessApplicationDetailResponse(); BusinessApplicationDetailResponse businessApplicationDetail= new BusinessApplicationDetailResponse();
businessApplicationDetail.setDgApplyAmountInfo(dgApplyAmountInfo); businessApplicationDetail.setDgApplyAmountInfo(dgApplyAmountInfo);
businessApplicationDetail.setDgEnclosureInfo(dgEnclosureInfo); businessApplicationDetail.setDgEnclosureInfo(dgEnclosureInfo);
businessApplicationDetail.setLinkedHashMap(linkedList); businessApplicationDetail.setDgBusinessCompany(dgBusinessCompany);
//businessApplicationDetail.setLinkedHashMap2(personalList);
return businessApplicationDetail; return businessApplicationDetail;
} }
@ -395,6 +411,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
applyAmountList.setType(2);//设置类型 applyAmountList.setType(2);//设置类型
applyAmountList.setStatus(StatusCode.SP_IN_REVIEW);//状态设置为审核中 applyAmountList.setStatus(StatusCode.SP_IN_REVIEW);//状态设置为审核中
applyAmountList.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理 applyAmountList.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理
applyAmountList.setVer(1);//设置担保部经理的初始版本号
dgApplyAmountListMapper.insert(applyAmountList); dgApplyAmountListMapper.insert(applyAmountList);
} }
@ -453,6 +470,22 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
//根据业务id删除对应的附件信息 //根据业务id删除对应的附件信息
dgEnclosureInfoMapper.delete(new QueryWrapper<DgEnclosureInfo>().eq("business_id",businessApplication.getBusinessId())); dgEnclosureInfoMapper.delete(new QueryWrapper<DgEnclosureInfo>().eq("business_id",businessApplication.getBusinessId()));
//根据企业id查询企业详情
DgApplyAmountInfoRequest applyAmountInfo = new DgApplyAmountInfoRequest();
applyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId());
ResponseResult result = crmsFeignService.queryCustomerInfoById(applyAmountInfo);
LinkedHashMap linkedList = (LinkedHashMap)result.getData();
Object o1 = linkedList.get("linkman");
Object o2 = linkedList.get("linkPhone");
//修改备份企业信息
DgBusinessCompany dgBusinessCompany = new DgBusinessCompany();
BeanUtils.copyProperties(businessApplication,dgBusinessCompany);
dgBusinessCompany.setLinkPhone(String.valueOf(o2));
dgBusinessCompany.setLinkman(String.valueOf(o1));
System.out.println("dgBusinessCompany============="+dgBusinessCompany);
dgBusinessCompanyMapper.update(dgBusinessCompany,new QueryWrapper<DgBusinessCompany>()
.eq("business_id",businessApplication.getBusinessId()));
//同时往审核流程进程表新增一条记录 //同时往审核流程进程表新增一条记录
String account = dgApplyAmountInfoController.getAccount(); String account = dgApplyAmountInfoController.getAccount();
String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId())); String departmentId = OrdinaryUtil.getDepartmentId(Integer.parseInt(this.getUserId()));
@ -551,16 +584,21 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
//根据id查询业务id
DgApplyAmountList dgApplyAmountList1 = dgApplyAmountListMapper.selectById(id);
//根据dg_apply_amount_list表的id修改当前业务状态 //根据dg_apply_amount_list表的id修改当前业务状态
DgApplyAmountList dgApplyAmountList = new DgApplyAmountList(); DgApplyAmountList dgApplyAmountList = new DgApplyAmountList();
dgApplyAmountList.setStatus(status); dgApplyAmountList.setStatus(status);
dgApplyAmountList.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态改为已处理 dgApplyAmountList.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态改为已处理
dgApplyAmountList.setApplyContent(remark); dgApplyAmountList.setApplyContent(remark);
dgApplyAmountList.setEmpId(Integer.parseInt(userId)); dgApplyAmountList.setEmpId(Integer.parseInt(userId));
dgApplyAmountListMapper.update(dgApplyAmountList,new QueryWrapper<DgApplyAmountList>().eq("id",id)); dgApplyAmountList.setVer(dgApplyAmountList1.getVer()+1);//设置担保部经理的版本号+1
int update = dgApplyAmountListMapper.update(dgApplyAmountList, new QueryWrapper<DgApplyAmountList>()
.eq("id", id).eq("ver", dgApplyAmountList1.getVer()));
if(update<=0)
return 0;
//根据id查询业务id
DgApplyAmountList dgApplyAmountList1 = dgApplyAmountListMapper.selectById(id);
//修改专员那一条记录审核状态 //修改专员那一条记录审核状态
DgApplyAmountList applyAmountList = new DgApplyAmountList(); DgApplyAmountList applyAmountList = new DgApplyAmountList();
applyAmountList.setStatus(status); applyAmountList.setStatus(status);

@ -82,6 +82,8 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
private DgComplianceInvestigationMapper dgComplianceInvestigationMapper; private DgComplianceInvestigationMapper dgComplianceInvestigationMapper;
@Resource @Resource
private DgBusinessProcessStatusMapper dgBusinessProcessStatusMapper; private DgBusinessProcessStatusMapper dgBusinessProcessStatusMapper;
@Resource
private DgBusinessCompanyMapper dgBusinessCompanyMapper;
@Override @Override
public PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List<String> roleIdlist, String userId, Integer status) { public PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List<String> roleIdlist, String userId, Integer status) {
@ -228,9 +230,13 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
DgApplyAmountInfoRequest applyAmountInfo = new DgApplyAmountInfoRequest(); DgApplyAmountInfoRequest applyAmountInfo = new DgApplyAmountInfoRequest();
applyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId()); applyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId());
//根据企业id查询企业详情 //根据企业id查询企业详情
ResponseResult result = crmsFeignService.queryCustomerInfoById(applyAmountInfo); /* ResponseResult result = crmsFeignService.queryCustomerInfoById(applyAmountInfo);
LinkedHashMap linkedList = (LinkedHashMap)result.getData();*/
LinkedHashMap linkedList = (LinkedHashMap)result.getData(); //根据业务id查询备份企业信息
DgBusinessCompany dgBusinessCompany = dgBusinessCompanyMapper.selectOne(new QueryWrapper<DgBusinessCompany>()
.eq("business_id", assetsResponse.getBusinessId()));
//查询该业务id下对应的C角 //查询该业务id下对应的C角
DgAssetsInvestigation assetsInvestigate = this.baseMapper.selectOne(new QueryWrapper<DgAssetsInvestigation>() DgAssetsInvestigation assetsInvestigate = this.baseMapper.selectOne(new QueryWrapper<DgAssetsInvestigation>()
@ -248,7 +254,8 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
AssetsDetailResponse assetsDetailResponse = new AssetsDetailResponse(); AssetsDetailResponse assetsDetailResponse = new AssetsDetailResponse();
assetsDetailResponse.setDgApplyAmountInfo(dgApplyAmountInfo); assetsDetailResponse.setDgApplyAmountInfo(dgApplyAmountInfo);
assetsDetailResponse.setLinkedHashMap(linkedList); assetsDetailResponse.setDgBusinessCompany(dgBusinessCompany);
//assetsDetailResponse.setLinkedHashMap(linkedList);
assetsDetailResponse.setAssetsResponse(assetsResponse); assetsDetailResponse.setAssetsResponse(assetsResponse);
return assetsDetailResponse; return assetsDetailResponse;

@ -27,8 +27,8 @@ import java.util.List;
public class DgAuditProcessServiceImpl extends ServiceImpl<DgAuditProcessMapper, DgAuditProcess> implements IDgAuditProcessService { public class DgAuditProcessServiceImpl extends ServiceImpl<DgAuditProcessMapper, DgAuditProcess> implements IDgAuditProcessService {
@Override @Override
public List<DgAuditProcess> queryProcessList(String businessId,String processId) { public List<DgAuditProcess> queryProcessList(String businessId, String processId) {
List<DgAuditProcess> auditProcessList = baseMapper.selectAuditProcessList(businessId,processId); List<DgAuditProcess> auditProcessList = baseMapper.selectAuditProcessList(businessId, processId);
return auditProcessList; return auditProcessList;
} }
@ -43,7 +43,7 @@ public class DgAuditProcessServiceImpl extends ServiceImpl<DgAuditProcessMapper,
String startTime = dateFormat.format(DateUtils.getDayBegin()); String startTime = dateFormat.format(DateUtils.getDayBegin());
String endTime = dateFormat.format(DateUtils.getDayEnd()); String endTime = dateFormat.format(DateUtils.getDayEnd());
String userId = this.getUserId(); String userId = this.getUserId();
return baseMapper.selectTodayApprovalRecord(userId,startTime,endTime); return baseMapper.selectTodayApprovalRecord(userId, startTime, endTime);
} }
/** /**

@ -0,0 +1,20 @@
package com.daqing.financial.guarantee.service.impl;
import com.daqing.financial.guarantee.mapper.DgBusinessCompanyMapper;
import com.daqing.financial.guarantee.service.IDgBusinessCompanyService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.framework.domain.guarantee.DgBusinessCompany;
import org.springframework.stereotype.Service;
/**
* <p>
* 业务关联企业表 服务实现类
* </p>
*
* @author Qyq
* @since 2021-01-27
*/
@Service
public class DgBusinessCompanyServiceImpl extends ServiceImpl<DgBusinessCompanyMapper, DgBusinessCompany> implements IDgBusinessCompanyService {
}

@ -1,20 +0,0 @@
package com.daqing.financial.guarantee.service.impl;
import com.daqing.financial.guarantee.mapper.DgComplianceAssignUserMapper;
import com.daqing.financial.guarantee.service.IDgComplianceAssignUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.framework.domain.guarantee.DgComplianceAssignUser;
import org.springframework.stereotype.Service;
/**
* <p>
* 合规调查记录 服务实现类
* </p>
*
* @author Qyq
* @since 2020-11-05
*/
@Service
public class DgComplianceAssignUserServiceImpl extends ServiceImpl<DgComplianceAssignUserMapper, DgComplianceAssignUser> implements IDgComplianceAssignUserService {
}

@ -19,6 +19,7 @@ import com.daqing.framework.model.response.PromptSuccess;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;

@ -95,9 +95,10 @@ public class DgCopyUserServiceImpl extends ServiceImpl<DgCopyUserMapper, DgCopyU
employeeMessage = (List<LinkedHashMap>) responseResult.getData(); employeeMessage = (List<LinkedHashMap>) responseResult.getData();
} }
if(employeeMessage != null){
for (CopyForMeResponse response : copyForMeResponseList) { for (CopyForMeResponse response : copyForMeResponseList) {
for (LinkedHashMap res : employeeMessage) { for (LinkedHashMap res : employeeMessage) {
if (response.getApplicantId().equals(res.get("id"))) {//如果提单人id相同情况下,就往对象里面赋值 if (response.getApplicantId()!=null && response.getApplicantId().equals(res.get("id"))) {//如果提单人id相同情况下,就往对象里面赋值
response.setApplicant(JSONObject.toJSONString(res.get("account")).replace("\"", "")); response.setApplicant(JSONObject.toJSONString(res.get("account")).replace("\"", ""));
} }
if (response.getApproveId()!=null){ if (response.getApproveId()!=null){
@ -109,6 +110,8 @@ public class DgCopyUserServiceImpl extends ServiceImpl<DgCopyUserMapper, DgCopyU
} }
} }
}
return copyForMeResponseList; return copyForMeResponseList;
} }

@ -633,6 +633,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
List<DgNoticeListResponse> list = new ArrayList(); List<DgNoticeListResponse> list = new ArrayList();
for (DgNoticeListResponse res : list1) { for (DgNoticeListResponse res : list1) {
res.setBusinessCode("您有一个待办任务需办理,评审内容:业务申请:" + res.getBusinessCode()); res.setBusinessCode("您有一个待办任务需办理,评审内容:业务申请:" + res.getBusinessCode());
res.setModelId(1);
list.add(res); list.add(res);
} }
@ -640,6 +641,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
List<DgNoticeListResponse> list2 = guaranteeAssignUserMapper.selectGuaranteeList(userId, roleIdlist); List<DgNoticeListResponse> list2 = guaranteeAssignUserMapper.selectGuaranteeList(userId, roleIdlist);
for (DgNoticeListResponse res : list2) { for (DgNoticeListResponse res : list2) {
res.setBusinessCode("您有一个待办任务需办理,评审内容:担保部调查:" + res.getBusinessCode()); res.setBusinessCode("您有一个待办任务需办理,评审内容:担保部调查:" + res.getBusinessCode());
res.setModelId(2);
list.add(res); list.add(res);
} }
@ -647,6 +649,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
List<DgNoticeListResponse> list3 = assetsInvestigationMapper.selectAssetsList(userId, roleIdlist); List<DgNoticeListResponse> list3 = assetsInvestigationMapper.selectAssetsList(userId, roleIdlist);
for (DgNoticeListResponse res : list3) { for (DgNoticeListResponse res : list3) {
res.setBusinessCode("您有一个待办任务需办理,评审内容:资产部调查:" + res.getBusinessCode()); res.setBusinessCode("您有一个待办任务需办理,评审内容:资产部调查:" + res.getBusinessCode());
res.setModelId(3);
list.add(res); list.add(res);
} }
@ -654,6 +657,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
List<DgNoticeListResponse> list4 = messageInvestigationMapper.selectMessageList(userId, roleIdlist); List<DgNoticeListResponse> list4 = messageInvestigationMapper.selectMessageList(userId, roleIdlist);
for (DgNoticeListResponse res : list4) { for (DgNoticeListResponse res : list4) {
res.setBusinessCode("您有一个待办任务需办理,评审内容:信息部调查:" + res.getBusinessCode()); res.setBusinessCode("您有一个待办任务需办理,评审内容:信息部调查:" + res.getBusinessCode());
res.setModelId(4);
list.add(res); list.add(res);
} }
@ -661,6 +665,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
List<DgNoticeListResponse> list5 = complianceInvestigationMapper.selectComplianceList(userId, roleIdlist); List<DgNoticeListResponse> list5 = complianceInvestigationMapper.selectComplianceList(userId, roleIdlist);
for (DgNoticeListResponse res : list5) { for (DgNoticeListResponse res : list5) {
res.setBusinessCode("您有一个待办任务需办理,评审内容:合规调查:" + res.getBusinessCode()); res.setBusinessCode("您有一个待办任务需办理,评审内容:合规调查:" + res.getBusinessCode());
res.setModelId(5);
list.add(res); list.add(res);
} }
@ -668,6 +673,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
List<DgNoticeListResponse> list6 = workConferenceConsiderMapper.selectWorkConferenceList(userId, roleIdlist); List<DgNoticeListResponse> list6 = workConferenceConsiderMapper.selectWorkConferenceList(userId, roleIdlist);
for (DgNoticeListResponse res : list6) { for (DgNoticeListResponse res : list6) {
res.setBusinessCode("您有一个待办任务需办理,评审内容:工作会:" + res.getBusinessCode()); res.setBusinessCode("您有一个待办任务需办理,评审内容:工作会:" + res.getBusinessCode());
res.setModelId(6);
list.add(res); list.add(res);
} }
@ -675,6 +681,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
List<DgNoticeListResponse> list7 = loanCommitteeConsiderMapper.selectLoanCommitteeList(userId, roleIdlist); List<DgNoticeListResponse> list7 = loanCommitteeConsiderMapper.selectLoanCommitteeList(userId, roleIdlist);
for (DgNoticeListResponse res : list7) { for (DgNoticeListResponse res : list7) {
res.setBusinessCode("您有一个待办任务需办理,评审内容:贷审会:" + res.getBusinessCode()); res.setBusinessCode("您有一个待办任务需办理,评审内容:贷审会:" + res.getBusinessCode());
res.setModelId(7);
list.add(res); list.add(res);
} }
@ -682,12 +689,14 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
List<DgNoticeListResponse> list8 = guaranteeLetterAssignUserMapper.selectGuaranteeLetterList(userId, roleIdlist); List<DgNoticeListResponse> list8 = guaranteeLetterAssignUserMapper.selectGuaranteeLetterList(userId, roleIdlist);
for (DgNoticeListResponse res : list8) { for (DgNoticeListResponse res : list8) {
res.setBusinessCode("您有一个待办任务需办理,评审内容:担保函:" + res.getBusinessCode()); res.setBusinessCode("您有一个待办任务需办理,评审内容:担保函:" + res.getBusinessCode());
res.setModelId(8);
list.add(res); list.add(res);
} }
//回款确认模块,查询该用户待处理的记录 //回款确认模块,查询该用户待处理的记录
List<DgNoticeListResponse> list9 = paymentConfirmationConsiderMapper.selectPaymentConfirmationList(userId, roleIdlist); List<DgNoticeListResponse> list9 = paymentConfirmationConsiderMapper.selectPaymentConfirmationList(userId, roleIdlist);
for (DgNoticeListResponse res : list9) { for (DgNoticeListResponse res : list9) {
res.setBusinessCode("您有一个待办任务需办理,评审内容:回款确认:" + res.getBusinessCode()); res.setBusinessCode("您有一个待办任务需办理,评审内容:回款确认:" + res.getBusinessCode());
res.setModelId(9);
list.add(res); list.add(res);
} }
@ -695,6 +704,7 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
List<DgNoticeListResponse> list10 = loanNoticeMapper.selectLoanNoticeList(userId, roleIdlist); List<DgNoticeListResponse> list10 = loanNoticeMapper.selectLoanNoticeList(userId, roleIdlist);
for (DgNoticeListResponse res : list10) { for (DgNoticeListResponse res : list10) {
res.setBusinessCode("您有一个待办任务需办理,评审内容:放款通知:" + res.getBusinessCode()); res.setBusinessCode("您有一个待办任务需办理,评审内容:放款通知:" + res.getBusinessCode());
res.setModelId(10);
list.add(res); list.add(res);
} }
return list; return list;

@ -86,6 +86,8 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
private DgGuaranteeAssignUserMapper dgGuaranteeAssignUserMapper; private DgGuaranteeAssignUserMapper dgGuaranteeAssignUserMapper;
@Resource @Resource
private HrmsFeignService hrmsFeignService; private HrmsFeignService hrmsFeignService;
@Resource
private DgBusinessCompanyMapper dgBusinessCompanyMapper;
@Override @Override
@ -121,10 +123,14 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
DgApplyAmountInfoRequest applyAmountInfo = new DgApplyAmountInfoRequest(); DgApplyAmountInfoRequest applyAmountInfo = new DgApplyAmountInfoRequest();
applyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId()); applyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId());
//根据企业id查询企业详情 /* //根据企业id查询企业详情
ResponseResult result = crmsFeignService.queryCustomerInfoById(applyAmountInfo); ResponseResult result = crmsFeignService.queryCustomerInfoById(applyAmountInfo);
LinkedHashMap linkedList = (LinkedHashMap) result.getData(); LinkedHashMap linkedList = (LinkedHashMap) result.getData();*/
//根据业务id查询备份企业信息
DgBusinessCompany dgBusinessCompany = dgBusinessCompanyMapper.selectOne(new QueryWrapper<DgBusinessCompany>()
.eq("business_id", guaranteeAssignUser.getBusinessId()));
//查询附件详细,附件关联业务主键id //查询附件详细,附件关联业务主键id
DgEnclosureInfoResponse dgEnclosureInfo = dgEnclosureInfoMapper.selectByCompanyId(guaranteeAssignUser.getBusinessId()); DgEnclosureInfoResponse dgEnclosureInfo = dgEnclosureInfoMapper.selectByCompanyId(guaranteeAssignUser.getBusinessId());
@ -216,7 +222,8 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
GuaranteeDetailResponse guaranteeDetailResponse = new GuaranteeDetailResponse(); GuaranteeDetailResponse guaranteeDetailResponse = new GuaranteeDetailResponse();
guaranteeDetailResponse.setDgApplyAmountInfo(dgApplyAmountInfo); guaranteeDetailResponse.setDgApplyAmountInfo(dgApplyAmountInfo);
guaranteeDetailResponse.setDgEnclosureInfo(dgEnclosureInfo); guaranteeDetailResponse.setDgEnclosureInfo(dgEnclosureInfo);
guaranteeDetailResponse.setLinkedHashMap(linkedList); guaranteeDetailResponse.setDgBusinessCompany(dgBusinessCompany);
//guaranteeDetailResponse.setLinkedHashMap(linkedList);
guaranteeDetailResponse.setAssignUser(assignUser); guaranteeDetailResponse.setAssignUser(assignUser);
return guaranteeDetailResponse; return guaranteeDetailResponse;
} }

@ -82,6 +82,8 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
private DgComplianceInvestigationMapper dgComplianceInvestigationMapper; private DgComplianceInvestigationMapper dgComplianceInvestigationMapper;
@Resource @Resource
private DgBusinessProcessStatusMapper dgBusinessProcessStatusMapper; private DgBusinessProcessStatusMapper dgBusinessProcessStatusMapper;
@Resource
private DgBusinessCompanyMapper dgBusinessCompanyMapper;
@Override @Override
public PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List<String> roleIdlist, String userId, Integer status) { public PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List<String> roleIdlist, String userId, Integer status) {
@ -196,9 +198,13 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
DgApplyAmountInfoRequest applyAmountInfo = new DgApplyAmountInfoRequest(); DgApplyAmountInfoRequest applyAmountInfo = new DgApplyAmountInfoRequest();
applyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId()); applyAmountInfo.setCompanyId(dgApplyAmountInfo.getCompanyId());
//根据企业id查询企业详情 //根据企业id查询企业详情
ResponseResult result = crmsFeignService.queryCustomerInfoById(applyAmountInfo); /* ResponseResult result = crmsFeignService.queryCustomerInfoById(applyAmountInfo);
LinkedHashMap linkedList = (LinkedHashMap)result.getData();*/
LinkedHashMap linkedList = (LinkedHashMap)result.getData(); //根据业务id查询备份企业信息
DgBusinessCompany dgBusinessCompany = dgBusinessCompanyMapper.selectOne(new QueryWrapper<DgBusinessCompany>()
.eq("business_id", dgMessageInvestigation.getBusinessId()));
//查询附件详细,附件关联业务主键id //查询附件详细,附件关联业务主键id
DgEnclosureInfoResponse dgEnclosureInfo = dgEnclosureInfoMapper.selectByCompanyId(dgMessageInvestigation.getBusinessId()); DgEnclosureInfoResponse dgEnclosureInfo = dgEnclosureInfoMapper.selectByCompanyId(dgMessageInvestigation.getBusinessId());
@ -263,7 +269,8 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
messageDetailResponse.setDgApplyAmountInfo(dgApplyAmountInfo); messageDetailResponse.setDgApplyAmountInfo(dgApplyAmountInfo);
messageDetailResponse.setDgEnclosureInfo(dgEnclosureInfo); messageDetailResponse.setDgEnclosureInfo(dgEnclosureInfo);
messageDetailResponse.setLinkedHashMap(linkedList); messageDetailResponse.setDgBusinessCompany(dgBusinessCompany);
//messageDetailResponse.setLinkedHashMap(linkedList);
messageDetailResponse.setDgMessageInvestigation(dgMessageInvestigation); messageDetailResponse.setDgMessageInvestigation(dgMessageInvestigation);
return messageDetailResponse; return messageDetailResponse;
} }

@ -1,13 +1,20 @@
package com.daqing.financial.guarantee.service.impl; package com.daqing.financial.guarantee.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.daqing.financial.guarantee.feign.HrmsFeignService;
import com.daqing.financial.guarantee.mapper.DgProcessManageMapper; import com.daqing.financial.guarantee.mapper.DgProcessManageMapper;
import com.daqing.financial.guarantee.mapper.DgProcessManageVisualMapper; import com.daqing.financial.guarantee.mapper.DgProcessManageVisualMapper;
import com.daqing.financial.guarantee.model.request.ProcessManageRequest;
import com.daqing.financial.guarantee.model.response.DgProessManageRes; import com.daqing.financial.guarantee.model.response.DgProessManageRes;
import com.daqing.financial.guarantee.service.IDgProcessManageService; import com.daqing.financial.guarantee.service.IDgProcessManageService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.framework.domain.guarantee.DgProcessManage; import com.daqing.framework.domain.guarantee.DgProcessManage;
import com.daqing.framework.domain.guarantee.DgProcessManageVisual; import com.daqing.framework.domain.guarantee.DgProcessManageVisual;
import com.daqing.framework.domain.hrms.ext.EmployeeVO;
import com.daqing.framework.domain.hrms.ext.UserDeptVO;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.util.RedisUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -28,6 +35,9 @@ public class DgProcessManageServiceImpl extends ServiceImpl<DgProcessManageMappe
@Autowired @Autowired
private DgProcessManageVisualMapper dgProcessManageVisualMapper; private DgProcessManageVisualMapper dgProcessManageVisualMapper;
@Autowired
private HrmsFeignService hrmsFeignService;
@Override @Override
public List<DgProcessManage> processManageList(String userId) { public List<DgProcessManage> processManageList(String userId) {
@ -36,14 +46,21 @@ public class DgProcessManageServiceImpl extends ServiceImpl<DgProcessManageMappe
} }
@Override @Override
public List<Integer> processVisualList(Integer id) { public List<EmployeeVO> processVisualList(Integer id) {
//根据流程管理id查询可见人id //根据流程管理id查询可见人id
List<Integer> visualUserId = dgProcessManageVisualMapper.processVisualList(id); List<Integer> visualUserId = dgProcessManageVisualMapper.processVisualList(id);
return visualUserId;
Integer[] userIds =visualUserId.toArray(new Integer[visualUserId.size()]);
ResponseResult<List<EmployeeVO>> listResponseResult = hrmsFeignService.listEmpNameByUserId(userIds);
List<EmployeeVO> dataList = listResponseResult.getData();
return dataList;
} }
@Override @Override
public Boolean updateUserVisual(Integer id, List<Integer> ids) { public Boolean updateUserVisual(Integer id, List<Integer> ids) {
//查询设置的可见人是否有流程管理页面的权限
//先根据主键id删除所有对应可见模板员工 //先根据主键id删除所有对应可见模板员工
dgProcessManageVisualMapper.delete(new QueryWrapper<DgProcessManageVisual>() dgProcessManageVisualMapper.delete(new QueryWrapper<DgProcessManageVisual>()
.eq("process_manage_id",id)); .eq("process_manage_id",id));
@ -63,4 +80,11 @@ public class DgProcessManageServiceImpl extends ServiceImpl<DgProcessManageMappe
return false; return false;
} }
} }
@Override
public int updateProcessManage(ProcessManageRequest processManageReq) {
DgProcessManage dgProcessManage = new DgProcessManage();
BeanUtils.copyProperties(processManageReq,dgProcessManage);
return this.baseMapper.updateById(dgProcessManage);
}
} }

@ -320,7 +320,8 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConfe
if (guaranteeId != null) { if (guaranteeId != null) {
GuaranteeDetailResponse guaranteeDetailResponse = guaranteeAssignUserService.guaranteeDetail(guaranteeId); GuaranteeDetailResponse guaranteeDetailResponse = guaranteeAssignUserService.guaranteeDetail(guaranteeId);
auditOpinionResponse.setDgApplyAmountInfo(guaranteeDetailResponse.getDgApplyAmountInfo()); auditOpinionResponse.setDgApplyAmountInfo(guaranteeDetailResponse.getDgApplyAmountInfo());
auditOpinionResponse.setLinkedHashMap(guaranteeDetailResponse.getLinkedHashMap()); //auditOpinionResponse.setLinkedHashMap(guaranteeDetailResponse.getLinkedHashMap());
auditOpinionResponse.setDgBusinessCompany(guaranteeDetailResponse.getDgBusinessCompany());
} }
return auditOpinionResponse; return auditOpinionResponse;
} }

@ -25,7 +25,7 @@ public class MyBatisPlusCodeGenerator {
public static final String PACKAGE_NAME = "com.daqing.financial.guarantee"; public static final String PACKAGE_NAME = "com.daqing.financial.guarantee";
public static void main(String[] args) { public static void main(String[] args) {
String[] tables = new String[] {"dg_process_manage_visual","dg_process_manage"};//表名数组 String[] tables = new String[] {"dg_customer_related"};//表名数组
String[] tablePrefixs = new String[] {""};//去掉前缀 String[] tablePrefixs = new String[] {""};//去掉前缀
executeCode(PACKAGE_NAME,tables,tablePrefixs); executeCode(PACKAGE_NAME,tables,tablePrefixs);
} }

@ -1,26 +1,21 @@
#服务名称 #服务名称
spring.application.name=dq-financial-guarantee #spring.application.name=dq-financial-guarantee
#配置中心地址 ##配置中心地址
spring.cloud.nacos.config.server-addr=127.0.0.1:8848 #spring.cloud.nacos.config.server-addr=127.0.0.1:8848
spring.cloud.nacos.config.file-extension=yml #spring.cloud.nacos.config.file-extension=yml
#redis配置 ##redis配置
spring.redis.host=127.0.0.1 #spring.redis.host=127.0.0.1
spring.redis.port=6379 #spring.redis.port=6379
spring.redis.password= #spring.redis.password=
spring.redis.database=0 #spring.redis.database=0
spring.redis.timeout=30000 #spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8 #spring.redis.jedis.pool.max-active=8
spring.redis.jedis.pool.max-wait=-1 #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
#设置请求头大小
server.max-http-header-size=102400
server.tomcat.max-http-post-size=10MB
#本地测试环境 #本地测试环境
spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99 #spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
#线上测试环境 #线上测试环境
#spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128 #spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128
@ -35,35 +30,35 @@ ribbon.ConnectTimeout: 120000
# 上传文件总的最大值 # 上传文件总的最大值
#spring.servlet.multipart.max-request-size=10MB spring.servlet.multipart.max-request-size=10MB
## 单个文件的最大值 # 单个文件的最大值
#spring.servlet.multipart.max-file-size=10MB spring.servlet.multipart.max-file-size=10MB
# #
##正式环境(prod) ##正式环境(prod)
##服务名称 ##服务名称
#spring.application.name=dq-financial-guarantee spring.application.name=dq-financial-guarantee
##配置中心地址 #配置中心地址
#spring.cloud.nacos.config.server-addr=120.78.127.12:8848 spring.cloud.nacos.config.server-addr=120.78.127.12:8848
#spring.cloud.nacos.config.namespace=502bfc93-6e2f-44aa-93ad-f074664c6826 spring.cloud.nacos.config.namespace=502bfc93-6e2f-44aa-93ad-f074664c6826
#
#spring.cloud.nacos.config.ext-config[0].data-id=dq-financial-guarantee.yml spring.cloud.nacos.config.ext-config[0].data-id=dq-financial-guarantee.yml
#spring.cloud.nacos.config.ext-config[0].group=prod spring.cloud.nacos.config.ext-config[0].group=prod
#spring.cloud.nacos.config.ext-config[0].refresh=true spring.cloud.nacos.config.ext-config[0].refresh=true
#
#spring.cloud.nacos.config.ext-config[1].data-id=datasource.yml spring.cloud.nacos.config.ext-config[1].data-id=datasource.yml
#spring.cloud.nacos.config.ext-config[1].group=prod spring.cloud.nacos.config.ext-config[1].group=prod
#spring.cloud.nacos.config.ext-config[1].refresh=true spring.cloud.nacos.config.ext-config[1].refresh=true
#
#spring.cloud.nacos.config.ext-config[2].data-id=mybatis.yml spring.cloud.nacos.config.ext-config[2].data-id=mybatis.yml
#spring.cloud.nacos.config.ext-config[2].group=prod spring.cloud.nacos.config.ext-config[2].group=prod
#spring.cloud.nacos.config.ext-config[2].refresh=true spring.cloud.nacos.config.ext-config[2].refresh=true
#
#spring.redis.host=127.0.0.1 spring.redis.host=127.0.0.1
#spring.redis.port=6379 spring.redis.port=6379
#spring.redis.password=dq123456 spring.redis.password=dq123456
#spring.redis.database=0 spring.redis.database=0
#spring.redis.timeout=30000 spring.redis.timeout=30000
#spring.redis.jedis.pool.max-active=8 spring.redis.jedis.pool.max-active=8
#spring.redis.jedis.pool.max-wait=-1 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

@ -51,8 +51,9 @@
au.status,au.operating_status,cc.name,cc.phone,ps.business_status au.status,au.operating_status,cc.name,cc.phone,ps.business_status
from dg_apply_amount_list au from dg_apply_amount_list au
left join dg_apply_amount_info ai on au.business_id = ai.id left join dg_apply_amount_info ai on au.business_id = ai.id
left join crms_company_customer ccl on ai.company_id = ccl.id left join dg_business_company cc on cc.business_id = ai.id
left join crms_customer cc on cc.id = ccl.customer_id /* left join crms_company_customer ccl on ai.company_id = ccl.id
left join crms_customer cc on cc.id = ccl.customer_id*/
left JOIN dg_business_process_status ps ON ps.business_id = au.business_id left JOIN dg_business_process_status ps ON ps.business_id = au.business_id
where au.id in where au.id in
<foreach collection="list" close=")" open="(" item="id" separator=","> <foreach collection="list" close=")" open="(" item="id" separator=",">

@ -21,8 +21,9 @@
au.status,au.operating_status,cc.name,cc.phone,ps.business_status au.status,au.operating_status,cc.name,cc.phone,ps.business_status
from dg_apply_amount_list au from dg_apply_amount_list au
left join dg_apply_amount_info ai on au.business_id = ai.id left join dg_apply_amount_info ai on au.business_id = ai.id
left join crms_company_customer ccl on ai.company_id = ccl.id left join dg_business_company cc on cc.business_id = ai.id
left join crms_customer cc on cc.id = ccl.customer_id /* left join crms_company_customer ccl on ai.company_id = ccl.id
left join crms_customer cc on cc.id = ccl.customer_id*/
left JOIN dg_business_process_status ps ON ps.business_id = au.business_id left JOIN dg_business_process_status ps ON ps.business_id = au.business_id
<where> <where>
au.role_id in au.role_id in
@ -40,9 +41,13 @@
</select> </select>
<select id="selectApplyList" resultType="com.daqing.financial.guarantee.model.response.DgNoticeListResponse"> <select id="selectApplyList" resultType="com.daqing.financial.guarantee.model.response.DgNoticeListResponse">
select au.id,au.role_id,ai.business_code,au.create_time select au.id,au.role_id,ai.company_id,au.business_id,ai.presenter_id,ai.business_code,ai.business_type,ai.apply_amount,ai.apply_time,au.create_time,
au.status,au.operating_status,cc.name,cc.phone,ps.business_status
from dg_apply_amount_list au from dg_apply_amount_list au
left join dg_apply_amount_info ai on au.business_id = ai.id left join dg_apply_amount_info ai on au.business_id = ai.id
left join crms_company_customer ccl on ai.company_id = ccl.id
left join crms_customer cc on cc.id = ccl.customer_id
left JOIN dg_business_process_status ps ON ps.business_id = au.business_id
<where> <where>
au.role_id in au.role_id in
<foreach collection="roleIdlist" open="(" separator="," close=")" item="id"> <foreach collection="roleIdlist" open="(" separator="," close=")" item="id">

@ -37,8 +37,9 @@
au.status,au.operating_status,cc.name,cc.phone,ps.business_status au.status,au.operating_status,cc.name,cc.phone,ps.business_status
from dg_assets_investigation au from dg_assets_investigation au
left join dg_apply_amount_info ai on au.business_id = ai.id left join dg_apply_amount_info ai on au.business_id = ai.id
left join crms_company_customer ccl on ai.company_id = ccl.id left join dg_business_company cc on cc.business_id = ai.id
left join crms_customer cc on cc.id = ccl.customer_id /* left join crms_company_customer ccl on ai.company_id = ccl.id
left join crms_customer cc on cc.id = ccl.customer_id*/
left JOIN dg_business_process_status ps ON ps.business_id = au.business_id left JOIN dg_business_process_status ps ON ps.business_id = au.business_id
<where> <where>
au.role_id in au.role_id in
@ -67,8 +68,9 @@
au.status,au.operating_status,cc.name,cc.phone,ps.business_status au.status,au.operating_status,cc.name,cc.phone,ps.business_status
from dg_assets_investigation au from dg_assets_investigation au
left join dg_apply_amount_info ai on au.business_id = ai.id left join dg_apply_amount_info ai on au.business_id = ai.id
left join crms_company_customer ccl on ai.company_id = ccl.id left join dg_business_company cc on cc.business_id = ai.id
left join crms_customer cc on cc.id = ccl.customer_id /* left join crms_company_customer ccl on ai.company_id = ccl.id
left join crms_customer cc on cc.id = ccl.customer_id*/
left JOIN dg_business_process_status ps ON ps.business_id = au.business_id left JOIN dg_business_process_status ps ON ps.business_id = au.business_id
where au.id in where au.id in
<foreach collection="list" close=")" open="(" item="id" separator=","> <foreach collection="list" close=")" open="(" item="id" separator=",">
@ -77,9 +79,13 @@
</select> </select>
<select id="selectAssetsList" resultType="com.daqing.financial.guarantee.model.response.DgNoticeListResponse"> <select id="selectAssetsList" resultType="com.daqing.financial.guarantee.model.response.DgNoticeListResponse">
select au.id,au.role_id,ai.business_code,au.create_time select au.id,au.role_id,au.company_id,au.business_id,ai.business_code,ai.business_type,ai.apply_amount,ai.apply_time,au.create_time,
au.status,au.operating_status,cc.name,cc.phone,ps.business_status
from dg_assets_investigation au from dg_assets_investigation au
left join dg_apply_amount_info ai on au.business_id = ai.id left join dg_apply_amount_info ai on au.business_id = ai.id
left join crms_company_customer ccl on ai.company_id = ccl.id
left join crms_customer cc on cc.id = ccl.customer_id
left JOIN dg_business_process_status ps ON ps.business_id = au.business_id
<where> <where>
au.role_id in au.role_id in
<foreach collection="roleIdlist" open="(" separator="," close=")" item="id"> <foreach collection="roleIdlist" open="(" separator="," close=")" item="id">

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.daqing.financial.guarantee.mapper.DgBusinessCompanyMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.daqing.framework.domain.guarantee.DgBusinessCompany">
<id column="id" property="id" />
<result column="business_id" property="businessId" />
<result column="registered_capital" property="registeredCapital" />
<result column="social_unified_code" property="socialUnifiedCode" />
<result column="emp_num" property="empNum" />
<result column="linkman" property="linkman" />
<result column="link_phone" property="linkPhone" />
<result column="business_source" property="businessSource" />
<result column="business_scope" property="businessScope" />
<result column="business_addr" property="businessAddr" />
<result column="register_time" property="registerTime" />
<result column="register_addr" property="registerAddr" />
<result column="legal_id_number" property="legalIdNumber" />
<result column="legal_hukou_addr" property="legalHukouAddr" />
<result column="legal_phone" property="legalPhone" />
<result column="legal_home_addr" property="legalHomeAddr" />
<result column="legal_gender" property="legalGender" />
<result column="legal_name" property="legalName" />
<result column="is_exist_related" property="isExistRelated" />
<result column="code" property="code" />
<result column="type" property="type" />
<result column="name" property="name" />
<result column="addr" property="addr" />
<result column="phone" property="phone" />
<result column="customer_id" property="customerId" />
</resultMap>
</mapper>

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.daqing.financial.guarantee.mapper.DgComplianceAssignUserMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.daqing.framework.domain.guarantee.DgComplianceAssignUser">
<id column="id" property="id" />
<result column="company_id" property="companyId" />
<result column="emp_id" property="empId" />
<result column="type" property="type" />
<result column="status" property="status" />
<result column="amount" property="amount" />
<result column="term" property="term" />
<result column="remark" property="remark" />
<result column="apply_content" property="applyContent" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
</resultMap>
</mapper>

@ -23,14 +23,15 @@
FROM dg_compliance_investigation AS i FROM dg_compliance_investigation AS i
LEFT JOIN dg_apply_amount_info AS a LEFT JOIN dg_apply_amount_info AS a
ON a.id = i.business_id ON a.id = i.business_id
LEFT JOIN crms_company_customer AS cc left join dg_business_company c on c.business_id = a.id
/* LEFT JOIN crms_company_customer AS cc
ON a.company_id = cc.id ON a.company_id = cc.id
LEFT JOIN crms_customer AS c LEFT JOIN crms_customer AS c
ON c.id = cc.customer_id ON c.id = cc.customer_id*/
LEFT JOIN dg_business_process_status AS b LEFT JOIN dg_business_process_status AS b
ON b.business_id = a.id ON b.business_id = a.id
WHERE c.del_or_not = 0 WHERE /*c.del_or_not = 0*/
AND (i.user_id = #{userId} OR i.user_id IS NULL) /*AND */(i.user_id = #{userId} OR i.user_id IS NULL)
AND i.role_id IN AND i.role_id IN
<foreach collection="roleIds" open="(" separator="," close=")" item="roleId"> <foreach collection="roleIds" open="(" separator="," close=")" item="roleId">
#{roleId} #{roleId}
@ -52,14 +53,15 @@
FROM dg_compliance_investigation AS i FROM dg_compliance_investigation AS i
LEFT JOIN dg_apply_amount_info AS a LEFT JOIN dg_apply_amount_info AS a
ON a.id = i.business_id ON a.id = i.business_id
LEFT JOIN crms_company_customer AS cc left join dg_business_company c on c.business_id = a.id
/* LEFT JOIN crms_company_customer AS cc
ON a.company_id = cc.id ON a.company_id = cc.id
LEFT JOIN crms_customer AS c LEFT JOIN crms_customer AS c
ON c.id = cc.customer_id ON c.id = cc.customer_id*/
LEFT JOIN dg_business_process_status AS b LEFT JOIN dg_business_process_status AS b
ON b.business_id = a.id ON b.business_id = a.id
WHERE c.del_or_not = 0 WHERE /*c.del_or_not = 0*/
AND i.id IN /*AND*/ i.id IN
<foreach collection="ids" open="(" separator="," close=")" item="id"> <foreach collection="ids" open="(" separator="," close=")" item="id">
#{id} #{id}
</foreach> </foreach>
@ -203,9 +205,13 @@
</select> </select>
<select id="selectComplianceList" resultType="com.daqing.financial.guarantee.model.response.DgNoticeListResponse"> <select id="selectComplianceList" resultType="com.daqing.financial.guarantee.model.response.DgNoticeListResponse">
SELECT au.id,au.role_id,ai.business_code,au.create_time SELECT au.id,au.role_id,au.company_id,au.business_id,ai.business_code,ai.business_type,ai.apply_amount,ai.apply_time,au.create_time,
au.audit_status as status,au.operation_status as operating_status,cc.name,cc.phone,ps.business_status
FROM dg_compliance_investigation au FROM dg_compliance_investigation au
left join dg_apply_amount_info ai on au.business_id = ai.id left join dg_apply_amount_info ai on au.business_id = ai.id
left join crms_company_customer ccl on ai.company_id = ccl.id
left join crms_customer cc on cc.id = ccl.customer_id
left JOIN dg_business_process_status ps ON ps.business_id = au.business_id
<where> <where>
au.role_id in au.role_id in
<foreach collection="roleIdlist" open="(" separator="," close=")" item="id"> <foreach collection="roleIdlist" open="(" separator="," close=")" item="id">

@ -39,8 +39,8 @@
<if test="et.endTime != null and et.endTime != ''"> <if test="et.endTime != null and et.endTime != ''">
AND a.create_time &lt;= #{et.endTime} AND a.create_time &lt;= #{et.endTime}
</if> </if>
GROUP BY business_id GROUP BY p.business_id
ORDER BY p.create_time ASC ORDER BY any_value(p.create_time) ASC
</select> </select>
<!-- 统计不同业务状态下业务的数量 --> <!-- 统计不同业务状态下业务的数量 -->

@ -24,8 +24,9 @@
au.status,au.operating_status,cc.name,cc.phone,ps.business_status au.status,au.operating_status,cc.name,cc.phone,ps.business_status
from dg_guarantee_assign_user au from dg_guarantee_assign_user au
left join dg_apply_amount_info ai on au.business_id = ai.id left join dg_apply_amount_info ai on au.business_id = ai.id
left join crms_company_customer ccl on ai.company_id = ccl.id left join dg_business_company cc on cc.business_id = ai.id
left join crms_customer cc on cc.id = ccl.customer_id /* left join crms_company_customer ccl on ai.company_id = ccl.id
left join crms_customer cc on cc.id = ccl.customer_id*/
left JOIN dg_business_process_status ps ON ps.business_id = au.business_id left JOIN dg_business_process_status ps ON ps.business_id = au.business_id
<where> <where>
au.role_id in au.role_id in
@ -50,8 +51,9 @@
au.status,au.operating_status,cc.name,cc.phone,ps.business_status au.status,au.operating_status,cc.name,cc.phone,ps.business_status
from dg_guarantee_assign_user au from dg_guarantee_assign_user au
left join dg_apply_amount_info ai on au.business_id = ai.id left join dg_apply_amount_info ai on au.business_id = ai.id
left join crms_company_customer ccl on ai.company_id = ccl.id left join dg_business_company cc on cc.business_id = ai.id
left join crms_customer cc on cc.id = ccl.customer_id /* left join crms_company_customer ccl on ai.company_id = ccl.id
left join crms_customer cc on cc.id = ccl.customer_id*/
left JOIN dg_business_process_status ps ON ps.business_id = au.business_id left JOIN dg_business_process_status ps ON ps.business_id = au.business_id
where au.id in where au.id in
<foreach collection="list" close=")" open="(" item="id" separator=","> <foreach collection="list" close=")" open="(" item="id" separator=",">
@ -71,9 +73,13 @@
</update> </update>
<select id="selectGuaranteeList" resultType="com.daqing.financial.guarantee.model.response.DgNoticeListResponse"> <select id="selectGuaranteeList" resultType="com.daqing.financial.guarantee.model.response.DgNoticeListResponse">
select au.id,au.role_id,ai.business_code,au.create_time select au.id,au.role_id,au.company_id,au.business_id,ai.business_code,ai.business_type,ai.apply_amount,ai.apply_time,au.create_time,
au.status,au.operating_status,cc.name,cc.phone,ps.business_status
from dg_guarantee_assign_user au from dg_guarantee_assign_user au
left join dg_apply_amount_info ai on au.business_id = ai.id left join dg_apply_amount_info ai on au.business_id = ai.id
left join crms_company_customer ccl on ai.company_id = ccl.id
left join crms_customer cc on cc.id = ccl.customer_id
left JOIN dg_business_process_status ps ON ps.business_id = au.business_id
<where> <where>
au.role_id in au.role_id in
<foreach collection="roleIdlist" open="(" separator="," close=")" item="id"> <foreach collection="roleIdlist" open="(" separator="," close=")" item="id">

@ -38,8 +38,9 @@
aai.bank,lcc.passing_time,lcc.file,lau.audit_opinion,lau.operating_status,bps.business_status,lau.business_id,lau.role_id aai.bank,lcc.passing_time,lcc.file,lau.audit_opinion,lau.operating_status,bps.business_status,lau.business_id,lau.role_id
from dg_guarantee_letter_assign_user lau from dg_guarantee_letter_assign_user lau
left join dg_apply_amount_info aai on lau.business_id = aai.id left join dg_apply_amount_info aai on lau.business_id = aai.id
left join crms_company_customer ccc on lau.company_id = ccc.id left join dg_business_company cc on cc.business_id = aai.id
left join crms_customer cc on ccc.customer_id = cc.id /* left join crms_company_customer ccc on lau.company_id = ccc.id
left join crms_customer cc on ccc.customer_id = cc.id*/
left join dg_loan_committee_consider lcc on lau.business_id = lcc.business_id left join dg_loan_committee_consider lcc on lau.business_id = lcc.business_id
left join dg_business_process_status bps on lau.business_id = bps.business_id left join dg_business_process_status bps on lau.business_id = bps.business_id
<where> <where>
@ -65,8 +66,9 @@
lau.status,lau.operating_status,bps.business_status lau.status,lau.operating_status,bps.business_status
from dg_guarantee_letter_assign_user lau from dg_guarantee_letter_assign_user lau
left join dg_apply_amount_info aai on lau.business_id = aai.id left join dg_apply_amount_info aai on lau.business_id = aai.id
left join crms_company_customer ccc on lau.company_id = ccc.id left join dg_business_company cc on cc.business_id = aai.id
left join crms_customer cc on ccc.customer_id = cc.id /* left join crms_company_customer ccc on lau.company_id = ccc.id
left join crms_customer cc on ccc.customer_id = cc.id*/
left join dg_loan_committee_consider lcc on lau.business_id = lcc.business_id left join dg_loan_committee_consider lcc on lau.business_id = lcc.business_id
left join dg_business_process_status bps on lau.business_id = bps.business_id left join dg_business_process_status bps on lau.business_id = bps.business_id
where lau.id in where lau.id in
@ -87,9 +89,13 @@
</select> </select>
<select id="selectGuaranteeLetterList" resultType="com.daqing.financial.guarantee.model.response.DgNoticeListResponse"> <select id="selectGuaranteeLetterList" resultType="com.daqing.financial.guarantee.model.response.DgNoticeListResponse">
select au.id,au.role_id,ai.business_code,au.create_time select au.id,au.role_id,au.company_id,au.business_id,ai.business_code,ai.business_type,ai.apply_amount,ai.apply_time,au.create_time,
au.status,au.operating_status,cc.name,cc.phone,ps.business_status
from dg_guarantee_letter_assign_user au from dg_guarantee_letter_assign_user au
left join dg_apply_amount_info ai on au.business_id = ai.id left join dg_apply_amount_info ai on au.business_id = ai.id
left join crms_company_customer ccl on ai.company_id = ccl.id
left join crms_customer cc on cc.id = ccl.customer_id
left JOIN dg_business_process_status ps ON ps.business_id = au.business_id
<where> <where>
au.role_id in au.role_id in
<foreach collection="roleIdlist" open="(" separator="," close=")" item="id"> <foreach collection="roleIdlist" open="(" separator="," close=")" item="id">

@ -26,14 +26,15 @@
FROM dg_loan_committee_consider AS l FROM dg_loan_committee_consider AS l
LEFT JOIN dg_apply_amount_info AS a LEFT JOIN dg_apply_amount_info AS a
ON a.id = l.business_id ON a.id = l.business_id
LEFT JOIN crms_company_customer AS cc left join dg_business_company c on c.business_id = a.id
/* LEFT JOIN crms_company_customer AS cc
ON a.company_id = cc.id ON a.company_id = cc.id
LEFT JOIN crms_customer AS c LEFT JOIN crms_customer AS c
ON cc.customer_id = c.id ON cc.customer_id = c.id*/
LEFT JOIN dg_business_process_status AS b LEFT JOIN dg_business_process_status AS b
ON b.business_id = a.id ON b.business_id = a.id
WHERE c.del_or_not = 0 WHERE /*c.del_or_not = 0*/
AND (l.consider_id = #{userId} OR l.consider_id IS NULL) /*AND*/ (l.consider_id = #{userId} OR l.consider_id IS NULL)
AND l.role_id IN AND l.role_id IN
<foreach collection="roleIds" open="(" separator="," close=")" item="roleId"> <foreach collection="roleIds" open="(" separator="," close=")" item="roleId">
#{roleId} #{roleId}
@ -51,14 +52,15 @@
FROM dg_loan_committee_consider AS l FROM dg_loan_committee_consider AS l
LEFT JOIN dg_apply_amount_info AS a LEFT JOIN dg_apply_amount_info AS a
ON a.id = l.business_id ON a.id = l.business_id
LEFT JOIN crms_company_customer AS cc left join dg_business_company c on c.business_id = a.id
/* LEFT JOIN crms_company_customer AS cc
ON a.company_id = cc.id ON a.company_id = cc.id
LEFT JOIN crms_customer AS c LEFT JOIN crms_customer AS c
ON cc.customer_id = c.id ON cc.customer_id = c.id*/
LEFT JOIN dg_business_process_status AS b LEFT JOIN dg_business_process_status AS b
ON b.business_id = a.id ON b.business_id = a.id
WHERE c.del_or_not = 0 WHERE /*c.del_or_not = 0*/
AND l.id IN /*AND*/ l.id IN
<foreach collection="ids" open="(" separator="," close=")" item="id"> <foreach collection="ids" open="(" separator="," close=")" item="id">
#{id} #{id}
</foreach> </foreach>
@ -151,9 +153,13 @@
SELECT COUNT(id) FROM dg_guarantee_letter_assign_user WHERE business_id = #{businessId} AND role_id = #{roleId} SELECT COUNT(id) FROM dg_guarantee_letter_assign_user WHERE business_id = #{businessId} AND role_id = #{roleId}
</select> </select>
<select id="selectLoanCommitteeList" resultType="com.daqing.financial.guarantee.model.response.DgNoticeListResponse"> <select id="selectLoanCommitteeList" resultType="com.daqing.financial.guarantee.model.response.DgNoticeListResponse">
SELECT au.id,au.role_id,ai.business_code,au.create_time SELECT au.id,au.role_id,au.company_id,au.business_id,ai.business_code,ai.business_type,ai.apply_amount,ai.apply_time,au.create_time,
au.status,au.operating_status,cc.name,cc.phone,ps.business_status
FROM dg_loan_committee_consider au FROM dg_loan_committee_consider au
left join dg_apply_amount_info ai on au.business_id = ai.id left join dg_apply_amount_info ai on au.business_id = ai.id
left join crms_company_customer ccl on ai.company_id = ccl.id
left join crms_customer cc on cc.id = ccl.customer_id
left JOIN dg_business_process_status ps ON ps.business_id = au.business_id
<where> <where>
au.role_id in au.role_id in
<foreach collection="roleIdlist" open="(" separator="," close=")" item="id"> <foreach collection="roleIdlist" open="(" separator="," close=")" item="id">

@ -37,8 +37,9 @@
aai.create_time,ln.status,aai.bank,ln.audit_opinion,ln.operating_status,bps.business_status,ln.business_id,lcc.passing_time aai.create_time,ln.status,aai.bank,ln.audit_opinion,ln.operating_status,bps.business_status,ln.business_id,lcc.passing_time
from dg_loan_notice ln from dg_loan_notice ln
left join dg_apply_amount_info aai on ln.business_id = aai.id left join dg_apply_amount_info aai on ln.business_id = aai.id
left join crms_company_customer ccc on ln.company_id = ccc.id left join dg_business_company cc on cc.business_id = aai.id
left join crms_customer cc on ccc.customer_id = cc.id /* left join crms_company_customer ccc on ln.company_id = ccc.id
left join crms_customer cc on ccc.customer_id = cc.id*/
left join dg_loan_committee_consider lcc on ln.business_id = lcc.business_id left join dg_loan_committee_consider lcc on ln.business_id = lcc.business_id
left join dg_business_process_status bps on ln.business_id = bps.business_id left join dg_business_process_status bps on ln.business_id = bps.business_id
<where> <where>
@ -63,8 +64,9 @@
aai.create_time,ln.status,ln.operating_status,bps.business_status aai.create_time,ln.status,ln.operating_status,bps.business_status
from dg_loan_notice ln from dg_loan_notice ln
left join dg_apply_amount_info aai on ln.business_id = aai.id left join dg_apply_amount_info aai on ln.business_id = aai.id
left join crms_company_customer ccc on ln.company_id = ccc.id left join dg_business_company cc on cc.business_id = aai.id
left join crms_customer cc on ccc.customer_id = cc.id /* left join crms_company_customer ccc on ln.company_id = ccc.id
left join crms_customer cc on ccc.customer_id = cc.id*/
left join dg_loan_committee_consider lcc on ln.business_id = lcc.business_id left join dg_loan_committee_consider lcc on ln.business_id = lcc.business_id
left join dg_business_process_status bps on ln.business_id = bps.business_id left join dg_business_process_status bps on ln.business_id = bps.business_id
where ln.id in where ln.id in
@ -86,9 +88,13 @@
</select> </select>
<select id="selectLoanNoticeList" resultType="com.daqing.financial.guarantee.model.response.DgNoticeListResponse"> <select id="selectLoanNoticeList" resultType="com.daqing.financial.guarantee.model.response.DgNoticeListResponse">
select au.id,au.role_id,ai.business_code,au.create_time select au.id,au.role_id,au.company_id,au.business_id,ai.business_code,ai.business_type,ai.apply_amount,ai.apply_time,au.create_time,
au.status,au.operating_status,cc.name,cc.phone,ps.business_status
from dg_loan_notice au from dg_loan_notice au
left join dg_apply_amount_info ai on au.business_id = ai.id left join dg_apply_amount_info ai on au.business_id = ai.id
left join crms_company_customer ccl on ai.company_id = ccl.id
left join crms_customer cc on cc.id = ccl.customer_id
left JOIN dg_business_process_status ps ON ps.business_id = au.business_id
<where> <where>
au.role_id in au.role_id in
<foreach collection="roleIdlist" open="(" separator="," close=")" item="id"> <foreach collection="roleIdlist" open="(" separator="," close=")" item="id">

@ -23,8 +23,9 @@
au.status,au.operating_status,cc.name,cc.phone,ps.business_status au.status,au.operating_status,cc.name,cc.phone,ps.business_status
from dg_message_investigation au from dg_message_investigation au
left join dg_apply_amount_info ai on au.business_id = ai.id left join dg_apply_amount_info ai on au.business_id = ai.id
left join crms_company_customer ccl on ai.company_id = ccl.id left join dg_business_company cc on cc.business_id = ai.id
left join crms_customer cc on cc.id = ccl.customer_id /* left join crms_company_customer ccl on ai.company_id = ccl.id
left join crms_customer cc on cc.id = ccl.customer_id*/
left JOIN dg_business_process_status ps ON ps.business_id = au.business_id left JOIN dg_business_process_status ps ON ps.business_id = au.business_id
<where> <where>
au.role_id in au.role_id in
@ -49,8 +50,9 @@
au.status,au.operating_status,cc.name,cc.phone,ps.business_status au.status,au.operating_status,cc.name,cc.phone,ps.business_status
from dg_message_investigation au from dg_message_investigation au
left join dg_apply_amount_info ai on au.business_id = ai.id left join dg_apply_amount_info ai on au.business_id = ai.id
left join crms_company_customer ccl on ai.company_id = ccl.id left join dg_business_company cc on cc.business_id = ai.id
left join crms_customer cc on cc.id = ccl.customer_id /* left join crms_company_customer ccl on ai.company_id = ccl.id
left join crms_customer cc on cc.id = ccl.customer_id*/
left JOIN dg_business_process_status ps ON ps.business_id = au.business_id left JOIN dg_business_process_status ps ON ps.business_id = au.business_id
where au.id in where au.id in
<foreach collection="list" close=")" open="(" item="id" separator=","> <foreach collection="list" close=")" open="(" item="id" separator=",">
@ -59,9 +61,13 @@
</select> </select>
<select id="selectMessageList" resultType="com.daqing.financial.guarantee.model.response.DgNoticeListResponse"> <select id="selectMessageList" resultType="com.daqing.financial.guarantee.model.response.DgNoticeListResponse">
select au.id,au.role_id,ai.business_code,au.create_time select au.id,au.role_id,au.company_id,au.business_id,ai.business_code,ai.business_type,ai.apply_amount,ai.apply_time,au.create_time,
au.status,au.operating_status,cc.name,cc.phone,ps.business_status
from dg_message_investigation au from dg_message_investigation au
left join dg_apply_amount_info ai on au.business_id = ai.id left join dg_apply_amount_info ai on au.business_id = ai.id
left join crms_company_customer ccl on ai.company_id = ccl.id
left join crms_customer cc on cc.id = ccl.customer_id
left JOIN dg_business_process_status ps ON ps.business_id = au.business_id
<where> <where>
au.role_id in au.role_id in
<foreach collection="roleIdlist" open="(" separator="," close=")" item="id"> <foreach collection="roleIdlist" open="(" separator="," close=")" item="id">

@ -40,8 +40,9 @@
aai.bank,lcc.passing_time,lcc.file,pcc.audit_opinion,pcc.operating_status,bps.business_status,pcc.business_id,pcc.img_file,pcc.role_id aai.bank,lcc.passing_time,lcc.file,pcc.audit_opinion,pcc.operating_status,bps.business_status,pcc.business_id,pcc.img_file,pcc.role_id
from dg_payment_confirmation_consider pcc from dg_payment_confirmation_consider pcc
left join dg_apply_amount_info aai on pcc.business_id = aai.id left join dg_apply_amount_info aai on pcc.business_id = aai.id
left join crms_company_customer ccc on pcc.company_id = ccc.id left join dg_business_company cc on cc.business_id = aai.id
left join crms_customer cc on ccc.customer_id = cc.id /* left join crms_company_customer ccc on pcc.company_id = ccc.id
left join crms_customer cc on ccc.customer_id = cc.id*/
left join dg_loan_committee_consider lcc on pcc.business_id = lcc.business_id left join dg_loan_committee_consider lcc on pcc.business_id = lcc.business_id
left join dg_business_process_status bps on pcc.business_id = bps.business_id left join dg_business_process_status bps on pcc.business_id = bps.business_id
<where> <where>
@ -67,8 +68,9 @@
lcc.loan_tern,aai.create_time,pcc.status,pcc.operating_status,bps.business_status lcc.loan_tern,aai.create_time,pcc.status,pcc.operating_status,bps.business_status
from dg_payment_confirmation_consider pcc from dg_payment_confirmation_consider pcc
left join dg_apply_amount_info aai on pcc.business_id = aai.id left join dg_apply_amount_info aai on pcc.business_id = aai.id
left join crms_company_customer ccc on pcc.company_id = ccc.id left join dg_business_company cc on cc.business_id = aai.id
left join crms_customer cc on ccc.customer_id = cc.id /* left join crms_company_customer ccc on pcc.company_id = ccc.id
left join crms_customer cc on ccc.customer_id = cc.id*/
left join dg_loan_committee_consider lcc on pcc.business_id = lcc.business_id left join dg_loan_committee_consider lcc on pcc.business_id = lcc.business_id
left join dg_business_process_status bps on pcc.business_id = bps.business_id left join dg_business_process_status bps on pcc.business_id = bps.business_id
where pcc.id in where pcc.id in
@ -78,9 +80,13 @@
</select> </select>
<select id="selectPaymentConfirmationList" resultType="com.daqing.financial.guarantee.model.response.DgNoticeListResponse"> <select id="selectPaymentConfirmationList" resultType="com.daqing.financial.guarantee.model.response.DgNoticeListResponse">
select au.id,au.role_id,ai.business_code,au.create_time select au.id,au.role_id,au.company_id,au.business_id,ai.business_code,ai.business_type,ai.apply_amount,ai.apply_time,au.create_time,
au.status,au.operating_status,cc.name,cc.phone,ps.business_status
from dg_payment_confirmation_consider au from dg_payment_confirmation_consider au
left join dg_apply_amount_info ai on au.business_id = ai.id left join dg_apply_amount_info ai on au.business_id = ai.id
left join crms_company_customer ccl on ai.company_id = ccl.id
left join crms_customer cc on cc.id = ccl.customer_id
left JOIN dg_business_process_status ps ON ps.business_id = au.business_id
<where> <where>
au.role_id in au.role_id in
<foreach collection="roleIdlist" open="(" separator="," close=")" item="id"> <foreach collection="roleIdlist" open="(" separator="," close=")" item="id">

@ -8,6 +8,7 @@
<result column="icon_img" property="iconImg" /> <result column="icon_img" property="iconImg" />
<result column="model_id" property="modelId" /> <result column="model_id" property="modelId" />
<result column="approval_name" property="approvalName" /> <result column="approval_name" property="approvalName" />
<result column="approval_instructions" property="approvalInstructions" />
<result column="update_time" property="updateTime" /> <result column="update_time" property="updateTime" />
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime" />
</resultMap> </resultMap>

@ -22,10 +22,11 @@
FROM dg_work_conference_consider AS w FROM dg_work_conference_consider AS w
LEFT JOIN dg_apply_amount_info AS a LEFT JOIN dg_apply_amount_info AS a
ON a.id = w.business_id ON a.id = w.business_id
LEFT JOIN crms_company_customer AS cc left join dg_business_company c on c.business_id = a.id
/* LEFT JOIN crms_company_customer AS cc
ON a.company_id = cc.id ON a.company_id = cc.id
LEFT JOIN crms_customer AS c LEFT JOIN crms_customer AS c
ON cc.customer_id = c.id ON cc.customer_id = c.id*/
LEFT JOIN dg_business_process_status AS b LEFT JOIN dg_business_process_status AS b
ON b.business_id = a.id ON b.business_id = a.id
LEFT JOIN (SELECT business_id,SUM(CASE role_id WHEN 59 THEN emp_id ELSE 0 END) AS A, LEFT JOIN (SELECT business_id,SUM(CASE role_id WHEN 59 THEN emp_id ELSE 0 END) AS A,
@ -38,8 +39,8 @@
ON a.id = ass.business_id ON a.id = ass.business_id
LEFT JOIN dg_message_investigation AS m LEFT JOIN dg_message_investigation AS m
ON a.id = m.business_id ON a.id = m.business_id
WHERE c.del_or_not = 0 WHERE /*c.del_or_not = 0*/
AND (w.user_id = #{userId} OR w.user_id IS NULL) /*AND*/ (w.user_id = #{userId} OR w.user_id IS NULL)
AND w.role_id IN AND w.role_id IN
<foreach collection="roleIds" open="(" separator="," close=")" item="roleId"> <foreach collection="roleIds" open="(" separator="," close=")" item="roleId">
#{roleId} #{roleId}
@ -61,10 +62,11 @@
FROM dg_work_conference_consider AS w FROM dg_work_conference_consider AS w
LEFT JOIN dg_apply_amount_info AS a LEFT JOIN dg_apply_amount_info AS a
ON a.id = w.business_id ON a.id = w.business_id
LEFT JOIN crms_company_customer AS cc left join dg_business_company c on c.business_id = a.id
/* LEFT JOIN crms_company_customer AS cc
ON a.company_id = cc.id ON a.company_id = cc.id
LEFT JOIN crms_customer AS c LEFT JOIN crms_customer AS c
ON cc.customer_id = c.id ON cc.customer_id = c.id*/
LEFT JOIN dg_business_process_status AS b LEFT JOIN dg_business_process_status AS b
ON b.business_id = a.id ON b.business_id = a.id
LEFT JOIN (SELECT business_id,SUM(CASE role_id WHEN 59 THEN emp_id ELSE 0 END) AS A, LEFT JOIN (SELECT business_id,SUM(CASE role_id WHEN 59 THEN emp_id ELSE 0 END) AS A,
@ -77,8 +79,8 @@
ON a.id = ass.business_id ON a.id = ass.business_id
LEFT JOIN dg_message_investigation AS m LEFT JOIN dg_message_investigation AS m
ON a.id = m.business_id ON a.id = m.business_id
WHERE c.del_or_not = 0 WHERE /*c.del_or_not = 0*/
AND i.role_id = 70 /*AND*/ i.role_id = 70
AND ass.role_id = 64 AND ass.role_id = 64
AND m.role_id = 67 AND m.role_id = 67
AND w.id IN AND w.id IN
@ -131,7 +133,7 @@
UPDATE dg_work_conference_consider SET user_id = #{userId} WHERE id = #{id} UPDATE dg_work_conference_consider SET user_id = #{userId} WHERE id = #{id}
</update> </update>
<select id="selectWorkConferenceList" resultType="com.daqing.financial.guarantee.model.response.DgNoticeListResponse"> <!-- <select id="selectWorkConferenceList" resultType="com.daqing.financial.guarantee.model.response.DgNoticeListResponse">
SELECT au.id,au.role_id,ai.business_code,au.create_time SELECT au.id,au.role_id,ai.business_code,au.create_time
FROM dg_work_conference_consider au FROM dg_work_conference_consider au
left join dg_apply_amount_info ai on au.business_id = ai.id left join dg_apply_amount_info ai on au.business_id = ai.id
@ -145,6 +147,35 @@
</if> </if>
AND au.operation_status=1 AND au.operation_status=1
</where> </where>
</select> </select>-->
<select id="selectWorkConferenceList" resultType="com.daqing.financial.guarantee.model.response.DgNoticeListResponse">
SELECT w.id,w.business_id,a.business_code,a.business_type,a.apply_amount,
a.apply_time,a.create_time,c.name,c.phone,
w.role_id,w.audit_status AS status,w.operation_status AS operatingStatus,
b.business_status,i.user_id AS i_user_id,ass.emp_id AS ass_user_id,m.emp_id AS m_user_id,
ab.A AS a_user_id,ab.B AS b_user_id
FROM dg_work_conference_consider AS w
LEFT JOIN dg_apply_amount_info AS a ON a.id = w.business_id
LEFT JOIN crms_company_customer AS cc ON a.company_id = cc.id
LEFT JOIN crms_customer AS c ON cc.customer_id = c.id
LEFT JOIN dg_business_process_status AS b ON b.business_id = a.id
LEFT JOIN (SELECT business_id,SUM(CASE role_id WHEN 59 THEN emp_id ELSE 0 END) AS A,
SUM(CASE role_id WHEN 60 THEN emp_id ELSE 0 END) AS B
FROM dg_guarantee_assign_user GROUP BY business_id) AS ab
ON a.id = ab.business_id
LEFT JOIN dg_compliance_investigation AS i ON a.id = i.business_id
LEFT JOIN dg_assets_investigation AS ass ON a.id = ass.business_id
LEFT JOIN dg_message_investigation AS m ON a.id = m.business_id
WHERE c.del_or_not = 0
AND (w.user_id = #{userId} OR w.user_id IS NULL)
AND w.role_id IN
<foreach collection="roleIdlist" open="(" separator="," close=")" item="roleId">
#{roleId}
</foreach>
AND i.role_id = 70
AND ass.role_id = 64
AND m.role_id = 67
AND w.operation_status=1
</select>
</mapper> </mapper>

@ -82,6 +82,35 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
</dependency> </dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.3.8</version>
</dependency>
<dependency>
<groupId>org.codehaus.xfire</groupId>
<artifactId>xfire-core</artifactId>
<version>1.2.6</version>
</dependency>
<dependency>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
<version>0.0.20131108.vaadin1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk16</artifactId>
<version>1.46</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-test</artifactId>
<version>2.3.5.RELEASE</version>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<dependencyManagement> <dependencyManagement>

@ -2,12 +2,8 @@ package com.daqing.financial.hrauth.config;
import com.daqing.financial.hrauth.filter.AdminAuthenticationProcessingFilter; import com.daqing.financial.hrauth.filter.AdminAuthenticationProcessingFilter;
import com.daqing.financial.hrauth.filter.MyAuthenticationFilter; import com.daqing.financial.hrauth.filter.MyAuthenticationFilter;
import com.daqing.financial.hrauth.handle.AdminAuthenticationEntryPoint; import com.daqing.financial.hrauth.handle.*;
import com.daqing.financial.hrauth.handle.UrlAccessDecisionManager;
import com.daqing.financial.hrauth.handle.UrlAccessDeniedHandler;
import com.daqing.financial.hrauth.handle.UrlFilterInvocationSecurityMetadataSource;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.ObjectPostProcessor; import org.springframework.security.config.annotation.ObjectPostProcessor;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity;
@ -60,13 +56,19 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
*/ */
private final UrlAccessDeniedHandler urlAccessDeniedHandler; private final UrlAccessDeniedHandler urlAccessDeniedHandler;
public SecurityConfig(MyAuthenticationFilter myAuthenticationFilter, AdminAuthenticationEntryPoint adminAuthenticationEntryPoint, AdminAuthenticationProcessingFilter adminAuthenticationProcessingFilter, UrlFilterInvocationSecurityMetadataSource urlFilterInvocationSecurityMetadataSource, UrlAccessDeniedHandler urlAccessDeniedHandler, UrlAccessDecisionManager urlAccessDecisionManager) { /**
* Token异常处理
*/
private final CustomAccessDeniedHandler customAccessDeniedHandler;
public SecurityConfig(MyAuthenticationFilter myAuthenticationFilter, AdminAuthenticationEntryPoint adminAuthenticationEntryPoint, AdminAuthenticationProcessingFilter adminAuthenticationProcessingFilter, UrlFilterInvocationSecurityMetadataSource urlFilterInvocationSecurityMetadataSource, UrlAccessDeniedHandler urlAccessDeniedHandler, UrlAccessDecisionManager urlAccessDecisionManager, CustomAccessDeniedHandler customAccessDeniedHandler) {
this.myAuthenticationFilter = myAuthenticationFilter; this.myAuthenticationFilter = myAuthenticationFilter;
this.adminAuthenticationEntryPoint = adminAuthenticationEntryPoint; this.adminAuthenticationEntryPoint = adminAuthenticationEntryPoint;
this.adminAuthenticationProcessingFilter = adminAuthenticationProcessingFilter; this.adminAuthenticationProcessingFilter = adminAuthenticationProcessingFilter;
this.urlFilterInvocationSecurityMetadataSource = urlFilterInvocationSecurityMetadataSource; this.urlFilterInvocationSecurityMetadataSource = urlFilterInvocationSecurityMetadataSource;
this.urlAccessDeniedHandler = urlAccessDeniedHandler; this.urlAccessDeniedHandler = urlAccessDeniedHandler;
this.urlAccessDecisionManager = urlAccessDecisionManager; this.urlAccessDecisionManager = urlAccessDecisionManager;
this.customAccessDeniedHandler = customAccessDeniedHandler;
} }
@ -87,6 +89,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
// 登录过后访问无权限的接口时自定义403响应内容 // 登录过后访问无权限的接口时自定义403响应内容
http.exceptionHandling().accessDeniedHandler(urlAccessDeniedHandler); http.exceptionHandling().accessDeniedHandler(urlAccessDeniedHandler);
//Token异常
http.exceptionHandling().accessDeniedHandler(customAccessDeniedHandler);
// url权限认证处理 // url权限认证处理
registry.withObjectPostProcessor(new ObjectPostProcessor<FilterSecurityInterceptor>() { registry.withObjectPostProcessor(new ObjectPostProcessor<FilterSecurityInterceptor>() {
@Override @Override
@ -115,7 +120,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
//registry.antMatchers("/api-guarantee/dg-apply-amount-info/getRoles").hasIpAddress("127.0.0.1"); //registry.antMatchers("/api-guarantee/dg-apply-amount-info/getRoles").hasIpAddress("127.0.0.1");
// 允许匿名的url - 可理解为放行接口 - 多个接口使用,分割 // 允许匿名的url - 可理解为放行接口 - 多个接口使用,分割
registry.antMatchers("/**").permitAll(); registry.antMatchers("/**").permitAll();
//registry.antMatchers("/api-guarantee/dg-apply-amount-info/getRoles").permitAll(); // registry.antMatchers("/api-guarantee/dg-apply-amount-info/getRoles").permitAll();
// registry.antMatchers("/**").access("hasAuthority('admin')"); // registry.antMatchers("/**").access("hasAuthority('admin')");
// OPTIONS(选项):查找适用于一个特定网址资源的通讯选择。 在不需执行具体的涉及数据传输的动作情况下, 允许客户端来确定与资源相关的选项以及 / 或者要求, 或是一个服务器的性能 // OPTIONS(选项):查找适用于一个特定网址资源的通讯选择。 在不需执行具体的涉及数据传输的动作情况下, 允许客户端来确定与资源相关的选项以及 / 或者要求, 或是一个服务器的性能
//registry.antMatchers(HttpMethod.OPTIONS, "/**").denyAll(); //registry.antMatchers(HttpMethod.OPTIONS, "/**").denyAll();
@ -141,7 +146,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override @Override
public void configure(WebSecurity web) throws Exception { public void configure(WebSecurity web) throws Exception {
web.ignoring().antMatchers("/**"); web.ignoring().antMatchers("/**");
//web.ignoring().antMatchers("/dg-apply-amount-info/getRoles","/api-guarantee/dg-apply-amount-info/getRoles"); // web.ignoring().antMatchers("/dg-apply-amount-info/getRoles","/api-guarantee/dg-apply-amount-info/getRoles");
} }
} }

@ -43,6 +43,18 @@ public class WeChatConfig implements Serializable {
@Value("${wxopen.wechat_binding_redirect_url}") @Value("${wxopen.wechat_binding_redirect_url}")
private String weChatBindingRedirectUrl; private String weChatBindingRedirectUrl;
/**
* 微信小程序appid
*/
@Value("${wxxcx.appid}")
private String xcxAppid;
/**
* 微信小程序appsecret
*/
@Value("${wxxcx.appsecret}")
private String xcxAppsecret;
/** /**
* 微信开放平台二维码连接 * 微信开放平台二维码连接
*/ */
@ -54,6 +66,11 @@ public class WeChatConfig implements Serializable {
*/ */
private String OPEN_ACCESS_TOKEN_URL="https://api.weixin.qq.com/sns/oauth2/access_token?appid=%s&secret=%s&code=%s&grant_type=authorization_code"; private String OPEN_ACCESS_TOKEN_URL="https://api.weixin.qq.com/sns/oauth2/access_token?appid=%s&secret=%s&code=%s&grant_type=authorization_code";
/**
* 小程序登录请求地址
*/
private String WX_AUTH_URL="https://api.weixin.qq.com/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code";
/** /**
* 获取用户信息 * 获取用户信息
*/ */

@ -1,8 +1,11 @@
package com.daqing.financial.hrauth.controller; package com.daqing.financial.hrauth.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.daqing.financial.hrauth.UserLoginControllerApi; import com.daqing.financial.hrauth.UserLoginControllerApi;
import com.daqing.financial.hrauth.config.WeChatConfig; import com.daqing.financial.hrauth.config.WeChatConfig;
import com.daqing.financial.hrauth.feign.HrmsFeignService; import com.daqing.financial.hrauth.feign.HrmsFeignService;
import com.daqing.financial.hrauth.model.XccLoginReq;
import com.daqing.financial.hrauth.service.UserLoginService; import com.daqing.financial.hrauth.service.UserLoginService;
import com.daqing.financial.hrauth.service.UserService; import com.daqing.financial.hrauth.service.UserService;
import com.daqing.framework.domain.hrms.EmployeeEntity; import com.daqing.framework.domain.hrms.EmployeeEntity;
@ -15,15 +18,23 @@ import com.daqing.framework.util.SendUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.io.BufferedReader;
import java.io.IOException; import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.URLDecoder; import java.net.URLDecoder;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.Map;
/** /**
@ -89,6 +100,7 @@ public class UserLoginController implements UserLoginControllerApi {
loginRequest.setWechatId(wechatId); loginRequest.setWechatId(wechatId);
loginRequest.setPassword(password); loginRequest.setPassword(password);
loginRequest.setPhone(phone);*/ loginRequest.setPhone(phone);*/
System.out.println("wechatId================"+loginRequest.getWechatId());
return userLoginService.login(loginRequest); return userLoginService.login(loginRequest);
} }
@ -157,7 +169,7 @@ public class UserLoginController implements UserLoginControllerApi {
//account = new String(username.getBytes("GBK"),"iso-8859-1"); //account = new String(username.getBytes("GBK"),"iso-8859-1");
log.info("account==========="+account+"headerImg============="+headerImg); log.info("account==========="+account+"headerImg============="+headerImg);
//response.sendRedirect("http://8.129.127.185/dq/index.html#/login?token="+token+"&account="+account+"&headerImg="+headerImg); //response.sendRedirect("http://8.129.127.185/dq/index.html#/login?token="+token+"&account="+account+"&headerImg="+headerImg);
response.sendRedirect("http://www.huorantech.cn/dq/index.html#/Dashboard?token="+token+"&account="+account+"&headerImg="+headerImg); response.sendRedirect("https://www.huorantech.cn/index/#/login?token="+token+"&account="+account+"&headerImg="+headerImg);
} }
}else { }else {
userService.weChatBinding(code,response,state); userService.weChatBinding(code,response,state);
@ -205,4 +217,18 @@ public class UserLoginController implements UserLoginControllerApi {
return result>0 ? ResponseResult.SUCCESS() : ResponseResult.FAIL(55002,"该手机号不存在"); return result>0 ? ResponseResult.SUCCESS() : ResponseResult.FAIL(55002,"该手机号不存在");
} }
/**
* 微信小程序获取openid和session_key授权登录
* @param
* @return
*/
@PostMapping(value = "/wxAuthLogin")
public ResponseResult wxAuthLogin(@RequestBody XccLoginReq xccLoginReq){
String encryptedData = xccLoginReq.getEncryptedData();
String code = xccLoginReq.getCode();
String iv = xccLoginReq.getIv();
Map openid = userLoginService.wxAuthLogin(encryptedData,iv,code);
return ResponseResult.SUCCESS(openid);
}
} }

@ -63,6 +63,7 @@ public class AdminAuthenticationProcessingFilter extends AbstractAuthenticationP
map.put("tenDayEffective",tenDayEffective); map.put("tenDayEffective",tenDayEffective);
map.put("type",type); map.put("type",type);
map.put("userName",userName); map.put("userName",userName);
map.put("wechatId",user.getWechatId());
// 将前端传递的数据转换成jsonBean数据格式 // 将前端传递的数据转换成jsonBean数据格式
//UserEntity user = JSONObject.parseObject(wrappedRequest.getBodyJsonStrByJson(wrappedRequest), UserEntity.class); //UserEntity user = JSONObject.parseObject(wrappedRequest.getBodyJsonStrByJson(wrappedRequest), UserEntity.class);
authRequest = new MyAuthenticationToken(userName, user.getPassword(),null, map); authRequest = new MyAuthenticationToken(userName, user.getPassword(),null, map);

@ -1,10 +1,12 @@
package com.daqing.financial.hrauth.filter; package com.daqing.financial.hrauth.filter;
import com.alibaba.fastjson.JSON;
import com.daqing.financial.hrauth.enums.Constants; import com.daqing.financial.hrauth.enums.Constants;
import com.daqing.financial.hrauth.handle.SecurityUser; import com.daqing.financial.hrauth.handle.SecurityUser;
import com.daqing.financial.hrauth.service.impl.UserDetailsServiceImpl; import com.daqing.financial.hrauth.service.impl.UserDetailsServiceImpl;
import com.daqing.financial.hrauth.util.MultiReadHttpServletRequest; import com.daqing.financial.hrauth.util.MultiReadHttpServletRequest;
import com.daqing.financial.hrauth.util.MultiReadHttpServletResponse; import com.daqing.financial.hrauth.util.MultiReadHttpServletResponse;
import com.daqing.framework.model.response.ResponseResult;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.security.access.AccessDeniedException; import org.springframework.security.access.AccessDeniedException;
@ -19,6 +21,7 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
/** /**
@ -38,6 +41,25 @@ public class MyAuthenticationFilter extends OncePerRequestFilter {
this.userDetailsService = userDetailsService; this.userDetailsService = userDetailsService;
} }
private static void printJson(HttpServletResponse response) {
ResponseResult responseResult = new ResponseResult(false,401,"TOKEN已过期,请重新登录","TOKEN已过期,请重新登录");
String content = JSON.toJSONString(responseResult);
printContent(response, content);
}
private static void printContent(HttpServletResponse response, String content) {
try {
response.reset();
response.setContentType("application/json");
response.setHeader("Cache-Control", "no-store");
response.setCharacterEncoding("UTF-8");
PrintWriter pw = response.getWriter();
pw.write(content);
pw.flush();
} catch (Exception e) {
e.printStackTrace();
}
}
@Override @Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
System.out.println("请求头类型: " + request.getContentType()); System.out.println("请求头类型: " + request.getContentType());
@ -70,15 +92,17 @@ public class MyAuthenticationFilter extends OncePerRequestFilter {
// 检查token // 检查token
SecurityUser securityUser = userDetailsService.getUserByToken(token); SecurityUser securityUser = userDetailsService.getUserByToken(token);
if (securityUser == null || securityUser.getCurrentUserInfo() == null) { if (securityUser == null || securityUser.getCurrentUserInfo() == null) {
throw new AccessDeniedException("TOKEN已过期,请重新登录!"); //throw new AccessDeniedException("TOKEN已过期,请重新登录!");
printJson(response);
return;
} }
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(securityUser, null, securityUser.getAuthorities()); UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(securityUser, null, securityUser.getAuthorities());
// 全局注入角色权限信息和登录用户基本信息 // 全局注入角色权限信息和登录用户基本信息
SecurityContextHolder.getContext().setAuthentication(authentication); SecurityContextHolder.getContext().setAuthentication(authentication);
} }
/* else { else {
throw new AccessDeniedException("TOKEN不存在,请重新登录!"); throw new AccessDeniedException("TOKEN不存在,请重新登录!");
}*/ }
filterChain.doFilter(wrappedRequest, wrappedResponse); filterChain.doFilter(wrappedRequest, wrappedResponse);
} finally { } finally {
stopWatch.stop(); stopWatch.stop();

@ -43,6 +43,7 @@ public class AdminAuthenticationProvider implements AuthenticationProvider {
MyAuthenticationToken authRequest=(MyAuthenticationToken)authentication; MyAuthenticationToken authRequest=(MyAuthenticationToken)authentication;
String tenDayEffective= MapUtils.getString(authRequest.getParam(),"tenDayEffective","1"); String tenDayEffective= MapUtils.getString(authRequest.getParam(),"tenDayEffective","1");
String type= MapUtils.getString(authRequest.getParam(),"type","1"); String type= MapUtils.getString(authRequest.getParam(),"type","1");
String wechatId= MapUtils.getString(authRequest.getParam(),"wechatId",null);
String userName = MapUtils.getString(authRequest.getParam(),"userName",null); String userName = MapUtils.getString(authRequest.getParam(),"userName",null);
// 获取前端表单中输入后返回的用户名、密码 // 获取前端表单中输入后返回的用户名、密码
//String userName = (String) authentication.getPrincipal(); //String userName = (String) authentication.getPrincipal();
@ -53,6 +54,7 @@ public class AdminAuthenticationProvider implements AuthenticationProvider {
loginRequest.setPassword(password); loginRequest.setPassword(password);
loginRequest.setTenDayEffective(Integer.parseInt(tenDayEffective)); loginRequest.setTenDayEffective(Integer.parseInt(tenDayEffective));
loginRequest.setType(Integer.parseInt(type)); loginRequest.setType(Integer.parseInt(type));
loginRequest.setWechatId(wechatId);
ResponseResult login = userLoginService.login(loginRequest); ResponseResult login = userLoginService.login(loginRequest);
LoginResponse data = (LoginResponse) login.getData(); LoginResponse data = (LoginResponse) login.getData();

@ -0,0 +1,66 @@
package com.daqing.financial.hrauth.handle;
import com.daqing.financial.hrauth.model.ApiResult;
import com.daqing.financial.hrauth.service.impl.UserDetailsServiceImpl;
import com.daqing.financial.hrauth.util.ResponseUtils;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.web.access.AccessDeniedHandler;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
/**
* Security自定义异常处理类
* @Author: jialing xu
* @Description: xvjialing@outlook.com
* @Date: 17:24 2018/8/7
*/
@Slf4j
@Component
public class CustomAccessDeniedHandler implements AccessDeniedHandler {
@Autowired
private ObjectMapper objectMapper;
private final UserDetailsServiceImpl userDetailsService;
protected CustomAccessDeniedHandler(UserDetailsServiceImpl userDetailsService) {
this.userDetailsService = userDetailsService;
}
@Override
public void handle(HttpServletRequest request, HttpServletResponse response, AccessDeniedException e) throws IOException, ServletException {
/* log.error("Token异常处理来了~~~~"+accessDeniedException.getMessage());
response.setContentType("application/json;charset=UTF-8");
Map map = new HashMap();
map.put("code", "403");
map.put("msg", accessDeniedException.getMessage());
map.put("data","");
response.setContentType("application/json");
response.setStatus(HttpServletResponse.SC_OK);
response.getWriter().write(objectMapper.writeValueAsString(map));*/
// ResponseUtils.out(response, ApiResult.fail(401, e.getMessage()));
String token = request.getHeader("token");
if (StringUtils.isNotBlank(token)) {
// 检查token
SecurityUser securityUser = userDetailsService.getUserByToken(token);
if (securityUser == null || securityUser.getCurrentUserInfo() == null) {
//ExceptionCast.cast(HrmsCode.TOKEN_EXCEPTION);
throw new AccessDeniedException("TOKEN已过期,请重新登录~~~");
}
}
}
}

@ -0,0 +1,25 @@
package com.daqing.financial.hrauth.model;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* <p>
* 访问记录表
* </p>
*
* @author Qyq
* @since 2021-01-12
*/
@Data
public class XccLoginReq implements Serializable {
private String encryptedData;//明文,加密数据
private String iv;//加密算法的初始向量
private String code;//用户允许登录后,回调内容会带上 code(有效期五分钟),开发者需要将 code 发送到开发者服务器后台
// ,使用code 换取 session_key api,将 code 换成 openid 和 session_key
}

@ -6,6 +6,8 @@ import com.daqing.framework.domain.hrms.UserEntity;
import com.daqing.framework.domain.hrms.request.*; import com.daqing.framework.domain.hrms.request.*;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;
import java.util.Map;
/** /**
* @auther River * @auther River
* @date 2020/9/22 15:00 * @date 2020/9/22 15:00
@ -22,4 +24,6 @@ public interface UserLoginService extends IService<UserEntity> {
boolean bindPhoneAndOpenId(BindOpenIdRequest bindOpenIdRequest); boolean bindPhoneAndOpenId(BindOpenIdRequest bindOpenIdRequest);
int isPhoneExist(String mobile); int isPhoneExist(String mobile);
Map wxAuthLogin(String encryptedData, String iv, String code);
} }

@ -1,5 +1,7 @@
package com.daqing.financial.hrauth.service.impl; package com.daqing.financial.hrauth.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -12,18 +14,19 @@ import com.daqing.financial.hrauth.model.HrmsAccessRecordsLog;
import com.daqing.financial.hrauth.service.LoginLogService; import com.daqing.financial.hrauth.service.LoginLogService;
import com.daqing.financial.hrauth.service.TokenService; import com.daqing.financial.hrauth.service.TokenService;
import com.daqing.financial.hrauth.service.UserLoginService; import com.daqing.financial.hrauth.service.UserLoginService;
import com.daqing.framework.domain.guarantee.response.EmployeeMessageResponse; import com.daqing.financial.hrauth.util.*;
import com.daqing.framework.domain.hrms.*; import com.daqing.framework.domain.hrms.*;
import com.daqing.framework.domain.hrms.request.*; import com.daqing.framework.domain.hrms.request.*;
import com.daqing.framework.domain.hrms.response.HrmsCode; import com.daqing.framework.domain.hrms.response.HrmsCode;
import com.daqing.framework.domain.hrms.response.LoginResponse; import com.daqing.framework.domain.hrms.response.LoginResponse;
import com.daqing.framework.exception.ExceptionCast; import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.model.response.CommonCode;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.util.JwtUtils; import com.daqing.framework.util.JwtUtils;
import com.daqing.framework.util.Md5Util; import com.daqing.framework.util.Md5Util;
import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.util.SendUtil; import com.daqing.framework.util.SendUtil;
import lombok.extern.java.Log;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.security.core.userdetails.UsernameNotFoundException;
@ -31,6 +34,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.*; import java.util.*;
/** /**
@ -119,6 +123,7 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginDao, UserEntity>
@Transactional @Transactional
public ResponseResult login(LoginRequest loginRequest) { public ResponseResult login(LoginRequest loginRequest) {
System.out.println("wechatId222================"+loginRequest.getWechatId());
//判断用户登录方式 //判断用户登录方式
UserEntity userEntity = baseMapper.login(loginRequest); UserEntity userEntity = baseMapper.login(loginRequest);
String name = null; String name = null;
@ -159,7 +164,8 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginDao, UserEntity>
} }
//登录成功,token生成 //登录成功,token生成
long times = 86400; long times = 86400;//24h
//long times =60;//1min
if(loginRequest.getTenDayEffective() == 1){ if(loginRequest.getTenDayEffective() == 1){
times = 864000; times = 864000;
} }
@ -305,4 +311,274 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginDao, UserEntity>
return userLoginDao.selectCount(mobile); return userLoginDao.selectCount(mobile);
} }
} @Override
public Map wxAuthLogin(String encryptedData, String iv,String code) {
System.out.println("code****"+code+"encryptedData**************"+encryptedData+"iv**********"+iv);
System.out.println("来了小程序登录------------------------------------");
//微信那边的接口,grant_type=authorization_code是固定的
String url = String.format(weChatConfig.getWX_AUTH_URL(),weChatConfig.getXcxAppid(),weChatConfig.getXcxAppsecret(),code);
System.out.println("url==============="+url);
//向微信服务器 使用登录凭证 code 获取 session_key 和 openid
// 请求参数
String params = "appid=" + weChatConfig.getXcxAppid() + "&secret=" + weChatConfig.getXcxAppsecret() + "&js_code=" + code + "&grant_type="
+ "authorization_code";
// 发送请求
String sr = HttpRequest.sendGet("https://api.weixin.qq.com/sns/jscode2session", params);
System.out.println("sr==================="+sr);
// 解析相应内容(转换成json对象)
//JSONObject json = JSON.parseObject(url);
cn.hutool.json.JSONObject json = new cn.hutool.json.JSONObject(sr);
// 获取会话密钥(session_key)
String session_key = json.get("session_key").toString();
// 用户的唯一标识(openid)
String openid = (String) json.get("openid");
System.out.println("session_key======"+session_key+"openid===="+openid);
Map map = new HashMap();
//======================此处为死数据============================
encryptedData="V6E2hVgfhatfPt/octP4c6881lJ1GCsYqtzY9MzqlWTpthAw5uWJLpRoXtmO5oM7XSHS6xKqh8YVzhKmrfzbb66574fbfE7n5ADSJYlsJwem1ifm3sypW9Ys3GSBwHaQ/x+Sn3rfs+HKMJgegGn+b3R5X7eXFhrA6lFnd+/xpYB4VWztFMsIyVT85Mlv5G3vp1FryctiGjWTFDDh1kAFXQ31Cso91SuAW2muSUaHh32pJ+WBrpZ7wrEZyyuqMqA0UpZve+gonUpZjnRWXewTTWm6jvc7lMQqFA1PD13pOGKYNKD/WxtaMXPWmvN+5WVwScH7ueEeppA1/aFwsMGnDBUU/+B04WxuQxo+M4b15vIq5GxI5Qvulv1taRdA5oiI10K+9UJAm+dz/2c2ZqEIiu+QTj9gvgbJsrIWMe0Wu5qmNTj/V97furJlcVaVvJvUy0N8zrqb7unAptjL0bQUvIB0ZXVgNbGEZLmAbpQhNgpIJ0ft6LiqvIzkrRYR+sIVr+mJrCoYxhyxB8cqsHJT2w==";
session_key="Piqc8iFe6pN0i5ofq4Y6PA==";
iv="Y37DfoP3+4ysUBo8YOnfiQ==";
System.out.println("session_key======"+session_key+"openid===="+openid);
System.out.println("code****"+code+"encryptedData**************"+encryptedData+"iv**********"+iv);
//对encryptedData加密数据进行AES解密
try {
String result = WXBizDataCrypt.getInstance().decrypt(encryptedData, session_key, iv, "utf-8");
System.out.println("AES解密值==="+result);
//String result = AesCbcUtil.decrypt2(session_key,encryptedData, iv);
//String result = AesCbcUtil.decrypt(encryptedData, session_key, iv, "UTF-8");
if (null != result && result.length() > 0) {
map.put("status", 1);
map.put("msg", "解密成功");
JSONObject userInfoJSON = JSONObject.parseObject(result);
//JSONObject userInfoJSON = JSON.parseObject(result);
//cn.hutool.json.JSONObject userInfoJSON = new cn.hutool.json.JSONObject(result);
System.out.println("userInfoJSON===="+userInfoJSON);
Map userInfo = new HashMap();
userInfo.put("openId", userInfoJSON.get("openId"));
userInfo.put("nickName", userInfoJSON.get("nickName"));
userInfo.put("gender", userInfoJSON.get("gender"));
userInfo.put("city", userInfoJSON.get("city"));
userInfo.put("province", userInfoJSON.get("province"));
userInfo.put("country", userInfoJSON.get("country"));
userInfo.put("avatarUrl", userInfoJSON.get("avatarUrl"));
// 解密unionId & openId;
System.out.println("userInfoJSON==============="+userInfoJSON);
System.out.println("unionId============"+userInfoJSON.get("unionId"));
userInfo.put("unionId", userInfoJSON.get("unionId"));
map.put("userInfo", userInfo);
} else {
map.put("status", 0);
map.put("msg", "解密失败");
}
} catch (Exception e) {
e.printStackTrace();
}
System.out.println("map===================="+map.get("userInfo"));
return map;
}
/* @Override
public String wxAuthLogin(String encryptedData, String iv,String code) {
System.out.println(code);
System.out.println("来了小程序登录------------------------------------");
//微信那边的接口,grant_type=authorization_code是固定的
String url = String.format(weChatConfig.getWX_AUTH_URL(),weChatConfig.getXcxAppid(),weChatConfig.getXcxAppsecret(),code);
System.out.println("url==============="+url);
//发送请求给微信后端
CloseableHttpClient httpClient= HttpClients.createDefault();
HttpGet httpGet=new HttpGet(url);
InputStream inputStream=null;
CloseableHttpResponse httpResponse=null;
StringBuilder result=new StringBuilder();
try {
httpResponse=httpClient.execute(httpGet);
HttpEntity entity=httpResponse.getEntity();
inputStream=entity.getContent();
BufferedReader bufferedReader=new BufferedReader(new InputStreamReader(inputStream));
String line="";
while ((line=bufferedReader.readLine())!=null){
System.out.println(line); //这里需要使用fastjson来提取一下内容
JSONObject jsonObject= JSON.parseObject(line);
Login login=new Login();
System.out.println("jsonObject====================="+jsonObject);
System.out.println("unionId==================="+jsonObject.getString("unionid"));
login.setOpenid(jsonObject.getString("openid"));
login.setSession_key(jsonObject.getString("session_key"));
login.setUnionid(jsonObject.getString("unionid"));
result.append(login.getUnionid());
System.out.println(result.toString());
}
} catch (IOException e) {
e.printStackTrace();
}
return result.toString();
}*/
/* @Override
public String wxAuthLogin(String encryptedData, String iv,String code) {
System.out.println(code);
System.out.println("来了小程序登录------------------------------------");
//微信那边的接口,grant_type=authorization_code是固定的
String url = String.format(weChatConfig.getWX_AUTH_URL(),weChatConfig.getXcxAppid(),weChatConfig.getXcxAppsecret(),code);
System.out.println("url==============="+url);
Map<String ,Object> baseMap = HttpUtils.doGet(url);
if(baseMap == null || baseMap.isEmpty()){ return null; }
String accessToken = (String)baseMap.get("access_token");
String openId = (String) baseMap.get("openid");
String unionId = (String) baseMap.get("unionid");
System.out.println("小程序登录openId============="+openId+"unionId=============="+unionId+"baseMap============"+baseMap);
return unionId;
}*/
/*
*//**
* 1 先按照loginInfo信息查询有无有unionID
* 2 如果有,直接返回 ,程序结束
* 3 如果没有,将用于解密的session_key获取
* 4 根据userInfo拿取encryptedData等加密数据
* 5 对加密数据进行逆解密
* 6 拿到unionID 返回,程序结
*
* userInfo TODO 注意一下通过user.getInfo获取的和通过button授权获取的格式不一样
*
*//*
@Override
public ResponseResult getUnionID(Long platformId, String userInfo, String loginInfo, HttpServletRequest request) {
Map<String, String> resLogign = null;
JSONObject resUserInfo = null;
System.out.println("--------------->>>>>进入WeChatServiceImpl");
resLogign = getUnionIDByLoginInfo(loginInfo, request);
// 加密session_key 解密需要
String session_key = resLogign.get("session_key");
if (StringUtils.isNotBlank(resLogign.get("unionid"))) {
System.out.println("返回数据,获取unionid,程序结束<<<------unionid={}"+resLogign.get("unionid"));
return ResponseResult.SUCCESS("获取unionid成功,返回数据!"+resLogign);
} else {
System.out.println("没有获取到unionid,userinfo进行对称解密操作start----->");
resUserInfo = decipherByUserInfo(session_key, userInfo, request);
if (resUserInfo != null && StringUtils.isNotEmpty(resUserInfo.toJSONString())) {
System.out.println("解密后的信息为resUserInfo:{}"+resUserInfo.toJSONString());
// 解密信息由 data.get("unionid") 获取
return ResponseResult.SUCCESS("获取解密信息成功"+resUserInfo);
}
}
return null;
}
*//**
*
* @param session_key
* @param userInfo
* @param request
* @return
*//*
private JSONObject decipherByUserInfo(String session_key, String userInfo, HttpServletRequest request) {
System.out.println("--------------->>>>>进入 decipherByUserInfo");
Map<String, String> resUserInfo = new HashMap<>();
if (!userInfo.contains("login:ok")&&!userInfo.contains("getUserInfo:ok")) {
return null;
}
JSONObject jsonUserInfo = JSONObject.parseObject(userInfo);
System.out.println("将userInfo转换成JSON,userInfo:{}"+jsonUserInfo.toJSONString());
String encryptedData = "";
String iv = "";
if (jsonUserInfo.get("detail") != null && StringUtils.isNotBlank(jsonUserInfo.get("detail").toString())) {
String detail = jsonUserInfo.get("detail").toString();
JSONObject parseObject = JSONObject.parseObject(detail);
encryptedData = (String) parseObject.get("encryptedData");
iv = (String) parseObject.get("iv");
} else {
encryptedData = (String) jsonUserInfo.get("encryptedData");
iv = (String) jsonUserInfo.get("iv");
}
System.out.println("获取解密数据解密start------------>>>解密需要的数据为:encryptedData:{},iv:{},session_key:{}"+"encryptedData===="+encryptedData+"iv===="+iv+"session_key===="+session_key);
// 被加密的数据
byte[] dataByte = Base64.decodeBase64(encryptedData);
// 加密秘钥
byte[] aeskey = Base64.decodeBase64(session_key);
// 偏移量
byte[] ivByte = Base64.decodeBase64(iv);
System.out.println("对加密数据进行Base64编码完毕------------>>>dataByte:{},aeskey:{},ivByte:{}"+dataByte.toString()+aeskey.toString()+ivByte.toString());
String newuserInfo = "";
try {
AES aes = new AES();
byte[] resultByte = aes.decrypt(dataByte, aeskey, ivByte);
if (null != resultByte && resultByte.length > 0) {
newuserInfo = new String(resultByte, "UTF-8");
System.out.println("解密完毕,解密结果为newuserInfo:{}"+newuserInfo);
return JSONObject.parseObject(newuserInfo);
}
} catch (Exception e) {
System.out.println("解密异常!检查解密数据 {}"+newuserInfo+e);
e.printStackTrace();
}
return null;
}
*//**
* 根据logininfo 的code尝试获取unionID
*
* @param loginInfo
* @param request
* @return
*//*
private Map<String, String> getUnionIDByLoginInfo(String loginInfo, HttpServletRequest request) {
JSONObject loginRes = null;
Map<String, Object> loginReq = new HashMap<>();
Map<String, String> loginResMap = new HashMap<>();
System.out.println("--------------->>>>>进入 getUnionIDByLoginInfo");
JSONObject loginMap = JSONObject.parseObject(loginInfo);
System.out.println("转换JSON完毕");
System.out.println("组装请求数据----start:");
String resCode = (String) loginMap.get("code");
loginReq.put("js_code", resCode);
loginReq.put("appid", weChatConfig.getXcxAppid()); // 这几个变量是自己去获取的 我做成了配置文件中
loginReq.put("secret", weChatConfig.getXcxAppsecret()); // 去这个网址看参数说明: https://developers.weixin.qq.com/miniprogram/dev/api/api-login.html#wxloginobject
loginReq.put("grant_type", "authorization_code");
System.out.println("组装请求参数完毕loginReq={}"+loginReq);
try {
System.out.println("开始发送请求到微信...url={}"+weChatConfig.getWX_AUTH_URL());
loginRes = HttpClientUtils.doGet(SysConstants.WEICHAT_UNIONID_URL, loginReq);
} catch (Exception e) {
System.out.println("调用httpClient异常!异常信息={}"+e);
throw new RuntimeException(e);
}
String openid = (String) loginRes.get("openid");
String session_key = (String) loginRes.get("session_key");
String unionid = (String) loginRes.get("unionid");
loginResMap.put("openid", openid);
loginResMap.put("unionid", unionid);
loginResMap.put("session_key", session_key);
System.out.println("https返回数据loginRes={}"+loginRes.toJSONString());
// 微信建议不要在传输中有session_key,我们在这里做一个缓存数据key=session_key_safe,value="真实的session_key+真实的openid"
// TODO
// 时间问题,这里暂不处理
// loginResMap.put("session_key", "session_key_safe");
return loginResMap;
}*/
}

@ -58,7 +58,8 @@ public class UserServiceImpl extends ServiceImpl<UserLoginDao, UserEntity> imple
if(baseMap == null || baseMap.isEmpty()){ return null; } if(baseMap == null || baseMap.isEmpty()){ return null; }
String accessToken = (String)baseMap.get("access_token"); String accessToken = (String)baseMap.get("access_token");
String openId = (String) baseMap.get("openid"); String openId = (String) baseMap.get("openid");
String unionId = (String) baseMap.get("unionid");
System.out.println("微信扫码加密前openId============="+openId+"unionId=============="+unionId+"baseMap============"+baseMap);
//对code(回调过来的openid)加密 //对code(回调过来的openid)加密
String md5OpenId = Md5Util.md5(openId); String md5OpenId = Md5Util.md5(openId);
log.info("accessToken========> "+accessToken+"openId========> "+openId+"code=======> "+code+"md5OpenId============>"+md5OpenId); log.info("accessToken========> "+accessToken+"openId========> "+openId+"code=======> "+code+"md5OpenId============>"+md5OpenId);
@ -90,7 +91,7 @@ public class UserServiceImpl extends ServiceImpl<UserLoginDao, UserEntity> imple
if(dbUser == null){//openId不存在,返回绑定手机号页面,须另写绑定手机号接口 if(dbUser == null){//openId不存在,返回绑定手机号页面,须另写绑定手机号接口
log.info("dbUser为空,openId不存在,请先绑定手机号哦~~~"); log.info("dbUser为空,openId不存在,请先绑定手机号哦~~~");
try { try {
response.sendRedirect("http://www.huorantech.cn/dq/index.html#/bind-phone?matched="+md5OpenId);//跳转绑定手机号页面 response.sendRedirect("https://www.huorantech.cn/index/#/bind-phone?matched="+md5OpenId);//跳转绑定手机号页面
//response.sendRedirect("http://8.129.127.185/dq/index.html#/bind-phone?matched="+md5OpenId);//跳转绑定手机号页面 //response.sendRedirect("http://8.129.127.185/dq/index.html#/bind-phone?matched="+md5OpenId);//跳转绑定手机号页面
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
@ -145,14 +146,15 @@ public class UserServiceImpl extends ServiceImpl<UserLoginDao, UserEntity> imple
return false; return false;
} }
String openId = (String) baseMap.get("openid"); String openId = (String) baseMap.get("openid");
log.info(openId+"--------------------------------------------------------------------------------------------------"); String unionId = (String) baseMap.get("unionid");
log.info("openId========="+openId+"unionId===="+unionId);
String md5OpenId = Md5Util.md5(openId); String md5OpenId = Md5Util.md5(openId);
Integer countWeChatId = this.getBaseMapper().countWeChatId(md5OpenId); Integer countWeChatId = this.getBaseMapper().countWeChatId(md5OpenId);
String token = this.getBaseMapper().getTokenByUserId(Long.parseLong(state)); String token = this.getBaseMapper().getTokenByUserId(Long.parseLong(state));
if (countWeChatId > 0){ if (countWeChatId > 0){
try { try {
log.info("微信重复了,我走到了这里............................."); log.info("微信重复了,我走到了这里.............................");
response.sendRedirect("http://www.huorantech.cn/dq/index.html#/workbench-manpower?token="+token+"&message=1"); response.sendRedirect("https://www.huorantech.cn/index/#/workbench-manpower?token="+token+"&message=1");
//response.sendRedirect("http://8.129.127.185/dq/index.html#/workbench-manpower?token="+token+"&message=1"); //response.sendRedirect("http://8.129.127.185/dq/index.html#/workbench-manpower?token="+token+"&message=1");
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
@ -163,7 +165,7 @@ public class UserServiceImpl extends ServiceImpl<UserLoginDao, UserEntity> imple
if (result){ if (result){
try { try {
log.info("转发成功---------------------------------------"); log.info("转发成功---------------------------------------");
response.sendRedirect("http://www.huorantech.cn/dq/index.html#/workbench-manpower?token="+token); response.sendRedirect("https://www.huorantech.cn/index/#/workbench-manpower?token="+token);
//response.sendRedirect("http://8.129.127.185/dq/index.html#/workbench-manpower?token="+token); //response.sendRedirect("http://8.129.127.185/dq/index.html#/workbench-manpower?token="+token);
}catch (IOException e){ }catch (IOException e){
e.printStackTrace(); e.printStackTrace();

@ -0,0 +1,73 @@
package com.daqing.financial.hrauth.util;
import java.security.AlgorithmParameters;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.Key;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.Security;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
public class AES {
public static boolean initialized = false;
/**
* AES对称解密工具类
*
* @param content
* 密文
* @return
* @throws InvalidAlgorithmParameterException
* @throws NoSuchProviderException
*/
public byte[] decrypt(byte[] content, byte[] keyByte, byte[] ivByte) throws InvalidAlgorithmParameterException {
initialize();
try {
// java是没有
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS7Padding");
Key sKeySpec = new SecretKeySpec(keyByte, "AES");
cipher.init(Cipher.DECRYPT_MODE, sKeySpec, generateIV(ivByte));// 初始化
byte[] result = cipher.doFinal(content);
return result;
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (NoSuchPaddingException e) {
e.printStackTrace();
} catch (InvalidKeyException e) {
e.printStackTrace();
} catch (IllegalBlockSizeException e) {
e.printStackTrace();
} catch (BadPaddingException e) {
e.printStackTrace();
} catch (NoSuchProviderException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
public static void initialize() {
if (initialized)
return;
Security.addProvider(new BouncyCastleProvider());
initialized = true;
}
// 生成iv
public static AlgorithmParameters generateIV(byte[] iv) throws Exception {
AlgorithmParameters params = AlgorithmParameters.getInstance("AES");
params.init(new IvParameterSpec(iv));
return params;
}
}

@ -0,0 +1,171 @@
package com.daqing.financial.hrauth.util;
import org.apache.commons.codec.binary.Base64;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import javax.crypto.*;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.security.*;
import java.security.spec.InvalidParameterSpecException;
import java.util.Arrays;
/**
* Created by yfs on 2018/3/25.
* <p>
* AES-128-CBC 加密方式
*
* AES-128-CBC可以自己定义密钥偏移量
* AES-128是jdk自动生成的密钥
*/
public class AesCbcUtil {
static {
//BouncyCastle是一个开源的加解密解决方案,主页在http://www.bouncycastle.org/
Security.addProvider(new BouncyCastleProvider());
}
/**
* AES解密
*
* @param data //密文,被加密的数据
* @param key //秘钥
* @param iv //偏移量
* @param encodingFormat //解密后的结果需要进行的编码
* @return
* @throws Exception
*/
public static String decrypt(String data, String key, String iv, String encodingFormat) throws Exception {
// initialize();
//被加密的数据
byte[] dataByte = Base64.decodeBase64(data);
//加密秘钥
byte[] keyByte = Base64.decodeBase64(key);
//偏移量
byte[] ivByte = Base64.decodeBase64(iv);
try {
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS7Padding");
SecretKeySpec spec = new SecretKeySpec(keyByte, "AES");
AlgorithmParameters parameters = AlgorithmParameters.getInstance("AES");
parameters.init(new IvParameterSpec(ivByte));
cipher.init(Cipher.DECRYPT_MODE, spec, parameters);// 初始化
byte[] resultByte = cipher.doFinal(dataByte);
if (null != resultByte && resultByte.length > 0) {
String result = new String(resultByte, encodingFormat);
return result;
}
return null;
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (NoSuchPaddingException e) {
e.printStackTrace();
} catch (InvalidParameterSpecException e) {
e.printStackTrace();
} catch (InvalidKeyException e) {
e.printStackTrace();
} catch (InvalidAlgorithmParameterException e) {
e.printStackTrace();
} catch (IllegalBlockSizeException e) {
e.printStackTrace();
} catch (BadPaddingException e) {
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return null;
}
/**
* AES解密
*
* @param encryptedData 消息密文
* @param ivStr iv字符串
*/
public static byte[] decrypt2(String sessionKey, String encryptedData, String ivStr) {
try {
AlgorithmParameters params = AlgorithmParameters.getInstance("AES");
params.init(new IvParameterSpec(Base64.decodeBase64(ivStr)));
Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding");
cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(Base64.decodeBase64(sessionKey), "AES"), params);
String encodingFormat = "UTF-8";
byte[] resultByte = cipher.doFinal(Base64.decodeBase64(encryptedData));
return resultByte;
/* System.out.println("resultByte===="+resultByte);
if (null != resultByte && resultByte.length > 0) {
String result = new String(resultByte, encodingFormat);
return result;
}
return null;*/
//return new String(PKCS7Encoder.decode(cipher.doFinal(Base64.decodeBase64(encryptedData))), StandardCharsets.UTF_8);
} catch (Exception e) {
throw new RuntimeException("AES解密失败", e);
}
}
public static String decryptNew(String encryptedData, String sessionKey, String iv) throws Exception {
String result = "";
// 被加密的数据
byte[] dataByte = Base64.decodeBase64(encryptedData);
// 加密秘钥
byte[] keyByte = Base64.decodeBase64(sessionKey);
// 偏移量
byte[] ivByte = Base64.decodeBase64(iv);
try {
// 如果密钥不足16位,那么就补足. 这个if 中的内容很重要
int base = 16;
if (keyByte.length % base != 0) {
int groups = keyByte.length / base + (keyByte.length % base != 0 ? 1 : 0);
byte[] temp = new byte[groups * base];
Arrays.fill(temp, (byte) 0);
System.arraycopy(keyByte, 0, temp, 0, keyByte.length);
keyByte = temp;
}
// 初始化
Security.addProvider(new BouncyCastleProvider());
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS7Padding", "BC");
SecretKeySpec spec = new SecretKeySpec(keyByte, "AES");
AlgorithmParameters parameters = AlgorithmParameters.getInstance("AES");
parameters.init(new IvParameterSpec(ivByte));
// 初始化
cipher.init(Cipher.DECRYPT_MODE, spec, parameters);
byte[] resultByte = cipher.doFinal(dataByte);
if (null != resultByte && resultByte.length > 0) {
result = new String(resultByte, "UTF-8");
}
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (NoSuchPaddingException e) {
e.printStackTrace();
} catch (InvalidParameterSpecException e) {
e.printStackTrace();
} catch (IllegalBlockSizeException e) {
e.printStackTrace();
} catch (BadPaddingException e) {
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (InvalidKeyException e) {
e.printStackTrace();
} catch (InvalidAlgorithmParameterException e) {
e.printStackTrace();
} catch (NoSuchProviderException e) {
e.printStackTrace();
}
return result;
}
}

@ -0,0 +1,137 @@
package com.daqing.financial.hrauth.util;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.URL;
import java.net.URLConnection;
import java.util.List;
import java.util.Map;
public class HttpRequest {
public static void main(String[] args) {
//发送 GET 请求
String s=HttpRequest.sendGet("http://v.qq.com/x/cover/kvehb7okfxqstmc.html?vid=e01957zem6o", "");
System.out.println(s);
// //发送 POST 请求
// String sr=HttpRequest.sendPost("http://www.toutiao.com/stream/widget/local_weather/data/?city=%E4%B8%8A%E6%B5%B7", "");
// JSONObject json = JSONObject.fromObject(sr);
// System.out.println(json.get("data"));
}
/**
* 向指定URL发送GET方法的请求
*
* @param url
* 发送请求的URL
* @param param
* 请求参数请求参数应该是 name1=value1&name2=value2 的形式
* @return URL 所代表远程资源的响应结果
*/
public static String sendGet(String url, String param) {
String result = "";
BufferedReader in = null;
try {
String urlNameString = url + "?" + param;
URL realUrl = new URL(urlNameString);
// 打开和URL之间的连接
URLConnection connection = realUrl.openConnection();
// 设置通用的请求属性
connection.setRequestProperty("accept", "*/*");
connection.setRequestProperty("connection", "Keep-Alive");
connection.setRequestProperty("user-agent",
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
// 建立实际的连接
connection.connect();
// 获取所有响应头字段
Map<String, List<String>> map = connection.getHeaderFields();
// 遍历所有的响应头字段
for (String key : map.keySet()) {
System.out.println(key + "--->" + map.get(key));
}
// 定义 BufferedReader输入流来读取URL的响应
in = new BufferedReader(new InputStreamReader(
connection.getInputStream()));
String line;
while ((line = in.readLine()) != null) {
result += line;
}
} catch (Exception e) {
System.out.println("发送GET请求出现异常!" + e);
e.printStackTrace();
}
// 使用finally块来关闭输入流
finally {
try {
if (in != null) {
in.close();
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
return result;
}
/**
* 向指定 URL 发送POST方法的请求
*
* @param url
* 发送请求的 URL
* @param param
* 请求参数请求参数应该是 name1=value1&name2=value2 的形式
* @return 所代表远程资源的响应结果
*/
public static String sendPost(String url, String param) {
PrintWriter out = null;
BufferedReader in = null;
String result = "";
try {
URL realUrl = new URL(url);
// 打开和URL之间的连接
URLConnection conn = realUrl.openConnection();
// 设置通用的请求属性
conn.setRequestProperty("accept", "*/*");
conn.setRequestProperty("connection", "Keep-Alive");
conn.setRequestProperty("user-agent",
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
// 发送POST请求必须设置如下两行
conn.setDoOutput(true);
conn.setDoInput(true);
// 获取URLConnection对象对应的输出流
out = new PrintWriter(conn.getOutputStream());
// 发送请求参数
out.print(param);
// flush输出流的缓冲
out.flush();
// 定义BufferedReader输入流来读取URL的响应
in = new BufferedReader(
new InputStreamReader(conn.getInputStream()));
String line;
while ((line = in.readLine()) != null) {
result += line;
}
} catch (Exception e) {
System.out.println("发送 POST 请求出现异常!"+e);
e.printStackTrace();
}
//使用finally块来关闭输出流、输入流
finally{
try{
if(out!=null){
out.close();
}
if(in!=null){
in.close();
}
}
catch(IOException ex){
ex.printStackTrace();
}
}
return result;
}
}

@ -0,0 +1,65 @@
package com.daqing.financial.hrauth.util;
/**
* 对公众平台发送给公众账号的消息加解密示例代码.
*
* @copyright Copyright (c) 1998-2014 Tencent Inc.
*/
import java.nio.charset.Charset;
import java.util.Arrays;
/**
* 提供基于PKCS7算法的加解
*/
public class PKCS7Encoder {
private static final Charset CHARSET = Charset.forName("utf-8");
private static final int BLOCK_SIZE = 32;
/**
* 获得对明文进行补位填充的字节.
*
* @param count 需要进行填充补位操作的明文字节个数
* @return 补齐用的字节数组
*/
public static byte[] encode(int count) {
// 计算需要填充的位数
int amountToPad = BLOCK_SIZE - (count % BLOCK_SIZE);
if (amountToPad == 0) {
amountToPad = BLOCK_SIZE;
}
// 获得补位所用的字符
char padChr = chr(amountToPad);
String tmp = new String();
for (int index = 0; index < amountToPad; index++) {
tmp += padChr;
}
return tmp.getBytes(CHARSET);
}
/**
* 删除解密后明文的补位字符
*
* @param decrypted 解密后的明文
* @return 删除补位字符后的明文
*/
public static byte[] decode(byte[] decrypted) {
int pad = decrypted[decrypted.length - 1];
if (pad < 1 || pad > 32) {
pad = 0;
}
return Arrays.copyOfRange(decrypted, 0, decrypted.length - pad);
}
/**
* 将数字转化成ASCII码对应的字符用于对明文进行补码
*
* @param a 需要转化的数字
* @return 转化得到的字符
*/
public static char chr(int a) {
byte target = (byte) (a & 0xFF);
return (char) target;
}
}

@ -0,0 +1,198 @@
package com.daqing.financial.hrauth.util;
import com.google.common.primitives.Bytes;
import org.apache.commons.codec.binary.Base64;
import java.io.UnsupportedEncodingException;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.KeyGenerator;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
public class TestUtil {
/**
* 加密
*
* @param content
* 需要加密的内容
* @param password
* 加密密码
* @return
*/
public static byte[] encrypt(String content, String password) {
try {
KeyGenerator kgen = KeyGenerator.getInstance("AES");
kgen.init(128, new SecureRandom(password.getBytes()));
SecretKey secretKey = kgen.generateKey();
byte[] enCodeFormat = secretKey.getEncoded();
SecretKeySpec key = new SecretKeySpec(enCodeFormat, "AES");
Cipher cipher = Cipher.getInstance("AES");// 创建密码器
byte[] byteContent = content.getBytes("utf-8");
cipher.init(Cipher.ENCRYPT_MODE, key);// 初始化
byte[] result = cipher.doFinal(byteContent);
return result; // 加密
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (NoSuchPaddingException e) {
e.printStackTrace();
} catch (InvalidKeyException e) {
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (IllegalBlockSizeException e) {
e.printStackTrace();
} catch (BadPaddingException e) {
e.printStackTrace();
}
return null;
}
/**
* 解密
*
* @param content
* 待解密内容
* @param password
* 解密密钥
* @return
*/
public static byte[] decrypt(byte[] content, String password) {
try {
KeyGenerator kgen = KeyGenerator.getInstance("AES");
kgen.init(128, new SecureRandom(password.getBytes()));
SecretKey secretKey = kgen.generateKey();
byte[] enCodeFormat = secretKey.getEncoded();
SecretKeySpec key = new SecretKeySpec(enCodeFormat, "AES");
Cipher cipher = Cipher.getInstance("AES");// 创建密码器
cipher.init(Cipher.DECRYPT_MODE, key);// 初始化
byte[] result = cipher.doFinal(content);
return result; // 加密
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (NoSuchPaddingException e) {
e.printStackTrace();
} catch (InvalidKeyException e) {
e.printStackTrace();
} catch (IllegalBlockSizeException e) {
e.printStackTrace();
} catch (BadPaddingException e) {
e.printStackTrace();
}
return null;
}
/**
* 将二进制转换成16进制
*
* @param buf
* @return
*/
public static String parseByte2HexStr(byte buf[]) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < buf.length; i++) {
String hex = Integer.toHexString(buf[i] & 0xFF);
if (hex.length() == 1) {
hex = '0' + hex;
}
sb.append(hex.toUpperCase());
}
return sb.toString();
}
/**
* 将16进制转换为二进制
*
* @param hexStr
* @return
*/
public static byte[] parseHexStr2Byte(String hexStr) {
if (hexStr.length() < 1)
return null;
byte[] result = new byte[hexStr.length() / 2];
for (int i = 0; i < hexStr.length() / 2; i++) {
int high = Integer.parseInt(hexStr.substring(i * 2, i * 2 + 1), 16);
int low = Integer.parseInt(hexStr.substring(i * 2 + 1, i * 2 + 2), 16);
result[i] = (byte) (high * 16 + low);
}
return result;
}
/**
* 加密
*
* @param content
* 需要加密的内容
* @param password
* 加密密码
* @return
*/
public static byte[] encrypt2(String content, String password) {
try {
SecretKeySpec key = new SecretKeySpec(password.getBytes(), "AES");
Cipher cipher = Cipher.getInstance("AES/ECB/NoPadding");
byte[] byteContent = content.getBytes("utf-8");
cipher.init(Cipher.ENCRYPT_MODE, key);// 初始化
byte[] result = cipher.doFinal(byteContent);
return result; // 加密
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (NoSuchPaddingException e) {
e.printStackTrace();
} catch (InvalidKeyException e) {
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (IllegalBlockSizeException e) {
e.printStackTrace();
} catch (BadPaddingException e) {
e.printStackTrace();
}
return null;
}
public static void main(String[] args) throws UnsupportedEncodingException, InvalidAlgorithmParameterException {
String encryptedData="+WQuaG5Tr9EU6f+Cx7OR7O8/HbVAUK77P9/BRqhdA4qYKLcw0sbS1R5DfoU+D4HEpoUCXtmRH/gP" +
"eJqYFJpauBysbadiYrZ6wYWjp5wP+HgxWnfCOk7jwR8WUdvFFDuQMhAVudnFhhNP3g4iHfCeiU5yfmN4iw" +
"gpL4txJpuZDHhyjqBqGGxntyxgxHFonbFi94e+IaPrFqigvqJXI9RGW9eXUVhZEQGeadv+eW72ucPq90KGH" +
"wPj0uUMWRWPJC8ZWp+uRUbrENiKfo9QJqiMljq/wcbz4c/u/Wd7PF4o4s02uutMjsrpYdnpw20E7DDpUIBU" +
"fIkeDmIFOIEQYPAGbTFtbHwPyyrx/r+fSihmO6PRwAlUrfhCOZ3KNkmtqZPDjqfHGrW+MeiquW5vryXL8FWy++z" +
"OVdGzymGvW6E/hSVDoTNL4+zeuxhJAXCnuPjLtYeL0EkGam8ks0KDqhZy3gUwRwrM0HFzQ1IryTMsqeLCcLMm" +
"0vWG4PEuPv5j5+V66MTGYvyyM2v67zK7Z2cn2A==";
String iv="zI+P8RVxEwMFBXcJDCemHg==";
String session_key="Piqc8iFe6pN0i5ofq4Y6PA==";
String content = encryptedData;
String password = "";
// 加密
System.out.println("加密前:" + content);
byte[] encode = encrypt(content, password);
//传输过程,不转成16进制的字符串,就等着程序崩溃掉吧
String code = parseByte2HexStr(encode);
System.out.println("密文字符串:" + code);
byte[] decode = parseHexStr2Byte(code);
// 解密
byte[] decryptResult = decrypt(decode, password);
System.out.println("decryptResult==="+decryptResult);
System.out.println("解密后:" + new String(decryptResult, "UTF-8")); //不转码会乱码
System.out.println("=========================================================");
byte[] dataByte = Base64.decodeBase64(session_key);
//byte[] d = TestUtil.parseHexStr2Byte(encryptedData);
byte[] dr = decrypt(dataByte, "");
//String re = new String(dr, "UTF-8");
//System.out.println("result====="+re);
}
}

@ -0,0 +1,115 @@
package com.daqing.financial.hrauth.util;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import sun.misc.BASE64Decoder;
import com.alibaba.fastjson.JSONObject;
/**
* 对微信小程序用户加密数据的解密示例代码.
*
* @ClassName WXBizDataCrypt
* @Description TODO(这里用一句话描述这个类的作用)
* @author tf
* @Date 2016年11月19日 下午2:56:36
* @version 1.0.0
*/
@SuppressWarnings("restriction")
public class WXBizDataCrypt {
/*
* 加密用的Key 可以用26个字母和数字组成 此处使用AES-128-CBC加密模式key需要为16位
*/
private static WXBizDataCrypt instance = null;
private WXBizDataCrypt() {
}
public static WXBizDataCrypt getInstance() {
if (instance == null)
instance = new WXBizDataCrypt();
return instance;
}
/**
* 对于官方加密数据encryptData解密说明如下 加密数据解密算法 接口如果涉及敏感数据如wx.getUserInfo当中的
* openId 和unionId 接口的明文内容将不包含这些敏感数据开发者如需要获取敏感数据需要对接口返回的加密数据(
* encryptedData )进行对称解密 解密算法如下 对称解密使用的算法为 AES-128-CBC数据采用PKCS#7填充
* 对称解密的目标密文为 Base64_Decode(encryptedData), 对称解密秘钥 aeskey =
* Base64_Decode(session_key), aeskey 是16字节 对称解密算法初始向量 iv 会在数据接口中返回
*
* @Description (TODO这里用一句话描述这个方法的作用)
* @param encryptedData
* 加密内容
* @param sessionKey
* 小程序登录sessionKey
* @param iv
* 解密算法初始向量 iv 会在数据接口中返回
* @param encodingFormat
* 编码格式默认UTF-8
* @return 返回解密后的字符串
* @throws Exception
*/
public String decrypt(String encryptedData, String sessionKey, String iv, String encodingFormat) throws Exception {
try {
Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding");
BASE64Decoder base64Decoder = new BASE64Decoder();
byte[] _encryptedData = base64Decoder.decodeBuffer(encryptedData);
byte[] _sessionKey = base64Decoder.decodeBuffer(sessionKey);
byte[] _iv = base64Decoder.decodeBuffer(iv);
SecretKeySpec secretKeySpec = new SecretKeySpec(_sessionKey, "AES");
IvParameterSpec ivParameterSpec = new IvParameterSpec(_iv);
cipher.init(Cipher.DECRYPT_MODE, secretKeySpec, ivParameterSpec);
byte[] original = cipher.doFinal(_encryptedData);
byte[] bytes = PKCS7Encoder.decode(original);
String originalString = new String(bytes, "ISO-8859-1");
return originalString;
} catch (Exception ex) {
return null;
}
}
public static void main(String[] args) throws Exception {
// 需要加密的字串
// String appid = "wx4f4bc4dec97d474b";
/* String sessionKey = "tiihtNczf5v6AKRyjwEUhQ==";
String encryptedData = "CiyLU1Aw2KjvrjMdj8YKliAjtP4gsMZM" + "QmRzooG2xrDcvSnxIMXFufNstNGTyaGS"
+ "9uT5geRa0W4oTOb1WT7fJlAC+oNPdbB+" + "3hVbJSRgv+4lGOETKUQz6OYStslQ142d"
+ "NCuabNPGBzlooOmB231qMM85d2/fV6Ch" + "evvXvQP8Hkue1poOFtnEtpyxVLW1zAo6"
+ "/1Xx1COxFvrc2d7UL/lmHInNlxuacJXw" + "u0fjpXfz/YqYzBIBzD6WUfTIF9GRHpOn"
+ "/Hz7saL8xz+W//FRAUid1OksQaQx4CMs" + "8LOddcQhULW4ucetDf96JcR3g0gfRK4P"
+ "C7E/r7Z6xNrXd2UIeorGj5Ef7b1pJAYB" + "6Y5anaHqZ9J6nKEBvB4DnNLIVWSgARns"
+ "/8wR2SiRS7MNACwTyrGvt9ts8p12PKFd" + "lqYTopNHR1Vf7XjfhQlVsAJdNiKdYmYV"
+ "oKlaRv85IfVunYzO0IKXsyl7JCUjCpoG" + "20f0a04COwfneQAGGwd5oa+T8yO5hzuy" + "Db/XcxxmK01EpqOyuxINew==";
String iv = "r7BXXKkLb8qrSNn05n0qiA==";*/
/* String encryptedData="+WQuaG5Tr9EU6f+Cx7OR7O8/HbVAUK77P9/BRqhdA4qYKLcw0sbS1R5DfoU+D4HEpoUCXtmRH/gP" +
"eJqYFJpauBysbadiYrZ6wYWjp5wP+HgxWnfCOk7jwR8WUdvFFDuQMhAVudnFhhNP3g4iHfCeiU5yfmN4iw" +
"gpL4txJpuZDHhyjqBqGGxntyxgxHFonbFi94e+IaPrFqigvqJXI9RGW9eXUVhZEQGeadv+eW72ucPq90KGH" +
"wPj0uUMWRWPJC8ZWp+uRUbrENiKfo9QJqiMljq/wcbz4c/u/Wd7PF4o4s02uutMjsrpYdnpw20E7DDpUIBU" +
"fIkeDmIFOIEQYPAGbTFtbHwPyyrx/r+fSihmO6PRwAlUrfhCOZ3KNkmtqZPDjqfHGrW+MeiquW5vryXL8FWy++z" +
"OVdGzymGvW6E/hSVDoTNL4+zeuxhJAXCnuPjLtYeL0EkGam8ks0KDqhZy3gUwRwrM0HFzQ1IryTMsqeLCcLMm" +
"0vWG4PEuPv5j5+V66MTGYvyyM2v67zK7Z2cn2A==";
String iv="zI+P8RVxEwMFBXcJDCemHg==";
String sessionKey="Piqc8iFe6pN0i5ofq4Y6PA==";*/
String iv="Y37DfoP3+4ysUBo8YOnfiQ==";
String sessionKey="Piqc8iFe6pN0i5ofq4Y6PA==";
String encryptedData="V6E2hVgfhatfPt/octP4c6881lJ1GCsYqtzY9MzqlWTpthAw5uWJLpRoXtmO5oM7XSHS6xKqh8YVzhKmrfzbb66574fbfE7n5ADSJYlsJwem1ifm3sypW9Ys3GSBwHaQ/x+Sn3rfs+HKMJgegGn+b3R5X7eXFhrA6lFnd+/xpYB4VWztFMsIyVT85Mlv5G3vp1FryctiGjWTFDDh1kAFXQ31Cso91SuAW2muSUaHh32pJ+WBrpZ7wrEZyyuqMqA0UpZve+gonUpZjnRWXewTTWm6jvc7lMQqFA1PD13pOGKYNKD/WxtaMXPWmvN+5WVwScH7ueEeppA1/aFwsMGnDBUU/+B04WxuQxo+M4b15vIq5GxI5Qvulv1taRdA5oiI10K+9UJAm+dz/2c2ZqEIiu+QTj9gvgbJsrIWMe0Wu5qmNTj/V97furJlcVaVvJvUy0N8zrqb7unAptjL0bQUvIB0ZXVgNbGEZLmAbpQhNgpIJ0ft6LiqvIzkrRYR+sIVr+mJrCoYxhyxB8cqsHJT2w==";
/* String iv="sAUv8qjwP8j/Ql9KLgA4iQ==";
String sessionKey="H5lUk3IPIIENRdLxzLi2Hg==";
String encryptedData="QygyXroVw0DNuwO4mlZDBX9wy8XYYE+AA0D738aAKe4icD9UPhtFywJ49UbmT7syv+fb4cn+3ao/w0aQCceh/dEsUhdSWsqAQZtaaXGeCHzi1iGdznIVD06ZYUdgZrJ7rY8Ie9w5/SYVSdSn5pyGovNCohUW4fp2CVowzwrRydsngDDWYjutkSfdvKgT19sCwuOOqZTzDM3gRqIUxwfrjKaDaoCPfa6z+otC0F/BtZYiiqd3MQIMJ0+JSll3ZVrpQKitBhc1EydxN3WSayxhYc4fiEa0YHoXaci0C/6bAfedgGQhejK6hSPLXr/TC++I0lfWnCS/2aidIsifLfyNg2/84yc5mWY5snoc9QeyAoXHczL62n1RwGBetE1Sq7q/sRn9XOFvM0kJ6UOS0n3FvMrH7716hBjUIP/lIf7hAH2IBbnPWyk5iKrMYt/T1Ky5e+RjBwnqJCyYTAxrvEczj2IQPwpGS3B3KWNTGGaK42Sf07w6ID37J3bWsPDAllZUSDhm67vmUjH8AyPTPsGPOg==";
*/
/* String iv="amXf/b7Ollz6WV6e9ZCosg==";
String sessionKey="H8d5dQnmec8Wtm1Ac1IaxQ==";
String encryptedData="/xY631in/VQwauJfAsB9gGH8XpFAzZUprSYBoZzfbDbx60xsBpaikxnn1K+00MMzZ9hAVV4RRKRp+4qaoj+iSuJArgKlZByXaPQa4TxV7JGEuAA2qByTNHK/H2hrFdAxEDERwk7DjYqq1OhMO5n4pTRPxVUZ5ovKm81oOxVw77TjfkkQlgd2Uab/Oe7eM59HkoDQQDC9H2f4q7KmX7sHUuUWmMhEa8+rsJBMy2CWfTvfJpKE9BqNuNOHrXILMpvNm4vKcsc5DB6QzjbwJq8BLCLbmcE3Fa4ZQzcVW2Zi5lT0sOMX/kytgaceo/Rw3VpLkBwwRTsZDB7p+KRUbJYG7f3iSMWYveH09vL8dU+s9ZRO1FCgkyOj5jcpRAKEUAT2njdK4ozXYu+/qMUPeCp00G1NNlDq7gvBnhzYbQzg4+InTmENDYlckAIktBxa3ENWpDjiYWHBSHwbA/gJpAKoZz/oNUrBnPIH91UqRjGQXhdVnBQxeyMcnPuVrk3D51r5Ki3aAuwvB1l6+TWA//RcjTfSQtQnJ/yFctMmk3A7OGo=";
*/String deString = WXBizDataCrypt.getInstance().decrypt(encryptedData, sessionKey, iv, "utf-8");
JSONObject jsonObject = JSONObject.parseObject(deString);
System.out.println(jsonObject);
}
}

@ -1,21 +1,21 @@
#服务名称 #服务名称
spring.application.name=dq-financial-hrms-auth #spring.application.name=dq-financial-hrms-auth
#配置中心地址 ##配置中心地址
spring.cloud.nacos.config.server-addr=192.168.31.140:8848 #spring.cloud.nacos.config.server-addr=127.0.0.1:8848
spring.cloud.nacos.config.file-extension=yml #spring.cloud.nacos.config.file-extension=yml
#redis配置 ##redis配置
spring.redis.host=127.0.0.1 #spring.redis.host=127.0.0.1
spring.redis.port=6379 #spring.redis.port=6379
spring.redis.password= #spring.redis.password=
spring.redis.database=0 #spring.redis.database=0
spring.redis.timeout=30000 #spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8 #spring.redis.jedis.pool.max-active=8
spring.redis.jedis.pool.max-wait=-1 #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.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99 #spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
#线上测试环境 #线上测试环境
#spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128 #spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128
@ -30,30 +30,30 @@ ribbon.ConnectTimeout: 30000
#正式环境(prod) #正式环境(prod)
#spring.application.name=dq-financial-hrms-auth spring.application.name=dq-financial-hrms-auth
#
#spring.cloud.nacos.config.server-addr=120.78.127.12:8848 spring.cloud.nacos.config.server-addr=120.78.127.12:8848
#spring.cloud.nacos.config.namespace=b590c830-7ada-44b7-968f-e8d0c81990c4 spring.cloud.nacos.config.namespace=b590c830-7ada-44b7-968f-e8d0c81990c4
##spring.cloud.nacos.config.group=prod #spring.cloud.nacos.config.group=prod
#
#spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml
#spring.cloud.nacos.config.ext-config[0].group=prod spring.cloud.nacos.config.ext-config[0].group=prod
#spring.cloud.nacos.config.ext-config[0].refresh=true spring.cloud.nacos.config.ext-config[0].refresh=true
#
#spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml
#spring.cloud.nacos.config.ext-config[1].group=prod spring.cloud.nacos.config.ext-config[1].group=prod
#spring.cloud.nacos.config.ext-config[1].refresh=true spring.cloud.nacos.config.ext-config[1].refresh=true
#
#spring.cloud.nacos.config.ext-config[2].data-id=other.yml spring.cloud.nacos.config.ext-config[2].data-id=other.yml
#spring.cloud.nacos.config.ext-config[2].group=prod spring.cloud.nacos.config.ext-config[2].group=prod
#spring.cloud.nacos.config.ext-config[2].refresh=true spring.cloud.nacos.config.ext-config[2].refresh=true
#
#spring.redis.host=127.0.0.1 spring.redis.host=127.0.0.1
#spring.redis.port=6379 spring.redis.port=6379
#spring.redis.password=dq123456 spring.redis.password=dq123456
#spring.redis.database=0 spring.redis.database=0
#spring.redis.timeout=30000 spring.redis.timeout=30000
#spring.redis.jedis.pool.max-active=8 spring.redis.jedis.pool.max-active=8
#spring.redis.jedis.pool.max-wait=-1 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

@ -1,13 +1,132 @@
//package com.daqing.financial.hrauth; package com.daqing.financial.hrauth;
//
//import org.junit.Test; import com.daqing.financial.hrauth.util.AesCbcUtil;
//import org.springframework.boot.test.context.SpringBootTest; import io.swagger.models.auth.In;
//
//@SpringBootTest import java.io.BufferedReader;
//class DqFinancialHrmsAuthApplicationTests { import java.io.FileNotFoundException;
// import java.io.FileReader;
// @Test import java.util.*;
// void contextLoads() { import java.util.regex.Pattern;
// } import java.util.stream.Stream;
//
//} class DqFinancialHrmsAuthApplicationTests{
public static void main(String[] args) throws Exception {
String encryptedData="+WQuaG5Tr9EU6f+Cx7OR7O8/HbVAUK77P9/BRqhdA4qYKLcw0sbS1R5DfoU+D4HEpoUCXtmRH/gPeJqYFJpauBysbadiYrZ6wYWjp5wP+HgxWnfCOk7jwR8WUdvFFDuQMhAVudnFhhNP3g4iHfCeiU5yfmN4iwgpL4txJpuZDHhyjqBqGGxntyxgxHFonbFi94e+IaPrFqigvqJXI9RGW9eXUVhZEQGeadv+eW72ucPq90KGHwPj0uUMWRWPJC8ZWp+uRUbrENiKfo9QJqiMljq/wcbz4c/u/Wd7PF4o4s02uutMjsrpYdnpw20E7DDpUIBUfIkeDmIFOIEQYPAGbTFtbHwPyyrx/r+fSihmO6PRwAlUrfhCOZ3KNkmtqZPDjqfHGrW+MeiquW5vryXL8FWy++zOVdGzymGvW6E/hSVDoTNL4+zeuxhJAXCnuPjLtYeL0EkGam8ks0KDqhZy3gUwRwrM0HFzQ1IryTMsqeLCcLMm0vWG4PEuPv5j5+V66MTGYvyyM2v67zK7Z2cn2A==";
String iv="zI+P8RVxEwMFBXcJDCemHg==";
String session_key="Piqc8iFe6pN0i5ofq4Y6PA==";
/* String result = AesCbcUtil.decrypt2(session_key,encryptedData,iv);
String s2 = new String(result.getBytes("UTF-8"),"GBK");
System.out.println(result);
System.out.println(s2);*/
}
/* public static void main(String[] args) {
//=================================流的常用创建方法=======================================
//1,使用Collection下的stream()和parallelStream()操作
List<String> list = new ArrayList();
Stream<String> stream = list.stream();//获取一个顺序流
Stream<String> parallelStream = list.parallelStream();//获取一个并行流
//2,使用Arrays中的stream()方法,将数组转成流
Integer[]num = new Integer[10];
Stream<Integer> stream1 = Arrays.stream(num);
//System.out.println("stream1==="+stream1);
//3,使用Stream中的静态方法:如of(),iterate(),generate()
Stream<Integer>stream2 = Stream.of(1,2,3,4,5,6);
//stream2.forEach(System.out::println);
//stream2.forEach((t)->System.out.println(t));每次创建的stream只能使用一次,否则报错stream has already been operated upon or closed
Stream<Integer>stream3 = Stream.iterate(0,(x)->x+2).limit(8);
//stream3.forEach(System.out::println);
Stream<Double>stream4 = Stream.generate(Math::random).limit(2);
// stream4.forEach((t)->System.out.println(t));
//4,使用BufferedReader.lines()方法,将每行内容转成流
BufferedReader reader=null;
try {
reader = new BufferedReader(new FileReader("D:\\myfile\\工作文档.txt"));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
Stream<String>lineStream = reader.lines();
//lineStream.forEach(System.out::println);
//5,使用Pattern.splitAsStream()方法,将字符串分隔成流
Pattern pattern = Pattern.compile(",");
Stream<String> stream5 = pattern.splitAsStream("漆柒,菜园子");
// stream5.forEach(System.out::println);
//=================================流的中间操作========================================
//1,筛选与切片
Stream<Integer> stream6 = Stream.of(6, 4, 6, 7, 3, 9, 8, 10, 12, 14, 14, 20, 3);
Stream<Integer> newStream = stream6.filter(t -> t>5)//6, 6, 7, 9, 8, 10, 12, 14, 14, 20
.distinct()//6, 7, 9, 8, 10, 12, 14, 20
.skip(2)//9, 8, 10, 12, 14, 20
.limit(5);//9, 8, 10, 12, 14
//filter:过滤流中的某些元素,limit(n):获取n个元素,skip(n):跳过n元素,配合limit(n)可做分页,distinct:通过流中元素的hashCode()和equals()去重
// newStream.forEach(System.out::println);
//2,映射
List<String> list2 = Arrays.asList("a,b,c", "1,2,3");
//将每个元素转成一个新的且不带括号的元素
Stream<String> streamMap = list2.stream().map(s->s.replaceAll(",",""));
// streamMap.forEach(System.out::println);
Stream<String> streamFlatMap = list2.stream().flatMap(s->{
//将每个元素转换成一个Stream流
String[]split = s.split(",");
Stream<String>ss = Arrays.stream(split);
return ss;
});
// streamFlatMap.forEach(System.out::println);
//3,排序
List<String>list3=Arrays.asList("az","fb","de");
Stream<String>stream7 = list3.stream().sorted();
// stream7.forEach(System.out::println);
Student s1 = new Student("aa",10);
Student s2 = new Student("bb",20);
Student s3 = new Student("aa",30);
Student s4 = new Student("dd",40);
List<Student>pojoList = Arrays.asList(s1,s2,s3,s4);
//自定义排序,先按姓名升序,姓名相同的按年龄升序
//jdk8新操作
pojoList.stream().sorted(
(o1,o2)->{
if(o1.getName().equals(o2.getName())){
return o1.getAge()-o2.getAge();
}else{
return o1.getName().compareTo(o2.getName());
}
});
//jdk7骚操作
Collections.sort(pojoList, new Comparator<Student>() {
@Override
public int compare(Student o1, Student o2) {
if(o1.getName().equals(o2.getName())){
return o1.getAge()-o2.getAge();
}else{
return o1.getName().compareTo(o2.getName());
}
}
});
//4,消费 peek
List<Student> studentList = Arrays.asList(s1,s2);
studentList.stream().peek(s->s.setAge(100));
//===================================流的终止操作=====================================
//1,匹配,聚合操作
}*/
}

@ -0,0 +1,41 @@
package com.daqing.financial.hrauth;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 记录部门信息
*
* @author gongsj
* @email gongsj@gmail.com
* @date 2020-09-07 17:12:14
*/
@Data
public class Student implements Serializable {
private static final long serialVersionUID = 1L;
public Student(String name, Integer age) {
this.name = name;
this.age = age;
}
/**
* 主键
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 部门名称
*/
@ApiModelProperty(value = "部门名称")
private String name;
/**
* 上级部门id
*/
private Integer age;
}

@ -127,7 +127,9 @@ public class PermissionController implements PermissionControllerApi {
String userId = RedisUtil.get("dq:token:" + token); String userId = RedisUtil.get("dq:token:" + token);
//获取当前用户拥有的角色ids //获取当前用户拥有的角色ids
String roleIds= RedisUtil.get("dq:userRole:" + userId); String roleIds= RedisUtil.get("dq:userRole:" + userId);
if(roleIds.equals(null) || roleIds.equals("")){
return ResponseResult.FAIL(40010,"无登录权限,请联系管理员处理!");
}
List list = permissionService.getPermission(roleIds); List list = permissionService.getPermission(roleIds);
return new ResponseResult<List<RolePermissionEntity>>().SUCCESS(list); return new ResponseResult<List<RolePermissionEntity>>().SUCCESS(list);
} }

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

@ -32,17 +32,17 @@ public class PromptSuccess {
public static final String UPLOAD_FILE_PATH = "//usr//local//nginx//html//admin//headImg//"; // linux图片存放路径 public static final String UPLOAD_FILE_PATH = "//usr//local//nginx//html//admin//headImg//"; // linux图片存放路径
public static final String IMAGE_URL_PATH = "http://www.huorantech.cn/headImg/"; // 数据库/预加载图片路径 public static final String IMAGE_URL_PATH = "https://www.huorantech.cn/headImg/"; // 数据库/预加载图片路径
//public static final String IMAGE_URL_PATH = "http://8.129.127.185:8080/headImg/"; // 数据库/预加载图片路径 //public static final String IMAGE_URL_PATH = "http://8.129.127.185/headImg/"; // 数据库/预加载图片路径
//public static final String IMAGE_URL_PATH = "http://47.107.237.129:8080/headImg/"; // 数据库/预加载图片路径 //public static final String IMAGE_URL_PATH = "http://47.107.237.129/headImg/"; // 数据库/预加载图片路径
public static final String[] LETTERS = {"A","B","C","D","E"}; // 员工姓名重复时自动加的字母,可再添加 public static final String[] LETTERS = {"A","B","C","D","E"}; // 员工姓名重复时自动加的字母,可再添加
public static final String STATUS_REFUSE = "拒绝"; public static final String STATUS_REFUSE = "拒绝";
public static final String ENCLOSUREFILE_URL_PATH = "http://www.huorantech.cn/enclosureFile/"; // 附件文件存放路径 public static final String ENCLOSUREFILE_URL_PATH = "https://www.huorantech.cn/enclosureFile/"; // 附件文件存放路径
//public static final String ENCLOSUREFILE_URL_PATH = "http://8.129.127.185:8080/enclosureFile/"; // 附件文件存放路径 //public static final String ENCLOSUREFILE_URL_PATH = "http://8.129.127.185/enclosureFile/"; // 附件文件存放路径
//public static final String ENCLOSUREFILE_URL_PATH = "http://47.107.237.129:8080/enclosureFile/"; // 附件文件存放路径 //public static final String ENCLOSUREFILE_URL_PATH = "http://47.107.237.129/enclosureFile/"; // 附件文件存放路径
public static final String FILE_URL_PATH = "//usr//local//nginx//html//admin//enclosureFile//"; // 附件文件存放路径 public static final String FILE_URL_PATH = "//usr//local//nginx//html//admin//enclosureFile//"; // 附件文件存放路径

@ -60,8 +60,8 @@ public class ResponseResult<T> {
return new ResponseResult<>(false, 99999, t, "操作失败,请检查客户名称是否已存在或者文件和数据格式是否正确!"); return new ResponseResult<>(false, 99999, t, "操作失败,请检查客户名称是否已存在或者文件和数据格式是否正确!");
} }
public ResponseResult SUCCESS_DATA(T t){ public ResponseResult SUCCESS_DATA(T t) {
return new ResponseResult<>(false,20000,t,"操作失败!"); return new ResponseResult<>(false, 20000, t, "操作失败!");
} }
public static ResponseResult FAIL() { public static ResponseResult FAIL() {

@ -3,6 +3,7 @@ package com.daqing.framework.domain.crms;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -58,6 +59,7 @@ public class CrmsCompanyPersonal implements Serializable {
* 注册时间 * 注册时间
*/ */
@ApiModelProperty(value = "注册时间") @ApiModelProperty(value = "注册时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date registeredTime; private Date registeredTime;
/** /**

@ -22,9 +22,6 @@ public class CustomerPersonalTOI implements Serializable {
/** /**
* 客户类型1企业类型0个人类型 * 客户类型1企业类型0个人类型
*/ */
@Min(value = 0,message = "客户类型格式有误")
@Max(value = 1,message = "客户类型格式有误")
@NotNull(message = "客户类型不能为空")
@ApiModelProperty(value = "客户类型") @ApiModelProperty(value = "客户类型")
private Integer type; private Integer type;
/** /**

@ -20,8 +20,9 @@ public enum CrmsCode implements ResultCode {
CUSTOMER_EXPORTTEMPLATE_EXSIT(false,20003,"导出excel模板失败,请稍后再试!"), CUSTOMER_EXPORTTEMPLATE_EXSIT(false,20003,"导出excel模板失败,请稍后再试!"),
NOT_NULL(false,20004,"上传的文件不能为空"), NOT_NULL(false,20004,"上传的文件不能为空"),
CUSTOMER_IS_NULL(false,20005,"导入数据失败,当前员工不存在!"), CUSTOMER_IS_NULL(false,20005,"导入数据失败,当前员工不存在!"),
CUSTOMER_NAME_REPETITION(false, 20006, "当前客户名称已存在!"); CUSTOMER_NAME_REPETITION(false, 20006, "当前客户名称已存在!"),
CUSTOMER_APPLET_IS_NULL(false, 20007,"未查询到你的信息,请先录入(认证)你的信息!"),
CUSTOMER_APPLET_EXIST(false, 20008,"你已认证自己的信息,无需再次认证!");
/** /**
* 操作是否成功 * 操作是否成功

@ -81,4 +81,6 @@ public class DgApplyAmountList implements Serializable {
@ApiModelProperty(value = "更新时间") @ApiModelProperty(value = "更新时间")
@TableField(fill = FieldFill.INSERT_UPDATE) @TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime; private Date updateTime;
private Integer ver;
} }

@ -0,0 +1,152 @@
package com.daqing.framework.domain.guarantee;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
* 业务关联企业表
* </p>
*
* @author Qyq
* @since 2021-01-27
*/
@TableName("dg_business_company")
@Data
public class DgBusinessCompany implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 业务id
*/
private Integer businessId;
/**
* 注册资金万元
*/
private String registeredCapital;
/**
* 社会统一代码
*/
private String socialUnifiedCode;
/**
* 员工人数
*/
private String empNum;
/**
* 联系人
*/
private String linkman;
/**
* 联系人的联系电话
*/
private String linkPhone;
/**
* 业务来源
*/
private String businessSource;
/**
* 经营范围
*/
private String businessScope;
/**
* 经营地址
*/
private String businessAddr;
/**
* 注册时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date registerTime;
/**
* 注册地址
*/
private String registerAddr;
/**
* 法人-身份证号
*/
private String legalIdNumber;
/**
* 法人-户口所在地
*/
private String legalHukouAddr;
/**
* 法人-联系电话
*/
private String legalPhone;
/**
* 法人-家庭住址
*/
private String legalHomeAddr;
/**
* 法人-性别 10
*/
private Integer legalGender;
/**
* 法人-姓名
*/
private String legalName;
/**
* 是否存在关联人 0->1->
*/
private Integer isExistRelated;
/**
* 客户编号
*/
private String code;
/**
* 客户类型1企业类型0个人类型
*/
private Integer type;
/**
* 客户名称
*/
private String name;
/**
* 联系地址(指个人的)
*/
private String addr;
/**
* 联系电话指个人或企业的
*/
private String phone;
/**
* 客户基本信息表id
*/
private Long customerId;
}

@ -1,79 +0,0 @@
package com.daqing.framework.domain.guarantee;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* <p>
* 合规调查记录
* </p>
*
* @author Qyq
* @since 2020-11-05
*/
@Data
@TableName("dg_compliance_assign_user")
public class DgComplianceAssignUser implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 企业id
*/
private Integer companyId;
/**
* 员工id
*/
private Integer empId;
/**
* 类型1第一审批人 2指派人AB角 3:第一审批人审核 3经理
*/
private Integer type;
/**
* 状态(1待指派 2审核中 3审核通过 4审核不通过 5驳回)
*/
private Integer status;
/**
* 审核金额
*/
private BigDecimal amount;
/**
* 期限
*/
private String term;
/**
* 补充调查原因
*/
private String remark;
/**
* 审核意见
*/
private String applyContent;
@ApiModelProperty(value = "创建时间")
@TableField(fill = FieldFill.INSERT)
private Date createTime;
@ApiModelProperty(value = "更新时间")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
}

@ -44,6 +44,11 @@ public class DgProcessManage implements Serializable {
*/ */
private String approvalName; private String approvalName;
/**
* 审批说明
*/
private String approvalInstructions;
/** /**
* 更新时间 * 更新时间
*/ */

@ -0,0 +1,33 @@
package com.daqing.framework.domain.hrms;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 记录部门信息
*
* @author gongsj
* @email gongsj@gmail.com
* @date 2020-09-07 17:12:14
*/
@Data
@TableName("hrms_dept")
public class Login implements Serializable {
private static final long serialVersionUID = 1L;
private String openid;
private String session_key;
private String unionid;
}

@ -15,7 +15,7 @@ import java.io.Serializable;
public class EmployeeVO implements Serializable{ public class EmployeeVO implements Serializable{
/** /**
* 员工id * 用户id
*/ */
@ApiModelProperty("id") @ApiModelProperty("id")
private Long id; private Long id;

@ -79,6 +79,8 @@ public enum HrmsCode implements ResultCode {
EMP_POSITION_EXSIT(false, 22006, "该职位下已关联员工!"), EMP_POSITION_EXSIT(false, 22006, "该职位下已关联员工!"),
ROLE_EMP_LINK(false,44003,"该角色关联业务管理模块,不能删除!"), ROLE_EMP_LINK(false,44003,"该角色关联业务管理模块,不能删除!"),
TOKEN_EXCEPTION(false,401,"TOKEN已过期,请重新登录!"),
EMP_SAME(false, 51001, "A,B角不能选同一个人!"), EMP_SAME(false, 51001, "A,B角不能选同一个人!"),
EMP_TO_BE_CHOOSE(false, 51002, "该用户已经被指派!"); EMP_TO_BE_CHOOSE(false, 51002, "该用户已经被指派!");

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

@ -28,7 +28,9 @@ jwt.ignoreUrlList=/apiHrmsAuth/hrms/auth/userlogin/getBackPwd,\
/api-hrms/hrms/user/uploadFile,\ /api-hrms/hrms/user/uploadFile,\
/apiHrmsAuth/hrms/auth/permission/getUserRoles,\ /apiHrmsAuth/hrms/auth/permission/getUserRoles,\
/api-hrms/hrms/permission/getPermission,\ /api-hrms/hrms/permission/getPermission,\
/api-guarantee/guarantee/efficiency/personalEfficiencyListExport /api-guarantee/guarantee/efficiency/personalEfficiencyListExport,\
/api-guarantee/dg-copy-user/exportCopyForMe,\
/apiHrmsAuth/hrms/auth/userlogin/wxAuthLogin

Loading…
Cancel
Save