Compare commits
2 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
01c82605f0 | |
|
|
8c5a5863bd |
|
|
@ -1,2 +0,0 @@
|
||||||
-- 考评组配置增加考评是否结束开关
|
|
||||||
ALTER TABLE evaluation_corp ADD COLUMN evaluation_closed TINYINT DEFAULT 0 COMMENT '考评是否结束 0=未结束 1=已结束';
|
|
||||||
|
|
@ -55,13 +55,6 @@ public class EvaluationConfigController {
|
||||||
return SingleResponse.buildSuccess();
|
return SingleResponse.buildSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("考评结束开关")
|
|
||||||
@PostMapping("/toggleEvalClosed")
|
|
||||||
public SingleResponse toggleEvalClosed(@RequestBody ToggleEvalClosedCmd cmd) {
|
|
||||||
evaluationConfigService.toggleEvalClosed(cmd);
|
|
||||||
return SingleResponse.buildSuccess();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import com.alibaba.cola.exception.BizException;
|
||||||
import com.zcloud.hidden.evaluation.domain.gateway.EvaluationCorpGateway;
|
import com.zcloud.hidden.evaluation.domain.gateway.EvaluationCorpGateway;
|
||||||
import com.zcloud.hidden.evaluation.domain.model.EvaluationCorpE;
|
import com.zcloud.hidden.evaluation.domain.model.EvaluationCorpE;
|
||||||
import com.zcloud.hidden.evaluation.dto.EvaluationCorpUpdateCmd;
|
import com.zcloud.hidden.evaluation.dto.EvaluationCorpUpdateCmd;
|
||||||
import com.zcloud.hidden.evaluation.dto.ToggleEvalClosedCmd;
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
@ -31,15 +30,5 @@ public class EvaluationCorpUpdateExe {
|
||||||
throw new BizException("修改失败");
|
throw new BizException("修改失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public void toggleEvalClosed(ToggleEvalClosedCmd cmd) {
|
|
||||||
EvaluationCorpE evaluationCorpE = new EvaluationCorpE();
|
|
||||||
BeanUtils.copyProperties(cmd, evaluationCorpE);
|
|
||||||
boolean res = evaluationCorpGateway.toggleEvalClosed(evaluationCorpE);
|
|
||||||
if (!res) {
|
|
||||||
throw new BizException("配置失败");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import com.zcloud.hidden.evaluation.api.EvaluationConfigServiceI;
|
||||||
import com.zcloud.hidden.evaluation.command.EvaluationConfigAddExe;
|
import com.zcloud.hidden.evaluation.command.EvaluationConfigAddExe;
|
||||||
import com.zcloud.hidden.evaluation.command.EvaluationConfigRemoveExe;
|
import com.zcloud.hidden.evaluation.command.EvaluationConfigRemoveExe;
|
||||||
import com.zcloud.hidden.evaluation.command.EvaluationConfigUpdateExe;
|
import com.zcloud.hidden.evaluation.command.EvaluationConfigUpdateExe;
|
||||||
import com.zcloud.hidden.evaluation.command.EvaluationCorpUpdateExe;
|
|
||||||
import com.zcloud.hidden.evaluation.command.query.EvaluationConfigQueryExe;
|
import com.zcloud.hidden.evaluation.command.query.EvaluationConfigQueryExe;
|
||||||
import com.zcloud.hidden.evaluation.dto.*;
|
import com.zcloud.hidden.evaluation.dto.*;
|
||||||
import com.zcloud.hidden.evaluation.dto.clientobject.CorpEvaluationConfigCO;
|
import com.zcloud.hidden.evaluation.dto.clientobject.CorpEvaluationConfigCO;
|
||||||
|
|
@ -30,7 +29,6 @@ public class EvaluationConfigServiceImpl implements EvaluationConfigServiceI {
|
||||||
private final EvaluationConfigUpdateExe evaluationConfigUpdateExe;
|
private final EvaluationConfigUpdateExe evaluationConfigUpdateExe;
|
||||||
private final EvaluationConfigRemoveExe evaluationConfigRemoveExe;
|
private final EvaluationConfigRemoveExe evaluationConfigRemoveExe;
|
||||||
private final EvaluationConfigQueryExe evaluationConfigQueryExe;
|
private final EvaluationConfigQueryExe evaluationConfigQueryExe;
|
||||||
private final EvaluationCorpUpdateExe evaluationCorpUpdateExe;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResponse<CorpEvaluationConfigCO> listPage(EvaluationConfigPageQry qry) {
|
public PageResponse<CorpEvaluationConfigCO> listPage(EvaluationConfigPageQry qry) {
|
||||||
|
|
@ -69,10 +67,5 @@ public class EvaluationConfigServiceImpl implements EvaluationConfigServiceI {
|
||||||
public void editBath(EvaluationConfigBathUpdateCmd evaluationConfigBathUpdateCmd) {
|
public void editBath(EvaluationConfigBathUpdateCmd evaluationConfigBathUpdateCmd) {
|
||||||
evaluationConfigUpdateExe.editBath(evaluationConfigBathUpdateCmd);
|
evaluationConfigUpdateExe.editBath(evaluationConfigBathUpdateCmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void toggleEvalClosed(ToggleEvalClosedCmd cmd) {
|
|
||||||
evaluationCorpUpdateExe.toggleEvalClosed(cmd);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,5 @@ public interface EvaluationConfigServiceI {
|
||||||
List<EvaluationConfigCO> listAll(EvaluationConfigQry qry);
|
List<EvaluationConfigCO> listAll(EvaluationConfigQry qry);
|
||||||
|
|
||||||
void editBath(EvaluationConfigBathUpdateCmd evaluationConfigBathUpdateCmd);
|
void editBath(EvaluationConfigBathUpdateCmd evaluationConfigBathUpdateCmd);
|
||||||
|
|
||||||
void toggleEvalClosed(ToggleEvalClosedCmd cmd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
package com.zcloud.hidden.evaluation.dto;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 考评结束开关命令
|
|
||||||
*
|
|
||||||
* @Author zhaokai
|
|
||||||
* @Date 2026-06-09
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class ToggleEvalClosedCmd implements Serializable {
|
|
||||||
@ApiModelProperty(value = "企业id", required = true)
|
|
||||||
private Long corpinfoId;
|
|
||||||
@ApiModelProperty(value = "考评是否结束 0=未结束(开始考评) 1=已结束(结束考评)", required = true)
|
|
||||||
private Integer evaluationClosed;
|
|
||||||
}
|
|
||||||
|
|
@ -35,9 +35,6 @@ public class CorpEvalCO implements Serializable {
|
||||||
private Integer exchangeScoreCount;
|
private Integer exchangeScoreCount;
|
||||||
@ApiModelProperty(value = "待兑换积分数")
|
@ApiModelProperty(value = "待兑换积分数")
|
||||||
private Integer unExchangeScoreCount;
|
private Integer unExchangeScoreCount;
|
||||||
//考评是否结束 0=未结束 1=已结束
|
|
||||||
@ApiModelProperty(value = "考评是否结束 0=未结束 1=已结束")
|
|
||||||
private Integer evaluationClosed;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,5 @@ public class CorpEvalStatisticsCO implements Serializable {
|
||||||
private String safeEvaluationMember;
|
private String safeEvaluationMember;
|
||||||
@ApiModelProperty(value = "环保类考评组成员")
|
@ApiModelProperty(value = "环保类考评组成员")
|
||||||
private String envEvaluationMember;
|
private String envEvaluationMember;
|
||||||
//考评是否结束 0=未结束 1=已结束
|
|
||||||
@ApiModelProperty(value = "考评是否结束 0=未结束 1=已结束")
|
|
||||||
private Integer evaluationClosed;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,6 @@ public class CorpEvaluationConfigCO implements Serializable {
|
||||||
private String envEvaluationConfigStatus;
|
private String envEvaluationConfigStatus;
|
||||||
@ApiModelProperty(value = "环保类考评组成员")
|
@ApiModelProperty(value = "环保类考评组成员")
|
||||||
private String envEvaluationMember;
|
private String envEvaluationMember;
|
||||||
//考评是否结束 0=未结束 1=已结束
|
|
||||||
@ApiModelProperty(value = "考评是否结束 0=未结束 1=已结束")
|
|
||||||
private Integer evaluationClosed;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,8 +67,5 @@ public class CorpHiddenStatisticsCO implements Serializable {
|
||||||
|
|
||||||
@ApiModelProperty(value = "考评组成员")
|
@ApiModelProperty(value = "考评组成员")
|
||||||
private String evaluationMembers;
|
private String evaluationMembers;
|
||||||
//考评是否结束 0=未结束 1=已结束
|
|
||||||
@ApiModelProperty(value = "考评是否结束 0=未结束 1=已结束")
|
|
||||||
private Integer evaluationClosed;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,6 @@ public class UserEvalStatisticsCO implements Serializable {
|
||||||
private String departmentName;
|
private String departmentName;
|
||||||
@ApiModelProperty(value = "岗位")
|
@ApiModelProperty(value = "岗位")
|
||||||
private String postName;
|
private String postName;
|
||||||
@ApiModelProperty(value = "考评类型,1:安全类,2:环保类")
|
|
||||||
private String evaluationType;
|
|
||||||
@ApiModelProperty(value = "奖励总得分")
|
@ApiModelProperty(value = "奖励总得分")
|
||||||
private Integer totalScore;
|
private Integer totalScore;
|
||||||
@ApiModelProperty(value = "已兑换分数")
|
@ApiModelProperty(value = "已兑换分数")
|
||||||
|
|
|
||||||
|
|
@ -20,11 +20,6 @@ public interface EvaluationCorpGateway {
|
||||||
*/
|
*/
|
||||||
Boolean update(EvaluationCorpE evaluationCorpE);
|
Boolean update(EvaluationCorpE evaluationCorpE);
|
||||||
|
|
||||||
/**
|
|
||||||
* 开关配置
|
|
||||||
*/
|
|
||||||
Boolean toggleEvalClosed(EvaluationCorpE evaluationCorpE);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,5 @@ public class EvaluationCorpE extends BaseE {
|
||||||
private Long orgId;
|
private Long orgId;
|
||||||
//环境
|
//环境
|
||||||
private String env;
|
private String env;
|
||||||
//考评是否结束 0=未结束(开始考评) 1=已结束(结束考评)
|
|
||||||
private Integer evaluationClosed;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,15 +42,6 @@ public class EvaluationCorpGatewayImpl implements EvaluationCorpGateway {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Boolean toggleEvalClosed(EvaluationCorpE evaluationCorpE) {
|
|
||||||
evaluationCorpRepository.list().forEach(corp -> {
|
|
||||||
corp.setEvaluationClosed(evaluationCorpE.getEvaluationClosed());
|
|
||||||
evaluationCorpRepository.updateById(corp);
|
|
||||||
});
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean deletedEvaluationCorpById(Long id) {
|
public Boolean deletedEvaluationCorpById(Long id) {
|
||||||
return evaluationCorpRepository.removeById(id);
|
return evaluationCorpRepository.removeById(id);
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,6 @@ public class CorpEvalDO implements Serializable {
|
||||||
private Integer exchangeScoreCount;
|
private Integer exchangeScoreCount;
|
||||||
@ApiModelProperty(value = "待兑换积分数")
|
@ApiModelProperty(value = "待兑换积分数")
|
||||||
private Integer unExchangeScoreCount;
|
private Integer unExchangeScoreCount;
|
||||||
//考评是否结束 0=未结束 1=已结束
|
|
||||||
@ApiModelProperty(value = "考评是否结束 0=未结束 1=已结束")
|
|
||||||
private Integer evaluationClosed;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,5 @@ public class CorpEvalStatisticsDO implements Serializable {
|
||||||
private String safeEvaluationMember;
|
private String safeEvaluationMember;
|
||||||
@ApiModelProperty(value = "环保类考评组成员")
|
@ApiModelProperty(value = "环保类考评组成员")
|
||||||
private String envEvaluationMember;
|
private String envEvaluationMember;
|
||||||
//考评是否结束 0=未结束 1=已结束
|
|
||||||
@ApiModelProperty(value = "考评是否结束 0=未结束 1=已结束")
|
|
||||||
private Integer evaluationClosed;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,6 @@ public class CorpEvaluationConfigDO implements Serializable {
|
||||||
private String envEvaluationConfigStatus;
|
private String envEvaluationConfigStatus;
|
||||||
@ApiModelProperty(value = "环保类考评组成员")
|
@ApiModelProperty(value = "环保类考评组成员")
|
||||||
private String envEvaluationMember;
|
private String envEvaluationMember;
|
||||||
//考评是否结束 0=未结束 1=已结束
|
|
||||||
@ApiModelProperty(value = "考评是否结束 0=未结束 1=已结束")
|
|
||||||
private Integer evaluationClosed;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,5 @@ public class CorpHiddenStatisticsDO implements Serializable {
|
||||||
|
|
||||||
@ApiModelProperty(value = "考评组成员")
|
@ApiModelProperty(value = "考评组成员")
|
||||||
private String evaluationMembers;
|
private String evaluationMembers;
|
||||||
//考评是否结束 0=未结束 1=已结束
|
|
||||||
@ApiModelProperty(value = "考评是否结束 0=未结束 1=已结束")
|
|
||||||
private Integer evaluationClosed;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,6 @@ public class EvaluationCorpDO extends BaseDO {
|
||||||
//企业id
|
//企业id
|
||||||
@ApiModelProperty(value = "企业id")
|
@ApiModelProperty(value = "企业id")
|
||||||
private Long corpinfoId;
|
private Long corpinfoId;
|
||||||
//考评是否结束 0=未结束 1=已结束
|
|
||||||
@ApiModelProperty(value = "考评是否结束 0=未结束 1=已结束")
|
|
||||||
private Integer evaluationClosed;
|
|
||||||
|
|
||||||
public EvaluationCorpDO(String evaluationCorpId) {
|
public EvaluationCorpDO(String evaluationCorpId) {
|
||||||
this.evaluationCorpId = evaluationCorpId;
|
this.evaluationCorpId = evaluationCorpId;
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,6 @@ public class UserEvalStatisticsDO implements Serializable {
|
||||||
private String departmentName;
|
private String departmentName;
|
||||||
@ApiModelProperty(value = "岗位")
|
@ApiModelProperty(value = "岗位")
|
||||||
private String postName;
|
private String postName;
|
||||||
@ApiModelProperty(value = "考评类型,1:安全类,2:环保类")
|
|
||||||
private String evaluationType;
|
|
||||||
@ApiModelProperty(value = "奖励总得分")
|
@ApiModelProperty(value = "奖励总得分")
|
||||||
private Integer totalScore;
|
private Integer totalScore;
|
||||||
@ApiModelProperty(value = "已兑换分数")
|
@ApiModelProperty(value = "已兑换分数")
|
||||||
|
|
|
||||||
|
|
@ -84,8 +84,6 @@ public class HiddenEvaluationRecordRepositoryImpl extends BaseRepositoryImpl<Hid
|
||||||
if (!org.springframework.util.ObjectUtils.isEmpty(params.get("menuPath"))){
|
if (!org.springframework.util.ObjectUtils.isEmpty(params.get("menuPath"))){
|
||||||
menuPerms = MenuEnum.getMenuKeyByPath(params.get("menuPath").toString());
|
menuPerms = MenuEnum.getMenuKeyByPath(params.get("menuPath").toString());
|
||||||
}
|
}
|
||||||
// 关闭 count SQL 优化,因为该查询包含派生表子查询 + CROSS JOIN 等复杂结构,JSQLParser 无法解析
|
|
||||||
((com.baomidou.mybatisplus.extension.plugins.pagination.Page<?>) iPage).setOptimizeCountSql(false);
|
|
||||||
IPage<UserEvalStatisticsDO> result = hiddenEvaluationRecordMapper.userEvalStatisticsPage(iPage, params,menuPerms);
|
IPage<UserEvalStatisticsDO> result = hiddenEvaluationRecordMapper.userEvalStatisticsPage(iPage, params,menuPerms);
|
||||||
return PageHelper.pageToResponse(result, result.getRecords());
|
return PageHelper.pageToResponse(result, result.getRecords());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,7 @@
|
||||||
CASE WHEN ec_safe.id IS NOT NULL THEN '已分配' ELSE '未分配' END AS safeEvaluationConfigStatus,
|
CASE WHEN ec_safe.id IS NOT NULL THEN '已分配' ELSE '未分配' END AS safeEvaluationConfigStatus,
|
||||||
COALESCE(ec_safe.members, '') AS safeEvaluationMember,
|
COALESCE(ec_safe.members, '') AS safeEvaluationMember,
|
||||||
CASE WHEN ec_env.id IS NOT NULL THEN '已分配' ELSE '未分配' END AS envEvaluationConfigStatus,
|
CASE WHEN ec_env.id IS NOT NULL THEN '已分配' ELSE '未分配' END AS envEvaluationConfigStatus,
|
||||||
COALESCE(ec_env.members, '') AS envEvaluationMember,
|
COALESCE(ec_env.members, '') AS envEvaluationMember
|
||||||
(SELECT e.evaluation_closed FROM evaluation_corp e WHERE e.delete_enum = 'FALSE' LIMIT 1) AS evaluationClosed
|
|
||||||
FROM evaluation_corp ec left join corp_info ci on ec.corpinfo_id = ci.id
|
FROM evaluation_corp ec left join corp_info ci on ec.corpinfo_id = ci.id
|
||||||
LEFT JOIN (SELECT ec.id,ec.corpinfo_id,
|
LEFT JOIN (SELECT ec.id,ec.corpinfo_id,
|
||||||
GROUP_CONCAT(CONCAT(d.name, '-', u.name) SEPARATOR ',') AS members
|
GROUP_CONCAT(CONCAT(d.name, '-', u.name) SEPARATOR ',') AS members
|
||||||
|
|
|
||||||
|
|
@ -4,39 +4,6 @@
|
||||||
|
|
||||||
<mapper namespace="com.zcloud.hidden.evaluation.persistence.mapper.HiddenEvaluationRecordMapper">
|
<mapper namespace="com.zcloud.hidden.evaluation.persistence.mapper.HiddenEvaluationRecordMapper">
|
||||||
|
|
||||||
<sql id="baseUserQuery">
|
|
||||||
SELECT DISTINCT
|
|
||||||
u_inner.id AS userId,
|
|
||||||
u_inner.username AS userName,
|
|
||||||
u_inner.name,
|
|
||||||
u_inner.department_id AS departmentId,
|
|
||||||
u_inner.corpinfo_id AS corpinfoId,
|
|
||||||
d_inner.name AS departmentName,
|
|
||||||
p_inner.post_name AS postName
|
|
||||||
FROM hidden h_inner
|
|
||||||
INNER JOIN user u_inner ON h_inner.creator_id = u_inner.id
|
|
||||||
LEFT JOIN department d_inner ON u_inner.department_id = d_inner.id
|
|
||||||
LEFT JOIN post p_inner ON u_inner.post_id = p_inner.id
|
|
||||||
WHERE h_inner.delete_enum = 'FALSE'
|
|
||||||
AND h_inner.state = 301
|
|
||||||
AND ((h_inner.source IN (4,5) AND h_inner.final_check = 1) OR h_inner.source NOT IN (4,5))
|
|
||||||
<if test="params.corpinfoId != null">
|
|
||||||
AND u_inner.corpinfo_id = #{params.corpinfoId}
|
|
||||||
</if>
|
|
||||||
<if test="params.departmentId != null">
|
|
||||||
AND d_inner.id = #{params.departmentId}
|
|
||||||
</if>
|
|
||||||
<if test="params.userName != null and params.userName != ''">
|
|
||||||
AND u_inner.name LIKE CONCAT('%', #{params.userName}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="params.userIdList != null and params.userIdList.size() > 0">
|
|
||||||
AND u_inner.id IN
|
|
||||||
<foreach collection="params.userIdList" item="item" open="(" close=")" separator=",">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="corpHidddenPage" resultType="com.zcloud.hidden.evaluation.persistence.dataobject.CorpHiddenStatisticsDO" >
|
<select id="corpHidddenPage" resultType="com.zcloud.hidden.evaluation.persistence.dataobject.CorpHiddenStatisticsDO" >
|
||||||
SELECT ec.corpinfo_id as corpinfoId,
|
SELECT ec.corpinfo_id as corpinfoId,
|
||||||
ci.corp_name AS corpinfoName,
|
ci.corp_name AS corpinfoName,
|
||||||
|
|
@ -61,8 +28,7 @@
|
||||||
COUNT(DISTINCT CASE WHEN h.source = 6 THEN h.hidden_id END) as fireCheckTotalCount,
|
COUNT(DISTINCT CASE WHEN h.source = 6 THEN h.hidden_id END) as fireCheckTotalCount,
|
||||||
COUNT(DISTINCT CASE WHEN h.source = 7 AND her.evaluation_result != 1 THEN h.hidden_id END) as videoPatrolEvalCount,
|
COUNT(DISTINCT CASE WHEN h.source = 7 AND her.evaluation_result != 1 THEN h.hidden_id END) as videoPatrolEvalCount,
|
||||||
COUNT(DISTINCT CASE WHEN h.source = 7 THEN h.hidden_id END) as videoPatrolTotalCount,
|
COUNT(DISTINCT CASE WHEN h.source = 7 THEN h.hidden_id END) as videoPatrolTotalCount,
|
||||||
IFNULL(ec_all.evaluationMembers, '') AS evaluationMembers,
|
IFNULL(ec_all.evaluationMembers, '') AS evaluationMembers
|
||||||
(SELECT e.evaluation_closed FROM evaluation_corp e WHERE e.delete_enum = 'FALSE' LIMIT 1) AS evaluationClosed
|
|
||||||
FROM evaluation_config ec
|
FROM evaluation_config ec
|
||||||
left join evaluation_corp ecorp ON ecorp.corpinfo_id = ec.corpinfo_id AND ecorp.delete_enum = 'FALSE'
|
left join evaluation_corp ecorp ON ecorp.corpinfo_id = ec.corpinfo_id AND ecorp.delete_enum = 'FALSE'
|
||||||
LEFT JOIN corp_info ci ON ci.id = ec.corpinfo_id AND ci.delete_enum = 'FALSE'
|
LEFT JOIN corp_info ci ON ci.id = ec.corpinfo_id AND ci.delete_enum = 'FALSE'
|
||||||
|
|
@ -302,8 +268,7 @@
|
||||||
LEFT JOIN user usr ON ec.user_id = usr.id
|
LEFT JOIN user usr ON ec.user_id = usr.id
|
||||||
WHERE ec.corpinfo_id = ci.id
|
WHERE ec.corpinfo_id = ci.id
|
||||||
AND ec.delete_enum = 'FALSE'
|
AND ec.delete_enum = 'FALSE'
|
||||||
AND ec.evaluation_type = 2) AS envEvaluationMember,
|
AND ec.evaluation_type = 2) AS envEvaluationMember
|
||||||
(SELECT e.evaluation_closed FROM evaluation_corp e WHERE e.delete_enum = 'FALSE' LIMIT 1) AS evaluationClosed
|
|
||||||
FROM corp_info ci
|
FROM corp_info ci
|
||||||
LEFT JOIN user hu ON hu.corpinfo_id = ci.id
|
LEFT JOIN user hu ON hu.corpinfo_id = ci.id
|
||||||
LEFT JOIN hidden h ON hu.id = h.creator_id AND h.delete_enum = 'FALSE' AND h.state = 301 AND
|
LEFT JOIN hidden h ON hu.id = h.creator_id AND h.delete_enum = 'FALSE' AND h.state = 301 AND
|
||||||
|
|
@ -335,36 +300,27 @@
|
||||||
|
|
||||||
<select id="userEvalStatisticsPage" resultType="com.zcloud.hidden.evaluation.persistence.dataobject.UserEvalStatisticsDO">
|
<select id="userEvalStatisticsPage" resultType="com.zcloud.hidden.evaluation.persistence.dataobject.UserEvalStatisticsDO">
|
||||||
SELECT
|
SELECT
|
||||||
ci.corp_name AS corpinfoName,
|
ci.corp_name as corpinfoName,
|
||||||
u.id AS userId,
|
h.creator_id as userId,
|
||||||
u.username AS userName,
|
u.username AS userName,
|
||||||
u.name,
|
u.name AS name,
|
||||||
u.department_id AS departmentId,
|
u.department_id as departmentId,
|
||||||
d.name AS departmentName,
|
d.name AS departmentName,
|
||||||
p.post_name AS postName,
|
p.post_name AS postName,
|
||||||
1 AS evaluationType,
|
|
||||||
COUNT(DISTINCT CASE WHEN her.evaluation_result =2 THEN h.id END) AS totalScore,
|
COUNT(DISTINCT CASE WHEN her.evaluation_result =2 THEN h.id END) AS totalScore,
|
||||||
COUNT(DISTINCT CASE WHEN her.exchange_flag = 1 THEN h.id END) AS exchangedScore,
|
COUNT(DISTINCT CASE WHEN her.exchange_flag = 1 THEN h.id END) AS exchangedScore,
|
||||||
COUNT(DISTINCT CASE WHEN her.exchange_flag = 0 AND her.evaluation_result = 2 THEN h.id END) AS notExchangedScore
|
COUNT(DISTINCT CASE WHEN her.exchange_flag = 0 and her.evaluation_result=2 THEN h.id END) AS notExchangedScore
|
||||||
FROM user u
|
FROM hidden h left join evaluation_corp ecorp on ecorp.corpinfo_id = h.corp_id
|
||||||
|
inner JOIN user u ON h.creator_id = u.id
|
||||||
LEFT JOIN department d ON u.department_id = d.id
|
LEFT JOIN department d ON u.department_id = d.id
|
||||||
LEFT JOIN post p ON u.post_id = p.id
|
left join post p ON u.post_id = p.id
|
||||||
LEFT JOIN corp_info ci ON u.corpinfo_id = ci.id AND ci.delete_enum = 'FALSE'
|
left join corp_info ci ON h.corp_id = ci.id AND ci.delete_enum = 'FALSE'
|
||||||
LEFT JOIN hidden h ON h.creator_id = u.id
|
LEFT JOIN hidden_evaluation_record her ON h.hidden_id = her.hidden_id AND her.delete_enum = 'FALSE'
|
||||||
AND h.delete_enum = 'FALSE'
|
WHERE h.delete_enum = 'FALSE'
|
||||||
AND h.state = 301
|
AND h.state = 301
|
||||||
AND ((h.source IN (4,5) AND h.final_check = 1) OR h.source NOT IN (4,5))
|
AND (
|
||||||
AND h.hidden_type IN ('aqyh','rdbaqys','wzcz','wzzh','grfhyp','wdbaqzt','jxsb','hcl','dqsb','gsj','aqbhzz','ss','xf','tzsb','hjdbaqys','zmjdgyxbj','aqbzbs','gkkd','zykjxzzl','eltq','gldqx','wzdhzdlsbdw','wfacs','jypx','aqyh-qt')
|
(h.source IN (4,5) AND h.final_check = 1)
|
||||||
LEFT JOIN hidden_evaluation_record her ON h.hidden_id = her.hidden_id
|
OR h.source NOT IN (4,5)
|
||||||
AND her.evaluation_type = 1
|
|
||||||
AND her.delete_enum = 'FALSE'
|
|
||||||
WHERE u.delete_enum = 'FALSE'
|
|
||||||
AND EXISTS (
|
|
||||||
SELECT 1 FROM hidden h_exist
|
|
||||||
WHERE h_exist.creator_id = u.id
|
|
||||||
AND h_exist.delete_enum = 'FALSE'
|
|
||||||
AND h_exist.state = 301
|
|
||||||
AND ((h_exist.source IN (4,5) AND h_exist.final_check = 1) OR h_exist.source NOT IN (4,5))
|
|
||||||
)
|
)
|
||||||
<if test="params.corpinfoId != null">
|
<if test="params.corpinfoId != null">
|
||||||
AND u.corpinfo_id= #{params.corpinfoId}
|
AND u.corpinfo_id= #{params.corpinfoId}
|
||||||
|
|
@ -375,66 +331,15 @@
|
||||||
<if test="params.userName != null and params.userName != ''">
|
<if test="params.userName != null and params.userName != ''">
|
||||||
AND u.name LIKE CONCAT('%', #{params.userName}, '%')
|
AND u.name LIKE CONCAT('%', #{params.userName}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="params.userIdList != null and params.userIdList.size() > 0">
|
<if test="params.userIdList != null and params.userIdList.size() > 0">
|
||||||
AND u.id IN
|
and h.creator_id in
|
||||||
<foreach collection="params.userIdList" item="item" open="(" close=")" separator=",">
|
<foreach collection="params.userIdList" item="item" open="(" close=")" separator=",">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
GROUP BY u.id, u.username, u.name, u.department_id, d.name, p.post_name, ci.corp_name
|
GROUP BY h.creator_id
|
||||||
|
ORDER BY u.sort ,u.create_time desc
|
||||||
UNION ALL
|
|
||||||
|
|
||||||
SELECT
|
|
||||||
ci.corp_name AS corpinfoName,
|
|
||||||
u.id AS userId,
|
|
||||||
u.username AS userName,
|
|
||||||
u.name,
|
|
||||||
u.department_id AS departmentId,
|
|
||||||
d.name AS departmentName,
|
|
||||||
p.post_name AS postName,
|
|
||||||
2 AS evaluationType,
|
|
||||||
COUNT(DISTINCT CASE WHEN her.evaluation_result = 2 THEN h.id END) AS totalScore,
|
|
||||||
COUNT(DISTINCT CASE WHEN her.exchange_flag = 1 THEN h.id END) AS exchangedScore,
|
|
||||||
COUNT(DISTINCT CASE WHEN her.exchange_flag = 0 AND her.evaluation_result = 2 THEN h.id END) AS notExchangedScore
|
|
||||||
FROM user u
|
|
||||||
LEFT JOIN department d ON u.department_id = d.id
|
|
||||||
LEFT JOIN post p ON u.post_id = p.id
|
|
||||||
LEFT JOIN corp_info ci ON u.corpinfo_id = ci.id AND ci.delete_enum = 'FALSE'
|
|
||||||
LEFT JOIN hidden h ON h.creator_id = u.id
|
|
||||||
AND h.delete_enum = 'FALSE'
|
|
||||||
AND h.state = 301
|
|
||||||
AND ((h.source IN (4,5) AND h.final_check = 1) OR h.source NOT IN (4,5))
|
|
||||||
AND h.hidden_type IN ('wshb','hjwr','ws','dq','zs','gf','hjwsjlh','yqfk','wshb-qt')
|
|
||||||
LEFT JOIN hidden_evaluation_record her ON h.hidden_id = her.hidden_id
|
|
||||||
AND her.evaluation_type = 2
|
|
||||||
AND her.delete_enum = 'FALSE'
|
|
||||||
WHERE u.delete_enum = 'FALSE'
|
|
||||||
AND EXISTS (
|
|
||||||
SELECT 1 FROM hidden h_exist
|
|
||||||
WHERE h_exist.creator_id = u.id
|
|
||||||
AND h_exist.delete_enum = 'FALSE'
|
|
||||||
AND h_exist.state = 301
|
|
||||||
AND ((h_exist.source IN (4,5) AND h_exist.final_check = 1) OR h_exist.source NOT IN (4,5))
|
|
||||||
)
|
|
||||||
<if test="params.corpinfoId != null">
|
|
||||||
AND u.corpinfo_id = #{params.corpinfoId}
|
|
||||||
</if>
|
|
||||||
<if test="params.departmentId != null ">
|
|
||||||
AND d.id = #{params.departmentId}
|
|
||||||
</if>
|
|
||||||
<if test="params.userName != null and params.userName != ''">
|
|
||||||
AND u.name LIKE CONCAT('%', #{params.userName}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="params.userIdList != null and params.userIdList.size() > 0">
|
|
||||||
AND u.id IN
|
|
||||||
<foreach collection="params.userIdList" item="item" open="(" close=")" separator=",">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
GROUP BY u.id, u.username, u.name, u.department_id, d.name, p.post_name, ci.corp_name
|
|
||||||
|
|
||||||
ORDER BY userId ASC
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="hiddenEvalPage" resultType="com.zcloud.hidden.evaluation.persistence.dataobject.HiddenEvalDO">
|
<select id="hiddenEvalPage" resultType="com.zcloud.hidden.evaluation.persistence.dataobject.HiddenEvalDO">
|
||||||
|
|
@ -533,8 +438,7 @@
|
||||||
THEN h.id END) AS exchangeScoreCount,
|
THEN h.id END) AS exchangeScoreCount,
|
||||||
COUNT(DISTINCT CASE
|
COUNT(DISTINCT CASE
|
||||||
WHEN her.evaluation_result = 2 AND her.exchange_flag = 0 AND u.corpinfo_id = ecorp.corpinfo_id
|
WHEN her.evaluation_result = 2 AND her.exchange_flag = 0 AND u.corpinfo_id = ecorp.corpinfo_id
|
||||||
THEN h.id END) AS unExchangeScoreCount,
|
THEN h.id END) AS unExchangeScoreCount
|
||||||
(SELECT e.evaluation_closed FROM evaluation_corp e WHERE e.delete_enum = 'FALSE' LIMIT 1) AS evaluationClosed
|
|
||||||
FROM evaluation_corp ecorp
|
FROM evaluation_corp ecorp
|
||||||
LEFT JOIN evaluation_config ec on ecorp.corpinfo_id = ec.corpinfo_id AND ecorp.delete_enum = 'FALSE'
|
LEFT JOIN evaluation_config ec on ecorp.corpinfo_id = ec.corpinfo_id AND ecorp.delete_enum = 'FALSE'
|
||||||
LEFT JOIN corp_info ci
|
LEFT JOIN corp_info ci
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue