Revert "feat(): 添加考评结束开关功能"

This reverts commit e91eff9247.
main
lishiwei 2026-06-10 10:49:45 +08:00
parent e91eff9247
commit 8c5a5863bd
19 changed files with 1 additions and 98 deletions

View File

@ -1,2 +0,0 @@
-- 考评组配置增加考评是否结束开关
ALTER TABLE evaluation_corp ADD COLUMN evaluation_closed TINYINT DEFAULT 0 COMMENT '考评是否结束 0=未结束 1=已结束';

View File

@ -55,13 +55,6 @@ public class EvaluationConfigController {
return SingleResponse.buildSuccess();
}
@ApiOperation("考评结束开关")
@PostMapping("/toggleEvalClosed")
public SingleResponse toggleEvalClosed(@RequestBody ToggleEvalClosedCmd cmd) {
evaluationConfigService.toggleEvalClosed(cmd);
return SingleResponse.buildSuccess();
}

View File

@ -4,7 +4,6 @@ import com.alibaba.cola.exception.BizException;
import com.zcloud.hidden.evaluation.domain.gateway.EvaluationCorpGateway;
import com.zcloud.hidden.evaluation.domain.model.EvaluationCorpE;
import com.zcloud.hidden.evaluation.dto.EvaluationCorpUpdateCmd;
import com.zcloud.hidden.evaluation.dto.ToggleEvalClosedCmd;
import lombok.AllArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
@ -31,15 +30,5 @@ public class EvaluationCorpUpdateExe {
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("配置失败");
}
}
}

View File

