Browse Source

代码提交

wangchangsheng 2 years ago
parent
commit
de5fa095ea
22 changed files with 662 additions and 17 deletions
  1. 47 3
      ims-service/ims-eval/src/main/java/com/ims/eval/cache/CacheContext.java
  2. 102 0
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/BinSectionController.java
  3. 102 0
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/BinStageController.java
  4. 15 9
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/DeptResponsibilityController.java
  5. 29 0
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/ResponsibilityIndicatorInfoController.java
  6. 16 0
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/BinSectionMapper.java
  7. 16 0
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/BinStageMapper.java
  8. 5 0
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/ResponsibilityIndicatorInfoMapper.java
  9. 49 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/BinSection.java
  10. 50 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/BinStage.java
  11. 20 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IBinSectionService.java
  12. 20 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IBinStageService.java
  13. 5 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IResponsibilityIndicatorInfoService.java
  14. 62 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/BinSectionServiceImpl.java
  15. 63 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/BinStageServiceImpl.java
  16. 42 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/DeptResponsibilityServiceImpl.java
  17. 2 1
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluateRuleInfoServiceImpl.java
  18. 1 1
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluateRuleServiceImpl.java
  19. 1 1
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/IndicatorTypeServiceImpl.java
  20. 2 2
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationEvaluationRuleServiceImpl.java
  21. 9 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/ResponsibilityIndicatorInfoServiceImpl.java
  22. 4 0
      ims-service/ims-eval/src/main/resources/mappers/ResponsibilityIndicatorInfoMapper.xml

+ 47 - 3
ims-service/ims-eval/src/main/java/com/ims/eval/cache/CacheContext.java

@@ -1,7 +1,11 @@
 package com.ims.eval.cache;
 
+import com.ims.eval.entity.BinSection;
+import com.ims.eval.entity.BinStage;
 import com.ims.eval.entity.DataDictionary;
 import com.ims.eval.entity.IndicatorType;
