feat(): 添加考评按钮状态查询功能
parent
e91eff9247
commit
8a0e5a335e
|
|
@ -62,6 +62,12 @@ public class EvaluationConfigController {
|
|||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("查询考评结束状态")
|
||||
@GetMapping("/getEvalClosedStatus")
|
||||
public SingleResponse<Integer> getEvalClosedStatus() {
|
||||
return SingleResponse.of(evaluationConfigService.getEvalClosedStatus());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -41,5 +41,9 @@ public class EvaluationCorpUpdateExe {
|
|||
throw new BizException("配置失败");
|
||||
}
|
||||
}
|
||||
|
||||
public Integer getEvalClosedStatus() {
|
||||
return evaluationCorpGateway.getEvalClosedStatus();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,5 +74,10 @@ public class EvaluationConfigServiceImpl implements EvaluationConfigServiceI {
|
|||
public void toggleEvalClosed(ToggleEvalClosedCmd cmd) {
|
||||
evaluationCorpUpdateExe.toggleEvalClosed(cmd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getEvalClosedStatus() {
|
||||
return evaluationCorpUpdateExe.getEvalClosedStatus();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,5 +31,7 @@ public interface EvaluationConfigServiceI {
|
|||
void editBath(EvaluationConfigBathUpdateCmd evaluationConfigBathUpdateCmd);
|
||||
|
||||
void toggleEvalClosed(ToggleEvalClosedCmd cmd);
|
||||
|
||||
Integer getEvalClosedStatus();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,11 @@ public interface EvaluationCorpGateway {
|
|||
*/
|
||||
Boolean toggleEvalClosed(EvaluationCorpE evaluationCorpE);
|
||||
|
||||
/**
|
||||
* 查询考评结束状态
|
||||
*/
|
||||
Integer getEvalClosedStatus();
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import org.springframework.beans.BeanUtils;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
|
|
@ -51,6 +52,16 @@ public class EvaluationCorpGatewayImpl implements EvaluationCorpGateway {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getEvalClosedStatus() {
|
||||
List<EvaluationCorpDO> list = evaluationCorpRepository.list();
|
||||
if (list.isEmpty()) {
|
||||
return 0;
|
||||
}
|
||||
Integer closed = list.get(0).getEvaluationClosed();
|
||||
return closed != null ? closed : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deletedEvaluationCorpById(Long id) {
|
||||
return evaluationCorpRepository.removeById(id);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
COALESCE(ec_safe.members, '') AS safeEvaluationMember,
|
||||
CASE WHEN ec_env.id IS NOT NULL THEN '已分配' ELSE '未分配' END AS envEvaluationConfigStatus,
|
||||
COALESCE(ec_env.members, '') AS envEvaluationMember,
|
||||
(SELECT e.evaluation_closed FROM evaluation_corp e WHERE e.delete_enum = 'FALSE' LIMIT 1) AS evaluationClosed
|
||||
COALESCE((SELECT e.evaluation_closed FROM evaluation_corp e WHERE e.delete_enum = 'FALSE' LIMIT 1), 0) AS evaluationClosed
|
||||
FROM evaluation_corp ec left join corp_info ci on ec.corpinfo_id = ci.id
|
||||
LEFT JOIN (SELECT ec.id,ec.corpinfo_id,
|
||||
GROUP_CONCAT(CONCAT(d.name, '-', u.name) SEPARATOR ',') AS members
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
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,
|
||||
IFNULL(ec_all.evaluationMembers, '') AS evaluationMembers,
|
||||
(SELECT e.evaluation_closed FROM evaluation_corp e WHERE e.delete_enum = 'FALSE' LIMIT 1) AS evaluationClosed
|
||||
COALESCE((SELECT e.evaluation_closed FROM evaluation_corp e WHERE e.delete_enum = 'FALSE' LIMIT 1), 0) AS evaluationClosed
|
||||
FROM evaluation_config ec
|
||||
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'
|
||||
|
|
@ -303,7 +303,7 @@
|
|||
WHERE ec.corpinfo_id = ci.id
|
||||
AND ec.delete_enum = 'FALSE'
|
||||
AND ec.evaluation_type = 2) AS envEvaluationMember,
|
||||
(SELECT e.evaluation_closed FROM evaluation_corp e WHERE e.delete_enum = 'FALSE' LIMIT 1) AS evaluationClosed
|
||||
COALESCE((SELECT e.evaluation_closed FROM evaluation_corp e WHERE e.delete_enum = 'FALSE' LIMIT 1), 0) AS evaluationClosed
|
||||
FROM corp_info ci
|
||||
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
|
||||
|
|
@ -534,7 +534,7 @@
|
|||
COUNT(DISTINCT CASE
|
||||
WHEN her.evaluation_result = 2 AND her.exchange_flag = 0 AND u.corpinfo_id = ecorp.corpinfo_id
|
||||
THEN h.id END) AS unExchangeScoreCount,
|
||||
(SELECT e.evaluation_closed FROM evaluation_corp e WHERE e.delete_enum = 'FALSE' LIMIT 1) AS evaluationClosed
|
||||
COALESCE((SELECT e.evaluation_closed FROM evaluation_corp e WHERE e.delete_enum = 'FALSE' LIMIT 1), 0) AS evaluationClosed
|
||||
FROM evaluation_corp ecorp
|
||||
LEFT JOIN evaluation_config ec on ecorp.corpinfo_id = ec.corpinfo_id AND ecorp.delete_enum = 'FALSE'
|
||||
LEFT JOIN corp_info ci
|
||||
|
|
|
|||
Loading…
Reference in New Issue