|
@@ -2,15 +2,12 @@ package com.ims.eval.controller;
|
|
|
|
|
|
import cn.hutool.core.convert.Convert;
|
|
import cn.hutool.core.convert.Convert;
|
|
import cn.hutool.core.util.IdUtil;
|
|
import cn.hutool.core.util.IdUtil;
|
|
-import cn.hutool.core.util.ObjectUtil;
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.ims.common.utils.StringUtils;
|
|
import com.ims.common.utils.StringUtils;
|
|
import com.ims.eval.config.CustomException;
|
|
import com.ims.eval.config.CustomException;
|
|
import com.ims.eval.entity.EvaluationNotice;
|
|
import com.ims.eval.entity.EvaluationNotice;
|
|
-import com.ims.eval.entity.OrganizationStructure;
|
|
|
|
import com.ims.eval.entity.dto.result.R;
|
|
import com.ims.eval.entity.dto.result.R;
|
|
import com.ims.eval.service.IEvaluationNoticeService;
|
|
import com.ims.eval.service.IEvaluationNoticeService;
|
|
-import com.ims.eval.service.IOrganizationStructureService;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
@@ -36,9 +33,6 @@ public class NoticeManagementController {
|
|
private IEvaluationNoticeService evaluationNoticeService;
|
|
private IEvaluationNoticeService evaluationNoticeService;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
- private IOrganizationStructureService organizationStructureService;
|
|
|
|
-
|
|
|
|
- @Autowired
|
|
|
|
HttpServletRequest request;
|
|
HttpServletRequest request;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -55,25 +49,6 @@ public class NoticeManagementController {
|
|
@RequestParam(value = "pageSize") Integer pageSize,
|
|
@RequestParam(value = "pageSize") Integer pageSize,
|
|
@RequestParam(value = "noticeTitle", required = false) String noticeTitle) {
|
|
@RequestParam(value = "noticeTitle", required = false) String noticeTitle) {
|
|
IPage<EvaluationNotice> list = evaluationNoticeService.listPage(pageNum, pageSize, noticeTitle);
|
|
IPage<EvaluationNotice> list = evaluationNoticeService.listPage(pageNum, pageSize, noticeTitle);
|
|
- List<EvaluationNotice> evaluationNoticeList = list.getRecords();
|
|
|
|
- for (EvaluationNotice obj : evaluationNoticeList) {
|
|
|
|
- if (!"".equals(obj.getSendToContent()) && null != obj.getSendToContent()) {
|
|
|
|
- StringBuilder names = new StringBuilder();
|
|
|
|
- String[] strings = obj.getSendToContent().split(",");
|
|
|
|
- for (String str : strings) {
|
|
|
|
- List<OrganizationStructure> deptList = organizationStructureService.getTree("23031001", 1, "140");
|
|
|
|
- if (deptList.size() > 0) {
|
|
|
|
- OrganizationStructure organizationStructure = deptList.stream().filter(item -> item.getId().equals(str)).findFirst().orElse(null);
|
|
|
|
- if (ObjectUtil.isNotNull(organizationStructure)) {
|
|
|
|
- names.append(organizationStructure.getName()).append(",");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (names.toString().length() > 0){
|
|
|
|
- obj.setDeptNames(names.toString().substring(0, names.toString().length() - 1));
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
return R.ok().data(list);
|
|
return R.ok().data(list);
|
|
}
|
|
}
|
|
|
|
|