1.冀北台账树编写
2.技术监督删除流程业务调整,支持多数据删除
This commit is contained in:
@@ -155,10 +155,10 @@ public class DeVReportManageController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/deleteDevReport")
|
||||
@PostMapping(value = "/deleteDevReport")
|
||||
@ApiOperation("终端入网检测删除流程")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM, operateType = OperateType.DELETE)
|
||||
public HttpResult<Boolean> deleteDevReport(String supervisionId) {
|
||||
public HttpResult<Boolean> deleteDevReport(@RequestBody List<String> supervisionId) {
|
||||
String methodDescribe = getMethodDescribe("deleteDevReport");
|
||||
Boolean b = supervisionDevMainReportPOService.deleteDevReport(supervisionId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||
|
||||
@@ -21,6 +21,8 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
@@ -96,10 +98,10 @@ public class QuitRunningDeviceController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, quitRunningDeviceVO, methodDescribe);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/deleteQuitRunningDevice")
|
||||
@ApiOperation("试运行评估删除流程")
|
||||
@PostMapping(value = "/deleteQuitRunningDevice")
|
||||
@ApiOperation("设备退运管理删除流程")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM, operateType = OperateType.DELETE)
|
||||
public HttpResult<Boolean> deleteQuitRunningDevice(String supervisionId) {
|
||||
public HttpResult<Boolean> deleteQuitRunningDevice(@RequestBody List<String> supervisionId) {
|
||||
String methodDescribe = getMethodDescribe("deleteQuitRunningDevice");
|
||||
Boolean b = quitRunningDeviceService.deleteQuitRunningDevice(supervisionId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||
|
||||
@@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -103,10 +104,10 @@ public class SupervisionTempLineRunTestController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, id, methodDescribe);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/deleteTempLineRunTestReport")
|
||||
@PostMapping(value = "/deleteTempLineRunTestReport")
|
||||
@ApiOperation("试运行评估删除流程")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM, operateType = OperateType.DELETE)
|
||||
public HttpResult<Boolean> deleteTempLineRunTestReport(String supervisionId) {
|
||||
public HttpResult<Boolean> deleteTempLineRunTestReport(@RequestBody List<String> supervisionId) {
|
||||
String methodDescribe = getMethodDescribe("deleteTempLineRunTestReport");
|
||||
Boolean b = iSupervisionTempLineRunTestService.deleteTempLineRunTestReport(supervisionId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||
|
||||
@@ -23,6 +23,8 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 干扰源用户管理
|
||||
*
|
||||
@@ -104,10 +106,10 @@ public class TempLineController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, id, methodDescribe);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/deleteTempLineReport")
|
||||
@PostMapping(value = "/deleteTempLineReport")
|
||||
@ApiOperation("监测点台账录入删除流程")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM, operateType = OperateType.DELETE)
|
||||
public HttpResult<Boolean> deleteTempLineReport(String supervisionId) {
|
||||
public HttpResult<Boolean> deleteTempLineReport(@RequestBody List<String> supervisionId) {
|
||||
String methodDescribe = getMethodDescribe("deleteDevReport");
|
||||
Boolean b = supervisionTempLineReportService.deleteTempLineReport(supervisionId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||
|
||||
@@ -21,6 +21,8 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 干扰源用户管理
|
||||
*
|
||||
@@ -116,10 +118,10 @@ public class TempLineDebugController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/deleteTempLineDebugReport")
|
||||
@PostMapping(value = "/deleteTempLineDebugReport")
|
||||
@ApiOperation("监测点联调列表删除流程")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM, operateType = OperateType.DELETE)
|
||||
public HttpResult<Boolean> deleteTempLineDebugReport(String supervisionId) {
|
||||
public HttpResult<Boolean> deleteTempLineDebugReport(@RequestBody List<String> supervisionId) {
|
||||
String methodDescribe = getMethodDescribe("deleteTempLineDebugReport");
|
||||
Boolean b = supervisionTempLineDebugPOService.deleteTempLineDebugReport(supervisionId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||
|
||||
@@ -28,6 +28,8 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 预告警单表 前端控制器
|
||||
@@ -138,10 +140,10 @@ public class WarningLeafletController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, warningLeafletId, methodDescribe);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/deleteWarningLeaflet")
|
||||
@PostMapping(value = "/deleteWarningLeaflet")
|
||||
@ApiOperation("预告警单删除流程")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM, operateType = OperateType.DELETE)
|
||||
public HttpResult<Boolean> deleteWarningLeaflet(String supervisionId) {
|
||||
public HttpResult<Boolean> deleteWarningLeaflet(@RequestBody List<String> supervisionId) {
|
||||
String methodDescribe = getMethodDescribe("deleteWarningLeaflet");
|
||||
Boolean b = warningLeafletService.deleteWarningLeaflet(supervisionId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||
|
||||
@@ -22,6 +22,8 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 普测计划流程表 前端控制器
|
||||
@@ -97,10 +99,10 @@ public class SurveyPlanController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, surveyPlanVO, methodDescribe);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/deleteSurveyPlan")
|
||||
@PostMapping(value = "/deleteSurveyPlan")
|
||||
@ApiOperation("技术监督计划管理删除流程")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM, operateType = OperateType.DELETE)
|
||||
public HttpResult<Boolean> deleteSurveyPlan(String supervisionId) {
|
||||
public HttpResult<Boolean> deleteSurveyPlan(@RequestBody List<String> supervisionId) {
|
||||
String methodDescribe = getMethodDescribe("deleteSurveyPlan");
|
||||
Boolean b = surveyPlanService.deleteSurveyPlan(supervisionId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||
|
||||
@@ -22,6 +22,8 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 普测测试的管理表 前端控制器
|
||||
@@ -118,10 +120,10 @@ public class SurveyTestController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, Boolean.TRUE, methodDescribe);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/deleteSurveyPlanTest")
|
||||
@PostMapping(value = "/deleteSurveyPlanTest")
|
||||
@ApiOperation("技术监督测试管理删除流程")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM, operateType = OperateType.DELETE)
|
||||
public HttpResult<Boolean> deleteSurveyPlanTest(String supervisionId) {
|
||||
public HttpResult<Boolean> deleteSurveyPlanTest(@RequestBody List<String> supervisionId) {
|
||||
String methodDescribe = getMethodDescribe("deleteSurveyPlanTest");
|
||||
Boolean b = surveyTestService.deleteSurveyPlanTest(supervisionId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||
|
||||
@@ -135,7 +135,7 @@ public class UserReportManageController extends BaseController {
|
||||
@ApiOperation("分页查询常态化干扰源用户台账")
|
||||
@ApiImplicitParam(name = "userReportQueryParam", value = "参数", required = true)
|
||||
public HttpResult<Page<UserReportVO>> getNormalUserPage(@RequestBody @Validated UserReportParam.UserReportQueryParam userReportQueryParam) {
|
||||
String methodDescribe = getMethodDescribe("getInterferenceUserPage");
|
||||
String methodDescribe = getMethodDescribe("getNormalUserPage");
|
||||
Page<UserReportVO> out = userReportPOService.getInterferenceUserPage(userReportQueryParam, true);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
|
||||
}
|
||||
@@ -206,10 +206,10 @@ public class UserReportManageController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/deleteUserReport")
|
||||
@PostMapping(value = "/deleteUserReport")
|
||||
@ApiOperation("干扰源接入功能删除流程")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM, operateType = OperateType.DELETE)
|
||||
public HttpResult<Boolean> deleteUserReport(String supervisionId) {
|
||||
public HttpResult<Boolean> deleteUserReport(@RequestBody List<String> supervisionId) {
|
||||
String methodDescribe = getMethodDescribe("deleteUserReport");
|
||||
Boolean b = userReportPOService.deleteUserReport(supervisionId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||
|
||||
@@ -7,6 +7,8 @@ import com.njcn.supervision.pojo.param.device.QuitRunningDeviceParam;
|
||||
import com.njcn.supervision.pojo.po.device.QuitRunningDevice;
|
||||
import com.njcn.supervision.pojo.vo.device.QuitRunningDeviceVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
@@ -27,5 +29,5 @@ public interface IQuitRunningDeviceService extends IBpmService<QuitRunningDevice
|
||||
|
||||
String cancelQuitRunningDevice(BpmProcessInstanceCancelParam cancelReqVO);
|
||||
|
||||
Boolean deleteQuitRunningDevice(String supervisionId);
|
||||
Boolean deleteQuitRunningDevice(List<String> supervisionId);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.njcn.supervision.pojo.po.device.SupervisionTempLineRunTestPO;
|
||||
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineRunTestVO;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -29,5 +30,5 @@ public interface ISupervisionTempLineRunTestService extends IBpmReasonService<Su
|
||||
|
||||
String cancel(BpmProcessInstanceCancelParam cancelReqVO);
|
||||
|
||||
Boolean deleteTempLineRunTestReport(String supervisionId);
|
||||
Boolean deleteTempLineRunTestReport(List<String> supervisionId);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,6 @@ public interface SupervisionDevMainReportPOService extends IBpmService<Supervisi
|
||||
|
||||
void importDevData(MultipartFile file, HttpServletResponse response);
|
||||
|
||||
Boolean deleteDevReport(String supervisionId);
|
||||
Boolean deleteDevReport(List<String> supervisionId);
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ import com.njcn.supervision.pojo.param.device.SupervisionTempLineDebugParam;
|
||||
import com.njcn.supervision.pojo.po.device.SupervisionTempLineDebugPO;
|
||||
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineDebugVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2024/5/17 15:26【需求编号】
|
||||
@@ -31,5 +33,5 @@ public interface SupervisionTempLineDebugPOService extends IBpmService<Supervisi
|
||||
|
||||
String cancel(BpmProcessInstanceCancelParam cancelReqVO);
|
||||
|
||||
Boolean deleteTempLineDebugReport(String supervisionId);
|
||||
Boolean deleteTempLineDebugReport(List<String> supervisionId);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ import com.njcn.supervision.pojo.param.device.SupervisionTempLineReportParam;
|
||||
import com.njcn.supervision.pojo.po.device.SupervisionTempLineReport;
|
||||
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineReportVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2024/5/11 14:07【需求编号】
|
||||
@@ -27,6 +29,6 @@ public interface SupervisionTempLineReportService extends IBpmService<Supervisio
|
||||
|
||||
SupervisionTempLineReportVO getDetailTempLine(String id);
|
||||
|
||||
Boolean deleteTempLineReport(String supervisionId);
|
||||
Boolean deleteTempLineReport(List<String> supervisionId);
|
||||
|
||||
}
|
||||
|
||||
@@ -82,10 +82,10 @@ public class QuitRunningDeviceServiceImpl extends ServiceImpl<QuitRunningDeviceM
|
||||
|
||||
quitRunningDevice.setState(DataStateEnum.ENABLE.getCode());
|
||||
//设置状态
|
||||
if(Objects.equals(quitRunningDeviceParam.getSaveOrCheckflag(),"1")){
|
||||
if (Objects.equals(quitRunningDeviceParam.getSaveOrCheckflag(), "1")) {
|
||||
quitRunningDevice.setStatus(BpmTaskStatusEnum.WAIT.getStatus());
|
||||
|
||||
}else {
|
||||
} else {
|
||||
quitRunningDevice.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
||||
|
||||
}
|
||||
@@ -95,7 +95,7 @@ public class QuitRunningDeviceServiceImpl extends ServiceImpl<QuitRunningDeviceM
|
||||
quitRunningDevice = this.baseMapper.selectById(quitRunningDevice.getId());
|
||||
|
||||
// 发起 BPM 流程
|
||||
if(Objects.equals(quitRunningDeviceParam.getSaveOrCheckflag(),"2")) {
|
||||
if (Objects.equals(quitRunningDeviceParam.getSaveOrCheckflag(), "2")) {
|
||||
|
||||
Map<String, Object> processInstanceVariables = new HashMap<>();
|
||||
BpmProcessInstanceCreateReqDTO bpmProcessInstanceCreateReqDTO = new BpmProcessInstanceCreateReqDTO();
|
||||
@@ -146,15 +146,15 @@ public class QuitRunningDeviceServiceImpl extends ServiceImpl<QuitRunningDeviceM
|
||||
|
||||
@Override
|
||||
public Page<QuitRunningDeviceVO> getQuitRunningDevice(QuitRunningDeviceParam.QuitRunningDeviceQueryParam quitRunningDeviceQueryParam) {
|
||||
DataParam param=new DataParam();
|
||||
DataParam param = new DataParam();
|
||||
param.setOrgId(RequestUtil.getDeptIndex());
|
||||
param.setType(quitRunningDeviceQueryParam.getDeviceType());
|
||||
param.setSearchValue(quitRunningDeviceQueryParam.getSearchValue());
|
||||
List<LineDetailVO.Detail> lineDetail = lineFeignClient.getDeptDeviceDetailData(param).getData();
|
||||
if(CollUtil.isEmpty(lineDetail)){
|
||||
if (CollUtil.isEmpty(lineDetail)) {
|
||||
return new Page<>();
|
||||
}
|
||||
Map<String, LineDetailVO.Detail> mapDetail=new HashMap<>();
|
||||
Map<String, LineDetailVO.Detail> mapDetail = new HashMap<>();
|
||||
QueryWrapper<QuitRunningDeviceVO> quitRunningDeviceVOQueryWrapper = new QueryWrapper<>();
|
||||
if (Objects.nonNull(quitRunningDeviceQueryParam)) {
|
||||
//判断监测点/设备的选择
|
||||
@@ -168,10 +168,10 @@ public class QuitRunningDeviceServiceImpl extends ServiceImpl<QuitRunningDeviceM
|
||||
DateUtil.endOfDay(DateUtil.parse(quitRunningDeviceQueryParam.getSearchEndTime())));
|
||||
//判断监测点/设备的选择
|
||||
quitRunningDeviceVOQueryWrapper.eq("supervision_quit_running_device.device_type", quitRunningDeviceQueryParam.getDeviceType());
|
||||
if(2==quitRunningDeviceQueryParam.getDeviceType()){
|
||||
if (2 == quitRunningDeviceQueryParam.getDeviceType()) {
|
||||
mapDetail.putAll(lineDetail.stream().collect(Collectors.toMap(LineDetailVO.Detail::getLineId, Function.identity())));
|
||||
}else{
|
||||
mapDetail.putAll(lineDetail.stream().collect(Collectors.toMap(LineDetailVO.Detail::getDevId,Function.identity(), (key1,key2)->key1)));
|
||||
} else {
|
||||
mapDetail.putAll(lineDetail.stream().collect(Collectors.toMap(LineDetailVO.Detail::getDevId, Function.identity(), (key1, key2) -> key1)));
|
||||
}
|
||||
quitRunningDeviceVOQueryWrapper
|
||||
.and(w -> w.in("supervision_quit_running_device.status", Arrays.asList(BpmTaskStatusEnum.RUNNING.getStatus(), BpmTaskStatusEnum.APPROVE.getStatus()))
|
||||
@@ -182,11 +182,11 @@ public class QuitRunningDeviceServiceImpl extends ServiceImpl<QuitRunningDeviceM
|
||||
if (Objects.nonNull(quitRunningDeviceQueryParam.getStatus())) {
|
||||
quitRunningDeviceVOQueryWrapper.eq("supervision_quit_running_device.status", quitRunningDeviceQueryParam.getStatus());
|
||||
}
|
||||
quitRunningDeviceVOQueryWrapper.and(x->x
|
||||
.in(CollUtil.isNotEmpty(mapDetail.keySet()),"supervision_quit_running_device.device_id", mapDetail.keySet())
|
||||
quitRunningDeviceVOQueryWrapper.and(x -> x
|
||||
.in(CollUtil.isNotEmpty(mapDetail.keySet()), "supervision_quit_running_device.device_id", mapDetail.keySet())
|
||||
.or()
|
||||
.isNull("supervision_quit_running_device.device_id")
|
||||
.or().eq("supervision_quit_running_device.device_id","")
|
||||
.or().eq("supervision_quit_running_device.device_id", "")
|
||||
);
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ public class QuitRunningDeviceServiceImpl extends ServiceImpl<QuitRunningDeviceM
|
||||
for (QuitRunningDeviceVO record : records) {
|
||||
if (record.getDeviceType() == 1) {
|
||||
//获取装置详细信息
|
||||
if(mapDetail.containsKey(record.getDeviceId())){
|
||||
if (mapDetail.containsKey(record.getDeviceId())) {
|
||||
LineDetailVO.Detail detail = mapDetail.get(record.getDeviceId());
|
||||
record.setDeviceName(detail.getDevName());
|
||||
record.setDeviceStatus(detail.getRunFlag());
|
||||
@@ -209,7 +209,7 @@ public class QuitRunningDeviceServiceImpl extends ServiceImpl<QuitRunningDeviceM
|
||||
}
|
||||
} else if (record.getDeviceType() == 2) {
|
||||
//获取监测点详细信息
|
||||
if(mapDetail.containsKey(record.getDeviceId())){
|
||||
if (mapDetail.containsKey(record.getDeviceId())) {
|
||||
LineDetailVO.Detail detail = mapDetail.get(record.getDeviceId());
|
||||
record.setDeviceName(detail.getVolName().concat("_").concat(detail.getLineName()));
|
||||
record.setDeviceStatus(detail.getRunFlag());
|
||||
@@ -270,7 +270,7 @@ public class QuitRunningDeviceServiceImpl extends ServiceImpl<QuitRunningDeviceM
|
||||
QuitRunningDevice quitRunningDevice = this.baseMapper.selectById(id);
|
||||
QuitRunningDeviceVO quitRunningDeviceVO = new QuitRunningDeviceVO();
|
||||
BeanUtils.copyProperties(quitRunningDevice, quitRunningDeviceVO);
|
||||
if(StringUtils.isNotEmpty(quitRunningDeviceVO.getDeviceId())){
|
||||
if (StringUtils.isNotEmpty(quitRunningDeviceVO.getDeviceId())) {
|
||||
if (quitRunningDeviceVO.getDeviceType() == 1) {
|
||||
|
||||
DeviceVO deviceVO = lineFeignClient.getDeviceDetailData(quitRunningDeviceVO.getDeviceId()).getData();
|
||||
@@ -309,21 +309,17 @@ public class QuitRunningDeviceServiceImpl extends ServiceImpl<QuitRunningDeviceM
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteQuitRunningDevice(String supervisionId) {
|
||||
QuitRunningDevice byId = this.getById(supervisionId);
|
||||
//判断是否有权限操作
|
||||
Boolean deleteRole = InstanceUtil.deleteRole(RequestUtil.getUserIndex(), byId.getCreateBy());
|
||||
if(ObjectUtil.isNotEmpty(byId)) {
|
||||
//是否删除管理管理员权限
|
||||
if(!deleteRole){
|
||||
if(byId.getStatus() != BpmTaskStatusEnum.WAIT.getStatus()){
|
||||
throw new BusinessException(SupervisionResponseEnum.DELETE_TO_BE_SUBMITTED);
|
||||
}
|
||||
}
|
||||
return this.update(new LambdaUpdateWrapper<QuitRunningDevice>().set(QuitRunningDevice::getState, DataStateEnum.DELETED.getCode())
|
||||
.eq(QuitRunningDevice::getId, supervisionId));
|
||||
public Boolean deleteQuitRunningDevice(List<String> supervisionId) {
|
||||
List<QuitRunningDevice> quitRunningDevices = this.listByIds(supervisionId);
|
||||
if (CollUtil.isEmpty(quitRunningDevices)) {
|
||||
throw new BusinessException(SupervisionResponseEnum.EXISTENCE_OR_NOT);
|
||||
}
|
||||
return false;
|
||||
List<String> collect = quitRunningDevices.stream().map(QuitRunningDevice::getCreateBy).distinct().collect(Collectors.toList());
|
||||
long count = quitRunningDevices.stream().filter(x -> !BpmTaskStatusEnum.WAIT.getStatus().equals(x.getStatus())).count();
|
||||
//判断是否有权限操作
|
||||
InstanceUtil.deleteRole(RequestUtil.getUserIndex(), collect, count);
|
||||
return this.update(new LambdaUpdateWrapper<QuitRunningDevice>().set(QuitRunningDevice::getState, DataStateEnum.DELETED.getCode())
|
||||
.in(QuitRunningDevice::getId, supervisionId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -692,21 +692,17 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteDevReport(String supervisionId) {
|
||||
SupervisionDevMainReportPO byId = this.getById(supervisionId);
|
||||
//判断是否有权限操作
|
||||
Boolean deleteRole = InstanceUtil.deleteRole(RequestUtil.getUserIndex(), byId.getCreateBy());
|
||||
if(ObjectUtil.isNotEmpty(byId)) {
|
||||
//是否删除管理管理员权限
|
||||
if(!deleteRole){
|
||||
if(byId.getStatus() != BpmTaskStatusEnum.WAIT.getStatus()){
|
||||
throw new BusinessException(SupervisionResponseEnum.DELETE_TO_BE_SUBMITTED);
|
||||
}
|
||||
}
|
||||
return this.update(new LambdaUpdateWrapper<SupervisionDevMainReportPO>().set(SupervisionDevMainReportPO::getState, DataStateEnum.DELETED.getCode())
|
||||
.eq(SupervisionDevMainReportPO::getId, supervisionId));
|
||||
public Boolean deleteDevReport(List<String> supervisionId) {
|
||||
List<SupervisionDevMainReportPO> supervisionDevMainReportPOS = this.listByIds(supervisionId);
|
||||
if(CollUtil.isEmpty(supervisionDevMainReportPOS)){
|
||||
throw new BusinessException(SupervisionResponseEnum.EXISTENCE_OR_NOT);
|
||||
}
|
||||
return false;
|
||||
//判断是否有权限操作
|
||||
List<String> collect = supervisionDevMainReportPOS.stream().map(SupervisionDevMainReportPO::getCreateBy).distinct().collect(Collectors.toList());
|
||||
long count = supervisionDevMainReportPOS.stream().filter(x -> !BpmTaskStatusEnum.WAIT.getStatus().equals(x.getStatus())).count();
|
||||
InstanceUtil.deleteRole(RequestUtil.getUserIndex(), collect, count);
|
||||
return this.update(new LambdaUpdateWrapper<SupervisionDevMainReportPO>().set(SupervisionDevMainReportPO::getState, DataStateEnum.DELETED.getCode())
|
||||
.in(SupervisionDevMainReportPO::getId, supervisionId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,6 +32,7 @@ import com.njcn.supervision.enums.UserNatureEnum;
|
||||
import com.njcn.supervision.mapper.device.SupervisionTempLineDebugPOMapper;
|
||||
import com.njcn.supervision.mapper.user.UserReportNormalMapper;
|
||||
import com.njcn.supervision.pojo.param.device.SupervisionTempLineDebugParam;
|
||||
import com.njcn.supervision.pojo.po.device.SupervisionDevMainReportPO;
|
||||
import com.njcn.supervision.pojo.po.device.SupervisionTempDeviceReport;
|
||||
import com.njcn.supervision.pojo.po.device.SupervisionTempLineDebugPO;
|
||||
import com.njcn.supervision.pojo.po.device.SupervisionTempLineReport;
|
||||
@@ -414,21 +415,18 @@ public class SupervisionTempLineDebugPOServiceImpl extends ServiceImpl<Supervisi
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteTempLineDebugReport(String supervisionId) {
|
||||
SupervisionTempLineDebugPO byId = this.getById(supervisionId);
|
||||
//判断是否有权限操作
|
||||
Boolean deleteRole = InstanceUtil.deleteRole(RequestUtil.getUserIndex(), byId.getCreateBy());
|
||||
if(ObjectUtil.isNotEmpty(byId)) {
|
||||
//是否删除管理管理员权限
|
||||
if(!deleteRole){
|
||||
if(byId.getStatus() != BpmTaskStatusEnum.WAIT.getStatus()){
|
||||
throw new BusinessException(SupervisionResponseEnum.DELETE_TO_BE_SUBMITTED);
|
||||
}
|
||||
}
|
||||
return this.update(new LambdaUpdateWrapper<SupervisionTempLineDebugPO>().set(SupervisionTempLineDebugPO::getState, DataStateEnum.DELETED.getCode())
|
||||
.eq(SupervisionTempLineDebugPO::getId, supervisionId));
|
||||
public Boolean deleteTempLineDebugReport(List<String> supervisionId) {
|
||||
List<SupervisionTempLineDebugPO> supervisionTempLineDebugPOS = this.listByIds(supervisionId);
|
||||
if(CollUtil.isEmpty(supervisionTempLineDebugPOS)){
|
||||
throw new BusinessException(SupervisionResponseEnum.EXISTENCE_OR_NOT);
|
||||
}
|
||||
return false;
|
||||
//判断是否有权限操作
|
||||
List<String> collect = supervisionTempLineDebugPOS.stream().map(SupervisionTempLineDebugPO::getCreateBy).distinct().collect(Collectors.toList());
|
||||
long count = supervisionTempLineDebugPOS.stream().filter(x -> !BpmTaskStatusEnum.WAIT.getStatus().equals(x.getStatus())).count();
|
||||
InstanceUtil.deleteRole(RequestUtil.getUserIndex(), collect, count);
|
||||
return this.update(new LambdaUpdateWrapper<SupervisionTempLineDebugPO>().set(SupervisionTempLineDebugPO::getState, DataStateEnum.DELETED.getCode())
|
||||
.in(SupervisionTempLineDebugPO::getId, supervisionId));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -267,21 +267,17 @@ public class SupervisionTempLineReportServiceImpl extends ServiceImpl<Supervisio
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteTempLineReport(String supervisionId) {
|
||||
SupervisionTempLineReport byId = this.getById(supervisionId);
|
||||
//判断是否有权限操作
|
||||
Boolean deleteRole = InstanceUtil.deleteRole(RequestUtil.getUserIndex(), byId.getCreateBy());
|
||||
if(ObjectUtil.isNotEmpty(byId)) {
|
||||
//是否删除管理管理员权限
|
||||
if(!deleteRole){
|
||||
if(byId.getStatus() != BpmTaskStatusEnum.WAIT.getStatus()){
|
||||
throw new BusinessException(SupervisionResponseEnum.DELETE_TO_BE_SUBMITTED);
|
||||
}
|
||||
}
|
||||
return this.update(new LambdaUpdateWrapper<SupervisionTempLineReport>().set(SupervisionTempLineReport::getState, DataStateEnum.DELETED.getCode())
|
||||
.eq(SupervisionTempLineReport::getId, supervisionId));
|
||||
public Boolean deleteTempLineReport(List<String> supervisionId) {
|
||||
List<SupervisionTempLineReport> supervisionTempLineReports = this.listByIds(supervisionId);
|
||||
if(CollUtil.isEmpty(supervisionTempLineReports)){
|
||||
throw new BusinessException(SupervisionResponseEnum.EXISTENCE_OR_NOT);
|
||||
}
|
||||
return false;
|
||||
//判断是否有权限操作
|
||||
List<String> collect = supervisionTempLineReports.stream().map(SupervisionTempLineReport::getCreateBy).distinct().collect(Collectors.toList());
|
||||
long count = supervisionTempLineReports.stream().filter(x -> !BpmTaskStatusEnum.WAIT.getStatus().equals(x.getStatus())).count();
|
||||
InstanceUtil.deleteRole(RequestUtil.getUserIndex(), collect, count);
|
||||
return this.update(new LambdaUpdateWrapper<SupervisionTempLineReport>().set(SupervisionTempLineReport::getState, DataStateEnum.DELETED.getCode())
|
||||
.in(SupervisionTempLineReport::getId, supervisionId));
|
||||
}
|
||||
|
||||
private void checkLineId(SupervisionTempLineReportParam supervisionTempLineReportParam, boolean isExcludeSelf) {
|
||||
|
||||
@@ -381,21 +381,17 @@ public class SupervisionTempLineRunTestServiceImpl extends ServiceImpl<Supervisi
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteTempLineRunTestReport(String supervisionId) {
|
||||
SupervisionTempLineRunTestPO byId = this.getById(supervisionId);
|
||||
//判断是否有权限操作
|
||||
Boolean deleteRole = InstanceUtil.deleteRole(RequestUtil.getUserIndex(), byId.getCreateBy());
|
||||
if(ObjectUtil.isNotEmpty(byId)) {
|
||||
//是否删除管理管理员权限
|
||||
if(!deleteRole){
|
||||
if(byId.getStatus() != BpmTaskStatusEnum.WAIT.getStatus()){
|
||||
throw new BusinessException(SupervisionResponseEnum.DELETE_TO_BE_SUBMITTED);
|
||||
}
|
||||
}
|
||||
return this.update(new LambdaUpdateWrapper<SupervisionTempLineRunTestPO>().set(SupervisionTempLineRunTestPO::getState, DataStateEnum.DELETED.getCode())
|
||||
.eq(SupervisionTempLineRunTestPO::getId, supervisionId));
|
||||
public Boolean deleteTempLineRunTestReport(List<String> supervisionId) {
|
||||
List<SupervisionTempLineRunTestPO> supervisionTempLineRunTestPOS = this.listByIds(supervisionId);
|
||||
if(CollUtil.isEmpty(supervisionTempLineRunTestPOS)){
|
||||
throw new BusinessException(SupervisionResponseEnum.EXISTENCE_OR_NOT);
|
||||
}
|
||||
return false;
|
||||
//判断是否有权限操作
|
||||
List<String> collect = supervisionTempLineRunTestPOS.stream().map(SupervisionTempLineRunTestPO::getCreateBy).distinct().collect(Collectors.toList());
|
||||
long count = supervisionTempLineRunTestPOS.stream().filter(x -> !BpmTaskStatusEnum.WAIT.getStatus().equals(x.getStatus())).count();
|
||||
InstanceUtil.deleteRole(RequestUtil.getUserIndex(), collect, count);
|
||||
return this.update(new LambdaUpdateWrapper<SupervisionTempLineRunTestPO>().set(SupervisionTempLineRunTestPO::getState, DataStateEnum.DELETED.getCode())
|
||||
.in(SupervisionTempLineRunTestPO::getId, supervisionId));
|
||||
}
|
||||
|
||||
private String assMsg(List<SupervisionTempLineReport> supervisionTempLineReportList, List<SupervisionTempLineRunTestPO> supervisionTempLineRunTestPOList) {
|
||||
|
||||
@@ -8,6 +8,8 @@ import com.njcn.supervision.pojo.param.leaflet.WarningLeafletParam;
|
||||
import com.njcn.supervision.pojo.po.leaflet.WarningLeaflet;
|
||||
import com.njcn.supervision.pojo.vo.leaflet.WarningLeafletVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 预告警单表 服务类
|
||||
@@ -54,6 +56,6 @@ public interface IWarningLeafletService extends IBpmService<WarningLeaflet> {
|
||||
*/
|
||||
Page<WarningLeafletVO> allPageData(WarningLeafletParam.WarningLeafletQueryParam warningLeafletQueryParam);
|
||||
|
||||
Boolean deleteWarningLeaflet(String supervisionId);
|
||||
Boolean deleteWarningLeaflet(List<String> supervisionId);
|
||||
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.njcn.supervision.enums.*;
|
||||
import com.njcn.supervision.mapper.leaflet.WarningLeafletMapper;
|
||||
import com.njcn.supervision.pojo.param.leaflet.WarningLeafletParam;
|
||||
import com.njcn.supervision.pojo.po.device.SupervisionTempLineDebugPO;
|
||||
import com.njcn.supervision.pojo.po.device.SupervisionTempLineRunTestPO;
|
||||
import com.njcn.supervision.pojo.po.device.TempLineRunTestWarning;
|
||||
import com.njcn.supervision.pojo.po.leaflet.WarningLeaflet;
|
||||
import com.njcn.supervision.pojo.vo.leaflet.WarningLeafletVO;
|
||||
@@ -270,7 +271,10 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
||||
DateUtil.endOfDay(DateUtil.parse(warningLeafletQueryParam.getSearchEndTime())));
|
||||
}
|
||||
warningLeafletVOQueryWrapper
|
||||
.and(w -> w.in("supervision_warning_leaflet.status", Arrays.asList(BpmTaskStatusEnum.RUNNING.getStatus(), BpmTaskStatusEnum.APPROVE.getStatus()))
|
||||
.and(w -> w.in("supervision_warning_leaflet.status", Arrays.asList(BpmTaskStatusEnum.RUNNING.getStatus(),
|
||||
BpmTaskStatusEnum.APPROVE.getStatus(),
|
||||
BpmTaskStatusEnum.RETURN.getStatus()
|
||||
))
|
||||
.or()
|
||||
.eq("supervision_warning_leaflet.dept_id", RequestUtil.getDeptIndex())
|
||||
);
|
||||
@@ -398,21 +402,17 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteWarningLeaflet(String supervisionId) {
|
||||
WarningLeaflet byId = this.getById(supervisionId);
|
||||
//判断是否有权限操作
|
||||
Boolean deleteRole = InstanceUtil.deleteRole(RequestUtil.getUserIndex(), byId.getCreateBy());
|
||||
if(ObjectUtil.isNotEmpty(byId)) {
|
||||
//是否删除管理管理员权限
|
||||
if(!deleteRole){
|
||||
if(byId.getStatus() != BpmTaskStatusEnum.WAIT.getStatus()){
|
||||
throw new BusinessException(SupervisionResponseEnum.DELETE_TO_BE_SUBMITTED);
|
||||
}
|
||||
}
|
||||
return this.update(new LambdaUpdateWrapper<WarningLeaflet>().set(WarningLeaflet::getState, DataStateEnum.DELETED.getCode())
|
||||
.eq(WarningLeaflet::getId, supervisionId));
|
||||
public Boolean deleteWarningLeaflet(List<String> supervisionId) {
|
||||
List<WarningLeaflet> warningLeaflets = this.listByIds(supervisionId);
|
||||
if(CollUtil.isEmpty(warningLeaflets)){
|
||||
throw new BusinessException(SupervisionResponseEnum.EXISTENCE_OR_NOT);
|
||||
}
|
||||
return false;
|
||||
//判断是否有权限操作
|
||||
List<String> collect = warningLeaflets.stream().map(WarningLeaflet::getCreateBy).distinct().collect(Collectors.toList());
|
||||
long count = warningLeaflets.stream().filter(x -> !BpmTaskStatusEnum.WAIT.getStatus().equals(x.getStatus())).count();
|
||||
InstanceUtil.deleteRole(RequestUtil.getUserIndex(), collect, count);
|
||||
return this.update(new LambdaUpdateWrapper<WarningLeaflet>().set(WarningLeaflet::getState, DataStateEnum.DELETED.getCode())
|
||||
.in(WarningLeaflet::getId, supervisionId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ import com.njcn.supervision.pojo.param.survey.SurveyPlanParam;
|
||||
import com.njcn.supervision.pojo.po.survey.SurveyPlan;
|
||||
import com.njcn.supervision.pojo.vo.survey.SurveyPlanVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 普测计划流程表 服务类
|
||||
@@ -27,5 +29,5 @@ public interface ISurveyPlanService extends IBpmService<SurveyPlan> {
|
||||
|
||||
SurveyPlanVO getVOById(String id);
|
||||
|
||||
Boolean deleteSurveyPlan(String supervisionId);
|
||||
Boolean deleteSurveyPlan(List<String> supervisionId);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@ import com.njcn.supervision.pojo.param.survey.SurveyTestParam;
|
||||
import com.njcn.supervision.pojo.po.survey.SurveyTest;
|
||||
import com.njcn.supervision.pojo.vo.survey.SurveyTestVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 普测测试的管理表 服务类
|
||||
@@ -32,5 +34,5 @@ public interface ISurveyTestService extends IBpmService<SurveyTest> {
|
||||
|
||||
void initiateWarningLeaflet(WarningAddParam warningAddParam);
|
||||
|
||||
Boolean deleteSurveyPlanTest(String supervisionId);
|
||||
Boolean deleteSurveyPlanTest(List<String> supervisionId);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.njcn.supervision.enums.SupervisionKeyEnum;
|
||||
import com.njcn.supervision.enums.SupervisionResponseEnum;
|
||||
import com.njcn.supervision.mapper.survey.SurveyPlanMapper;
|
||||
import com.njcn.supervision.pojo.param.survey.SurveyPlanParam;
|
||||
import com.njcn.supervision.pojo.po.device.SupervisionDevMainReportPO;
|
||||
import com.njcn.supervision.pojo.po.device.SupervisionTempLineRunTestPO;
|
||||
import com.njcn.supervision.pojo.po.survey.SurveyPlan;
|
||||
import com.njcn.supervision.pojo.po.survey.SurveyTest;
|
||||
@@ -46,6 +47,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -310,20 +312,17 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteSurveyPlan(String supervisionId) {
|
||||
SurveyPlan byId = this.getById(supervisionId);
|
||||
//判断是否有权限操作
|
||||
Boolean deleteRole = InstanceUtil.deleteRole(RequestUtil.getUserIndex(), byId.getCreateBy());
|
||||
if(ObjectUtil.isNotEmpty(byId)) {
|
||||
//是否删除管理管理员权限
|
||||
if(!deleteRole){
|
||||
if(byId.getStatus() != BpmTaskStatusEnum.WAIT.getStatus()){
|
||||
throw new BusinessException(SupervisionResponseEnum.DELETE_TO_BE_SUBMITTED);
|
||||
}
|
||||
}
|
||||
return this.update(new LambdaUpdateWrapper<SurveyPlan>().set(SurveyPlan::getState, DataStateEnum.DELETED.getCode())
|
||||
.eq(SurveyPlan::getId, supervisionId));
|
||||
public Boolean deleteSurveyPlan(List<String> supervisionId) {
|
||||
List<SurveyPlan> surveyPlans = this.listByIds(supervisionId);
|
||||
if(CollUtil.isEmpty(surveyPlans)){
|
||||
throw new BusinessException(SupervisionResponseEnum.EXISTENCE_OR_NOT);
|
||||
}
|
||||
return false;
|
||||
//判断是否有权限操作
|
||||
List<String> collect = surveyPlans.stream().map(SurveyPlan::getCreateBy).distinct().collect(Collectors.toList());
|
||||
long count = surveyPlans.stream().filter(x -> !BpmTaskStatusEnum.WAIT.getStatus().equals(x.getStatus())).count();
|
||||
//判断是否有权限操作
|
||||
InstanceUtil.deleteRole(RequestUtil.getUserIndex(), collect, count);
|
||||
return this.update(new LambdaUpdateWrapper<SurveyPlan>().set(SurveyPlan::getState, DataStateEnum.DELETED.getCode())
|
||||
.in(SurveyPlan::getId, supervisionId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import com.njcn.supervision.enums.*;
|
||||
import com.njcn.supervision.mapper.survey.SurveyTestMapper;
|
||||
import com.njcn.supervision.pojo.param.leaflet.WarningAddParam;
|
||||
import com.njcn.supervision.pojo.param.survey.SurveyTestParam;
|
||||
import com.njcn.supervision.pojo.po.leaflet.WarningLeaflet;
|
||||
import com.njcn.supervision.pojo.po.survey.SurveyPlan;
|
||||
import com.njcn.supervision.pojo.po.survey.SurveyTest;
|
||||
import com.njcn.supervision.pojo.vo.survey.SurveyTestVO;
|
||||
@@ -386,21 +387,17 @@ public class SurveyTestServiceImpl extends ServiceImpl<SurveyTestMapper, SurveyT
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteSurveyPlanTest(String supervisionId) {
|
||||
SurveyTest byId = this.getById(supervisionId);
|
||||
//判断是否有权限操作
|
||||
Boolean deleteRole = InstanceUtil.deleteRole(RequestUtil.getUserIndex(), byId.getCreateBy());
|
||||
if(ObjectUtil.isNotEmpty(byId)) {
|
||||
//是否删除管理管理员权限
|
||||
if(!deleteRole){
|
||||
if(byId.getStatus() != BpmTaskStatusEnum.WAIT.getStatus()){
|
||||
throw new BusinessException(SupervisionResponseEnum.DELETE_TO_BE_SUBMITTED);
|
||||
}
|
||||
}
|
||||
return this.update(new LambdaUpdateWrapper<SurveyTest>().set(SurveyTest::getState, DataStateEnum.DELETED.getCode())
|
||||
.eq(SurveyTest::getId, supervisionId));
|
||||
public Boolean deleteSurveyPlanTest(List<String> supervisionId) {
|
||||
List<SurveyTest> surveyTests = this.listByIds(supervisionId);
|
||||
if(CollUtil.isEmpty(surveyTests)){
|
||||
throw new BusinessException(SupervisionResponseEnum.EXISTENCE_OR_NOT);
|
||||
}
|
||||
return false;
|
||||
//判断是否有权限操作
|
||||
List<String> collect = surveyTests.stream().map(SurveyTest::getCreateBy).distinct().collect(Collectors.toList());
|
||||
long count = surveyTests.stream().filter(x -> !BpmTaskStatusEnum.WAIT.getStatus().equals(x.getStatus())).count();
|
||||
InstanceUtil.deleteRole(RequestUtil.getUserIndex(), collect, count);
|
||||
return this.update(new LambdaUpdateWrapper<SurveyTest>().set(SurveyTest::getState, DataStateEnum.DELETED.getCode())
|
||||
.in(SurveyTest::getId, supervisionId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -55,5 +55,5 @@ public interface UserReportPOService extends IBpmService<UserReportPO> {
|
||||
|
||||
void importSensitiveReportData(MultipartFile file, HttpServletResponse response);
|
||||
|
||||
Boolean deleteUserReport(String supervisionId);
|
||||
Boolean deleteUserReport(List<String> supervisionId);
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
if (ObjectUtil.isNotNull(userReportParam.getDataType())) {
|
||||
userReportPO.setDataType(userReportParam.getDataType());
|
||||
if (userReportParam.getDataType() == 1) {
|
||||
userReportPO.setStatus(FlowStatusEnum.APPROVE.getCode());
|
||||
userReportPO.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
||||
}
|
||||
} else {
|
||||
userReportPO.setDataType(0);
|
||||
@@ -162,7 +162,14 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
if (Objects.equals(userReportParam.getSaveOrCheckflag(), "2")) {
|
||||
Map<String, Object> processInstanceVariables = new HashMap<>();
|
||||
BpmProcessInstanceCreateReqDTO bpmProcessInstanceCreateReqDTO = new BpmProcessInstanceCreateReqDTO();
|
||||
bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(SupervisionKeyEnum.BUILD_USER_INFO.getKey());
|
||||
//干扰源用户台账和敏感用户审核流程
|
||||
if (ObjectUtil.isNotNull(userReportParam.getDataType())) {
|
||||
if (userReportParam.getDataType() == 1) {
|
||||
bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(SupervisionKeyEnum.BUILD_USER_INFO_ARCHIVIST.getKey());
|
||||
}
|
||||
} else {
|
||||
bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(SupervisionKeyEnum.BUILD_USER_INFO.getKey());
|
||||
}
|
||||
bpmProcessInstanceCreateReqDTO.setBusinessKey(userReportPO.getId());
|
||||
bpmProcessInstanceCreateReqDTO.setStartUserSelectAssignees(userReportParam.getStartUserSelectAssignees());
|
||||
bpmProcessInstanceCreateReqDTO.setVariables(processInstanceVariables);
|
||||
@@ -223,7 +230,12 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
// 发起 BPM 流程
|
||||
Map<String, Object> processInstanceVariables = new HashMap<>();
|
||||
BpmProcessInstanceCreateReqDTO bpmProcessInstanceCreateReqDTO = new BpmProcessInstanceCreateReqDTO();
|
||||
bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(SupervisionKeyEnum.BUILD_USER_INFO.getKey());
|
||||
//干扰源用户台账和敏感用户审核流程
|
||||
if (userReportPO.getDataType() == 1) {
|
||||
bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(SupervisionKeyEnum.BUILD_USER_INFO_ARCHIVIST.getKey());
|
||||
}else{
|
||||
bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(SupervisionKeyEnum.BUILD_USER_INFO.getKey());
|
||||
}
|
||||
bpmProcessInstanceCreateReqDTO.setBusinessKey(userReportPO.getId());
|
||||
bpmProcessInstanceCreateReqDTO.setStartUserSelectAssignees(userReportParam.getStartUserSelectAssignees());
|
||||
bpmProcessInstanceCreateReqDTO.setVariables(processInstanceVariables);
|
||||
@@ -431,11 +443,13 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
.or()
|
||||
.in("supervision_user_report.org_id", data)
|
||||
)
|
||||
.eq("supervision_user_report.state", DataStateEnum.ENABLE.getCode())
|
||||
.eq("supervision_user_report.status", FlowStatusEnum.APPROVE.getCode());
|
||||
.eq("supervision_user_report.state", DataStateEnum.ENABLE.getCode());
|
||||
if (!allDataFlag) {
|
||||
//台账不查询全部数据,需要排除敏感及重要用户
|
||||
userReportVOQueryWrapper.ne("supervision_user_report.user_type", UserNatureEnum.SENSITIVE_USER.getCode());
|
||||
userReportVOQueryWrapper.ne("supervision_user_report.user_type", UserNatureEnum.SENSITIVE_USER.getCode())
|
||||
.in("supervision_user_report.status", Arrays.asList(FlowStatusEnum.AUDIT.getCode(), FlowStatusEnum.APPROVE.getCode()));
|
||||
}else{
|
||||
userReportVOQueryWrapper.eq("supervision_user_report.status", FlowStatusEnum.APPROVE.getCode());
|
||||
}
|
||||
if (Objects.nonNull(userReportQueryParam)) {
|
||||
if (StrUtil.isNotBlank(userReportQueryParam.getCity())) {
|
||||
@@ -571,7 +585,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
)
|
||||
.eq("supervision_user_report.state", DataStateEnum.ENABLE.getCode())
|
||||
.eq("supervision_user_report.user_type", UserNatureEnum.SENSITIVE_USER.getCode())
|
||||
.eq("supervision_user_report.status", FlowStatusEnum.APPROVE.getCode());
|
||||
.in("supervision_user_report.status", Arrays.asList(FlowStatusEnum.AUDIT.getCode(), FlowStatusEnum.APPROVE.getCode()));
|
||||
if (Objects.nonNull(userReportQueryParam)) {
|
||||
if (StrUtil.isNotBlank(userReportQueryParam.getCity())) {
|
||||
//查询所有区域下的数据
|
||||
@@ -733,7 +747,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
List<DictData> devVoltage = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE_STAND.getCode()).getData();
|
||||
//指标类型
|
||||
List<DictData> indicatorType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.INDICATOR_TYPE.getCode()).getData();
|
||||
//敏感用户字典
|
||||
//问题指标
|
||||
List<DictData> problemIndicators = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.PROBLEM_INDICATORS.getCode()).getData();
|
||||
//评估类型
|
||||
List<DictData> evaluationType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.EVALUATION_TYPE.getCode()).getData();
|
||||
@@ -784,7 +798,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
userReportPO.setEvaluationDept(userExcel.getEvaluationDept());
|
||||
userReportPO.setEvaluationConclusion(userExcel.getEvaluationConclusion());
|
||||
userReportPO.setDataType(1);
|
||||
userReportPO.setStatus(2);
|
||||
userReportPO.setStatus(BpmTaskStatusEnum.WAIT.getStatus());
|
||||
userReportPO.setState(DataStateEnum.ENABLE.getCode());
|
||||
this.baseMapper.insert(userReportPO);
|
||||
//处理敏感用户的信息
|
||||
@@ -989,7 +1003,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
userReportPO.setEvaluationDept(reportExcel.getEvaluationDept());
|
||||
userReportPO.setEvaluationConclusion(reportExcel.getEvaluationConclusion());
|
||||
userReportPO.setDataType(1);
|
||||
userReportPO.setStatus(2);
|
||||
userReportPO.setStatus(BpmTaskStatusEnum.WAIT.getStatus());
|
||||
userReportPO.setState(DataStateEnum.ENABLE.getCode());
|
||||
this.baseMapper.insert(userReportPO);
|
||||
if (CollectionUtil.newArrayList(
|
||||
@@ -1056,21 +1070,18 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteUserReport(String supervisionId) {
|
||||
UserReportPO byId = this.getById(supervisionId);
|
||||
//判断是否有权限操作
|
||||
Boolean deleteRole = InstanceUtil.deleteRole(RequestUtil.getUserIndex(), byId.getCreateBy());
|
||||
if(ObjectUtil.isNotEmpty(byId)) {
|
||||
//是否删除管理管理员权限
|
||||
if(!deleteRole){
|
||||
if(byId.getStatus() != BpmTaskStatusEnum.WAIT.getStatus()){
|
||||
throw new BusinessException(SupervisionResponseEnum.DELETE_TO_BE_SUBMITTED);
|
||||
}
|
||||
}
|
||||
return this.update(new LambdaUpdateWrapper<UserReportPO>().set(UserReportPO::getState, DataStateEnum.DELETED.getCode())
|
||||
.eq(UserReportPO::getId, supervisionId));
|
||||
public Boolean deleteUserReport(List<String> supervisionId) {
|
||||
List<UserReportPO> userReportPOS = this.listByIds(supervisionId);
|
||||
if(CollUtil.isEmpty(userReportPOS)){
|
||||
throw new BusinessException(SupervisionResponseEnum.EXISTENCE_OR_NOT);
|
||||
}
|
||||
return false;
|
||||
//判断是否有权限操作
|
||||
List<String> collect = userReportPOS.stream().map(UserReportPO::getCreateBy).distinct().collect(Collectors.toList());
|
||||
long count = userReportPOS.stream().filter(x -> !BpmTaskStatusEnum.WAIT.getStatus().equals(x.getStatus())).count();
|
||||
//判断是否有权限操作
|
||||
InstanceUtil.deleteRole(RequestUtil.getUserIndex(), collect, count);
|
||||
return this.update(new LambdaUpdateWrapper<UserReportPO>().set(UserReportPO::getState, DataStateEnum.DELETED.getCode())
|
||||
.in(UserReportPO::getId, supervisionId));
|
||||
}
|
||||
|
||||
public Map<String, String> getTreeString(String name, List<SysDicTreePO> treeVOS) {
|
||||
|
||||
@@ -45,7 +45,7 @@ public class InstanceUtil {
|
||||
/**
|
||||
* 判断用户是否有权限操作
|
||||
*
|
||||
* @param deptId 当前用户部门id
|
||||
* @param deptId 当前用户部门id
|
||||
* @param responsibleDeptId 数据创建负责单位id
|
||||
*/
|
||||
public static void judgeUserDeptPower(String deptId, String responsibleDeptId) {
|
||||
@@ -61,21 +61,26 @@ public class InstanceUtil {
|
||||
* @param userId 当前用户部门id
|
||||
* @param createBy 数据创建负责单位id
|
||||
*/
|
||||
public static Boolean deleteRole(String userId, String createBy) {
|
||||
public static void deleteRole(String userId, List<String> createBy, Long statusCount) {
|
||||
if (CollUtil.isEmpty(createBy)) {
|
||||
throw new BusinessException(SupervisionResponseEnum.EXISTENCE_OR_NOT);
|
||||
}
|
||||
//先判断是否是删除管理员,如果是就有全部删除权限,否则就只能删除带提交审批的
|
||||
String userRole = RequestUtil.getUserRole();
|
||||
String trimmedString = userRole.substring(1, userRole.length() - 1).replace("\"","");
|
||||
String trimmedString = userRole.substring(1, userRole.length() - 1).replace("\"", "");
|
||||
List<String> list = Arrays.asList(trimmedString.split(","));
|
||||
List<String> delete = list.stream().filter(x -> "delete_info".equals(x)).collect(Collectors.toList());
|
||||
//false 表示不是删除管理员
|
||||
if(CollUtil.isNotEmpty(delete)){
|
||||
return true;
|
||||
}else{
|
||||
if (!userId.equalsIgnoreCase(createBy)) {
|
||||
List<String> delete = list.stream().filter(x -> "delete_info".equals(x)).collect(Collectors.toList());
|
||||
//如果为空则需要判断信息,先判断全部数据是否都是自己创建的,然后判断是否是都是带提交数据
|
||||
if (CollUtil.isEmpty(delete)) {
|
||||
long count = list.stream().filter(x -> !userId.equals(x)).count();
|
||||
if (count > 0) {
|
||||
throw new BusinessException(SupervisionResponseEnum.NO_POWER);
|
||||
} else {
|
||||
if (statusCount > 0) {
|
||||
throw new BusinessException(SupervisionResponseEnum.DELETE_TO_BE_SUBMITTED);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user