4 Commits 6c6546667c ... e5fa051bbd

Autor SHA1 Mensagem Data
  ‘xugp e5fa051bbd 考评得分统计数据查询 1 ano atrás
  ‘xugp 5fe1142d9d Merge remote-tracking branch 'origin/master' 1 ano atrás
  ‘xugp 9f1a5c5d87 Merge remote-tracking branch 'origin/master' 1 ano atrás
  ‘xugp 5d1fc60fd3 修改bug 1 ano atrás

+ 91 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/controller/EvaluationScoreCountController.java

@@ -0,0 +1,91 @@
+package com.ims.eval.controller;
+
+
+import com.ims.eval.config.CustomException;
+import com.ims.eval.entity.EvaluationScoreCount;
+import com.ims.eval.entity.dto.result.R;
+import com.ims.eval.service.IEvaluationScoreCountService;
+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 xugp
+ * @since 2023-03-30
+ */
+@RestController
+@RequestMapping("//score_count")
+public class EvaluationScoreCountController {
+
+	@Autowired
+	private IEvaluationScoreCountService iEvaluationScoreCountService;
+
+
+
+	/**
+	 * 查询
+	 *
+	 * @param organizationEvaluationId       考评记录id
+	 * @param organizationEvaluationRuleId  考评规则id
+	 * @param binStage  code
+	 * @return
+	 */
+	@GetMapping(value = "list")
+	public R list(@RequestParam(value = "organizationEvaluationId", required = false) String organizationEvaluationId,
+				  @RequestParam(value = "organizationEvaluationRuleId", required = false) String organizationEvaluationRuleId,
+				  @RequestParam(value = "binStage", required = false) String binStage) {
+		List<EvaluationScoreCount> list = iEvaluationScoreCountService.getListByEvaluationRuleId(organizationEvaluationId,organizationEvaluationRuleId,binStage);
+		return R.ok().data(list);
+	}
+
+
+	/**
+	 * 添加
+	 *
+	 * @param evaluationScoreCount
+	 * @return
+	 */
+
+	@PostMapping(value = "/save")
+	@ApiOperation(value = "新增(修改)", notes = "新增(修改)")
+	public R addAll(@RequestBody EvaluationScoreCount evaluationScoreCount) {
+
+		try {
+			boolean b = iEvaluationScoreCountService.saveOrUpdate(evaluationScoreCount);
+			if (b) {
+				return R.ok().data(b);
+			} else {
+				return R.error().data("保存失败!");
+			}
+		} catch (CustomException e){
+			return R.customError(e.getMessage()).data("失败!");
+		}
+	}
+
+
+	/**
+	 * 批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@PostMapping(value = "/remove/{ids}")
+	@ApiOperation(value = "删除", notes = "删除")
+	public R deleteAll(@PathVariable("ids") String ids) {
+		String[] strings = ids.split(",");
+		boolean b = iEvaluationScoreCountService.removeByIds(Arrays.asList(strings));
+		if (b) {
+			return R.ok().data(b);
+		} else {
+			return R.error().data("删除失败!");
+		}
+	}
+
+}

+ 7 - 7
ims-service/ims-eval/src/main/java/com/ims/eval/entity/EvaluationScoreCount.java

@@ -1,12 +1,9 @@
 package com.ims.eval.entity;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
-import lombok.Builder;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
+import lombok.*;
 
-import java.time.LocalDate;
-import java.util.Date;
 
 /**
  * <p>
@@ -43,6 +40,8 @@ public class EvaluationScoreCount extends Model {
      */
     private String indicatorId;
 
+
+
     /**
      * 得分
      */
@@ -54,8 +53,9 @@ public class EvaluationScoreCount extends Model {
 	private double obversionScore;
 
 	/**
-	 * 能否量化
+	 * 能否量化  1 代表能  0代表否
 	 */
-	private Boolean isQuantified;
+	private String isQuantified;
+
 
 }

+ 3 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/entity/PartyBuildingMultiplier.java

@@ -1,5 +1,6 @@
 package com.ims.eval.entity;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -32,7 +33,7 @@ public class PartyBuildingMultiplier extends Model {
 	/**
 	 * 单位名称
 	 */
-    private String organization_Name;
+    private String organizationName;
 
 
     /**
@@ -43,6 +44,7 @@ public class PartyBuildingMultiplier extends Model {
 	/**
 	 * 板块名称
 	 */
+	@TableField(exist = false)
 	private String sectionName;
 
     /**

+ 81 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/dto/response/EvaluationScoreCountDTO.java

@@ -0,0 +1,81 @@
+package com.ims.eval.entity.dto.response;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+@Data
+public class EvaluationScoreCountDTO {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 主键
+	 */
+	private String id;
+
+
+	/**
+	 * 考评记录id
+	 */
+	private String organizationEvaluationId;
+
+	/**
+	 * 考评规则id
+	 */
+	private String organizationEvaluationRuleId;
+
+	/**
+	 * 指标id
+	 */
+	private String indicatorId;
+
+	/**
+	 * 单位名称
+	 */
+	private String organizationName;
+
+
+	/**
+	 * 经营阶段分类
+	 */
+	private String sectionName;
+
+	/**
+	 * 生产经营业务分类
+	 */
+	private String stageName;
+
+
+	/**
+	 * 指标名称
+	 */
+	private String indicatorName;
+
+	/**
+	 * 部门名称
+	 */
+	private String keyName;
+
+
+	/**
+	 * 得分
+	 */
+	private double score;
+
+
+
+	/**
+	 * 折算得分
+	 */
+	private double obversionScore;
+
+	/**
+	 * 能否量化  1 代表能  0代表否
+	 */
+	private String isQuantified;
+
+
+
+
+}

+ 2 - 2
ims-service/ims-eval/src/main/java/com/ims/eval/schedule/ScoreCalculationSchedule.java

@@ -61,7 +61,7 @@ public class ScoreCalculationSchedule {
 			if (StringUtils.isNotEmpty(id)) {
 				qw1.lambda().eq(EvaluationScoreCount::getOrganizationEvaluationId, id);
 			}
-			qw1.lambda().eq(EvaluationScoreCount::getIsQuantified, true);
+			qw1.lambda().eq(EvaluationScoreCount::getIsQuantified, "1");
 			List<EvaluationScoreCount> evaluationScoreCountList = iEvaluatioinScoreCountService.list(qw1);
 			if (evaluationScoreCountList.size() >0){
 				List<String> idList = evaluationScoreCountList.stream().map(EvaluationScoreCount::getId).collect(Collectors.toList());
@@ -105,7 +105,7 @@ public class ScoreCalculationSchedule {
 									.organizationEvaluationRuleId(entry.getKey())
 									.organizationEvaluationId(organizationEvaluation.getId())
 									.score(Double.parseDouble(calculation))
-									.isQuantified(true)
+									.isQuantified("1")
 									.obversionScore(Double.parseDouble(calculation))
 									.build();
 								save = iEvaluatioinScoreCountService.save(evaluationScoreCount);

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

@@ -5,13 +5,19 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ims.common.utils.StringUtils;
 import com.ims.eval.config.CustomException;
+import com.ims.eval.dao.OrganizationStructureMapper;
+import com.ims.eval.entity.OrganizationStructure;
 import com.ims.eval.entity.PartyBuildingMultiplier;
 import com.ims.eval.dao.PartyBuildingMultiplierMapper;
+import com.ims.eval.service.IOrganizationEvaluationService;
+import com.ims.eval.service.IOrganizationStructureService;
 import com.ims.eval.service.IPartyBuildingMultiplierService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * <p>
  *  服务实现类
@@ -26,6 +32,9 @@ public class PartyBuildingMultiplierServiceImpl extends ServiceImpl<PartyBuildin
 	@Autowired
 	private PartyBuildingMultiplierMapper partyBuildingMultiplierMapper;
 
+	@Autowired
+	private IOrganizationStructureService iOrganizationStructureService;
+
 	@Override
 	public IPage<PartyBuildingMultiplier> listAll(Integer pageNum,Integer pageSize,String id, String departId, String sectionId, String year) {
 

+ 7 - 2
ims-service/ims-eval/src/main/resources/mappers/EvaluationScoreCountMapper.xml

@@ -16,10 +16,15 @@
         id, organization_evaluation_id, indicator_id, score, organization_evaluation_rule_id
     </sql>
 
-    <select id="selelctListByEvaluationRuleId" resultType="com.ims.eval.entity.EvaluationScoreCount">
-        select c.*
+    <select id="selelctListByEvaluationRuleId" resultType="com.ims.eval.entity.dto.response.EvaluationScoreCountDTO">
+        select c.*,i.indicator_name,o.organization_name,b.section_name,s.stage_name,d.key_name
         from evaluation_score_count c
         LEFT JOIN indicator i on  c.indicator_id = i.id
+        LEFT JOIN organization_evaluation_rule o on  c.organization_evaluation_id = o.id
+        left join bin_section b on b.id = i.bin_section
+        left join bin_stage s on s.id = i.bin_stage
+        left join data_dictionary d on d.data_key = i.dept
+
         <where>
             <if test="organizationEvaluationId !=null and organizationEvaluationId !=''">
                 AND c.organization_evaluation_id = #{organizationEvaluationId}

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

@@ -4,7 +4,7 @@
 
     <select id="selectAll" resultType="com.ims.eval.entity.PartyBuildingMultiplier">
         SELECT
-            a.id,a.depart_id,a.section_id,b.section_name,a.multiplier,
+            a.id,a.depart_id,a.organization_name,a.section_id,b.section_name,a.multiplier,
                a.remarks,a.year
         FROM
         party_building_multiplier a