修改审核节点数据查询及分页
This commit is contained in:
parent
347da327dd
commit
28be0a9332
|
|
@ -225,4 +225,9 @@ public class SecurityCheckDto {
|
|||
*/
|
||||
private String rejectionDelay;
|
||||
|
||||
|
||||
private int dataType=0;
|
||||
|
||||
private List<String> proInsId;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,6 +89,11 @@ public class ViolationPunishVo extends BaseBean {
|
|||
private String finalCheck;
|
||||
private String intoStatus;
|
||||
private List<String> personList;
|
||||
|
||||
|
||||
private int dataType=0;
|
||||
|
||||
private List<String> proInsId;
|
||||
public interface Query {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public class TokenService
|
|||
if (StringUtils.isNotEmpty(existingToken))
|
||||
{
|
||||
// 删除已有的 token
|
||||
delLoginUser(existingToken);
|
||||
// delLoginUser(existingToken);
|
||||
log.info("用户在其他设备上登录");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -223,4 +223,8 @@ public class AdmissionRequest extends BaseBean implements Serializable {
|
|||
* 考勤时间
|
||||
*/
|
||||
private String time;
|
||||
|
||||
private int dataType=0;
|
||||
|
||||
private List<String> proInsId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import lombok.Data;
|
|||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* FileName: ProMaterial
|
||||
|
|
@ -58,4 +59,8 @@ public class ProMaterial extends BaseBean implements Serializable {
|
|||
private String endDate;
|
||||
private String status;
|
||||
private String intoStatus;
|
||||
|
||||
private int dataType=0;
|
||||
|
||||
private List<String> proInsId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.bonus.common.core.constant.UserConstants;
|
|||
import com.bonus.common.core.domain.R;
|
||||
import com.bonus.common.core.domain.RequestEntity;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.core.utils.PageUtils;
|
||||
import com.bonus.common.core.utils.StaticVariableUtils;
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
|
|
@ -22,6 +23,7 @@ import com.bonus.system.api.RemoteFileService;
|
|||
import com.bonus.system.api.domain.SysFile;
|
||||
import com.bonus.system.api.domain.SysUser;
|
||||
import com.bonus.system.api.model.LoginUser;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.json.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
|
@ -102,21 +104,56 @@ public class AdmissionRequestServiceImpl implements AdmissionRequestService {
|
|||
|
||||
@Override
|
||||
public List<AdmissionRequest> getContPersonByProIdAndOtherId(AdmissionRequest bean) {
|
||||
|
||||
List<AdmissionRequest> list = arMapper.getContPersonByProIdAndOtherId(bean);
|
||||
RequestEntity entity = new RequestEntity();
|
||||
entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
// 创建一个 GenericProcessor 实例 对审批流程数据进行处理
|
||||
GenericProcessor processor = new GenericProcessor();
|
||||
processor.processEntities(list, entity, flowTaskService);
|
||||
if (!StringUtils.isEmpty(bean.getStatus()) && ("1".equals(bean.getStatus()) || "2".equals(bean.getStatus()))) {
|
||||
list = list.stream()
|
||||
.filter(admissionRequest -> bean.getStatus().equals(admissionRequest.getIntoStatus()))
|
||||
.collect(Collectors.toList());
|
||||
//数据查询
|
||||
Map<String, String> checkMaps= Maps.newHashMap();
|
||||
if("1".equals(bean.getStatus()) || "2".equals(bean.getStatus())){
|
||||
entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
AjaxResult ajaxResult = flowTaskService.getStayFlow(entity);
|
||||
if (ajaxResult.isSuccess()) {
|
||||
List<Map<String, Object>> data = (List<Map<String, Object>>) ajaxResult.get("data");
|
||||
List<String> proInsId=new ArrayList<>();
|
||||
data.forEach(map->{
|
||||
proInsId.add((String)map.get("proInsId"));
|
||||
checkMaps.put((String)map.get("proInsId"),(String) map.get("finalCheck"));
|
||||
});
|
||||
if(StringUtils.isNotEmpty(data)){
|
||||
bean.setDataType(1);
|
||||
bean.setProInsId(proInsId);
|
||||
}
|
||||
}
|
||||
}
|
||||
PageUtils.startPage();
|
||||
List<AdmissionRequest> list = arMapper.getContPersonByProIdAndOtherId(bean);
|
||||
list.forEach(data->{
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
if("1".equals(data.getStatus()) && bean.getDataType()==1){
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public List<AdmissionRequest> getContPersonByProIdAndOtherId(AdmissionRequest bean) {
|
||||
// List<AdmissionRequest> list = arMapper.getContPersonByProIdAndOtherId(bean);
|
||||
// RequestEntity entity = new RequestEntity();
|
||||
// entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
// // 创建一个 GenericProcessor 实例 对审批流程数据进行处理
|
||||
// GenericProcessor processor = new GenericProcessor();
|
||||
// processor.processEntities(list, entity, flowTaskService);
|
||||
// if (!StringUtils.isEmpty(bean.getStatus()) && ("1".equals(bean.getStatus()) || "2".equals(bean.getStatus()))) {
|
||||
// list = list.stream()
|
||||
// .filter(admissionRequest -> bean.getStatus().equals(admissionRequest.getIntoStatus()))
|
||||
// .collect(Collectors.toList());
|
||||
// }
|
||||
// return list;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 处理任务并添加 ID 到集合
|
||||
*/
|
||||
|
|
@ -352,20 +389,54 @@ public class AdmissionRequestServiceImpl implements AdmissionRequestService {
|
|||
*/
|
||||
@Override
|
||||
public List<AdmissionRequest> listEntranceOfPersonnel(AdmissionRequest bean) {
|
||||
List<AdmissionRequest> list = arMapper.listEntranceOfPersonnel(bean);
|
||||
RequestEntity entity = new RequestEntity();
|
||||
entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
// 创建一个 GenericProcessor 实例 对审批流程数据进行处理
|
||||
GenericProcessor processor = new GenericProcessor();
|
||||
processor.processEntities(list, entity, flowTaskService);
|
||||
if (!StringUtils.isEmpty(bean.getStatus()) && ("1".equals(bean.getStatus()) || "2".equals(bean.getStatus()))) {
|
||||
list = list.stream()
|
||||
.filter(admissionRequest -> bean.getStatus().equals(admissionRequest.getIntoStatus()))
|
||||
.collect(Collectors.toList());
|
||||
//数据查询
|
||||
Map<String, String> checkMaps= Maps.newHashMap();
|
||||
if("1".equals(bean.getStatus()) || "2".equals(bean.getStatus())){
|
||||
entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
AjaxResult ajaxResult = flowTaskService.getStayFlow(entity);
|
||||
if (ajaxResult.isSuccess()) {
|
||||
List<Map<String, Object>> data = (List<Map<String, Object>>) ajaxResult.get("data");
|
||||
List<String> proInsId=new ArrayList<>();
|
||||
data.forEach(map->{
|
||||
proInsId.add((String)map.get("proInsId"));
|
||||
checkMaps.put((String)map.get("proInsId"),(String) map.get("finalCheck"));
|
||||
});
|
||||
if(StringUtils.isNotEmpty(data)){
|
||||
bean.setDataType(1);
|
||||
bean.setProInsId(proInsId);
|
||||
}
|
||||
}
|
||||
}
|
||||
PageUtils.startPage();
|
||||
List<AdmissionRequest> list = arMapper.listEntranceOfPersonnel(bean);
|
||||
list.forEach(data->{
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
if("1".equals(data.getStatus()) && bean.getDataType()==1){
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public List<AdmissionRequest> listEntranceOfPersonnel(AdmissionRequest bean) {
|
||||
// List<AdmissionRequest> list = arMapper.listEntranceOfPersonnel(bean);
|
||||
// RequestEntity entity = new RequestEntity();
|
||||
// entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
// // 创建一个 GenericProcessor 实例 对审批流程数据进行处理
|
||||
// GenericProcessor processor = new GenericProcessor();
|
||||
// processor.processEntities(list, entity, flowTaskService);
|
||||
// if (!StringUtils.isEmpty(bean.getStatus()) && ("1".equals(bean.getStatus()) || "2".equals(bean.getStatus()))) {
|
||||
// list = list.stream()
|
||||
// .filter(admissionRequest -> bean.getStatus().equals(admissionRequest.getIntoStatus()))
|
||||
// .collect(Collectors.toList());
|
||||
// }
|
||||
// return list;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 校验同工程下施工人员是否唯一
|
||||
*
|
||||
|
|
|
|||
|
|
@ -2,8 +2,10 @@ package com.bonus.project.service.impl;
|
|||
|
||||
import com.bonus.common.core.domain.R;
|
||||
import com.bonus.common.core.domain.RequestEntity;
|
||||
import com.bonus.common.core.utils.PageUtils;
|
||||
import com.bonus.common.core.utils.StaticVariableUtils;
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.project.controller.GenericProcessor;
|
||||
import com.bonus.project.domain.Equipment;
|
||||
|
|
@ -14,6 +16,7 @@ import com.bonus.project.service.FlowTaskService;
|
|||
import com.bonus.project.service.MaterialService;
|
||||
import com.bonus.system.api.RemoteFileService;
|
||||
import com.bonus.system.api.domain.SysFile;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.json.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
|
@ -23,6 +26,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -52,19 +56,53 @@ public class MaterialServiceImpl implements MaterialService {
|
|||
*/
|
||||
@Override
|
||||
public List<ProMaterial> getEnterFileList(ProMaterial bean) {
|
||||
List<ProMaterial> list = mapper.getEnterFileList(bean);
|
||||
RequestEntity entity = new RequestEntity();
|
||||
entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
// 创建一个 GenericProcessor 实例 对审批流程数据进行处理
|
||||
GenericProcessor processor = new GenericProcessor();
|
||||
processor.processEntities(list, entity, flowTaskService);
|
||||
if (!StringUtils.isEmpty(bean.getStatus()) && ("1".equals(bean.getStatus()) || "2".equals(bean.getStatus()))) {
|
||||
list = list.stream()
|
||||
.filter(proMaterial -> bean.getStatus().equals(proMaterial.getIntoStatus()))
|
||||
.collect(Collectors.toList());
|
||||
//数据查询
|
||||
Map<String, String> checkMaps= Maps.newHashMap();
|
||||
if("1".equals(bean.getStatus()) || "2".equals(bean.getStatus())){
|
||||
entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
AjaxResult ajaxResult = flowTaskService.getStayFlow(entity);
|
||||
if (ajaxResult.isSuccess()) {
|
||||
List<Map<String, Object>> data = (List<Map<String, Object>>) ajaxResult.get("data");
|
||||
List<String> proInsId=new ArrayList<>();
|
||||
data.forEach(map->{
|
||||
proInsId.add((String)map.get("proInsId"));
|
||||
checkMaps.put((String)map.get("proInsId"),(String) map.get("finalCheck"));
|
||||
});
|
||||
if(StringUtils.isNotEmpty(data)){
|
||||
bean.setDataType(1);
|
||||
bean.setProInsId(proInsId);
|
||||
}
|
||||
}
|
||||
}
|
||||
PageUtils.startPage();
|
||||
List<ProMaterial> list = mapper.getEnterFileList(bean);
|
||||
list.forEach(data->{
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
if("1".equals(data.getStatus()) && bean.getDataType()==1){
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public List<ProMaterial> getEnterFileList(ProMaterial bean) {
|
||||
// List<ProMaterial> list = mapper.getEnterFileList(bean);
|
||||
// RequestEntity entity = new RequestEntity();
|
||||
// entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
// // 创建一个 GenericProcessor 实例 对审批流程数据进行处理
|
||||
// GenericProcessor processor = new GenericProcessor();
|
||||
// processor.processEntities(list, entity, flowTaskService);
|
||||
// if (!StringUtils.isEmpty(bean.getStatus()) && ("1".equals(bean.getStatus()) || "2".equals(bean.getStatus()))) {
|
||||
// list = list.stream()
|
||||
// .filter(proMaterial -> bean.getStatus().equals(proMaterial.getIntoStatus()))
|
||||
// .collect(Collectors.toList());
|
||||
// }
|
||||
// return list;
|
||||
// }
|
||||
/**
|
||||
* 施工材料入场申请
|
||||
* @param constructionMaterialFile 施工材料文件
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
|
|||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.bonus.common.core.domain.R;
|
||||
import com.bonus.common.core.domain.RequestEntity;
|
||||
import com.bonus.common.core.utils.PageUtils;
|
||||
import com.bonus.common.core.utils.StaticVariableUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.safetycheck.*;
|
||||
|
|
@ -14,6 +15,7 @@ import com.bonus.project.service.FlowTaskService;
|
|||
import com.bonus.project.service.SecurityCheckService;
|
||||
import com.bonus.system.api.RemoteFileService;
|
||||
import com.bonus.system.api.domain.SysFile;
|
||||
import com.google.common.collect.Maps;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -24,10 +26,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|||
import javax.annotation.Resource;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
|
|
@ -402,20 +401,54 @@ public class SecurityCheckServiceImpl implements SecurityCheckService {
|
|||
*/
|
||||
@Override
|
||||
public List<HiddenProblemsFixVo> getHiddenDangerRectificationList(SecurityCheckDto dto) {
|
||||
List<HiddenProblemsFixVo> list = mapper.getHiddenDangerRectificationList(dto);
|
||||
RequestEntity entity = new RequestEntity();
|
||||
entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
// 创建一个 GenericProcessor 实例 对审批流程数据进行处理
|
||||
GenericProcessor processor = new GenericProcessor();
|
||||
processor.processEntities(list, entity, flowTaskService);
|
||||
if (!StringUtils.isEmpty(dto.getStatus()) && ("1".equals(dto.getStatus()) || "2".equals(dto.getStatus()))) {
|
||||
list = list.stream()
|
||||
.filter(item -> dto.getStatus().equals(item.getIntoStatus()))
|
||||
.collect(Collectors.toList());
|
||||
//数据查询
|
||||
Map<String, String> checkMaps= Maps.newHashMap();
|
||||
if("1".equals(dto.getStatus()) || "2".equals(dto.getStatus())){
|
||||
entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
AjaxResult ajaxResult = flowTaskService.getStayFlow(entity);
|
||||
if (ajaxResult.isSuccess()) {
|
||||
List<Map<String, Object>> data = (List<Map<String, Object>>) ajaxResult.get("data");
|
||||
List<String> proInsId=new ArrayList<>();
|
||||
data.forEach(map->{
|
||||
proInsId.add((String)map.get("proInsId"));
|
||||
checkMaps.put((String)map.get("proInsId"),(String) map.get("finalCheck"));
|
||||
});
|
||||
if(com.bonus.common.core.utils.StringUtils.isNotEmpty(data)){
|
||||
dto.setDataType(1);
|
||||
dto.setProInsId(proInsId);
|
||||
}
|
||||
}
|
||||
}
|
||||
PageUtils.startPage();
|
||||
List<HiddenProblemsFixVo> list = mapper.getHiddenDangerRectificationList(dto);
|
||||
list.forEach(data->{
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
if("1".equals(data.getStatus()) && dto.getDataType()==1){
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public List<HiddenProblemsFixVo> getHiddenDangerRectificationList(SecurityCheckDto dto) {
|
||||
// List<HiddenProblemsFixVo> list = mapper.getHiddenDangerRectificationList(dto);
|
||||
// RequestEntity entity = new RequestEntity();
|
||||
// entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
// // 创建一个 GenericProcessor 实例 对审批流程数据进行处理
|
||||
// GenericProcessor processor = new GenericProcessor();
|
||||
// processor.processEntities(list, entity, flowTaskService);
|
||||
// if (!StringUtils.isEmpty(dto.getStatus()) && ("1".equals(dto.getStatus()) || "2".equals(dto.getStatus()))) {
|
||||
// list = list.stream()
|
||||
// .filter(item -> dto.getStatus().equals(item.getIntoStatus()))
|
||||
// .collect(Collectors.toList());
|
||||
// }
|
||||
// return list;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 保存隐患问题整改回传
|
||||
*
|
||||
|
|
@ -480,20 +513,52 @@ public class SecurityCheckServiceImpl implements SecurityCheckService {
|
|||
*/
|
||||
@Override
|
||||
public List<HiddenDangerRectificationVo> getHiddenDangerRectificationApprovalList(SecurityCheckDto dto) {
|
||||
List<HiddenDangerRectificationVo> list = mapper.getHiddenDangerRectificationApprovalList(dto);
|
||||
RequestEntity entity = new RequestEntity();
|
||||
entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
// 创建一个 GenericProcessor 实例 对审批流程数据进行处理
|
||||
GenericProcessor processor = new GenericProcessor();
|
||||
processor.processEntities(list, entity, flowTaskService);
|
||||
if (!StringUtils.isEmpty(dto.getStatus()) && ("1".equals(dto.getStatus()) || "2".equals(dto.getStatus()))) {
|
||||
list = list.stream()
|
||||
.filter(item -> dto.getStatus().equals(item.getIntoStatus()))
|
||||
.collect(Collectors.toList());
|
||||
//数据查询
|
||||
Map<String, String> checkMaps= Maps.newHashMap();
|
||||
if("1".equals(dto.getStatus()) || "2".equals(dto.getStatus())){
|
||||
entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
AjaxResult ajaxResult = flowTaskService.getStayFlow(entity);
|
||||
if (ajaxResult.isSuccess()) {
|
||||
List<Map<String, Object>> data = (List<Map<String, Object>>) ajaxResult.get("data");
|
||||
List<String> proInsId=new ArrayList<>();
|
||||
data.forEach(map->{
|
||||
proInsId.add((String)map.get("proInsId"));
|
||||
checkMaps.put((String)map.get("proInsId"),(String) map.get("finalCheck"));
|
||||
});
|
||||
if(com.bonus.common.core.utils.StringUtils.isNotEmpty(data)){
|
||||
dto.setDataType(1);
|
||||
dto.setProInsId(proInsId);
|
||||
}
|
||||
}
|
||||
}
|
||||
PageUtils.startPage();
|
||||
List<HiddenDangerRectificationVo> list = mapper.getHiddenDangerRectificationApprovalList(dto);
|
||||
list.forEach(data->{
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
if("1".equals(data.getStatus()) && dto.getDataType()==1){
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public List<HiddenDangerRectificationVo> getHiddenDangerRectificationApprovalList(SecurityCheckDto dto) {
|
||||
// List<HiddenDangerRectificationVo> list = mapper.getHiddenDangerRectificationApprovalList(dto);
|
||||
// RequestEntity entity = new RequestEntity();
|
||||
// entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
// // 创建一个 GenericProcessor 实例 对审批流程数据进行处理
|
||||
// GenericProcessor processor = new GenericProcessor();
|
||||
// processor.processEntities(list, entity, flowTaskService);
|
||||
// if (!StringUtils.isEmpty(dto.getStatus()) && ("1".equals(dto.getStatus()) || "2".equals(dto.getStatus()))) {
|
||||
// list = list.stream()
|
||||
// .filter(item -> dto.getStatus().equals(item.getIntoStatus()))
|
||||
// .collect(Collectors.toList());
|
||||
// }
|
||||
// return list;
|
||||
// }
|
||||
/**
|
||||
* 整改方隐患问题整改回传状态修改
|
||||
*
|
||||
|
|
@ -647,20 +712,55 @@ public class SecurityCheckServiceImpl implements SecurityCheckService {
|
|||
*/
|
||||
@Override
|
||||
public List<PitfallDelayApprovalVo> getReviewOfDeferredApprovalList(SecurityCheckDto dto) {
|
||||
List<PitfallDelayApprovalVo> list = mapper.getReviewOfDeferredApprovalList(dto);
|
||||
RequestEntity entity = new RequestEntity();
|
||||
entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
// 创建一个 GenericProcessor 实例 对审批流程数据进行处理
|
||||
GenericProcessor processor = new GenericProcessor();
|
||||
processor.processEntities(list, entity, flowTaskService);
|
||||
if (!StringUtils.isEmpty(dto.getStatus()) && ("1".equals(dto.getStatus()) || "2".equals(dto.getStatus()))) {
|
||||
list = list.stream()
|
||||
.filter(item -> dto.getStatus().equals(item.getIntoStatus()))
|
||||
.collect(Collectors.toList());
|
||||
//数据查询
|
||||
Map<String, String> checkMaps= Maps.newHashMap();
|
||||
if("1".equals(dto.getStatus()) || "2".equals(dto.getStatus())){
|
||||
entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
AjaxResult ajaxResult = flowTaskService.getStayFlow(entity);
|
||||
if (ajaxResult.isSuccess()) {
|
||||
List<Map<String, Object>> data = (List<Map<String, Object>>) ajaxResult.get("data");
|
||||
List<String> proInsId=new ArrayList<>();
|
||||
data.forEach(map->{
|
||||
proInsId.add((String)map.get("proInsId"));
|
||||
checkMaps.put((String)map.get("proInsId"),(String) map.get("finalCheck"));
|
||||
});
|
||||
if(com.bonus.common.core.utils.StringUtils.isNotEmpty(data)){
|
||||
dto.setDataType(1);
|
||||
dto.setProInsId(proInsId);
|
||||
}
|
||||
}
|
||||
}
|
||||
PageUtils.startPage();
|
||||
List<PitfallDelayApprovalVo> list = mapper.getReviewOfDeferredApprovalList(dto);
|
||||
list.forEach(data->{
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
if("1".equals(data.getStatus()) && dto.getDataType()==1){
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public List<PitfallDelayApprovalVo> getReviewOfDeferredApprovalList(SecurityCheckDto dto) {
|
||||
// List<PitfallDelayApprovalVo> list = mapper.getReviewOfDeferredApprovalList(dto);
|
||||
// RequestEntity entity = new RequestEntity();
|
||||
// entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
// // 创建一个 GenericProcessor 实例 对审批流程数据进行处理
|
||||
// GenericProcessor processor = new GenericProcessor();
|
||||
// processor.processEntities(list, entity, flowTaskService);
|
||||
// if (!StringUtils.isEmpty(dto.getStatus()) && ("1".equals(dto.getStatus()) || "2".equals(dto.getStatus()))) {
|
||||
// list = list.stream()
|
||||
// .filter(item -> dto.getStatus().equals(item.getIntoStatus()))
|
||||
// .collect(Collectors.toList());
|
||||
// }
|
||||
// return list;
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 定时修改隐患状态。一天跑两次中午12点一次晚上11点50一次
|
||||
* 整改状态:
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.project.service.impl;
|
|||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.bonus.common.core.domain.RequestEntity;
|
||||
import com.bonus.common.core.utils.PageUtils;
|
||||
import com.bonus.common.core.utils.StaticVariableUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.entity.SysFileInfo;
|
||||
|
|
@ -13,6 +14,7 @@ import com.bonus.project.mapper.ViolationManagementMapper;
|
|||
import com.bonus.project.service.FlowTaskService;
|
||||
import com.bonus.project.service.SecurityCheckService;
|
||||
import com.bonus.project.service.ViolationManagementService;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -20,7 +22,9 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
|
|
@ -144,20 +148,53 @@ public class ViolationManagementServiceImpl implements ViolationManagementServic
|
|||
*/
|
||||
@Override
|
||||
public List<ViolationPunishVo> getViolationPunishApprovalList(ViolationPunishVo dto) {
|
||||
List<ViolationPunishVo> list = mapper.getViolationPunishApprovalList(dto);
|
||||
RequestEntity entity = new RequestEntity();
|
||||
entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
// 创建一个 GenericProcessor 实例 对审批流程数据进行处理
|
||||
GenericProcessor processor = new GenericProcessor();
|
||||
processor.processEntities(list, entity, flowTaskService);
|
||||
if (!StringUtils.isEmpty(dto.getStatus()) && ("1".equals(dto.getStatus()) || "2".equals(dto.getStatus()))) {
|
||||
list = list.stream()
|
||||
.filter(item -> dto.getStatus().equals(item.getIntoStatus()))
|
||||
.collect(Collectors.toList());
|
||||
//数据查询
|
||||
Map<String, String> checkMaps= Maps.newHashMap();
|
||||
if("1".equals(dto.getStatus()) || "2".equals(dto.getStatus())){
|
||||
entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
AjaxResult ajaxResult = flowTaskService.getStayFlow(entity);
|
||||
if (ajaxResult.isSuccess()) {
|
||||
List<Map<String, Object>> data = (List<Map<String, Object>>) ajaxResult.get("data");
|
||||
List<String> proInsId=new ArrayList<>();
|
||||
data.forEach(map->{
|
||||
proInsId.add((String)map.get("proInsId"));
|
||||
checkMaps.put((String)map.get("proInsId"),(String) map.get("finalCheck"));
|
||||
});
|
||||
if(com.bonus.common.core.utils.StringUtils.isNotEmpty(data)){
|
||||
dto.setDataType(1);
|
||||
dto.setProInsId(proInsId);
|
||||
}
|
||||
}
|
||||
}
|
||||
PageUtils.startPage();
|
||||
List<ViolationPunishVo> list = mapper.getViolationPunishApprovalList(dto);
|
||||
list.forEach(data->{
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
if("1".equals(data.getStatus()) && dto.getDataType()==1){
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
// public List<ViolationPunishVo> getViolationPunishApprovalList(ViolationPunishVo dto) {
|
||||
// List<ViolationPunishVo> list = mapper.getViolationPunishApprovalList(dto);
|
||||
// RequestEntity entity = new RequestEntity();
|
||||
// entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
// // 创建一个 GenericProcessor 实例 对审批流程数据进行处理
|
||||
// GenericProcessor processor = new GenericProcessor();
|
||||
// processor.processEntities(list, entity, flowTaskService);
|
||||
// if (!StringUtils.isEmpty(dto.getStatus()) && ("1".equals(dto.getStatus()) || "2".equals(dto.getStatus()))) {
|
||||
// list = list.stream()
|
||||
// .filter(item -> dto.getStatus().equals(item.getIntoStatus()))
|
||||
// .collect(Collectors.toList());
|
||||
// }
|
||||
// return list;
|
||||
// }
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult addViolationInfo(AddViolation violation) {
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@
|
|||
ypi.proc_inst_id AS procInsId,
|
||||
ypi.delay_task_id AS delayTaskId,
|
||||
ypi.delay_proc_inst_id AS delayProcInsId,
|
||||
'0' as status,
|
||||
#{dataType} as status,
|
||||
ypi.check_state as intoStatus,
|
||||
ypi.accept_time AS rectificationReceiveTime,
|
||||
ypi.reject_reason AS rejectReason,
|
||||
|
|
@ -284,20 +284,24 @@
|
|||
ypi.rejection_delay AS rejectionDelay,
|
||||
ypi.is_check AS isCheck
|
||||
FROM yh_pitfall_info ypi
|
||||
LEFT JOIN yh_pitfall_detaills ypd ON ypi.pitfall_id = ypd.pitfall_id
|
||||
LEFT JOIN sys_dict_data sdd
|
||||
ON ypi.is_from = sdd.dict_value AND sdd.dict_type = 'yn_collection_source' AND sdd.status = 0
|
||||
LEFT JOIN sys_dict_data sdd1
|
||||
ON ypi.check_state = sdd1.dict_value AND sdd1.dict_type = 'sys_approval_state' AND
|
||||
sdd1.status = 0
|
||||
LEFT JOIN sys_dict_data sdd2
|
||||
ON ypi.check_status = sdd2.dict_value AND sdd2.dict_type = 'yn_check_status' AND
|
||||
sdd2.status = 0
|
||||
WHERE ypi.is_active = 1
|
||||
AND ypd.pro_id = #{proId}
|
||||
LEFT JOIN yh_pitfall_detaills ypd ON ypi.pitfall_id = ypd.pitfall_id
|
||||
LEFT JOIN sys_dict_data sdd ON ypi.is_from = sdd.dict_value AND sdd.dict_type = 'yn_collection_source' AND sdd.status = 0
|
||||
LEFT JOIN sys_dict_data sdd1 ON ypi.check_state = sdd1.dict_value AND sdd1.dict_type = 'sys_approval_state' AND sdd1.status = 0
|
||||
LEFT JOIN sys_dict_data sdd2 ON ypi.check_status = sdd2.dict_value AND sdd2.dict_type = 'yn_check_status' AND sdd2.status = 0
|
||||
WHERE ypi.is_active = 1 AND ypd.pro_id = #{proId}
|
||||
<if test="pitfallTypeId != null and pitfallTypeId != ''">
|
||||
AND ypd.pitfall_type_id = #{pitfallTypeId}
|
||||
</if>
|
||||
<if test='dataType==1'>
|
||||
AND ypi.proc_inst_id IN (
|
||||
<foreach collection="proInsId" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="status==2 or status=='2'">
|
||||
and ypi.check_state = #{status}
|
||||
</if>
|
||||
<if test="pitfallLevelId != null and pitfallLevelId != ''">
|
||||
AND ypd.pitfall_level_id = #{pitfallLevelId}
|
||||
</if>
|
||||
|
|
@ -389,7 +393,7 @@
|
|||
sdd.dict_label AS isFrom,
|
||||
ypd.find_time AS findTime,
|
||||
sdd2.dict_label AS checkStatus,
|
||||
'0' AS status,
|
||||
#{dataType} AS status,
|
||||
ypi.check_state as intoStatus,
|
||||
ypi.delay_check_state as delayCheckState,
|
||||
ypi.task_id as taskId,
|
||||
|
|
@ -402,19 +406,24 @@
|
|||
ypi.reject_reason AS rejectReason,
|
||||
ypi.delay_time AS delayTime
|
||||
FROM yh_pitfall_info ypi
|
||||
LEFT JOIN yh_pitfall_detaills ypd ON ypi.pitfall_id = ypd.pitfall_id
|
||||
LEFT JOIN sys_dict_data sdd
|
||||
ON ypi.is_from = sdd.dict_value AND sdd.dict_type = 'yn_collection_source' AND sdd.status = 0
|
||||
LEFT JOIN sys_dict_data sdd1
|
||||
ON ypi.check_state = sdd1.dict_value AND sdd1.dict_type = 'sys_approval_state' AND
|
||||
sdd1.status = 0
|
||||
LEFT JOIN sys_dict_data sdd2
|
||||
ON ypi.check_status = sdd2.dict_value AND sdd2.dict_type = 'yn_check_status' AND
|
||||
sdd2.status = 0
|
||||
LEFT JOIN yh_pitfall_detaills ypd ON ypi.pitfall_id = ypd.pitfall_id
|
||||
LEFT JOIN sys_dict_data sdd ON ypi.is_from = sdd.dict_value AND sdd.dict_type = 'yn_collection_source' AND sdd.status = 0
|
||||
LEFT JOIN sys_dict_data sdd1 ON ypi.check_state = sdd1.dict_value AND sdd1.dict_type = 'sys_approval_state' AND sdd1.status = 0
|
||||
LEFT JOIN sys_dict_data sdd2 ON ypi.check_status = sdd2.dict_value AND sdd2.dict_type = 'yn_check_status' AND sdd2.status = 0
|
||||
WHERE ypi.is_active = 1
|
||||
<if test="typeId == 1 or typeId == '1'">
|
||||
AND ypd.user_id = #{userId}
|
||||
</if>
|
||||
<if test='dataType==1'>
|
||||
AND ypi.proc_inst_id IN (
|
||||
<foreach collection="proInsId" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="status==2 or status=='2'">
|
||||
and ypi.check_state= #{status}
|
||||
</if>
|
||||
<if test="pitfallTypeId != null and pitfallTypeId != ''">
|
||||
AND ypd.pitfall_type_id = #{pitfallTypeId}
|
||||
</if>
|
||||
|
|
@ -511,7 +520,7 @@
|
|||
ypd.pitfall_type_name AS pitfallTypeName,
|
||||
ypd.pitfall_level_name AS pitfallLevelName,
|
||||
ypi.is_delay AS isDelay,
|
||||
'0' AS status,
|
||||
#{dataType} AS status,
|
||||
ypi.delay_check_state AS intoStatus,
|
||||
ypi.delay_task_id AS taskId,
|
||||
ypi.delay_proc_inst_id AS procInsId,
|
||||
|
|
@ -537,6 +546,16 @@
|
|||
<if test="hazardIssueLevel != null and hazardIssueLevel != ''">
|
||||
AND ypd.pitfall_level_id = #{hazardIssueLevel}
|
||||
</if>
|
||||
<if test='dataType==1'>
|
||||
AND ypi.delay_proc_inst_id IN (
|
||||
<foreach collection="proInsId" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="status==2 or status=='2'">
|
||||
and ypi.delay_check_state = #{status}
|
||||
</if>
|
||||
<if test="hazardIssueCategories != null and hazardIssueCategories != ''">
|
||||
AND ypd.pitfall_type_id = #{hazardIssueCategories}
|
||||
</if>
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@
|
|||
wvi.director_name as directorName,
|
||||
wvi.create_user_name as findName,
|
||||
wvi.sub_user_name as receiveName,
|
||||
'0' status,
|
||||
#{dataType} status,
|
||||
wvi.check_status as intoStatus,
|
||||
wvi.task_id as taskId,
|
||||
wvi.proc_inst_id as procInsId,
|
||||
|
|
@ -342,6 +342,16 @@
|
|||
<if test="proId != null and proId != ''">
|
||||
and wvi.pro_id = #{proId}
|
||||
</if>
|
||||
<if test='dataType==1'>
|
||||
AND wvi.proc_inst_id IN (
|
||||
<foreach collection="proInsId" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="status==2 or status=='2'">
|
||||
and wvi.check_status= #{status}
|
||||
</if>
|
||||
<if test="userType != '01' and userType != '00'">
|
||||
and wvi.sub_user_id = #{personId}
|
||||
</if>
|
||||
|
|
|
|||
|
|
@ -294,6 +294,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="status != null and status != '' and status != 1 and status != '1' and status != '2' and status != 2 ">
|
||||
AND lkc.into_status = #{status}
|
||||
</if>
|
||||
<if test='dataType==1'>
|
||||
AND lkc.proc_inst_id IN (
|
||||
<foreach collection="proInsId" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="status==2 or status=='2'">
|
||||
and lkc.into_status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="listPersonnelInformation" resultType="com.bonus.project.domain.AdmissionRequest">
|
||||
|
|
@ -369,7 +379,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
lkc.admission_date AS admissionDate,
|
||||
lkc.departure_date AS departureDate,
|
||||
lkc.out_status as intoStatus,
|
||||
'0' as status,
|
||||
#{dataType} as status,
|
||||
lkc.task_id_out AS taskId,
|
||||
lkc.proc_inst_id_out as procInsId,
|
||||
pcp.cons_user_id AS consUserId,
|
||||
|
|
@ -394,10 +404,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN
|
||||
pt_cons_person pcp ON lkc.cons_persion_id = pcp.cons_user_id
|
||||
AND pcp.is_active = '1'
|
||||
left join sys_dict_data sdd on sdd.dict_value = pcp.post and sdd.dict_type = 'sys_cons_post' and sdd.status =
|
||||
'0'
|
||||
WHERE
|
||||
lkc.into_status = '3' AND lkc.out_status != '0'
|
||||
left join sys_dict_data sdd on sdd.dict_value = pcp.post and sdd.dict_type = 'sys_cons_post' and sdd.status ='0'
|
||||
WHERE lkc.into_status = '3' AND lkc.out_status != '0'
|
||||
<if test="bean.proId != null and bean.proId != ''">
|
||||
and lkc.pro_id = #{bean.proId}
|
||||
</if>
|
||||
|
|
@ -411,9 +419,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND pcp.cons_name = #{bean.consName}
|
||||
</if>
|
||||
<if test="bean.status != null and bean.status != '' and bean.status != 1 and bean.status != '1'
|
||||
and bean.status != '2' and bean.status != 2 ">
|
||||
and bean.status != '2' and bean.status != 2 ">
|
||||
AND lkc.into_status = #{bean.status}
|
||||
</if>
|
||||
<if test='bean.dataType==1'>
|
||||
AND lkc.proc_inst_id_out IN (
|
||||
<foreach collection="bean.proInsId" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="bean.status==2 or bean.status=='2'">
|
||||
and lkc.into_status = #{bean.status}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<select id="checkUserNameUnique" resultType="com.bonus.project.domain.AdmissionRequest">
|
||||
SELECT pcp.cons_name AS consName,
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
pci.information_user_name as name,
|
||||
lcf.task_id as taskId,
|
||||
lcf.proc_inst_id as procInsId,
|
||||
'0' as status,
|
||||
#{dataType} as status,
|
||||
lcf.status as intoStatus,
|
||||
lcf.create_time as createTime
|
||||
from pt_cons_information pci
|
||||
|
|
@ -46,5 +46,15 @@
|
|||
<if test="status != null and status != '' and status != 1 and status != '1' and status != '2' and status != 2 ">
|
||||
and lcf.status = #{status}
|
||||
</if>
|
||||
<if test='dataType==1'>
|
||||
AND lcf.proc_inst_id IN (
|
||||
<foreach collection="proInsId" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="status==2 or status=='2'">
|
||||
and lcf.status = #{status}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue