合规调查

master
river 4 years ago
parent 4e634f07d2
commit 3ae40fc948
  1. 11
      dq-financial-api/src/main/java/com/daqing/financial/guarantee/DgStatisticsControllerApi.java
  2. 37
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgComplianceInvestigationController.java
  3. 15
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java
  4. 5
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgStatisticsController.java
  5. 18
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgComplianceInvestigationMapper.java
  6. 18
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgEfficiencyMapper.java
  7. 24
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/DgComplianceInvestigationRequest.java
  8. 42
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/DgEfficiencyPersonRequest.java
  9. 43
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/DgEfficiencyTeamRequest.java
  10. 54
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgComplianceInvestigationResponse.java
  11. 9
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgComplianceInvestigationService.java
  12. 12
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgEfficiencyService.java
  13. 73
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgComplianceInvestigationServiceImpl.java
  14. 14
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java
  15. 38
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgComplianceInvestigationMapper.xml
  16. 65
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgEfficiencyMapper.xml
  17. 1
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeInvestigationMapper.xml
  18. 2
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgStatisticsMapper.xml
  19. 3
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/DeptController.java
  20. 2
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/DeptDao.java
  21. 2
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/DeptService.java
  22. 2
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/DeptServiceImpl.java
  23. 7
      dq-financial-hrms/src/main/resources/mapper/hrms/DeptDao.xml
  24. 50
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/GuaranteeCode.java
  25. 57
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/DgEfficiencyPersonPO.java
  26. 7
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/DgEfficiencyTeamPO.java
  27. 3
      dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/ext/EmployeeVO.java

@ -1,11 +0,0 @@
package com.daqing.financial.guarantee;
import io.swagger.annotations.Api;
/**
* @auther River
* @date 2020/11/5 14:29
*/
@Api(value = "担保业务统计",tags = "提供业务统计增删改查的方法")
public interface DgStatisticsControllerApi {
}

@ -1,9 +1,14 @@
package com.daqing.financial.guarantee.controller; package com.daqing.financial.guarantee.controller;
import org.springframework.web.bind.annotation.RequestMapping; import com.daqing.financial.guarantee.model.request.DgComplianceInvestigationRequest;
import com.daqing.financial.guarantee.model.response.DgComplianceInvestigationResponse;
import org.springframework.web.bind.annotation.RestController; import com.daqing.financial.guarantee.service.IDgComplianceInvestigationService;
import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/** /**
* <p> * <p>
@ -14,7 +19,31 @@ import org.springframework.web.bind.annotation.RestController;
* @since 2020-11-05 * @since 2020-11-05
*/ */
@RestController @RestController
@RequestMapping("/dg-compliance-investigation") @RequestMapping("/compliance/investigation")
@Api(value = "合规调查",tags = "合规调查")
public class DgComplianceInvestigationController { public class DgComplianceInvestigationController {
@Autowired
private IDgComplianceInvestigationService iDgComplianceInvestigationService;
/**
* 列表
*/
@GetMapping("/list")
@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));
}
/**
* 调查同意
*/
@PostMapping("/surveyConsent")
@ApiOperation(value = "调查同意",notes = "调查同意")
public ResponseResult surveyConsent(@RequestParam("iid") Integer iid,
@RequestParam("fileUrl") String fileUrl,@RequestParam("auditOpinion") String auditOpinion) {
Boolean result = iDgComplianceInvestigationService.surveyConsent(iid, fileUrl, auditOpinion);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
} }

@ -0,0 +1,15 @@
package com.daqing.financial.guarantee.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 流程效率
*
* @auther River
* @date 2020/11/5 14:20
*/
@RestController
@RequestMapping("/guarantee/efficiency")
public class DgEfficiencyController {
}

