瀏覽代碼

大体模块

lem 3 年之前
父節點
當前提交
a926e22be0
共有 21 個文件被更改,包括 2594 次插入49 次删除
  1. 209 43
      database/jeeplus-vue-base.sql
  2. 9 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/criterion/entity/EvaluationCriterion.java
  3. 13 6
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/criterion/mapper/xml/EvaluationCriterionMapper.xml
  4. 98 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductiondetails/entity/DeductionDetails.java
  5. 24 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductiondetails/entity/DynamicHeader.java
  6. 88 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductiondetails/entity/EvaluationSummary.java
  7. 24 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductiondetails/entity/SelectClass.java
  8. 38 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductiondetails/mapper/DeductionDetailsMapper.java
  9. 234 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductiondetails/mapper/xml/DeductionDetailsMapper.xml
  10. 111 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductiondetails/service/DeductionDetailsService.java
  11. 239 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductiondetails/web/DeductionDetailsController.java
  12. 88 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductionshowdetails/entity/CostCompletion.java
  13. 147 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductionshowdetails/entity/DeductionShowDetails.java
  14. 97 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductionshowdetails/entity/OtherPoints.java
  15. 124 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductionshowdetails/entity/QualityCivilized.java
  16. 115 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductionshowdetails/entity/SiteQuality.java
  17. 101 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductionshowdetails/entity/SiteSafety.java
  18. 32 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductionshowdetails/mapper/DeductionShowDetailsMapper.java
  19. 494 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductionshowdetails/mapper/xml/DeductionShowDetailsMapper.xml
  20. 88 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductionshowdetails/service/DeductionShowDetailsService.java
  21. 221 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductionshowdetails/web/DeductionShowDetailsController.java

文件差異過大導致無法顯示
+ 209 - 43
database/jeeplus-vue-base.sql


+ 9 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/criterion/entity/EvaluationCriterion.java

@@ -18,6 +18,7 @@ import com.jeeplus.core.persistence.TreeEntity;
 public class EvaluationCriterion extends TreeEntity<EvaluationCriterion> {
 	
 	private static final long serialVersionUID = 1L;
+	private String serialNumber; //序号
 	private String Veto;		// 是否否决
 	
 	
@@ -29,6 +30,14 @@ public class EvaluationCriterion extends TreeEntity<EvaluationCriterion> {
 		super(id);
 	}
 
+	public String getSerialNumber() {
+		return serialNumber;
+	}
+
+	public void setSerialNumber(String serialNumber) {
+		this.serialNumber = serialNumber;
+	}
+
 	public String getVeto() {
 		return Veto;
 	}

+ 13 - 6
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/criterion/mapper/xml/EvaluationCriterionMapper.xml

@@ -6,6 +6,7 @@
    		<result property="id" column="id" />
 		<result property="name" column="name" />
 		<result property="sort" column="sort" />
+		<result property="serialNumber" column="serialNumber00" />
 		<result property="parentIds" column="parentIds" />
 		<result property="Veto" column="Veto" />
     </resultMap>
@@ -22,7 +23,8 @@
 		a.parent_id AS "parent.id",
 		a.parent_ids AS "parentIds",
 		a.name AS "name",
-		a.sort AS "sort"
+		a.sort AS "sort",
+		a.serialNumber AS "serialNumber"
 	</sql>
 
 
@@ -91,7 +93,8 @@
 		SELECT
 			a.id,
 			a.parent_id AS "parent.id",
-			a.parent_ids
+			a.parent_ids,
+		    a.serialNumber
 		FROM evaluation_criterion a
 		<include refid="evaluationCriterionJoins"/>
 		<where>
@@ -114,7 +117,8 @@
 			   parent_id,
 			   parent_ids,
 			   name,
-			   sort
+			   sort,
+			   serialNumber
 		) VALUES (
 			#{id},
 			#{Veto},
@@ -127,7 +131,8 @@
 			#{parent.id},
 			#{parentIds},
 			#{name},
-			#{sort}
+			#{sort},
+			#{serialNumber}
 		)
 	</insert>
 
@@ -140,14 +145,16 @@
 			parent_id = #{parent.id},
 			parent_ids = #{parentIds},
 			name = #{name},
-			sort = #{sort}
+			sort = #{sort},
+			serialNumber = #{serialNumber}
 		WHERE id = #{id}
 	</update>
 
 	<update id="updateParentIds">
 		UPDATE evaluation_criterion SET
 			parent_id = #{parent.id},
-			parent_ids = #{parentIds}
+			parent_ids = #{parentIds},
+			serialNumber = #{serialNumber}
 		WHERE id = #{id}
 	</update>
 

+ 98 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductiondetails/entity/DeductionDetails.java

@@ -0,0 +1,98 @@
+/**
+ * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.deductiondetails.entity;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import com.jeeplus.core.persistence.DataEntity;
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+
+/**
+ * deductionDetailsEntity
+ * @author 邱悦
+ * @version 2022-01-01
+ */
+public class DeductionDetails extends DataEntity<DeductionDetails> {
+	
+	private static final long serialVersionUID = 1L;
+	private String unitId;		// 施工单位Id
+	private String classId;		// 大类Id
+	private String subClassId;		// 小类Id
+	private Integer deductPoints;		// 扣分
+	private String deductionDetails;		// 扣分详情
+	private Date deductionDate;		// 日期
+	private String veto;	//是否否决
+	
+	public DeductionDetails() {
+		super();
+	}
+
+	public DeductionDetails(String id){
+		super(id);
+	}
+
+	@ExcelField(title="施工单位Id", align=2, sort=1)
+	public String getUnitId() {
+		return unitId;
+	}
+
+	public void setUnitId(String unitId) {
+		this.unitId = unitId;
+	}
+	
+	@ExcelField(title="大类Id", dictType="", align=2, sort=2)
+	public String getClassId() {
+		return classId;
+	}
+
+	public void setClassId(String classId) {
+		this.classId = classId;
+	}
+	
+	@ExcelField(title="小类Id", dictType="", align=2, sort=3)
+	public String getSubClassId() {
+		return subClassId;
+	}
+
+	public void setSubClassId(String subClassId) {
+		this.subClassId = subClassId;
+	}
+	
+	@ExcelField(title="扣分", align=2, sort=4)
+	public Integer getDeductPoints() {
+		return deductPoints;
+	}
+
+	public void setDeductPoints(Integer deductPoints) {
+		this.deductPoints = deductPoints;
+	}
+	
+	@ExcelField(title="扣分详情", align=2, sort=5)
+	public String getDeductionDetails() {
+		return deductionDetails;
+	}
+
+	public void setDeductionDetails(String deductionDetails) {
+		this.deductionDetails = deductionDetails;
+	}
+	
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@ExcelField(title="日期", align=2, sort=6)
+	public Date getDeductionDate() {
+		return deductionDate;
+	}
+
+	public void setDeductionDate(Date deductionDate) {
+		this.deductionDate = deductionDate;
+	}
+
+	public String getVeto() {
+		return veto;
+	}
+
+	public void setVeto(String veto) {
+		this.veto = veto;
+	}
+}

+ 24 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductiondetails/entity/DynamicHeader.java

@@ -0,0 +1,24 @@
+package com.jeeplus.modules.deductiondetails.entity;
+/**
+ * 动态表头
+ * */
+public class DynamicHeader {
+    private String id;
+    private String typeName;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getTypeName() {
+        return typeName;
+    }
+
+    public void setTypeName(String typeName) {
+        this.typeName = typeName;
+    }
+}

+ 88 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductiondetails/entity/EvaluationSummary.java

@@ -0,0 +1,88 @@
+package com.jeeplus.modules.deductiondetails.entity;
+
+import com.jeeplus.core.persistence.DataEntity;
+
+public class EvaluationSummary extends DataEntity<EvaluationSummary> {
+    private static final long serialVersionUID = 1L;
+    private String yearOfEvaluation; //施工单位年代
+    private String evaName; //施工单位名称
+    private String safetyEva; //现场安全管控评价
+    private String progressEva; //现场施工质量及进度评价
+    private String costEva; //造价及竣工资料评价
+    private String qualityEva; //优质服务及文明施工评价
+    private String pointsEva; //其他加减分评价
+    private String veto; //是否存在否决事项
+    private String sumScore; //汇总评分
+
+    public String getYearOfEvaluation() {
+        return yearOfEvaluation;
+    }
+
+    public void setYearOfEvaluation(String yearOfEvaluation) {
+        this.yearOfEvaluation = yearOfEvaluation;
+    }
+
+    public String getEvaName() {
+        return evaName;
+    }
+
+    public void setEvaName(String evaName) {
+        this.evaName = evaName;
+    }
+
+    public String getSafetyEva() {
+        return safetyEva;
+    }
+
+    public void setSafetyEva(String safetyEva) {
+        this.safetyEva = safetyEva;
+    }
+
+    public String getProgressEva() {
+        return progressEva;
+    }
+
+    public void setProgressEva(String progressEva) {
+        this.progressEva = progressEva;
+    }
+
+    public String getCostEva() {
+        return costEva;
+    }
+
+    public void setCostEva(String costEva) {
+        this.costEva = costEva;
+    }
+
+    public String getQualityEva() {
+        return qualityEva;
+    }
+
+    public void setQualityEva(String qualityEva) {
+        this.qualityEva = qualityEva;
+    }
+
+    public String getPointsEva() {
+        return pointsEva;
+    }
+
+    public void setPointsEva(String pointsEva) {
+        this.pointsEva = pointsEva;
+    }
+
+    public String getVeto() {
+        return veto;
+    }
+
+    public void setVeto(String veto) {
+        this.veto = veto;
+    }
+
+    public String getSumScore() {
+        return sumScore;
+    }
+
+    public void setSumScore(String sumScore) {
+        this.sumScore = sumScore;
+    }
+}

+ 24 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductiondetails/entity/SelectClass.java

@@ -0,0 +1,24 @@
+package com.jeeplus.modules.deductiondetails.entity;
+
+import com.jeeplus.core.persistence.DataEntity;
+
+public class SelectClass extends DataEntity<SelectClass> {
+    private String value;
+    private String label;
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public String getLabel() {
+        return label;
+    }
+
+    public void setLabel(String label) {
+        this.label = label;
+    }
+}

+ 38 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductiondetails/mapper/DeductionDetailsMapper.java

@@ -0,0 +1,38 @@
+/**
+ * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.deductiondetails.mapper;
+
+import com.jeeplus.modules.deductiondetails.entity.EvaluationSummary;
+import com.jeeplus.modules.deductiondetails.entity.SelectClass;
+import org.springframework.stereotype.Repository;
+import com.jeeplus.core.persistence.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import com.jeeplus.modules.deductiondetails.entity.DeductionDetails;
+
+import java.util.List;
+
+/**
+ * deductionDetailsMAPPER接口
+ * @author 邱悦
+ * @version 2022-01-01
+ */
+@Mapper
+@Repository
+public interface DeductionDetailsMapper extends BaseMapper<DeductionDetails> {
+
+    List<EvaluationSummary> findSummaryList(EvaluationSummary deductionDetails);
+
+    EvaluationSummary getSummary(EvaluationSummary evaluationSummary);
+
+    List<SelectClass> getBigClass(String id);
+
+    List<SelectClass> getSubClass(String id);
+
+    String getVeto(String id);
+
+    void insertDetails(DeductionDetails deductionDetails);
+
+    List<String> returnHeader(String id);
+
+}

