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