@ -1,11 +1,11 @@
package com.daqing.financial.guarantee.controller; package com.daqing.financial.guarantee.controller;
import com.daqing.financial.guarantee.DgStatisticsControllerApi;
import com.daqing.financial.guarantee.model.request.DgStatisticsRequest; import com.daqing.financial.guarantee.model.request.DgStatisticsRequest;
import com.daqing.financial.guarantee.model.response.DgStatisticsListRefuseResponse; import com.daqing.financial.guarantee.model.response.DgStatisticsListRefuseResponse;
import com.daqing.financial.guarantee.model.response.DgStatisticsListResponse; import com.daqing.financial.guarantee.model.response.DgStatisticsListResponse;
import com.daqing.financial.guarantee.service.IDgStatisticsService; import com.daqing.financial.guarantee.service.IDgStatisticsService;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -23,7 +23,8 @@ import javax.servlet.http.HttpServletResponse;
*/ */
@RestController @RestController
@RequestMapping("/guarantee/statistics") @RequestMapping("/guarantee/statistics")
public class DgStatisticsController implements DgStatisticsControllerApi { @Api(value = "担保业务统计",tags = "提供业务统计增删改查的方法")
public class DgStatisticsController {
@Autowired @Autowired
private IDgStatisticsService iDgStatisticsService; private IDgStatisticsService iDgStatisticsService;

@ -1,8 +1,15 @@
package com.daqing.financial.guarantee.mapper; package com.daqing.financial.guarantee.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; 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.DgComplianceInvestigationRequest;
import com.daqing.financial.guarantee.model.response.DgComplianceInvestigationResponse;
import com.daqing.framework.domain.guarantee.DgComplianceInvestigation; import com.daqing.framework.domain.guarantee.DgComplianceInvestigation;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
/** /**
* <p> * <p>
@ -15,4 +22,15 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface DgComplianceInvestigationMapper extends BaseMapper<DgComplianceInvestigation> { public interface DgComplianceInvestigationMapper extends BaseMapper<DgComplianceInvestigation> {
IPage<DgComplianceInvestigationResponse> list(Page page, @Param("cr") DgComplianceInvestigationRequest dgComplianceInvestigationRequest);
Boolean surveyConsent(@Param("iid") Integer iid, @Param("fileUrl") String fileUrl,
@Param("auditOpinion") String auditOpinion, @Param("date")Date date,
@Param("empId") Integer empId);
Boolean surveyReturn(@Param("iid") Integer iid,@Param("auditOpinion") String auditOpinion,
@Param("empId") Integer empId,@Param("date") Date date);
Boolean surveyRefuse(@Param("iid") Integer iid,@Param("auditOpinion") String auditOpinion,
@Param("empId")Integer empId,@Param("date") Date date);
} }

@ -0,0 +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.DgEfficiencyPersonRequest;
import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
import com.daqing.framework.domain.guarantee.po.DgEfficiencyPersonPO;
import org.apache.ibatis.annotations.Param;
/**
* @auther River
* @date 2020/11/10 11:30
*/
public interface DgEfficiencyMapper extends BaseMapper<DgApplyAmountInfo> {
IPage<DgEfficiencyPersonPO> personList(Page page, @Param("pr")DgEfficiencyPersonRequest dgEfficiencyPersonRequest);
}

@ -0,0 +1,24 @@
package com.daqing.financial.guarantee.model.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
/**
* 合规调查请求参数
*
* @auther River
* @date 2020/11/11 16:16
*/
@Data
@ToString
public class DgComplianceInvestigationRequest implements Serializable {
@ApiModelProperty("流程状态,0:驳回,1:审批中")
private Integer status;
@ApiModelProperty("业务编号或者客户名称")
private String codeOrName;
}

@ -0,0 +1,42 @@
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 java.io.Serializable;
import java.util.Date;
/**
* 业务效率个人请求参数
*
* @auther River
* @date 2020/11/11 10:39
*/
@Data
@ToString
public class DgEfficiencyPersonRequest implements Serializable {
@ApiModelProperty("申请时间,固定类型,0:今天,1:昨天,2:本周,3:本月,4:本年")
private Integer createFixedTime;
@ApiModelProperty("申请时间,自定义时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date createCustomTime;
@ApiModelProperty("流程状态,0->我发起,1->待审批,2->已审批,3->抄送我")
private Integer flowStatus;
@ApiModelProperty("提单人或者客户名称")
private String empOrName;
@ApiModelProperty("操作人id")
private Integer personId;
@ApiModelProperty("辅助字段,不用管,起始时间")
private String startTime;
@ApiModelProperty("辅助字段,不用管,结束时间")
private String endTime;
}

@ -0,0 +1,43 @@
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 java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 业务效率团队请求参数
*
* @auther River
* @date 2020/11/10 16:00
*/
@Data
@ToString
public class DgEfficiencyTeamRequest implements Serializable {
@ApiModelProperty("申请时间,固定类型,0:今天,1:昨天,2:本周,3:本月,4:本年")
private Integer createFixedTime;
@ApiModelProperty("申请时间,自定义时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date createCustomTime;
@ApiModelProperty("流程状态,1->审核中,2->已审核,3->拒绝,4->驳回,5->撤销")
private Integer flowStatus;
@ApiModelProperty("提单人或者客户名称")
private String empOrName;
@ApiModelProperty("该团队(部门)下所有提单人(员工)")
private List<Integer> empIds;
@ApiModelProperty("辅助字段,不用管,起始时间")
private String startTime;
@ApiModelProperty("辅助字段,不用管,结束时间")
private String endTime;
}

@ -0,0 +1,54 @@
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/11 16:22
*/
@Data
@ToString
public class DgComplianceInvestigationResponse 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("当前审批人")
private String empName;
@ApiModelProperty("状态,0:,1:,2:,3:,4:")
private Integer status;
@ApiModelProperty("合规调查表id")
private Integer iId;
}

@ -1,7 +1,9 @@
package com.daqing.financial.guarantee.service; package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.financial.guarantee.model.request.DgComplianceInvestigationRequest;
import com.daqing.framework.domain.guarantee.DgComplianceInvestigation; import com.daqing.framework.domain.guarantee.DgComplianceInvestigation;
import com.daqing.framework.utils.PageUtils;
/** /**
* <p> * <p>
@ -13,4 +15,11 @@ import com.daqing.framework.domain.guarantee.DgComplianceInvestigation;
*/ */
public interface IDgComplianceInvestigationService extends IService<DgComplianceInvestigation> { public interface IDgComplianceInvestigationService extends IService<DgComplianceInvestigation> {
PageUtils list(Integer page, Integer size, DgComplianceInvestigationRequest dgComplianceInvestigationRequest);
Boolean surveyConsent(Integer iid, String fileUrl, String auditOpinion);
Boolean surveyReturn(Integer iid,String auditOpinion);
Boolean surveyRefuse(Integer iid,String auditOpinion);
} }

@ -0,0 +1,12 @@
package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
/**
* @auther River
* @date 2020/11/10 11:33
*/
public interface IDgEfficiencyService extends IService<DgApplyAmountInfo> {
}

@ -1,11 +1,21 @@
package com.daqing.financial.guarantee.service.impl; 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.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.daqing.financial.guarantee.service.IDgComplianceInvestigationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.framework.domain.guarantee.DgComplianceInvestigation; import com.daqing.framework.domain.guarantee.DgComplianceInvestigation;
import com.daqing.framework.domain.guarantee.GuaranteeCode;
import com.daqing.framework.exception.ExceptionCast;
import com.daqing.framework.model.response.CommonCode;
import com.daqing.framework.utils.PageUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date;
/** /**
* <p> * <p>
* 合规调查 服务实现类 * 合规调查 服务实现类
@ -15,6 +25,67 @@ import org.springframework.stereotype.Service;
* @since 2020-11-05 * @since 2020-11-05
*/ */
@Service @Service
public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplianceInvestigationMapper, DgComplianceInvestigation> implements IDgComplianceInvestigationService { public class DgComplianceInvestigationServiceImpl extends ServiceImpl<DgComplianceInvestigationMapper, DgComplianceInvestigation>
implements IDgComplianceInvestigationService {
/**
* 列表
*/
@Override
public PageUtils list(Integer page, Integer size, DgComplianceInvestigationRequest dgComplianceInvestigationRequest) {
if (page == null || size == null){
page = 1;
size = 10;
}
IPage<DgComplianceInvestigationResponse> list = this.getBaseMapper().list(new Page(page, size), dgComplianceInvestigationRequest);
return new PageUtils(list);
}
/**
* 调查同意
*/
@Override
public Boolean surveyConsent(Integer iid, String fileUrl, String auditOpinion) {
if (iid == null || fileUrl == null || fileUrl.length() == 0){
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
// 获取登录用户id
Integer userId = 1;
return this.getBaseMapper().surveyConsent(iid, fileUrl, auditOpinion, new Date(), userId);
}
/**
* 调查驳回
*/
@Override
public Boolean surveyReturn(Integer iid, String auditOpinion) {
if (iid == null){
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
if (auditOpinion == null || auditOpinion.length() == 0){
ExceptionCast.cast(GuaranteeCode.COMPLIANCE_INVESTIGATION_REMARK_NOT_NULL);
}
// 获取登录用户id
Integer userId = 1;
// TODO 驳回至资产调查指派A/B角
return this.getBaseMapper().surveyReturn(iid,auditOpinion,userId,new Date());
}
/**
* 调查拒绝
*/
@Override
public Boolean surveyRefuse(Integer iid, String auditOpinion) {
if (iid == null){
ExceptionCast.cast(CommonCode.INVALID_PARAM);
}
if (auditOpinion == null || auditOpinion.length() == 0){
ExceptionCast.cast(GuaranteeCode.COMPLIANCE_INVESTIGATION_REMARK_NOT_NULL);
}
// 获取登录用户id
Integer userId = 1;
// TODO 直接拒接至初始状态
return this.getBaseMapper().surveyRefuse(iid,auditOpinion,userId,new Date());
}
} }

@ -0,0 +1,14 @@
package com.daqing.financial.guarantee.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.mapper.DgEfficiencyMapper;
import com.daqing.financial.guarantee.service.IDgEfficiencyService;
import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
/**
* @auther River
* @date 2020/11/10 11:34
*/
public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgApplyAmountInfo> implements IDgEfficiencyService {
}

@ -14,4 +14,42 @@
<result column="update_time" property="updateTime" /> <result column="update_time" property="updateTime" />
</resultMap> </resultMap>
<select id="list" parameterType="com.daqing.financial.guarantee.model.request.DgComplianceInvestigationRequest" 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,p.emp_name AS emp_name,
i.status AS status,i.id AS iid
FROM dg_apply_amount_info AS a
LEFT JOIN dg_audit_process AS p
ON a.id = p.apply_amount_info_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
WHERE c.del_or_not = 0
<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>
ORDER BY a.create_time DESC
</select>
<!-- 调查同意 -->
<update id="surveyConsent">
UPDATE dg_compliance_investigation SET emp_id = #{empId},file = #{fileUrl},remark = #{auditOpinion},status = 2,update_time = #{date}
WHERE id = #{iid}
</update>
<!-- 调查驳回 -->
<update id="surveyReturn">
UPDATE dg_compliance_investigation SET emp_id = #{empId},remark = #{auditOpinion},status = 3,update_time = #{date}
WHERE id = #{iid}
</update>
<!-- 调查拒绝 -->
<update id="surveyRefuse">
UPDATE dg_compliance_investigation SET emp_id = #{empId},remark = #{auditOpinion},status = 4,update_time = #{date}
WHERE id = #{iid}
</update>
</mapper> </mapper>

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.daqing.financial.guarantee.mapper.DgEfficiencyMapper">
<resultMap id="BaseResultMap" type="com.daqing.framework.domain.guarantee.DgApplyAmountInfo">
<id column="id" property="id" />
<result column="company_id" property="companyId" />
<result column="presenter_id" property="presenterId" />
<result column="apply_amount" property="applyAmount" />
<result column="apply_time" property="applyTime" />
<result column="bank" property="bank" />
<result column="amount_wide" property="amountWide" />
<result column="en_guarantee_measures" property="enGuaranteeMeasures" />
<result column="business_type" property="businessType" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
</resultMap>
<select id="teamList" parameterType="com.daqing.financial.guarantee.model.request.DgEfficiencyTeamRequest" resultType="com.daqing.framework.domain.guarantee.po.DgEfficiencyTeamPO">
SELECT c.id AS id,c.name AS name,a.presenter_id AS presenter_id,a.create_time AS create_time,a.,p.emp_name AS emp_name,
p.status AS status,p.date_time AS date_time
FROM dg_apply_amount_info AS a
LEFT JOIN (SELECT apply_amount_info_id,emp_name,status,date_time FROM dg_audit_process WHERE (apply_amount_info_id,date_time) IN
(SELECT apply_amount_info_id,MAX(date_time) FROM dg_audit_process GROUP BY apply_amount_info_id)) AS p
ON a.id = p.apply_amount_info_id
LEFT JOIN crms_customer AS c
ON a.company_id = c.id
WHERE c.del_or_not = 0
</select>
<select id="personList" parameterType="com.daqing.financial.guarantee.model.request.DgEfficiencyPersonRequest" resultType="com.daqing.framework.domain.guarantee.po.DgEfficiencyPersonPO">
SELECT c.id AS id,c.name AS name,a.presenter_id AS presenter_id,a.create_time AS create_time,a.status AS flow_status,
p.emp_name AS emp_name,p.status AS status,p.date_time AS date_time
FROM dg_apply_amount_info AS a
LEFT JOIN (SELECT apply_amount_info_id,emp_name,status,date_time,emp_id FROM dg_audit_process WHERE (apply_amount_info_id,date_time) IN
(SELECT apply_amount_info_id,MAX(date_time) FROM dg_audit_process GROUP BY apply_amount_info_id)) AS p
ON a.id = p.apply_amount_info_id
LEFT JOIN crms_customer AS c
ON a.company_id = c.id
WHERE c.del_or_not = 0
<if test="pr.flowStatus == null">
AND (
a.presenter_id = #{pr.personId}
OR
p.emp_id = #{pr.personId}
)
</if>
<if test="pr.flowStatus == 0">
AND a.presenter_id = #{pr.personId}
</if>
<if test="pr.flowStatus == 1">
AND p.emp_id = #{pr.personId}
</if>
<if test="pr.empOrName != null and pr.empOrName != ''">
AND c.name LIKE CONCAT('%',#{sr.empOrName},'%')
</if>
<if test="pr.startTime != null and pr.startTime != ''">
AND a.create_time &gt;= #{pr.startTime}
</if>
<if test="pr.endTime != null and pr.endTime != ''">
AND a.create_time &lt;= #{pr.endTime}
</if>
ORDER BY a.create_time DESC
</select>
</mapper>

@ -18,5 +18,4 @@
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" /> <result column="update_time" property="updateTime" />
</resultMap> </resultMap>
</mapper> </mapper>

@ -16,6 +16,7 @@
<result column="update_time" property="updateTime" /> <result column="update_time" property="updateTime" />
</resultMap> </resultMap>
<!-- 业务统计列表 -->
<select id="list" parameterType="com.daqing.financial.guarantee.model.request.DgStatisticsRequest" resultType="com.daqing.framework.domain.guarantee.po.DgStatisticsPO"> <select id="list" parameterType="com.daqing.financial.guarantee.model.request.DgStatisticsRequest" resultType="com.daqing.framework.domain.guarantee.po.DgStatisticsPO">
SELECT c.name AS name,c.phone AS phone,a.presenter_id AS presenter_id,a.apply_amount AS apply_amount,a.apply_time AS apply_time, SELECT c.name AS name,c.phone AS phone,a.presenter_id AS presenter_id,a.apply_amount AS apply_amount,a.apply_time AS apply_time,
a.business_type AS business_type,a.create_time AS create_time,a.business_code AS business_code,p.emp_name AS emp_name, a.business_type AS business_type,a.create_time AS create_time,a.business_code AS business_code,p.emp_name AS emp_name,
@ -42,6 +43,7 @@
ORDER BY a.create_time DESC ORDER BY a.create_time DESC
</select> </select>
<!-- 业务统计拒绝列表 -->
<select id="listRefuse" parameterType="com.daqing.financial.guarantee.model.request.DgStatisticsRequest" resultType="com.daqing.framework.domain.guarantee.po.DgStatisticsRefusePO"> <select id="listRefuse" parameterType="com.daqing.financial.guarantee.model.request.DgStatisticsRequest" resultType="com.daqing.framework.domain.guarantee.po.DgStatisticsRefusePO">
SELECT c.name AS name,c.phone AS phone,a.presenter_id AS presenter_id,a.apply_amount AS apply_amount,a.apply_time AS apply_time, SELECT c.name AS name,c.phone AS phone,a.presenter_id AS presenter_id,a.apply_amount AS apply_amount,a.apply_time AS apply_time,
a.business_type AS business_type,a.create_time AS create_time,a.business_code AS business_code,p.emp_name AS emp_name, a.business_type AS business_type,a.create_time AS create_time,a.business_code AS business_code,p.emp_name AS emp_name,

@ -132,8 +132,7 @@ public class DeptController implements DeptControllerApi {
@GetMapping("/listEmployeeById") @GetMapping("/listEmployeeById")
public ResponseResult listEmployeeById(@RequestParam("id") Long id){ public ResponseResult listEmployeeById(@RequestParam("id") Long id){
return new ResponseResult<List<EmployeeEntity>>().SUCCESS(deptService.listEmployeeById(id)); return ResponseResult.SUCCESS(deptService.listEmployeeById(id));
} }
} }

@ -31,7 +31,7 @@ public interface DeptDao extends BaseMapper<DeptEntity> {
List<DepartmentVO> listDepartmentIdAndName(); List<DepartmentVO> listDepartmentIdAndName();
List<EmployeeEntity> listEmployeeById(Long id); List<EmployeeVO> listEmployeeById(Long id);
List<EmployeeVO> listEmployeeByDeptId(Long deptId); List<EmployeeVO> listEmployeeByDeptId(Long deptId);
} }

@ -30,7 +30,7 @@ public interface DeptService extends IService<DeptEntity> {
DepartmentVO getDepartmentAndEmployee(Long id); DepartmentVO getDepartmentAndEmployee(Long id);
List<EmployeeEntity> listEmployeeById(Long id); List<EmployeeVO> listEmployeeById(Long id);
List<EmployeeVO> listEmployeeByDeptId(Long deptId); List<EmployeeVO> listEmployeeByDeptId(Long deptId);
} }

@ -202,7 +202,7 @@ public class DeptServiceImpl extends ServiceImpl<DeptDao, DeptEntity> implements
* @return * @return
*/ */
@Override @Override
public List<EmployeeEntity> listEmployeeById(Long id) { public List<EmployeeVO> listEmployeeById(Long id) {
return this.getBaseMapper().listEmployeeById(id); return this.getBaseMapper().listEmployeeById(id);
} }

@ -45,14 +45,17 @@
SELECT id,name FROM hrms_dept SELECT id,name FROM hrms_dept
</select> </select>
<select id="listEmployeeById" parameterType="long" resultType="com.daqing.framework.domain.hrms.EmployeeEntity"> <select id="listEmployeeById" parameterType="long" resultType="com.daqing.framework.domain.hrms.ext.EmployeeVO">
SELECT DISTINCT e.id id,e.name name SELECT DISTINCT e.id id,e.name name
FROM hrms_employee e FROM hrms_employee e
LEFT JOIN hrms_user u
ON e.user_id = u.id
LEFT JOIN hrms_employee_dept ed LEFT JOIN hrms_employee_dept ed
ON e.id = ed.employee_id ON e.id = ed.employee_id
LEFT JOIN hrms_dept d LEFT JOIN hrms_dept d
ON d.id = ed.dept_id ON d.id = ed.dept_id
WHERE d.id IN WHERE u.del_or_not = 0
AND d.id IN
( SELECT d.id ( SELECT d.id
FROM hrms_dept d FROM hrms_dept d
LEFT JOIN hrms_employee_dept ed LEFT JOIN hrms_employee_dept ed

@ -0,0 +1,50 @@
package com.daqing.framework.domain.guarantee;
import com.daqing.framework.model.response.ResultCode;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;
/**
* 担保模块状态集合
*
* @auther River
* @date 2020/11/12 16:13
*/
@ToString
@AllArgsConstructor
public enum GuaranteeCode implements ResultCode {
COMPLIANCE_INVESTIGATION_REMARK_NOT_NULL(false,80001,"驳回或拒绝时,意见不能为空!");
/**
* 操作是否成功
*/
@Getter
private boolean success;
/**
* 状态码
*/
@Getter
private int code;
/**
* 提示信息
*/
@Getter
private String message;
public boolean success() {
return this.success;
}
public int code() {
return this.code;
}
public String message() {
return this.message;
}
}

@ -0,0 +1,57 @@
package com.daqing.framework.domain.guarantee.po;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.util.Date;
/**
* 业务效率个人
*
* @auther River
* @date 2020/11/11 10:41
*/
@Data
@ToString
public class DgEfficiencyPersonPO implements Serializable {
/**
* id
*/
private Integer id;
/**
* 提单人id
*/
private Integer presenterId;
/**
* 客户名称
*/
private String name;
/**
* 申请日期
*/
private Date createTime;
/**
* 当前审批人
*/
private String empName;
/**
* 任务节点
*/
private String status;
/**
* 完成时间
*/
private Date finishTime;
/**
* 流程状态
*/
private Integer flowStatus;
}

@ -15,7 +15,6 @@ import java.util.Date;
@Data @Data
@ToString @ToString
public class DgEfficiencyTeamPO implements Serializable { public class DgEfficiencyTeamPO implements Serializable {
/** /**
* id * id
*/ */
@ -49,4 +48,10 @@ public class DgEfficiencyTeamPO implements Serializable {
/** /**
* 完成时间 * 完成时间
*/ */
private Date finishTime;
/**
* 流程状态
*/
private Integer flowStatus;
} }

@ -14,6 +14,9 @@ import java.io.Serializable;
@ToString @ToString
public class EmployeeVO implements Serializable{ public class EmployeeVO implements Serializable{
/**
* 员工id
*/
@ApiModelProperty("id") @ApiModelProperty("id")
private Long id; private Long id;

Loading…
Cancel
Save