+ 234 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductiondetails/mapper/xml/DeductionDetailsMapper.xml

@@ -0,0 +1,234 @@
+<?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.jeeplus.modules.deductiondetails.mapper.DeductionDetailsMapper">
+
+	<sql id="deductionDetailsColumns">
+		a.id AS "id",
+		a.unitid AS "unitId",
+		a.classid AS "classId",
+		a.subclassid AS "subClassId",
+		a.deductpoints AS "deductPoints",
+		a.deductiondetails AS "deductionDetails",
+		a.deductiondate AS "deductionDate",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.remarks AS "remarks",
+		a.del_flag AS "delFlag"
+	</sql>
+
+	<sql id="deductionDetailsJoins">
+
+	</sql>
+
+
+	<select id="get" resultType="DeductionDetails" >
+		SELECT
+			<include refid="deductionDetailsColumns"/>
+		FROM deduction_details a
+		<include refid="deductionDetailsJoins"/>
+		WHERE a.id = #{id}
+	</select>
+
+	<select id="findList" resultType="DeductionDetails" >
+		SELECT
+			<include refid="deductionDetailsColumns"/>
+		FROM deduction_details a
+		<include refid="deductionDetailsJoins"/>
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			${dataScope}
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+
+	<select id="findAllList" resultType="DeductionDetails" >
+		SELECT
+			<include refid="deductionDetailsColumns"/>
+		FROM deduction_details a
+		<include refid="deductionDetailsJoins"/>
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			${dataScope}
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+
+	<insert id="insert">
+		INSERT INTO deduction_details(
+			id,
+			unitid,
+			classid,
+			subclassid,
+			deductpoints,
+			deductiondetails,
+			deductiondate,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag
+		) VALUES (
+			#{id},
+			#{unitId},
+			#{classId},
+			#{subClassId},
+			#{deductPoints},
+			#{deductionDetails},
+			#{deductionDate},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{remarks},
+			#{delFlag}
+		)
+	</insert>
+	<insert id="insertDetails">
+		insert into deduction_details(
+		      id,
+			  unitid,
+			  classid,
+			  subclassid,
+			  deductpoints,
+			  deductiondetails,
+			  deductiondate,
+		      veto,
+			  create_by,
+			  create_date,
+			  update_by,
+			  update_date,
+			  remarks,
+			  del_flag
+		) values
+			 (
+				 #{id},
+				 #{unitId},
+				 #{classId},
+				 #{subClassId},
+				 #{deductPoints},
+				 #{deductionDetails},
+				 #{deductionDate},
+				 #{veto},
+				 #{createBy.id},
+				 #{createDate},
+				 #{updateBy.id},
+				 #{updateDate},
+				 #{remarks},
+				 #{delFlag}
+			 )
+	</insert>
+
+	<update id="update">
+		UPDATE deduction_details SET
+			unitid = #{unitId},
+			classid = #{classId},
+			subclassid = #{subClassId},
+			deductpoints = #{deductPoints},
+			deductiondetails = #{deductionDetails},
+			deductiondate = #{deductionDate},
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			remarks = #{remarks}
+		WHERE id = #{id}
+	</update>
+
+
+	<!--物理删除-->
+	<update id="delete">
+		DELETE FROM deduction_details
+		WHERE id = #{id}
+	</update>
+
+	<!--逻辑删除-->
+	<update id="deleteByLogic">
+		UPDATE deduction_details SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>
+
+
+	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
+	<select id="findUniqueByProperty" resultType="DeductionDetails" statementType="STATEMENT">
+		select * FROM deduction_details  where ${propertyName} = '${value}'
+	</select>
+    <select id="findSummaryList" resultType="com.jeeplus.modules.deductiondetails.entity.EvaluationSummary">
+		SELECT
+		@id := id,
+		a.id AS "id",
+		a.yearofevaluation as "yearOfEvaluation",
+		a.unitname as "evaName",
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND classid = '8c9fe0f62745471e8c341e0e7327aa9b' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND classid = '8c9fe0f62745471e8c341e0e7327aa9b' GROUP BY unitid ) else 0 end ) AS safetyEva,
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND classid = '7a77a8251b124e858a1bef1bb353372b' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND classid = '7a77a8251b124e858a1bef1bb353372b' GROUP BY unitid ) else 0 end ) AS progressEva,
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND classid = '783ba447e0774b139fa1dc6ad4eeb4f3' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND classid = '783ba447e0774b139fa1dc6ad4eeb4f3' GROUP BY unitid ) else 0 end ) AS costEva,
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND classid = 'bc91443b714c4993a3b136e000eb8bc2' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND classid = 'bc91443b714c4993a3b136e000eb8bc2' GROUP BY unitid ) else 0 end ) AS qualityEva,
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND classid = '2f0e74b9e50b4bbb8d6322feac578076' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND classid = '2f0e74b9e50b4bbb8d6322feac578076' GROUP BY unitid ) else 0 end ) AS pointsEva,
+		(
+		CASE WHEN ( SELECT sum( veto ) FROM deduction_details WHERE unitid = @id AND classid = '2f0e74b9e50b4bbb8d6322feac578076' GROUP BY unitid ) > 0 THEN '是' ELSE '否'
+		END
+		) AS veto,
+		(case when (
+		CASE WHEN ( SELECT sum( veto ) FROM deduction_details WHERE unitid = @id AND classid = '2f0e74b9e50b4bbb8d6322feac578076' GROUP BY unitid ) > 0 THEN '是' ELSE '否'
+		END
+		) = '否' then ((case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND classid = '8c9fe0f62745471e8c341e0e7327aa9b' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND classid = '8c9fe0f62745471e8c341e0e7327aa9b' GROUP BY unitid ) else 0 end )+
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND classid = '7a77a8251b124e858a1bef1bb353372b' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND classid = '7a77a8251b124e858a1bef1bb353372b' GROUP BY unitid ) else 0 end )+
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND classid = '783ba447e0774b139fa1dc6ad4eeb4f3' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND classid = '783ba447e0774b139fa1dc6ad4eeb4f3' GROUP BY unitid ) else 0 end )+
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND classid = 'bc91443b714c4993a3b136e000eb8bc2' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND classid = 'bc91443b714c4993a3b136e000eb8bc2' GROUP BY unitid ) else 0 end )+
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND classid = '2f0e74b9e50b4bbb8d6322feac578076' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND classid = '2f0e74b9e50b4bbb8d6322feac578076' GROUP BY unitid ) else 0 end )) else '暂停施工' end) 	AS sumScore
+		FROM
+		lishu_construction_unit a
+		<where>
+			<if test="yearOfEvaluation!=null and yearOfEvaluation !=''">
+				and a.yearOfEvaluation = #{yearOfEvaluation}
+			</if>
+			<if test="evaName!=null and evaName!=''">
+				AND a.unitName LIKE
+				<if test="_databaseId == 'postgre'">'%'||#{EvaName}||'%'</if>
+				<if test="_databaseId == 'oracle'">'%'||#{EvaName}||'%'</if>
+				<if test="_databaseId == 'mssql'">'%'+#{EvaName}+'%'</if>
+				<if test="_databaseId == 'mysql'">concat('%',#{EvaName},'%')</if>
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	<select id="getSummary" resultType="com.jeeplus.modules.deductiondetails.entity.EvaluationSummary">
+		select a.id as "ido",a.yearofevaluation as "yearofevaluation",a.unitname as "EvaName" from lishu_construction_unit a
+		where a.id = #{id}
+	</select>
+	<select id="getBigClass" resultType="com.jeeplus.modules.deductiondetails.entity.SelectClass">
+		select a.id as "value",a.name as "label" from evaluation_criterion a where a.parent_id = #{id} order by sort
+	</select>
+	<select id="getSubClass" resultType="com.jeeplus.modules.deductiondetails.entity.SelectClass">
+		select a.id as "value",a.name as "label"  from evaluation_criterion a where a.parent_id = #{id} order by sort
+	</select>
+	<select id="getVeto" resultType="java.lang.String">
+		select a.veto as "veto" from evaluation_criterion a where id = #{id}
+	</select>
+	<select id="returnHeader" resultType="java.lang.String">
+		select a.name from evaluation_criterion a where parent_id = #{id} order by sort
+	</select>
+
+</mapper>

+ 111 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductiondetails/service/DeductionDetailsService.java

@@ -0,0 +1,111 @@
+/**
+ * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.deductiondetails.service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.jeeplus.modules.deductiondetails.entity.DynamicHeader;
+import com.jeeplus.modules.deductiondetails.entity.EvaluationSummary;
+import com.jeeplus.modules.deductiondetails.entity.SelectClass;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.service.CrudService;
+import com.jeeplus.modules.deductiondetails.entity.DeductionDetails;
+import com.jeeplus.modules.deductiondetails.mapper.DeductionDetailsMapper;
+
+/**
+ * deductionDetailsService
+ *
+ * @author 邱悦
+ * @version 2022-01-01
+ */
+@Service
+@Transactional(readOnly = true)
+public class DeductionDetailsService extends CrudService<DeductionDetailsMapper, DeductionDetails> {
+
+	public DeductionDetails get(String id) {
+		return super.get(id);
+	}
+
+	public List<DeductionDetails> findList(DeductionDetails deductionDetails) {
+		return super.findList(deductionDetails);
+	}
+
+	public Page<DeductionDetails> findPage(Page<DeductionDetails> page, DeductionDetails deductionDetails) {
+		return super.findPage(page, deductionDetails);
+	}
+
+	public Page<EvaluationSummary> findSummeryPage(Page<EvaluationSummary> page, EvaluationSummary deductionDetails) {
+		dataRuleFilter(deductionDetails);
+		deductionDetails.setPage(page);
+		page.setList(mapper.findSummaryList(deductionDetails));
+		return page;
+	}
+
+	public EvaluationSummary getSummary(EvaluationSummary evaluationSummary) {
+		return mapper.getSummary(evaluationSummary);
+	}
+
+	public List<SelectClass> getBigClass(String id) {
+		return mapper.getBigClass(id);
+	}
+
+	public List<SelectClass> getSubClass(String id) {
+		return mapper.getSubClass(id);
+	}
+
+	public String getVeto(String id) {
+		return mapper.getVeto(id);
+	}
+
+	@Transactional(readOnly = false)
+	public void insertDetails(DeductionDetails deductionDetails) {
+		deductionDetails.preInsert();
+		mapper.insertDetails(deductionDetails);
+	}
+
+	@Transactional(readOnly = false)
+	public void save(DeductionDetails deductionDetails) {
+		super.save(deductionDetails);
+	}
+
+	@Transactional(readOnly = false)
+	public void delete(DeductionDetails deductionDetails) {
+		super.delete(deductionDetails);
+	}
+
+	public List<DynamicHeader> returnHeader(String id){
+		List<DynamicHeader> returnList = new ArrayList<>();
+		DynamicHeader one = new DynamicHeader();
+		DynamicHeader two = new DynamicHeader();
+		DynamicHeader three = new DynamicHeader();
+		one.setId("1");
+		one.setTypeName("施工单位年份");
+		two.setId("2");
+		two.setTypeName("施工单位名称");
+		three.setId("3");
+		three.setTypeName("基础评分");
+		returnList.add(one);
+		returnList.add(two);
+		returnList.add(three);
+
+		List<String> strings = mapper.returnHeader(id);
+		for (int i = 0; i < strings.size(); i++) {
+			String s = strings.get(i);
+			DynamicHeader d = new DynamicHeader();
+			d.setId(String.valueOf(i+4));
+			d.setTypeName(s);
+			returnList.add(d);
+		}
+		DynamicHeader four = new DynamicHeader();
+		int size = strings.size() + 3;
+		four.setId(String.valueOf(size));
+		four.setTypeName("汇总评分");
+		returnList.add(four);
+		return returnList;
+	}
+}

+ 239 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductiondetails/web/DeductionDetailsController.java

@@ -0,0 +1,239 @@
+/**
+ * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.deductiondetails.web;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.ConstraintViolationException;
+
+import com.jeeplus.modules.deductiondetails.entity.EvaluationSummary;
+import com.jeeplus.modules.deductiondetails.entity.SelectClass;
+import org.apache.shiro.authz.annotation.Logical;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.json.AjaxJson;
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.web.BaseController;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
+import com.jeeplus.common.utils.excel.ImportExcel;
+import com.jeeplus.modules.deductiondetails.entity.DeductionDetails;
+import com.jeeplus.modules.deductiondetails.service.DeductionDetailsService;
+
+/**
+ * deductionDetailsController
+ * @author 邱悦
+ * @version 2022-01-01
+ */
+@RestController
+@RequestMapping(value = "/deductiondetails/deductionDetails")
+public class DeductionDetailsController extends BaseController {
+
+	@Autowired
+	private DeductionDetailsService deductionDetailsService;
+
+	@ModelAttribute
+	public DeductionDetails get(@RequestParam(required=false) String id) {
+		DeductionDetails entity = null;
+		if (StringUtils.isNotBlank(id)){
+			entity = deductionDetailsService.get(id);
+		}
+		if (entity == null){
+			entity = new DeductionDetails();
+		}
+		return entity;
+	}
+
+	/**
+	 * 扣分详情列表数据
+	 */
+	@RequiresPermissions("deductiondetails:deductionDetails:list")
+	@GetMapping("list")
+	public AjaxJson list(DeductionDetails deductionDetails, HttpServletRequest request, HttpServletResponse response) {
+		Page<DeductionDetails> page = deductionDetailsService.findPage(new Page<DeductionDetails>(request, response), deductionDetails);
+		return AjaxJson.success().put("page",page);
+	}
+
+	/**
+	 * 施工单位评价-1汇总情况
+	 */
+	@RequiresPermissions("deductiondetails:deductionDetails:list")
+	@GetMapping("summaryList")
+	public AjaxJson summaryList(EvaluationSummary evaluationSummary, HttpServletRequest request, HttpServletResponse response) {
+		Page<EvaluationSummary> page = deductionDetailsService.findSummeryPage(new Page<EvaluationSummary>(request, response), evaluationSummary);
+		return AjaxJson.success().put("page",page);
+	}
+
+
+	/**
+	 * 施工单位评价-1汇总情况
+	 */
+	@RequiresPermissions("deductiondetails:deductionDetails:list")
+	@GetMapping("getSummary")
+	public AjaxJson getSummary(EvaluationSummary evaluationSummary, HttpServletRequest request, HttpServletResponse response) {
+		EvaluationSummary deductionDetails = deductionDetailsService.getSummary(evaluationSummary);
+		return AjaxJson.success().put("deductionDetails",deductionDetails);
+	}
+
+	/**
+	 * 大类选取
+	 */
+	@RequiresPermissions("deductiondetails:deductionDetails:list")
+	@GetMapping("getBigClass")
+	public AjaxJson getBigClass(String id,HttpServletRequest request, HttpServletResponse response) {
+		List<SelectClass> bigClass = deductionDetailsService.getBigClass(id);
+		return AjaxJson.success().put("bigClass",bigClass);
+	}
+
+	/**
+	 * 小类选取
+	 */
+	@RequiresPermissions("deductiondetails:deductionDetails:list")
+	@GetMapping("getSubClass")
+	public AjaxJson getSubClass(String id,HttpServletRequest request, HttpServletResponse response) {
+		List<SelectClass> subClass = deductionDetailsService.getSubClass(id);
+		return AjaxJson.success().put("subClass",subClass);
+	}
+
+	/**
+	 * 获取当前小类是否可以否决
+	 */
+	@RequiresPermissions("deductiondetails:deductionDetails:list")
+	@GetMapping("getVeto")
+	public AjaxJson getVeto(String id,HttpServletRequest request, HttpServletResponse response) {
+		String veto = deductionDetailsService.getVeto(id);
+		return AjaxJson.success().put("veto",veto);
+	}
+
+	/**
+	 * 根据Id获取扣分详情数据
+	 */
+	@RequiresPermissions(value={"deductiondetails:deductionDetails:view","deductiondetails:deductionDetails:add","deductiondetails:deductionDetails:edit"},logical=Logical.OR)
+	@GetMapping("queryById")
+	public AjaxJson queryById(DeductionDetails deductionDetails) {
+		return AjaxJson.success().put("deductionDetails", deductionDetails);
+	}
+
+	/**
+	 * 保存扣分详情
+	 */
+	@RequiresPermissions(value={"deductiondetails:deductionDetails:add","deductiondetails:deductionDetails:edit"},logical=Logical.OR)
+	@PostMapping("save")
+	public AjaxJson save(DeductionDetails deductionDetails, Model model) throws Exception{
+		/**
+		 * 后台hibernate-validation插件校验
+		 */
+		String errMsg = beanValidator(deductionDetails);
+		if (StringUtils.isNotBlank(errMsg)){
+			return AjaxJson.error(errMsg);
+		}
+		//新增或编辑表单保存
+		deductionDetailsService.save(deductionDetails);//保存
+		return AjaxJson.success("保存扣分详情成功");
+	}
+
+	/**
+	 * 保存扣分详情
+	 */
+	@RequiresPermissions(value={"deductiondetails:deductionDetails:add","deductiondetails:deductionDetails:edit"},logical=Logical.OR)
+	@PostMapping("insertDetails")
+	public AjaxJson insertDetails(DeductionDetails deductionDetails, Model model) throws Exception{
+		deductionDetailsService.insertDetails(deductionDetails);
+		return AjaxJson.success("保存扣分详情成功");
+	}
+
+
+	/**
+	 * 批量删除扣分详情
+	 */
+	@RequiresPermissions("deductiondetails:deductionDetails:del")
+	@DeleteMapping("delete")
+	public AjaxJson delete(String ids) {
+		String idArray[] =ids.split(",");
+		for(String id : idArray){
+			deductionDetailsService.delete(deductionDetailsService.get(id));
+		}
+		return AjaxJson.success("删除扣分详情成功");
+	}
+
+	/**
+	 * 导出excel文件
+	 */
+	@RequiresPermissions("deductiondetails:deductionDetails:export")
+    @GetMapping("export")
+    public AjaxJson exportFile(DeductionDetails deductionDetails, HttpServletRequest request, HttpServletResponse response) {
+		try {
+            String fileName = "扣分详情"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
+            Page<DeductionDetails> page = deductionDetailsService.findPage(new Page<DeductionDetails>(request, response, -1), deductionDetails);
+    		new ExportExcel("扣分详情", DeductionDetails.class).setDataList(page.getList()).write(response, fileName).dispose();
+    		return null;
+		} catch (Exception e) {
+			return AjaxJson.error("导出扣分详情记录失败!失败信息:"+e.getMessage());
+		}
+    }
+
+	/**
+	 * 导入Excel数据
+
+	 */
+	@RequiresPermissions("deductiondetails:deductionDetails:import")
+    @PostMapping("import")
+   	public AjaxJson importFile(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request) {
+		try {
+			int successNum = 0;
+			int failureNum = 0;
+			StringBuilder failureMsg = new StringBuilder();
+			ImportExcel ei = new ImportExcel(file, 1, 0);
+			List<DeductionDetails> list = ei.getDataList(DeductionDetails.class);
+			for (DeductionDetails deductionDetails : list){
+				try{
+					deductionDetailsService.save(deductionDetails);
+					successNum++;
+				}catch(ConstraintViolationException ex){
+					failureNum++;
+				}catch (Exception ex) {
+					failureNum++;
+				}
+			}
+			if (failureNum>0){
+				failureMsg.insert(0, ",失败 "+failureNum+" 条扣分详情记录。");
+			}
+			return AjaxJson.success( "已成功导入 "+successNum+" 条扣分详情记录"+failureMsg);
+		} catch (Exception e) {
+			return AjaxJson.error("导入扣分详情失败!失败信息:"+e.getMessage());
+		}
+    }
+
+	/**
+	 * 下载导入扣分详情数据模板
+	 */
+	@RequiresPermissions("deductiondetails:deductionDetails:import")
+    @GetMapping("import/template")
+     public AjaxJson importFileTemplate(HttpServletResponse response) {
+		try {
+            String fileName = "扣分详情数据导入模板.xlsx";
+    		List<DeductionDetails> list = Lists.newArrayList();
+    		new ExportExcel("扣分详情数据", DeductionDetails.class, 1).setDataList(list).write(response, fileName).dispose();
+    		return null;
+		} catch (Exception e) {
+			return AjaxJson.error( "导入模板下载失败!失败信息:"+e.getMessage());
+		}
+    }
+
+
+}

+ 88 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductionshowdetails/entity/CostCompletion.java

@@ -0,0 +1,88 @@
+package com.jeeplus.modules.deductionshowdetails.entity;
+
+import com.jeeplus.core.persistence.DataEntity;
+
+public class CostCompletion extends DataEntity<CostCompletion> {
+    private static final long serialVersionUID = 1L;
+    private String yearOfEvaluation;		// 评价年份
+    private String unitName;//施工单位名称
+    private String basicScore;//基础分数
+    private String reasonOne;
+    private String reasonTwo;
+    private String reasonThree;
+    private String reasonFour;
+    private String reasonFive;
+    private String sumScore;
+
+    public String getYearOfEvaluation() {
+        return yearOfEvaluation;
+    }
+
+    public void setYearOfEvaluation(String yearOfEvaluation) {
+        this.yearOfEvaluation = yearOfEvaluation;
+    }
+
+    public String getUnitName() {
+        return unitName;
+    }
+
+    public void setUnitName(String unitName) {
+        this.unitName = unitName;
+    }
+
+    public String getBasicScore() {
+        return basicScore;
+    }
+
+    public void setBasicScore(String basicScore) {
+        this.basicScore = basicScore;
+    }
+
+    public String getReasonOne() {
+        return reasonOne;
+    }
+
+    public void setReasonOne(String reasonOne) {
+        this.reasonOne = reasonOne;
+    }
+
+    public String getReasonTwo() {
+        return reasonTwo;
+    }
+
+    public void setReasonTwo(String reasonTwo) {
+        this.reasonTwo = reasonTwo;
+    }
+
+    public String getReasonThree() {
+        return reasonThree;
+    }
+
+    public void setReasonThree(String reasonThree) {
+        this.reasonThree = reasonThree;
+    }
+
+    public String getReasonFour() {
+        return reasonFour;
+    }
+
+    public void setReasonFour(String reasonFour) {
+        this.reasonFour = reasonFour;
+    }
+
+    public String getReasonFive() {
+        return reasonFive;
+    }
+
+    public void setReasonFive(String reasonFive) {
+        this.reasonFive = reasonFive;
+    }
+
+    public String getSumScore() {
+        return sumScore;
+    }
+
+    public void setSumScore(String sumScore) {
+        this.sumScore = sumScore;
+    }
+}

+ 147 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductionshowdetails/entity/DeductionShowDetails.java

@@ -0,0 +1,147 @@
+/**
+ * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.deductionshowdetails.entity;
+
+
+import com.jeeplus.core.persistence.DataEntity;
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+
+/**
+ * DeductionShowDetailsEntity
+ * @author 邱悦
+ * @version 2022-01-02
+ */
+public class DeductionShowDetails extends DataEntity<DeductionShowDetails> {
+	
+	private static final long serialVersionUID = 1L;
+	private String unitId;		// 施工单位Id
+	private String classId;		// 大类Id
+	private String subClassId;		// 小类Id
+	private String yearOfEvaluation;		// 年份
+	private String unitName;		// 名称
+	private String bigName;		// 大类名称
+	private String serialNumber;		// 小类序号
+	private String smallName;		// 小类名称
+	private String deductPoints;		// 扣分分数
+	private String deductionDetails;		// 扣分详情
+	private String deductionDate;		// 扣分日期
+	private String veto;		// 是否否决
+	
+	public DeductionShowDetails() {
+		super();
+	}
+
+	public DeductionShowDetails(String id){
+		super(id);
+	}
+
+	@ExcelField(title="施工单位Id", align=2, sort=1)
+	public String getUnitId() {
+		return unitId;
+	}
+
+	public void setUnitId(String unitId) {
+		this.unitId = unitId;
+	}
+	
+	@ExcelField(title="大类Id", align=2, sort=2)
+	public String getClassId() {
+		return classId;
+	}
+
+	public void setClassId(String classId) {
+		this.classId = classId;
+	}
+	
+	@ExcelField(title="小类Id", align=2, sort=3)
+	public String getSubClassId() {
+		return subClassId;
+	}
+
+	public void setSubClassId(String subClassId) {
+		this.subClassId = subClassId;
+	}
+	
+	@ExcelField(title="年份", align=2, sort=4)
+	public String getYearOfEvaluation() {
+		return yearOfEvaluation;
+	}
+
+	public void setYearOfEvaluation(String yearOfEvaluation) {
+		this.yearOfEvaluation = yearOfEvaluation;
+	}
+	
+	@ExcelField(title="名称", align=2, sort=5)
+	public String getUnitName() {
+		return unitName;
+	}
+
+	public void setUnitName(String unitName) {
+		this.unitName = unitName;
+	}
+	
+	@ExcelField(title="大类名称", align=2, sort=6)
+	public String getBigName() {
+		return bigName;
+	}
+
+	public void setBigName(String bigName) {
+		this.bigName = bigName;
+	}
+	
+	@ExcelField(title="小类序号", align=2, sort=7)
+	public String getSerialNumber() {
+		return serialNumber;
+	}
+
+	public void setSerialNumber(String serialNumber) {
+		this.serialNumber = serialNumber;
+	}
+	
+	@ExcelField(title="小类名称", align=2, sort=8)
+	public String getSmallName() {
+		return smallName;
+	}
+
+	public void setSmallName(String smallName) {
+		this.smallName = smallName;
+	}
+	
+	@ExcelField(title="扣分分数", align=2, sort=9)
+	public String getDeductPoints() {
+		return deductPoints;
+	}
+
+	public void setDeductPoints(String deductPoints) {
+		this.deductPoints = deductPoints;
+	}
+	
+	@ExcelField(title="扣分详情", align=2, sort=10)
+	public String getDeductionDetails() {
+		return deductionDetails;
+	}
+
+	public void setDeductionDetails(String deductionDetails) {
+		this.deductionDetails = deductionDetails;
+	}
+	
+	@ExcelField(title="扣分日期", align=2, sort=11)
+	public String getDeductionDate() {
+		return deductionDate;
+	}
+
+	public void setDeductionDate(String deductionDate) {
+		this.deductionDate = deductionDate;
+	}
+	
+	@ExcelField(title="是否否决", dictType="", align=2, sort=12)
+	public String getVeto() {
+		return veto;
+	}
+
+	public void setVeto(String veto) {
+		this.veto = veto;
+	}
+	
+}

+ 97 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductionshowdetails/entity/OtherPoints.java

@@ -0,0 +1,97 @@
+package com.jeeplus.modules.deductionshowdetails.entity;
+
+import com.jeeplus.core.persistence.DataEntity;
+
+public class OtherPoints extends DataEntity<OtherPoints> {
+    private static final long serialVersionUID = 1L;
+    private String yearOfEvaluation;		// 评价年份
+    private String unitName;//施工单位名称
+    private String basicScore;//基础分数
+    private String reasonOne;
+    private String reasonTwo;
+    private String reasonThree;
+    private String reasonFour;
+    private String reasonFive;
+    private String reasonSix;
+    private String sumScore;
+
+    public String getYearOfEvaluation() {
+        return yearOfEvaluation;
+    }
+
+    public void setYearOfEvaluation(String yearOfEvaluation) {
+        this.yearOfEvaluation = yearOfEvaluation;
+    }
+
+    public String getUnitName() {
+        return unitName;
+    }
+
+    public void setUnitName(String unitName) {
+        this.unitName = unitName;
+    }
+
+    public String getBasicScore() {
+        return basicScore;
+    }
+
+    public void setBasicScore(String basicScore) {
+        this.basicScore = basicScore;
+    }
+
+    public String getReasonOne() {
+        return reasonOne;
+    }
+
+    public void setReasonOne(String reasonOne) {
+        this.reasonOne = reasonOne;
+    }
+
+    public String getReasonTwo() {
+        return reasonTwo;
+    }
+
+    public void setReasonTwo(String reasonTwo) {
+        this.reasonTwo = reasonTwo;
+    }
+
+    public String getReasonThree() {
+        return reasonThree;
+    }
+
+    public void setReasonThree(String reasonThree) {
+        this.reasonThree = reasonThree;
+    }
+
+    public String getReasonFour() {
+        return reasonFour;
+    }
+
+    public void setReasonFour(String reasonFour) {
+        this.reasonFour = reasonFour;
+    }
+
+    public String getReasonFive() {
+        return reasonFive;
+    }
+
+    public void setReasonFive(String reasonFive) {
+        this.reasonFive = reasonFive;
+    }
+
+    public String getReasonSix() {
+        return reasonSix;
+    }
+
+    public void setReasonSix(String reasonSix) {
+        this.reasonSix = reasonSix;
+    }
+
+    public String getSumScore() {
+        return sumScore;
+    }
+
+    public void setSumScore(String sumScore) {
+        this.sumScore = sumScore;
+    }
+}

+ 124 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductionshowdetails/entity/QualityCivilized.java

@@ -0,0 +1,124 @@
+package com.jeeplus.modules.deductionshowdetails.entity;
+
+import com.jeeplus.core.persistence.DataEntity;
+
+public class QualityCivilized extends DataEntity<QualityCivilized> {
+    private static final long serialVersionUID = 1L;
+    private String yearOfEvaluation;		// 评价年份
+    private String unitName;//施工单位名称
+    private String basicScore;//基础分数
+    private String reasonOne;
+    private String reasonTwo;
+    private String reasonThree;
+    private String reasonFour;
+    private String reasonFive;
+    private String reasonSix;
+    private String reasonSen;
+    private String reasonEig;
+    private String reasonNin;
+    private String sumScore;
+
+    public String getYearOfEvaluation() {
+        return yearOfEvaluation;
+    }
+
+    public void setYearOfEvaluation(String yearOfEvaluation) {
+        this.yearOfEvaluation = yearOfEvaluation;
+    }
+
+    public String getUnitName() {
+        return unitName;
+    }
+
+    public void setUnitName(String unitName) {
+        this.unitName = unitName;
+    }
+
+    public String getBasicScore() {
+        return basicScore;
+    }
+
+    public void setBasicScore(String basicScore) {
+        this.basicScore = basicScore;
+    }
+
+    public String getReasonOne() {
+        return reasonOne;
+    }
+
+    public void setReasonOne(String reasonOne) {
+        this.reasonOne = reasonOne;
+    }
+
+    public String getReasonTwo() {
+        return reasonTwo;
+    }
+
+    public void setReasonTwo(String reasonTwo) {
+        this.reasonTwo = reasonTwo;
+    }
+
+    public String getReasonThree() {
+        return reasonThree;
+    }
+
+    public void setReasonThree(String reasonThree) {
+        this.reasonThree = reasonThree;
+    }
+
+    public String getReasonFour() {
+        return reasonFour;
+    }
+
+    public void setReasonFour(String reasonFour) {
+        this.reasonFour = reasonFour;
+    }
+
+    public String getReasonFive() {
+        return reasonFive;
+    }
+
+    public void setReasonFive(String reasonFive) {
+        this.reasonFive = reasonFive;
+    }
+
+    public String getReasonSix() {
+        return reasonSix;
+    }
+
+    public void setReasonSix(String reasonSix) {
+        this.reasonSix = reasonSix;
+    }
+
+    public String getReasonSen() {
+        return reasonSen;
+    }
+
+    public void setReasonSen(String reasonSen) {
+        this.reasonSen = reasonSen;
+    }
+
+    public String getReasonEig() {
+        return reasonEig;
+    }
+
+    public void setReasonEig(String reasonEig) {
+        this.reasonEig = reasonEig;
+    }
+
+    public String getReasonNin() {
+        return reasonNin;
+    }
+
+    public void setReasonNin(String reasonNin) {
+        this.reasonNin = reasonNin;
+    }
+
+    public String getSumScore() {
+        return sumScore;
+    }
+
+    public void setSumScore(String sumScore) {
+        this.sumScore = sumScore;
+    }
+}

+ 115 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductionshowdetails/entity/SiteQuality.java

@@ -0,0 +1,115 @@
+package com.jeeplus.modules.deductionshowdetails.entity;
+
+import com.jeeplus.core.persistence.DataEntity;
+
+public class SiteQuality extends DataEntity<SiteQuality> {
+    private static final long serialVersionUID = 1L;
+    private String yearOfEvaluation;		// 评价年份
+    private String unitName;//施工单位名称
+    private String basicScore;//基础分数
+    private String reasonOne;
+    private String reasonTwo;
+    private String reasonThree;
+    private String reasonFour;
+    private String reasonFive;
+    private String reasonSix;
+    private String reasonSen;
+    private String reasonEig;
+    private String sumScore;
+
+    public String getYearOfEvaluation() {
+        return yearOfEvaluation;
+    }
+
+    public void setYearOfEvaluation(String yearOfEvaluation) {
+        this.yearOfEvaluation = yearOfEvaluation;
+    }
+
+    public String getUnitName() {
+        return unitName;
+    }
+
+    public void setUnitName(String unitName) {
+        this.unitName = unitName;
+    }
+
+    public String getBasicScore() {
+        return basicScore;
+    }
+
+    public void setBasicScore(String basicScore) {
+        this.basicScore = basicScore;
+    }
+
+    public String getReasonOne() {
+        return reasonOne;
+    }
+
+    public void setReasonOne(String reasonOne) {
+        this.reasonOne = reasonOne;
+    }
+
+    public String getReasonTwo() {
+        return reasonTwo;
+    }
+
+    public void setReasonTwo(String reasonTwo) {
+        this.reasonTwo = reasonTwo;
+    }
+
+    public String getReasonThree() {
+        return reasonThree;
+    }
+
+    public void setReasonThree(String reasonThree) {
+        this.reasonThree = reasonThree;
+    }
+
+    public String getReasonFour() {
+        return reasonFour;
+    }
+
+    public void setReasonFour(String reasonFour) {
+        this.reasonFour = reasonFour;
+    }
+
+    public String getReasonFive() {
+        return reasonFive;
+    }
+
+    public void setReasonFive(String reasonFive) {
+        this.reasonFive = reasonFive;
+    }
+
+    public String getReasonSix() {
+        return reasonSix;
+    }
+
+    public void setReasonSix(String reasonSix) {
+        this.reasonSix = reasonSix;
+    }
+
+    public String getReasonSen() {
+        return reasonSen;
+    }
+
+    public void setReasonSen(String reasonSen) {
+        this.reasonSen = reasonSen;
+    }
+
+    public String getReasonEig() {
+        return reasonEig;
+    }
+
+    public void setReasonEig(String reasonEig) {
+        this.reasonEig = reasonEig;
+    }
+
+    public String getSumScore() {
+        return sumScore;
+    }
+
+    public void setSumScore(String sumScore) {
+        this.sumScore = sumScore;
+    }
+}

+ 101 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductionshowdetails/entity/SiteSafety.java

@@ -0,0 +1,101 @@
+package com.jeeplus.modules.deductionshowdetails.entity;
+
+import com.jeeplus.core.persistence.DataEntity;
+
+/**
+ * 施工单位评价-3现场施工质量及进度评价
+ * */
+public class SiteSafety extends DataEntity<SiteSafety> {
+    private static final long serialVersionUID = 1L;
+    private String yearOfEvaluation;		// 评价年份
+    private String unitName;//施工单位名称
+    private String basicScore;//基础分数
+    private String reasonOne;
+    private String reasonTwo;
+    private String reasonThree;
+    private String reasonFour;
+    private String reasonFive;
+    private String reasonSix;
+    private String sumScore;
+
+    public String getYearOfEvaluation() {
+        return yearOfEvaluation;
+    }
+
+    public void setYearOfEvaluation(String yearOfEvaluation) {
+        this.yearOfEvaluation = yearOfEvaluation;
+    }
+
+    public String getUnitName() {
+        return unitName;
+    }
+
+    public void setUnitName(String unitName) {
+        this.unitName = unitName;
+    }
+
+    public String getBasicScore() {
+        return basicScore;
+    }
+
+    public void setBasicScore(String basicScore) {
+        this.basicScore = basicScore;
+    }
+
+    public String getReasonOne() {
+        return reasonOne;
+    }
+
+    public void setReasonOne(String reasonOne) {
+        this.reasonOne = reasonOne;
+    }
+
+    public String getReasonTwo() {
+        return reasonTwo;
+    }
+
+    public void setReasonTwo(String reasonTwo) {
+        this.reasonTwo = reasonTwo;
+    }
+
+    public String getReasonThree() {
+        return reasonThree;
+    }
+
+    public void setReasonThree(String reasonThree) {
+        this.reasonThree = reasonThree;
+    }
+
+    public String getReasonFour() {
+        return reasonFour;
+    }
+
+    public void setReasonFour(String reasonFour) {
+        this.reasonFour = reasonFour;
+    }
+
+    public String getReasonFive() {
+        return reasonFive;
+    }
+
+    public void setReasonFive(String reasonFive) {
+        this.reasonFive = reasonFive;
+    }
+
+    public String getReasonSix() {
+        return reasonSix;
+    }
+
+    public void setReasonSix(String reasonSix) {
+        this.reasonSix = reasonSix;
+    }
+
+
+    public String getSumScore() {
+        return sumScore;
+    }
+
+    public void setSumScore(String sumScore) {
+        this.sumScore = sumScore;
+    }
+}

+ 32 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductionshowdetails/mapper/DeductionShowDetailsMapper.java

@@ -0,0 +1,32 @@
+/**
+ * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.deductionshowdetails.mapper;
+
+import com.jeeplus.modules.deductionshowdetails.entity.*;
+import org.springframework.stereotype.Repository;
+import com.jeeplus.core.persistence.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * DeductionShowDetailsMAPPER接口
+ * @author 邱悦
+ * @version 2022-01-02
+ */
+@Mapper
+@Repository
+public interface DeductionShowDetailsMapper extends BaseMapper<DeductionShowDetails> {
+    List<SiteSafety> findSiteSafetyList(SiteSafety siteSafety);
+
+    List<SiteQuality> findSiteQualityList(SiteQuality siteQuality);
+
+    List<CostCompletion> findCostCompletionList(CostCompletion costCompletion);
+
+    List<QualityCivilized> findQualityCivilizedList(QualityCivilized qualityCivilized);
+
+    List<OtherPoints> findOtherPointsList(OtherPoints otherPoints);
+
+    void deleteDetails(String id);
+}

+ 494 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductionshowdetails/mapper/xml/DeductionShowDetailsMapper.xml

@@ -0,0 +1,494 @@
+<?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.jeeplus.modules.deductionshowdetails.mapper.DeductionShowDetailsMapper">
+
+	<sql id="deductionShowDetailsColumns">
+		a.id AS "id",
+		a.unitid AS "unitId",
+		a.classid AS "classId",
+		a.subclassid AS "subClassId",
+		a.yearofevaluation AS "yearOfEvaluation",
+		a.unitname AS "unitName",
+		a.bigname AS "bigName",
+		a.serialnumber AS "serialNumber",
+		a.smallname AS "smallName",
+		a.deductpoints AS "deductPoints",
+		a.deductiondetails AS "deductionDetails",
+		a.deductiondate AS "deductionDate",
+		a.veto AS "veto",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.remarks AS "remarks",
+		a.del_flag AS "delFlag"
+	</sql>
+
+	<sql id="deductionShowDetailsJoins">
+
+	</sql>
+
+	<delete id="deleteDetails">
+		delete
+		from deduction_details
+		where id = #{id}
+	</delete>
+
+
+	<select id="get" resultType="DeductionShowDetails" >
+		SELECT
+			a.id as "id",
+			a.unitid as "unitId",
+			a.classid as "classId",
+			a.subclassid as "subClassId",
+			b.yearofevaluation as "yearOfEvaluation",
+			b.unitname as "unitName",
+			c.NAME as "bigName",
+			d.serialNumber as "serialNumber",
+			d.NAME as "smallName",
+			a.deductpoints as "deductPoints",
+			a.deductiondetails as "deductionDetails",
+			a.deductiondate as "deductionDate",
+			case when a.veto = 0 then '否' else '是' end as "veto"
+		FROM
+			deduction_details a
+				LEFT JOIN lishu_construction_unit b ON a.unitId = b.id
+				LEFT JOIN evaluation_criterion c ON a.classId = c.id
+				LEFT JOIN evaluation_criterion d on a.subclassid = d.id
+		WHERE a.id = #{id}
+	</select>
+
+	<select id="findList" resultType="DeductionShowDetails" >
+		SELECT
+		a.id as "id",
+		a.unitid as "unitId",
+		a.classid as "classId",
+		a.subclassid as "subClassId",
+		b.yearofevaluation as "yearOfEvaluation",
+		b.unitname as "unitName",
+		c.NAME as "bigName",
+		d.serialNumber as "serialNumber",
+		d.NAME as "smallName",
+		a.deductpoints as "deductPoints",
+		a.deductiondetails as "deductionDetails",
+		a.deductiondate as "deductionDate",
+		case when a.veto = 0 then '否' else '是' end as "veto"
+		FROM
+		deduction_details a
+		LEFT JOIN lishu_construction_unit b ON a.unitId = b.id
+		LEFT JOIN evaluation_criterion c ON a.classId = c.id
+		LEFT JOIN evaluation_criterion d on a.subclassid = d.id
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			${dataScope}
+			<if test="id!=null and id!=''">
+				and a.id = #{id}
+			</if>
+			<if test="unitId!=null and unitId!=''">
+				and a.unitId = #{unitId}
+			</if>
+			<if test="classId!=null and classId!=''">
+				and a.classId = #{classId}
+			</if>
+			<if test="subClassId!=null and subClassId!=''">
+				and a.subClassId = #{subClassId}
+			</if>
+			<if test="yearOfEvaluation!=null and yearOfEvaluation !=''">
+				and b.yearOfEvaluation = #{yearOfEvaluation}
+			</if>
+			<if test="unitName!=null and unitName!=''">
+				AND b.unitName LIKE
+				<if test="_databaseId == 'postgre'">'%'||#{unitName}||'%'</if>
+				<if test="_databaseId == 'oracle'">'%'||#{unitName}||'%'</if>
+				<if test="_databaseId == 'mssql'">'%'+#{unitName}+'%'</if>
+				<if test="_databaseId == 'mysql'">concat('%',#{unitName},'%')</if>
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+
+	<select id="findAllList" resultType="DeductionShowDetails" >
+		SELECT
+		SELECT
+		a.id as "id",
+		a.unitid as "unitId",
+		a.classid as "classId",
+		a.subclassid as "subClassId",
+		b.yearofevaluation as "yearOfEvaluation",
+		b.unitname as "unitName",
+		c.NAME as "bigName",
+		d.serialNumber as "serialNumber",
+		d.NAME as "smallName",
+		a.deductpoints as "deductPoints",
+		a.deductiondetails as "deductionDetails",
+		a.deductiondate as "deductionDate",
+		case when a.veto = 0 then '否' else '是' end as "veto"
+		FROM
+		deduction_details a
+		LEFT JOIN lishu_construction_unit b ON a.unitId = b.id
+		LEFT JOIN evaluation_criterion c ON a.classId = c.id
+		LEFT JOIN evaluation_criterion d on a.subclassid = d.id
+		<include refid="deductionShowDetailsJoins"/>
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			${dataScope}
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+
+	<insert id="insert">
+		INSERT INTO DeductionShowDetails(
+			id,
+			unitid,
+			classid,
+			subclassid,
+			yearofevaluation,
+			unitname,
+			bigname,
+			serialnumber,
+			smallname,
+			deductpoints,
+			deductiondetails,
+			deductiondate,
+			veto,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag
+		) VALUES (
+			#{id},
+			#{unitId},
+			#{classId},
+			#{subClassId},
+			#{yearOfEvaluation},
+			#{unitName},
+			#{bigName},
+			#{serialNumber},
+			#{smallName},
+			#{deductPoints},
+			#{deductionDetails},
+			#{deductionDate},
+			#{veto},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{remarks},
+			#{delFlag}
+		)
+	</insert>
+
+	<update id="update">
+		UPDATE DeductionShowDetails SET
+			unitid = #{unitId},
+			classid = #{classId},
+			subclassid = #{subClassId},
+			yearofevaluation = #{yearOfEvaluation},
+			unitname = #{unitName},
+			bigname = #{bigName},
+			serialnumber = #{serialNumber},
+			smallname = #{smallName},
+			deductpoints = #{deductPoints},
+			deductiondetails = #{deductionDetails},
+			deductiondate = #{deductionDate},
+			veto = #{veto},
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			remarks = #{remarks}
+		WHERE id = #{id}
+	</update>
+
+
+	<!--物理删除-->
+	<update id="delete">
+		DELETE FROM DeductionShowDetails
+		WHERE id = #{id}
+	</update>
+
+	<!--逻辑删除-->
+	<update id="deleteByLogic">
+		UPDATE DeductionShowDetails SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>
+
+
+	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
+	<select id="findUniqueByProperty" resultType="DeductionShowDetails" statementType="STATEMENT">
+		select * FROM DeductionShowDetails  where ${propertyName} = '${value}'
+	</select>
+	<select id="findSiteSafetyList" resultType="com.jeeplus.modules.deductionshowdetails.entity.SiteSafety">
+		SELECT
+		@id := id,
+		a.id AS "id",
+		a.yearofevaluation,
+		a.unitname,
+		25 as "basicScore",
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '3cf0f96a99df425ca59ce47250e12ced' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '3cf0f96a99df425ca59ce47250e12ced' GROUP BY unitid ) else 0 end ) AS reasonOne,
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '82f1190c768546adad98417a51d8e3c5' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '82f1190c768546adad98417a51d8e3c5' GROUP BY unitid ) else 0 end ) AS reasonTwo,
+		(
+		CASE WHEN ( SELECT sum( veto ) FROM deduction_details WHERE unitid = @id AND subclassid = '03e5702ed8f648278f24d2eed9f85cef' GROUP BY unitid ) > 0 THEN '是' ELSE
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '03e5702ed8f648278f24d2eed9f85cef' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '03e5702ed8f648278f24d2eed9f85cef' GROUP BY unitid ) else 0 end )
+		END
+		) AS reasonThree,
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '52a13affc3c54a19a35acf12e608e33d' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '52a13affc3c54a19a35acf12e608e33d' GROUP BY unitid ) else 0 end ) AS reasonFour,
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'e944386523f648f4b219db02aec3186b' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'e944386523f648f4b219db02aec3186b' GROUP BY unitid ) else 0 end ) AS reasonFive,
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'b88060ddd070461dbc0b27ca22b599a7' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'b88060ddd070461dbc0b27ca22b599a7' GROUP BY unitid ) else 0 end ) AS reasonSix,
+		(25-(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '3cf0f96a99df425ca59ce47250e12ced' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '3cf0f96a99df425ca59ce47250e12ced' GROUP BY unitid ) else 0 end ) -
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '82f1190c768546adad98417a51d8e3c5' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '82f1190c768546adad98417a51d8e3c5' GROUP BY unitid ) else 0 end ) -
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '03e5702ed8f648278f24d2eed9f85cef' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '03e5702ed8f648278f24d2eed9f85cef' GROUP BY unitid ) else 0 end ) -
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '52a13affc3c54a19a35acf12e608e33d' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '52a13affc3c54a19a35acf12e608e33d' GROUP BY unitid ) else 0 end ) -
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'e944386523f648f4b219db02aec3186b' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'e944386523f648f4b219db02aec3186b' GROUP BY unitid ) else 0 end ) -
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'b88060ddd070461dbc0b27ca22b599a7' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'b88060ddd070461dbc0b27ca22b599a7' GROUP BY unitid ) else 0 end ) ) 	AS sumScore
+		FROM
+		lishu_construction_unit a
+		<where>
+			<if test="yearOfEvaluation!=null and yearOfEvaluation !=''">
+				and a.yearOfEvaluation = #{yearOfEvaluation}
+			</if>
+			<if test="unitName!=null and unitName!=''">
+				AND a.unitName LIKE
+				<if test="_databaseId == 'postgre'">'%'||#{unitName}||'%'</if>
+				<if test="_databaseId == 'oracle'">'%'||#{unitName}||'%'</if>
+				<if test="_databaseId == 'mssql'">'%'+#{unitName}+'%'</if>
+				<if test="_databaseId == 'mysql'">concat('%',#{unitName},'%')</if>
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	<select id="findSiteQualityList" resultType="com.jeeplus.modules.deductionshowdetails.entity.SiteQuality">
+		SELECT
+		@id := id,
+		a.id AS "id",
+		a.yearofevaluation,
+		a.unitname,
+		25 as "basicScore",
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '40d3781b833d4aa1b71e554540a2f343' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '40d3781b833d4aa1b71e554540a2f343' GROUP BY unitid ) else 0 end ) AS reasonOne,
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '272732b61c3e4433a7ea995c3c380d3f' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '272732b61c3e4433a7ea995c3c380d3f' GROUP BY unitid ) else 0 end ) AS reasonTwo,
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '508908a274c14a70a16897ae54aca5d7' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '508908a274c14a70a16897ae54aca5d7' GROUP BY unitid ) else 0 end ) AS reasonThree,
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'b268162d96be428d9426f17559143658' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'b268162d96be428d9426f17559143658' GROUP BY unitid ) else 0 end ) AS reasonFour,
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'bee7ec8b8eaa4303bd08b22b040906fe' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'bee7ec8b8eaa4303bd08b22b040906fe' GROUP BY unitid ) else 0 end ) AS reasonFive,
+		(
+		CASE WHEN ( SELECT sum( veto ) FROM deduction_details WHERE unitid = @id AND subclassid = 'aba0d89ce70c4dbdb1ab027d5b20182d' GROUP BY unitid ) > 0 THEN '是' ELSE
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'aba0d89ce70c4dbdb1ab027d5b20182d' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'aba0d89ce70c4dbdb1ab027d5b20182d' GROUP BY unitid ) else 0 end )
+		END
+		) AS reasonSix,
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'aadfb12bb0b549c6bee44c5695c11e2f' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'aadfb12bb0b549c6bee44c5695c11e2f' GROUP BY unitid ) else 0 end ) AS reasonSen,
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '7e9cdf43a4ba4db490ae03a23844b2f3' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '7e9cdf43a4ba4db490ae03a23844b2f3' GROUP BY unitid ) else 0 end ) AS reasonEig,
+		(25-(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '40d3781b833d4aa1b71e554540a2f343' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '40d3781b833d4aa1b71e554540a2f343' GROUP BY unitid ) else 0 end ) -
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '272732b61c3e4433a7ea995c3c380d3f' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '272732b61c3e4433a7ea995c3c380d3f' GROUP BY unitid ) else 0 end ) -
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '508908a274c14a70a16897ae54aca5d7' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '508908a274c14a70a16897ae54aca5d7' GROUP BY unitid ) else 0 end ) -
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'b268162d96be428d9426f17559143658' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'b268162d96be428d9426f17559143658' GROUP BY unitid ) else 0 end ) -
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'bee7ec8b8eaa4303bd08b22b040906fe' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'bee7ec8b8eaa4303bd08b22b040906fe' GROUP BY unitid ) else 0 end ) -
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'aba0d89ce70c4dbdb1ab027d5b20182d' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'aba0d89ce70c4dbdb1ab027d5b20182d' GROUP BY unitid ) else 0 end )-
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'aadfb12bb0b549c6bee44c5695c11e2f' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'aadfb12bb0b549c6bee44c5695c11e2f' GROUP BY unitid ) else 0 end )-
+		(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '7e9cdf43a4ba4db490ae03a23844b2f3' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '7e9cdf43a4ba4db490ae03a23844b2f3' GROUP BY unitid ) else 0 end ) ) 	AS sumScore
+		FROM
+		lishu_construction_unit a
+		<where>
+			<if test="yearOfEvaluation!=null and yearOfEvaluation !=''">
+				and a.yearOfEvaluation = #{yearOfEvaluation}
+			</if>
+			<if test="unitName!=null and unitName!=''">
+				AND a.unitName LIKE
+				<if test="_databaseId == 'postgre'">'%'||#{unitName}||'%'</if>
+				<if test="_databaseId == 'oracle'">'%'||#{unitName}||'%'</if>
+				<if test="_databaseId == 'mssql'">'%'+#{unitName}+'%'</if>
+				<if test="_databaseId == 'mysql'">concat('%',#{unitName},'%')</if>
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	<select id="findCostCompletionList"
+			resultType="com.jeeplus.modules.deductionshowdetails.entity.CostCompletion">
+		SELECT
+			@id := id,
+			a.id AS "id",
+			a.yearofevaluation,
+			a.unitname,
+			25 as "basicScore",
+			(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'f3cfc08e5ea24d3780bfe89c0d6c8c80' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'f3cfc08e5ea24d3780bfe89c0d6c8c80' GROUP BY unitid ) else 0 end ) AS reasonOne,
+			(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '92c068926a8041369b73708c7ff1eda8' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '92c068926a8041369b73708c7ff1eda8' GROUP BY unitid ) else 0 end ) AS reasonTwo,
+			(
+				CASE WHEN ( SELECT sum( veto ) FROM deduction_details WHERE unitid = @id AND subclassid = 'b5010972a5a44e9a8a8e1e04f5361808' GROUP BY unitid ) > 0 THEN '是' ELSE
+					(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'b5010972a5a44e9a8a8e1e04f5361808' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'b5010972a5a44e9a8a8e1e04f5361808' GROUP BY unitid ) else 0 end )
+					END
+				) AS reasonThree,
+			(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'e30f4db933ef477ca66415d0bb426dac' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'e30f4db933ef477ca66415d0bb426dac' GROUP BY unitid ) else 0 end ) AS reasonFour,
+			(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '5aabe8b2882c4de396626e7de6a712f7' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '5aabe8b2882c4de396626e7de6a712f7' GROUP BY unitid ) else 0 end ) AS reasonFive,
+			(25-(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'f3cfc08e5ea24d3780bfe89c0d6c8c80' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'f3cfc08e5ea24d3780bfe89c0d6c8c80' GROUP BY unitid ) else 0 end ) -
+			 (case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '92c068926a8041369b73708c7ff1eda8' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '92c068926a8041369b73708c7ff1eda8' GROUP BY unitid ) else 0 end ) -
+			 (case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'b5010972a5a44e9a8a8e1e04f5361808' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'b5010972a5a44e9a8a8e1e04f5361808' GROUP BY unitid ) else 0 end ) -
+			 (case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'e30f4db933ef477ca66415d0bb426dac' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'e30f4db933ef477ca66415d0bb426dac' GROUP BY unitid ) else 0 end ) -
+			 (case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '5aabe8b2882c4de396626e7de6a712f7' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '5aabe8b2882c4de396626e7de6a712f7' GROUP BY unitid ) else 0 end ) ) 	AS sumScore
+		FROM
+			lishu_construction_unit a
+		<where>
+			<if test="yearOfEvaluation!=null and yearOfEvaluation !=''">
+				and a.yearOfEvaluation = #{yearOfEvaluation}
+			</if>
+			<if test="unitName!=null and unitName!=''">
+				AND a.unitName LIKE
+				<if test="_databaseId == 'postgre'">'%'||#{unitName}||'%'</if>
+				<if test="_databaseId == 'oracle'">'%'||#{unitName}||'%'</if>
+				<if test="_databaseId == 'mssql'">'%'+#{unitName}+'%'</if>
+				<if test="_databaseId == 'mysql'">concat('%',#{unitName},'%')</if>
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	<select id="findQualityCivilizedList"
+			resultType="com.jeeplus.modules.deductionshowdetails.entity.QualityCivilized">
+		SELECT
+			@id := id,
+			a.id AS "id",
+			a.yearofevaluation,
+			a.unitname,
+			25 as "basicScore",
+			(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '06d7938f26454e15a9acae90096ae22e' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '06d7938f26454e15a9acae90096ae22e' GROUP BY unitid ) else 0 end ) AS reasonOne,
+			(
+				CASE WHEN ( SELECT sum( veto ) FROM deduction_details WHERE unitid = @id AND subclassid = 'fc2a636927124952a2f1d08e0b15a0ee' GROUP BY unitid ) > 0 THEN '是' ELSE
+					(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'fc2a636927124952a2f1d08e0b15a0ee' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'fc2a636927124952a2f1d08e0b15a0ee' GROUP BY unitid ) else 0 end )
+					END
+				) AS reasonTwo,
+			(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'd14955b9c9b744d9ad10b1379c1815d9' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'd14955b9c9b744d9ad10b1379c1815d9' GROUP BY unitid ) else 0 end ) AS reasonThree,
+			(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'af5800c001514d21be011b1826029d99' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'af5800c001514d21be011b1826029d99' GROUP BY unitid ) else 0 end ) AS reasonFour,
+			(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'daabb42eb3174605996db0bede6def63' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'daabb42eb3174605996db0bede6def63' GROUP BY unitid ) else 0 end ) AS reasonFive,
+			(
+				CASE WHEN ( SELECT sum( veto ) FROM deduction_details WHERE unitid = @id AND subclassid = '922e9d5cf8e1465ba929836749b8b309' GROUP BY unitid ) > 0 THEN '是' ELSE
+					(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '922e9d5cf8e1465ba929836749b8b309' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '922e9d5cf8e1465ba929836749b8b309' GROUP BY unitid ) else 0 end )
+					END
+				) AS reasonSix,
+			(
+				CASE WHEN ( SELECT sum( veto ) FROM deduction_details WHERE unitid = @id AND subclassid = '578c1507c2984143abb78377b248a672' GROUP BY unitid ) > 0 THEN '是' ELSE
+					(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '578c1507c2984143abb78377b248a672' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '578c1507c2984143abb78377b248a672' GROUP BY unitid ) else 0 end )
+					END
+				) AS reasonSen,
+			(
+				CASE WHEN ( SELECT sum( veto ) FROM deduction_details WHERE unitid = @id AND subclassid = '8cadcc3844dc4ef485964b2bc43abcfb' GROUP BY unitid ) > 0 THEN '是' ELSE
+					(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '8cadcc3844dc4ef485964b2bc43abcfb' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '8cadcc3844dc4ef485964b2bc43abcfb' GROUP BY unitid ) else 0 end )
+					END
+				) AS reasonEig,
+			(
+				CASE WHEN ( SELECT sum( veto ) FROM deduction_details WHERE unitid = @id AND subclassid = '70ed4b0c8a0443d586f9f9c97a044c41' GROUP BY unitid ) > 0 THEN '是' ELSE
+					(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '70ed4b0c8a0443d586f9f9c97a044c41' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '70ed4b0c8a0443d586f9f9c97a044c41' GROUP BY unitid ) else 0 end )
+					END
+				) AS reasonNin,
+			(25-(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '06d7938f26454e15a9acae90096ae22e' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '06d7938f26454e15a9acae90096ae22e' GROUP BY unitid ) else 0 end ) -
+			 (case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'fc2a636927124952a2f1d08e0b15a0ee' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'fc2a636927124952a2f1d08e0b15a0ee' GROUP BY unitid ) else 0 end ) -
+			 (case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'd14955b9c9b744d9ad10b1379c1815d9' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'd14955b9c9b744d9ad10b1379c1815d9' GROUP BY unitid ) else 0 end ) -
+			 (case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'af5800c001514d21be011b1826029d99' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'af5800c001514d21be011b1826029d99' GROUP BY unitid ) else 0 end ) -
+			 (case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'daabb42eb3174605996db0bede6def63' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = 'daabb42eb3174605996db0bede6def63' GROUP BY unitid ) else 0 end )  -
+			 (case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '922e9d5cf8e1465ba929836749b8b309' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '922e9d5cf8e1465ba929836749b8b309' GROUP BY unitid ) else 0 end ) -
+			 (case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '578c1507c2984143abb78377b248a672' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '578c1507c2984143abb78377b248a672' GROUP BY unitid ) else 0 end ) -
+			 (case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '8cadcc3844dc4ef485964b2bc43abcfb' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '8cadcc3844dc4ef485964b2bc43abcfb' GROUP BY unitid ) else 0 end ) -
+			 (case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '70ed4b0c8a0443d586f9f9c97a044c41' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '70ed4b0c8a0443d586f9f9c97a044c41' GROUP BY unitid ) else 0 end )) 	AS sumScore
+		FROM
+			lishu_construction_unit a
+		<where>
+			<if test="yearOfEvaluation!=null and yearOfEvaluation !=''">
+				and a.yearOfEvaluation = #{yearOfEvaluation}
+			</if>
+			<if test="unitName!=null and unitName!=''">
+				AND a.unitName LIKE
+				<if test="_databaseId == 'postgre'">'%'||#{unitName}||'%'</if>
+				<if test="_databaseId == 'oracle'">'%'||#{unitName}||'%'</if>
+				<if test="_databaseId == 'mssql'">'%'+#{unitName}+'%'</if>
+				<if test="_databaseId == 'mysql'">concat('%',#{unitName},'%')</if>
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	<select id="findOtherPointsList" resultType="com.jeeplus.modules.deductionshowdetails.entity.OtherPoints">
+		SELECT
+			@id := id,
+			a.id AS "id",
+			a.yearofevaluation,
+			a.unitname,
+			(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '324d659b184b40068f9524848729070f' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '324d659b184b40068f9524848729070f' GROUP BY unitid ) else 0 end ) AS reasonOne,
+			(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '2da85bc46a474f5fabab19a456b3f09c' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '2da85bc46a474f5fabab19a456b3f09c' GROUP BY unitid ) else 0 end ) AS reasonTwo,
+			(case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '6f3134f09f404a0db5c7f3ccf9830993' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '6f3134f09f404a0db5c7f3ccf9830993' GROUP BY unitid ) else 0 end ) AS reasonThree,
+			(
+				CASE WHEN ( SELECT sum( veto ) FROM deduction_details WHERE unitid = @id AND subclassid = '8c72c9a41d5445dc80e43efe90f9eec8' GROUP BY unitid ) > 0 THEN '是' ELSE '否'
+					END
+				) AS reasonFour,
+			(
+				CASE WHEN ( SELECT sum( veto ) FROM deduction_details WHERE unitid = @id AND subclassid = '0c242a74d37c4005a45655329e8cb178' GROUP BY unitid ) > 0 THEN '是' ELSE '否'
+					END
+				) AS reasonFive,
+			(
+				CASE WHEN ( SELECT sum( veto ) FROM deduction_details WHERE unitid = @id AND subclassid = 'be115e9ac0c841d5b475743be8499f4c' GROUP BY unitid ) > 0 THEN '是' ELSE '否'
+					END
+				) AS reasonSix,
+			((case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '324d659b184b40068f9524848729070f' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '324d659b184b40068f9524848729070f' GROUP BY unitid ) else 0 end ) +
+			 (case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '2da85bc46a474f5fabab19a456b3f09c' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '2da85bc46a474f5fabab19a456b3f09c' GROUP BY unitid ) else 0 end ) -
+			 (case when ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '6f3134f09f404a0db5c7f3ccf9830993' GROUP BY unitid ) is not null then ( SELECT sum( deductpoints ) FROM deduction_details WHERE unitid = @id AND subclassid = '6f3134f09f404a0db5c7f3ccf9830993' GROUP BY unitid ) else 0 end ) ) 	AS sumScore
+		FROM
+			lishu_construction_unit a
+		<where>
+			<if test="yearOfEvaluation!=null and yearOfEvaluation !=''">
+				and a.yearOfEvaluation = #{yearOfEvaluation}
+			</if>
+			<if test="unitName!=null and unitName!=''">
+				AND a.unitName LIKE
+				<if test="_databaseId == 'postgre'">'%'||#{unitName}||'%'</if>
+				<if test="_databaseId == 'oracle'">'%'||#{unitName}||'%'</if>
+				<if test="_databaseId == 'mssql'">'%'+#{unitName}+'%'</if>
+				<if test="_databaseId == 'mysql'">concat('%',#{unitName},'%')</if>
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+
+</mapper>

+ 88 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductionshowdetails/service/DeductionShowDetailsService.java

@@ -0,0 +1,88 @@
+/**
+ * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.deductionshowdetails.service;
+
+import java.util.List;
+
+import com.jeeplus.modules.deductionshowdetails.entity.*;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.service.CrudService;
+import com.jeeplus.modules.deductionshowdetails.mapper.DeductionShowDetailsMapper;
+
+/**
+ * DeductionShowDetailsService
+ *
+ * @author 邱悦
+ * @version 2022-01-02
+ */
+@Service
+@Transactional(readOnly = true)
+public class DeductionShowDetailsService extends CrudService<DeductionShowDetailsMapper, DeductionShowDetails> {
+
+	public DeductionShowDetails get(String id) {
+		return super.get(id);
+	}
+
+	public List<DeductionShowDetails> findList(DeductionShowDetails deductionShowDetails) {
+		return super.findList(deductionShowDetails);
+	}
+
+	public Page<DeductionShowDetails> findPage(Page<DeductionShowDetails> page, DeductionShowDetails deductionShowDetails) {
+		return super.findPage(page, deductionShowDetails);
+	}
+
+	@Transactional(readOnly = false)
+	public void save(DeductionShowDetails deductionShowDetails) {
+		super.save(deductionShowDetails);
+	}
+
+	@Transactional(readOnly = false)
+	public void delete(DeductionShowDetails deductionShowDetails) {
+		super.delete(deductionShowDetails);
+	}
+
+
+	public Page<SiteSafety> findSiteSafetyList(Page<SiteSafety> page, SiteSafety siteSafety) {
+		dataRuleFilter(siteSafety);
+		siteSafety.setPage(page);
+		page.setList(mapper.findSiteSafetyList(siteSafety));
+		return page;
+	}
+
+	public Page<SiteQuality> findSiteQualityList(Page<SiteQuality> page, SiteQuality siteQuality) {
+		dataRuleFilter(siteQuality);
+		siteQuality.setPage(page);
+		page.setList(mapper.findSiteQualityList(siteQuality));
+		return page;
+	}
+
+	public Page<CostCompletion> findCostCompletionList(Page<CostCompletion> page, CostCompletion costCompletion) {
+		dataRuleFilter(costCompletion);
+		costCompletion.setPage(page);
+		page.setList(mapper.findCostCompletionList(costCompletion));
+		return page;
+	}
+
+	public Page<QualityCivilized> findQualityCivilizedList(Page<QualityCivilized> page, QualityCivilized qualityCivilized) {
+		dataRuleFilter(qualityCivilized);
+		qualityCivilized.setPage(page);
+		page.setList(mapper.findQualityCivilizedList(qualityCivilized));
+		return page;
+	}
+
+	public Page<OtherPoints> findOtherPointsList(Page<OtherPoints> page, OtherPoints otherPoints) {
+		dataRuleFilter(otherPoints);
+		otherPoints.setPage(page);
+		page.setList(mapper.findOtherPointsList(otherPoints));
+		return page;
+	}
+
+	@Transactional(readOnly = false)
+	public void deleteDetails(String id) {
+		mapper.deleteDetails(id);
+	}
+}

+ 221 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/modules/deductionshowdetails/web/DeductionShowDetailsController.java

@@ -0,0 +1,221 @@
+/**
+ * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.deductionshowdetails.web;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.ConstraintViolationException;
+
+import com.jeeplus.modules.deductionshowdetails.entity.*;
+import org.apache.shiro.authz.annotation.Logical;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.json.AjaxJson;
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.web.BaseController;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
+import com.jeeplus.common.utils.excel.ImportExcel;
+import com.jeeplus.modules.deductionshowdetails.service.DeductionShowDetailsService;
+
+/**
+ * DeductionShowDetailsController
+ * @author 邱悦
+ * @version 2022-01-02
+ */
+@RestController
+@RequestMapping(value = "/deductionShowDetails/deductionShowDetails")
+public class DeductionShowDetailsController extends BaseController {
+
+	@Autowired
+	private DeductionShowDetailsService deductionShowDetailsService;
+
+	@ModelAttribute
+	public DeductionShowDetails get(@RequestParam(required=false) String id) {
+		DeductionShowDetails entity = null;
+		if (StringUtils.isNotBlank(id)){
+			entity = deductionShowDetailsService.get(id);
+		}
+		if (entity == null){
+			entity = new DeductionShowDetails();
+		}
+		return entity;
+	}
+
+	/**
+	 * 扣分详细列表数据
+	 */
+	@RequiresPermissions("deductionShowDetails:deductionShowDetails:list")
+	@GetMapping("list")
+	public AjaxJson list(DeductionShowDetails deductionShowDetails, HttpServletRequest request, HttpServletResponse response) {
+		Page<DeductionShowDetails> page = deductionShowDetailsService.findPage(new Page<DeductionShowDetails>(request, response), deductionShowDetails);
+		return AjaxJson.success().put("page",page);
+	}
+
+	/**
+	 * 根据Id获取扣分详细数据
+	 */
+	@RequiresPermissions(value={"deductionShowDetails:deductionShowDetails:view","deductionShowDetails:deductionShowDetails:add","deductionShowDetails:deductionShowDetails:edit"},logical=Logical.OR)
+	@GetMapping("queryById")
+	public AjaxJson queryById(DeductionShowDetails deductionShowDetails) {
+		return AjaxJson.success().put("deductionShowDetails", deductionShowDetails);
+	}
+
+	/**
+	 * 保存扣分详细
+	 */
+	@RequiresPermissions(value={"deductionShowDetails:deductionShowDetails:add","deductionShowDetails:deductionShowDetails:edit"},logical=Logical.OR)
+	@PostMapping("save")
+	public AjaxJson save(DeductionShowDetails deductionShowDetails, Model model) throws Exception{
+		/**
+		 * 后台hibernate-validation插件校验
+		 */
+		String errMsg = beanValidator(deductionShowDetails);
+		if (StringUtils.isNotBlank(errMsg)){
+			return AjaxJson.error(errMsg);
+		}
+		//新增或编辑表单保存
+		deductionShowDetailsService.save(deductionShowDetails);//保存
+		return AjaxJson.success("保存扣分详细成功");
+	}
+
+
+	/**
+	 * 批量删除扣分详细
+	 */
+	@RequiresPermissions("deductionShowDetails:deductionShowDetails:del")
+	@DeleteMapping("delete")
+	public AjaxJson delete(String ids) {
+		String idArray[] =ids.split(",");
+		for(String id : idArray){
+			deductionShowDetailsService.deleteDetails(id);
+		}
+		return AjaxJson.success("删除扣分详细成功");
+	}
+
+	/**
+	 * 导出excel文件
+	 */
+	@RequiresPermissions("deductionShowDetails:deductionShowDetails:export")
+    @GetMapping("export")
+    public AjaxJson exportFile(DeductionShowDetails deductionShowDetails, HttpServletRequest request, HttpServletResponse response) {
+		try {
+            String fileName = "扣分详细"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
+            Page<DeductionShowDetails> page = deductionShowDetailsService.findPage(new Page<DeductionShowDetails>(request, response, -1), deductionShowDetails);
+    		new ExportExcel("扣分详细", DeductionShowDetails.class).setDataList(page.getList()).write(response, fileName).dispose();
+    		return null;
+		} catch (Exception e) {
+			return AjaxJson.error("导出扣分详细记录失败!失败信息:"+e.getMessage());
+		}
+    }
+
+	/**
+	 * 导入Excel数据
+
+	 */
+	@RequiresPermissions("deductionShowDetails:deductionShowDetails:import")
+    @PostMapping("import")
+   	public AjaxJson importFile(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request) {
+		try {
+			int successNum = 0;
+			int failureNum = 0;
+			StringBuilder failureMsg = new StringBuilder();
+			ImportExcel ei = new ImportExcel(file, 1, 0);
+			List<DeductionShowDetails> list = ei.getDataList(DeductionShowDetails.class);
+			for (DeductionShowDetails deductionShowDetails : list){
+				try{
+					deductionShowDetailsService.save(deductionShowDetails);
+					successNum++;
+				}catch(ConstraintViolationException ex){
+					failureNum++;
+				}catch (Exception ex) {
+					failureNum++;
+				}
+			}
+			if (failureNum>0){
+				failureMsg.insert(0, ",失败 "+failureNum+" 条扣分详细记录。");
+			}
+			return AjaxJson.success( "已成功导入 "+successNum+" 条扣分详细记录"+failureMsg);
+		} catch (Exception e) {
+			return AjaxJson.error("导入扣分详细失败!失败信息:"+e.getMessage());
+		}
+    }
+
+	/**
+	 * 下载导入扣分详细数据模板
+	 */
+	@RequiresPermissions("deductionShowDetails:deductionShowDetails:import")
+    @GetMapping("import/template")
+     public AjaxJson importFileTemplate(HttpServletResponse response) {
+		try {
+            String fileName = "扣分详细数据导入模板.xlsx";
+    		List<DeductionShowDetails> list = Lists.newArrayList();
+    		new ExportExcel("扣分详细数据", DeductionShowDetails.class, 1).setDataList(list).write(response, fileName).dispose();
+    		return null;
+		} catch (Exception e) {
+			return AjaxJson.error( "导入模板下载失败!失败信息:"+e.getMessage());
+		}
+    }
+
+
+
+
+	/**
+	 * 扣分详细列表数据
+	 */
+	@GetMapping("siteQualityList")
+	public AjaxJson siteQualityList(SiteQuality siteQuality, HttpServletRequest request, HttpServletResponse response) {
+		Page<SiteQuality> page = deductionShowDetailsService.findSiteQualityList(new Page<SiteQuality>(request, response), siteQuality);
+		return AjaxJson.success().put("page",page);
+	}
+
+	/**
+	 * 扣分详细列表数据
+	 */
+	@GetMapping("siteSafetyList")
+	public AjaxJson siteSafetyList(SiteSafety siteSafety, HttpServletRequest request, HttpServletResponse response) {
+		Page<SiteSafety> page = deductionShowDetailsService.findSiteSafetyList(new Page<SiteSafety>(request, response), siteSafety);
+		return AjaxJson.success().put("page",page);
+	}
+
+	/**
+	 * 扣分详细列表数据
+	 */
+	@GetMapping("costCompletionList")
+	public AjaxJson costCompletionList(CostCompletion costCompletion, HttpServletRequest request, HttpServletResponse response) {
+		Page<CostCompletion> page = deductionShowDetailsService.findCostCompletionList(new Page<CostCompletion>(request, response), costCompletion);
+		return AjaxJson.success().put("page",page);
+	}
+	/**
+	 * 扣分详细列表数据
+	 */
+	@GetMapping("qualityCivilizedList")
+	public AjaxJson qualityCivilizedList(QualityCivilized qualityCivilized, HttpServletRequest request, HttpServletResponse response) {
+		Page<QualityCivilized> page = deductionShowDetailsService.findQualityCivilizedList(new Page<QualityCivilized>(request, response), qualityCivilized);
+		return AjaxJson.success().put("page",page);
+	}
+	/**
+	 * 扣分详细列表数据
+	 */
+	@GetMapping("otherPointsList")
+	public AjaxJson otherPointsList(OtherPoints otherPoints, HttpServletRequest request, HttpServletResponse response) {
+		Page<OtherPoints> page = deductionShowDetailsService.findOtherPointsList(new Page<OtherPoints>(request, response), otherPoints);
+		return AjaxJson.success().put("page",page);
+	}
+
+}