feat(project): 添加企业类型字段支持筛选功能

dev_change0814_page
zhaokai 2026-08-19 17:57:58 +08:00
parent 431b05bf94
commit 7bee091880
4 changed files with 18 additions and 1 deletions

View File

@ -22,6 +22,9 @@ public class CorpStatisticsCO implements Serializable {
@ApiModelProperty(value = "企业名称")
private String corpinfoName;
@ApiModelProperty(value = "企业类型(0-普通企业1-集团单位2-股份单位3-相关方企业4-货主单位5-驻港单位)")
private Integer type;
@ApiModelProperty(value = "重点作业总数")
private Integer totalProjectCount;

View File

@ -27,5 +27,8 @@ public class CorpStatisticsPageQry extends PageQuery {
@ApiModelProperty(value = "公司名称")
private String corpinfoName;
@ApiModelProperty(value = "企业类型(0-普通企业1-集团单位2-股份单位3-相关方企业4-货主单位5-驻港单位)")
private Integer type;
}

View File

@ -21,6 +21,9 @@ public class CorpStatisticsDO implements Serializable {
@ApiModelProperty(value = "企业名称")
private String corpinfoName;
@ApiModelProperty(value = "企业类型(0-普通企业1-集团单位2-股份单位3-相关方企业4-货主单位5-驻港单位)")
private Integer type;
@ApiModelProperty(value = "重点作业总数")
private Integer totalProjectCount;

View File

@ -221,6 +221,7 @@
<select id="corpStatistics" resultType="com.zcloud.key.project.persistence.dataobject.project.CorpStatisticsDO">
SELECT cp.id AS corpinfoId,
cp.corp_name AS corpinfoName,
cp.type AS type,
COUNT(distinct kp.id) AS totalProjectCount,
COUNT(DISTINCT CASE WHEN kp.apply_status in (4) THEN kp.id END) AS startCount,
COUNT(DISTINCT CASE WHEN kp.apply_status = 6 THEN kp.id END) AS completeCount,
@ -267,7 +268,14 @@
) hz ON hz.find_corp_id = cp.id
WHERE cp.delete_enum = 'FALSE'
AND cp.use_flag = 1
AND cp.type IN (0, 1, 2, 6)
<choose>
<when test="params.type != null">
AND cp.type = #{params.type}
</when>
<otherwise>
AND cp.type IN (0, 1, 2, 6)
</otherwise>
</choose>
<if test="params.corpinfoName != null and params.corpinfoName != ''">
AND cp.corp_name like concat('%',#{params.corpinfoName},'%')
</if>