Selaa lähdekoodia

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluatioinScoreCountServiceImpl.java
wangchangsheng 1 vuosi sitten
vanhempi
commit
84f8ea5a83
20 muutettua tiedostoa jossa 315 lisäystä ja 128 poistoa
  1. 1 1
      ims-service/ims-eval/src/main/java/com/ims/eval/config/permission/PermissionAspect.java
  2. 46 27
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/DepartmentalPerformanceIndicatorAssessmentController.java
  3. 0 20
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/EvaluationWarningInfoController.java
  4. 20 1
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/EvaluationWarningRuleController.java
  5. 115 8
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/NoticeManagementController.java
  6. 3 0
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/EvaluationWarningRuleMapper.java
  7. 4 1
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/BinSection.java
  8. 5 6
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/EvaluationNotice.java
  9. 10 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/EvaluationPortal.java
  10. 4 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/EvaluationPortalAttach.java
  11. 1 1
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/custom/Path.java
  12. 9 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IEvaluationWarningRuleService.java
  13. 7 23
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluatioinScoreCountServiceImpl.java
  14. 13 17
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluationNoticeServiceImpl.java
  15. 7 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluationWarningRuleServiceImpl.java
  16. 1 15
      ims-service/ims-eval/src/main/java/com/ims/eval/util/FileUploadUtil.java
  17. 56 0
      ims-service/ims-eval/src/main/resources/mappers/EvaluateWarningRuleMapper.xml.xml
  18. 2 6
      ims-service/ims-eval/src/main/resources/mappers/EvaluationNoticeMapper.xml
  19. 8 1
      ims-service/ims-eval/src/main/resources/mappers/EvaluationPortalMapper.xml
  20. 3 1
      ims-service/ims-eval/src/main/resources/mappers/EvaluationScoreCountMapper.xml

+ 1 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/config/permission/PermissionAspect.java

