特殊作业修改

This commit is contained in:
pengjie 2024-06-11 19:38:45 +08:00
parent cd1a93e6b8
commit 7b38ec38e4
13 changed files with 286 additions and 9 deletions

View File

@ -991,7 +991,7 @@
<libjars>wflow-server-1.0-SNAPSHOT.jar</libjars>
<code>
<!--鞍钢-->
A6F449ECD7E1024F703F37F2294AC8F2D41D8CD98F00B204E9800998ECF8427ED41D8CD98F00B204E9800998ECF8427E
9E145A0B4C44D1F80ED3DBF315F93CF0D41D8CD98F00B204E9800998ECF8427ED41D8CD98F00B204E9800998ECF8427E
<!--中科安信-->
<!--A6F449ECD7E1024F703F37F2294AC8F2D41D8CD98F00B204E9800998ECF8427ED41D8CD98F00B204E9800998ECF8427E-->
</code>

View File

@ -11,9 +11,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gexin.fastjson.JSON;
import com.wflow.bean.entity.WflowModels;
import com.wflow.mapper.WflowModelsMapper;
import com.zhgd.exception.CustomException;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.execption.OpenAlertException;
@ -26,15 +29,26 @@ import com.zhgd.xmgl.modules.basicdata.mapper.*;
import com.zhgd.xmgl.modules.basicdata.service.IBaseMenuService;
import com.zhgd.xmgl.modules.basicdata.service.ICompanyService;
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
import com.zhgd.xmgl.modules.checking.entity.CheckingPoint;
import com.zhgd.xmgl.modules.checking.entity.CheckingPointInfo;
import com.zhgd.xmgl.modules.checking.entity.XzCheckingRoute;
import com.zhgd.xmgl.modules.checking.entity.XzCheckingRouteTask;
import com.zhgd.xmgl.modules.checking.service.CheckingPointInfoService;
import com.zhgd.xmgl.modules.checking.service.CheckingPointService;
import com.zhgd.xmgl.modules.checking.service.IXzCheckingRouteService;
import com.zhgd.xmgl.modules.checking.service.IXzCheckingRouteTaskService;
import com.zhgd.xmgl.modules.mechanicalequipmentposition.entity.MechanicalEquipmentPositionDev;
import com.zhgd.xmgl.modules.mechanicalequipmentposition.mapper.MechanicalEquipmentPositionDevMapper;
import com.zhgd.xmgl.modules.project.entity.Project;
import com.zhgd.xmgl.modules.project.entity.ProjectExternalSystemService;
import com.zhgd.xmgl.modules.project.mapper.ProjectExternalSystemServiceMapper;
import com.zhgd.xmgl.modules.project.mapper.ProjectMapper;
import com.zhgd.xmgl.modules.quality.entity.QualityInspectionRecord;
import com.zhgd.xmgl.modules.quality.mapper.QualityRegionMapper;
import com.zhgd.xmgl.modules.quality.service.IQualityInspectionRecordService;
import com.zhgd.xmgl.modules.safetyhat.entity.SafetyHatDev;
import com.zhgd.xmgl.modules.safetyhat.mapper.SafetyHatDevMapper;
import com.zhgd.xmgl.modules.security.service.ISecurityCheckPointsService;
import com.zhgd.xmgl.modules.worker.entity.UserEnterprise;
import com.zhgd.xmgl.modules.worker.entity.WorkerInfo;
import com.zhgd.xmgl.modules.worker.mapper.WorkerInfoMapper;
@ -42,6 +56,9 @@ import com.zhgd.xmgl.modules.worker.service.IUserEnterpriseService;
import com.zhgd.xmgl.modules.worker.service.impl.WorkerInfoServiceImpl;
import com.zhgd.xmgl.modules.xz.entity.XzRegistry;
import com.zhgd.xmgl.modules.xz.mapper.XzRegistryMapper;
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord;
import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityInspectTaskRecordService;
import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityQualityInspectionRecordService;
import com.zhgd.xmgl.modules.xz.service.impl.XzRegistryServiceImpl;
import com.zhgd.xmgl.security.JwtTokenProvider;
import com.zhgd.xmgl.security.entity.UserInfo;
@ -50,6 +67,13 @@ import com.zhgd.xmgl.util.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.flowable.engine.HistoryService;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.TaskService;
import org.flowable.engine.history.HistoricProcessInstance;
import org.flowable.engine.history.HistoricProcessInstanceQuery;
import org.flowable.engine.runtime.ProcessInstance;
import org.flowable.task.api.Task;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
@ -148,6 +172,20 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
private XzSystemUserToCompanyProjectMapper xzSystemUserToCompanyProjectMapper;
@Value("${mqtt-scope}")
private String scope;
@Autowired
private HistoryService historyService;
@Autowired
private IXzSecurityQualityInspectionRecordService xzSecurityQualityInspectionRecordService;
@Autowired
private IXzCheckingRouteTaskService xzCheckingRouteTaskService;
@Autowired
private CheckingPointInfoService checkingPointInfoService;
@Autowired
private IXzCheckingRouteService xzCheckingRouteService;
@Autowired
private IQualityInspectionRecordService qualityInspectionRecordService;
@Autowired
private WflowModelsMapper wflowModelsMapper;
@Override
public Map<String, Object> getToken(Map<String, Object> map) {
@ -877,6 +915,33 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
@Override
public void editProjectUser(SystemUser systemUser) {
SystemUser systemUser1 = systemUserMapper.selectById(systemUser.getUserId());
if (!systemUser1.getXzProjectOrgId().toString().equals(systemUser.getXzProjectOrgId().toString())) {
// 判断是否存在工作流的流程中
List<HistoricProcessInstance> list = historyService.createHistoricProcessInstanceQuery().unfinished().list();
Set<String> processDefinitionId = list.stream().map(l -> l.getProcessDefinitionId()).collect(Collectors.toSet());
List<WflowModels> models = wflowModelsMapper.selectList(Wrappers.<WflowModels>lambdaQuery()
.in(WflowModels::getProcessDefId, processDefinitionId));
List<String> modelName = new ArrayList<>();
for (WflowModels model : models) {
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(systemUser.getUserId())) {
modelName.add(model.getFormName());
}
}
if (modelName.size() > 0) {
throw new OpenAlertException("该人员有正在进行中的审批流程,不可修改组织机构信息,请完成流程后再进行修改");
}
}
QueryWrapper<SystemUser> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(SystemUser::getAccount, systemUser.getAccount())
.ne(SystemUser::getUserId, systemUser.getUserId());
@ -1186,6 +1251,82 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
@Override
public void delete(Map<String, Object> map) {
String id = MapUtils.getString(map, "id");
// 判断是否存在工作流的流程中
List<HistoricProcessInstance> list = historyService.createHistoricProcessInstanceQuery().unfinished().list();
Set<String> processDefinitionId = list.stream().map(l -> l.getProcessDefinitionId()).collect(Collectors.toSet());
List<WflowModels> models = wflowModelsMapper.selectList(Wrappers.<WflowModels>lambdaQuery()
.in(WflowModels::getProcessDefId, processDefinitionId));
List<String> modelName = new ArrayList<>();
for (WflowModels model : models) {
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());
}
}
StringBuilder stringBuilder = new StringBuilder("该人员有正在进行中的");
if (modelName.size() > 0) {
stringBuilder.append("审批流程");
}
// 判断是否存在安全检查中
List<XzSecurityQualityInspectionRecord> xzSecurityQualityInspectionRecords = xzSecurityQualityInspectionRecordService.list(Wrappers.<XzSecurityQualityInspectionRecord>lambdaQuery()
.ne(XzSecurityQualityInspectionRecord::getStatus, 5)
.ne(XzSecurityQualityInspectionRecord::getStatus, 6)
.and(item -> item.eq(XzSecurityQualityInspectionRecord::getChangeId, id)
.or().eq(XzSecurityQualityInspectionRecord::getReviewId, id)
.or().eq(XzSecurityQualityInspectionRecord::getVerifyManId, id)
.or().eq(XzSecurityQualityInspectionRecord::getInspectManId, id)));
if (xzSecurityQualityInspectionRecords.size() > 0) {
if (stringBuilder.length() > 10) {
stringBuilder.append("");
}
stringBuilder.append("安全检查台账");
}
// 判断是否存在质量检查中
List<QualityInspectionRecord> qualityInspectionRecords = qualityInspectionRecordService.list(Wrappers.<QualityInspectionRecord>lambdaQuery()
.ne(QualityInspectionRecord::getStatus, 5)
.ne(QualityInspectionRecord::getStatus, 6)
.and(item -> item.eq(QualityInspectionRecord::getChangeId, id)
.or().eq(QualityInspectionRecord::getReviewId, id)
.or().eq(QualityInspectionRecord::getVerifyManId, id)
.or().eq(QualityInspectionRecord::getInspectManId, id)));
if (qualityInspectionRecords.size() > 0) {
if (stringBuilder.length() > 10) {
stringBuilder.append("");
}
stringBuilder.append("质量检查台账");
}
List<XzCheckingRoute> checkingPointList = xzCheckingRouteService.list(Wrappers.<XzCheckingRoute>lambdaQuery()
.apply("find_in_set({0}, inspect_user_ids)", id)
.or()
.apply("find_in_set({0}, notice_user_ids)", id));
label:for (XzCheckingRoute xzCheckingRoute : checkingPointList) {
List<XzCheckingRouteTask> xzCheckingRouteTasks = xzCheckingRouteTaskService.list(Wrappers.<XzCheckingRouteTask>lambdaQuery()
.eq(XzCheckingRouteTask::getXzCheckingRouteId, xzCheckingRoute.getId()));
for (XzCheckingRouteTask xzCheckingRouteTask : xzCheckingRouteTasks) {
List<CheckingPointInfo> checkingPointInfos = checkingPointInfoService.list(Wrappers.<CheckingPointInfo>lambdaQuery()
.eq(CheckingPointInfo::getXzCheckingRouteTaskId, xzCheckingRouteTask.getId())
.eq(CheckingPointInfo::getCheckingPointUserId, id));
if (checkingPointInfos == null || checkingPointInfos.size() == 0) {
if (stringBuilder.length() > 10) {
stringBuilder.append("");
}
stringBuilder.append("巡检任务");
break label;
}
}
}
if (stringBuilder.length() > 10) {
throw new CustomException(stringBuilder + ",请完成流程后再删除账号", HttpStatus.INTERNAL_SERVER_ERROR);
}
String projectSn = MapUtils.getString(map, "projectSn");
SystemUser systemUser = getById(id);
if (systemUser == null) {
@ -1199,6 +1340,22 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
}
}
private void getUserIds(JSONObject children, List<String> userIds) {
if (children != null) {
JSONObject props = children.getJSONObject("props");
if (props != null) {
getUserIds(children.getJSONObject("children"), userIds);
JSONArray assignedUser = props.getJSONArray("assignedUser");
if (assignedUser != null) {
for (int i = 0; i < assignedUser.size(); i++) {
JSONObject jsonObject = assignedUser.getJSONObject(i);
userIds.add(jsonObject.getString("id"));
}
}
}
}
}
public void deleteTenantOrSupplier(String userId, String projectSn) {
//查tree
if (StrUtil.isBlank(projectSn)) {

View File

@ -1621,7 +1621,8 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
throw new CustomException("该人员未参加过入场安全教育培训!", HttpStatus.INTERNAL_SERVER_ERROR);
}
WorkerSafeEducationWorker workerSafeEducationWorker = workerSafeEducationWorkerMapper.selectOne(Wrappers.<WorkerSafeEducationWorker>lambdaQuery()
.eq(WorkerSafeEducationWorker::getId, workerSafeEducations.get(0).getId()));
.eq(WorkerSafeEducationWorker::getEduId, workerSafeEducations.get(0).getId())
.eq(WorkerSafeEducationWorker::getWorkerId, workerId));
ExcelUtils.exporExcelWorkerEducation(response, entityMap, workerSafeEducationWorker, workerType, basePath);
}

