Browse Source

Merge remote-tracking branch 'origin/master'

‘xugp 2 years ago
parent
commit
3dc2d692fe

+ 2 - 2
ims-service/ims-eval/src/main/java/com/ims/eval/controller/OrganizationEvaluationRuleController.java

@@ -59,7 +59,7 @@ public class OrganizationEvaluationRuleController {
 				  @RequestParam(value = "evaluationCycle", required = false) String evaluationCycle,
 				  @RequestParam(value = "year", required = false) String year,
 				  @RequestParam(value = "month", required = false) String month) {
-		IPage<OrganizationEvaluationRule> list = organizationEvaluationRuleService.list(pageNum, pageSize, id, organizationName, organizationId, organizationType, binSection, binStage, evaluationCycle, year, month);
+		IPage<OrganizationEvaluationRule> list = organizationEvaluationRuleService.list2(pageNum, pageSize, id, organizationName, organizationId, organizationType, binSection, binStage, evaluationCycle, year, month);
 		return R.ok().data(list);
 	}
 
@@ -76,7 +76,7 @@ public class OrganizationEvaluationRuleController {
 				  @RequestParam(value = "evaluationCycle", required = false) String evaluationCycle,
 				  @RequestParam(value = "year", required = false) String year,
 				  @RequestParam(value = "month", required = false) String month) {
-		IPage<OrganizationEvaluationRule> list = organizationEvaluationRuleService.list2(pageNum, pageSize, id, organizationName, organizationId, organizationType, binSection, binStage, evaluationCycle, year, month);
+		IPage<OrganizationEvaluationRule> list = organizationEvaluationRuleService.list(pageNum, pageSize, id, organizationName, organizationId, organizationType, binSection, binStage, evaluationCycle, year, month);
 		return R.ok().data(list);
 	}
 

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

@@ -136,6 +136,10 @@ public class OrganizationEvaluationRuleServiceImpl extends ServiceImpl<Organizat
 	public IPage<OrganizationEvaluationRule> list2(Integer pageNum, Integer pageSize, String id, String organizationName, String organizationId, String organizationType, String binSection, String binStage, String evaluationCycle, String year, String month) {
 		Page<OrganizationEvaluationRule> page = new Page<>(pageNum, pageSize);
 		IPage<OrganizationEvaluationRule>  list = baseMapper.list(page, id, organizationName, organizationId, organizationType, binSection, binStage, evaluationCycle, year, month);
+		list.getRecords().stream().forEach(l->{
+			l.setBinSectionName(null == CacheContext.ddNameMap.get(l.getBinSection()) ? "" :CacheContext.ddNameMap.get(l.getBinSection()));
+			l.setBinStageName(null == CacheContext.ddNameMap.get(l.getBinStage()) ? "" : CacheContext.ddNameMap.get(l.getBinStage()));
+		});
 		return list;
 	}
 

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

@@ -31,10 +31,48 @@
 
     <select id="list" resultType="com.ims.eval.entity.OrganizationEvaluationRule">
         SELECT
-            *
+            r.*,i.rule_name
         FROM
             organization_evaluation_rule r
             LEFT JOIN evaluate_rule i ON r.evaluate_rule_id = i.ID
+            <where>
+                <if test="id !=null and id !=''">
+                    AND r.id = #{id}
+                </if>
+                <if test="organizationName !=null and organizationName !=''">
+                    AND r.organization_name like   CONCAT('%',#{organizationName},'%')
+                </if>
+
+                <if test="organizationId !=null and organizationId !=''">
+                    AND r.organization_id = #{organizationId}
+                </if>
+
+                <if test="organizationType !=null and organizationType !=''">
+                    AND r.organization_type = #{organizationType}
+                </if>
+
+                <if test="binSection !=null and binSection !=''">
+                    AND r.bin_section = #{binSection}
+                </if>
+
+                <if test="binStage !=null and binStage !=''">
+                    AND r.bin_stage = #{binStage}
+                </if>
+
+                <if test="evaluationCycle !=null and evaluationCycle !=''">
+                    AND r.evaluation_cycle = #{evaluationCycle}
+                </if>
+
+                <if test="year !=null and year !=''">
+                    AND r.year = #{year}
+                </if>
+
+                <if test="month !=null and month !=''">
+                    AND r.month = #{month}
+                </if>
+
+            </where>
+
 
     </select>