feat: 企标制修订流程优化

This commit is contained in:
2024-09-14 16:22:12 +08:00
parent af60c3af29
commit 5912c80e58
4 changed files with 23 additions and 14 deletions
@@ -1,9 +1,12 @@
package com.jero.modules.activiti.process.esInitChange.entity.enums; package com.jero.modules.activiti.process.esInitChange.entity.enums;
import lombok.Getter;
/** /**
* @author: Mzaxd * @author: Mzaxd
* @Date: 2023/10/13 14:17 * @Date: 2023/10/13 14:17
*/ */
@Getter
public enum ESPProjectStatus { public enum ESPProjectStatus {
NOT_STARTED("未开始", "1"), NOT_STARTED("未开始", "1"),
@@ -23,14 +26,6 @@ public enum ESPProjectStatus {
this.value = value; this.value = value;
} }
public String getName() {
return name;
}
public String getValue() {
return value;
}
public static String getValueByName(String name) { public static String getValueByName(String name) {
for (ESPProjectStatus status : ESPProjectStatus.values()) { for (ESPProjectStatus status : ESPProjectStatus.values()) {
if (status.getName().equals(name)) { if (status.getName().equals(name)) {
@@ -234,8 +234,7 @@ public class EsRevisionServiceImpl extends ServiceImpl<EsRevisionMapper, Process
throw new JeroBootException(ResultCommon.INVALID_ESP); throw new JeroBootException(ResultCommon.INVALID_ESP);
} }
// 设置状态为运行中 // 设置状态为运行中
esp.setProjectStatus(ESPProjectStatus.IN_PROGRESS.getValue()); espService.changeProjectStatus(espId, ESPProjectStatus.IN_PROGRESS);
espService.updateById(esp);
} }
@Override @Override
@@ -534,8 +533,8 @@ public class EsRevisionServiceImpl extends ServiceImpl<EsRevisionMapper, Process
List<String> adviceUserList = Arrays.asList(workGroup.split(",")); List<String> adviceUserList = Arrays.asList(workGroup.split(","));
// 如果人员超过600则提示 // 如果人员超过600则提示
if (adviceUserList.size() > 600) { if (adviceUserList.size() > 600) {
log.error("当前提交部门人员超过600人"); log.error("当前提交人员超过600人");
throw new JeroBootException("当前提交部门人员超过600人,请重新选择!"); throw new JeroBootException("当前提交人员超过600人,请重新选择!");
} }
runtimeService.setVariableLocal(executionId, "adviceUserList", adviceUserList); runtimeService.setVariableLocal(executionId, "adviceUserList", adviceUserList);
runtimeService.setVariable(executionId, executionId + "-adviceDeadline", adviceDeadline); runtimeService.setVariable(executionId, executionId + "-adviceDeadline", adviceDeadline);
@@ -1,10 +1,11 @@
package com.jero.modules.laws.enterprise.service; package com.jero.modules.laws.enterprise.service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.modules.activiti.process.esInitChange.entity.enums.ESPProjectStatus;
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardPlan;
import com.jero.modules.laws.enterprise.entity.dto.ESPlanQueryDTO; import com.jero.modules.laws.enterprise.entity.dto.ESPlanQueryDTO;
import com.jero.modules.laws.enterprise.entity.vo.EnterpriseStandardPlanVo; import com.jero.modules.laws.enterprise.entity.vo.EnterpriseStandardPlanVo;
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardPlan;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@@ -63,4 +64,11 @@ public interface EnterpriseStandardPlanService extends IService<EnterpriseStanda
* 年度制修订计划导入 * 年度制修订计划导入
*/ */
void importAnnualRevisionPlan(MultipartFile file, HttpServletResponse response) throws IOException; void importAnnualRevisionPlan(MultipartFile file, HttpServletResponse response) throws IOException;
/**
* 修改企标计划项目状态
* @param planId
* @param status
*/
void changeProjectStatus(String planId, ESPProjectStatus status);
} }
@@ -271,6 +271,13 @@ public class EnterpriseStandardPlanServiceImpl extends ServiceImpl<EnterpriseSta
log.info("年度制修订计划表数据导入结束"); log.info("年度制修订计划表数据导入结束");
} }
@Override
public void changeProjectStatus(String planId, ESPProjectStatus status) {
EnterpriseStandardPlan plan = this.getById(planId);
plan.setProjectStatus(status.getValue());
this.updateById(plan);
}
} }