View File

@ -12,8 +12,10 @@ import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.mybatis.EntityMap;
import com.zhgd.xmgl.entity.vo.SafeEducationQuestionAnswerDataVo;
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
import com.zhgd.xmgl.modules.basicdata.entity.XzSystemUserToCompanyProject;
import com.zhgd.xmgl.modules.basicdata.service.INoticeService;
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
import com.zhgd.xmgl.modules.basicdata.service.IXzSystemUserToCompanyProjectService;
import com.zhgd.xmgl.modules.edu.service.ISafeEducationQuestionAnswerService;
import com.zhgd.xmgl.modules.worker.entity.*;
import com.zhgd.xmgl.modules.worker.service.IUfaceDevService;
@ -58,6 +60,9 @@ public class XzWorkerInfoAuditRecordController {
@Autowired
private ISystemUserService systemUserService;
@Autowired
private IXzSystemUserToCompanyProjectService xzSystemUserToCompanyProjectService;
@Autowired
private ISafeEducationQuestionAnswerService safeEducationQuestionAnswerService;
@ -346,11 +351,14 @@ public class XzWorkerInfoAuditRecordController {
wrapper.set(WorkerInfoAuditRecord::getAsyncState, 1);
wrapper.eq(WorkerInfoAuditRecord::getId, split[0]);
workerInfoAuditRecordService.update(wrapper);
List<SystemUser> systemUserList = systemUserService.list(Wrappers.<SystemUser>lambdaQuery().eq(SystemUser::getAccountType, 5));
systemUserList.addAll(systemUserService.list(Wrappers.<SystemUser>lambdaQuery()
.eq(SystemUser::getAccountType, 10)
.eq(SystemUser::getSn, paramMap.getString("projectSn"))));
List<SystemUser> systemUserList = systemUserService.list(Wrappers.<SystemUser>lambdaQuery()
.eq(SystemUser::getAccountType, 5)
.eq(SystemUser::getSn, paramMap.getString("projectSn")));
List<XzSystemUserToCompanyProject> xzSystemUserToCompanyProjects = xzSystemUserToCompanyProjectService.list(Wrappers.<XzSystemUserToCompanyProject>lambdaQuery()
.eq(XzSystemUserToCompanyProject::getType, 2)
.eq(XzSystemUserToCompanyProject::getSn, paramMap.getString("projectSn")));
List<Long> collect = systemUserList.stream().map(s -> s.getUserId()).collect(Collectors.toList());
collect.addAll(xzSystemUserToCompanyProjects.stream().map(x -> x.getUserId()).collect(Collectors.toList()));
collect.add(Long.valueOf(paramMap.getString("startUser")));
for (Long userId : collect) {
noticeService.addUserNotice(userId, "人员同步异常,原因:" + split[1], "人员审批数据同步失败", "1");

View File

@ -2,11 +2,17 @@ package com.zhgd.xmgl.modules.xz.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wflow.bean.entity.WflowModels;
import com.wflow.mapper.WflowModelsMapper;
import com.zhgd.exception.CustomException;
import com.zhgd.jeecg.common.execption.OpenAlertException;
import com.zhgd.jeecg.common.system.query.QueryGenerator;
import com.zhgd.xmgl.modules.xz.entity.XzProjectOrg;
@ -16,13 +22,15 @@ import com.zhgd.xmgl.util.PageUtil;
import com.zhgd.xmgl.util.RefUtil;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import org.flowable.engine.HistoryService;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.history.HistoricProcessInstance;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
import java.util.*;
import java.util.stream.Collectors;
/**
@ -37,6 +45,13 @@ public class XzProjectOrgServiceImpl extends ServiceImpl<XzProjectOrgMapper, XzP
@Autowired
private XzProjectOrgMapper xzProjectOrgMapper;
@Autowired
private HistoryService historyService;
@Autowired
private RuntimeService runtimeService;
@Autowired
private WflowModelsMapper wflowModelsMapper;
@Override
public IPage<XzProjectOrg> queryPageList(HashMap<String, Object> paramMap) {
QueryWrapper<XzProjectOrg> queryWrapper = getQueryWrapper(paramMap);
@ -148,6 +163,45 @@ public class XzProjectOrgServiceImpl extends ServiceImpl<XzProjectOrgMapper, XzP
@Override
public void delete(String id) {
// 判断是否存在工作流的流程中
List<HistoricProcessInstance> list = historyService.createHistoricProcessInstanceQuery().unfinished().list();
Set<String> processDefinitionId = list.stream().map(l -> l.getProcessDefinitionId()).collect(Collectors.toSet());
List<WflowModels> models = wflowModelsMapper.selectList(Wrappers.<WflowModels>lambdaQuery()
.in(WflowModels::getProcessDefId, processDefinitionId));
List<String> modelName = new ArrayList<>();
for (WflowModels model : models) {
List<String> orgIds = new ArrayList<>();
JSONObject process = JSONObject.parseObject(model.getProcess());
JSONArray branchs = process.getJSONObject("children").getJSONArray("branchs");
if (branchs != null && branchs.size() > 0) {
for (int i = 0; i < branchs.size(); i++) {
JSONArray groups = branchs.getJSONObject(i).getJSONObject("props").getJSONArray("groups");
if (groups != null && groups.size() > 0) {
for (int j = 0; j < groups.size(); j++) {
JSONArray conditions = groups.getJSONObject(j).getJSONArray("conditions");
if (conditions != null && conditions.size() > 0) {
for (int k = 0; k < conditions.size(); k++) {
JSONArray value = conditions.getJSONObject(k).getJSONArray("value");
if (value != null && value.size() > 0) {
for (int z = 0; z < value.size(); z++) {
JSONObject jsonObject = value.getJSONObject(z);
orgIds.add(jsonObject.getString("id"));
}
}
}
}
}
}
}
}
if (orgIds.contains(id)) {
modelName.add(model.getFormName());
}
}
if (modelName.size() > 0) {
throw new CustomException("该组织有正在进行中审批流程,请完成流程后再删除", HttpStatus.INTERNAL_SERVER_ERROR);
}
XzProjectOrg xzProjectOrg = baseMapper.selectById(id);
if (xzProjectOrg == null) {
throw new OpenAlertException("未找到对应实体");

View File

@ -20,6 +20,7 @@ import java.util.HashMap;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
import java.util.stream.Collectors;
import com.zhgd.jeecg.common.api.vo.Result;
import org.apache.commons.collections.MapUtils;
@ -119,6 +120,12 @@ public class XzBlindPlatePlugSafeController {
if (assignmentPersonInCharge != null) {
paramMap.put("assignmentPersonInCharge", assignmentPersonInCharge.get(0));
}
List<String> guardianName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("guardianName")), List.class);
paramMap.put("guardianName", guardianName.stream().collect(Collectors.joining(",")));
List<String> safetyInformantName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("safetyInformantName")), List.class);
paramMap.put("safetyInformantName", safetyInformantName.stream().collect(Collectors.joining(",")));
List<String> acceptTheInformantName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("acceptTheInformantName")), List.class);
paramMap.put("acceptTheInformantName", acceptTheInformantName.stream().collect(Collectors.joining(",")));
String [] param = {"gasAnalyzeTime", "representativeGas", "analyzeResult", "analyzer"};
JSONArray detail = paramMap.getJSONArray("xzGasAnalyzeList");
List<XzGasAnalyze> list = new ArrayList<>();

View File

@ -20,6 +20,7 @@ import java.util.HashMap;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
import java.util.stream.Collectors;
import com.zhgd.jeecg.common.api.vo.Result;
import org.apache.commons.collections.MapUtils;
@ -115,6 +116,12 @@ public class XzGroundSafetController {
if (jobApplicationUnit != null) {
paramMap.put("jobApplicationUnit", jobApplicationUnit.get(0));
}
List<String> guardianName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("guardianName")), List.class);
paramMap.put("guardianName", guardianName.stream().collect(Collectors.joining(",")));
List<String> safetyInformantName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("safetyInformantName")), List.class);
paramMap.put("safetyInformantName", safetyInformantName.stream().collect(Collectors.joining(",")));
List<String> acceptTheInformantName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("acceptTheInformantName")), List.class);
paramMap.put("acceptTheInformantName", acceptTheInformantName.stream().collect(Collectors.joining(",")));
String [] param1 = {"name", "flag"};
JSONArray safeMeasures = paramMap.getJSONArray("safeMeasure");
JSONArray safeMeasure = new JSONArray();

View File

@ -20,6 +20,7 @@ import java.util.HashMap;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
import java.util.stream.Collectors;
import com.zhgd.jeecg.common.api.vo.Result;
import org.apache.commons.collections.MapUtils;
@ -115,6 +116,12 @@ public class XzHighJobSafeController {
if (assignmentPersonInCharge != null) {
paramMap.put("assignmentPersonInCharge", assignmentPersonInCharge.get(0));
}
List<String> guardianName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("guardianName")), List.class);
paramMap.put("guardianName", guardianName.stream().collect(Collectors.joining(",")));
List<String> safetyInformantName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("safetyInformantName")), List.class);
paramMap.put("safetyInformantName", safetyInformantName.stream().collect(Collectors.joining(",")));
List<String> acceptTheInformantName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("acceptTheInformantName")), List.class);
paramMap.put("acceptTheInformantName", acceptTheInformantName.stream().collect(Collectors.joining(",")));
String [] param = {"gasAnalyzeTime", "representativeGas", "analyzeResult", "analyzer"};
JSONArray detail = paramMap.getJSONArray("xzGasAnalyzeList");
List<XzGasAnalyze> list = new ArrayList<>();

View File

@ -20,6 +20,7 @@ import java.util.HashMap;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
import java.util.stream.Collectors;
import com.zhgd.jeecg.common.api.vo.Result;
import org.apache.commons.collections.MapUtils;
@ -115,6 +116,12 @@ public class XzHoistSafetyWorkController {
if (assignmentPersonInCharge != null) {
paramMap.put("assignmentPersonInCharge", assignmentPersonInCharge.get(0));
}
List<String> guardianName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("guardianName")), List.class);
paramMap.put("guardianName", guardianName.stream().collect(Collectors.joining(",")));
List<String> safetyInformantName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("safetyInformantName")), List.class);
paramMap.put("safetyInformantName", safetyInformantName.stream().collect(Collectors.joining(",")));
List<String> acceptTheInformantName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("acceptTheInformantName")), List.class);
paramMap.put("acceptTheInformantName", acceptTheInformantName.stream().collect(Collectors.joining(",")));
String [] param1 = {"name", "flag"};
JSONArray safeMeasures = paramMap.getJSONArray("safeMeasure");
JSONArray safeMeasure = new JSONArray();

View File

@ -17,6 +17,7 @@ import java.util.HashMap;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
import java.util.stream.Collectors;
import com.zhgd.jeecg.common.api.vo.Result;
import org.apache.commons.collections.MapUtils;
@ -132,6 +133,12 @@ public class XzLimitSpaceSafeController {
// if (acceptTheInformant != null) {
// paramMap.put("acceptTheInformant", acceptTheInformant.get(0));
// }
List<String> guardianName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("guardianName")), List.class);
paramMap.put("guardianName", guardianName.stream().collect(Collectors.joining(",")));
List<String> safetyInformantName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("safetyInformantName")), List.class);
paramMap.put("safetyInformantName", safetyInformantName.stream().collect(Collectors.joining(",")));
List<String> acceptTheInformantName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("acceptTheInformantName")), List.class);
paramMap.put("acceptTheInformantName", acceptTheInformantName.stream().collect(Collectors.joining(",")));
String [] param = {"name", "standard"};
JSONArray toxicAndHarmfulGasInformations = paramMap.getJSONArray("toxicAndHarmfulGasInformation");
JSONArray toxicAndHarmfulGasInformation = new JSONArray();

View File

@ -18,6 +18,7 @@ import java.util.HashMap;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
import java.util.stream.Collectors;
import com.zhgd.jeecg.common.api.vo.Result;
import org.apache.commons.collections.MapUtils;
@ -113,6 +114,12 @@ public class XzOpenCircuitSafeController {
if (jobApplicationUnit != null) {
paramMap.put("jobApplicationUnit", jobApplicationUnit.get(0));
}
List<String> guardianName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("guardianName")), List.class);
paramMap.put("guardianName", guardianName.stream().collect(Collectors.joining(",")));
List<String> safetyInformantName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("safetyInformantName")), List.class);
paramMap.put("safetyInformantName", safetyInformantName.stream().collect(Collectors.joining(",")));
List<String> acceptTheInformantName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("acceptTheInformantName")), List.class);
paramMap.put("acceptTheInformantName", acceptTheInformantName.stream().collect(Collectors.joining(",")));
String [] param1 = {"name", "flag"};
JSONArray safeMeasures = paramMap.getJSONArray("safeMeasure");
JSONArray safeMeasure = new JSONArray();

View File

@ -21,6 +21,7 @@ import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.zhgd.jeecg.common.api.vo.Result;
import org.apache.commons.collections.MapUtils;
@ -124,6 +125,13 @@ public class XzSpecialOperationFireSafetyController {
if (jobApplicationUnit != null) {
paramMap.put("jobApplicationUnit", jobApplicationUnit.get(0));
}
List<String> guardianName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("guardianName")), List.class);
paramMap.put("guardianName", guardianName.stream().collect(Collectors.joining(",")));
List<String> safetyInformantName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("safetyInformantName")), List.class);
paramMap.put("safetyInformantName", safetyInformantName.stream().collect(Collectors.joining(",")));
List<String> acceptTheInformantName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("acceptTheInformantName")), List.class);
paramMap.put("acceptTheInformantName", acceptTheInformantName.stream().collect(Collectors.joining(",")));
// JSONArray fireman = paramMap.getJSONArray("fireman");
// if (fireman != null) {
// paramMap.put("fireman", fireman.get(0));

View File

@ -20,6 +20,7 @@ import java.util.HashMap;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
import java.util.stream.Collectors;
import com.zhgd.jeecg.common.api.vo.Result;
import org.apache.commons.collections.MapUtils;
@ -111,6 +112,12 @@ public class XzTemporaryElectricitySafeController {
if (assignmentPersonInCharge != null) {
paramMap.put("assignmentPersonInCharge", assignmentPersonInCharge.get(0));
}
List<String> guardianName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("guardianName")), List.class);
paramMap.put("guardianName", guardianName.stream().collect(Collectors.joining(",")));
List<String> safetyInformantName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("safetyInformantName")), List.class);
paramMap.put("safetyInformantName", safetyInformantName.stream().collect(Collectors.joining(",")));
List<String> acceptTheInformantName = JSONObject.parseObject(JSON.toJSONString(paramMap.getJSONArray("acceptTheInformantName")), List.class);
paramMap.put("acceptTheInformantName", acceptTheInformantName.stream().collect(Collectors.joining(",")));
String [] param = {"combustibleGasAnalysis", "analysePlace", "analysePerson"};
JSONArray analyseInfo = paramMap.getJSONArray("analysePlace");
if (analyseInfo != null) {