+import com.ims.eval.service.IBinSectionService;
+import com.ims.eval.service.IBinStageService;
 import com.ims.eval.service.IDataDictionaryService;
 import com.ims.eval.service.IIndicatorTypeService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -23,6 +27,12 @@ public class CacheContext implements CommandLineRunner {
 	@Autowired
 	private IIndicatorTypeService iIndicatorTypeService;
 
+	@Autowired
+	private IBinSectionService binSectionService;
+
+	@Autowired
+	private IBinStageService binStageService;
+
 
 	//初始化字典表
 	public static List<DataDictionary> ddList = new ArrayList<>();
@@ -32,8 +42,18 @@ public class CacheContext implements CommandLineRunner {
 	public static Map<String, List<DataDictionary>> ddSuperKeyMap  = new HashMap<>();
 
 
+	//指标分类
 	public static List<IndicatorType> itList = new ArrayList<>();
 
+	//经营阶段分类
+	public static List<BinStage> bseList = new ArrayList<>();
+
+	//生产经营业务分类
+	public static List<BinSection> bsnList = new ArrayList<>();
+
+
+
+
 	@Override
 	public void run(String... args) throws Exception {
 		initDataDictionary();
@@ -43,7 +63,7 @@ public class CacheContext implements CommandLineRunner {
 
 
 	/**
-	 * 初始化集团
+	 * 初始化数据字典
 	 */
 	public void initDataDictionary(){
 		//清理集合中的数据
@@ -64,17 +84,41 @@ public class CacheContext implements CommandLineRunner {
 
 
 	/**
-	 * 初始化集团表
+	 * 初始化指标分类
 	 */
 	public void initIndicatorType(){
 		//清理集合中的数据
 		itList.clear();
 
-		itList = iIndicatorTypeService.list().stream().filter(t->!t.isDelFlag()).collect(Collectors.toList());
+		itList = iIndicatorTypeService.list().stream().filter(t->!t.getDelFlag()).collect(Collectors.toList());
 		itList.sort(Comparator.comparing(IndicatorType::getOrderNum));
 	}
 
 
 
+	/**
+	 * 初始化经营阶段分类
+	 */
+	public void initBinStage(){
+		//清理集合中的数据
+		bseList.clear();
+
+		bseList = binStageService.list().stream().filter(t->!t.getDelFlag()).collect(Collectors.toList());
+		bseList.sort(Comparator.comparing(BinStage::getOrderNum));
+	}
+
+	/**
+	 * 初始化生产经营业务分类
+	 */
+	public void initBinSection(){
+		//清理集合中的数据
+		itList.clear();
+
+		bsnList = binSectionService.list().stream().filter(t->!t.getDelFlag()).collect(Collectors.toList());
+		bsnList.sort(Comparator.comparing(BinSection::getOrderNum));
+	}
+
+
+
 
 }

+ 102 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/controller/BinSectionController.java

@@ -0,0 +1,102 @@
+package com.ims.eval.controller;
+
+
+import com.ims.eval.cache.CacheContext;
+import com.ims.eval.config.CustomException;
+import com.ims.eval.entity.BinSection;
+import com.ims.eval.entity.IndicatorType;
+import com.ims.eval.entity.dto.result.R;
+import com.ims.eval.service.IBinSectionService;
+import com.ims.eval.service.IIndicatorTypeService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * <p>
+ * 生产经营业务分类 前端控制器
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-12
+ */
+@RestController
+@RequestMapping("//bin-section")
+public class BinSectionController {
+
+	@Autowired
+	private IBinSectionService binSectionService;
+
+	@Autowired
+	private CacheContext cache;
+
+
+	/**
+	 * 查询
+	 *
+	 * @param id       主键ID
+	 * @param sectionName  name
+	 * @param sectionCode  code
+	 * @return
+	 */
+	//@ImsPreAuth("eval:binSection:view")
+	@GetMapping(value = "list")
+	public R list(@RequestParam(value = "id", required = false) String id,
+				  @RequestParam(value = "sectionName", required = false) String sectionName,
+				  @RequestParam(value = "sectionCode", required = false) String sectionCode) {
+//		List<IndicatorType> list = iIndicatorTypeService.list(id, typeName, typeCode);
+		List<BinSection> list =CacheContext.bsnList;
+		return R.ok().data(list);
+	}
+
+
+	/**
+	 * 添加
+	 *
+	 * @param binSection
+	 * @return
+	 */
+
+	//@ImsPreAuth("eval:binSection:edit")
+	@PostMapping(value = "/save")
+	@ApiOperation(value = "新增(修改)", notes = "新增(修改)")
+	public R addAll(@RequestBody BinSection binSection) {
+
+		try {
+			boolean b = binSectionService.saveOrUpdate(binSection);
+			if (b) {
+				cache.initIndicatorType();
+				return R.ok().data(b);
+			} else {
+				return R.error().data("保存失败!");
+			}
+		} catch (CustomException e){
+			return R.customError(e.getMessage()).data("失败!");
+		}
+	}
+
+
+	/**
+	 * 批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	//@ImsPreAuth("eval:binSection:remove")
+	@PostMapping(value = "/remove/{ids}")
+	@ApiOperation(value = "删除", notes = "删除")
+	public R deleteAll(@PathVariable("ids") String ids) {
+		String[] strings = ids.split(",");
+		boolean b = binSectionService.removeByIds(Arrays.asList(strings));
+		if (b) {
+			cache.initDataDictionary();
+			return R.ok().data(b);
+		} else {
+			return R.error().data("删除失败!");
+		}
+	}
+
+}

+ 102 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/controller/BinStageController.java

@@ -0,0 +1,102 @@
+package com.ims.eval.controller;
+
+
+import com.ims.eval.cache.CacheContext;
+import com.ims.eval.config.CustomException;
+import com.ims.eval.entity.BinStage;
+import com.ims.eval.entity.IndicatorType;
+import com.ims.eval.entity.dto.result.R;
+import com.ims.eval.service.IBinStageService;
+import com.ims.eval.service.IIndicatorTypeService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * <p>
+ * 经营阶段分类 前端控制器
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-12
+ */
+@RestController
+@RequestMapping("//bin-stage")
+public class BinStageController {
+
+	@Autowired
+	private IBinStageService binStageService;
+
+	@Autowired
+	private CacheContext cache;
+
+
+	/**
+	 * 查询
+	 *
+	 * @param id       主键ID
+	 * @param stageName  name
+	 * @param stageCode  code
+	 * @return
+	 */
+	//@ImsPreAuth("eval:binStage:view")
+	@GetMapping(value = "list")
+	public R list(@RequestParam(value = "id", required = false) String id,
+				  @RequestParam(value = "stageName", required = false) String stageName,
+				  @RequestParam(value = "stageCode", required = false) String stageCode) {
+//		List<BinStage> list = binStageService.list(id, stageName, stageCode);
+		List<BinStage> list =CacheContext.bseList;
+		return R.ok().data(list);
+	}
+
+
+	/**
+	 * 添加
+	 *
+	 * @param binStage
+	 * @return
+	 */
+
+	//@ImsPreAuth("eval:binStage:edit")
+	@PostMapping(value = "/save")
+	@ApiOperation(value = "新增(修改)", notes = "新增(修改)")
+	public R addAll(@RequestBody BinStage binStage) {
+
+		try {
+			boolean b = binStageService.saveOrUpdate(binStage);
+			if (b) {
+				cache.initIndicatorType();
+				return R.ok().data(b);
+			} else {
+				return R.error().data("保存失败!");
+			}
+		} catch (CustomException e){
+			return R.customError(e.getMessage()).data("失败!");
+		}
+	}
+
+
+	/**
+	 * 批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	//@ImsPreAuth("eval:binStage:remove")
+	@PostMapping(value = "/remove/{ids}")
+	@ApiOperation(value = "删除", notes = "删除")
+	public R deleteAll(@PathVariable("ids") String ids) {
+		String[] strings = ids.split(",");
+		boolean b = binStageService.removeByIds(Arrays.asList(strings));
+		if (b) {
+			cache.initDataDictionary();
+			return R.ok().data(b);
+		} else {
+			return R.error().data("删除失败!");
+		}
+	}
+
+}

+ 15 - 9
ims-service/ims-eval/src/main/java/com/ims/eval/controller/DeptResponsibilityController.java

@@ -11,6 +11,9 @@ import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.Arrays;
+import java.util.List;
+
 /**
  * <p>
  * 部门目标责任表 前端控制器
@@ -58,7 +61,7 @@ public class DeptResponsibilityController {
 				  @RequestParam(value = "year", required = false) String year,
 				  @RequestParam(value = "month", required = false) String month) {
 		IPage<DeptResponsibility> list = deptResponsibilityService.list(pageNum, pageSize, id, cycleUnit, checkCycle, beginDate, endDate, stage, createBy, year, month);
-		return R.ok().data(null);
+		return R.ok().data(list);
 	}
 
 
@@ -90,23 +93,26 @@ public class DeptResponsibilityController {
 	/**
 	 * 生成目标责任书
 	 *
-	 * @param orgEvalRuleId 组织拷屏id
-	 * @param date          日期(预留指定生成某个月的目标责任书)
+	 * @param orgEvalRuleIds 组织拷屏ids
+	 * @param date           日期(预留指定生成某个月的目标责任书)
 	 * @return
 	 */
 	//@ImsPreAuth("eval:deptResponsibility:edit")
 	@PostMapping(value = "/generate")
 	@ApiOperation(value = "生成部门责任书", notes = "生成部门责任书")
-	public R generateResponsibility(@RequestParam(value = "orgEvalRuleId", required = true) String orgEvalRuleId,
+	public R generateResponsibility(@RequestParam(value = "orgEvalRuleIds", required = true) String orgEvalRuleIds,
 									@RequestParam(value = "date", required = false) String date) {
 
 		try {
-			boolean b = deptResponsibilityService.generateResponsibility(orgEvalRuleId,date);
-			if (b) {
-				return R.ok().data(b);
-			} else {
-				return R.error().data("保存失败!");
+			List<String> orgEvalRuleIdList = Arrays.asList(orgEvalRuleIds.split(","));
+			boolean b = false;
+			for (String id : orgEvalRuleIdList) {
+				b = deptResponsibilityService.generateResponsibility(id, date);
+				if (!b) {
+					return R.error().data("保存失败!");
+				}
 			}
+			return R.ok().data(b);
 		} catch (CustomException e) {
 			return R.customError(e.getMessage()).data("失败!");
 		}

+ 29 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/controller/ResponsibilityIndicatorInfoController.java

@@ -1,10 +1,20 @@
 package com.ims.eval.controller;
 
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.ims.eval.entity.Indicator;
+import com.ims.eval.entity.ResponsibilityIndicatorInfo;
+import com.ims.eval.entity.dto.result.R;
+import com.ims.eval.service.IResponsibilityIndicatorInfoService;
+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.List;
+
 /**
  * <p>
  * 责任书指标明细
@@ -19,4 +29,23 @@ import org.springframework.web.bind.annotation.RestController;
 @RequestMapping("//responsibility-indicator-info")
 public class ResponsibilityIndicatorInfoController {
 
+
+
+	@Autowired
+	private IResponsibilityIndicatorInfoService responsibilityIndicatorInfoService;
+
+	/**
+	 *
+	 * @param deptResponsibilityId 目标责任书id
+	 * @return
+	 */
+	//@ImsPreAuth("eval:responsibilityIndicatorInfo:view")
+	@GetMapping(value = "listBy")
+	public R listByresponsibilityId(
+				  @RequestParam(value = "deptResponsibilityId", required = false) String deptResponsibilityId,
+				  @RequestParam(value = "dept", required = false) String dept) {
+		List<ResponsibilityIndicatorInfo> list = responsibilityIndicatorInfoService.listByresponsibilityId(deptResponsibilityId, dept);
+		return R.ok().data(list);
+	}
+
 }

+ 16 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/dao/BinSectionMapper.java

@@ -0,0 +1,16 @@
+package com.ims.eval.dao;
+
+import com.ims.eval.entity.BinSection;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 生产经营业务分类 Mapper 接口
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-12
+ */
+public interface BinSectionMapper extends BaseMapper<BinSection> {
+
+}

+ 16 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/dao/BinStageMapper.java

@@ -0,0 +1,16 @@
+package com.ims.eval.dao;
+
+import com.ims.eval.entity.BinStage;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 经营阶段分类 Mapper 接口
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-12
+ */
+public interface BinStageMapper extends BaseMapper<BinStage> {
+
+}

+ 5 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/dao/ResponsibilityIndicatorInfoMapper.java

@@ -3,6 +3,8 @@ package com.ims.eval.dao;
 import com.ims.eval.entity.ResponsibilityIndicatorInfo;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 
+import java.util.List;
+
 /**
  * <p>
  * 责任书指标明细
@@ -15,4 +17,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface ResponsibilityIndicatorInfoMapper extends BaseMapper<ResponsibilityIndicatorInfo> {
 
+
+	List<ResponsibilityIndicatorInfo> listByresponsibilityId(String deptResponsibilityId, String dept);
+
 }

+ 49 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/BinSection.java

@@ -0,0 +1,49 @@
+package com.ims.eval.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 生产经营业务分类
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-12
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class BinSection extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键id
+     */
+    private String id;
+
+    /**
+     * 业务名称
+     */
+    private String sectionName;
+
+    /**
+     * 业务编码
+     */
+    private String sectionCode;
+
+    /**
+     * 删除标记(false 为未删除,true 为已删除)
+
+     */
+    private Boolean delFlag;
+
+    /**
+     * 排序
+     */
+    private Integer orderNum;
+
+
+}

+ 50 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/BinStage.java

@@ -0,0 +1,50 @@
+package com.ims.eval.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import io.swagger.models.auth.In;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 经营阶段分类
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-12
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class BinStage extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键id
+     */
+    private String id;
+
+    /**
+     * 阶段名称
+     */
+    private String stageName;
+
+    /**
+     * 阶段编码
+     */
+    private String stageCode;
+
+    /**
+     * 删除标记(false 为未删除,true 为已删除)
+
+     */
+    private Boolean delFlag;
+
+    /**
+     * 排序
+     */
+    private Integer orderNum;
+
+
+}

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

@@ -0,0 +1,20 @@
+package com.ims.eval.service;
+
+import com.ims.eval.entity.BinSection;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 生产经营业务分类 服务类
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-12
+ */
+public interface IBinSectionService extends IService<BinSection> {
+
+	List<BinSection> list(String id, String sectionName, String sectionCode);
+
+}

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

@@ -0,0 +1,20 @@
+package com.ims.eval.service;
+
+import com.ims.eval.entity.BinStage;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 经营阶段分类 服务类
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-12
+ */
+public interface IBinStageService extends IService<BinStage> {
+
+	List<BinStage> list(String id, String stageName, String stageCode);
+
+}

+ 5 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/IResponsibilityIndicatorInfoService.java

@@ -3,6 +3,8 @@ package com.ims.eval.service;
 import com.ims.eval.entity.ResponsibilityIndicatorInfo;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
+
 /**
  * <p>
  * 责任书指标明细
@@ -15,4 +17,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IResponsibilityIndicatorInfoService extends IService<ResponsibilityIndicatorInfo> {
 
+
+	List<ResponsibilityIndicatorInfo>listByresponsibilityId(String deptResponsibilityId, String dept);
+
 }

+ 62 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/BinSectionServiceImpl.java

@@ -0,0 +1,62 @@
+package com.ims.eval.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.ims.eval.config.CustomException;
+import com.ims.eval.entity.BinSection;
+import com.ims.eval.dao.BinSectionMapper;
+import com.ims.eval.service.IBinSectionService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 生产经营业务分类 服务实现类
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-12
+ */
+@Service
+public class BinSectionServiceImpl extends ServiceImpl<BinSectionMapper, BinSection> implements IBinSectionService {
+
+	@Override
+	public List<BinSection> list(String id, String sectionName, String sectionCode) {
+
+		QueryWrapper<BinSection> qw = new QueryWrapper();
+		qw.lambda().eq(BinSection::getId, id);
+		qw.lambda().like(BinSection::getSectionName, sectionName);
+		qw.lambda().eq(BinSection::getSectionCode, sectionCode);
+		qw.lambda().orderByAsc(BinSection::getOrderNum);
+		List<BinSection> list = baseMapper.selectList(qw);
+
+		return list;
+	}
+
+	@Transactional
+	@Override
+	public boolean saveOrUpdate(BinSection entity) {
+
+		if (null != entity && (null != entity.getId() || !"".equals(entity.getId().trim()))) {
+			BinSection type = baseMapper.selectById(entity.getId());
+			type.setDelFlag(true);
+			baseMapper.updateById(type);
+		}
+
+		QueryWrapper<BinSection> qw = new QueryWrapper();
+		qw.lambda().eq(BinSection::getSectionCode, entity.getSectionCode());
+		qw.lambda().eq(BinSection::getDelFlag, false);
+		List<BinSection> list = baseMapper.selectList(qw);
+		if (null != list && list.size() > 0) {
+			throw new CustomException("当前分类已存在");
+		}
+
+		int count = baseMapper.selectCount(null);
+		entity.setId(null);
+		entity.setOrderNum(count);
+		return super.saveOrUpdate(entity);
+	}
+
+}

+ 63 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/BinStageServiceImpl.java

@@ -0,0 +1,63 @@
+package com.ims.eval.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.ims.eval.config.CustomException;
+import com.ims.eval.entity.BinSection;
+import com.ims.eval.entity.BinStage;
+import com.ims.eval.dao.BinStageMapper;
+import com.ims.eval.service.IBinStageService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 经营阶段分类 服务实现类
+ * </p>
+ *
+ * @author wang
+ * @since 2023-03-12
+ */
+@Service
+public class BinStageServiceImpl extends ServiceImpl<BinStageMapper, BinStage> implements IBinStageService {
+
+	@Override
+	public List<BinStage> list(String id, String stageName, String stageCode) {
+
+		QueryWrapper<BinStage> qw = new QueryWrapper();
+		qw.lambda().eq(BinStage::getId, id);
+		qw.lambda().like(BinStage::getStageName, stageName);
+		qw.lambda().eq(BinStage::getStageCode, stageCode);
+		qw.lambda().orderByAsc(BinStage::getOrderNum);
+		List<BinStage> list = baseMapper.selectList(qw);
+
+		return list;
+	}
+
+	@Transactional
+	@Override
+	public boolean saveOrUpdate(BinStage entity) {
+
+		if (null != entity && (null != entity.getId() || !"".equals(entity.getId().trim()))) {
+			BinStage stage = baseMapper.selectById(entity.getId());
+			stage.setDelFlag(true);
+			baseMapper.updateById(stage);
+		}
+
+		QueryWrapper<BinStage> qw = new QueryWrapper();
+		qw.lambda().eq(BinStage::getStageCode, entity.getStageCode());
+		qw.lambda().eq(BinStage::getDelFlag, false);
+		List<BinStage> list = baseMapper.selectList(qw);
+		if (null != list && list.size() > 0) {
+			throw new CustomException("当前阶段分类已存在");
+		}
+
+		int count = baseMapper.selectCount(null);
+		entity.setId(null);
+		entity.setOrderNum(count);
+		return super.saveOrUpdate(entity);
+	}
+
+}

+ 42 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/DeptResponsibilityServiceImpl.java

@@ -125,6 +125,7 @@ public class DeptResponsibilityServiceImpl extends ServiceImpl<DeptResponsibilit
 	}
 
 
+	@Transactional
 	@Override
 	public boolean generateResponsibility(String orgEvalRuleId, String date) {
 
@@ -214,6 +215,7 @@ public class DeptResponsibilityServiceImpl extends ServiceImpl<DeptResponsibilit
 			info.setIndicatorDictionaryId(r.getIndicatorDictionaryID());
 			info.setOptionCode(r.getOptionCode());
 			info.setIsQuantified(r.getIsQuantified());
+			info.setCreateTime(new Date());
 			boolean b2 = responsibilityIndicatorInfoService.saveOrUpdate(info);
 			if (!b2) {
 				throw new CustomException("初始化目标责任书明细失败");
@@ -225,6 +227,46 @@ public class DeptResponsibilityServiceImpl extends ServiceImpl<DeptResponsibilit
 	@Transactional
 	@Override
 	public boolean saveOrUpdate(DeptResponsibility entity) {
+
+
+//		DeptResponsibility responsibility = new DeptResponsibility();
+//
+//		//获取指定部门的规则
+//		OrganizationEvaluationRule evaluationRule = organizationEvaluationRuleService.getById(orgEvalRuleId);
+//		if (null == evaluationRule) {
+//			throw new CustomException("不存在此单位权重配置");
+//		}
+//		Date newDate;
+//		//获取当前时间
+//		if (StringUtils.isEmpty(date)) {
+//			newDate = DateUtils.getCurrentDate();
+//		} else {
+//			newDate = DateUtils.toDate(date);
+//		}
+//
+//		String year = String.valueOf(DateUtils.getYear(newDate));//获取年份
+//		String season = String.valueOf(DateUtils.getSeason(newDate));//获取季度
+//		String month = String.valueOf(DateUtils.getMonth(newDate));//获取月份
+//		//保存目标责任书
+//		responsibility.setOrganizationId(evaluationRule.getOrganizationId());//考评组织ID
+//		responsibility.setOrganizationName(evaluationRule.getOrganizationName());//考评组织名称
+//		responsibility.setCheckCycle(evaluationRule.getEvaluationCycle());//考评周期
+//		responsibility.setYear(year);//年份
+//		responsibility.setMonth(month);//月份
+//		responsibility.setOrganizationEvaluationRuleId(evaluationRule.getId());//考评规则id
+//		//responsibility.setBeginDate(null);
+//		//responsibility.setEndDate(null);
+//		responsibility.setStage("流程未启动");
+//		responsibility.setCreateTime(new Date());
+//		//responsibility.setCreateBy("");
+//
+//		boolean b = super.saveOrUpdate(responsibility);
+//		if (!b) {
+//			throw new CustomException("保存目标责任书失败");
+//		}
+
+
+
 		QueryWrapper<DeptResponsibility> qw = new QueryWrapper();
 		if (null != entity && (null == entity.getId() || "".equals(entity.getId().trim()))) {
 			qw.lambda().eq(DeptResponsibility::getOrganizationId, entity.getOrganizationId());

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

@@ -55,8 +55,9 @@ public class EvaluateRuleInfoServiceImpl extends ServiceImpl<EvaluateRuleInfoMap
 	public List<EvaluateRuleInfo> list(List<String> evaluateRuleIds) {
 		QueryWrapper<EvaluateRuleInfo> qw = new QueryWrapper<>();
 		if (null == evaluateRuleIds || evaluateRuleIds.size()<= 0) {
-			qw.lambda().in(EvaluateRuleInfo::getEvaluateRuleId, evaluateRuleIds);
+			throw new CustomException("获取规则明细参数空");
 		}
+		qw.lambda().in(EvaluateRuleInfo::getEvaluateRuleId, evaluateRuleIds);
 		List<EvaluateRuleInfo> list = baseMapper.selectList(qw);
 		return list;
 	}

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

@@ -100,7 +100,7 @@ public class EvaluateRuleServiceImpl extends ServiceImpl<EvaluateRuleMapper, Eva
 		QueryWrapper<EvaluateRule> qw = new QueryWrapper<>();
 
 		if (null == ids || ids.size()<=0) {
-			throw new CustomException("未配置规则");
+			throw new CustomException("获取规则参数空");
 		}
 		qw.lambda().in(EvaluateRule::getId, ids);
 		List<EvaluateRule> list = baseMapper.selectList(qw);

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

@@ -49,7 +49,7 @@ public class IndicatorTypeServiceImpl extends ServiceImpl<IndicatorTypeMapper, I
 
 		QueryWrapper<IndicatorType> qw = new QueryWrapper();
 		qw.lambda().eq(IndicatorType::getTypeCode, entity.getTypeCode());
-		qw.lambda().eq(IndicatorType::isDelFlag, false);
+		qw.lambda().eq(IndicatorType::getDelFlag, false);
 		List<IndicatorType> list = baseMapper.selectList(qw);
 		if (null != list && list.size() > 0) {
 			throw new CustomException("当前分类已存在");

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

@@ -76,7 +76,7 @@ public class OrganizationEvaluationRuleServiceImpl extends ServiceImpl<Organizat
 		}
 
 
-		qw.lambda().eq(OrganizationEvaluationRule::isDelFlag, false);
+		qw.lambda().eq(OrganizationEvaluationRule::getDelFlag, false);
 
 
 		qw.lambda().orderByAsc(OrganizationEvaluationRule::getOrderNum);
@@ -123,7 +123,7 @@ public class OrganizationEvaluationRuleServiceImpl extends ServiceImpl<Organizat
 			qw.lambda().eq(OrganizationEvaluationRule::getEvaluationCycle, evaluationCycle);
 		}
 
-		qw.lambda().eq(OrganizationEvaluationRule::isDelFlag, false);
+		qw.lambda().eq(OrganizationEvaluationRule::getDelFlag, false);
 
 		qw.lambda().orderByAsc(OrganizationEvaluationRule::getOrderNum);
 

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

@@ -6,6 +6,8 @@ import com.ims.eval.service.IResponsibilityIndicatorInfoService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * <p>
  * 责任书指标明细
@@ -19,4 +21,11 @@ import org.springframework.stereotype.Service;
 @Service
 public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<ResponsibilityIndicatorInfoMapper, ResponsibilityIndicatorInfo> implements IResponsibilityIndicatorInfoService {
 
+
+
+	@Override
+	public List<ResponsibilityIndicatorInfo> listByresponsibilityId(String deptResponsibilityId, String dept) {
+		List<ResponsibilityIndicatorInfo> list = baseMapper.listByresponsibilityId(deptResponsibilityId,dept);
+		return list;
+	}
 }

+ 4 - 0
ims-service/ims-eval/src/main/resources/mappers/ResponsibilityIndicatorInfoMapper.xml

@@ -24,4 +24,8 @@
         id, dept_responsibility_id, indicator_id, indicator_dictionary_id, option_code, is_quantified, quantified_value, non_quantified_value, create_time, create_by, update_time, update_by, remark
     </sql>
 
+    <select id="listByresponsibilityId" resultType="com.ims.eval.entity.ResponsibilityIndicatorInfo">
+
+    </select>
+
 </mapper>