Merge remote-tracking branch 'origin/master'

# Conflicts:
#	dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java
#	dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgEfficiencyService.java
#	dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java
master
shijie 4 years ago
commit 4fbb161be4
  1. 18
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgEfficiencyController.java
  2. 14
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgEfficiencyMapper.java
  3. 19
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/DgEfficiencyTeamRequest.java
  4. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/DgStatisticsRequest.java
  5. 10
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgStatisticsListResponse.java
  6. 5
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgEfficiencyService.java
  7. 112
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java
  8. 9
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgStatisticsServiceImpl.java
  9. 55
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/DateUtils.java
  10. 87
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgEfficiencyMapper.xml
  11. 23
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgStatisticsMapper.xml
  12. 57
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/DgEfficiencyPersonPO.java
  13. 57
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/DgEfficiencyTeamPO.java
  14. 11
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/DgStatisticsPO.java
  15. 16
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/DgStatisticsRefusePO.java
  16. 38
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/DgTeamEfficiencyPO.java

@ -1,5 +1,13 @@
package com.daqing.financial.guarantee.controller;
import com.daqing.financial.guarantee.model.request.DgEfficiencyTeamRequest;
import com.daqing.financial.guarantee.service.IDgEfficiencyService;
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.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import com.daqing.financial.guarantee.service.IDgEfficiencyService;
import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.ApiOperation;
@ -18,11 +26,21 @@ import javax.servlet.http.HttpServletResponse;
*/
@RestController
@RequestMapping("/guarantee/efficiency")
@Api(value = "流程效率", tags = "流程效率")
public class DgEfficiencyController {
@Autowired
private IDgEfficiencyService dgEfficiencyService;
/**
* 团队效率
*/
@PostMapping("/team")
@ApiOperation(value = "团队效率", notes = "团队效率")
public ResponseResult queryList(@RequestBody DgEfficiencyTeamRequest dgEfficiencyTeamRequest) {
return ResponseResult.SUCCESS(dgEfficiencyService.queryList(dgEfficiencyTeamRequest));
}
/**
* 首页-近十天的审批数目
*/

@ -1,18 +1,22 @@
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.financial.guarantee.model.request.DgEfficiencyTeamRequest;
import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
import com.daqing.framework.domain.guarantee.po.DgEfficiencyPersonPO;
import com.daqing.framework.domain.guarantee.po.DgTeamEfficiencyPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @auther River
* @date 2020/11/10 11:30
*/
@Mapper
public interface DgEfficiencyMapper extends BaseMapper<DgApplyAmountInfo> {
IPage<DgEfficiencyPersonPO> personList(Page page, @Param("pr")DgEfficiencyPersonRequest dgEfficiencyPersonRequest);
List<DgTeamEfficiencyPO> queryList(@Param("et") DgEfficiencyTeamRequest dgEfficiencyTeamRequest);
List<Integer> queryBusinessId(@Param("et") DgEfficiencyTeamRequest dgEfficiencyTeamRequest);
}

@ -22,22 +22,17 @@ 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->撤销")
@ApiModelProperty("业务状态,0->已完成,1->已否决,3->进行中,4->已撤销")
private Integer flowStatus;
@ApiModelProperty("提单人或者客户名称")
private String empOrName;
@ApiModelProperty("该团队(部门)下所有提单人(员工)")
private List<Integer> empIds;
@ApiModelProperty("部门id")
private Integer departmentId;
@ApiModelProperty("辅助字段,不用管,起始时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty("起始时间")
private String startTime;
@ApiModelProperty("辅助字段,不用管,结束时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty("结束时间")
private String endTime;
}

@ -43,6 +43,4 @@ public class DgStatisticsRequest implements Serializable {
@ApiModelProperty("辅助字段,不用管,结束时间")
private String endTime;
@ApiModelProperty("辅助字段,不用管,流程状态")
private String status;
}

@ -50,13 +50,9 @@ public class DgStatisticsListResponse extends BaseRowModel implements Serializab
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date createTime;
@ApiModelProperty("当前审批人")
@ExcelProperty(value = "当前审批人",index = 7)
private String empNames;
@ApiModelProperty("任务节点")
@ExcelProperty(value = "任务节点",index = 8)
private String taskNode;
@ApiModelProperty("完成任务节点id")
@ExcelProperty(value = "完成任务节点id",index = 8)
private Integer processId;
@ApiModelProperty("最新操作时间")
@ExcelProperty(value = "任务分配时间",index = 9)

@ -1,7 +1,11 @@
package com.daqing.financial.guarantee.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.financial.guarantee.model.request.DgEfficiencyTeamRequest;
import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
import org.springframework.stereotype.Service;
import java.util.HashMap;
/**
* @auther River
@ -10,4 +14,5 @@ import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
public interface IDgEfficiencyService extends IService<DgApplyAmountInfo> {
String approvalNum();
HashMap<Integer, HashMap<Integer, String>> queryList(DgEfficiencyTeamRequest dgEfficiencyTeamRequest);
}

@ -4,9 +4,19 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController;
import com.daqing.financial.guarantee.mapper.DgAuditProcessMapper;
import com.daqing.financial.guarantee.mapper.DgEfficiencyMapper;
import com.daqing.financial.guarantee.model.request.DgEfficiencyTeamRequest;
import com.daqing.financial.guarantee.model.response.EfficiencyApprovalResponse;
import com.daqing.financial.guarantee.service.IDgEfficiencyService;
import com.daqing.financial.guarantee.util.DateUtils;
import com.daqing.framework.domain.guarantee.DgApplyAmountInfo;
import org.springframework.stereotype.Service;
import com.daqing.framework.domain.guarantee.po.DgTeamEfficiencyPO;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -23,6 +33,108 @@ public class DgEfficiencyServiceImpl extends ServiceImpl<DgEfficiencyMapper, DgA
private DgApplyAmountInfoController dgApplyAmountInfoController;
@Autowired
private DgAuditProcessMapper dgAuditProcessMapper;
/**
* 团队效率
*/
@Override
public HashMap<Integer, HashMap<Integer, String>> queryList(DgEfficiencyTeamRequest dgEfficiencyTeamRequest) {
// 时间筛选(固定时间)
if (dgEfficiencyTeamRequest.getCreateFixedTime() != null && dgEfficiencyTeamRequest.getStartTime() == null &&
dgEfficiencyTeamRequest.getEndTime() == null) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
switch (dgEfficiencyTeamRequest.getCreateFixedTime()) {
case 0:
dgEfficiencyTeamRequest.setStartTime(dateFormat.format(DateUtils.getDayBegin()));
dgEfficiencyTeamRequest.setEndTime(dateFormat.format(DateUtils.getDayEnd()));// 今天
break;
case 1:
dgEfficiencyTeamRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfYesterday()));
dgEfficiencyTeamRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfYesterDay()));// 昨天
break;
case 2:
dgEfficiencyTeamRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfWeek()));
dgEfficiencyTeamRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfWeek()));// 本周
break;
case 3:
dgEfficiencyTeamRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfMonth()));
dgEfficiencyTeamRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfMonth()));// 本月
break;
case 4:
dgEfficiencyTeamRequest.setStartTime(dateFormat.format(DateUtils.getBeginDayOfYear()));
dgEfficiencyTeamRequest.setEndTime(dateFormat.format(DateUtils.getEndDayOfYear()));// 本年
break;
default:
dgEfficiencyTeamRequest.setStartTime(null);
dgEfficiencyTeamRequest.setEndTime(null);
}
}
// 查询出所有的数据
List<DgTeamEfficiencyPO> teamEfficiencyList = this.getBaseMapper().queryList(dgEfficiencyTeamRequest);
List<List<DgTeamEfficiencyPO>> list = new ArrayList<>();
// 查询出所有的业务id
List<Integer> businessIdList = this.getBaseMapper().queryBusinessId(dgEfficiencyTeamRequest);
// 按业务id封装为双层list形式
for (Integer businessId : businessIdList) {
List<DgTeamEfficiencyPO> efficiencyList = new ArrayList<>();
for (DgTeamEfficiencyPO teamEfficiency : teamEfficiencyList) {
if (businessId.equals(teamEfficiency.getBusinessId())) {
efficiencyList.add(teamEfficiency);
}
}
list.add(efficiencyList);
}
// 返回数据格式
HashMap<Integer, HashMap<Integer, String>> hashMap = new HashMap<>();
String time; // 时间差
Integer processId; // 业务节点id
String departmentIdList; // 部门id集合
// 将数据归类
for (List<DgTeamEfficiencyPO> dgTeamEfficiencyList : list) {
if (dgTeamEfficiencyList.size() < 2) {
continue;
}
for (int i = dgTeamEfficiencyList.size() - 1; i > 0; i--) {
HashMap<Integer, String> map = new HashMap<>();
// 计算时间差
time = DateUtils.dateDiff(dgTeamEfficiencyList.get(i - 1).getCreateTime(), dgTeamEfficiencyList.get(i).getCreateTime()) + "";
processId = dgTeamEfficiencyList.get(i).getProcessId();
departmentIdList = dgTeamEfficiencyList.get(i).getDepartmentId();
map.put(processId, time + "(1)");
String[] departmentIds = departmentIdList.split(",");
for (String departmentId : departmentIds) {
// 没有当前部门的数据,直接新建一个
if (hashMap.get(Integer.parseInt(departmentId)) == null) {
hashMap.put(Integer.parseInt(departmentId), map);
} else {
// 有当前部门数据,则再判断是否有当前节点数据
HashMap<Integer, String> existMap = hashMap.get(Integer.parseInt(departmentId));
if (existMap.get(processId) == null) {
existMap.put(processId, time + "(1)");
} else {
// 计算当前部门在当前节点的操作次数
int count = Integer.parseInt(existMap.get(processId).substring(existMap.get(processId).indexOf("(") + 1,
existMap.get(processId).indexOf(")"))) + 1;
// 计算当前部门在当前节点的累计时间
String existTime = existMap.get(processId).substring(0, existMap.get(processId).indexOf("("));
// 累计时间加上本次时间
existMap.put(processId, (Integer.parseInt(existTime) + Integer.parseInt(time)) + "(" + count + ")");
}
hashMap.put(Integer.parseInt(departmentId), existMap);
}
}
}
}
// 部门筛选
if (dgEfficiencyTeamRequest.getDepartmentId() != null) {
HashMap<Integer, HashMap<Integer, String>> deptMap = new HashMap<>();
deptMap.put(dgEfficiencyTeamRequest.getDepartmentId(), hashMap.get(dgEfficiencyTeamRequest.getDepartmentId()));
return deptMap;
} else {
return hashMap;
}
}
/**
* 查询审批数目的值的数组
* @return

@ -226,7 +226,6 @@ public class DgStatisticsServiceImpl extends ServiceImpl<DgStatisticsMapper, DgA
dgStatisticsRequest.setEndTime(dateFormat.format(DateUtils.getDayEndTime(dgStatisticsRequest.getCreateCustomTime())));
}
// 拒绝列表
dgStatisticsRequest.setStatus(PromptSuccess.STATUS_REFUSE);
IPage<DgStatisticsRefusePO> iPage = this.getBaseMapper().listRefuse(new Page(page, size), dgStatisticsRequest);
List<DgStatisticsRefusePO> dgStatisticsRefusePOList = iPage.getRecords();
if (dgStatisticsRefusePOList == null) {
@ -292,10 +291,8 @@ public class DgStatisticsServiceImpl extends ServiceImpl<DgStatisticsMapper, DgA
*/
@Override
public Boolean excelExportRefuse(HttpServletResponse response) {
DgStatisticsRequest dgStatisticsRequest = new DgStatisticsRequest();
dgStatisticsRequest.setStatus(PromptSuccess.STATUS_REFUSE);
// 列表查询
IPage<DgStatisticsRefusePO> listRefuse = this.getBaseMapper().listRefuse(new Page(), dgStatisticsRequest);
IPage<DgStatisticsRefusePO> listRefuse = this.getBaseMapper().listRefuse(new Page(), new DgStatisticsRequest());
List<DgStatisticsRefusePO> statisticsRefusePOList = listRefuse.getRecords();
if (statisticsRefusePOList == null) {
return false;
@ -353,17 +350,13 @@ 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);
dgStatisticsListRefuseResponse.setEmployeeName(employeeTO.getEmpName());
dgStatisticsListRefuseResponse.setDepartment(employeeTO.getDeptNames());
listResponse.add(dgStatisticsListRefuseResponse);
}
}
if (dgStatisticsListRefuseResponse.getEmployeeName() == null || dgStatisticsListRefuseResponse.getEmployeeName().length() == 0) {
BeanUtils.copyProperties(dgStatisticsRefusePO, dgStatisticsListRefuseResponse);
listResponse.add(dgStatisticsListRefuseResponse);
}
}
return listResponse;
}
}