@@ -212,7 +212,7 @@ public class PermissionAspect implements Interceptor {
 
 	@Cacheable(value = "user_code")
 	private MyuserResDTO getSysUser(String code) {
-		if (StringUtils.isBlank(code)){
+		if (StringUtils.isBlank(code) || code.toLowerCase().equals("null")){
 			return null;
 		}
 		JSONObject json = serviceBuilder.getGatewayUrl().getSysUser(code);

+ 46 - 27
ims-service/ims-eval/src/main/java/com/ims/eval/controller/DepartmentalPerformanceIndicatorAssessmentController.java

@@ -1,5 +1,8 @@
 package com.ims.eval.controller;
 
+import cn.hutool.core.io.IoUtil;
+import cn.hutool.core.util.RandomUtil;
+import cn.hutool.poi.word.Word07Writer;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.ims.eval.config.CustomException;
 import com.ims.eval.entity.EvaluationDept;
@@ -11,6 +14,7 @@ import com.ims.eval.entity.dto.result.R;
 import com.ims.eval.service.IEvaluationDeptBusinessAssessmentService;
 import com.ims.eval.service.IEvaluationDeptBusinessContentService;
 import com.ims.eval.util.WordUtil;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -29,6 +33,7 @@ import java.util.*;
  * @date 2023/4/28 10:09
  * 文件说明:
  */
+@Slf4j
 @RestController
 @RequestMapping("//evaluation-dept-assessment")
 public class DepartmentalPerformanceIndicatorAssessmentController {
@@ -103,37 +108,51 @@ public class DepartmentalPerformanceIndicatorAssessmentController {
 	/**
 	 * 下载报表
 	 *
-	 * @param request
-	 * @param response
-	 * @param reportName
-	 * @throws IOException
+	 * @param request request
+	 * @param response response
+	 * @param reportName 文件名
+	 * @throws IOException 异常
 	 */
 	@GetMapping(value = "/downloadReport/{reportName}")
 	public void downloadReport(HttpServletRequest request, HttpServletResponse response, @PathVariable("reportName") String reportName) throws IOException {
-		InputStream inputStream = null;
-		ServletOutputStream outputStream = null;
-		try {
-			File file = new File(Path.getStatementPath() + reportName);
-			inputStream = Files.newInputStream(file.toPath());
-			response.setCharacterEncoding("UTF-8");
-			response.setContentType("application/msword");
-			response.addHeader("Access-Control-Allow-Origin", request.getHeader("Origin"));
-			response.addHeader("Access-Control-Expose-Headers", "token, uid, Content-Disposition");
-			response.addHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE");
-			response.addHeader("Access-Control-Allow-Headers", "Content-Type");
-			response.addHeader("Access-Control-Allow-Credentials", "true");
-			// 设置浏览器以下载的方式处理该文件名
-			response.setHeader("Content-Disposition", "attachment;filename=".concat(String.valueOf(URLEncoder.encode(reportName, "UTF-8"))));
-			outputStream = response.getOutputStream();
-			byte[] buffer = new byte[512];  // 缓冲区
-			int bytesToRead = -1;
-			// 通过循环将读入的Word文件的内容输出到浏览器中
-			while ((bytesToRead = inputStream.read(buffer)) != -1) {
-				outputStream.write(buffer, 0, bytesToRead);
+		//设置文件路径
+		File file = new File(Path.getStatementPath() + reportName);
+		//判断文件是否存在
+		if (file.exists()) {
+			//设置强制下载不打开
+			response.setContentType("application/force-download");
+			//设置文件名
+			response.addHeader("Content-Disposition", "attachment;fileName=".concat(String.valueOf(URLEncoder.encode(reportName, "UTF-8"))));
+			byte[] buffer = new byte[1024];
+			FileInputStream fis = null;
+			BufferedInputStream bis = null;
+			try {
+				fis = new FileInputStream(file);
+				bis = new BufferedInputStream(fis);
+				OutputStream os = response.getOutputStream();
+				int i = bis.read(buffer);
+				while (i != -1) {
+					os.write(buffer, 0, i);
+					i = bis.read(buffer);
+				}
+			} catch (Exception e) {
+				e.printStackTrace();
+			} finally {
+				if (bis != null) {
+					try {
+						bis.close();
+					} catch (IOException e) {
+						e.printStackTrace();
+					}
+				}
+				if (fis != null) {
+					try {
+						fis.close();
+					} catch (IOException e) {
+						e.printStackTrace();
+					}
+				}
 			}
-		} finally {
-			if (inputStream != null) inputStream.close();
-			if (outputStream != null) outputStream.close();
 		}
 	}
 

+ 0 - 20
ims-service/ims-eval/src/main/java/com/ims/eval/controller/EvaluationWarningInfoController.java

@@ -1,20 +0,0 @@
-package com.ims.eval.controller;
-
-
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * <p>
- *  前端控制器
- * </p>
- *
- * @author wang
- * @since 2023-05-19
- */
-@RestController
-@RequestMapping("//evaluation-warning-info")
-public class EvaluationWarningInfoController {
-
-}

+ 20 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/controller/EvaluationWarningRuleController.java

@@ -1,10 +1,18 @@
 package com.ims.eval.controller;
 
 
+import com.ims.eval.entity.dto.result.R;
+import com.ims.eval.service.IEvaluationWarningRuleService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.Map;
+
 /**
  * <p>
  *  前端控制器
@@ -14,7 +22,18 @@ import org.springframework.web.bind.annotation.RestController;
  * @since 2023-05-19
  */
 @RestController
-@RequestMapping("//evaluation-warning-rule")
+@RequestMapping("//evaluation/warning/rule")
 public class EvaluationWarningRuleController {
 
+	@Autowired
+	private IEvaluationWarningRuleService warningRuleService;
+
+	@ApiOperation(value = "考评预警规则")
+	@GetMapping(value = "list")
+	public R EvaluationWarningRuleList(
+		@RequestParam(value = "binSection", required = false) String binSection, //业务板块
+		@RequestParam(value = "ruleName", required = false) String ruleName) { //业务阶段
+		Map<String, Object> map = warningRuleService.warningRuleList(binSection, ruleName);
+		return R.ok().data(map);
+	}
 }

+ 115 - 8
ims-service/ims-eval/src/main/java/com/ims/eval/controller/NoticeManagementController.java

@@ -2,15 +2,19 @@ package com.ims.eval.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.ims.eval.config.CustomException;
-import com.ims.eval.entity.EvaluationDeptRating;
+import com.ims.eval.entity.DataDictionary;
 import com.ims.eval.entity.EvaluationNotice;
+import com.ims.eval.entity.custom.Path;
 import com.ims.eval.entity.dto.result.R;
+import com.ims.eval.service.IDataDictionaryService;
 import com.ims.eval.service.IEvaluationNoticeService;
+import com.ims.eval.util.FileUploadUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.io.File;
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.List;
@@ -30,6 +34,9 @@ public class NoticeManagementController {
 	@Autowired
 	private IEvaluationNoticeService evaluationNoticeService;
 
+	@Autowired
+	private IDataDictionaryService dataDictionaryService;
+
 	/**
 	 * 通告管理列表信息(分页)
 	 *
@@ -44,6 +51,18 @@ public class NoticeManagementController {
 		@RequestParam(value = "pageSize") Integer pageSize,
 		@RequestParam(value = "noticeTitle", required = false) String noticeTitle) {
 		IPage<EvaluationNotice> list = evaluationNoticeService.listPage(pageNum, pageSize, noticeTitle);
+		List<EvaluationNotice> evaluationNoticeList = list.getRecords();
+		for (EvaluationNotice obj : evaluationNoticeList) {
+			StringBuilder names = new StringBuilder();
+			if (!"".equals(obj.getSendToContent()) && null != obj.getSendToContent()) {
+				String[] strings = obj.getSendToContent().split(",");
+				for (String str : strings) {
+					DataDictionary dataDictionary = dataDictionaryService.getById(str);
+					names.append(dataDictionary.getKeyName()).append(",");
+				}
+				obj.setDeptNames(names.toString().substring(0, names.toString().length() - 1));
+			}
+		}
 		return R.ok().data(list);
 	}
 
@@ -65,7 +84,7 @@ public class NoticeManagementController {
 	 * @return 结果
 	 */
 	@PostMapping(value = "/save")
-	public R addAll(EvaluationNotice evaluationNotice, @RequestParam(value ="files", required = false) MultipartFile[] files) throws IOException {
+	public R addAll(EvaluationNotice evaluationNotice, @RequestParam(value = "files", required = false) MultipartFile[] files) throws IOException {
 		try {
 			boolean b = evaluationNoticeService.saveOrUpdate(evaluationNotice, files);
 			if (b) {
@@ -96,15 +115,15 @@ public class NoticeManagementController {
 	}
 
 	/**
-	 * 发布通告
+	 * 修改状态
 	 *
 	 * @param id           主键
-	 * @param releaseState 发布状态
+	 * @param releaseState 状态(未发布或已发布)
 	 * @return 结果
 	 */
-	@PostMapping(value = "/issueNotice")
-	public R issueNotice(@RequestParam(value = "id") String id,
-						 @RequestParam(value = "releaseState") String releaseState) {
+	@PostMapping(value = "/modifiedState")
+	public R modifiedState(@RequestParam(value = "id") String id,
+						   @RequestParam(value = "releaseState") String releaseState) {
 		EvaluationNotice evaluationNotice = new EvaluationNotice();
 		evaluationNotice.setId(id);
 		evaluationNotice.setReleaseState(releaseState);
@@ -112,7 +131,95 @@ public class NoticeManagementController {
 		if (b) {
 			return R.ok().data(b);
 		} else {
-			return R.error().data("发布失败!");
+			return R.error().data("失败!");
+		}
+	}
+
+	/**
+	 * 上传附件
+	 *
+	 * @param id    主键
+	 * @param files 附件集
+	 * @return 结果
+	 * @throws IOException 异常
+	 */
+	@PostMapping(value = "/uploadAttachment")
+	public R uploadAttachment(@RequestParam(value = "id") String id, @RequestParam(value = "files", required = false) MultipartFile[] files) throws IOException {
+		try {
+			boolean b = false;
+			EvaluationNotice evaluationNotice = evaluationNoticeService.getById(id);
+			StringBuilder fileNames = new StringBuilder();
+			if (files.length > 0) {
+				for (MultipartFile file : files) {
+					// 上传文件路径
+					String filePath = Path.getNoticePath();
+					// 上传并返回新文件名称
+					String fileName = null;
+					fileName = FileUploadUtil.upload(filePath, file);
+					fileNames.append(fileName).append(",");
+				}
+				String noticeAnnex = evaluationNotice.getNoticeAnnex() + "," + fileNames.toString().substring(0, fileNames.toString().length() - 1);
+				evaluationNotice.setNoticeAnnex(noticeAnnex);
+				b = evaluationNoticeService.updateById(evaluationNotice);
+			}
+			if (b) {
+				return R.ok().data(b);
+			} else {
+				return R.error().data("上传附件失败!");
+			}
+		} catch (CustomException e) {
+			return R.customError(e.getMessage()).data("失败!");
+		}
+	}
+
+	/**
+	 * 删除附件
+	 *
+	 * @param id          主键
+	 * @param noticeAnnex 附件名称
+	 * @return 结果
+	 */
+	@PostMapping(value = "/deleteAttachment")
+	public R deleteAttachment(@RequestParam(value = "id") String id, @RequestParam(value = "noticeAnnex") String noticeAnnex) {
+		try {
+			boolean b;
+			EvaluationNotice evaluationNotice = evaluationNoticeService.getById(id);
+			String[] strings = evaluationNotice.getNoticeAnnex().split(",");
+			StringBuilder fileNames = new StringBuilder();
+			for (String str : strings) {
+				if (str.substring(str.lastIndexOf("/") + 1, str.length()).equals(noticeAnnex)) {
+					String filePath = Path.getStatementPath() + str;
+					File file = new File(filePath);
+					b = file.delete();
+				} else {
+					fileNames.append(str).append(",");
+				}
+			}
+			evaluationNotice.setNoticeAnnex(fileNames.toString().substring(0, fileNames.toString().length() - 1));
+			b = evaluationNoticeService.updateById(evaluationNotice);
+			if (b) {
+				return R.ok().data(b);
+			} else {
+				return R.error().data("删除附件失败!");
+			}
+		} catch (CustomException e) {
+			return R.customError(e.getMessage()).data("失败!");
+		}
+	}
+
+	/**
+	 * 通告展示
+	 *
+	 * @return 结果
+	 */
+	@GetMapping(value = "/deptId")
+	public R circularDisplay(@RequestParam(value = "id") String deptId) {
+		List<EvaluationNotice> evaluationNoticeList = evaluationNoticeService.list();
+		for (EvaluationNotice evaluationNotice : evaluationNoticeList) {
+			if ("All".equals(evaluationNotice.getSendTo())){
+
+			}
 		}
+		return R.ok().data(evaluationNoticeList);
 	}
 }

+ 3 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/dao/EvaluationWarningRuleMapper.java

@@ -3,6 +3,8 @@ package com.ims.eval.dao;
 import com.ims.eval.entity.EvaluationWarningRule;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 
+import java.util.Map;
+
 /**
  * <p>
  *  Mapper 接口
@@ -13,4 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface EvaluationWarningRuleMapper extends BaseMapper<EvaluationWarningRule> {
 
+	Map<String, Object> selectWarningRule(String binSection, String ruleName);
 }

+ 4 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/entity/BinSection.java

@@ -59,5 +59,8 @@ public class BinSection extends Model {
 //	@TableField(exist = false)
 //	private List<BinSection> children;
 
-
+	private String memo1;
+	private String memo2;
+	private String memo3;
+	private String memo4;
 }

+ 5 - 6
ims-service/ims-eval/src/main/java/com/ims/eval/entity/EvaluationNotice.java

@@ -31,12 +31,8 @@ public class EvaluationNotice extends Model {
 	private String sendTo;
 	//个别部门
 	private String sendToContent;
-	//发布部门主键
-	private String releaseDeptId;
-	//发布部门名称
-	private String releaseDeptName;
-	//发布部门编码
-	private String releaseDeptCode;
+	//发布部门
+	private String releaseDept;
 	//发布人
 	private String releasePeople;
 	//发布时间
@@ -55,4 +51,7 @@ public class EvaluationNotice extends Model {
 	private Date updateTime;
 	//更新者
 	private String updateBy;
+	//列表回显部门名称
+	@TableField(exist = false)
+	private String deptNames;
 }

+ 10 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/EvaluationPortal.java

@@ -31,6 +31,10 @@ public class EvaluationPortal extends Model {
      */
     private String binSection;
 
+	private String binStage;
+
+	private String binProperty;
+
     /**
      * 单位名称
      */
@@ -100,4 +104,10 @@ public class EvaluationPortal extends Model {
 	 * 创建时间
 	 */
 	private Date createTime;
+
+
+	private String memo1;
+	private String memo2;
+	private String memo3;
+	private String memo4;
 }

+ 4 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/EvaluationPortalAttach.java

@@ -58,5 +58,9 @@ public class EvaluationPortalAttach extends Model {
      */
     private String standardLowNote;
 
+	private String memo1;
+	private String memo2;
+	private String memo3;
+	private String memo4;
 
 }

+ 1 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/entity/custom/Path.java

@@ -40,6 +40,6 @@ public class Path {
 	 * 获取通告路径
 	 */
 	public static String getNoticePath() {
-		return getPrefix() + "/attachment/";
+		return getPrefix() + "/attachment";
 	}
 }

+ 9 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/IEvaluationWarningRuleService.java

@@ -3,6 +3,8 @@ package com.ims.eval.service;
 import com.ims.eval.entity.EvaluationWarningRule;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.Map;
+
 /**
  * <p>
  *  服务类
@@ -13,4 +15,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IEvaluationWarningRuleService extends IService<EvaluationWarningRule> {
 
+	/**
+	 * 查询考评预警规则
+	 * @param binSection
+	 * @param ruleName
+	 * @return
+	 */
+    Map<String, Object> warningRuleList(String binSection, String ruleName);
 }

+ 7 - 23
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluatioinScoreCountServiceImpl.java

@@ -3,11 +3,17 @@ package com.ims.eval.service.impl;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ims.common.utils.DateUtils;
-import com.ims.common.utils.StringUtils;
+import com.ims.eval.config.CustomException;
+import com.ims.eval.dao.BinSectionMapper;
 import com.ims.eval.dao.EvaluationScoreCountMapper;
+import com.ims.eval.entity.BinSection;
 import com.ims.eval.entity.EvaluationScoreCount;
+import com.ims.eval.service.IBinSectionService;
 import com.ims.eval.service.IEvaluationScoreCountService;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -79,26 +85,4 @@ public class EvaluatioinScoreCountServiceImpl extends ServiceImpl<EvaluationScor
 		result.put("value", value);
 		return result;
 	}
-
-	@Override
-	public List<EvaluationScoreCount> getEvaluationScoreCountList(String organizationEvaluationId, String organizationEvaluationRuleId, String indicatorId) {
-
-
-		QueryWrapper<EvaluationScoreCount> qw = new QueryWrapper();
-
-
-		if (StringUtils.isNotEmpty(organizationEvaluationId)) {
-			qw.lambda().eq(EvaluationScoreCount::getOrganizationEvaluationId,organizationEvaluationId);
-		}
-
-		if (StringUtils.isNotEmpty(organizationEvaluationRuleId)) {
-			qw.lambda().eq(EvaluationScoreCount::getOrganizationEvaluationRuleId,organizationEvaluationRuleId);
-		}
-		if (StringUtils.isNotEmpty(indicatorId)) {
-			qw.lambda().eq(EvaluationScoreCount::getIndicatorId,indicatorId);
-		}
-
-		List<EvaluationScoreCount> list = baseMapper.selectList(qw);
-		return list;
-	}
 }

+ 13 - 17
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluationNoticeServiceImpl.java

@@ -1,18 +1,13 @@
 package com.ims.eval.service.impl;
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ims.common.utils.StringUtils;
 import com.ims.eval.dao.EvaluationNoticeMapper;
-import com.ims.eval.entity.DataDictionary;
 import com.ims.eval.entity.EvaluationNotice;
 import com.ims.eval.entity.custom.Path;
-import com.ims.eval.service.IDataDictionaryService;
 import com.ims.eval.service.IEvaluationNoticeService;
 import com.ims.eval.util.FileUploadUtil;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -27,9 +22,6 @@ import java.util.Date;
 @Service
 public class EvaluationNoticeServiceImpl extends ServiceImpl<EvaluationNoticeMapper, EvaluationNotice> implements IEvaluationNoticeService {
 
-	@Autowired
-	private IDataDictionaryService dataDictionaryService;
-
 	@Override
 	public IPage<EvaluationNotice> listPage(Integer pageNum, Integer pageSize, String noticeTitle) {
 		if (null == pageNum || null == pageSize) {
@@ -43,6 +35,7 @@ public class EvaluationNoticeServiceImpl extends ServiceImpl<EvaluationNoticeMap
 	@Override
 	public boolean saveOrUpdate(EvaluationNotice evaluationNotice, MultipartFile[] files) throws IOException {
 		StringBuilder fileNames = new StringBuilder();
+		String str = "";
 		if (files.length > 0) {
 			for (MultipartFile file : files) {
 				// 上传文件路径
@@ -52,19 +45,22 @@ public class EvaluationNoticeServiceImpl extends ServiceImpl<EvaluationNoticeMap
 				fileName = FileUploadUtil.upload(filePath, file);
 				fileNames.append(fileName).append(",");
 			}
+			str = fileNames.toString().substring(0, fileNames.toString().length() - 1);
 		}
-		if (fileNames.toString().length() > 0) {
-			evaluationNotice.setNoticeAnnex(fileNames.toString().substring(0, fileNames.toString().length() - 1));
-		}
-		DataDictionary dataDictionary = dataDictionaryService.getById(evaluationNotice.getReleaseDeptId());
-		if (null != dataDictionary) {
-			evaluationNotice.setReleaseDeptName(dataDictionary.getKeyName());
-			evaluationNotice.setReleaseDeptCode(dataDictionary.getDataKey());
-		}
-		if ("".equals(evaluationNotice.getId()) || null == evaluationNotice.getId()) {
+		if ("".equals(evaluationNotice.getId()) && null == evaluationNotice.getId()) {
 			evaluationNotice.setCreateTime(new Date());
+			if (str.length() > 0) {
+				evaluationNotice.setNoticeAnnex(str);
+			}
 		} else {
 			evaluationNotice.setUpdateTime(new Date());
+			if (str.length() > 0) {
+				EvaluationNotice obj = super.getById(evaluationNotice.getId());
+				if (!"".equals(obj.getNoticeAnnex()) && null != obj.getNoticeAnnex()) {
+					String noticeAnnex = obj.getNoticeAnnex() + "," + str;
+					evaluationNotice.setNoticeAnnex(noticeAnnex);
+				}
+			}
 		}
 		return super.saveOrUpdate(evaluationNotice);
 	}

+ 7 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluationWarningRuleServiceImpl.java

@@ -6,6 +6,8 @@ import com.ims.eval.service.IEvaluationWarningRuleService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
+import java.util.Map;
+
 /**
  * <p>
  *  服务实现类
@@ -17,4 +19,9 @@ import org.springframework.stereotype.Service;
 @Service
 public class EvaluationWarningRuleServiceImpl extends ServiceImpl<EvaluationWarningRuleMapper, EvaluationWarningRule> implements IEvaluationWarningRuleService {
 
+	@Override
+	public Map<String, Object> warningRuleList(String binSection, String ruleName) {
+		Map<String, Object> map = baseMapper.selectWarningRule(binSection, ruleName);
+		return map;
+	}
 }

+ 1 - 15
ims-service/ims-eval/src/main/java/com/ims/eval/util/FileUploadUtil.java

@@ -94,15 +94,11 @@ public class FileUploadUtil {
 		if (fileNamelength > FileUploadUtil.DEFAULT_FILE_NAME_LENGTH) {
 			throw new FileNameLengthLimitExceededException(FileUploadUtil.DEFAULT_FILE_NAME_LENGTH);
 		}
-
 		assertAllowed(file, allowedExtension);
-
 		String fileName = extractFilename(file);
-
 		File desc = getAbsoluteFile(baseDir, fileName);
 		file.transferTo(desc);
-		String pathFileName = getPathFileName(baseDir, fileName);
-		return pathFileName;
+		return fileName;
 	}
 
 	/**
@@ -118,7 +114,6 @@ public class FileUploadUtil {
 
 	private static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException {
 		File desc = new File(uploadDir + File.separator + fileName);
-
 		if (!desc.exists()) {
 			if (!desc.getParentFile().exists()) {
 				desc.getParentFile().mkdirs();
@@ -127,13 +122,6 @@ public class FileUploadUtil {
 		return desc;
 	}
 
-	private static final String getPathFileName(String uploadDir, String fileName) throws IOException {
-		int dirLastIndex = Path.getPrefix().length() + 1;
-		String currentDir = StringUtils.substring(uploadDir, dirLastIndex);
-		String pathFileName = "/prefix" + "/" + currentDir + "/" + fileName;
-		return pathFileName;
-	}
-
 	/**
 	 * 文件大小校验
 	 *
@@ -148,7 +136,6 @@ public class FileUploadUtil {
 		if (DEFAULT_MAX_SIZE != -1 && size > DEFAULT_MAX_SIZE) {
 			throw new FileSizeLimitExceededException(DEFAULT_MAX_SIZE / 1024 / 1024);
 		}
-
 		String fileName = file.getOriginalFilename();
 		String extension = getExtension(file);
 		if (allowedExtension != null && !isAllowedExtension(extension, allowedExtension)) {
@@ -168,7 +155,6 @@ public class FileUploadUtil {
 				throw new InvalidExtensionException(allowedExtension, extension, fileName);
 			}
 		}
-
 	}
 
 	/**

+ 56 - 0
ims-service/ims-eval/src/main/resources/mappers/EvaluateWarningRuleMapper.xml.xml

@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ims.eval.dao.EvaluationWarningRuleMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.ims.eval.entity.EvaluationWarningRule">
+        <id column="id" property="id" />
+        <result column="bin_section" property="binSection" />
+        <result column="indicator_id" property="binStage" />
+        <result column="indicator_info" property="indicatorInfo" />
+        <result column="bin_stage" property="binStage" />
+        <result column="rule" property="rule" />
+        <result column="grade" property="grade" />
+        <result column="rule_name" property="ruleName" />
+        <result column="rule_des" property="ruleDes" />
+        <result column="create_by" property="createBy" />
+        <result column="update_by" property="updateBy" />
+        <result column="create_time" property="createTime" />
+        <result column="update_time" property="updateTime" />
+        <result column="enable" property="enable" />
+    </resultMap>
+
+
+    <select id="selectWarningRule" resultType="java.util.Map">
+        SELECT
+        er.*,
+
+        FROM
+        evaluation_warning_rule er
+        LEFT JOIN evaluation_portal_attach ea ON ep.id = ea.portal_id
+        LEFT JOIN bin_section bs ON ep.bin_section = bs.section_code
+        <where>
+
+            <if test="binSection !=null and binSection !=''">
+                AND ep.bin_section = #{binSection}
+            </if>
+            <if test="year !=null and year !=''">
+                AND ep.year = #{year}
+            </if>
+
+            <if test="season !=null and season !=''">
+                AND ep.season = #{season}
+            </if>
+
+            <if test="season ==null">
+                AND ep.season is null
+            </if>
+
+        </where>
+
+        ORDER BY SCORE DESC
+
+    </select>
+
+
+</mapper>

+ 2 - 6
ims-service/ims-eval/src/main/resources/mappers/EvaluationNoticeMapper.xml

@@ -10,9 +10,7 @@
         <result column="notice_content" property="noticeContent"/>
         <result column="send_to" property="sendTo"/>
         <result column="send_to_content" property="sendToContent"/>
-        <result column="release_dept_id" property="releaseDeptId"/>
-        <result column="release_dept_name" property="releaseDeptName"/>
-        <result column="release_dept_code" property="releaseDeptCode"/>
+        <result column="release_dept" property="releaseDept"/>
         <result column="release_people" property="releasePeople"/>
         <result column="release_date" property="releaseDate"/>
         <result column="release_state" property="releaseState"/>
@@ -32,9 +30,7 @@
                notice_content,
                send_to,
                send_to_content,
-               release_dept_id,
-               release_dept_name,
-               release_dept_code,
+               release_dept,
                release_people,
                release_date,
                release_state,

+ 8 - 1
ims-service/ims-eval/src/main/resources/mappers/EvaluationPortalMapper.xml

@@ -6,6 +6,8 @@
     <resultMap id="BaseResultMap" type="com.ims.eval.entity.EvaluationPortal">
         <id column="id" property="id" />
         <result column="bin_section" property="binSection" />
+        <result column="bin_stage" property="binStage" />
+        <result column="bin_property" property="binProperty" />
         <result column="company" property="company" />
         <result column="grade" property="grade" />
         <result column="score" property="score" />
@@ -20,11 +22,16 @@
         <result column="standard_low" property="standardLow" />
         <result column="dept_id" property="deptId" />
         <result column="create_time" property="createTime" />
+        <result column="memo1" property="memo1" />
+        <result column="memo2" property="memo2" />
+        <result column="memo3" property="memo3" />
+        <result column="memo4" property="memo4" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, bin_section, company, grade, score, base_score, year, season, matter_heigh, matter_low, manage_heigh, manage_low, standard_heigh, standard_low, dept_id, create_time
+        id, bin_section, bin_stage, bin_property, company, grade, score, base_score, year, season, matter_heigh, matter_low, manage_heigh, manage_low,
+        standard_heigh, standard_low, dept_id, create_time, memo1, memo2, memo3, memo4
     </sql>
 
     <select id="selectPortalList" resultType="java.util.Map">

+ 3 - 1
ims-service/ims-eval/src/main/resources/mappers/EvaluationScoreCountMapper.xml

@@ -47,7 +47,9 @@
         i.indicator_name,
         i.indicator_code,
         i.unit,
-        ei.standard_score
+        ei.standard_score,
+        t.type_name,
+        t.type_code
         FROM
         evaluation_score_count es
         LEFT JOIN indicator i ON es.indicator_id = i.id