Merge remote-tracking branch 'origin/guoshengxiong' into guoshengxiong
This commit is contained in:
commit
7552196ae4
@ -1251,10 +1251,10 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
|
||||
String id = MapUtils.getString(map, "id");
|
||||
// 判断是否存在工作流的流程中
|
||||
List<HistoricProcessInstance> list = historyService.createHistoricProcessInstanceQuery().unfinished().list();
|
||||
List<String> modelName = new ArrayList<>();
|
||||
if (list.size() > 0) {
|
||||
Set<String> processDefinitionId = list.stream().map(l -> l.getProcessDefinitionId()).collect(Collectors.toSet());
|
||||
StringBuilder stringBuilder = new StringBuilder("该人员有正在进行中的");
|
||||
List<String> modelName = new ArrayList<>();
|
||||
if (processDefinitionId.size() > 0) {
|
||||
Set<String> startUserIds = list.stream().map(l -> l.getStartUserId()).collect(Collectors.toSet());
|
||||
if (processDefinitionId.size() > 0) {
|
||||
@ -1332,28 +1332,28 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
|
||||
if (stringBuilder.length() > 10) {
|
||||
throw new CustomException(stringBuilder + ",请完成流程后再删除账号", HttpStatus.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
// 判断是否有参与到流程审批中
|
||||
List<WflowModels> modelList = wflowModelsMapper.selectList(null);
|
||||
modelName = new ArrayList<>();
|
||||
for (WflowModels model : modelList) {
|
||||
List<String> userIds = new ArrayList<>();
|
||||
JSONObject process = JSONObject.parseObject(model.getProcess());
|
||||
JSONArray assignedUser1 = process.getJSONObject("props").getJSONArray("assignedUser");
|
||||
if (assignedUser1 != null) {
|
||||
for (int i = 0; i < assignedUser1.size(); i++) {
|
||||
JSONObject jsonObject = assignedUser1.getJSONObject(i);
|
||||
userIds.add(jsonObject.getString("id"));
|
||||
}
|
||||
}
|
||||
getUserIds(process.getJSONObject("children"), userIds);
|
||||
if (userIds.contains(id)) {
|
||||
modelName.add(model.getFormName());
|
||||
}
|
||||
// 判断是否有参与到流程审批中
|
||||
List<WflowModels> modelList = wflowModelsMapper.selectList(null);
|
||||
modelName = new ArrayList<>();
|
||||
for (WflowModels model : modelList) {
|
||||
List<String> userIds = new ArrayList<>();
|
||||
JSONObject process = JSONObject.parseObject(model.getProcess());
|
||||
JSONArray assignedUser1 = process.getJSONObject("props").getJSONArray("assignedUser");
|
||||
if (assignedUser1 != null) {
|
||||
for (int i = 0; i < assignedUser1.size(); i++) {
|
||||
JSONObject jsonObject = assignedUser1.getJSONObject(i);
|
||||
userIds.add(jsonObject.getString("id"));
|
||||
}
|
||||
}
|
||||
if (modelName.size() > 0) {
|
||||
throw new CustomException("该人员有参与工作流流程审批,请调整流程后再删除账号", HttpStatus.INTERNAL_SERVER_ERROR);
|
||||
getUserIds(process.getJSONObject("children"), userIds);
|
||||
if (userIds.contains(id)) {
|
||||
modelName.add(model.getFormName());
|
||||
}
|
||||
}
|
||||
if (modelName.size() > 0) {
|
||||
throw new CustomException("该人员有参与工作流流程审批,请调整流程后再删除账号", HttpStatus.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
String projectSn = MapUtils.getString(map, "projectSn");
|
||||
SystemUser systemUser = getById(id);
|
||||
if (systemUser == null) {
|
||||
|
||||
@ -373,10 +373,6 @@ public class ExamQuestionBankController {
|
||||
SystemUser systemUser = systemUserService.getById(user.getUserId());
|
||||
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
||||
MultipartFile file = entity.getValue();// 获取上传文件对象
|
||||
ImportParams params = new ImportParams();
|
||||
params.setTitleRows(2);
|
||||
params.setHeadRows(1);
|
||||
params.setNeedSave(true);
|
||||
try {
|
||||
List<Map<String, String>> examQuestionBankImports = ExcelUtils.jxlExlToList(file.getInputStream(), 0);
|
||||
if (examQuestionBankImports.size() == 0) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user