From 4addd4f491e4b682315d19cf1e09feb0c34eb3ff Mon Sep 17 00:00:00 2001
From: 邱宇豪 <qyh123230312>
Date: 星期二, 19 九月 2023 16:24:32 +0800
Subject: [PATCH] 完成查询项目管理列表
---
hd/pipe/engineeringManage/src/main/resources/mapping/SysProjectMapper.xml | 113 +++++++++++++++++++++++++++++++++----
hd/pipe/engineeringManage/src/main/java/com/thhy/engineering/modules/biz/engineering/entity/SysProject.java | 61 ++++++++++++++++++++
2 files changed, 160 insertions(+), 14 deletions(-)
diff --git a/hd/pipe/engineeringManage/src/main/java/com/thhy/engineering/modules/biz/engineering/entity/SysProject.java b/hd/pipe/engineeringManage/src/main/java/com/thhy/engineering/modules/biz/engineering/entity/SysProject.java
index 34c7234..87b48ec 100644
--- a/hd/pipe/engineeringManage/src/main/java/com/thhy/engineering/modules/biz/engineering/entity/SysProject.java
+++ b/hd/pipe/engineeringManage/src/main/java/com/thhy/engineering/modules/biz/engineering/entity/SysProject.java
@@ -74,6 +74,67 @@
private String companyName;
/**
+ * 建设单位
+ */
+ private String createUnit;
+
+ /**
+ * 设计单位
+ */
+ private String planUnit;
+
+ /**
+ * 监理单位
+ */
+ private String supervisionUnit;
+
+ /**
+ * 施工单位
+ */
+ private String constructionUnit;
+
+ /**
+ * 外径
+ */
+ private Double outsideDiameter;
+
+ /**
+ * 内径
+ */
+ private Double innerDiameter;
+
+ /**
+ * 厚度
+ */
+ private Double thickness;
+
+ /**
+ * 环宽
+ */
+ private Double ringWidth;
+
+ /**
+ * 混凝土强度等级
+ */
+ private String concreteStrengthGrade;
+
+ /**
+ * 抗渗等级
+ */
+ private String impermeabilityLevel;
+
+ /**
+ * 有无外弧面防水
+ */
+ private Integer waterproofType;
+
+ /**
+ * 已完成数量
+ */
+ private Integer completedQuantity;
+
+
+ /**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table sys_project
*
diff --git a/hd/pipe/engineeringManage/src/main/resources/mapping/SysProjectMapper.xml b/hd/pipe/engineeringManage/src/main/resources/mapping/SysProjectMapper.xml
index 5ee6b82..9d0e4e3 100644
--- a/hd/pipe/engineeringManage/src/main/resources/mapping/SysProjectMapper.xml
+++ b/hd/pipe/engineeringManage/src/main/resources/mapping/SysProjectMapper.xml
@@ -7,17 +7,29 @@
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Fri Mar 31 12:43:12 CST 2023.
-->
- <id column="pro_id" jdbcType="VARCHAR" property="proId" />
- <result column="pro_name" jdbcType="VARCHAR" property="proName" />
- <result column="pro_desc" jdbcType="VARCHAR" property="proDesc" />
- <result column="start_date" jdbcType="TIMESTAMP" property="startDate" />
- <result column="pro_time" jdbcType="INTEGER" property="proTime" />
- <result column="plan_output" jdbcType="INTEGER" property="planOutput" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="create_user" jdbcType="VARCHAR" property="createUser" />
- <result column="pro_number" jdbcType="VARCHAR" property="proNumber" />
- <result column="company_id" jdbcType="VARCHAR" property="companyId" />
- <result column="company_name" jdbcType="VARCHAR" property="companyName" />
+ <id column="pro_id" jdbcType="VARCHAR" property="proId" />
+ <result column="pro_name" jdbcType="VARCHAR" property="proName" />
+ <result column="pro_desc" jdbcType="VARCHAR" property="proDesc" />
+ <result column="start_date" jdbcType="TIMESTAMP" property="startDate" />
+ <result column="pro_time" jdbcType="INTEGER" property="proTime" />
+ <result column="plan_output" jdbcType="INTEGER" property="planOutput" />
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+ <result column="create_user" jdbcType="VARCHAR" property="createUser" />
+ <result column="pro_number" jdbcType="VARCHAR" property="proNumber" />
+ <result column="company_id" jdbcType="VARCHAR" property="companyId" />
+ <result column="create_unit" jdbcType="VARCHAR" property="createUnit" />
+ <result column="plan_unit" jdbcType="VARCHAR" property="planUnit" />
+ <result column="supervision_unit" jdbcType="VARCHAR" property="supervisionUnit" />
+ <result column="construction_unit" jdbcType="VARCHAR" property="constructionUnit" />
+ <result column="outside_diameter" jdbcType="DOUBLE" property="outsideDiameter" />
+ <result column="inner_diameter" jdbcType="DOUBLE" property="innerDiameter" />
+ <result column="thickness" jdbcType="DOUBLE" property="thickness" />
+ <result column="ring_width" jdbcType="DOUBLE" property="ringWidth" />
+ <result column="concrete_strength_grade" jdbcType="VARCHAR" property="concreteStrengthGrade" />
+ <result column="impermeability_level" jdbcType="VARCHAR" property="impermeabilityLevel" />
+ <result column="waterproof_type" jdbcType="INTEGER" property="waterproofType" />
+ <result column="company_name" jdbcType="VARCHAR" property="companyName" />
+ <result column="completed_quantity" jdbcType="INTEGER" property="completedQuantity" />
</resultMap>
@@ -59,6 +71,40 @@
<if test="companyId != null">
company_id,
</if>
+ <if test="createUnit != null">
+ create_unit,
+ </if>
+ <if test="planUnit != null">
+ plan_unit,
+ </if>
+ <if test="supervisionUnit != null">
+ supervision_unit,
+ </if>
+ <if test="constructionUnit != null">
+ construction_unit,
+ </if>
+ <if test="outsideDiameter != null">
+ outside_diameter,
+ </if>
+ <if test="innerDiameter != null">
+ inner_diameter,
+ </if>
+ <if test="thickness != null">
+ thickness,
+ </if>
+ <if test="ringWidth != null">
+ ring_width,
+ </if>
+ <if test="concreteStrengthGrade != null">
+ concrete_strength_grade,
+ </if>
+ <if test="impermeabilityLevel != null">
+ impermeability_level,
+ </if>
+ <if test="waterproofType != null">
+ waterproof_type,
+ </if>
+
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="proId != null">
@@ -91,6 +137,39 @@
<if test="companyId != null">
#{companyId,jdbcType=VARCHAR},
</if>
+ <if test="createUnit != null">
+ #{createUnit,jdbcType=VARCHAR},
+ </if>
+ <if test="planUnit != null">
+ #{planUnit,jdbcType=VARCHAR},
+ </if>
+ <if test="supervisionUnit != null">
+ #{supervisionUnit,jdbcType=VARCHAR},
+ </if>
+ <if test="constructionUnit != null">
+ #{constructionUnit,jdbcType=VARCHAR},
+ </if>
+ <if test="outsideDiameter != null">
+ #{outsideDiameter,jdbcType=DOUBLE},
+ </if>
+ <if test="innerDiameter != null">
+ #{innerDiameter,jdbcType=DOUBLE},
+ </if>
+ <if test="thickness != null">
+ #{thickness,jdbcType=DOUBLE},
+ </if>
+ <if test="ringWidth != null">
+ #{ringWidth,jdbcType=DOUBLE},
+ </if>
+ <if test="concreteStrengthGrade != null">
+ #{concreteStrengthGrade,jdbcType=VARCHAR},
+ </if>
+ <if test="impermeabilityLevel != null">
+ #{impermeabilityLevel,jdbcType=VARCHAR},
+ </if>
+ <if test="waterproofType != null">
+ #{waterproofType,jdbcType=VARCHAR},
+ </if>
</trim>
</insert>
<insert id="proTurnsInsert" >
@@ -221,15 +300,21 @@
</trim>
</insert>
<select id="projectList" resultMap="BaseResultMap">
- select sp.*,sc.company_name from sys_project sp
- left join sys_company sc on sp.company_id=sc.company_id
- where sp.is_use=1
+ select
+ sp.*,
+ sc.company_name,
+ COUNT(tpi.pro_id) completed_quantity
+ from sys_project sp
+ left join sys_company sc on sp.company_id=sc.company_id
+ left join (SELECT pro_id FROM t_pipe_info WHERE check_result in (1,2,3)) tpi on tpi.pro_id = sp.pro_id
+ where sp.is_use=1
<if test="proName!=null and proName!='' ">
and sp.pro_name like concat('%',#{proName},'%')
</if>
<if test="companyId!=null and companyId!='' ">
and sp.company_id=#{companyId}
</if>
+ GROUP BY sp.pro_id
order by sp.create_time desc
</select>
<select id="proBlokSelect" parameterType="java.lang.String" resultType="com.thhy.engineering.modules.biz.engineering.entity.ProSunDto.SysProBlok">
--
Gitblit v1.9.3