@ -6,7 +6,6 @@ import com.zcloud.hidden.evaluation.api.EvaluationConfigServiceI;
import com.zcloud.hidden.evaluation.command.EvaluationConfigAddExe;
import com.zcloud.hidden.evaluation.command.EvaluationConfigRemoveExe;
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.dto.*;
import com.zcloud.hidden.evaluation.dto.clientobject.CorpEvaluationConfigCO;
@ -30,7 +29,6 @@ public class EvaluationConfigServiceImpl implements EvaluationConfigServiceI {
private final EvaluationConfigUpdateExe evaluationConfigUpdateExe;
private final EvaluationConfigRemoveExe evaluationConfigRemoveExe;
private final EvaluationConfigQueryExe evaluationConfigQueryExe;
private final EvaluationCorpUpdateExe evaluationCorpUpdateExe;
@Override
public PageResponse<CorpEvaluationConfigCO> listPage(EvaluationConfigPageQry qry) {
@ -69,10 +67,5 @@ public class EvaluationConfigServiceImpl implements EvaluationConfigServiceI {
public void editBath(EvaluationConfigBathUpdateCmd evaluationConfigBathUpdateCmd) {
evaluationConfigUpdateExe.editBath(evaluationConfigBathUpdateCmd);
}
@Override
public void toggleEvalClosed(ToggleEvalClosedCmd cmd) {
evaluationCorpUpdateExe.toggleEvalClosed(cmd);
}
}

View File

@ -29,7 +29,5 @@ public interface EvaluationConfigServiceI {
List<EvaluationConfigCO> listAll(EvaluationConfigQry qry);
void editBath(EvaluationConfigBathUpdateCmd evaluationConfigBathUpdateCmd);
void toggleEvalClosed(ToggleEvalClosedCmd cmd);
}

View File

@ -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;
}

View File

@ -35,9 +35,6 @@ public class CorpEvalCO implements Serializable {
private Integer exchangeScoreCount;
@ApiModelProperty(value = "待兑换积分数")
private Integer unExchangeScoreCount;
//考评是否结束 0=未结束 1=已结束
@ApiModelProperty(value = "考评是否结束 0=未结束 1=已结束")
private Integer evaluationClosed;

View File

@ -34,8 +34,5 @@ public class CorpEvalStatisticsCO implements Serializable {
private String safeEvaluationMember;
@ApiModelProperty(value = "环保类考评组成员")
private String envEvaluationMember;
//考评是否结束 0=未结束 1=已结束
@ApiModelProperty(value = "考评是否结束 0=未结束 1=已结束")
private Integer evaluationClosed;
}

View File

@ -31,9 +31,6 @@ public class CorpEvaluationConfigCO implements Serializable {
private String envEvaluationConfigStatus;
@ApiModelProperty(value = "环保类考评组成员")
private String envEvaluationMember;
//考评是否结束 0=未结束 1=已结束
@ApiModelProperty(value = "考评是否结束 0=未结束 1=已结束")
private Integer evaluationClosed;
}

View File

@ -67,8 +67,5 @@ public class CorpHiddenStatisticsCO implements Serializable {
@ApiModelProperty(value = "考评组成员")
private String evaluationMembers;
//考评是否结束 0=未结束 1=已结束
@ApiModelProperty(value = "考评是否结束 0=未结束 1=已结束")
private Integer evaluationClosed;
}

View File

@ -20,11 +20,6 @@ public interface EvaluationCorpGateway {
*/
Boolean update(EvaluationCorpE evaluationCorpE);
/**
*
*/
Boolean toggleEvalClosed(EvaluationCorpE evaluationCorpE);
/**
*
*/

View File

@ -43,7 +43,5 @@ public class EvaluationCorpE extends BaseE {
private Long orgId;
//环境
private String env;
//考评是否结束 0=未结束(开始考评) 1=已结束(结束考评)
private Integer evaluationClosed;
}

View File

@ -42,15 +42,6 @@ public class EvaluationCorpGatewayImpl implements EvaluationCorpGateway {
return true;
}
@Override
public Boolean toggleEvalClosed(EvaluationCorpE evaluationCorpE) {
evaluationCorpRepository.list().forEach(corp -> {
corp.setEvaluationClosed(evaluationCorpE.getEvaluationClosed());
evaluationCorpRepository.updateById(corp);
});
return true;
}
@Override
public Boolean deletedEvaluationCorpById(Long id) {
return evaluationCorpRepository.removeById(id);

View File

@ -33,9 +33,6 @@ public class CorpEvalDO implements Serializable {
private Integer exchangeScoreCount;
@ApiModelProperty(value = "待兑换积分数")
private Integer unExchangeScoreCount;
//考评是否结束 0=未结束 1=已结束
@ApiModelProperty(value = "考评是否结束 0=未结束 1=已结束")
private Integer evaluationClosed;

View File

@ -32,8 +32,5 @@ public class CorpEvalStatisticsDO implements Serializable {
private String safeEvaluationMember;
@ApiModelProperty(value = "环保类考评组成员")
private String envEvaluationMember;
//考评是否结束 0=未结束 1=已结束
@ApiModelProperty(value = "考评是否结束 0=未结束 1=已结束")
private Integer evaluationClosed;
}

View File

@ -29,9 +29,6 @@ public class CorpEvaluationConfigDO implements Serializable {
private String envEvaluationConfigStatus;
@ApiModelProperty(value = "环保类考评组成员")
private String envEvaluationMember;
//考评是否结束 0=未结束 1=已结束
@ApiModelProperty(value = "考评是否结束 0=未结束 1=已结束")
private Integer evaluationClosed;
}

View File

@ -64,8 +64,5 @@ public class CorpHiddenStatisticsDO implements Serializable {
@ApiModelProperty(value = "考评组成员")
private String evaluationMembers;
//考评是否结束 0=未结束 1=已结束
@ApiModelProperty(value = "考评是否结束 0=未结束 1=已结束")
private Integer evaluationClosed;
}

View File

@ -24,9 +24,6 @@ public class EvaluationCorpDO extends BaseDO {
//企业id
@ApiModelProperty(value = "企业id")
private Long corpinfoId;
//考评是否结束 0=未结束 1=已结束
@ApiModelProperty(value = "考评是否结束 0=未结束 1=已结束")
private Integer evaluationClosed;
public EvaluationCorpDO(String evaluationCorpId) {
this.evaluationCorpId = evaluationCorpId;

View File

@ -10,8 +10,7 @@
CASE WHEN ec_safe.id IS NOT NULL THEN '已分配' ELSE '未分配' END AS safeEvaluationConfigStatus,
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(ec_env.members, '') AS envEvaluationMember
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