@ -1,11 +1,7 @@
package com.daqing.financial.guarantee.util;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.*;
/**
* @auther River
@ -322,5 +318,54 @@ public class DateUtils {
list.add(begincal.getTime());
return list;
}
// 将毫秒数转换为年月日
public static String getYearMonthDayHourMinuteSecond(long timeMillis) {
Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT+8"));
calendar.setTimeInMillis(timeMillis);
int year=calendar.get(Calendar.YEAR);
int month=calendar.get(Calendar.MONTH) + 1;
String mToMonth=null;
if (String.valueOf(month).length()==1) {
mToMonth="0"+month;
} else {
mToMonth=String.valueOf(month);
}
int day=calendar.get(Calendar.DAY_OF_MONTH);
String dToDay=null;
if (String.valueOf(day).length()==1) {
dToDay="0"+day;
} else {
dToDay=String.valueOf(day);
}
int hour=calendar.get(Calendar.HOUR_OF_DAY);
String hToHour=null;
if (String.valueOf(hour).length()==1) {
hToHour="0"+hour;
} else {
hToHour=String.valueOf(hour);
}
int minute=calendar.get(Calendar.MINUTE);
String mToMinute=null;
if (String.valueOf(minute).length()==1) {
mToMinute="0"+minute;
} else {
mToMinute=String.valueOf(minute);
}
int second=calendar.get(Calendar.SECOND);
String sToSecond=null;
if (String.valueOf(second).length()==1) {
sToSecond="0"+second;
} else {
sToSecond=String.valueOf(second);
}
return year+ "-" +mToMonth+ "-" +dToDay+ " "+hToHour+ ":" +mToMinute+ ":" +sToSecond;
}
}

@ -2,64 +2,45 @@
<!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}
)
<select id="queryList" resultType="com.daqing.framework.domain.guarantee.po.DgTeamEfficiencyPO">
SELECT p.business_id AS business_id,p.process_id AS process_id,p.department_id AS department_id,p.create_time AS create_time
FROM dg_audit_process AS p
LEFT JOIN dg_apply_amount_info AS a
ON p.business_id = a.id
LEFT JOIN dg_business_process_status AS s
ON p.business_id = s.business_id
WHERE 1 = 1
<if test="et.flowStatus != null">
AND s.business_status = #{et.flowStatus}
</if>
<if test="pr.flowStatus == 0">
AND a.presenter_id = #{pr.personId}
<if test="et.startTime != null and et.startTime != ''">
AND a.create_time &gt;= #{et.startTime}
</if>
<if test="pr.flowStatus == 1">
AND p.emp_id = #{pr.personId}
<if test="et.endTime != null and et.endTime != ''">
AND a.create_time &lt;= #{et.endTime}
</if>
<if test="pr.empOrName != null and pr.empOrName != ''">
AND c.name LIKE CONCAT('%',#{sr.empOrName},'%')
ORDER BY p.create_time ASC
</select>
<select id="queryBusinessId" resultType="integer">
SELECT p.business_id AS business_id
FROM dg_audit_process AS p
LEFT JOIN dg_apply_amount_info AS a
ON p.business_id = a.id
LEFT JOIN dg_business_process_status AS s
ON p.business_id = s.business_id
WHERE 1 = 1
<if test="et.flowStatus != null">
AND s.business_status = #{et.flowStatus}
</if>
<if test="pr.startTime != null and pr.startTime != ''">
AND a.create_time &gt;= #{pr.startTime}
<if test="et.startTime != null and et.startTime != ''">
AND a.create_time &gt;= #{et.startTime}
</if>
<if test="pr.endTime != null and pr.endTime != ''">
AND a.create_time &lt;= #{pr.endTime}
<if test="et.endTime != null and et.endTime != ''">
AND a.create_time &lt;= #{et.endTime}
</if>
ORDER BY a.create_time DESC
GROUP BY business_id
ORDER BY p.create_time ASC
</select>
</mapper>

@ -19,10 +19,10 @@
<!-- 业务统计列表 -->
<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,
a.business_type AS business_type,a.create_time AS create_time,a.business_code AS business_code,a.id AS business_id,
p.role_id AS role_id,p.create_time AS operation_time
a.business_type AS business_type,a.create_time AS create_time,a.business_code AS business_code,p.process_id AS process_id,
p.create_time AS operation_time
FROM dg_apply_amount_info AS a
LEFT JOIN (SELECT business_id,role_id,create_time FROM dg_audit_process WHERE (business_id,create_time) IN
LEFT JOIN (SELECT business_id,process_id,create_time FROM dg_audit_process WHERE (business_id,create_time) IN
(SELECT business_id,MAX(create_time) FROM dg_audit_process GROUP BY business_id)) AS p
ON a.id = p.business_id
LEFT JOIN crms_company_customer AS cc
@ -48,15 +48,20 @@
<!-- 业务统计拒绝列表 -->
<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,
a.business_type AS business_type,a.create_time AS create_time,a.business_code AS business_code,p.emp_name AS emp_name,
p.status AS status,p.date_time AS date_time,p.remark AS remark
a.business_type AS business_type,a.create_time AS create_time,a.business_code AS business_code,p.process_id AS process_id,
p.approver AS refuse_name,p.create_time AS refuse_time,p.audit_opinion AS refuse_opinion
FROM dg_apply_amount_info AS a
LEFT JOIN dg_audit_process AS p
ON a.id = p.apply_amount_info_id
LEFT JOIN (SELECT business_id,process_id,create_time,approver,audit_opinion FROM dg_audit_process WHERE (business_id,create_time) IN
(SELECT business_id,MAX(create_time) FROM dg_audit_process GROUP BY business_id)) AS p
ON a.id = p.business_id
LEFT JOIN dg_business_process_status AS ps
ON a.id = ps.business_id
LEFT JOIN crms_company_customer AS cc
ON cc.id = a.company_id
LEFT JOIN crms_customer AS c
ON a.company_id = c.id
ON cc.customer_id = c.id
WHERE c.del_or_not = 0
AND p.status LIKE CONCAT('%',#{sr.status},'%')
AND ps.business_status = 3
<if test="sr.codeOrName != null and sr.codeOrName != ''">
AND (a.business_code LIKE CONCAT('%',#{sr.codeOrName},'%') OR c.name LIKE CONCAT('%',#{sr.codeOrName},'%'))
</if>

@ -1,57 +0,0 @@
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;
}

@ -1,57 +0,0 @@
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/10 11:50
*/
@Data
@ToString
public class DgEfficiencyTeamPO 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;
}

@ -39,11 +39,6 @@ public class DgStatisticsPO {
*/
private String applyTime;
/**
* 业务id
*/
private Integer businessId;
/**
* 业务类型
*/
@ -60,12 +55,12 @@ public class DgStatisticsPO {
private Date createTime;
/**
* 审批角色id
* 完成任务节点id
*/
private Integer roleId;
private Integer processId;
/**
* 最新操作时间
* 完成操作时间
*/
private Date operationTime;
}

@ -50,27 +50,27 @@ public class DgStatisticsRefusePO implements Serializable {
private String businessCode;
/**
* 创建时间
* 申请时间
*/
private Date createTime;
/**
* 拒绝人
* 任务节点id
*/
private String empName;
private Integer processId;
/**
* 节点状态
* 拒绝人
*/
private String status;
private String refuseName;
/**
* 达到时间
* 拒绝时间
*/
private Date dateTime;
private Date refuseTime;
/**
* 拒绝原因
*/
private String remark;
private String refuseOpinion;
}

@ -0,0 +1,38 @@
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/12/28 10:26
*/
@Data
@ToString
public class DgTeamEfficiencyPO implements Serializable {
/**
* 业务id
*/
private Integer businessId;
/**
* 进程id
*/
private Integer processId;
/**
* 部门ids
*/
private String departmentId;
/**
* 创建时间
*/
private Date createTime;
}
Loading…
Cancel
Save