fix: 81549 企标复审流程--试运行结束发起复审、三年定时发起复审,两个定时任务没有自动发起流程
This commit is contained in:
+2
-2
@@ -153,7 +153,7 @@ public class ProcessEsRecheckServiceImpl extends ServiceImpl<ProcessEsRecheckMap
|
|||||||
String jsonData = translationAspect.manualParseDictText(recheckData, this.getUserMap(variables));
|
String jsonData = translationAspect.manualParseDictText(recheckData, this.getUserMap(variables));
|
||||||
// 强制撤回
|
// 强制撤回
|
||||||
common.setProcessInstanceId(processInstanceId);
|
common.setProcessInstanceId(processInstanceId);
|
||||||
actFlowCommonService.saveFirstNodeDraft(common, ProcessTypeEnum.ES_RECHECK, jsonData);
|
actFlowCommonService.saveFirstNodeDraftCustomUserId(common, ProcessTypeEnum.ES_RECHECK, jsonData, userId);
|
||||||
// 根据流程实例id更新流程总表
|
// 根据流程实例id更新流程总表
|
||||||
String prcName = common.getPrcName();
|
String prcName = common.getPrcName();
|
||||||
String prcMes = common.getPrcMes();
|
String prcMes = common.getPrcMes();
|
||||||
@@ -166,7 +166,7 @@ public class ProcessEsRecheckServiceImpl extends ServiceImpl<ProcessEsRecheckMap
|
|||||||
Map<String, Object> actVariables = new HashMap<>();
|
Map<String, Object> actVariables = new HashMap<>();
|
||||||
for (Map.Entry<String, Object> entry : flowUser.entrySet()) {
|
for (Map.Entry<String, Object> entry : flowUser.entrySet()) {
|
||||||
String key = entry.getKey();
|
String key = entry.getKey();
|
||||||
actVariables.put(key, entry.getValue());
|
actFlowCommonService.putIfNotNull(actVariables, key, entry.getValue());
|
||||||
}
|
}
|
||||||
return actVariables;
|
return actVariables;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
package com.jero.modules.laws.common.util;
|
package com.jero.modules.laws.common.util;
|
||||||
|
|
||||||
import com.jero.common.system.vo.LoginUser;
|
import com.jero.common.system.vo.LoginUser;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
import org.apache.shiro.UnavailableSecurityManagerException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: liao
|
* @Author: liao
|
||||||
* @Date: 2023/10/26 16:55
|
* @Date: 2023/10/26 16:55
|
||||||
* @Description: 当前用户工具类
|
* @Description: 当前用户工具类
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
public class CurrentUserUtil {
|
public class CurrentUserUtil {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -75,8 +78,12 @@ public class CurrentUserUtil {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static LoginUser getLoginUser() {
|
public static LoginUser getLoginUser() {
|
||||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
try {
|
||||||
return loginUser;
|
return (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
} catch (UnavailableSecurityManagerException e) {
|
||||||
|
log.warn("未找到当前登录人");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-7
@@ -36,6 +36,9 @@ public class ESTrialEndRecheckJob implements Job {
|
|||||||
@Resource
|
@Resource
|
||||||
private ProcessEsRecheckService recheckService;
|
private ProcessEsRecheckService recheckService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private EnterpriseStandardRecheckPlanService recheckPlanService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private EnterpriseStandardRecheckPlanService esRecheckPlanService;
|
private EnterpriseStandardRecheckPlanService esRecheckPlanService;
|
||||||
|
|
||||||
@@ -64,19 +67,18 @@ public class ESTrialEndRecheckJob implements Job {
|
|||||||
expireStandards.add(es);
|
expireStandards.add(es);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LambdaQueryWrapper<ProcessEsRecheck> recheckWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<EnterpriseStandardRecheckPlan> recheckWrapper = new LambdaQueryWrapper<>();
|
||||||
recheckWrapper.in(ProcessEsRecheck::getStandardNumber,
|
recheckWrapper.in(EnterpriseStandardRecheckPlan::getStandardNo,
|
||||||
expireStandards.stream().map(LawsEnterpriseStandard::getStandardNumber).collect(Collectors.toList()));
|
expireStandards.stream().map(LawsEnterpriseStandard::getStandardNumber).collect(Collectors.toList()));
|
||||||
List<ProcessEsRecheck> recheckList = recheckService.list(recheckWrapper);
|
List<EnterpriseStandardRecheckPlan> recheckList = recheckPlanService.list(recheckWrapper);
|
||||||
if (recheckList != null && !recheckList.isEmpty()) {
|
if (recheckList != null && !recheckList.isEmpty()) {
|
||||||
// 找到已经发过复审流程的企标
|
// 找到已经存在复审计划的企标
|
||||||
List<String> recheckStandardNumbers = recheckList.stream().map(ProcessEsRecheck::getStandardNumber).collect(Collectors.toList());
|
List<String> recheckStandardNumbers = recheckList.stream().map(EnterpriseStandardRecheckPlan::getStandardNo).collect(Collectors.toList());
|
||||||
// 将已经发过复审流程的企标从超出试用期的企标中移除
|
// 将已经存在的企标从发起集合中移除
|
||||||
expireStandards = expireStandards.stream().filter(es -> !recheckStandardNumbers.contains(es.getStandardNumber())).collect(Collectors.toList());
|
expireStandards = expireStandards.stream().filter(es -> !recheckStandardNumbers.contains(es.getStandardNumber())).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
// 发起复审流程
|
// 发起复审流程
|
||||||
for (LawsEnterpriseStandard es : expireStandards) {
|
for (LawsEnterpriseStandard es : expireStandards) {
|
||||||
// 企标已经达到35个月,需要重新复审
|
|
||||||
EnterpriseStandardRecheckPlan recheckPlan = new EnterpriseStandardRecheckPlan();
|
EnterpriseStandardRecheckPlan recheckPlan = new EnterpriseStandardRecheckPlan();
|
||||||
recheckPlan.setStandardId(es.getId());
|
recheckPlan.setStandardId(es.getId());
|
||||||
recheckPlan.setStandardNo(es.getStandardNumber());
|
recheckPlan.setStandardNo(es.getStandardNumber());
|
||||||
|
|||||||
+2
@@ -71,6 +71,8 @@
|
|||||||
<if test="param.mainDraftingUnit != null and param.mainDraftingUnit != ''">
|
<if test="param.mainDraftingUnit != null and param.mainDraftingUnit != ''">
|
||||||
AND s.main_drafting_unit = #{param.mainDraftingUnit}
|
AND s.main_drafting_unit = #{param.mainDraftingUnit}
|
||||||
</if>
|
</if>
|
||||||
|
GROUP BY
|
||||||
|
s.standard_number, p.create_time
|
||||||
ORDER BY
|
ORDER BY
|
||||||
p.create_time DESC
|
p.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Reference in New Issue
Block a user