新增复杂案件考核

This commit is contained in:
Renpc-kilig 2024-04-22 15:38:34 +08:00
parent d97d71afb2
commit 40869d559d
15 changed files with 190 additions and 40 deletions

View File

@ -55,4 +55,6 @@ public interface IKpiDao {
Integer sumLeaveTimelong(Map<String, Object> sumLeaveMap); Integer sumLeaveTimelong(Map<String, Object> sumLeaveMap);
Integer complexCount(Map<String, Object> params); Integer complexCount(Map<String, Object> params);
List<CasePO> complexCountPO(Map<String, Object> params);
} }

View File

@ -337,6 +337,10 @@ public class KpiKhxzWgyDTO implements Serializable {
@ExcelProperty(value = {"评价"}, index = 36) @ExcelProperty(value = {"评价"}, index = 36)
@JsonProperty("AH") @JsonProperty("AH")
private String aH; private String aH;
@ExcelProperty(value = {"特殊案件数量"}, index = 37)
@JsonProperty("complex")
private Integer complex;
/** /**
* 修改时间 * 修改时间
*/ */
@ -352,10 +356,6 @@ public class KpiKhxzWgyDTO implements Serializable {
@ExcelIgnore @ExcelIgnore
private String communityName; private String communityName;
@ExcelIgnore
private Integer complex;
public Long getId() { public Long getId() {
return id; return id;
} }

View File

@ -217,6 +217,10 @@ public class KpiKhxzZfGaDTO implements Serializable {
@ExcelProperty(value = {"实发绩效工资(元)"}, index = 14) @ExcelProperty(value = {"实发绩效工资(元)"}, index = 14)
@JsonProperty("O") @JsonProperty("O")
private Double o; private Double o;
@ExcelProperty(value = {"特殊案件数量"}, index = 15)
@JsonProperty("complex")
private Integer complex;
/** /**
* 修改时间 * 修改时间
*/ */
@ -469,4 +473,12 @@ public class KpiKhxzZfGaDTO implements Serializable {
public void setModifier(String modifier) { public void setModifier(String modifier) {
this.modifier = modifier; this.modifier = modifier;
} }
public Integer getComplex() {
return complex;
}
public void setComplex(Integer complex) {
this.complex = complex;
}
} }

View File

@ -208,6 +208,10 @@ public class KpiKhxzZnbmDTO implements Serializable {
@ExcelProperty(value = {"实发绩效工资(元)"}, index = 15) @ExcelProperty(value = {"实发绩效工资(元)"}, index = 15)
@JsonProperty("P") @JsonProperty("P")
private Double p; private Double p;
@ExcelProperty(value = {"特殊案件数量"}, index = 16)
@JsonProperty("complex")
private Integer complex;
/** /**
* 修改时间 * 修改时间
*/ */
@ -452,4 +456,12 @@ public class KpiKhxzZnbmDTO implements Serializable {
public void setModifier(String modifier) { public void setModifier(String modifier) {
this.modifier = modifier; this.modifier = modifier;
} }
public Integer getComplex() {
return complex;
}
public void setComplex(Integer complex) {
this.complex = complex;
}
} }

View File

@ -1,8 +1,5 @@
package com.cm.bigdata.pojo.pos.kpi; package com.cm.bigdata.pojo.pos.kpi;
import lombok.Data;
import lombok.ToString;
public class CommunityBossDayCountPO { public class CommunityBossDayCountPO {
private Long id; private Long id;
@ -21,6 +18,7 @@ public class CommunityBossDayCountPO {
private Integer updatePopulationCount; private Integer updatePopulationCount;
private Integer isHoliday; private Integer isHoliday;
private Double dayScore; private Double dayScore;
private Integer complexCount;
public Long getId() { public Long getId() {
return id; return id;
@ -149,4 +147,12 @@ public class CommunityBossDayCountPO {
public void setDayScore(Double dayScore) { public void setDayScore(Double dayScore) {
this.dayScore = dayScore; this.dayScore = dayScore;
} }
public Integer getComplexCount() {
return complexCount;
}
public void setComplexCount(Integer complexCount) {
this.complexCount = complexCount;
}
} }

View File

@ -13,6 +13,7 @@ public class NPersonDayCountPO {
private Double workDistance; private Double workDistance;
private Integer isHoliday; private Integer isHoliday;
private Double dayScore; private Double dayScore;
private Integer complexCount;
public Long getId() { public Long getId() {
return id; return id;
@ -101,4 +102,12 @@ public class NPersonDayCountPO {
public void setDayScore(Double dayScore) { public void setDayScore(Double dayScore) {
this.dayScore = dayScore; this.dayScore = dayScore;
} }
public Integer getComplexCount() {
return complexCount;
}
public void setComplexCount(Integer complexCount) {
this.complexCount = complexCount;
}
} }

View File

@ -1,6 +1,8 @@
package com.cm.bigdata.service.kpi; package com.cm.bigdata.service.kpi;
import com.cm.bigdata.pojo.dtos.kpi.*; import com.cm.bigdata.pojo.dtos.kpi.*;
import com.cm.bigdata.pojo.pos.kpi.CasePO;
import com.cm.bigdata.pojo.pos.kpi.ReportCasePO;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
@ -73,4 +75,8 @@ public interface IKpiService {
List<NPersonCaseDayCountDTO> listNPersonCaseDayCountByUserId(String userId, Integer year, Integer month); List<NPersonCaseDayCountDTO> listNPersonCaseDayCountByUserId(String userId, Integer year, Integer month);
List<CasePO> listInPOByUserIdsAndDay(List<String> userIds, String day);
List<CasePO> listInPOByUserIdsAndDay(String userId, String date);
} }

View File

@ -83,7 +83,7 @@ public class KpiServiceImpl implements IKpiService {
Map<String, Integer> populationUpdateCountMap = KpiUtil.mapPopulationUpdateCount(populationInfoService, userIds, date); Map<String, Integer> populationUpdateCountMap = KpiUtil.mapPopulationUpdateCount(populationInfoService, userIds, date);
Map<String, LeavePO> leaveMap = KpiUtil.mapLeave(leaveService, userIds, date); Map<String, LeavePO> leaveMap = KpiUtil.mapLeave(leaveService, userIds, date);
// 获取复杂案件数量 // 获取复杂案件数量
Map<String, List<ReportCasePO>> complexMap = KpiUtil.complexCount(reportCaseService, userIds, date); Map<String, List<CasePO>> complexMap = KpiUtil.complexCount(this, userIds, date);
// 删除当日数据 // 删除当日数据
deleteCommunityBossDayCount(date, communityBossLevel); deleteCommunityBossDayCount(date, communityBossLevel);
@ -100,8 +100,8 @@ public class KpiServiceImpl implements IKpiService {
int savePopulationCount = populationSaveCountMap.get(userId) == null ? 0 : populationSaveCountMap.get(userId); int savePopulationCount = populationSaveCountMap.get(userId) == null ? 0 : populationSaveCountMap.get(userId);
int updatePopulationCount = populationUpdateCountMap.get(userId) == null ? 0 : populationUpdateCountMap.get(userId); int updatePopulationCount = populationUpdateCountMap.get(userId) == null ? 0 : populationUpdateCountMap.get(userId);
// 复杂案件 // 复杂案件
List<ReportCasePO> reportCasePOS = complexMap.get(userId); List<CasePO> casePOS = complexMap.get(userId);
int complexCount = reportCasePOS == null || reportCasePOS.size() == 0 ? 0 : reportCasePOS.size(); int complexCount = casePOS == null || casePOS.size() == 0 ? 0 : casePOS.size();
// 新增 // 新增
Map<String, Object> queryParams = new HashMap<>(); Map<String, Object> queryParams = new HashMap<>();
@ -211,7 +211,7 @@ public class KpiServiceImpl implements IKpiService {
Map<String, Integer> populationUpdateCountMap = KpiUtil.mapPopulationUpdateCount(populationInfoService, userId, date); Map<String, Integer> populationUpdateCountMap = KpiUtil.mapPopulationUpdateCount(populationInfoService, userId, date);
Map<String, LeavePO> leaveMap = KpiUtil.mapLeave(leaveService, userId, date); Map<String, LeavePO> leaveMap = KpiUtil.mapLeave(leaveService, userId, date);
// 获取复杂案件数量 // 获取复杂案件数量
Map<String, List<ReportCasePO>> complexMap = KpiUtil.complexCount(reportCaseService, userId, date); Map<String, List<CasePO>> complexMap = KpiUtil.complexCount(this, userId, date);
// 删除当日数据 // 删除当日数据
deleteCommunityBossDayCount(date, communityBossLevel, userId); deleteCommunityBossDayCount(date, communityBossLevel, userId);
@ -226,8 +226,8 @@ public class KpiServiceImpl implements IKpiService {
int savePopulationCount = populationSaveCountMap.get(userId) == null ? 0 : populationSaveCountMap.get(userId); int savePopulationCount = populationSaveCountMap.get(userId) == null ? 0 : populationSaveCountMap.get(userId);
int updatePopulationCount = populationUpdateCountMap.get(userId) == null ? 0 : populationUpdateCountMap.get(userId); int updatePopulationCount = populationUpdateCountMap.get(userId) == null ? 0 : populationUpdateCountMap.get(userId);
// 复杂案件 // 复杂案件
List<ReportCasePO> reportCasePOS = complexMap.get(userId); List<CasePO> casePOList = complexMap.get(userId);
int complexCount = reportCasePOS == null || reportCasePOS.size() == 0 ? 0 : reportCasePOS.size(); int complexCount = casePOList == null || casePOList.size() == 0 ? 0 : casePOList.size();
// 新增 // 新增
Map<String, Object> queryParams = new HashMap<>(); Map<String, Object> queryParams = new HashMap<>();
@ -352,6 +352,8 @@ public class KpiServiceImpl implements IKpiService {
int isHoliday = KpiUtil.hasValueInList(holidays, date) ? 1 : 0; int isHoliday = KpiUtil.hasValueInList(holidays, date) ? 1 : 0;
Map<String, List<UserSigninPO>> userSigninMap = KpiUtil.mapSignin(userSignService, userIds, date); Map<String, List<UserSigninPO>> userSigninMap = KpiUtil.mapSignin(userSignService, userIds, date);
Map<String, List<UserSignoutPO>> userSignoutMap = KpiUtil.mapSignout(userSignService, userIds, date); Map<String, List<UserSignoutPO>> userSignoutMap = KpiUtil.mapSignout(userSignService, userIds, date);
// 获取复杂案件数量
Map<String, List<CasePO>> complexMap = KpiUtil.complexCount(this, userIds, date);
// 删除当日数据 // 删除当日数据
deleteNPersonDayCount(roleId, date); deleteNPersonDayCount(roleId, date);
userPOS.forEach(userPO -> { userPOS.forEach(userPO -> {
@ -363,6 +365,11 @@ public class KpiServiceImpl implements IKpiService {
int isSignout = userSignoutPOS == null || userSignoutPOS.size() == 0 ? 0 : 1; int isSignout = userSignoutPOS == null || userSignoutPOS.size() == 0 ? 0 : 1;
int isSignoutEarly = userSignoutPOS == null || userSignoutPOS.size() == 0 ? 0 : userSignoutPOS.get(0).getIsEarly(); int isSignoutEarly = userSignoutPOS == null || userSignoutPOS.size() == 0 ? 0 : userSignoutPOS.get(0).getIsEarly();
double workDistance = KpiUtil.calculateWorkDistance(userLocationService, userId, date); double workDistance = KpiUtil.calculateWorkDistance(userLocationService, userId, date);
// 复杂案件
List<CasePO> casePOS = complexMap.get(userId);
int complexCount = casePOS == null || casePOS.size() == 0 ? 0 : casePOS.size();
// 新增 // 新增
Map<String, Object> queryParams = new HashMap<>(); Map<String, Object> queryParams = new HashMap<>();
queryParams.put("userId", userId); queryParams.put("userId", userId);
@ -373,6 +380,7 @@ public class KpiServiceImpl implements IKpiService {
queryParams.put("isSignout", isSignout); queryParams.put("isSignout", isSignout);
queryParams.put("isSignoutEarly", isSignoutEarly); queryParams.put("isSignoutEarly", isSignoutEarly);
queryParams.put("workDistance", workDistance); queryParams.put("workDistance", workDistance);
queryParams.put("complexCount", complexCount);
if (StringUtils.equals(roleId, KpiUtil.DDY_ROLE_ID)) { if (StringUtils.equals(roleId, KpiUtil.DDY_ROLE_ID)) {
queryParams.put("dayScore", KpiScoreUtil.getDdyDayScore(isSignin, isSigninLate, isSignout, isSignoutEarly, isHoliday)); queryParams.put("dayScore", KpiScoreUtil.getDdyDayScore(isSignin, isSigninLate, isSignout, isSignoutEarly, isHoliday));
} }
@ -789,6 +797,22 @@ public class KpiServiceImpl implements IKpiService {
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }
@Override
public List<CasePO> listInPOByUserIdsAndDay(List<String> userIds, String day) {
Map<String, Object> params = new HashMap<>();
params.put("handleUserIds", userIds);
params.put("handleYearMonth", day);
return kpiDao.complexCountPO(params);
}
@Override
public List<CasePO> listInPOByUserIdsAndDay(String userId, String day) {
Map<String, Object> params = new HashMap<>();
params.put("handleUserId", userId);
params.put("handleYearMonth", day);
return kpiDao.complexCountPO(params);
}
private Integer countCase(Map<String, Object> params) { private Integer countCase(Map<String, Object> params) {
return kpiDao.countCase(params); return kpiDao.countCase(params);
} }

View File

@ -41,12 +41,16 @@ public class KpiKhxzZfGaDEFRunnable implements Runnable {
inspectCount++; inspectCount++;
} }
} }
List<CasePO> casePOList = kpiDao.complexCountPO(params);
Map<String, Object> updateParams = new HashMap<>(); Map<String, Object> updateParams = new HashMap<>();
updateParams.put("khYear", khYear); updateParams.put("khYear", khYear);
updateParams.put("khMonth", khMonth); updateParams.put("khMonth", khMonth);
updateParams.put("userId", userId); updateParams.put("userId", userId);
updateParams.put("D", unInspectCount); updateParams.put("D", unInspectCount);
updateParams.put("E", inspectCount); updateParams.put("E", inspectCount);
updateParams.put("complex", casePOList.size());
double F = inspectCount * 50 + unInspectCount * 50 * 0.6; double F = inspectCount * 50 + unInspectCount * 50 * 0.6;
updateParams.put("F", F); updateParams.put("F", F);
kpiKhxzZfGaDao.updateDEF(updateParams); kpiKhxzZfGaDao.updateDEF(updateParams);

View File

@ -47,6 +47,9 @@ public class KpiKhxzZnbmCDEFGLMRunnable implements Runnable {
unInspectCount++; unInspectCount++;
} }
} }
List<CasePO> casePOList = kpiDao.complexCountPO(params);
Map<String, Object> updateParams = new HashMap<>(); Map<String, Object> updateParams = new HashMap<>();
updateParams.put("C", handleCount); updateParams.put("C", handleCount);
updateParams.put("D", inspectCount); updateParams.put("D", inspectCount);
@ -64,6 +67,7 @@ public class KpiKhxzZnbmCDEFGLMRunnable implements Runnable {
updateParams.put("khYear", khYear); updateParams.put("khYear", khYear);
updateParams.put("khMonth", khMonth); updateParams.put("khMonth", khMonth);
updateParams.put("userId", userId); updateParams.put("userId", userId);
updateParams.put("complex", casePOList.size());
kpiKhxzZnbmDao.updateCDEFGLM(updateParams); kpiKhxzZnbmDao.updateCDEFGLM(updateParams);
}); });
KpiUpdateMonitor.getInstance().complete(); KpiUpdateMonitor.getInstance().complete();

View File

@ -169,16 +169,16 @@ public class KpiUtil {
return userSigninMap; return userSigninMap;
} }
public static Map<String, List<ReportCasePO>> complexCount(IReportCaseService reportCaseService, String userId, String day) { public static Map<String, List<CasePO>> complexCount(IKpiService kpiService, String userId, String day) {
List<ReportCasePO> reportCasePOList = reportCaseService.listInPOByUserIdsAndDay(userId, day); List<CasePO> casePOList = kpiService.listInPOByUserIdsAndDay(userId, day);
Map<String, List<ReportCasePO>> complexMap = new HashMap<>(); Map<String, List<CasePO>> complexMap = new HashMap<>();
reportCasePOList.forEach(reportCasePO -> { casePOList.forEach(casePO -> {
List<ReportCasePO> userSigninDTOList = complexMap.get(reportCasePO.getCreator()); List<CasePO> userSigninDTOList = complexMap.get(casePO.getHandleUserId());
if (userSigninDTOList == null) { if (userSigninDTOList == null) {
userSigninDTOList = new ArrayList<>(); userSigninDTOList = new ArrayList<>();
} }
userSigninDTOList.add(reportCasePO); userSigninDTOList.add(casePO);
complexMap.put(reportCasePO.getCreator(), userSigninDTOList); complexMap.put(casePO.getHandleUserId(), userSigninDTOList);
}); });
return complexMap; return complexMap;
} }
@ -322,16 +322,16 @@ public class KpiUtil {
return dayWeeks; return dayWeeks;
} }
public static Map<String, List<ReportCasePO>> complexCount(IReportCaseService reportCaseService, List<String> userIds, String day) { public static Map<String, List<CasePO>> complexCount(IKpiService kpiService, List<String> userIds, String day) {
List<ReportCasePO> reportCasePOList = reportCaseService.listInPOByUserIdsAndDay(userIds, day); List<CasePO> casePOList = kpiService.listInPOByUserIdsAndDay(userIds, day);
Map<String, List<ReportCasePO>> complexMap = new HashMap<>(); Map<String, List<CasePO>> complexMap = new HashMap<>();
reportCasePOList.forEach(reportCasePO -> { casePOList.forEach(casePO -> {
List<ReportCasePO> reportCasePOS = complexMap.get(reportCasePO.getCreator()); List<CasePO> reportCasePOS = complexMap.get(casePO.getHandleUserId());
if (reportCasePOS == null) { if (reportCasePOS == null) {
reportCasePOS = new ArrayList<>(); reportCasePOS = new ArrayList<>();
} }
reportCasePOS.add(reportCasePO); reportCasePOS.add(casePO);
complexMap.put(reportCasePO.getCreator(), reportCasePOS); complexMap.put(casePO.getHandleUserId(), reportCasePOS);
}); });
return complexMap; return complexMap;
} }

View File

@ -22,27 +22,27 @@ spring:
druid: druid:
db1: db1:
# url: jdbc:mysql://192.168.0.151:3306/db_btgxq_bigdata?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false # url: jdbc:mysql://192.168.0.151:3306/db_btgxq_bigdata?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false
url: jdbc:mysql://localhost:3306/db_btgxq?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false url: jdbc:mysql://192.168.0.151:3306/db_btgxq?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false
db-type: mysql db-type: mysql
driver-class-name: com.mysql.jdbc.Driver driver-class-name: com.mysql.jdbc.Driver
username: root username: root
password: 123456 password: root
mapper-locations: classpath*:mybatis/mapper/**/*.xml mapper-locations: classpath*:mybatis/mapper/**/*.xml
db2: db2:
# url: jdbc:mysql://192.168.0.151:3306/db_btgxq_city?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false # url: jdbc:mysql://192.168.0.151:3306/db_btgxq_city?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false
url: jdbc:mysql://localhost:3306/db_btgxq?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false url: jdbc:mysql://192.168.0.151:3306/db_btgxq?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false
db-type: mysql db-type: mysql
driver-class-name: com.mysql.jdbc.Driver driver-class-name: com.mysql.jdbc.Driver
username: root username: root
password: 123456 password: root
mapper-locations: classpath*:mybatis/db2-mapper/**/*.xml mapper-locations: classpath*:mybatis/db2-mapper/**/*.xml
db3: db3:
# url: jdbc:mysql://192.168.0.151:3306/db_baotou_city?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false # url: jdbc:mysql://192.168.0.151:3306/db_baotou_city?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false
url: jdbc:mysql://localhost:3306/db_btgxq?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false url: jdbc:mysql://192.168.0.151:3306/db_btgxq?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false
db-type: mysql db-type: mysql
driver-class-name: com.mysql.jdbc.Driver driver-class-name: com.mysql.jdbc.Driver
username: root username: root
password: 123456 password: root
mapper-locations: classpath*:mybatis/db3-mapper/**/*.xml mapper-locations: classpath*:mybatis/db3-mapper/**/*.xml
initial-size: 2 initial-size: 2
min-idle: 2 min-idle: 2
@ -138,9 +138,9 @@ access-control:
logging: logging:
file: E:\Users\TS-QD1\Desktop\UploadFiles\logs\bigdata\logs.log file: E:\Users\TS-QD1\Desktop\UploadFiles\logs\bigdata\logs.log
level: level:
root: debug root: error
org.mybatis: debug org.mybatis: error
com.cm: debug com.cm: error
# 访问其他项目 # 访问其他项目
server-other: server-other:

View File

@ -31,6 +31,7 @@
<result column="M" property="m"/> <result column="M" property="m"/>
<result column="N" property="n"/> <result column="N" property="n"/>
<result column="O" property="o"/> <result column="O" property="o"/>
<result column="complex" property="complex"/>
</resultMap> </resultMap>
<insert id="save" parameterType="map"> <insert id="save" parameterType="map">
@ -90,7 +91,8 @@
SET SET
D = #{D}, D = #{D},
E = #{E}, E = #{E},
F = #{F} F = #{F},
complex = #{complex}
WHERE WHERE
kh_year = #{khYear} kh_year = #{khYear}
AND AND

View File

@ -30,6 +30,7 @@
<result column="N" property="n"/> <result column="N" property="n"/>
<result column="O" property="o"/> <result column="O" property="o"/>
<result column="P" property="p"/> <result column="P" property="p"/>
<result column="complex" property="complex"/>
</resultMap> </resultMap>
<insert id="save" parameterType="map"> <insert id="save" parameterType="map">
@ -80,7 +81,8 @@
F = #{F}, F = #{F},
G = #{G}, G = #{G},
L = #{L}, L = #{L},
M = #{M} M = #{M},
complex = #{complex}
WHERE WHERE
kh_year = #{khYear} kh_year = #{khYear}
AND AND

View File

@ -34,6 +34,7 @@
<result column="work_distance" property="workDistance"/> <result column="work_distance" property="workDistance"/>
<result column="is_holiday" property="isHoliday"/> <result column="is_holiday" property="isHoliday"/>
<result column="day_score" property="dayScore"/> <result column="day_score" property="dayScore"/>
<result column="complex_count" property="complexCount"/>
</resultMap> </resultMap>
<resultMap id="casePO" type="com.cm.bigdata.pojo.pos.kpi.CasePO"> <resultMap id="casePO" type="com.cm.bigdata.pojo.pos.kpi.CasePO">
@ -311,7 +312,8 @@
is_signout_early, is_signout_early,
work_distance, work_distance,
is_holiday, is_holiday,
day_score day_score,
complex_count
) VALUES ( ) VALUES (
#{userId}, #{userId},
#{roleId}, #{roleId},
@ -322,7 +324,8 @@
#{isSignoutEarly}, #{isSignoutEarly},
#{workDistance}, #{workDistance},
#{isHoliday}, #{isHoliday},
#{dayScore} #{dayScore},
#{complexCount}
) )
</insert> </insert>
@ -733,4 +736,68 @@
</where> </where>
</select> </select>
<select id="complexCountPO" parameterType="map" resultMap="casePO">
SELECT
case_id,
area_id,
area_name,
community_id,
community_name,
case_type_id,
case_type_name,
gmt_report,
gmt_accept,
gmt_assign,
handle_end_time_long,
handle_end_time,
gmt_handle,
is_timeout,
gmt_inspect,
is_self,
report_user_id,
assign_user_id,
handle_user_id,
inspect_user_id,
inspect_score,
is_delete,
gmt_delete,
delete_user_id,
total_urge,
total_back,
case_status,
case_source,
is_accept,
is_assign,
is_handle,
is_inspect,
assign_timeout_count
FROM
kpi_case
where is_delete = '1'
AND case_status = '99'
AND is_handle = '1'
<if test="reportOrHandleUserId != null and reportOrHandleUserId != ''">
AND (
report_user_id = #{reportOrHandleUserId}
OR
handle_user_id = #{reportOrHandleUserId}
)
</if>
<if test="handleYearMonth != null and handleYearMonth != ''">
AND
LEFT(gmt_handle, 7) = #{handleYearMonth}
</if>
<if test="handleUserId != null and handleUserId != ''">
AND
handle_user_id = #{handleUserId}
</if>
<if test="handleUserIds != null and handleUserIds.size > 0">
AND
handle_user_id IN
<foreach collection="handleUserIds" item="item" index="index" open="(" separator="," close=")">
#{handleUserIds[${index}]}
</foreach>
</if>
</select>
</mapper> </mapper>