Browse Source

修改问题

hlf 1 năm trước cách đây
mục cha
commit
41dfb48378

+ 21 - 21
ims-service/ims-eval/src/main/java/com/ims/eval/controller/DepartmentPerformanceAppraisalRatingController.java

@@ -1,16 +1,15 @@
 package com.ims.eval.controller;
 
 import cn.hutool.core.date.DateUtil;
-import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.ims.common.utils.StringUtils;
 import com.ims.eval.config.CustomException;
-import com.ims.eval.entity.DataDictionary;
 import com.ims.eval.entity.EvaluationDeptRating;
+import com.ims.eval.entity.OrganizationStructure;
 import com.ims.eval.entity.dto.result.R;
-import com.ims.eval.service.IDataDictionaryService;
 import com.ims.eval.service.IEvaluationDeptRatingService;
+import com.ims.eval.service.IOrganizationStructureService;
 import com.ims.eval.util.ExcelUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -38,7 +37,7 @@ public class DepartmentPerformanceAppraisalRatingController {
 	private IEvaluationDeptRatingService evaluationDeptRatingService;
 
 	@Autowired
-	private IDataDictionaryService dataDictionaryService;
+	private IOrganizationStructureService organizationStructureService;
 
 	/**
 	 * 部门绩效考核评级列表信息(分页)
@@ -84,7 +83,7 @@ public class DepartmentPerformanceAppraisalRatingController {
 			if (b) {
 				return R.ok().data(b);
 			} else {
-				return R.error().data("保存失败!");
+				return R.customError("保存失败!");
 			}
 		} catch (CustomException e) {
 			return R.customError(e.getMessage()).data("失败!");
@@ -99,12 +98,16 @@ public class DepartmentPerformanceAppraisalRatingController {
 	 */
 	@PostMapping(value = "/removeAll/{ids}")
 	public R deleteAll(@PathVariable("ids") String ids) {
-		String[] strings = ids.split(",");
-		boolean b = evaluationDeptRatingService.removeByIds(Arrays.asList(strings));
-		if (b) {
-			return R.ok().data(b);
-		} else {
-			return R.error().data("删除失败!");
+		try {
+			String[] strings = ids.split(",");
+			boolean b = evaluationDeptRatingService.removeByIds(Arrays.asList(strings));
+			if (b) {
+				return R.ok().data(b);
+			} else {
+				return R.customError("删除失败!");
+			}
+		} catch (CustomException e) {
+			return R.customError(e.getMessage()).data("失败!");
 		}
 	}
 
@@ -133,13 +136,10 @@ public class DepartmentPerformanceAppraisalRatingController {
 				for (String[] str : strings) {
 					EvaluationDeptRating evaluationDeptRating = new EvaluationDeptRating();
 					evaluationDeptRating.setId(str[0]);
-					QueryWrapper<DataDictionary> qw = new QueryWrapper<>();
-					if (StringUtils.isNotEmpty(str[1])) {
-						qw.lambda().eq(DataDictionary::getKeyName, str[1]);
-					}
-					DataDictionary dataDictionary = dataDictionaryService.getOne(qw);
-					if (null != dataDictionary) {
-						evaluationDeptRating.setDeptId(dataDictionary.getId());
+					List<OrganizationStructure> organizationStructureList = organizationStructureService.getTree("23031001", 1, "140");
+					OrganizationStructure organizationStructure = organizationStructureList.get(0).getChildren().stream().filter(item -> item.getName().equals(str[1])).findFirst().orElse(null);
+					if (null != organizationStructure) {
+						evaluationDeptRating.setDeptId(organizationStructure.getId());
 					}
 					evaluationDeptRating.setDeptName(str[1]);
 					evaluationDeptRating.setAnnual(str[2]);
@@ -182,8 +182,8 @@ public class DepartmentPerformanceAppraisalRatingController {
 						if (StringUtils.isNotEmpty(evaluationDeptRating.getAnnual())) {
 							qw1.lambda().eq(EvaluationDeptRating::getAnnual, evaluationDeptRating.getAnnual());
 						}
-						EvaluationDeptRating deptRating = evaluationDeptRatingService.getOne(qw1);
-						if (ObjectUtil.isNull(deptRating)) {
+						List<EvaluationDeptRating> objList = evaluationDeptRatingService.list(qw1);
+						if (objList.size() == 0) {
 							evaluationDeptRatingList.add(evaluationDeptRating);
 						}
 					} else {
@@ -194,7 +194,7 @@ public class DepartmentPerformanceAppraisalRatingController {
 				if (b) {
 					return R.ok().data(b);
 				} else {
-					return R.error().data("保存失败!");
+					return R.customError("导入失败!");
 				}
 			} catch (Exception e) {
 				log.error("错误", e);

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

@@ -171,7 +171,7 @@ public class DepartmentalPerformanceIndicatorAssessmentController {
 			if (b) {
 				return R.ok().data(b);
 			} else {
-				return R.error().data("失败!");
+				return R.customError("失败!");
 			}
 		} catch (CustomException e) {
 			return R.customError(e.getMessage()).data("失败!");

+ 25 - 29
ims-service/ims-eval/src/main/java/com/ims/eval/controller/DepartmentalPerformanceIndicatorPlanController.java

@@ -1,6 +1,5 @@
 package com.ims.eval.controller;
 
-import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -97,7 +96,7 @@ public class DepartmentalPerformanceIndicatorPlanController {
 			if (b) {
 				return R.ok().data(b);
 			} else {
-				return R.error().data("保存失败!");
+				return R.customError("保存失败!");
 			}
 		} catch (CustomException e) {
 			return R.customError(e.getMessage()).data("失败!");
@@ -117,7 +116,7 @@ public class DepartmentalPerformanceIndicatorPlanController {
 			if (b) {
 				return R.ok().data(b);
 			} else {
-				return R.error().data("修改失败!");
+				return R.customError("修改失败!");
 			}
 		} catch (CustomException e) {
 			return R.customError(e.getMessage()).data("失败!");
@@ -132,12 +131,16 @@ public class DepartmentalPerformanceIndicatorPlanController {
 	 */
 	@PostMapping(value = "/removeAll/{ids}")
 	public R deleteAll(@PathVariable("ids") String ids) {
-		String[] strings = ids.split(",");
-		boolean b = evaluationDeptBusinessPlanService.removeByIds(Arrays.asList(strings));
-		if (b) {
-			return R.ok().data(b);
-		} else {
-			return R.error().data("删除失败!");
+		try {
+			String[] strings = ids.split(",");
+			boolean b = evaluationDeptBusinessPlanService.removeByIds(Arrays.asList(strings));
+			if (b) {
+				return R.ok().data(b);
+			} else {
+				return R.customError("删除失败!");
+			}
+		} catch (CustomException e) {
+			return R.customError(e.getMessage()).data("失败!");
 		}
 	}
 
@@ -178,7 +181,7 @@ public class DepartmentalPerformanceIndicatorPlanController {
 			if (b) {
 				return R.ok().data(b);
 			} else {
-				return R.error().data("修改失败!");
+				return R.customError("新增/修改失败!");
 			}
 		} catch (CustomException e) {
 			return R.customError(e.getMessage()).data("失败!");
@@ -192,7 +195,7 @@ public class DepartmentalPerformanceIndicatorPlanController {
 	 * @return 结果
 	 */
 	@PostMapping(value = "/import")
-	public R importData(@RequestParam("file") MultipartFile file) {
+	public R importData(@RequestParam("file") MultipartFile file, @RequestParam("id") String id) {
 		if (!file.isEmpty()) {
 			try {
 				//获取原始的文件名
@@ -209,29 +212,22 @@ public class DepartmentalPerformanceIndicatorPlanController {
 				//遍历Excel表每一行的数据
 				for (String[] str : strings) {
 					EvaluationDeptBusinessContent evaluationDeptBusinessContent = new EvaluationDeptBusinessContent();
-					evaluationDeptBusinessContent.setId(str[0]);
-					evaluationDeptBusinessContent.setBusinessPlanId(str[1]);
-					evaluationDeptBusinessContent.setDeptId(str[2]);
-					evaluationDeptBusinessContent.setDeptName(str[3]);
-					evaluationDeptBusinessContent.setDeptCode(str[4]);
-					evaluationDeptBusinessContent.setSerialNumber(str[5]);
-					evaluationDeptBusinessContent.setTargetName(str[6]);
-					evaluationDeptBusinessContent.setTargetValue(str[7]);
-					evaluationDeptBusinessContent.setBaseScore(str[8]);
-					evaluationDeptBusinessContent.setEvaluationCriteria(str[9]);
+					evaluationDeptBusinessContent.setBusinessPlanId(id);
+					evaluationDeptBusinessContent.setDeptId(str[0]);
+					evaluationDeptBusinessContent.setDeptName(str[1]);
+					evaluationDeptBusinessContent.setSerialNumber(str[2]);
+					evaluationDeptBusinessContent.setTargetName(str[3]);
+					evaluationDeptBusinessContent.setTargetValue(str[4]);
+					evaluationDeptBusinessContent.setEvaluationCriteria(str[5]);
+					evaluationDeptBusinessContent.setBaseScore(str[6]);
 					evaluationDeptBusinessContent.setAuditStatus("-1");
-					if (null == str[0] || "".equals(str[0])) {
-						evaluationDeptBusinessContent.setCreateTime(DateUtil.date());
-					} else {
-						evaluationDeptBusinessContent.setUpdateTime(DateUtil.date());
-					}
 					evaluationDeptBusinessContentList.add(evaluationDeptBusinessContent);
 				}
-				boolean b = evaluationDeptBusinessContentService.saveOrUpdateBatch(evaluationDeptBusinessContentList);
+				boolean b = evaluationDeptBusinessContentService.importDataList(evaluationDeptBusinessContentList);
 				if (b) {
 					return R.ok().data(b);
 				} else {
-					return R.error().data("保存失败!");
+					return R.customError("导入失败!");
 				}
 			} catch (Exception e) {
 				log.error("错误", e);
@@ -258,7 +254,7 @@ public class DepartmentalPerformanceIndicatorPlanController {
 			if (b) {
 				return R.ok().data(b);
 			} else {
-				return R.error().data("失败!");
+				return R.customError("失败!");
 			}
 		} catch (CustomException e) {
 			return R.customError(e.getMessage()).data("失败!");

+ 42 - 24
ims-service/ims-eval/src/main/java/com/ims/eval/controller/DeptAssessmentDeclarationController.java

@@ -103,7 +103,7 @@ public class DeptAssessmentDeclarationController {
 			if (b) {
 				return R.ok().data(b);
 			} else {
-				return R.error().data("保存失败!");
+				return R.customError("保存失败!");
 			}
 		} catch (CustomException e) {
 			return R.customError(e.getMessage()).data("失败!");
@@ -123,7 +123,7 @@ public class DeptAssessmentDeclarationController {
 			if (b) {
 				return R.ok().data(b);
 			} else {
-				return R.error().data("修改失败!");
+				return R.customError("修改失败!");
 			}
 		} catch (CustomException e) {
 			return R.customError(e.getMessage()).data("失败!");
@@ -138,12 +138,16 @@ public class DeptAssessmentDeclarationController {
 	 */
 	@PostMapping(value = "/removeAll/{ids}")
 	public R deleteAll(@PathVariable("ids") String ids) {
-		String[] strings = ids.split(",");
-		boolean b = deptAssessmentDeclarationService.removeByIds(Arrays.asList(strings));
-		if (b) {
-			return R.ok().data(b);
-		} else {
-			return R.error().data("删除失败!");
+		try {
+			String[] strings = ids.split(",");
+			boolean b = deptAssessmentDeclarationService.removeByIds(Arrays.asList(strings));
+			if (b) {
+				return R.ok().data(b);
+			} else {
+				return R.customError("删除失败!");
+			}
+		} catch (CustomException e) {
+			return R.customError(e.getMessage()).data("失败!");
 		}
 	}
 
@@ -184,7 +188,27 @@ public class DeptAssessmentDeclarationController {
 			if (b) {
 				return R.ok().data(b);
 			} else {
-				return R.ok().data("人员已重复!");
+				return R.customError("新增/修改失败或人员已重复!");
+			}
+		} catch (CustomException e) {
+			return R.customError(e.getMessage()).data("失败!");
+		}
+	}
+
+	/**
+	 * 详情-删除
+	 *
+	 * @param id 主键
+	 * @return 结果
+	 */
+	@GetMapping(value = "/delete/{id}")
+	public R delete(@PathVariable String id) {
+		try {
+			boolean b = deptAssessmentDeclarationContentService.removeById(id);
+			if (b) {
+				return R.ok().data(b);
+			} else {
+				return R.customError("删除失败!");
 			}
 		} catch (CustomException e) {
 			return R.customError(e.getMessage()).data("失败!");
@@ -198,7 +222,7 @@ public class DeptAssessmentDeclarationController {
 	 * @return 结果
 	 */
 	@PostMapping(value = "/import")
-	public R importData(@RequestParam("file") MultipartFile file) {
+	public R importData(@RequestParam("file") MultipartFile file, @RequestParam("id") String id) {
 		if (!file.isEmpty()) {
 			try {
 				//获取原始的文件名
@@ -213,17 +237,11 @@ public class DeptAssessmentDeclarationController {
 				//Excel导入导出的单元类
 				List<String[]> strings = ExcelUtil.readData(fileType, startRows, true, is);
 				//遍历Excel表每一行的数据
-				String assessmentDeclarationId = "";
 				for (String[] str : strings) {
 					DeptAssessmentDeclarationContent deptAssessmentDeclarationContent = new DeptAssessmentDeclarationContent();
-					if (!"".equals(str[0])) {
-						assessmentDeclarationId = str[0];
-						deptAssessmentDeclarationContent.setAssessmentDeclarationId(str[0]);
-					} else {
-						deptAssessmentDeclarationContent.setAssessmentDeclarationId(assessmentDeclarationId);
-					}
-					deptAssessmentDeclarationContent.setEmployeeNo(str[1]);
-					DeptAssessmentDeclaration deptAssessmentDeclaration = deptAssessmentDeclarationService.getById(str[0]);
+					deptAssessmentDeclarationContent.setAssessmentDeclarationId(id);
+					deptAssessmentDeclarationContent.setEmployeeNo(str[0]);
+					DeptAssessmentDeclaration deptAssessmentDeclaration = deptAssessmentDeclarationService.getById(id);
 					if (ObjectUtil.isNotNull(deptAssessmentDeclaration)) {
 						JSONObject jsonArr = userService.pageList(1, 500, deptAssessmentDeclaration.getDeptId(), "", "", "", "", "", request);
 						JSONObject jsonArr1 = (JSONObject) jsonArr.get("data");
@@ -234,16 +252,16 @@ public class DeptAssessmentDeclarationController {
 							deptAssessmentDeclarationContent.setEmployeeId(user.getId());
 						}
 					}
-					deptAssessmentDeclarationContent.setEmployeeName(str[2]);
-					deptAssessmentDeclarationContent.setSerialNumber(Convert.toInt(str[3]));
-					deptAssessmentDeclarationContent.setSuggestedValue(str[4]);
+					deptAssessmentDeclarationContent.setEmployeeName(str[1]);
+					deptAssessmentDeclarationContent.setSerialNumber(Convert.toInt(str[2]));
+					deptAssessmentDeclarationContent.setSuggestedValue(str[3]);
 					deptAssessmentDeclarationContentList.add(deptAssessmentDeclarationContent);
 				}
 				boolean b = deptAssessmentDeclarationContentService.importDataList(deptAssessmentDeclarationContentList);
 				if (b) {
 					return R.ok().data(b);
 				} else {
-					return R.error().data("保存失败!");
+					return R.customError("导入失败!");
 				}
 			} catch (Exception e) {
 				log.error("错误", e);
@@ -270,7 +288,7 @@ public class DeptAssessmentDeclarationController {
 			if (b) {
 				return R.ok().data(b);
 			} else {
-				return R.error().data("失败!");
+				return R.customError("失败!");
 			}
 		} catch (CustomException e) {
 			return R.customError(e.getMessage()).data("失败!");

+ 3 - 3
ims-service/ims-eval/src/main/java/com/ims/eval/controller/EvaluationRevisionController.java

@@ -98,7 +98,7 @@ public class EvaluationRevisionController {
 			if (b) {
 				return R.ok().data(b);
 			} else {
-				return R.error().data("失败!");
+				return R.customError("考评修订失败!");
 			}
 		} catch (CustomException e) {
 			return R.customError(e.getMessage()).data("失败!");
@@ -130,7 +130,7 @@ public class EvaluationRevisionController {
 			if (b) {
 				return R.ok().data(b);
 			} else {
-				return R.error().data("保存失败!");
+				return R.customError("保存失败!");
 			}
 		} catch (CustomException e) {
 			return R.customError(e.getMessage()).data("失败!");
@@ -191,7 +191,7 @@ public class EvaluationRevisionController {
 				if (b) {
 					return R.ok().data(b);
 				} else {
-					return R.error().data("保存失败!");
+					return R.customError("导入失败!");
 				}
 			} catch (Exception e) {
 				log.error("错误", e);

+ 34 - 26
ims-service/ims-eval/src/main/java/com/ims/eval/controller/NoticeManagementController.java

@@ -102,7 +102,7 @@ public class NoticeManagementController {
 			if (b) {
 				return R.ok().data(b);
 			} else {
-				return R.error().data("保存失败!");
+				return R.customError("保存失败!");
 			}
 		} catch (CustomException e) {
 			return R.customError(e.getMessage()).data("失败!");
@@ -117,12 +117,16 @@ public class NoticeManagementController {
 	 */
 	@PostMapping(value = "/removeAll/{ids}")
 	public R deleteAll(@PathVariable("ids") String ids) {
-		String[] strings = ids.split(",");
-		boolean b = evaluationNoticeService.removeByIds(Arrays.asList(strings));
-		if (b) {
-			return R.ok().data(b);
-		} else {
-			return R.error().data("删除失败!");
+		try {
+			String[] strings = ids.split(",");
+			boolean b = evaluationNoticeService.removeByIds(Arrays.asList(strings));
+			if (b) {
+				return R.ok().data(b);
+			} else {
+				return R.customError("删除失败!");
+			}
+		} catch (CustomException e) {
+			return R.customError(e.getMessage()).data("失败!");
 		}
 	}
 
@@ -136,25 +140,29 @@ public class NoticeManagementController {
 	@PostMapping(value = "/modifiedState")
 	public R modifiedState(@RequestParam(value = "ids") String ids,
 						   @RequestParam(value = "releaseState") String releaseState) {
-		boolean b = false;
-		if (ids.length() > 0) {
-			String[] strings = ids.split(",");
-			for (String id : strings) {
-				EvaluationNotice evaluationNotice = new EvaluationNotice();
-				evaluationNotice.setId(id);
-				if ("已发布".equals(releaseState)) {
-					evaluationNotice.setReleaseDate(new Date());
-				} else {
-					evaluationNotice.setReleaseDate(null);
+		try {
+			boolean b = false;
+			if (ids.length() > 0) {
+				String[] strings = ids.split(",");
+				for (String id : strings) {
+					EvaluationNotice evaluationNotice = new EvaluationNotice();
+					evaluationNotice.setId(id);
+					if ("已发布".equals(releaseState)) {
+						evaluationNotice.setReleaseDate(new Date());
+					} else {
+						evaluationNotice.setReleaseDate(null);
+					}
+					evaluationNotice.setReleaseState(releaseState);
+					b = evaluationNoticeService.updateById(evaluationNotice);
 				}
-				evaluationNotice.setReleaseState(releaseState);
-				b = evaluationNoticeService.updateById(evaluationNotice);
 			}
-		}
-		if (b) {
-			return R.ok().data(b);
-		} else {
-			return R.error().data("失败!");
+			if (b) {
+				return R.ok().data(b);
+			} else {
+				return R.customError("失败!");
+			}
+		} catch (CustomException e) {
+			return R.customError(e.getMessage()).data("失败!");
 		}
 	}
 
@@ -187,7 +195,7 @@ public class NoticeManagementController {
 			if (b) {
 				return R.ok().data(b);
 			} else {
-				return R.error().data("上传附件失败!");
+				return R.customError("上传附件失败!");
 			}
 		} catch (CustomException e) {
 			return R.customError(e.getMessage()).data("失败!");
@@ -222,7 +230,7 @@ public class NoticeManagementController {
 			if (b) {
 				return R.ok().data(b);
 			} else {
-				return R.error().data("删除附件失败!");
+				return R.customError("删除附件失败!");
 			}
 		} catch (CustomException e) {
 			return R.customError(e.getMessage()).data("失败!");

+ 2 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/IEvaluationDeptBusinessContentService.java

@@ -19,4 +19,6 @@ public interface IEvaluationDeptBusinessContentService extends IService<Evaluati
 	boolean saveOrUpdateBatch(List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList);
 
 	List<EvaluationDeptBusinessContent> selectEvaluationDeptBusinessContentListByBusinessPlanId(String businessPlanId, String deptId);
+
+	boolean importDataList(List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList);
 }

+ 2 - 2
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/DeptAssessmentDeclarationContentServiceImpl.java

@@ -82,7 +82,7 @@ public class DeptAssessmentDeclarationContentServiceImpl extends ServiceImpl<Dep
 				List<DeptAssessmentDeclarationContent> objList2 = super.list(qw);
 				if (objList2.size() == 1) {
 					list2.add(deptAssessmentDeclarationContent);
-				} else {
+				} else if (objList2.size() == 0) {
 					QueryWrapper<DeptAssessmentDeclarationContent> qw1 = new QueryWrapper<>();
 					if (StringUtils.isNotEmpty(deptAssessmentDeclarationContent.getAssessmentDeclarationId())) {
 						qw1.lambda().like(DeptAssessmentDeclarationContent::getAssessmentDeclarationId, deptAssessmentDeclarationContent.getAssessmentDeclarationId());
@@ -136,7 +136,7 @@ public class DeptAssessmentDeclarationContentServiceImpl extends ServiceImpl<Dep
 			if (objList.size() == 1) {//修改
 				deptAssessmentDeclarationContent.setId(objList.get(0).getId());
 				b = super.updateById(deptAssessmentDeclarationContent);
-			} else {
+			} else if (objList.size() == 0) {//新增
 				b = super.save(deptAssessmentDeclarationContent);
 			}
 		}

+ 92 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluationDeptBusinessContentServiceImpl.java

@@ -1,6 +1,7 @@
 package com.ims.eval.service.impl;
 
 import cn.hutool.core.date.DateUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ims.common.utils.StringUtils;
 import com.ims.eval.dao.EvaluationDeptBusinessContentMapper;
@@ -11,6 +12,7 @@ import com.ims.eval.service.IOrganizationStructureService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -40,8 +42,60 @@ public class EvaluationDeptBusinessContentServiceImpl extends ServiceImpl<Evalua
 	@Override
 	public boolean saveOrUpdateBatch(List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList) {
 		boolean b = false;
+		List<EvaluationDeptBusinessContent> list1 = new ArrayList<>();
+		List<EvaluationDeptBusinessContent> list2 = new ArrayList<>();
 		for (EvaluationDeptBusinessContent evaluationDeptBusinessContent : evaluationDeptBusinessContentList) {
-			if (StringUtils.isEmpty(evaluationDeptBusinessContent.getId())) {
+			if (evaluationDeptBusinessContent.getId() == null || "".equals(evaluationDeptBusinessContent.getId())) {//新增
+				QueryWrapper<EvaluationDeptBusinessContent> qw = new QueryWrapper<>();
+				if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getBusinessPlanId())) {
+					qw.lambda().like(EvaluationDeptBusinessContent::getBusinessPlanId, evaluationDeptBusinessContent.getBusinessPlanId());
+				}
+				if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getTargetName())) {
+					qw.lambda().like(EvaluationDeptBusinessContent::getTargetName, evaluationDeptBusinessContent.getTargetName());
+				}
+				List<EvaluationDeptBusinessContent> objList1 = super.list(qw);
+				if (objList1.size() == 0) {
+					List<OrganizationStructure> organizationStructureList = organizationStructureService.getTree("23031001", 1, "140");
+					OrganizationStructure organizationStructure = organizationStructureList.get(0).getChildren().stream().filter(item -> item.getId().equals(evaluationDeptBusinessContent.getDeptId())).findFirst().orElse(null);
+					if (null != organizationStructure) {
+						evaluationDeptBusinessContent.setDeptName(organizationStructure.getName());
+						evaluationDeptBusinessContent.setCreateTime(DateUtil.date());
+						list1.add(evaluationDeptBusinessContent);
+					}
+				} else {
+					b = false;
+				}
+			} else {//修改
+				QueryWrapper<EvaluationDeptBusinessContent> qw = new QueryWrapper<>();
+				if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getId())) {
+					qw.lambda().like(EvaluationDeptBusinessContent::getId, evaluationDeptBusinessContent.getId());
+				}
+				if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getBusinessPlanId())) {
+					qw.lambda().like(EvaluationDeptBusinessContent::getBusinessPlanId, evaluationDeptBusinessContent.getBusinessPlanId());
+				}
+				if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getTargetName())) {
+					qw.lambda().like(EvaluationDeptBusinessContent::getTargetName, evaluationDeptBusinessContent.getTargetName());
+				}
+				List<EvaluationDeptBusinessContent> objList2 = super.list(qw);
+				if (objList2.size() == 1) {
+					list2.add(evaluationDeptBusinessContent);
+				} else if (objList2.size() == 0) {
+					QueryWrapper<EvaluationDeptBusinessContent> qw1 = new QueryWrapper<>();
+					if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getBusinessPlanId())) {
+						qw1.lambda().like(EvaluationDeptBusinessContent::getBusinessPlanId, evaluationDeptBusinessContent.getBusinessPlanId());
+					}
+					if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getTargetName())) {
+						qw.lambda().like(EvaluationDeptBusinessContent::getTargetName, evaluationDeptBusinessContent.getTargetName());
+					}
+					List<EvaluationDeptBusinessContent> objList3 = super.list(qw1);
+					if (objList3.size() == 0) {
+						list2.add(evaluationDeptBusinessContent);
+					} else {
+						b = false;
+					}
+				}
+			}
+			/*if (StringUtils.isEmpty(evaluationDeptBusinessContent.getId())) {
 				List<OrganizationStructure> organizationStructureList = organizationStructureService.getTree("23031001", 1, "140");
 				OrganizationStructure organizationStructure = organizationStructureList.get(0).getChildren().stream().filter(item -> item.getId().equals(evaluationDeptBusinessContent.getDeptId())).findFirst().orElse(null);
 				if (null != organizationStructure) {
@@ -51,6 +105,14 @@ public class EvaluationDeptBusinessContentServiceImpl extends ServiceImpl<Evalua
 				}
 			} else {
 				b = super.updateById(evaluationDeptBusinessContent);
+			}*/
+		}
+		if (b) {
+			if (list1.size() > 0) {
+				super.saveBatch(list1);
+			}
+			if (list2.size() > 0) {
+				super.updateBatchById(list2);
 			}
 		}
 		return b;
@@ -60,4 +122,33 @@ public class EvaluationDeptBusinessContentServiceImpl extends ServiceImpl<Evalua
 	public List<EvaluationDeptBusinessContent> selectEvaluationDeptBusinessContentListByBusinessPlanId(String businessPlanId, String deptId) {
 		return baseMapper.selectEvaluationDeptBusinessContentListByBusinessPlanId(businessPlanId, deptId);
 	}
+
+	@Override
+	public boolean importDataList(List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList) {
+		boolean b = false;
+		for (EvaluationDeptBusinessContent evaluationDeptBusinessContent : evaluationDeptBusinessContentList) {
+			QueryWrapper<EvaluationDeptBusinessContent> qw = new QueryWrapper<>();
+			if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getBusinessPlanId())) {
+				qw.lambda().like(EvaluationDeptBusinessContent::getBusinessPlanId, evaluationDeptBusinessContent.getBusinessPlanId());
+			}
+			if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getTargetName())) {
+				qw.lambda().like(EvaluationDeptBusinessContent::getTargetName, evaluationDeptBusinessContent.getTargetName());
+			}
+			List<EvaluationDeptBusinessContent> objList = super.list(qw);
+			if (objList.size() == 1) {//修改
+				evaluationDeptBusinessContent.setId(objList.get(0).getId());
+				evaluationDeptBusinessContent.setUpdateTime(DateUtil.date());
+				b = super.updateById(evaluationDeptBusinessContent);
+			} else if (objList.size() == 0) {//新增
+				List<OrganizationStructure> organizationStructureList = organizationStructureService.getTree("23031001", 1, "140");
+				OrganizationStructure organizationStructure = organizationStructureList.get(0).getChildren().stream().filter(item -> item.getId().equals(evaluationDeptBusinessContent.getDeptId())).findFirst().orElse(null);
+				if (null != organizationStructure) {
+					evaluationDeptBusinessContent.setDeptName(organizationStructure.getName());
+					evaluationDeptBusinessContent.setCreateTime(DateUtil.date());
+					b = super.save(evaluationDeptBusinessContent);
+				}
+			}
+		}
+		return b;
+	}
 }