冀北重新发起,取消发起接口
This commit is contained in:
@@ -93,6 +93,17 @@ public class WarningLeafletController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPDATE)
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("重新发起反馈单申请")
|
||||
@ApiImplicitParam(name = "warningLeafletUpdateParam", value = "实体参数", required = true)
|
||||
public HttpResult<Object> updateFeedback(@RequestBody @Validated WarningLeafletParam.WarningLeafletUpdateParam warningLeafletUpdateParam) {
|
||||
String methodDescribe = getMethodDescribe("updateFeedback");
|
||||
warningLeafletService.updateFeedback(warningLeafletUpdateParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@GetMapping("/getById")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("根据id获取预告警单的详细数据")
|
||||
|
||||
@@ -37,6 +37,7 @@ import java.util.List;
|
||||
@RequestMapping("/generalSurvey")
|
||||
@Api(tags = "谐波普测计划")
|
||||
@AllArgsConstructor
|
||||
@Deprecated
|
||||
public class GeneralSurveyController extends BaseController {
|
||||
|
||||
private final SupervisionGeneralSurveyPlanPOService supervisionGeneralSurveyPlanPOService;
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
supervision_temp_line_report.Power_Substation_Name,
|
||||
supervision_temp_line_debug.reason reason,
|
||||
supervision_temp_line_debug.process_instance_id process_instanceId,
|
||||
supervision_temp_line_debug.`status` `Status`
|
||||
supervision_temp_line_debug.`status` `Status`,
|
||||
supervision_temp_line_debug.create_by
|
||||
FROM
|
||||
supervision_temp_line_report left
|
||||
JOIN supervision_temp_line_debug ON supervision_temp_line_report.id = supervision_temp_line_debug.id
|
||||
@@ -59,7 +60,8 @@
|
||||
supervision_temp_line_run_test.process_instance_id process_instanceId,
|
||||
supervision_temp_line_run_test.`status` `Status`,
|
||||
IFNULL(supervision_temp_line_run_test.`test_run_state`,0) `testRunState`,
|
||||
supervision_temp_line_run_test.test_run_time
|
||||
supervision_temp_line_run_test.test_run_time,
|
||||
supervision_temp_line_run_test.create_by
|
||||
FROM
|
||||
supervision_temp_line_debug
|
||||
inner JOIN supervision_temp_line_report ON supervision_temp_line_report.id = supervision_temp_line_debug.id
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
supervision_user_report.process_instance_id,
|
||||
supervision_user_report.history_instance_id,
|
||||
supervision_user_report.create_time,
|
||||
supervision_user_report.create_by,
|
||||
supervision_user_report.status
|
||||
FROM supervision_user_report supervision_user_report
|
||||
WHERE ${ew.sqlSegment}
|
||||
|
||||
@@ -35,6 +35,9 @@ public interface IWarningLeafletService extends IService<WarningLeaflet> {
|
||||
|
||||
void addFeedback(WarningLeafletParam.WarningLeafletUpdateParam warningLeafletUpdateParam);
|
||||
|
||||
|
||||
String updateFeedback(WarningLeafletParam.WarningLeafletUpdateParam warningLeafletUpdateParam);
|
||||
|
||||
WarningLeafletVO getVOById(String id);
|
||||
|
||||
void updateStatus(String businessKey, Integer status);
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.njcn.supervision.enums.LeafletTypeEnum;
|
||||
import com.njcn.supervision.enums.ProblemTypeEnum;
|
||||
import com.njcn.supervision.mapper.leaflet.WarningLeafletMapper;
|
||||
import com.njcn.supervision.pojo.param.leaflet.WarningLeafletParam;
|
||||
import com.njcn.supervision.pojo.po.device.SupervisionTempLineReport;
|
||||
import com.njcn.supervision.pojo.po.leaflet.WarningLeaflet;
|
||||
import com.njcn.supervision.pojo.po.survey.SupervisionGeneralSurveyPlanPO;
|
||||
import com.njcn.supervision.pojo.po.survey.SurveyTest;
|
||||
@@ -134,6 +135,36 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
||||
this.baseMapper.updateById(warningLeaflet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String updateFeedback(WarningLeafletParam.WarningLeafletUpdateParam warningLeafletUpdateParam) {
|
||||
WarningLeaflet warningLeaflet = this.baseMapper.selectById(warningLeafletUpdateParam.getId());
|
||||
//判断是否有权限操作
|
||||
InstanceUtil.judgeUserPower(RequestUtil.getUserIndex(),warningLeaflet.getCreateBy());
|
||||
|
||||
//处理历史流程id列表
|
||||
String historyInstanceIds = InstanceUtil.dealHistoryId(warningLeaflet.getProcessInstanceId(), warningLeaflet.getHistoryInstanceId());
|
||||
|
||||
|
||||
BeanUtils.copyProperties(warningLeafletUpdateParam,warningLeaflet);
|
||||
warningLeaflet.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
||||
warningLeaflet.setState(DataStateEnum.ENABLE.getCode());
|
||||
|
||||
// 发起 BPM 流程
|
||||
Map<String, Object> processInstanceVariables = new HashMap<>();
|
||||
BpmProcessInstanceCreateReqDTO bpmProcessInstanceCreateReqDTO = new BpmProcessInstanceCreateReqDTO();
|
||||
bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(PROCESS_KEY);
|
||||
bpmProcessInstanceCreateReqDTO.setBusinessKey(warningLeaflet.getId());
|
||||
bpmProcessInstanceCreateReqDTO.setStartUserSelectAssignees(warningLeafletUpdateParam.getStartUserSelectAssignees());
|
||||
bpmProcessInstanceCreateReqDTO.setVariables(processInstanceVariables);
|
||||
String processInstanceId = bpmProcessFeignClient.createProcessInstance(warningLeaflet.getCreateBy(), bpmProcessInstanceCreateReqDTO).getData();
|
||||
// 将工作流的编号,更新到流程单中
|
||||
warningLeaflet.setProcessInstanceId(processInstanceId);
|
||||
//保存历史流程id列表
|
||||
warningLeaflet.setHistoryInstanceId(historyInstanceIds);
|
||||
this.baseMapper.updateById(warningLeaflet);
|
||||
return warningLeaflet.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public WarningLeafletVO getVOById(String id) {
|
||||
WarningLeaflet warningLeaflet = this.getById(id);
|
||||
|
||||
@@ -206,6 +206,7 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
||||
surveyTest.setSubstation(subId);
|
||||
surveyTest.setCustomSubstationFlag(0);
|
||||
surveyTest.setStatus(FlowStatusEnum.UN_TEST.getCode());
|
||||
surveyTest.setCreateBy(surveyPlan.getCreateBy());
|
||||
surveyTestService.save(surveyTest);
|
||||
}
|
||||
}else{
|
||||
@@ -216,6 +217,7 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
||||
surveyTest.setInitiateWarningFlag(0);
|
||||
surveyTest.setCustomSubstationFlag(1);
|
||||
surveyTest.setStatus(FlowStatusEnum.UN_TEST.getCode());
|
||||
surveyTest.setCreateBy(surveyPlan.getCreateBy());
|
||||
surveyTestService.save(surveyTest);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,10 +156,12 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
UserReportPO userReportPO = this.baseMapper.selectById(userReportParam.getId());
|
||||
//判断是否有权限操作
|
||||
InstanceUtil.judgeUserPower(RequestUtil.getUserIndex(),userReportPO.getCreateBy());
|
||||
if(!Objects.equals(userReportPO.getStatus(), BpmTaskStatusEnum.REJECT.getStatus())){
|
||||
if(Objects.equals(userReportPO.getStatus(), BpmTaskStatusEnum.APPROVE.getStatus())){
|
||||
throw new BusinessException("当前流程以完成审批,无法重新发起");
|
||||
}
|
||||
|
||||
BeanUtil.copyProperties(userReportParam,userReportPO);
|
||||
|
||||
if (
|
||||
CollectionUtil.newArrayList(
|
||||
UserNatureEnum.BUILD_POWER_GRID.getCode(),
|
||||
@@ -169,7 +171,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
UserReportProjectPO userReportProjectPO = userReportParam.getUserReportProjectPO();
|
||||
userReportProjectPO.setId(userReportPO.getId());
|
||||
userReportProjectPO.setState(DataStateEnum.ENABLE.getCode());
|
||||
userReportProjectPOService.saveOrUpdate(userReportProjectPO);
|
||||
userReportProjectPOService.updateById(userReportProjectPO);
|
||||
} else if (
|
||||
CollectionUtil.newArrayList(
|
||||
UserNatureEnum.BUILD_NON_LINEAR_LOAD.getCode(),
|
||||
@@ -259,7 +261,8 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
List<String> colleaguesIds = userFeignClient.getColleaguesIdByUserId(RequestUtil.getUserIndex()).getData();
|
||||
|
||||
userReportVOQueryWrapper.in("supervision_user_report.create_by", colleaguesIds)
|
||||
.eq("supervision_user_report.state", DataStateEnum.ENABLE.getCode());
|
||||
.eq("supervision_user_report.state", DataStateEnum.ENABLE.getCode())
|
||||
.eq("supervision_user_report.data_type",0);
|
||||
if (Objects.nonNull(userReportQueryParam)) {
|
||||
if (StrUtil.isNotBlank(userReportQueryParam.getCity())) {
|
||||
//查询所有区域下的数据
|
||||
@@ -341,6 +344,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
|
||||
List<UserReportPO> list = this.lambdaQuery()
|
||||
.eq(UserReportPO::getStatus, 2)
|
||||
.eq(UserReportPO::getDataType,0)
|
||||
.in(CollectionUtil.isNotEmpty(data), UserReportPO::getOrgId, data)
|
||||
.list();
|
||||
List<UserReportVO> collect = list.stream().map(temp -> {
|
||||
|
||||
Reference in New Issue
Block a user