|
@@ -1,46 +1,25 @@
|
|
package com.ims.eval.controller;
|
|
package com.ims.eval.controller;
|
|
|
|
|
|
import cn.hutool.core.convert.Convert;
|
|
import cn.hutool.core.convert.Convert;
|
|
-import cn.hutool.core.date.DateUtil;
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
import cn.hutool.core.util.IdUtil;
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
-import cn.hutool.json.JSONArray;
|
|
|
|
-import cn.hutool.json.JSONUtil;
|
|
|
|
-import com.alibaba.fastjson.JSON;
|
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
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.config.ImaConfig;
|
|
|
|
import com.ims.eval.entity.EvaluationNotice;
|
|
import com.ims.eval.entity.EvaluationNotice;
|
|
import com.ims.eval.entity.OrganizationStructure;
|
|
import com.ims.eval.entity.OrganizationStructure;
|
|
-import com.ims.eval.entity.custom.Path;
|
|
|
|
import com.ims.eval.entity.dto.result.R;
|
|
import com.ims.eval.entity.dto.result.R;
|
|
-import com.ims.eval.entity.dto.result.ResultInfo;
|
|
|
|
import com.ims.eval.service.IEvaluationNoticeService;
|
|
import com.ims.eval.service.IEvaluationNoticeService;
|
|
import com.ims.eval.service.IOrganizationStructureService;
|
|
import com.ims.eval.service.IOrganizationStructureService;
|
|
-import com.ims.eval.util.FileUploadUtil;
|
|
|
|
-import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
-import org.springframework.core.io.FileSystemResource;
|
|
|
|
-import org.springframework.core.io.InputStreamResource;
|
|
|
|
-import org.springframework.http.*;
|
|
|
|
-import org.springframework.util.FileCopyUtils;
|
|
|
|
-import org.springframework.util.LinkedMultiValueMap;
|
|
|
|
-import org.springframework.util.MultiValueMap;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
-import org.springframework.web.client.RestTemplate;
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
-import java.io.File;
|
|
|
|
-import java.io.FileOutputStream;
|
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
-import java.io.InputStream;
|
|
|
|
-import java.net.InetAddress;
|
|
|
|
-import java.net.UnknownHostException;
|
|
|
|
-import java.util.*;
|
|
|
|
|
|
+import java.util.Arrays;
|
|
|
|
+import java.util.Date;
|
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 通告管理
|
|
* 通告管理
|
|
@@ -78,8 +57,8 @@ public class NoticeManagementController {
|
|
IPage<EvaluationNotice> list = evaluationNoticeService.listPage(pageNum, pageSize, noticeTitle);
|
|
IPage<EvaluationNotice> list = evaluationNoticeService.listPage(pageNum, pageSize, noticeTitle);
|
|
List<EvaluationNotice> evaluationNoticeList = list.getRecords();
|
|
List<EvaluationNotice> evaluationNoticeList = list.getRecords();
|
|
for (EvaluationNotice obj : evaluationNoticeList) {
|
|
for (EvaluationNotice obj : evaluationNoticeList) {
|
|
- StringBuilder names = new StringBuilder();
|
|
|
|
if (!"".equals(obj.getSendToContent()) && null != obj.getSendToContent()) {
|
|
if (!"".equals(obj.getSendToContent()) && null != obj.getSendToContent()) {
|
|
|
|
+ StringBuilder names = new StringBuilder();
|
|
String[] strings = obj.getSendToContent().split(",");
|
|
String[] strings = obj.getSendToContent().split(",");
|
|
for (String str : strings) {
|
|
for (String str : strings) {
|
|
List<OrganizationStructure> deptList = organizationStructureService.getTree("23031001", 1, "140");
|
|
List<OrganizationStructure> deptList = organizationStructureService.getTree("23031001", 1, "140");
|
|
@@ -90,7 +69,9 @@ public class NoticeManagementController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- obj.setDeptNames(names.toString().substring(0, names.toString().length() - 1));
|
|
|
|
|
|
+ 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);
|