1.优化暂降报告
This commit is contained in:
@@ -935,12 +935,12 @@ public class EventReportServiceImpl implements EventReportService {
|
|||||||
//添加detail
|
//添加detail
|
||||||
for (EventDetail detail : info) {
|
for (EventDetail detail : info) {
|
||||||
for (DictData data : reasonData) {
|
for (DictData data : reasonData) {
|
||||||
if (detail.getAdvanceReason().equals(data.getId())) {
|
if (data.getId().equals(detail.getAdvanceReason())) {
|
||||||
detail.setAdvanceReason(data.getName());
|
detail.setAdvanceReason(data.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (DictData data : typeData) {
|
for (DictData data : typeData) {
|
||||||
if (detail.getAdvanceType().equals(data.getId())) {
|
if (data.getId().equals(detail.getAdvanceType())) {
|
||||||
detail.setAdvanceType(data.getName());
|
detail.setAdvanceType(data.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -961,13 +961,13 @@ public class EventReportServiceImpl implements EventReportService {
|
|||||||
for (EventDetail detail : info) {
|
for (EventDetail detail : info) {
|
||||||
for (DictData data : reasonData) {
|
for (DictData data : reasonData) {
|
||||||
reasonMap.put(data.getName(), 0);
|
reasonMap.put(data.getName(), 0);
|
||||||
if (detail.getAdvanceReason().equals(data.getId())) {
|
if (data.getId().equals(detail.getAdvanceReason())) {
|
||||||
detail.setAdvanceReason(data.getName());
|
detail.setAdvanceReason(data.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (DictData data : typeData) {
|
for (DictData data : typeData) {
|
||||||
typeMap.put(data.getName(), 0);
|
typeMap.put(data.getName(), 0);
|
||||||
if (detail.getAdvanceType().equals(data.getId())) {
|
if (data.getId().equals(detail.getAdvanceType())) {
|
||||||
detail.setAdvanceType(data.getName());
|
detail.setAdvanceType(data.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.system.controller;
|
package com.njcn.system.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
import com.njcn.common.pojo.constant.OperateType;
|
import com.njcn.common.pojo.constant.OperateType;
|
||||||
@@ -22,6 +23,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -165,10 +167,13 @@ public class EventTemplateController extends BaseController{
|
|||||||
@PostMapping("/selectReleation")
|
@PostMapping("/selectReleation")
|
||||||
@ApiOperation("根据模板id查询关系")
|
@ApiOperation("根据模板id查询关系")
|
||||||
@ApiImplicitParam(name = "id", value = "角色索引", required = true)
|
@ApiImplicitParam(name = "id", value = "角色索引", required = true)
|
||||||
public HttpResult<List<EventReportDictVO>> selectRelation(@RequestParam @Validated String id) {
|
public HttpResult<List<EventReportDictVO>> selectRelation(@RequestParam(required = false,name = "id") String id) {
|
||||||
String methodDescribe = getMethodDescribe("selectRelation");
|
String methodDescribe = getMethodDescribe("selectRelation");
|
||||||
LogUtil.njcnDebug(log, "{},查询数据为:{}", methodDescribe, id);
|
LogUtil.njcnDebug(log, "{},查询数据为:{}", methodDescribe, id);
|
||||||
List<EventReportDictVO> res = iEventTemplateService.selectRelation(id);
|
List<EventReportDictVO> res = new ArrayList<>();
|
||||||
|
if (StrUtil.isNotBlank(id)) {
|
||||||
|
res.addAll(iEventTemplateService.selectRelation(id)) ;
|
||||||
|
}
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user