parent
e91eff9247
commit
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue