Merge remote-tracking branch 'origin/master'

# Conflicts:
#	dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgComplianceInvestigation.java
master
shijie 4 years ago
commit 1e59fb711f
  1. 3
      dq-financial-api/src/main/java/com/daqing/financial/hrms/EmployeeControllerApi.java
  2. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java
  3. 62
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgComplianceInvestigationController.java
  4. 57
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgLoanCommitteeConsiderController.java
  5. 67
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgWorkConferenceConsiderController.java
  6. 6
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/feign/HrmsFeignService.java
  7. 39
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgComplianceInvestigationMapper.java
  8. 33
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgLoanCommitteeConsiderMapper.java
  9. 25
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgWorkConferenceConsiderMapper.java
  10. 6
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/DgComplianceInvestigationRequest.java
  11. 56
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/DgLoanCommitteeConsiderRequest.java
  12. 32
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/DgWorkConferenceConsiderRequest.java
  13. 64
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AuditOpinionResponse.java
  14. 40
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgComplianceInvestigationResponse.java
  15. 60
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgLoanCommitteeConsiderResponse.java
  16. 75
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgWorkConferenceResponse.java
  17. 11
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgComplianceInvestigationService.java
  18. 11
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgLoanCommitteeConsiderService.java
  19. 16
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgWorkConferenceConsiderService.java
  20. 306
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java
  21. 152
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanCommitteeConsiderServiceImpl.java
  22. 136
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgStatisticsServiceImpl.java
  23. 214
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java
  24. 148
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgComplianceInvestigationMapper.xml
  25. 134
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgLoanCommitteeConsiderMapper.xml
  26. 72
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgWorkConferenceConsiderMapper.xml
  27. 17
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/EmployeeController.java
  28. 14
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/EmployeeDao.java
  29. 2
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/DeptService.java
  30. 2
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/EmployeeService.java
  31. 33
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/DeptServiceImpl.java
  32. 15
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java
  33. 90
      dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml
  34. 3
      dq-framework-common/src/main/java/com/daqing/framework/model/response/CommonCode.java
  35. 34
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgComplianceInvestigation.java
  36. 2
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeAssignUser.java
  37. 10
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgLoanCommitteeConsider.java
  38. 24
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgWorkConferenceConsider.java
  39. 8
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/GuaranteeCode.java
  40. 64
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/AuditOpinionPO.java
  41. 73
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/DgWorkConferencePO.java

@ -68,4 +68,7 @@ public interface EmployeeControllerApi {
@ApiOperation(value = "查询所有员工id和姓名",notes = "查询所有员工id和姓名")
ResponseResult listEmployeeName();
@ApiOperation(value = "给用户赋予一个角色",notes = "给用户赋予一个角色")
ResponseResult saveUserRole(Long userId,Long roleId);
}

@ -2,7 +2,6 @@ package com.daqing.financial.guarantee.controller;
import com.daqing.financial.guarantee.service.IDgAuditProcessService;
import com.daqing.framework.domain.guarantee.DgAuditProcess;
import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -14,7 +13,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* <p>

@ -4,12 +4,17 @@ package com.daqing.financial.guarantee.controller;
import com.daqing.financial.guarantee.model.request.DgComplianceInvestigationRequest;
import com.daqing.financial.guarantee.model.response.DgComplianceInvestigationResponse;
import com.daqing.financial.guarantee.service.IDgComplianceInvestigationService;
import com.daqing.framework.domain.guarantee.DgComplianceInvestigation;
import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* <p>
* 合规调查 前端控制器
@ -20,7 +25,7 @@ import org.springframework.web.bind.annotation.*;
*/
@RestController
@RequestMapping("/compliance/investigation")
@Api(value = "合规调查",tags = "合规调查")
@Api(value = "合规调查", tags = "合规调查")
public class DgComplianceInvestigationController {
@Autowired
@ -30,20 +35,61 @@ public class DgComplianceInvestigationController {
* 列表
*/
@GetMapping("/list")
@ApiOperation(value = "合规调查列表",notes = "合规调查列表",response = DgComplianceInvestigationResponse.class)
@ApiOperation(value = "列表", notes = "列表", response = DgComplianceInvestigationResponse.class)
public ResponseResult list(@RequestParam("page") Integer page,
@RequestParam("size") Integer size, DgComplianceInvestigationRequest dgComplianceInvestigationRequest) {
return ResponseResult.SUCCESS(iDgComplianceInvestigationService.list(page,size,dgComplianceInvestigationRequest));
return ResponseResult.SUCCESS(iDgComplianceInvestigationService.list(page, size, dgComplianceInvestigationRequest));
}
/**
* 指派
*/
@GetMapping("/assign")
@ApiOperation(value = "指派", notes = "指派")
public ResponseResult assign(@RequestParam("iid") Integer iid, @RequestParam("userId") Integer userId) {
Boolean result = iDgComplianceInvestigationService.assign(iid, userId);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
/**
* 调查同意
* 调查
*/
@PostMapping("/survey")
@ApiOperation(value = "调查",notes = "调查")
public ResponseResult survey(@RequestParam("iid") Integer iid,@RequestParam("status") Integer status,
@RequestParam("fileUrl") String fileUrl, @RequestParam("auditOpinion") String auditOpinion) {
Boolean result = iDgComplianceInvestigationService.survey(iid, fileUrl, auditOpinion,status);
@ApiOperation(value = "调查", notes = "调查")
public ResponseResult survey(@RequestParam("iid") Integer iid, @RequestParam("status") Integer status,
@RequestParam("fileUrl") String fileUrl, @RequestParam("opinion") String opinion) {
Boolean result = iDgComplianceInvestigationService.survey(iid, fileUrl, opinion, status);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
/**
* 审核
*/
@ApiOperation(value = "审核", notes = "审核")
@PostMapping("/check")
public ResponseResult check(@RequestParam("iid") Integer iid, @RequestParam("opinion") String opinion,
@RequestParam("status") Integer status) {
Boolean result = iDgComplianceInvestigationService.check(iid, opinion, status);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
/**
* 查看
*/
@GetMapping("/query")
@ApiOperation(value = "查看", notes = "查看", response = DgComplianceInvestigation.class)
public ResponseResult query(@RequestParam("iid") Integer iid) {
return ResponseResult.SUCCESS(iDgComplianceInvestigationService.query(iid));
}
/**
* 导出
*/
@GetMapping("/excelExport")
@ApiOperation(value = "导出", notes = "导出")
public ResponseResult query(HttpServletResponse response, @RequestParam("ids") List<String> ids){
Boolean result = iDgComplianceInvestigationService.excelExport(response, ids);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
}

@ -1,9 +1,19 @@
package com.daqing.financial.guarantee.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.daqing.financial.guarantee.model.request.DgLoanCommitteeConsiderRequest;
import com.daqing.financial.guarantee.model.response.DgLoanCommitteeConsiderResponse;
import com.daqing.financial.guarantee.service.IDgLoanCommitteeConsiderService;
import com.daqing.financial.guarantee.service.IDgLoanNoticeService;
import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;
import java.util.List;
/**
* <p>
@ -14,7 +24,48 @@ import org.springframework.web.bind.annotation.RestController;
* @since 2020-11-05
*/
@RestController
@RequestMapping("/dg-loan-committee-consider")
@RequestMapping("/committee/consider")
@Api(value = "贷审会", tags = "贷审会")
public class DgLoanCommitteeConsiderController {
@Autowired
private IDgLoanCommitteeConsiderService dgLoanCommitteeConsiderService;
/**
* 列表
*/
@GetMapping("/list")
@ApiOperation(value = "列表", notes = "列表", response = DgLoanCommitteeConsiderResponse.class)
public ResponseResult list(@RequestParam("page") Integer page,
@RequestParam("size") Integer size, String codeOrName) {
return ResponseResult.SUCCESS(dgLoanCommitteeConsiderService.list(page, size, codeOrName));
}
/**
* 审议
*/
@PostMapping("/check")
@ApiOperation(value = "审议", notes = "审议")
public ResponseResult check(@RequestBody @Valid DgLoanCommitteeConsiderRequest dgLoanCommitteeConsiderRequest) {
Boolean result = dgLoanCommitteeConsiderService.check(dgLoanCommitteeConsiderRequest);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
/**
* 获取抽取的评委
*/
@GetMapping("/theJudgesDrawn")
@ApiOperation(value = "获取抽取的评委", notes = "获取抽取的评委")
public ResponseResult theJudgesDrawn(@RequestParam("id") Integer id) {
return ResponseResult.SUCCESS(dgLoanCommitteeConsiderService.getJudges(id));
}
/**
* 查看
*/
@GetMapping("/query")
@ApiModelProperty(value = "查看",notes = "查看")
public ResponseResult query(@RequestParam("id") Integer id) {
return ResponseResult.SUCCESS(dgLoanCommitteeConsiderService.query(id));
}
}

@ -1,9 +1,16 @@
package com.daqing.financial.guarantee.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.daqing.financial.guarantee.model.request.DgWorkConferenceConsiderRequest;
import com.daqing.financial.guarantee.service.IDgWorkConferenceConsiderService;
import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* <p>
@ -14,7 +21,61 @@ import org.springframework.web.bind.annotation.RestController;
* @since 2020-11-05
*/
@RestController
@RequestMapping("/dg-work-conference-consider")
@RequestMapping("/work/conference")
@Api(value = "工作会", tags = "工作会")
public class DgWorkConferenceConsiderController {
@Autowired
private IDgWorkConferenceConsiderService dgWorkConferenceConsiderService;
/**
* 列表
*/
@GetMapping("/list")
@ApiOperation(value = "列表", notes = "列表")
public ResponseResult list(@RequestParam("page") Integer page,
@RequestParam("size") Integer size, String codeOrName) {
return ResponseResult.SUCCESS(dgWorkConferenceConsiderService.list(page, size, codeOrName));
}
/**
* 审议
*/
@PostMapping("/check")
@ApiOperation(value = "审议", notes = "审议")
public ResponseResult check(@RequestBody DgWorkConferenceConsiderRequest dgWorkConferenceConsiderRequest) {
Boolean result = dgWorkConferenceConsiderService.check(dgWorkConferenceConsiderRequest.getId(),
dgWorkConferenceConsiderRequest.getOpinion(), dgWorkConferenceConsiderRequest.getStatus(),
dgWorkConferenceConsiderRequest.getEmpNames());
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
/**
* 评委抽取
*/
@PostMapping("/theJudgesDrawn")
@ApiOperation(value = "评委抽取", notes = "评委抽取")
public ResponseResult theJudgesDrawn(@RequestBody DgWorkConferenceConsiderRequest dgWorkConferenceConsiderRequest) {
Boolean result = dgWorkConferenceConsiderService.theJudgesDrawn(dgWorkConferenceConsiderRequest.getId(),
dgWorkConferenceConsiderRequest.getEmpNames());
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
/**
* 获取所有的审核意见审核人及时间
*/
@GetMapping("/getAuditOpinion")
@ApiOperation(value = "获取所有的审核意见、审核人及时间", notes = "获取所有的审核意见、审核人及时间")
public ResponseResult getAuditOpinion(@RequestParam("businessId") Integer businessId) {
return ResponseResult.SUCCESS(dgWorkConferenceConsiderService.getAuditOpinion(businessId));
}
/**
* 查看
*/
@GetMapping("/query")
@ApiOperation(value = "查看", notes = "查看")
public ResponseResult query(@RequestParam("id") Integer id) {
return ResponseResult.SUCCESS(dgWorkConferenceConsiderService.query(id));
}
}

@ -49,6 +49,12 @@ public interface HrmsFeignService {
@GetMapping("hrms/employee/insertUserRole")
ResponseResult insertUserRole(@RequestParam("userId") Long userId,@RequestParam("roleId")Long roleId);
/**
* 给用户赋予一个橘色
*/
@GetMapping("hrms/employee/saveUserRole")
ResponseResult saveUserRole(@RequestParam("userId") Long userId,@RequestParam("roleId")Long roleId);
@PostMapping("hrms/employee/insertUsrRole")
ResponseResult insertUsrRole(@RequestBody List<DgGuaranteePO> list);
}

@ -6,10 +6,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.daqing.financial.guarantee.model.request.DgComplianceInvestigationRequest;
import com.daqing.financial.guarantee.model.response.DgComplianceInvestigationResponse;
import com.daqing.framework.domain.guarantee.DgComplianceInvestigation;
import com.daqing.framework.domain.guarantee.DgWorkConferenceConsider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
/**
* <p>
@ -23,22 +25,41 @@ import java.util.Date;
public interface DgComplianceInvestigationMapper extends BaseMapper<DgComplianceInvestigation> {
IPage<DgComplianceInvestigationResponse> list(Page page, @Param("cr") DgComplianceInvestigationRequest dgComplianceInvestigationRequest,
@Param("roleId") Integer roleId);
@Param("roleIds") List<Integer> roleIds, @Param("userId") Integer userId);
IPage<DgComplianceInvestigationResponse> listByUserId(Page page, @Param("cr") DgComplianceInvestigationRequest dgComplianceInvestigationRequest,
@Param("userId") Integer userId,@Param("roleId") Integer roleId);
List<DgComplianceInvestigationResponse> listExcel(@Param("roleIds") List<Integer> roleIds, @Param("userId") Integer userId,
@Param("ids") List<Integer> ids);
Boolean survey(@Param("iid") Integer iid, @Param("fileUrl") String fileUrl, @Param("surveyOpinion") String surveyOpinion,
@Param("date")Date date, @Param("userId") Integer userId, @Param("status") Integer status);
Boolean survey(@Param("iid") Integer iid, @Param("opinion") String opinion, @Param("date") Date date,
@Param("userId") Integer userId, @Param("operationStatus") Integer operationStatus,
@Param("auditStatus") Integer auditStatus, @Param("fileUrl") String fileUrl);
Boolean uploadAccessory(@Param("businessId") Integer businessId, @Param("fileUrl") String fileUrl);
Boolean updateToAudit(@Param("businessId") Integer businessId, @Param("operationStatus") Integer operationStatus,
@Param("roleId") Integer roleId);
DgComplianceInvestigation getComplianceInvestigation(Integer iid);
Boolean updateAssign(@Param("iid") Integer iid, @Param("userId") Integer userId);
Boolean updateAssign(@Param("iid") Integer iid, @Param("userId") Integer userId,
@Param("auditStatus") Integer auditStatus, @Param("operationStatus") Integer operationStatus);
Boolean assign(@Param("dci") DgComplianceInvestigation dgComplianceInvestigation);
Boolean insertManager(@Param("dci") DgComplianceInvestigation dgComplianceInvestigation);
Boolean check(@Param("iid") Integer iid, @Param("opinion") String opinion,
@Param("date") Date date, @Param("auditStatus") Integer auditStatus,
@Param("operationStatus") Integer operationStatus, @Param("userId") Integer userId);
Integer getOperationStatusByBusinessId(@Param("businessId") Integer businessId, @Param("roleId") Integer roleId);
DgComplianceInvestigation queryDgComplianceInvestigation(Integer iid);
Boolean insertWorkConferenceConsider(@Param("wcc") DgWorkConferenceConsider dgWorkConferenceConsider);
Boolean updateAuditStatusByBusinessId(@Param("businessId") Integer businessId, @Param("auditStatus") Integer auditStatus);
Boolean updateOperationStatusById(@Param("id") Integer id, @Param("operationStatus") Integer operationStatus,
@Param("opinion") String opinion);
Boolean check(@Param("iid") Integer iid,@Param("auditOpinion") String auditOpinion,
@Param("date") Date date,@Param("status") Integer status);
Boolean updateBusinessStatusByBusinessId(@Param("businessId") Integer businessId, @Param("businessStatus") Integer businessStatus);
}

@ -1,8 +1,18 @@
package com.daqing.financial.guarantee.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.daqing.financial.guarantee.model.request.DgLoanCommitteeConsiderRequest;
import com.daqing.financial.guarantee.model.response.AuditOpinionResponse;
import com.daqing.financial.guarantee.model.response.DgLoanCommitteeConsiderResponse;
import com.daqing.framework.domain.guarantee.DgLoanCommitteeConsider;
import com.daqing.framework.domain.guarantee.po.AuditOpinionPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
/**
* <p>
@ -15,4 +25,27 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface DgLoanCommitteeConsiderMapper extends BaseMapper<DgLoanCommitteeConsider> {
IPage<DgLoanCommitteeConsiderResponse> list(Page page, @Param("codeOrName") String codeOrName, @Param("roleId") List<Integer> roleId,
@Param("userId") Integer userId);
List<DgLoanCommitteeConsiderResponse> excelList(@Param("roleId") List<Integer> roleId, @Param("userId") Integer userId,
@Param("ids") List<Integer> ids);
Boolean check(@Param("lr") DgLoanCommitteeConsiderRequest dgLoanCommitteeConsiderRequest, @Param("userId") Integer userId,
@Param("status") Integer status, @Param("operatingStatus") Integer operatingStatus, @Param("date") Date date);
Boolean TheJudgesDrawn(@Param("businessId") Integer businessId, @Param("agreePerson") String agreePerson);
String getJudges(Integer id);
AuditOpinionPO getAuditOpinion(Integer businessId);
DgLoanCommitteeConsider query(Integer id);
DgLoanCommitteeConsider getDgLoanCommitteeConsider(Integer id);
Boolean updateAuditStatusByBusinessId(@Param("businessId") Integer businessId, @Param("status") Integer status);
Boolean updateOperationStatusById(@Param("id") Integer id, @Param("operatingStatus") Integer operatingStatus,
@Param("refuseOpinion") String opinion);
}

@ -1,8 +1,16 @@
package com.daqing.financial.guarantee.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.daqing.framework.domain.guarantee.DgLoanCommitteeConsider;
import com.daqing.framework.domain.guarantee.DgWorkConferenceConsider;
import com.daqing.framework.domain.guarantee.po.DgWorkConferencePO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
/**
* <p>
@ -15,4 +23,21 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface DgWorkConferenceConsiderMapper extends BaseMapper<DgWorkConferenceConsider> {
IPage<DgWorkConferencePO> list(Page page, @Param("codeOrName") String codeOrName, @Param("roleIds") List<Integer> roleIds,
@Param("userId") Integer userId);
Boolean check(@Param("id") Integer id, @Param("userId") Integer userId, @Param("opinion") String opinion,
@Param("auditStatus") Integer auditStatus, @Param("operationStatus") Integer operationStatus,
@Param("date") Date date, @Param("joinJudge") String joinJudge);
DgWorkConferenceConsider getWorkConferenceConsider(Integer id);
Boolean insertLoanCommitteeConsider(@Param("lcc") DgLoanCommitteeConsider dgLoanCommitteeConsider);
DgWorkConferenceConsider query(Integer id);
Boolean updateAuditStatusByBusinessId(@Param("businessId") Integer businessId, @Param("auditStatus") Integer auditStatus);
Boolean updateOperationStatusById(@Param("id") Integer id, @Param("operationStatus") Integer operationStatus,
@Param("opinion") String opinion);
}

@ -16,9 +16,9 @@ import java.io.Serializable;
@ToString
public class DgComplianceInvestigationRequest implements Serializable {
@ApiModelProperty("流程状态,0:驳回,1:审批中")
private Integer status;
@ApiModelProperty("业务编号或者客户名称")
private String codeOrName;
@ApiModelProperty("流程状态")
private String status;
}

@ -0,0 +1,56 @@
package com.daqing.financial.guarantee.model.request;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
/**
* 贷审会审议请求参数
*
* @auther River
* @date 2020/11/24 14:27
*/
@Data
@ToString
public class DgLoanCommitteeConsiderRequest implements Serializable {
@NotNull(message = "id不能为空")
@ApiModelProperty("id")
private Integer id;
@ApiModelProperty("议定事项")
private String agreedItems;
@ApiModelProperty("附加事项")
private String additionalItems;
@ApiModelProperty("贷款金额")
private Double loanMoney;
@ApiModelProperty("贷款期限")
private String loanTern;
@ApiModelProperty("同意")
private String agreePerson;
@ApiModelProperty("不同意")
private String disagreePerson;
@ApiModelProperty("附件")
private String fileUrl;
@ApiModelProperty("操作,1:通过,2:拒绝,3:驳回")
private Integer status;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiModelProperty("贷审会通过时间")
private Date passingTime;
@ApiModelProperty("拒绝/驳回意见")
private String refuseOpinion;
}

@ -0,0 +1,32 @@
package com.daqing.financial.guarantee.model.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.util.List;
/**
* 工作会评委抽取请求参数
*
* @auther River
* @date 2020/11/26 15:16
*/
@Data
@ToString
public class DgWorkConferenceConsiderRequest implements Serializable {
@ApiModelProperty("id")
private Integer id;
@ApiModelProperty("审核意见")
private String opinion;
@ApiModelProperty("操作,1:同意,2:拒绝,3:驳回")
private Integer status;
@ApiModelProperty("评委名称")
private List<String> empNames;
}

@ -0,0 +1,64 @@
package com.daqing.financial.guarantee.model.response;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.util.Date;
/**
* AB角合规调查等审核意见审核人时间
*
* @auther River
* @date 2020/11/25 16:01
*/
@Data
@ToString
public class AuditOpinionResponse implements Serializable {
@ApiModelProperty("担保A角调查意见")
private String aAuditOpinion;
@ApiModelProperty("A角姓名")
private String aName;
@ApiModelProperty("A角调查时间")
private Date aTime;
@ApiModelProperty("担保B角调查意见")
private String bAuditOpinion;
@ApiModelProperty("B角姓名")
private String bName;
@ApiModelProperty("B角调查时间")
private Date bTime;
@ApiModelProperty("资产审核意见")
private String assetAuditOpinion;
@ApiModelProperty("资产姓名")
private String assetName;
@ApiModelProperty("资产审核时间")
private Date assetTime;
@ApiModelProperty("信息审核意见")
private String messageAuditOpinion;
@ApiModelProperty("信息姓名")
private String messageName;
@ApiModelProperty("信息审核时间")
private Date messageTime;
@ApiModelProperty("法规审核意见")
private String regulationAuditOpinion;
@ApiModelProperty("法规姓名")
private String regulationName;
@ApiModelProperty("法规审核时间")
private Date regulationTime;
}

@ -1,9 +1,16 @@
package com.daqing.financial.guarantee.model.response;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel;
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 io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import org.springframework.beans.factory.annotation.Autowired;
import java.io.Serializable;
import java.util.Date;
@ -16,39 +23,58 @@ import java.util.Date;
*/
@Data
@ToString
public class DgComplianceInvestigationResponse implements Serializable {
public class DgComplianceInvestigationResponse extends BaseRowModel implements Serializable {
@ApiModelProperty("id")
private Integer id;
@ExcelIgnore
@ApiModelProperty("合规调查表id")
private Integer iId;
@ExcelProperty(value = "业务编号", index = 0)
@ApiModelProperty("业务编号")
private String businessCode;
@ExcelProperty(value = "客户名称", index = 1)
@ApiModelProperty("客户名称")
private String name;
@ExcelProperty(value = "联系电话", index = 2)
@ApiModelProperty("联系电话")
private String phone;
@ExcelProperty(value = "业务类别", index = 3)
@ApiModelProperty("业务类别")
private String businessType;
@ExcelProperty(value = "金额", index = 4)
@ApiModelProperty("金额")
private Double applyAmount;
@ExcelProperty(value = "期限", index = 5)
@ApiModelProperty("期限")
private String applyTime;
@ExcelProperty(value = "申请日期", index = 6)
@ApiModelProperty("申请日期")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date createTime;
@ApiModelProperty("状态,0:,1:,2:,3:,4:")
private Integer status;
@ExcelProperty(value = "操作状态", index = 7, converter = OperatingStatusConverter.class)
@ApiModelProperty("操作状态,0:已发起,1:待处理,2:已处理")
private Integer operationStatus;
@ApiModelProperty("合规调查表id")
private Integer iId;
@ExcelProperty(value = "审核状态", index = 8, converter = ApprovalStatusConverter.class)
@ApiModelProperty("审核状态,0:待指派,1:审核中,2:已审核,3:已拒绝,4:已驳回,5:草稿,6:已撤销")
private Integer auditStatus;
@ExcelProperty(value = "业务状态", index = 9, converter = BusinessStatusConverter.class)
@ApiModelProperty("业务状态,1->进行中;2->已完成;3->已否决")
private Integer businessStatus;
@ExcelIgnore
@ApiModelProperty("角色id")
private Integer roleId;
@ExcelIgnore
@ApiModelProperty("业务id")
private Integer businessId;
}

@ -0,0 +1,60 @@
package com.daqing.financial.guarantee.model.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.util.Date;
/**
* 贷审会响应类
*
* @auther River
* @date 2020/11/24 10:22
*/
@Data
@ToString
public class DgLoanCommitteeConsiderResponse implements Serializable {
@ApiModelProperty("贷审会表id")
private Integer id;
@ApiModelProperty("业务编号")
private String businessCode;
@ApiModelProperty("客户名称")
private String name;
@ApiModelProperty("联系电话")
private String phone;
@ApiModelProperty("业务类别")
private String businessType;
@ApiModelProperty("金额")
private Double applyAmount;
@ApiModelProperty("期限")
private String applyTime;
@ApiModelProperty("申请日期")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date createTime;
@ApiModelProperty("操作状态,0:已发起,1:待处理,2:已处理")
private Integer operatingStatus;
@ApiModelProperty("审核状态,0:待指派,1:审核中,2:已审核,3:已拒绝,4:已驳回,5:草稿,6:已撤销")
private Integer status;
@ApiModelProperty("业务状态,1->进行中;2->已完成;3->已否决")
private Integer businessStatus;
@ApiModelProperty("角色id")
private Integer roleId;
@ApiModelProperty("业务id")
private Integer businessId;
}

@ -0,0 +1,75 @@
package com.daqing.financial.guarantee.model.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.util.Date;
/**
* 工作会列表响应类
*
* @auther River
* @date 2020/11/23 14:50
*/
@ToString
@Data
public class DgWorkConferenceResponse implements Serializable {
@ApiModelProperty("工作会表id")
private Integer id;
@ApiModelProperty("业务编号")
private String businessCode;
@ApiModelProperty("客户名称")
private String name;
@ApiModelProperty("联系电话")
private String phone;
@ApiModelProperty("业务类别")
private String businessType;
@ApiModelProperty("金额")
private Double applyAmount;
@ApiModelProperty("期限")
private String applyTime;
@ApiModelProperty("申请日期")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date createTime;
@ApiModelProperty("A角")
private String aRoleName;
@ApiModelProperty("B角")
private String bRoleName;
@ApiModelProperty("法规监督部")
private String regulationName;
@ApiModelProperty("资产管理部")
private String assetName;
@ApiModelProperty("信息服务部")
private String messageName;
@ApiModelProperty("操作状态,0:已发起,1:待处理,2:已处理")
private Integer operationStatus;
@ApiModelProperty("审核状态,0:待指派,1:审核中,2:已审核,3:已拒绝,4:已驳回,5:草稿,6:已撤销")
private Integer auditStatus;
@ApiModelProperty("业务状态,1->进行中;2->已完成;3->已否决")
private Integer businessStatus;
@ApiModelProperty("角色id")
private Integer roleId;
@ApiModelProperty("业务id")
private Integer businessId;
}

@ -5,6 +5,9 @@ import com.daqing.financial.guarantee.model.request.DgComplianceInvestigationReq
import com.daqing.framework.domain.guarantee.DgComplianceInvestigation;
import com.daqing.framework.utils.PageUtils;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* <p>
* 合规调查 服务类
@ -19,7 +22,11 @@ public interface IDgComplianceInvestigationService extends IService<DgCompliance
Boolean assign(Integer iid,Integer userId);
Boolean survey(Integer iid, String fileUrl, String surveyOpinion,Integer status);
Boolean survey(Integer iid, String fileUrl, String opinion,Integer status);
Boolean check(Integer iid,String opinion,Integer status);
DgComplianceInvestigation query(Integer iid);
Boolean check(Integer iid,String auditOpinion,Integer status);
Boolean excelExport(HttpServletResponse response, List<String> ids);
}

@ -1,7 +1,11 @@
package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.financial.guarantee.model.request.DgLoanCommitteeConsiderRequest;
import com.daqing.framework.domain.guarantee.DgLoanCommitteeConsider;
import com.daqing.framework.utils.PageUtils;
import java.util.List;
/**
* <p>
@ -13,4 +17,11 @@ import com.daqing.framework.domain.guarantee.DgLoanCommitteeConsider;
*/
public interface IDgLoanCommitteeConsiderService extends IService<DgLoanCommitteeConsider> {
PageUtils list(Integer page, Integer size, String codeOrName);
Boolean check(DgLoanCommitteeConsiderRequest dgLoanCommitteeConsiderRequest);
List<String> getJudges(Integer id);
DgLoanCommitteeConsider query(Integer id);
}

@ -1,7 +1,12 @@
package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.financial.guarantee.model.response.AuditOpinionResponse;
import com.daqing.framework.domain.guarantee.DgWorkConferenceConsider;
import com.daqing.framework.utils.PageUtils;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* <p>
@ -13,4 +18,15 @@ import com.daqing.framework.domain.guarantee.DgWorkConferenceConsider;
*/
public interface IDgWorkConferenceConsiderService extends IService<DgWorkConferenceConsider> {
PageUtils list(Integer page, Integer size, String codeOrName);
Boolean check(Integer id, String opinion, Integer status, List<String> empNames);
Boolean theJudgesDrawn(Integer id, List<String> empNames);
AuditOpinionResponse getAuditOpinion(Integer businessId);
DgWorkConferenceConsider query(Integer id);
Boolean excelExport(HttpServletResponse response, List<String> ids);
}

@ -2,27 +2,37 @@ package com.daqing.financial.guarantee.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.daqing.financial.guarantee.feign.HrmsFeignService;
import com.daqing.financial.guarantee.mapper.DgComplianceInvestigationMapper;
import com.daqing.financial.guarantee.model.request.DgComplianceInvestigationRequest;
import com.daqing.financial.guarantee.model.response.DgComplianceInvestigationResponse;
import com.daqing.financial.guarantee.service.IDgComplianceInvestigationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.util.AuditProcessUtil;
import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.domain.guarantee.DgComplianceInvestigation;
import com.daqing.framework.domain.guarantee.DgWorkConferenceConsider;
import com.daqing.framework.domain.guarantee.GuaranteeCode;
import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.CommonCode;
import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.excel.ExcelUtil;
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.servlet.http.HttpServletRequest;
import java.util.Arrays;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/**
* <p>
@ -36,38 +46,33 @@ import java.util.List;
public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplianceInvestigationMapper, DgComplianceInvestigation>
implements IDgComplianceInvestigationService {
@Autowired
private HrmsFeignService hrmsFeignService;
/**
* 列表
*/
@Override
public PageUtils list(Integer page, Integer size, DgComplianceInvestigationRequest dgComplianceInvestigationRequest) {
if (page == null || size == null){
if (page == null || size == null) {
page = 1;
size = 10;
}
String userId = this.getUserId();
/*String userId = this.getUserId();
// 获取当前登录用户的角色id
String roleIdString = RedisUtil.get("dq:userRole:" + userId);
if (roleIdString == null || roleIdString.length() == 0){
if (roleIdString == null || roleIdString.length() == 0) {
ExceptionCast.cast(GuaranteeCode.ROLE_IS_NOT);
}
String[] roleIds = roleIdString.split(",");
IPage<DgComplianceInvestigationResponse> list = new Page<>();
String[] roleIds = roleIdString.split(",");*/
String userId = "1";
String[] roleIds = {"70"};
List<Integer> roleList = new ArrayList<>();
for (String roleId : roleIds) {
if (Integer.parseInt(roleId) == PromptSuccess.FG_JL_ID || Integer.parseInt(roleId) == PromptSuccess.FG_LD_ID){
// 当前角色都能看到的数据
list = this.getBaseMapper().list(new Page(page, size), dgComplianceInvestigationRequest, Integer.parseInt(roleId));
// 当前角色和用户同时满足才能看到的数据
IPage<DgComplianceInvestigationResponse> listByUserId = this.getBaseMapper().listByUserId(new Page(page, size), dgComplianceInvestigationRequest, Integer.parseInt(userId), Integer.parseInt(roleId));
list.getRecords().addAll(listByUserId.getRecords());
list.setTotal(list.getRecords().size());
list.setSize(list.getTotal() % size == 0 ? list.getTotal() / size : list.getTotal() / size + 1 );
break;
}else if (Integer.parseInt(roleId) == PromptSuccess.FG_C_ID){
list = this.getBaseMapper().listByUserId(new Page(page, size), dgComplianceInvestigationRequest, Integer.parseInt(userId), Integer.parseInt(roleId));
break;
}
roleList.add(Integer.parseInt(roleId));
}
IPage<DgComplianceInvestigationResponse> list = this.getBaseMapper().list(new Page(page, size),
dgComplianceInvestigationRequest, roleList, Integer.parseInt(userId));
return new PageUtils(list);
}
@ -77,17 +82,35 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
@Transactional
@Override
public Boolean assign(Integer iid, Integer userId) {
if (iid == null) {
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
if (userId == null) {
ExceptionCast.cast(GuaranteeCode.COMPLIANCE_USER_NOT_NULL);
}
// 指派
DgComplianceInvestigation complianceInvestigation = this.getComplianceInvestigation(iid);
complianceInvestigation.setEmpId(userId);
complianceInvestigation.setUserId(userId);
complianceInvestigation.setRoleId(PromptSuccess.FG_C_ID);
complianceInvestigation.setOperationStatus(StatusCode.CZ_ON_HAND);
complianceInvestigation.setAuditStatus(StatusCode.SP_IN_REVIEW);
complianceInvestigation.setCreateTime(new Date());
complianceInvestigation.setUpdateTime(new Date());
complianceInvestigation.setStatus(0);
complianceInvestigation.setRoleId(PromptSuccess.FG_C_ID);
Boolean result = this.getBaseMapper().assign(complianceInvestigation);
if (result){
// 绑定该条数据的指派操作人;在审核进程表中插入一条指派数据;在角色表中插入一条数据,与当前被指派的员工(用户)关联
String id = this.getUserId();
this.getBaseMapper().updateAssign(iid, Integer.parseInt(id));
if (result) {
// 绑定该条数据的指派操作人(表示指派完成);
// String id = this.getUserId();
String id = "1";
Boolean result1 = this.getBaseMapper().updateAssign(iid, Integer.parseInt(id), StatusCode.SP_IN_REVIEW, StatusCode.CZ_PROCESSED);
if (result1) {
// 在角色表中插入一条数据,与当前被指派的员工(用户)关联
ResponseResult responseResult = hrmsFeignService.saveUserRole(userId.longValue(), PromptSuccess.FG_C_ID.longValue());
Boolean result2 = (Boolean) responseResult.getData();
if (result2) {
// 在审核进程表中插入一条指派成功的数据
return true;
}
}
}
return false;
}
@ -95,52 +118,41 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
/**
* 调查
*/
@Transactional
@Override
public Boolean survey(Integer iid, String fileUrl, String surveyOpinion, Integer status) {
if (iid == null || status == null){
public Boolean survey(Integer iid, String fileUrl, String opinion, Integer status) {
if (iid == null || status == null) {
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
String userId = this.getUserId();
//String userId = this.getUserId();
String userId = "1";
// 同意
if (status == 1){
if (fileUrl == null || fileUrl.length() == 0){
if (status == 1) {
if (fileUrl == null || fileUrl.length() == 0) {
ExceptionCast.cast(GuaranteeCode.COMPLIANCE_UPLOAD_NOT_NULL);
}
Boolean result = this.getBaseMapper().survey(iid, fileUrl, surveyOpinion, new Date(), Integer.parseInt(userId), status);
// 在审核进程中插入一条调查成功数据;在合规调查表中插入一条审核数据
if (result){
DgComplianceInvestigation complianceInvestigation = this.getBaseMapper().getComplianceInvestigation(iid);
complianceInvestigation.setRoleId(PromptSuccess.FG_JL_ID);
complianceInvestigation.setStatus(0);
complianceInvestigation.setCreateTime(new Date());
complianceInvestigation.setUpdateTime(new Date());
complianceInvestigation.setFile(fileUrl);
complianceInvestigation.setSurveyOpinion(surveyOpinion);
return this.getBaseMapper().insertManager(complianceInvestigation);
}
return false;
}
// 拒绝
if (status == 2){
if (surveyOpinion == null || surveyOpinion.length() == 0){
ExceptionCast.cast(GuaranteeCode.COMPLIANCE_INVESTIGATION_REMARK_NOT_NULL);
}
Boolean result = this.getBaseMapper().survey(iid, null, surveyOpinion, new Date(), Integer.parseInt(userId), status);
if (result){
// 在审核进程表中插入一条拒绝数据,流程结束
// 更新合规调查表调查数据,表示调查完成
Boolean result = this.getBaseMapper().survey(iid, opinion, new Date(), Integer.parseInt(userId),
StatusCode.CZ_PROCESSED, StatusCode.SP_IN_REVIEW, fileUrl);
// 上传附件到附件表里
if (result) {
Boolean result1 = this.getBaseMapper().uploadAccessory(this.getComplianceInvestigation(iid).getBusinessId(), fileUrl);
// 更新合规调查表里面的审核数据
if (result1) {
Boolean result2 = this.getBaseMapper().updateToAudit(this.getComplianceInvestigation(iid).getBusinessId(),
StatusCode.CZ_ON_HAND, PromptSuccess.FG_JL_ID);
// 在业务流程表中插入一条调查成功的数据
if (result2) {
return true;
}
}
}
return false;
}
// 驳回
if (status == 3){
if (surveyOpinion == null || surveyOpinion.length() == 0){
if (status == 2) {
if (opinion == null || opinion.length() == 0) {
ExceptionCast.cast(GuaranteeCode.COMPLIANCE_INVESTIGATION_REMARK_NOT_NULL);
}
Boolean result = this.getBaseMapper().survey(iid, null, surveyOpinion, new Date(), Integer.parseInt(userId), status);
if (result){
// 在审核进程表中插入一条驳回数据;修改担保部调查表中AB角的数据状态为驳回
}
return false;
}
return false;
}
@ -148,48 +160,180 @@ public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplian
/**
* 审核
*/
@Transactional
@Override
public Boolean check(Integer iid, String auditOpinion, Integer status) {
if (iid == null || status == null){
public Boolean check(Integer iid, String opinion, Integer status) {
if (iid == null || status == null) {
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
String userId = this.getUserId();
String roleIdString = RedisUtil.get("dq:userRole:" + userId);
if (roleIdString == null || roleIdString.length() == 0){
ExceptionCast.cast(GuaranteeCode.ROLE_IS_NOT);
// String userId = this.getUserId();
String userId = "1";
Integer operationStatus = this.getBaseMapper().getOperationStatusByBusinessId(
this.getComplianceInvestigation(iid).getBusinessId(), PromptSuccess.FG_JL_ID);
// 待处理,表示业务进行到法规经理审核
if (Objects.equals(operationStatus, StatusCode.CZ_ON_HAND)) {
// 同意
if (status == 1) {
Boolean result = this.getBaseMapper().check(iid, opinion, new Date(),
StatusCode.SP_IN_REVIEW, StatusCode.CZ_PROCESSED, Integer.parseInt(userId));
if (result) {
// 法规经理完成审核,新增一条法规领导审核数据(借用插入一条调查数据的接口)
DgComplianceInvestigation complianceInvestigation = this.getComplianceInvestigation(iid);
complianceInvestigation.setUserId(null);
complianceInvestigation.setRoleId(PromptSuccess.FG_LD_ID);
complianceInvestigation.setOperationStatus(StatusCode.CZ_ON_HAND);
complianceInvestigation.setAuditStatus(StatusCode.SP_IN_REVIEW);
complianceInvestigation.setCreateTime(new Date());
complianceInvestigation.setUpdateTime(new Date());
Boolean result1 = this.getBaseMapper().assign(complianceInvestigation);
if (result1) {
// 在业务流程表中插入一条法规经理审核成功的数据
return true;
}
}
}
// 驳回
if (status == 2) {
}
// 拒绝
if (status == 3) {
if (opinion == null || opinion.length() == 0) {
ExceptionCast.cast(GuaranteeCode.COMPLIANCE_INVESTIGATION_REMARK_NOT_NULL);
}
// 先改变所有的审核状态为已拒绝
Boolean result = this.getBaseMapper().updateAuditStatusByBusinessId(this.getComplianceInvestigation(iid).getBusinessId(),
StatusCode.SP_REFUSE);
if (result) {
// 再改变自己当前的操作状态为已处理
Boolean result1 = this.getBaseMapper().updateOperationStatusById(iid, StatusCode.CZ_PROCESSED, opinion);
if (result1) {
// 最后改变该条贷款信息的业务状态为已否决
Boolean result2 = this.getBaseMapper().updateBusinessStatusByBusinessId(
this.getComplianceInvestigation(iid).getBusinessId(), StatusCode.YW_REJECTED);
if (result2) {
// 在业务流程表中插入一条拒绝数据(记得带上拒绝意见)
return true;
}
}
}
}
}
String[] roleIds = roleIdString.split(",");
for (String roleId : roleIds) {
if (Integer.parseInt(roleId) == PromptSuccess.FG_JL_ID){
// 法规经理审核
if (status == 1){
// 同意
Boolean result = this.getBaseMapper().check(iid, auditOpinion, new Date(), status);
if (result){
// 已处理,表示业务进行到法规领导审核
if (Objects.equals(operationStatus, StatusCode.CZ_PROCESSED)) {
// 同意
if (status == 1) {
Boolean result = this.getBaseMapper().check(iid, opinion, new Date(), StatusCode.SP_REVIEWED,
StatusCode.CZ_PROCESSED, Integer.parseInt(userId));
if (result) {
// 在工作会表中插入一条数据;
DgComplianceInvestigation complianceInvestigation = this.getComplianceInvestigation(iid);
DgWorkConferenceConsider workConferenceConsider = new DgWorkConferenceConsider();
workConferenceConsider.setCompanyId(complianceInvestigation.getCompanyId());
workConferenceConsider.setBusinessId(complianceInvestigation.getBusinessId());
workConferenceConsider.setRoleId(PromptSuccess.GZU_ID);
workConferenceConsider.setAuditStatus(StatusCode.SP_IN_REVIEW);
workConferenceConsider.setOperationStatus(StatusCode.CZ_ON_HAND);
workConferenceConsider.setCreateTime(new Date());
workConferenceConsider.setUpdateTime(new Date());
Boolean result1 = this.getBaseMapper().insertWorkConferenceConsider(workConferenceConsider);
if (result1) {
// 在业务流程表中插入一条法规领导审核成功的数据
return true;
}
}
}
// 驳回
if (status == 2) {
}
// 拒绝
if (status == 3) {
if (opinion == null || opinion.length() == 0) {
ExceptionCast.cast(GuaranteeCode.COMPLIANCE_INVESTIGATION_REMARK_NOT_NULL);
}
// 先改变所有的审核状态为已拒绝
Boolean result = this.getBaseMapper().updateAuditStatusByBusinessId(this.getComplianceInvestigation(iid).getBusinessId(),
StatusCode.SP_REFUSE);
if (result) {
// 再改变自己当前的操作状态为已处理
Boolean result1 = this.getBaseMapper().updateOperationStatusById(iid, StatusCode.CZ_PROCESSED, opinion);
if (result1) {
// 最后改变该条贷款信息的业务状态为已否决
Boolean result2 = this.getBaseMapper().updateBusinessStatusByBusinessId(
this.getComplianceInvestigation(iid).getBusinessId(), StatusCode.YW_REJECTED);
if (result2) {
// 在业务流程表中插入一条拒绝数据(记得带上拒绝意见)
return true;
}
}
}
}else if (Integer.parseInt(roleId) == PromptSuccess.FG_LD_ID){
// 法规领导审核
}
}
return null;
return false;
}
/**
* 查看
*/
@Override
public DgComplianceInvestigation query(Integer iid) {
return this.getBaseMapper().queryDgComplianceInvestigation(iid);
}
/**
* 导出
*/
@Override
public Boolean excelExport(HttpServletResponse response, List<String> ids) {
if (ids == null || ids.size() == 0) {
ExceptionCast.cast(GuaranteeCode.EXCEL_ID_NOT_NULL);
}
/*String userId = this.getUserId();
// 获取当前登录用户的角色id
String roleIdString = RedisUtil.get("dq:userRole:" + userId);
if (roleIdString == null || roleIdString.length() == 0) {
ExceptionCast.cast(GuaranteeCode.ROLE_IS_NOT);
}
String[] roleIds = roleIdString.split(",");*/
String userId = "1";
String[] roleIds = {"70"};
List<Integer> roleList = new ArrayList<>();
for (String roleId : roleIds) {
roleList.add(Integer.parseInt(roleId));
}
List<Integer> idList = new ArrayList<>();
for (String id : ids) {
idList.add(Integer.parseInt(id));
}
List<DgComplianceInvestigationResponse> list = this.getBaseMapper().listExcel(roleList, Integer.parseInt(userId), idList);
try {
ExcelUtil.writeExcelWithSheets(response, list, "合规调查数据一览表", "complianceInvestigation",
new DgComplianceInvestigationResponse());
} catch (Exception e) {
ExceptionCast.cast(CrmsCode.CUSTOMER_EXPORT_EXSIT);
}
return false;
}
/**
* 获取当前登录用户信息
*/
private String getUserId(){
private String getUserId() {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String token = request.getHeader("token");
return RedisUtil.get("dq:token:"+token);
String userId = RedisUtil.get("dq:token:" + token);
if (userId == null || userId.length() == 0) {
ExceptionCast.cast(CommonCode.GET_LOGIN_USER_FAIL);
}
return userId;
}
/**
* 获取基本信息
*/
private DgComplianceInvestigation getComplianceInvestigation(Integer iid){
private DgComplianceInvestigation getComplianceInvestigation(Integer iid) {
return this.getBaseMapper().getComplianceInvestigation(iid);
}

@ -1,10 +1,31 @@
package com.daqing.financial.guarantee.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.daqing.financial.guarantee.mapper.DgComplianceInvestigationMapper;
import com.daqing.financial.guarantee.mapper.DgLoanCommitteeConsiderMapper;
import com.daqing.financial.guarantee.model.request.DgLoanCommitteeConsiderRequest;
import com.daqing.financial.guarantee.model.response.DgLoanCommitteeConsiderResponse;
import com.daqing.financial.guarantee.service.IDgLoanCommitteeConsiderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.framework.domain.guarantee.DgLoanCommitteeConsider;
import com.daqing.framework.domain.guarantee.GuaranteeCode;
import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.CommonCode;
import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.utils.PageUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
/**
* <p>
@ -15,6 +36,135 @@ import org.springframework.stereotype.Service;
* @since 2020-11-05
*/
@Service
public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommitteeConsiderMapper, DgLoanCommitteeConsider> implements IDgLoanCommitteeConsiderService {
public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl<DgLoanCommitteeConsiderMapper, DgLoanCommitteeConsider>
implements IDgLoanCommitteeConsiderService {
@Autowired
private DgComplianceInvestigationMapper dgComplianceInvestigationMapper;
/**
* 列表
*/
@Override
public PageUtils list(Integer page, Integer size, String codeOrName) {
if (page == null || size == null) {
page = 1;
size = 10;
}
/*String userId = this.getUserId();
// 获取当前登录用户的角色id
String roleIdString = RedisUtil.get("dq:userRole:" + userId);
if (roleIdString == null || roleIdString.length() == 0) {
ExceptionCast.cast(GuaranteeCode.ROLE_IS_NOT);
}
String[] roleIds = roleIdString.split(",");*/
String userId = "1";
String[] roleIds = {"72"};
List<Integer> roleList = new ArrayList<>();
for (String roleId : roleIds) {
roleList.add(Integer.parseInt(roleId));
}
IPage<DgLoanCommitteeConsiderResponse> list = this.getBaseMapper().list(new Page(page, size),
codeOrName, roleList, Integer.parseInt(userId));
return new PageUtils(list);
}
/**
* 审议
*/
@Override
public Boolean check(DgLoanCommitteeConsiderRequest dgLoanCommitteeConsiderRequest) {
if (dgLoanCommitteeConsiderRequest == null || dgLoanCommitteeConsiderRequest.getId() == null
|| dgLoanCommitteeConsiderRequest.getStatus() == null) {
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
String userId = this.getUserId();
// 同意
if (dgLoanCommitteeConsiderRequest.getStatus() == 1) {
if (dgLoanCommitteeConsiderRequest.getAdditionalItems() == null || dgLoanCommitteeConsiderRequest.getAdditionalItems().length() == 0
|| dgLoanCommitteeConsiderRequest.getAgreedItems() == null || dgLoanCommitteeConsiderRequest.getAgreedItems().length() == 0
|| dgLoanCommitteeConsiderRequest.getLoanMoney() == null || dgLoanCommitteeConsiderRequest.getLoanTern() == null
|| dgLoanCommitteeConsiderRequest.getLoanTern().length() == 0 || dgLoanCommitteeConsiderRequest.getFileUrl() == null
|| dgLoanCommitteeConsiderRequest.getFileUrl().length() == 0) {
ExceptionCast.cast(GuaranteeCode.LOAN_MESSAGE_NOT_NULL);
}
Boolean result = this.getBaseMapper().check(dgLoanCommitteeConsiderRequest, Integer.getInteger(userId), StatusCode.SP_REVIEWED, StatusCode.CZ_PROCESSED, new Date());
if (result) {
// 在业务流程表中插入一条审议成功的数据;在担保函表中插入条数据
return true;
}
}
// 拒绝
if (dgLoanCommitteeConsiderRequest.getStatus() == 2) {
if (dgLoanCommitteeConsiderRequest.getRefuseOpinion() == null
|| dgLoanCommitteeConsiderRequest.getRefuseOpinion().length() == 0 ) {
ExceptionCast.cast(GuaranteeCode.COMPLIANCE_INVESTIGATION_REMARK_NOT_NULL);
}
// 先改变所有的审核状态为已拒绝
Boolean result = this.getBaseMapper().updateAuditStatusByBusinessId(
this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()).getBusinessId(),
StatusCode.SP_REFUSE);
if (result) {
// 再改变自己当前的操作状态为已处理
Boolean result1 = this.getBaseMapper().updateOperationStatusById(dgLoanCommitteeConsiderRequest.getId(),
StatusCode.CZ_PROCESSED, dgLoanCommitteeConsiderRequest.getRefuseOpinion());
if (result1) {
// 最后改变该条贷款信息的业务状态为已否决
Boolean result2 = dgComplianceInvestigationMapper.updateBusinessStatusByBusinessId(
this.getBaseMapper().getDgLoanCommitteeConsider(dgLoanCommitteeConsiderRequest.getId()).getBusinessId(),
StatusCode.YW_REJECTED);
if (result2){
// 在业务流程表中插入一条拒绝数据(记得带上拒绝意见)
return true;
}
}
}
}
// 驳回
if (dgLoanCommitteeConsiderRequest.getStatus() == 3) {
}
return false;
}
/**
* 获取工作会抽取的评委名单
*/
@Override
public List<String> getJudges(Integer id) {
if (id == null) {
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
List<String> list = new ArrayList<>();
String judges = this.getBaseMapper().getJudges(id);
if (judges != null && judges.length() != 0) {
String[] judge = judges.split(",");
list.addAll(Arrays.asList(judge));
}
return list;
}
/**
* 查看
*/
@Override
public DgLoanCommitteeConsider query(Integer id) {
if (id == null) {
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
return this.getBaseMapper().query(id);
}
/**
* 获取当前登录用户信息
*/
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);
}
return userId;
}
}

@ -46,41 +46,41 @@ public class DgStatisticsServiceImpl extends ServiceImpl<DgStatisticsMapper, DgA
*/
@Override
public PageUtils list(Integer page, Integer size, DgStatisticsRequest dgStatisticsRequest) {
if (page == null || size == null){
if (page == null || size == null) {
page = 1;
size = 10;
}
// 时间筛选(固定时间)
if (dgStatisticsRequest.getCreateFixedTime() != null && dgStatisticsRequest.getCreateCustomTime() == null){
if (dgStatisticsRequest.getCreateFixedTime() != null && dgStatisticsRequest.getCreateCustomTime() == null) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
switch (dgStatisticsRequest.getCreateFixedTime()){
case 0 :
switch (dgStatisticsRequest.getCreateFixedTime()) {
case 0:
dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getDayBegin()));
dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getDayEnd()));// 今天
break;
case 1 :
case 1:
dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfYesterday()));
dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfYesterDay()));// 昨天
break;
case 2 :
case 2:
dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfWeek()));
dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfWeek()));// 本周
break;
case 3 :
case 3:
dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfMonth()));
dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfMonth()));// 本月
break;
case 4 :
case 4:
dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfYear()));
dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfYear()));// 本年
break;
default :
default:
dgStatisticsRequest.setStartTime(null);
dgStatisticsRequest.setEndTime(null);
}
}
// 时间筛选(自定义时间)
if (dgStatisticsRequest.getCreateCustomTime() != null){
if (dgStatisticsRequest.getCreateCustomTime() != null) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getDayStartTime(dgStatisticsRequest.getCreateCustomTime())));
dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getDayEndTime(dgStatisticsRequest.getCreateCustomTime())));
@ -88,23 +88,23 @@ public class DgStatisticsServiceImpl extends ServiceImpl<DgStatisticsMapper, DgA
// 查询列表
IPage<DgStatisticsPO> iPage = this.getBaseMapper().list(new Page(page, size), dgStatisticsRequest);
List<DgStatisticsPO> dgStatisticsPOList = iPage.getRecords();
if (dgStatisticsPOList == null){
if (dgStatisticsPOList == null) {
return null;
}
// 部门筛选
if (dgStatisticsRequest.getDeptId() != null && dgStatisticsRequest.getEmpId() == null){
if (dgStatisticsRequest.getDeptId() != null && dgStatisticsRequest.getEmpId() == null) {
ResponseResult<List<EmployeeVO>> result = hrmsFeignService.listEmployeeByDeptId(dgStatisticsRequest.getDeptId().longValue());
if (result.getData() == null || result.getData().size() == 0){
if (result.getData() == null || result.getData().size() == 0) {
return null;
}
for (int i = 0;i < dgStatisticsPOList.size();i++){
for (int i = 0; i < dgStatisticsPOList.size(); i++) {
boolean flag = false;
for (EmployeeVO employeeVO : result.getData()) {
if (Objects.equals(dgStatisticsPOList.get(i).getPresenterId().longValue(),employeeVO.getId())){
if (Objects.equals(dgStatisticsPOList.get(i).getPresenterId().longValue(), employeeVO.getId())) {
flag = true;
}
}
if (!flag){
if (!flag) {
dgStatisticsPOList.remove(i);
i--; // 索引要减一,不然会触发"快速失败"异常
}
@ -113,9 +113,9 @@ public class DgStatisticsServiceImpl extends ServiceImpl<DgStatisticsMapper, DgA
iPage.setSize(iPage.getTotal() % size == 0 ? iPage.getTotal() / size : iPage.getTotal() / size + 1);
}
// 提单人筛选
if (dgStatisticsRequest.getEmpId() != null){
for (int i = 0;i < dgStatisticsPOList.size();i++){
if (!Objects.equals(dgStatisticsPOList.get(i).getPresenterId(),dgStatisticsRequest.getEmpId())){
if (dgStatisticsRequest.getEmpId() != null) {
for (int i = 0; i < dgStatisticsPOList.size(); i++) {
if (!Objects.equals(dgStatisticsPOList.get(i).getPresenterId(), dgStatisticsRequest.getEmpId())) {
dgStatisticsPOList.remove(i);
i--;// 索引要减一,不然会触发"快速失败"异常
}
@ -125,23 +125,23 @@ public class DgStatisticsServiceImpl extends ServiceImpl<DgStatisticsMapper, DgA
}
// 获取所有的提单人id
Integer[] presenterIds = dgStatisticsPOList.stream().map(DgStatisticsPO::getPresenterId).toArray(Integer[]::new);
if (presenterIds.length != 0){
if (presenterIds.length != 0) {
// 强制类型转换
Long[] ids = new Long[presenterIds.length];
for (int i = 0;i < presenterIds.length;i++){
for (int i = 0; i < presenterIds.length; i++) {
ids[i] = presenterIds[i].longValue();
}
ResponseResult<List<EmployeeTO>> empAndDeptList = hrmsFeignService.getEmployeeAndDeptById(ids);
if (empAndDeptList.getData() != null){
if (empAndDeptList.getData() != null) {
List<DgStatisticsListResponse> listResponse = this.jointStatistics(dgStatisticsPOList, empAndDeptList.getData());
IPage<DgStatisticsListResponse> iPages = new Page<>();
BeanUtils.copyProperties(iPage,iPages);
BeanUtils.copyProperties(iPage, iPages);
iPages.setRecords(listResponse);
return new PageUtils(iPages);
}else {
} else {
return new PageUtils(iPage);
}
}else {
} else {
return new PageUtils(iPage);
}
}
@ -154,7 +154,7 @@ public class DgStatisticsServiceImpl extends ServiceImpl<DgStatisticsMapper, DgA
IPage<DgStatisticsPO> list = this.getBaseMapper().list(new Page(), new DgStatisticsRequest());
List<DgStatisticsPO> dgStatisticsPOList = list.getRecords();
if (dgStatisticsPOList == null){
if (dgStatisticsPOList == null) {
return false;
}
Integer[] presenterIds = dgStatisticsPOList.stream().map(DgStatisticsPO::getPresenterId).toArray(Integer[]::new);
@ -168,13 +168,13 @@ public class DgStatisticsServiceImpl extends ServiceImpl<DgStatisticsMapper, DgA
if (empAndDeptList.getData() != null) {
List<DgStatisticsListResponse> listResponse = this.jointStatistics(dgStatisticsPOList, empAndDeptList.getData());
try {
ExcelUtil.writeExcelWithSheets(response,listResponse,"业务统计信息一览表","statistics",new DgStatisticsListResponse())
ExcelUtil.writeExcelWithSheets(response, listResponse, "业务统计信息一览表", "statistics", new DgStatisticsListResponse())
.finish();
}catch (Exception e){
} catch (Exception e) {
ExceptionCast.cast(CrmsCode.CUSTOMER_EXPORT_EXSIT);
}
return true;
}else {
} else {
return false;
}
}
@ -186,41 +186,41 @@ public class DgStatisticsServiceImpl extends ServiceImpl<DgStatisticsMapper, DgA
*/
@Override
public PageUtils listRefuse(Integer page, Integer size, DgStatisticsRequest dgStatisticsRequest) {
if (page == null || size == null){
if (page == null || size == null) {
page = 1;
size = 10;
}
// 时间筛选(固定时间)
if (dgStatisticsRequest.getCreateFixedTime() != null && dgStatisticsRequest.getCreateCustomTime() == null){
if (dgStatisticsRequest.getCreateFixedTime() != null && dgStatisticsRequest.getCreateCustomTime() == null) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
switch (dgStatisticsRequest.getCreateFixedTime()){
case 0 :
switch (dgStatisticsRequest.getCreateFixedTime()) {
case 0:
dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getDayBegin()));
dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getDayEnd()));// 今天
break;
case 1 :
case 1:
dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfYesterday()));
dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfYesterDay()));// 昨天
break;
case 2 :
case 2:
dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfWeek()));
dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfWeek()));// 本周
break;
case 3 :
case 3:
dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfMonth()));
dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfMonth()));// 本月
break;
case 4 :
case 4:
dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfYear()));
dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfYear()));// 本年
break;
default :
default:
dgStatisticsRequest.setStartTime(null);
dgStatisticsRequest.setEndTime(null);
}
}
// 时间筛选(自定义时间)
if (dgStatisticsRequest.getCreateCustomTime() != null){
if (dgStatisticsRequest.getCreateCustomTime() != null) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
dgStatisticsRequest.setStartTime(dateFormat.format(DateUtils.getDayStartTime(dgStatisticsRequest.getCreateCustomTime())));
dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getDayEndTime(dgStatisticsRequest.getCreateCustomTime())));
@ -229,23 +229,23 @@ public class DgStatisticsServiceImpl extends ServiceImpl<DgStatisticsMapper, DgA
dgStatisticsRequest.setStatus(PromptSuccess.STATUS_REFUSE);
IPage<DgStatisticsRefusePO> iPage = this.getBaseMapper().listRefuse(new Page(page, size), dgStatisticsRequest);
List<DgStatisticsRefusePO> dgStatisticsRefusePOList = iPage.getRecords();
if (dgStatisticsRefusePOList == null){
if (dgStatisticsRefusePOList == null) {
return null;
}
// 部门筛选
if (dgStatisticsRequest.getDeptId() != null && dgStatisticsRequest.getEmpId() == null){
if (dgStatisticsRequest.getDeptId() != null && dgStatisticsRequest.getEmpId() == null) {
ResponseResult<List<EmployeeVO>> result = hrmsFeignService.listEmployeeByDeptId(dgStatisticsRequest.getDeptId().longValue());
if (result.getData() == null || result.getData().size() == 0){
if (result.getData() == null || result.getData().size() == 0) {
return null;
}
for (int i = 0;i < dgStatisticsRefusePOList.size();i++){
for (int i = 0; i < dgStatisticsRefusePOList.size(); i++) {
boolean flag = false;
for (EmployeeVO employeeVO : result.getData()) {
if (Objects.equals(dgStatisticsRefusePOList.get(i).getPresenterId().longValue(),employeeVO.getId())){
if (Objects.equals(dgStatisticsRefusePOList.get(i).getPresenterId().longValue(), employeeVO.getId())) {
flag = true;
}
}
if (!flag){
if (!flag) {
dgStatisticsRefusePOList.remove(i);
i--; // 索引要减一,不然会触发"快速失败"异常
}
@ -254,9 +254,9 @@ public class DgStatisticsServiceImpl extends ServiceImpl<DgStatisticsMapper, DgA
iPage.setSize(iPage.getTotal() % size == 0 ? iPage.getTotal() / size : iPage.getTotal() / size + 1);
}
// 提单人筛选
if (dgStatisticsRequest.getEmpId() != null){
for (int i = 0;i < dgStatisticsRefusePOList.size();i++){
if (!Objects.equals(dgStatisticsRefusePOList.get(i).getPresenterId(),dgStatisticsRequest.getEmpId())){
if (dgStatisticsRequest.getEmpId() != null) {
for (int i = 0; i < dgStatisticsRefusePOList.size(); i++) {
if (!Objects.equals(dgStatisticsRefusePOList.get(i).getPresenterId(), dgStatisticsRequest.getEmpId())) {
dgStatisticsRefusePOList.remove(i);
i--;// 索引要减一,不然会触发"快速失败"异常
}
@ -266,23 +266,23 @@ public class DgStatisticsServiceImpl extends ServiceImpl<DgStatisticsMapper, DgA
}
// 获取所有的提单人id
Integer[] presenterIds = dgStatisticsRefusePOList.stream().map(DgStatisticsRefusePO::getPresenterId).toArray(Integer[]::new);
if (presenterIds.length != 0){
if (presenterIds.length != 0) {
// 强制类型转换
Long[] ids = new Long[presenterIds.length];
for (int i = 0;i < presenterIds.length;i++){
for (int i = 0; i < presenterIds.length; i++) {
ids[i] = presenterIds[i].longValue();
}
ResponseResult<List<EmployeeTO>> empAndDeptList = hrmsFeignService.getEmployeeAndDeptById(ids);
if (empAndDeptList.getData() != null){
if (empAndDeptList.getData() != null) {
List<DgStatisticsListRefuseResponse> listResponse = this.jointRefuseStatistics(dgStatisticsRefusePOList, empAndDeptList.getData());
IPage<DgStatisticsListRefuseResponse> iPages = new Page<>();
BeanUtils.copyProperties(iPage,iPages);
BeanUtils.copyProperties(iPage, iPages);
iPages.setRecords(listResponse);
return new PageUtils(iPages);
}else {
} else {
return new PageUtils(iPage);
}
}else {
} else {
return new PageUtils(iPage);
}
}
@ -297,7 +297,7 @@ public class DgStatisticsServiceImpl extends ServiceImpl<DgStatisticsMapper, DgA
// 列表查询
IPage<DgStatisticsRefusePO> listRefuse = this.getBaseMapper().listRefuse(new Page(), dgStatisticsRequest);
List<DgStatisticsRefusePO> statisticsRefusePOList = listRefuse.getRecords();
if (statisticsRefusePOList == null){
if (statisticsRefusePOList == null) {
return false;
}
Integer[] presenterIds = statisticsRefusePOList.stream().map(DgStatisticsRefusePO::getPresenterId).toArray(Integer[]::new);
@ -312,20 +312,20 @@ public class DgStatisticsServiceImpl extends ServiceImpl<DgStatisticsMapper, DgA
// 提单人姓名、部门拼装
List<DgStatisticsListRefuseResponse> listResponse = this.jointRefuseStatistics(statisticsRefusePOList, empAndDeptList.getData());
try {
ExcelUtil.writeExcelWithSheets(response,listResponse,"业务统计拒绝信息一览表","statisticsRefuse",new DgStatisticsListRefuseResponse())
ExcelUtil.writeExcelWithSheets(response, listResponse, "业务统计拒绝信息一览表", "statisticsRefuse", new DgStatisticsListRefuseResponse())
.finish();
}catch (Exception e){
} catch (Exception e) {
ExceptionCast.cast(CrmsCode.CUSTOMER_EXPORT_EXSIT);
}
return true;
}else {
} else {
return false;
}
}
return false;
}
private List<DgStatisticsListResponse> jointStatistics(List<DgStatisticsPO> dgStatisticsPOList,List<EmployeeTO> empAndDeptList){
private List<DgStatisticsListResponse> jointStatistics(List<DgStatisticsPO> dgStatisticsPOList, List<EmployeeTO> empAndDeptList) {
// 用于拼装业务统计列表
List<DgStatisticsListResponse> listResponse = new ArrayList<>();
DgStatisticsListResponse dgStatisticsListResponse;
@ -333,22 +333,22 @@ public class DgStatisticsServiceImpl extends ServiceImpl<DgStatisticsMapper, DgA
// 每一个客户对应一个不同的对象
dgStatisticsListResponse = new DgStatisticsListResponse();
for (EmployeeTO employeeTO : empAndDeptList) {
if (Objects.equals(dgStatisticsPO.getPresenterId().longValue(),employeeTO.getId())){
BeanUtils.copyProperties(dgStatisticsPO,dgStatisticsListResponse);
if (Objects.equals(dgStatisticsPO.getPresenterId().longValue(), employeeTO.getId())) {
BeanUtils.copyProperties(dgStatisticsPO, dgStatisticsListResponse);
dgStatisticsListResponse.setEmployeeName(employeeTO.getEmpName());
dgStatisticsListResponse.setDepartment(employeeTO.getDeptNames());
listResponse.add(dgStatisticsListResponse);
}
}
if (dgStatisticsListResponse.getEmployeeName() == null || dgStatisticsListResponse.getEmployeeName().length() == 0){
BeanUtils.copyProperties(dgStatisticsPO,dgStatisticsListResponse);
if (dgStatisticsListResponse.getEmployeeName() == null || dgStatisticsListResponse.getEmployeeName().length() == 0) {
BeanUtils.copyProperties(dgStatisticsPO, dgStatisticsListResponse);
listResponse.add(dgStatisticsListResponse);
}
}
return listResponse;
}
private List<DgStatisticsListRefuseResponse> jointRefuseStatistics(List<DgStatisticsRefusePO> dgStatisticsRefusePOList, List<EmployeeTO> empAndDeptList){
private List<DgStatisticsListRefuseResponse> jointRefuseStatistics(List<DgStatisticsRefusePO> dgStatisticsRefusePOList, List<EmployeeTO> empAndDeptList) {
// 用于拼装业务统计列表
List<DgStatisticsListRefuseResponse> listResponse = new ArrayList<>();
DgStatisticsListRefuseResponse dgStatisticsListRefuseResponse;
@ -356,15 +356,15 @@ public class DgStatisticsServiceImpl extends ServiceImpl<DgStatisticsMapper, DgA
// 每一个客户对应一个不同的对象
dgStatisticsListRefuseResponse = new DgStatisticsListRefuseResponse();
for (EmployeeTO employeeTO : empAndDeptList) {
if (Objects.equals(dgStatisticsRefusePO.getPresenterId().longValue(),employeeTO.getId())){
BeanUtils.copyProperties(dgStatisticsRefusePO,dgStatisticsListRefuseResponse);
if (Objects.equals(dgStatisticsRefusePO.getPresenterId().longValue(), employeeTO.getId())) {
BeanUtils.copyProperties(dgStatisticsRefusePO, dgStatisticsListRefuseResponse);
dgStatisticsListRefuseResponse.setEmployeeName(employeeTO.getEmpName());
dgStatisticsListRefuseResponse.setDepartment(employeeTO.getDeptNames());
listResponse.add(dgStatisticsListRefuseResponse);
}
}
if (dgStatisticsListRefuseResponse.getEmployeeName() == null || dgStatisticsListRefuseResponse.getEmployeeName().length() == 0){
BeanUtils.copyProperties(dgStatisticsRefusePO,dgStatisticsListRefuseResponse);
if (dgStatisticsListRefuseResponse.getEmployeeName() == null || dgStatisticsListRefuseResponse.getEmployeeName().length() == 0) {
BeanUtils.copyProperties(dgStatisticsRefusePO, dgStatisticsListRefuseResponse);
listResponse.add(dgStatisticsListRefuseResponse);
}
}

@ -1,10 +1,36 @@
package com.daqing.financial.guarantee.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.daqing.financial.guarantee.mapper.DgComplianceInvestigationMapper;
import com.daqing.financial.guarantee.mapper.DgLoanCommitteeConsiderMapper;
import com.daqing.financial.guarantee.mapper.DgWorkConferenceConsiderMapper;
import com.daqing.financial.guarantee.model.response.AuditOpinionResponse;
import com.daqing.financial.guarantee.service.IDgWorkConferenceConsiderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.framework.domain.guarantee.DgComplianceInvestigation;
import com.daqing.framework.domain.guarantee.DgLoanCommitteeConsider;
import com.daqing.framework.domain.guarantee.DgWorkConferenceConsider;
import com.daqing.framework.domain.guarantee.GuaranteeCode;
import com.daqing.framework.domain.guarantee.po.AuditOpinionPO;
import com.daqing.framework.domain.guarantee.po.DgWorkConferencePO;
import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.model.StatusCode;
import com.daqing.framework.model.response.CommonCode;
import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.utils.PageUtils;
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.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* <p>
@ -15,6 +41,192 @@ import org.springframework.stereotype.Service;
* @since 2020-11-05
*/
@Service
public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConferenceConsiderMapper, DgWorkConferenceConsider> implements IDgWorkConferenceConsiderService {
public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl<DgWorkConferenceConsiderMapper, DgWorkConferenceConsider>
implements IDgWorkConferenceConsiderService {
@Autowired
private DgLoanCommitteeConsiderMapper dgLoanCommitteeConsiderMapper;
@Autowired
private DgComplianceInvestigationMapper dgComplianceInvestigationMapper;
/**
* 列表
*/
@Override
public PageUtils list(Integer page, Integer size, String codeOrName) {
if (page == null || size == null) {
page = 1;
size = 10;
}
/*String userId = this.getUserId();
// 获取当前登录用户的角色id
String roleIdString = RedisUtil.get("dq:userRole:" + userId);
if (roleIdString == null || roleIdString.length() == 0) {
ExceptionCast.cast(GuaranteeCode.ROLE_IS_NOT);
}
String[] roleIds = roleIdString.split(",");*/
String userId = "1";
String[] roleIds = {"71"};
List<Integer> roleList = new ArrayList<>();
for (String roleId : roleIds) {
roleList.add(Integer.parseInt(roleId));
}
IPage<DgWorkConferencePO> list = this.getBaseMapper().list(new Page(page, size), codeOrName, roleList, Integer.parseInt(userId));
return new PageUtils(list);
}
/**
* 审议
*/
@Transactional
@Override
public Boolean check(Integer id, String opinion, Integer status, List<String> empNames) {
if (id == null || status == null) {
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
// String userId = this.getUserId();
String userId = "1";
// 同意
if (status == 1) {
if (empNames == null || empNames.size() == 0) {
ExceptionCast.cast(GuaranteeCode.WORK_JUDGE_NOT_NULL);
}
// 拼接评委名字
StringBuilder names = new StringBuilder();
for (int i = 0; i < empNames.size(); i++) {
if (i == empNames.size() - 1) {
names.append(empNames.get(i));
} else {
names.append(empNames.get(i)).append(",");
}
}
Boolean result = this.getBaseMapper().check(id, Integer.parseInt(userId), opinion,
StatusCode.SP_IN_REVIEW, StatusCode.CZ_ON_HAND, new Date(), names.toString());
if (result) {
// 在业务流程表中插入一条审议通过的数据
return true;
}
}
// 拒绝
if (status == 2) {
if (opinion == null || opinion.length() == 0) {
ExceptionCast.cast(GuaranteeCode.COMPLIANCE_INVESTIGATION_REMARK_NOT_NULL);
}
// 先改变所有的审核状态为已拒绝
Boolean result = this.getBaseMapper().updateAuditStatusByBusinessId(
this.getBaseMapper().getWorkConferenceConsider(id).getBusinessId(), StatusCode.SP_REFUSE);
if (result) {
// 再改变自己当前的操作状态为已处理
Boolean result1 = this.getBaseMapper().updateOperationStatusById(id, StatusCode.CZ_PROCESSED, opinion);
if (result1) {
// 最后改变该条贷款信息的业务状态为已否决
Boolean result2 = dgComplianceInvestigationMapper.updateBusinessStatusByBusinessId(
this.getBaseMapper().getWorkConferenceConsider(id).getBusinessId(), StatusCode.YW_REJECTED);
if (result2) {
// 在业务流程表中插入一条拒绝数据(记得带上拒绝意见)
return true;
}
}
}
}
// 驳回
if (status == 3) {
if (opinion == null || opinion.length() == 0) {
ExceptionCast.cast(GuaranteeCode.COMPLIANCE_INVESTIGATION_REMARK_NOT_NULL);
}
}
return false;
}
/**
* 评委抽取
*/
@Transactional
@Override
public Boolean theJudgesDrawn(Integer id, List<String> empNames) {
if (id == null) {
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
if (empNames == null || empNames.size() == 0) {
ExceptionCast.cast(GuaranteeCode.WORK_JUDGE_NOT_NULL);
}
// 拼接评委名字
StringBuilder names = new StringBuilder();
for (int i = 0; i < empNames.size(); i++) {
if (i == empNames.size() - 1) {
names.append(empNames.get(i));
} else {
names.append(empNames.get(i)).append(",");
}
}
DgWorkConferenceConsider workConferenceConsider = this.getBaseMapper().getWorkConferenceConsider(id);
// 新增一条贷审会数据
if (workConferenceConsider.getBusinessId() != null) {
DgLoanCommitteeConsider loanCommitteeConsider = new DgLoanCommitteeConsider();
loanCommitteeConsider.setBusinessId(workConferenceConsider.getBusinessId());
loanCommitteeConsider.setCompanyId(workConferenceConsider.getCompanyId());
loanCommitteeConsider.setRoleId(PromptSuccess.DSH_ID);
loanCommitteeConsider.setStatus(StatusCode.SP_IN_REVIEW);
loanCommitteeConsider.setOperatingStatus(StatusCode.CZ_ON_HAND);
loanCommitteeConsider.setCreateTime(new Date());
loanCommitteeConsider.setUpdateTime(new Date());
Boolean result = this.getBaseMapper().insertLoanCommitteeConsider(loanCommitteeConsider);
// 保存抽取的评委名单
if (result) {
Boolean result1 = dgLoanCommitteeConsiderMapper.TheJudgesDrawn(workConferenceConsider.getBusinessId(), names.toString());
if (result1) {
// 在业务流程表中插入一条评委抽取成功的数据
return true;
}
}
}
return false;
}
/**
* 查询AB角资产部调查信息部调查法规部调查的审核意见审核人姓名及时间
*/
@Override
public AuditOpinionResponse getAuditOpinion(Integer businessId) {
if (businessId == null) {
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
AuditOpinionPO auditOpinion = dgLoanCommitteeConsiderMapper.getAuditOpinion(businessId);
// 将对应的用户id转换成姓名返回回去
System.out.println(auditOpinion);
return null;
}
/**
* 查看
*/
@Override
public DgWorkConferenceConsider query(Integer id) {
if (id == null) {
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
return this.getBaseMapper().query(id);
}
/**
* 导出
*/
@Override
public Boolean excelExport(HttpServletResponse response, List<String> ids) {
return null;
}
/**
* 获取当前登录用户信息
*/
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);
}
return userId;
}
}

@ -2,34 +2,25 @@
<!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.DgComplianceInvestigationMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.daqing.framework.domain.guarantee.DgComplianceInvestigation">
<id column="id" property="id" />
<result column="company_id" property="companyId" />
<result column="emp_id" property="empId" />
<result column="file" property="file" />
<result column="remark" property="remark" />
<result column="status" property="status" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
</resultMap>
<select id="list" resultType="com.daqing.financial.guarantee.model.response.DgComplianceInvestigationResponse">
SELECT a.id AS id,a.business_code AS business_code,a.business_type AS business_type,a.apply_amount AS apply_amount,
a.apply_time AS apply_time,a.create_time AS create_time,c.name AS name,c.phone AS phone,i.status AS status,
i.id AS iid,i.role_id AS role_id
FROM dg_apply_amount_info AS a
LEFT JOIN dg_audit_process AS p
ON a.id = p.apply_amount_info_id
SELECT a.id AS business_id,a.business_code AS business_code,a.business_type AS business_type,a.apply_amount AS apply_amount,
a.apply_time AS apply_time,a.create_time AS create_time,c.name AS name,c.phone AS phone,i.operation_status AS
operation_status,i.audit_status AS audit_status,i.id AS iid,i.role_id AS role_id,b.business_status AS business_status
FROM dg_compliance_investigation AS i
LEFT JOIN dg_apply_amount_info AS a
ON a.id = i.business_id
LEFT JOIN crms_customer AS c
ON a.company_id = c.id
LEFT JOIN dg_compliance_investigation AS i
ON a.id = i.business_id
LEFT JOIN dg_business_process_status AS b
ON b.business_id = a.id
WHERE c.del_or_not = 0
AND i.role_id = #{roleId}
AND i.user_id = ''
<if test="cr.status != null and cr.status != ''">
AND i.status = #{cr.status}
AND (i.user_id = #{userId} OR i.user_id IS NULL)
AND i.role_id IN
<foreach collection="roleIds" open="(" separator="," close=")" item="roleId">
#{roleId}
</foreach>
<if test="cr.status != null">
AND i.audit_status = #{cr.status}
</if>
<if test="cr.codeOrName != null and cr.codeOrName != ''">
AND (a.business_code LIKE CONCAT('%',#{cr.codeOrName},'%') OR c.name LIKE CONCAT('%',#{cr.codeOrName},'%'))
@ -37,63 +28,110 @@
ORDER BY a.create_time DESC
</select>
<!-- 法规部经理和法规领导指派或者调查之后的数据 -->
<select id="listByUserId" resultType="com.daqing.financial.guarantee.model.response.DgComplianceInvestigationResponse">
SELECT a.id AS id,a.business_code AS business_code,a.business_type AS business_type,a.apply_amount AS apply_amount,
a.apply_time AS apply_time,a.create_time AS create_time,c.name AS name,c.phone AS phone,i.status AS status,
i.id AS iid,i.role_id AS role_id
FROM dg_apply_amount_info AS a
LEFT JOIN dg_audit_process AS p
ON a.id = p.apply_amount_info_id
<!-- 将要导出的excel数据列表 -->
<select id="listExcel" resultType="com.daqing.financial.guarantee.model.response.DgComplianceInvestigationResponse">
SELECT a.business_code AS business_code,a.business_type AS business_type,a.apply_amount AS apply_amount,
a.apply_time AS apply_time,a.create_time AS create_time,c.name AS name,c.phone AS phone,i.operation_status AS
operation_status,i.audit_status AS audit_status,b.business_status AS business_status
FROM dg_compliance_investigation AS i
LEFT JOIN dg_apply_amount_info AS a
ON a.id = i.business_id
LEFT JOIN crms_customer AS c
ON a.company_id = c.id
LEFT JOIN dg_compliance_investigation AS i
ON a.id = i.business_id
LEFT JOIN dg_business_process_status AS b
ON b.business_id = a.id
WHERE c.del_or_not = 0
AND i.role_id = #{roleId}
AND i.user_id = #{userId}
<if test="cr.status != null and cr.status != ''">
AND i.status = #{cr.status}
</if>
<if test="cr.codeOrName != null and cr.codeOrName != ''">
AND (a.business_code LIKE CONCAT('%',#{cr.codeOrName},'%') OR c.name LIKE CONCAT('%',#{cr.codeOrName},'%'))
</if>
AND i.role_id IN
<foreach collection="roleIds" open="(" separator="," close=")" item="roleId">
#{roleId}
</foreach>
AND (i.user_id = #{userId} OR i.user_id IS NULL)
WHERE i.id IN
<foreach collection="ids" open="(" separator="," close=")" item="id">
#{id}
</foreach>
ORDER BY a.create_time DESC
</select>
<!-- 调查 -->
<update id="survey">
UPDATE dg_compliance_investigation
SET user_id = #{userId},file = #{fileUrl},survey_opinion = #{surveyOpinion},status = #{status},update_time = #{date}
SET user_id = #{userId},file_url = #{fileUrl},opinion = #{opinion},operation_status = #{operationStatus},audit_status = #{auditStatus},update_time = #{date}
WHERE id = #{iid}
</update>
<!-- 插入数据的样板 -->
<select id="getComplianceInvestigation" parameterType="integer" resultType="com.daqing.framework.domain.guarantee.DgComplianceInvestigation">
SELECT company_id,business_id FROM dg_compliance_investigation
SELECT company_id,business_id FROM dg_compliance_investigation WHERE id = #{iid}
</select>
<!-- 指派之后将法规经理与该条数据绑定 -->
<update id="updateAssign">
UPDATE dg_compliance_investigation SET user_id = #{userId} WHERE id = #{iid}
UPDATE dg_compliance_investigation
SET user_id = #{userId},operation_status = #{operationStatus},audit_status = #{auditStatus}
WHERE id = #{iid}
</update>
<!-- 新增一条指派数据 -->
<insert id="assign" parameterType="com.daqing.framework.domain.guarantee.DgComplianceInvestigation">
INSERT INTO (company_id,user_id,status,create_time,update_time,business_id,role_id)
VALUES (#{dci.companyId},#{dci.userId},#{dci.status},#{dci.createTime},#{dci.updateTime},#{dci.businessId},#{dci.roleId})
</insert>
<!-- 插入经理可以查询到的数据 -->
<insert id="insertManager" parameterType="com.daqing.framework.domain.guarantee.DgComplianceInvestigation">
INSERT INTO (company_id,file,status,create_time,update_time,business_id,role_id,survey_opinion)
VALUES (#{dci.companyId},#{dci.file},#{dci.status},#{dci.createTime},#{dci.updateTime},
#{dci.businessId},#{dci.roleId},#{dci.surveyOpinion})
INSERT INTO dg_compliance_investigation (company_id,user_id,operation_status,audit_status,create_time,update_time,business_id,role_id)
VALUES (#{dci.companyId},#{dci.userId},#{dci.operationStatus},#{dci.auditStatus},#{dci.createTime},#{dci.updateTime},#{dci.businessId},#{dci.roleId})
</insert>
<!-- 审核 -->
<update id="check">
UPDATE dg_compliance_investigation
SET remark = #{auditOpinion},status = #{status},update_time = #{date}
SET opinion = #{opinion},audit_status = #{auditStatus},operation_status = #{operationStatus},
update_time = #{date},user_id = #{userId}
WHERE id = #{iid}
</update>
<!-- 上传附件 -->
<update id="uploadAccessory">
UPDATE dg_enclosure_info
SET other_file = #{fileUrl}
WHERE business_id = #{businessId}
</update>
<!-- 调查完之后将指派完的数据更新为待处理 -->
<update id="updateToAudit">
UPDATE dg_compliance_investigation
SET operation_status = #{operationStatus}
WHERE business_id = #{businessId}
AND role_id = #{roleId}
</update>
<!-- 根据业务id获取当前角色对应的数据的操作状态 -->
<select id="getOperationStatusByBusinessId" resultType="integer">
SELECT operation_status FROM dg_compliance_investigation WHERE business_id = #{businessId} AND role_id = #{roleId}
</select>
<!-- 根据id查询合规调查表详情 -->
<select id="queryDgComplianceInvestigation" parameterType="integer" resultType="com.daqing.framework.domain.guarantee.DgComplianceInvestigation">
SELECT file_url,opinion
FROM dg_compliance_investigation
WHERE id = #{iid}
</select>
<!-- 新增一条工作会记录 -->
<insert id="insertWorkConferenceConsider" parameterType="com.daqing.framework.domain.guarantee.DgWorkConferenceConsider">
INSERT INTO dg_work_conference_consider (company_id,business_id,role_id,audit_status,operation_status,create_time,update_time)
VALUES (#{wcc.companyId},#{wcc.businessId},#{wcc.roleId},#{wcc.auditStatus},#{wcc.operationStatus},#{wcc.createTime},#{wcc.updateTime})
</insert>
<!-- 改变所有业务id相同的审核状态,用于拒绝或者驳回 -->
<update id="updateAuditStatusByBusinessId">
UPDATE dg_compliance_investigation SET audit_status = #{auditStatus} WHERE business_id = #{businessId}
</update>
<!-- 根据id改变当前数据的操作状态 -->
<update id="updateOperationStatusById">
UPDATE dg_compliance_investigation SET operation_status = #{operationStatus},opinion = #{opinion} WHERE id = #{id}
</update>
<!-- 根据业务id改变当前数据的业务状态 -->
<update id="updateBusinessStatusByBusinessId">
UPDATE dg_business_process_status SET business_status = #{businessStatus} WHERE business_id = #{businessId}
</update>
</mapper>

@ -4,19 +4,127 @@
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.daqing.framework.domain.guarantee.DgLoanCommitteeConsider">
<id column="id" property="id" />
<result column="company_id" property="companyId" />
<result column="consider_id" property="considerId" />
<result column="status" property="status" />
<result column="agreed_items" property="agreedItems" />
<result column="additional_items" property="additionalItems" />
<result column="loan_money" property="loanMoney" />
<result column="loan_tern" property="loanTern" />
<result column="agree_person" property="agreePerson" />
<result column="disagree_person" property="disagreePerson" />
<result column="file" property="file" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<id column="id" property="id"/>
<result column="company_id" property="companyId"/>
<result column="consider_id" property="considerId"/>
<result column="status" property="status"/>
<result column="agreed_items" property="agreedItems"/>
<result column="additional_items" property="additionalItems"/>
<result column="loan_money" property="loanMoney"/>
<result column="loan_tern" property="loanTern"/>
<result column="agree_person" property="agreePerson"/>
<result column="disagree_person" property="disagreePerson"/>
<result column="file" property="file"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<select id="list" resultType="com.daqing.financial.guarantee.model.response.DgLoanCommitteeConsiderResponse">
SELECT a.id AS business_id,a.business_code AS business_code,a.business_type AS business_type,a.apply_amount AS apply_amount,
a.apply_time AS apply_time,a.create_time AS create_time,c.name AS name,c.phone AS phone,l.operating_status
AS operating_status,l.status AS status,l.id AS id,l.role_id AS role_id,b.business_status AS business_status
FROM dg_loan_committee_consider AS l
LEFT JOIN dg_apply_amount_info AS a
ON a.id = l.business_id
LEFT JOIN crms_customer AS c
ON a.company_id = c.id
LEFT JOIN dg_business_process_status AS b
ON b.business_id = a.id
WHERE c.del_or_not = 0
AND (l.consider = #{userId} OR l.consider_id IS NULL)
AND l.role_id IN
<foreach collection="roleIds" open="(" separator="," close=")" item="roleId">
#{roleId}
</foreach>
<if test="codeOrName != null and codeOrName != ''">
AND (a.business_code LIKE CONCAT('%',#{codeOrName},'%') OR c.name LIKE CONCAT('%',#{codeOrName},'%'))
</if>
ORDER BY a.create_time DESC
</select>
<select id="excelList" resultType="com.daqing.financial.guarantee.model.response.DgLoanCommitteeConsiderResponse">
SELECT a.business_code AS business_code,a.business_type AS business_type,a.apply_amount AS apply_amount,
a.apply_time AS apply_time,a.create_time AS create_time,c.name AS name,c.phone AS phone,l.operating_status
AS operating_status,l.status AS status,b.business_status AS business_status
FROM dg_loan_committee_consider AS l
LEFT JOIN dg_apply_amount_info AS a
ON a.id = l.business_id
LEFT JOIN crms_customer AS c
ON a.company_id = c.id
LEFT JOIN dg_business_process_status AS b
ON b.business_id = a.id
WHERE c.del_or_not = 0
AND (l.consider = #{userId} OR l.consider_id IS NULL)
AND l.role_id IN
<foreach collection="roleIds" open="(" separator="," close=")" item="roleId">
#{roleId}
</foreach>
ORDER BY a.create_time DESC
</select>
<update id="check">
UPDATE dg_loan_committee_consider
SET consider_id = #{userId},status = #{status},operating_status = #{operatingStatus},create_time = #{date},
agreed_items = #{lr.agreedItems},additional_items = #{lr.additionalItems},loan_money = #{lrloanMoney},
loan_tern = #{lr.loanTern},agree_person = #{lr.agreePerson},disagree_person = #{lr.disagreePerson},
file = #{lr.fileUrl},passing_time = #{lr.passingTime}
WHERE id = #{lr.id}
</update>
<!-- 保存评委名单-->
<update id="TheJudgesDrawn">
UPDATE dg_loan_committee_consider
SET agree_person = #{agreePerson}
WHERE business_id = #{businessId}
</update>
<!-- 获取评委名单-->
<select id="getJudges" parameterType="integer" resultType="string">
SELECT agree_person FROM dg_loan_committee_consider WHERE id = #{id}
</select>
<!-- 获取AB角、资产调查、信息调查、合规调查的审批意见、审批人和时间 -->
<select id="getAuditOpinion" parameterType="integer" resultType="com.daqing.framework.domain.guarantee.po.AuditOpinionPO">
SELECT a.remark AS a_audit_opinion,a.emp_id AS a_emp_id,a.update_time AS a_time,
b.remark AS b_audit_opinion,b.emp_id AS b_emp_id,b.update_time AS b_time,
ass.apply_content AS asset_audit_opinion,ass.emp_id AS asset_emp_id,ass.update_time AS asset_time,
m.remark AS message_audit_opinion,m.emp_id AS message_emp_id,m.update_time AS message_time,
c.opinion AS regulation_audit_opinion,c.user_id AS regulation_emp_id,c.update_time AS regulation_time
FROM dg_assets_investigation AS ass
LEFT JOIN dg_message_investigation AS m
ON ass.business_id = m.business_id
LEFT JOIN dg_compliance_investigation AS c
ON c.business_id = ass.business_id
LEFT JOIN (SELECT business_id,emp_id,remark,update_time FROM dg_guarantee_assign_user
WHERE business_id = #{businessId} AND role_id = 59) AS a
ON ass.business_id = a.business_id
LEFT JOIN (SELECT business_id,emp_id,remark,update_time FROM dg_guarantee_assign_user
WHERE business_id = #{businessId} AND role_id = 60) AS b
ON ass.business_id = b.business_id
WHERE ass.business_id = #{businessId}
AND ass.role_id = 64
AND m.role_id = 67
AND c.role_id = 70
</select>
<select id="query" parameterType="integer" resultType="com.daqing.framework.domain.guarantee.DgLoanCommitteeConsider">
SELECT agreed_items,additional_items,loan_money,loan_tern,agree_person,disagree_person,file,passing_time,refuse_opinion
FROM dg_loan_committee_consider
WHERE id = #{id}
</select>
<select id="getDgLoanCommitteeConsider" parameterType="integer" resultType="com.daqing.framework.domain.guarantee.DgLoanCommitteeConsider">
SELECT business_id FROM dg_loan_committee_consider WHERE id = #{id}
</select>
<!-- 改变所有业务id相同的审核状态,用于拒绝或者驳回 -->
<update id="updateAuditStatusByBusinessId">
UPDATE dg_loan_committee_consider SET status = #{status} WHERE business_id = #{businessId}
</update>
<!-- 根据id改变当前数据的操作状态 -->
<update id="updateOperationStatusById">
UPDATE dg_loan_committee_consider SET operating_status = #{operatingStatus},refuse_opinion = #{refuseOpinion} WHERE id = #{id}
</update>
</mapper>

@ -13,4 +13,76 @@
<result column="update_time" property="updateTime" />
</resultMap>
<!-- 通过角色查询所有数据 -->
<select id="list" resultType="com.daqing.framework.domain.guarantee.po.DgWorkConferencePO">
SELECT a.id AS business_id,a.business_code AS business_code,a.business_type AS business_type,a.apply_amount AS apply_amount,
a.apply_time AS apply_time,a.create_time AS create_time,c.name AS name,c.phone AS phone,w.id AS id,
w.role_id AS role_id,w.audit_status AS audit_status,w.operation_status AS operation_status,
b.business_status AS 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_customer AS c
ON a.company_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="roleIds" open="(" separator="," close=")" item="roleId">
#{roleId}
</foreach>
AND i.role_id = 70
AND ass.role_id = 64
AND m.role_id = 67
<if test="codeOrName != null and codeOrName != ''">
AND (a.business_code LIKE CONCAT('%',#{codeOrName},'%') OR c.name LIKE CONCAT('%',#{codeOrName},'%'))
</if>
ORDER BY a.create_time DESC
</select>
<!-- 审议 -->
<update id="check">
UPDATE dg_work_conference_consider
SET user_id = #{userId},opinion = #{opinion},audit_status = #{auditStatus},operation_status = #{operationStatus},
update_time = #{date},join_judge = #{joinJudge}
WHERE id = #{id}
</update>
<!-- 获取一个工作会对象 -->
<select id="getWorkConferenceConsider" parameterType="integer" resultType="com.daqing.framework.domain.guarantee.DgWorkConferenceConsider">
SELECT company_id,business_id FROM dg_work_conference_consider WHERE id = #{id}
</select>
<!-- 新增一条贷审会数据 -->
<insert id="insertLoanCommitteeConsider" parameterType="com.daqing.framework.domain.guarantee.DgLoanCommitteeConsider">
INSERT INTO dg_loan_committee_consider (business_id,company_id,role_id,status,operating_status,create_time,update_time)
VALUES (#{lcc.businessId},#{lcc.companyId},#{lcc.roleId},#{lcc.status},#{lcc.operatingStatus},#{lcc.createTime},#{lcc.updateTime})
</insert>
<select id="query" parameterType="integer" resultType="com.daqing.framework.domain.guarantee.DgWorkConferenceConsider">
SELECT opinion,join_judge FROM dg_work_conference_consider WHERE id = #{id}
</select>
<!-- 改变所有业务id相同的审核状态,用于拒绝或者驳回 -->
<update id="updateAuditStatusByBusinessId">
UPDATE dg_work_conference_consider SET audit_status = #{auditStatus} WHERE business_id = #{businessId}
</update>
<!-- 根据id改变当前数据的操作状态 -->
<update id="updateOperationStatusById">
UPDATE dg_work_conference_consider SET operation_status = #{operationStatus},opinion = #{opinion} WHERE id = #{id}
</update>
</mapper>

@ -149,7 +149,7 @@ public class EmployeeController implements EmployeeControllerApi {
*/
@Override
@GetMapping("/start")
public ResponseResult start(@RequestParam("id")Long id) {
public ResponseResult start(@RequestParam("id") Long id) {
Boolean result = employeeService.start(id);
@ -173,7 +173,7 @@ public class EmployeeController implements EmployeeControllerApi {
*/
@GetMapping("/forbidInfo")
@Override
public ResponseResult forbidInfo(@RequestParam("id")Long id) {
public ResponseResult forbidInfo(@RequestParam("id") Long id) {
UserEntity user = employeeService.forbidInfo(id);
@ -205,6 +205,7 @@ public class EmployeeController implements EmployeeControllerApi {
/**
* 根据id查询员工姓名
*
* @param id
* @return
*/
@ -224,6 +225,7 @@ public class EmployeeController implements EmployeeControllerApi {
/**
* 根据userId查询员工头像
*
* @param userId
* @return
*/
@ -234,6 +236,7 @@ public class EmployeeController implements EmployeeControllerApi {
/**
* 根据userId获取用户名以及部门名称
*
* @param userId
* @return
*/
@ -244,16 +247,22 @@ public class EmployeeController implements EmployeeControllerApi {
/**
* 新增用户角色
*
* @param userId
* @return
*/
@GetMapping("/insertUserRole")
public ResponseResult insertUserRole(@RequestParam("userId") Long userId,@RequestParam("roleId")Long roleId) {
return new ResponseResult<>().SUCCESS(employeeService.insertUserRole(userId,roleId));
public ResponseResult insertUserRole(@RequestParam("userId") Long userId, @RequestParam("roleId") Long roleId) {
return new ResponseResult<>().SUCCESS(employeeService.insertUserRole(userId, roleId));
}
@PostMapping("/insertUsrRole")
public ResponseResult insertUsrRole(@RequestBody List<DgGuaranteePO> list) {
return new ResponseResult<>().SUCCESS(employeeService.insertUsrRole(list));
}
@GetMapping("/saveUserRole")
public ResponseResult saveUserRole(@RequestParam("userId") Long userId, @RequestParam("roleId") Long roleId) {
return ResponseResult.SUCCESS(employeeService.saveUserRole(userId,roleId));
}
}

@ -34,6 +34,8 @@ public interface EmployeeDao extends BaseMapper<EmployeeEntity> {
List<UserDeptVO> employeeListByDeptId(Long id);
List<EmployeeVO> listEmployeeByDeptIdAndEmpId(@Param("id") Long deptId, @Param("name") String name, @Param("empIds") List<Long> empIds);
List<EmployeeVO> listEmployeeName();
IPage<EmployeeVO> pageByCondition(Page page, @Param("employee") EmployeeEntity employee);
@ -58,13 +60,13 @@ public interface EmployeeDao extends BaseMapper<EmployeeEntity> {
Long getUserId(Long id);
Boolean updatePassword(@Param("id")Long id,@Param("password")String password);
Boolean updatePassword(@Param("id") Long id, @Param("password") String password);
EmployeeInfoVO getInfo(Long id);
Boolean updateEmployee(EmployeeEntity employeeEntity);
Boolean updateUser(@Param("id")Long id, @Param("account")String account, @Param("modifyTime")Date modifyTime);
Boolean updateUser(@Param("id") Long id, @Param("account") String account, @Param("modifyTime") Date modifyTime);
Boolean deleteDepartment(Long id);
@ -72,11 +74,11 @@ public interface EmployeeDao extends BaseMapper<EmployeeEntity> {
Boolean deleteRole(Long id);
Boolean insertDepartment(@Param("id") Long id,@Param("deptIds") List<Long> ids);
Boolean insertDepartment(@Param("id") Long id, @Param("deptIds") List<Long> ids);
Boolean insertPosition(@Param("id") Long id,@Param("positionIds") List<Long> ids);
Boolean insertPosition(@Param("id") Long id, @Param("positionIds") List<Long> ids);
Boolean insertRole(@Param("id")Long id,@Param("roleIds") List<Long> roleIds);
Boolean insertRole(@Param("id") Long id, @Param("roleIds") List<Long> roleIds);
Boolean insertUser(UserEntity user);
@ -101,4 +103,6 @@ public interface EmployeeDao extends BaseMapper<EmployeeEntity> {
boolean insertUserRole(Long userId, Long roleId);
boolean insertUsrRole(@Param("list") List<DgGuaranteePO> list);
int saveUserRole(@Param("userId") Long userId, @Param("roleId") Long roleId);
}

@ -28,6 +28,8 @@ public interface DeptService extends IService<DeptEntity> {
List<DepartmentVO> listDepartmentAndEmployeeTree();
List<DepartmentVO> listDeptAndEmpTree(String name,List<Long> empIds);
DepartmentVO getDepartmentAndEmployee(Long id);
List<EmployeeVO> listEmployeeById(Long id);

@ -69,5 +69,7 @@ public interface EmployeeService extends IService<EmployeeEntity> {
boolean insertUserRole(Long userId, Long roleId);
boolean insertUsrRole(List<DgGuaranteePO> list);
Boolean saveUserRole(Long userId, Long roleId);
}

@ -107,6 +107,7 @@ public class DeptServiceImpl extends ServiceImpl<DeptDao, DeptEntity> implements
/**
* 树形结构部门查询
*
* @return
*/
@Override
@ -160,20 +161,23 @@ public class DeptServiceImpl extends ServiceImpl<DeptDao, DeptEntity> implements
/**
* 获取所有的部门及部门下的员工信息
*
* @return
*/
@Override
public List<DepartmentVO> listDepartmentAndEmployeeTree() {
return this.getListDepartmentAndEmployeeTree(deptDao.listDepartment(), 0L);
}
private List<DepartmentVO> getListDepartmentAndEmployeeTree(List<DepartmentVO> list, Long parentId){
private List<DepartmentVO> getListDepartmentAndEmployeeTree(List<DepartmentVO> list, Long parentId) {
return list.stream()
.filter(dept -> parentId.equals(dept.getParentId())) // 过滤出部门id为所选id的部门信息(也为递归的结果条件,找不到所对应的部门id)
.peek(dept -> {
dept.setChildren(getListDepartmentAndEmployeeTree(list, dept.getId())); // 设置该部门的子部门:递归调用
List<UserDeptVO> empList = employeeDao.employeeListByDeptId(dept.getId());
System.out.println("empList========================"+empList);
System.out.println("empList========================" + empList);
dept.setUserDept(employeeDao.employeeListByDeptId(dept.getId()));
@ -183,7 +187,25 @@ public class DeptServiceImpl extends ServiceImpl<DeptDao, DeptEntity> implements
.collect(Collectors.toList());
}
/**
* 根据条件获取所有部门及部门下的员工信息
*/
@Override
public List<DepartmentVO> listDeptAndEmpTree(String name, List<Long> empIds) {
return this.getListDepartmentAndEmployeeTree(deptDao.listDepartment(), 0L, name, empIds);
}
private List<DepartmentVO> getListDepartmentAndEmployeeTree(List<DepartmentVO> list, Long parentId, String name, List<Long> empIds) {
return list.stream()
.filter(dept -> parentId.equals(dept.getParentId())) // 过滤出部门id为所选id的部门信息(也为递归的结果条件,找不到所对应的部门id)
.peek(dept -> {
dept.setChildren(getListDepartmentAndEmployeeTree(list, dept.getId())); // 设置该部门的子部门:递归调用
dept.setEmployee(employeeDao.listEmployeeByDeptIdAndEmpId(dept.getId(), name, empIds)); // 设置该部门下面的所有员工
})
.sorted(Comparator.comparingInt(menu -> (menu.getSort() == null ? 0 : menu.getSort()))) // 根据所选排序信息进行排序
.collect(Collectors.toList());
}
/**
* 获取该部门下子部门及部门下的员工
@ -191,11 +213,11 @@ public class DeptServiceImpl extends ServiceImpl<DeptDao, DeptEntity> implements
@Override
public DepartmentVO getDepartmentAndEmployee(Long id) {
DepartmentVO departmentVO = new DepartmentVO();
if (id == null){
if (id == null) {
List<DepartmentVO> departments = deptDao.getDepartmentByParentId(0L);
departmentVO.setChildren(departments);
return departmentVO;
}else {
} else {
List<DepartmentVO> departments = deptDao.getDepartmentByParentId(id);
List<EmployeeVO> employeeS = employeeDao.listEmployeeByDeptId(id);
departmentVO.setChildren(departments);
@ -205,7 +227,6 @@ public class DeptServiceImpl extends ServiceImpl<DeptDao, DeptEntity> implements
}
/**
*
* 根据员工id获取对应部门下所有的客户经理
*
* @param id 员工id
@ -220,7 +241,7 @@ public class DeptServiceImpl extends ServiceImpl<DeptDao, DeptEntity> implements
/**
* 根据部门id获取该部门所有的员工id和姓名
*/
public List<EmployeeVO> listEmployeeByDeptId(Long deptId){
public List<EmployeeVO> listEmployeeByDeptId(Long deptId) {
return this.getBaseMapper().listEmployeeByDeptId(deptId);
}

@ -601,8 +601,23 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
return this.getBaseMapper().insertUserRole(userId,roleId);
}
@Override
public boolean insertUsrRole(List<DgGuaranteePO> list) {
return this.getBaseMapper().insertUsrRole(list);
}
/**
* 给用户赋予一个角色
*/
@Override
public Boolean saveUserRole(Long userId, Long roleId) {
int i = this.getBaseMapper().saveUserRole(userId, roleId);
if (i > 0){
return true;
}
return false;
}
}

@ -3,7 +3,7 @@
<mapper namespace="com.daqing.financial.hrms.dao.EmployeeDao">
<!-- 可根据自己的需求,是否要使用 -->
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="com.daqing.framework.domain.hrms.EmployeeEntity" id="employeeMap">
<result property="id" column="id"/>
<result property="name" column="name"/>
@ -131,13 +131,13 @@
<!-- 映射user实体类和数据库表主键,使之能获取到新增的主键 -->
<resultMap type="com.daqing.framework.domain.hrms.UserEntity" id="userMap">
<result property="id" column="id"/>
<result property="id" column="id"/>
</resultMap>
<resultMap type="com.daqing.framework.domain.hrms.ext.EmployeeTO" id="employeeTO">
<resultMap type="com.daqing.framework.domain.hrms.ext.EmployeeTO" id="employeeTO">
<id property="id" column="eid"/>
<result property="empName" column="emp_name"/>
<collection property="deptNames" ofType="string" >
<collection property="deptNames" ofType="string">
<result column="dept_name"/> <!-- 员工和部门是多对多,从单个员工的角度看为一对多 -->
</collection>
</resultMap>
@ -184,6 +184,29 @@
AND d.id = #{id}
</select>
<!-- 根据部门id获取该部门下面所有的员工 -->
<select id="listEmployeeByDeptIdAndEmpId" resultType="com.daqing.framework.domain.hrms.ext.EmployeeVO">
SELECT e.id,e.name
FROM hrms_employee e
LEFT JOIN hrms_employee_dept ed
ON e.id = ed.employee_id
LEFT JOIN hrms_dept d
ON ed.dept_id = d.id
LEFT JOIN hrms_user u
ON e.user_id = u.id
WHERE u.del_or_not = 0
AND d.id = #{id}
<if test="name != null and name != ''">
AND e.name LIKE CONCAT('%',#{name},'%')
</if>
<if test="empIds != null and empIds != ''">
AND e.id NOT IN
<foreach collection="empIds" item="empId" open="(" separator="," close=")">
#{empId}
</foreach>
</if>
</select>
<!-- 根据部门id获取该部门下面所有的员工 -->
<select id="employeeListByDeptId" parameterType="long" resultType="com.daqing.framework.domain.hrms.ext.UserDeptVO">
@ -219,17 +242,18 @@
LEFT JOIN hrms_employee_position ep ON e.id = ep.emp_id
LEFT JOIN hrms_position p ON p.id = ep.position_id
<where>
<if test="employee.name != null and employee.name != ''">
e.`name` LIKE CONCAT('%',#{employee.name},'%')
</if>
<if test="employee.jobNumber != null and employee.jobNumber != ''">
AND e.job_number = #{employee.jobNumber}
</if>
AND u.del_or_not = 0
<if test="employee.name != null and employee.name != ''">
e.`name` LIKE CONCAT('%',#{employee.name},'%')
</if>
<if test="employee.jobNumber != null and employee.jobNumber != ''">
AND e.job_number = #{employee.jobNumber}
</if>
AND u.del_or_not = 0
</where>
</select>
<select id="pageList" parameterType="com.daqing.framework.domain.hrms.request.EmployeeRequest" resultMap="employeeList">
<select id="pageList" parameterType="com.daqing.framework.domain.hrms.request.EmployeeRequest"
resultMap="employeeList">
SELECT e.id id,e.name name,u.account account,e.job_number job_number,
u.create_time create_time,u.status status
FROM hrms_employee e
@ -237,7 +261,8 @@
ON e.user_id = u.id
WHERE u.del_or_not = 0
<if test="employee.codeOrName != null and employee.codeOrName != ''">
AND (e.name LIKE CONCAT('%',#{employee.codeOrName},'%') OR u.account LIKE CONCAT('%',#{employee.codeOrName},'%')
AND (e.name LIKE CONCAT('%',#{employee.codeOrName},'%') OR u.account LIKE
CONCAT('%',#{employee.codeOrName},'%')
OR e.job_number LIKE CONCAT('%',#{employee.codeOrName},'%'))
</if>
</select>
@ -251,7 +276,8 @@
WHERE u.del_or_not = 0
</select>
<select id="pageListByDept" parameterType="com.daqing.framework.domain.hrms.request.EmployeeRequest" resultMap="employeeList">
<select id="pageListByDept" parameterType="com.daqing.framework.domain.hrms.request.EmployeeRequest"
resultMap="employeeList">
SELECT e.id id,e.name name,u.account account,e.job_number job_number,
u.create_time create_time,u.status status
FROM hrms_employee e
@ -266,7 +292,8 @@
AND d.id = #{employee.id}
</if>
<if test="employee.codeOrName != null and employee.codeOrName != ''">
AND (e.name LIKE CONCAT('%',#{employee.codeOrName},'%') OR u.account LIKE CONCAT('%',#{employee.codeOrName},'%')
AND (e.name LIKE CONCAT('%',#{employee.codeOrName},'%') OR u.account LIKE
CONCAT('%',#{employee.codeOrName},'%')
OR e.job_number LIKE CONCAT('%',#{employee.codeOrName},'%'))
</if>
</select>
@ -448,12 +475,20 @@
VALUES (#{userId},#{roleId})
</insert>
<insert id="insertEmployee" keyProperty="id" useGeneratedKeys="true" parameterType="com.daqing.framework.domain.hrms.EmployeeEntity">
<insert id="saveUserRole">
INSERT INTO hrms_employee_role
(user_id,role_id)
VALUES (#{userId},#{roleId})
</insert>
<insert id="insertEmployee" keyProperty="id" useGeneratedKeys="true"
parameterType="com.daqing.framework.domain.hrms.EmployeeEntity">
INSERT INTO hrms_employee (name,job_number,gender,birthday,phone,company_mail,user_id)
VALUES (#{name},#{jobNumber},#{gender},#{birthday},#{phone},#{companyMail},#{userId})
</insert>
<insert id="insertUser" keyProperty="id" useGeneratedKeys="true" parameterType="com.daqing.framework.domain.hrms.UserEntity">
<insert id="insertUser" keyProperty="id" useGeneratedKeys="true"
parameterType="com.daqing.framework.domain.hrms.UserEntity">
INSERT INTO hrms_user (account,phone_account,create_time,motify_time) VALUES (#{account},#{phoneAccount},#{createTime},#{motifyTime})
</insert>
@ -485,16 +520,17 @@
</select>
<update id="updateEmployeeAndUser" parameterType="com.daqing.framework.domain.hrms.EmployeeEntity">
UPDATE hrms_employee SET gender = #{gender},office_phone = #{officePhone},phone = #{phone},
company_mail = #{companyMail},spare_mail = #{spareMail}
<if test="headPortaritUrl != null and headPortaritUrl != ''">
,head_portarit_url = #{headPortaritUrl}
</if>
WHERE id = #{id}
UPDATE hrms_employee SET gender = #{gender},office_phone = #{officePhone},phone = #{phone},
company_mail = #{companyMail},spare_mail = #{spareMail}
<if test="headPortaritUrl != null and headPortaritUrl != ''">
,head_portarit_url = #{headPortaritUrl}
</if>
WHERE id = #{id}
</update>
<!-- 根据id查询员工头像 -->
<select id="getEmployeeEntityByUserId" parameterType="long" resultType="com.daqing.framework.domain.hrms.EmployeeEntity">
<select id="getEmployeeEntityByUserId" parameterType="long"
resultType="com.daqing.framework.domain.hrms.EmployeeEntity">
SELECT head_portarit_url
FROM hrms_employee
WHERE user_id = #{userId}
@ -523,7 +559,8 @@
AND e.job_number = #{jobNumber}
</select>
<select id="getEmployeeRepetitionByEmpId" parameterType="long" resultType="com.daqing.framework.domain.hrms.ext.EmployeeRepetition">
<select id="getEmployeeRepetitionByEmpId" parameterType="long"
resultType="com.daqing.framework.domain.hrms.ext.EmployeeRepetition">
SELECT e.name name,e.job_number job_number,u.account account
FROM hrms_employee e
LEFT JOIN hrms_user u
@ -532,7 +569,8 @@
AND e.id = #{empId}
</select>
<select id="getAccountAndDeptNameById" parameterType="long" resultType="com.daqing.framework.domain.guarantee.response.EmployeeMessageResponse">
<select id="getAccountAndDeptNameById" parameterType="long"
resultType="com.daqing.framework.domain.guarantee.response.EmployeeMessageResponse">
select hu.id, hu.account, GROUP_CONCAT(hd.`name` SEPARATOR '/')deptName
from hrms_employee_dept ed
LEFT JOIN hrms_dept hd on hd.id=ed.dept_id

@ -32,7 +32,8 @@ public enum CommonCode implements ResultCode {
POSITION_DEPT_NOT_NULL(false,10014,"职位名称或所属部门不能为空!"),
PASSWORD_IS_ERROR(false, 10005, "密码错误!"),
IMPORT_ERROR(false,10008,"导入数据失败!"),
SERVER_ERROR(false, 99999, "抱歉,系统繁忙,请稍后重试!");
SERVER_ERROR(false, 99999, "抱歉,系统繁忙,请稍后重试!"),
GET_LOGIN_USER_FAIL(false,10015,"获取当前登录用户失败,请稍后重试!");
/**
* 操作是否成功

@ -35,17 +35,29 @@ public class DgComplianceInvestigation implements Serializable {
/**
* 用户id
*/
private Integer empId;
private Integer userId;
/**
* 贷款信息表id
*/
private Integer businessId;
/**
* 角色id
*/
private Integer roleId;
/**
* 附件
*/
@ApiModelProperty("附件")
private String file;
/**
* 审核意见
* 调查意见
*/
private String remark;
@ApiModelProperty("审核(调查)意见")
private String opinion;
/**
* 审核状态
@ -57,21 +69,17 @@ public class DgComplianceInvestigation implements Serializable {
*/
private Integer operationStatus;
@ApiModelProperty(value = "创建时间")
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private Date createTime;
@ApiModelProperty(value = "更新时间")
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
@ApiModelProperty("贷款信息表id")
private Integer businessId;
@ApiModelProperty("角色id")
private Integer roleId;
@ApiModelProperty("调查意见")
private String surveyOpinion;
}

@ -44,7 +44,7 @@ public class DgGuaranteeAssignUser implements Serializable {
private Integer companyId;
/**
* 员工id
* 用户id
*/
private Integer empId;

@ -32,11 +32,21 @@ public class DgLoanCommitteeConsider implements Serializable {
*/
private Integer companyId;
/**
* 业务id
*/
private Integer businessId;
/**
* 审议者id
*/
private Integer considerId;
/**
* 角色id
*/
private Integer roleId;
@ApiModelProperty(value = "审核状态:(1审核中 、2已审核、4驳回)")
private Integer status;

@ -33,19 +33,35 @@ public class DgWorkConferenceConsider implements Serializable {
private Integer companyId;
/**
* 审议者id
* 业务id
*/
private Integer considerId;
private Integer businessId;
/**
* 角色id
*/
private Integer roleId;
/**
* 工作会意见
* 审议者id
*/
private Integer considerId;
@ApiModelProperty("工作会意见")
private String remark;
@ApiModelProperty("参会评委")
private String joinJudge;
/**
* 审核状态
*/
private Integer status;
private Integer auditStatus;
/**
* 操作状态
*/
private Integer operationStatus;
@ApiModelProperty(value = "创建时间")
@TableField(fill = FieldFill.INSERT)

@ -18,9 +18,15 @@ public enum GuaranteeCode implements ResultCode {
COMPLIANCE_INVESTIGATION_REMARK_NOT_NULL(false,80001,"意见不能为空,请输入拒绝/驳回意见!"),
COMPLIANCE_UPLOAD_NOT_NULL(false,80002,"附件不能为空,请上传附件!"),
COMPLIANCE_USER_NOT_NULL(false,80003,"指派调查员不能为空,请选择指派员!"),
ROLE_IS_NOT(false,90001,"当前登录用户角色信息不存在,无法查询!");
ROLE_IS_NOT(false,90001,"当前登录用户角色信息不存在,无法查询!"),
LOAN_MESSAGE_NOT_NULL(false,100001,"议定事项、附加事项、贷款金额、贷款期限、附件等不能为空!"),
WORK_JUDGE_NOT_NULL(false,110001,"参会评委不能为空,请重新选择!"),
EXCEL_ID_NOT_NULL(false, 120001,"导出的数据不能为空,请选择要导出的数据!");
/**
* 操作是否成功

@ -0,0 +1,64 @@
package com.daqing.framework.domain.guarantee.po;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.util.Date;
/**
* AB角合规调查资产调查信息调查法规调查的审核意见审核人id时间
*
* @auther River
* @date 2020/11/25 16:43
*/
@Data
@ToString
public class AuditOpinionPO implements Serializable {
@ApiModelProperty("担保A角调查意见")
private String aAuditOpinion;
@ApiModelProperty("A角姓名")
private Integer aEmpId;
@ApiModelProperty("A角调查时间")
private Date aTime;
@ApiModelProperty("担保B角调查意见")
private String bAuditOpinion;
@ApiModelProperty("B角姓名")
private String bEmpId;
@ApiModelProperty("B角调查时间")
private Date bTime;
@ApiModelProperty("资产审核意见")
private String assetAuditOpinion;
@ApiModelProperty("资产姓名")
private String assetEmpId;
@ApiModelProperty("资产审核时间")
private Date assetTime;
@ApiModelProperty("信息审核意见")
private String messageAuditOpinion;
@ApiModelProperty("信息姓名")
private String messageEmpId;
@ApiModelProperty("信息审核时间")
private Date messageTime;
@ApiModelProperty("法规审核意见")
private String regulationAuditOpinion;
@ApiModelProperty("法规姓名")
private String regulationEmpId;
@ApiModelProperty("法规审核时间")
private Date regulationTime;
}

@ -0,0 +1,73 @@
package com.daqing.framework.domain.guarantee.po;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.util.Date;
/**
* @auther River
* @date 2020/11/23 16:17
*/
@Data
@ToString
public class DgWorkConferencePO implements Serializable {
@ApiModelProperty("工作会表id")
private Integer id;
@ApiModelProperty("业务编号")
private String businessCode;
@ApiModelProperty("客户名称")
private String name;
@ApiModelProperty("联系电话")
private String phone;
@ApiModelProperty("业务类别")
private String businessType;
@ApiModelProperty("金额")
private Double applyAmount;
@ApiModelProperty("期限")
private String applyTime;
@ApiModelProperty("申请日期")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date createTime;
@ApiModelProperty("A角")
private Integer aUserId;
@ApiModelProperty("B角")
private Integer bUserId;
@ApiModelProperty("法规部领导")
private Integer iUserId;
@ApiModelProperty("资产部领导")
private Integer assUserId;
@ApiModelProperty("信息部领导")
private Integer mUserId;
@ApiModelProperty("操作状态,0:已发起,1:待处理,2:已处理")
private Integer operationStatus;
@ApiModelProperty("审核状态,0:待指派,1:审核中,2:已审核,3:已拒绝,4:已驳回,5:草稿,6:已撤销")
private Integer auditStatus;
@ApiModelProperty("业务状态,1->进行中;2->已完成;3->已否决")
private Integer businessStatus;
@ApiModelProperty("角色id")
private Integer roleId;
@ApiModelProperty("业务id")
private Integer businessId;
}
Loading…
Cancel
Save