fix: 企标立项变更流程没有历史流程无法发起bug

This commit is contained in:
2024-04-10 17:35:59 +08:00
parent 80e259dcee
commit 7adce6c119
2 changed files with 19 additions and 3 deletions
@@ -15,6 +15,7 @@ import com.jero.common.constant.enums.LanguageEnum;
import com.jero.common.constant.enums.YesOrNoEnum;
import com.jero.common.exception.JeroBootException;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.system.vo.SysDepartTreeModel;
import com.jero.common.util.IntekeyUtils;
import com.jero.common.util.MessageUtils;
import com.jero.common.util.MinioUtil;
@@ -58,6 +59,7 @@ import com.jero.modules.system.service.ISysDepartService;
import com.jero.modules.system.service.ISysDictItemService;
import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.system.util.SysWaterMarkUtil;
import com.jero.modules.system.util.UserUtils;
import com.jero.modules.tag.entity.LawsArea;
import com.jero.modules.tag.entity.LawsTag;
import com.jero.modules.tag.enums.FieldShowTypeEnum;
@@ -171,6 +173,9 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
@Resource
private IProcessFbStandardConsultationService processFbStandardConsultationService;
@Resource
private ISysDepartService departService;
public static boolean ENCRYPT_ENABLE;
public static String DECRYPT_URL;
public static String DECRYPT_APP_CODE;
@@ -731,7 +736,8 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
this.esInspectContentSaveOrUpdate(inspectContents, id, standardNumber);
}
// 企标授权部门处理
if (TableNameEnum.ENTERPRISE_STANDARDS.getValue().equals(module)) {
if (TableNameEnum.ENTERPRISE_STANDARDS.getValue().equals(module) ||
TableNameEnum.FOREIGN_REGULATIONS.getValue().equals(module)) {
if (parameterMap.get(FieldCommon.AUTH_DEPT) != null) {
esAuthUserService.resetAuthDept(id, parameterMap.get(FieldCommon.AUTH_DEPT).toString());
}
@@ -2100,6 +2106,16 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
parameterMap.remove(FieldCommon.AUTH_DEPT);
}
}
if (module.equals(TableNameEnum.FOREIGN_REGULATIONS.getValue())) {
// 外标判断当前登陆人是不是汽车研究总院及子部门的员工,如果是则可以查看引进标准,不做任何操作
// 如果不是则需要将引进标准的id从所有id中排除掉
// 获取汽车研发总院及其所有子部门
List<SysDepartTreeModel> departList = departService.queryTreeByKeyWord("汽车研究总院");
List<String> departIdList = departList.stream().map(SysDepartTreeModel::getId).collect(Collectors.toList());
String userId = UserUtils.getUserId();
// sysUserService.getUserByDepIds()
}
// 体系
String standardSystem = (String) parameterMap.get(FieldCommon.STANDARD_SYSTEM);
if (StrUtil.isNotBlank(standardSystem)) {
@@ -306,9 +306,9 @@ public class EnterpriseStandardUtil {
processInstanceIdList = paList.stream().map(ProcessAll::getProcessInstanceId).collect(Collectors.toList());
}
LambdaQueryWrapper<ProcessEsInitChange> initChangeWrapper = new LambdaQueryWrapper<>();
initChangeWrapper.in(ProcessEsInitChange::getNewEnStandardNo, standardNumbers);
initChangeWrapper.eq(ProcessEsInitChange::getDelFlag, YesOrNoEnum.NO.getValue());
initChangeWrapper.in(ProcessEsInitChange::getProcessInstanceId, processInstanceIdList);
initChangeWrapper.in(!standardNumbers.isEmpty(), ProcessEsInitChange::getNewEnStandardNo, standardNumbers);
initChangeWrapper.in(!processInstanceIdList.isEmpty(), ProcessEsInitChange::getProcessInstanceId, processInstanceIdList);
numList.addAll(initChangeService.list(initChangeWrapper)
.stream().map(ProcessEsInitChange::getNewEnStandardNo).collect(Collectors.toList()));
List<String> duplicateStandardNumbers = new ArrayList<>();