企业修改

This commit is contained in:
guoshengxiong 2024-05-29 21:49:43 +08:00
parent 3765e4e757
commit 3c75f9cedf
3 changed files with 82 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package com.zhgd.xmgl.modules.project.entity;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
@ -168,6 +169,19 @@ public class ProjectEnterprise implements Serializable {
@ApiModelProperty(value = "项目类型(字典)") @ApiModelProperty(value = "项目类型(字典)")
private java.lang.Integer cbsProjectType; private java.lang.Integer cbsProjectType;
@TableField(exist = false)
@ApiModelProperty(value = "项目类型(字典)名称")
private java.lang.String cbsProjectTypeName;
@TableField(exist = false)
@ApiModelProperty(value = "施工阶段名称")
private java.lang.String constructionStageName;
@TableField(exist = false)
@ApiModelProperty(value = "结构类型名称")
private java.lang.String structureTypeName;
@TableField(exist = false)
@ApiModelProperty(value = "工程类别名称")
private java.lang.String projectTypeName;
} }

View File

@ -26,6 +26,58 @@
di.dictionary_encoding = CONCAT( 'project_enterprise_cbs_project_type_', #{param.projectSn} )) > 0,( di.dictionary_encoding = CONCAT( 'project_enterprise_cbs_project_type_', #{param.projectSn} )) > 0,(
CONCAT( 'project_enterprise_cbs_project_type_', #{param.projectSn} )),'project_enterprise_cbs_project_type') CONCAT( 'project_enterprise_cbs_project_type_', #{param.projectSn} )),'project_enterprise_cbs_project_type')
</sql> </sql>
<sql id="constructionStageDicMap">
SELECT
*
FROM
dictionary_item
WHERE
dictionary_encoding =
IF
((
SELECT
COUNT(*)
FROM
dictionary_item di
WHERE
di.dictionary_encoding = CONCAT( 'project_construction_stage_', #{param.projectSn} )) > 0,(
CONCAT( 'project_construction_stage_', #{param.projectSn} )),'project_construction_stage')
</sql>
<sql id="projectStructureTypeDicMap">
SELECT
*
FROM
dictionary_item
WHERE
dictionary_encoding =
IF
((
SELECT
COUNT(*)
FROM
dictionary_item di
WHERE
di.dictionary_encoding = CONCAT( 'project_structure_type_', #{param.projectSn} )) > 0,(
CONCAT( 'project_structure_type_', #{param.projectSn} )),'project_structure_type')
</sql>
<sql id="projectTypeDicMap">
SELECT
*
FROM
dictionary_item
WHERE
dictionary_encoding =
IF
((
SELECT
COUNT(*)
FROM
dictionary_item di
WHERE
di.dictionary_encoding = CONCAT( 'project_type_', #{param.projectSn} )) > 0,(
CONCAT( 'project_type_', #{param.projectSn} )),'project_type')
</sql>
<select id="selectProjectEnterprisePage" resultMap="selectProjectEnterprisePageMap"> <select id="selectProjectEnterprisePage" resultMap="selectProjectEnterprisePageMap">
SELECT a.*, SELECT a.*,
b.id b.id

View File

@ -77,13 +77,28 @@
b.project_build_area as pe_project_build_area, b.project_build_area as pe_project_build_area,
b.completion_date as pe_completion_date, b.completion_date as pe_completion_date,
b.cbs_project_type as pe_cbs_project_type, b.cbs_project_type as pe_cbs_project_type,
t1.name as pe_cbs_project_type_name t1.name as pe_cbs_project_type_name,
t2.name as pe_construction_stage_name,
t3.name as pe_structure_type_name,
t4.name as pe_project_type_name
from enterprise_info a from enterprise_info a
INNER JOIN project_enterprise b ON a.id = b.enterprise_id INNER JOIN project_enterprise b ON a.id = b.enterprise_id
left join ( left join (
<include refid="com.zhgd.xmgl.modules.project.mapper.ProjectEnterpriseMapper.dicMap"> <include refid="com.zhgd.xmgl.modules.project.mapper.ProjectEnterpriseMapper.dicMap">
</include> </include>
) t1 on t1.data = b.cbs_project_type ) t1 on t1.data = b.cbs_project_type
left join (
<include refid="com.zhgd.xmgl.modules.project.mapper.ProjectEnterpriseMapper.constructionStageDicMap">
</include>
) t2 on t2.data = b.construction_stage
left join (
<include refid="com.zhgd.xmgl.modules.project.mapper.ProjectEnterpriseMapper.projectStructureTypeDicMap">
</include>
) t3 on t3.data = b.structure_type
left join (
<include refid="com.zhgd.xmgl.modules.project.mapper.ProjectEnterpriseMapper.projectTypeDicMap">
</include>
) t4 on t4.data = b.project_type
LEFT JOIN enterprise_type c ON b.enterprise_type_id = c.id LEFT JOIN enterprise_type c ON b.enterprise_type_id = c.id
WHERE b.project_sn = #{projectSn} WHERE b.project_sn = #{projectSn}
and a.id = #{enterpriseId} and a.id = #{enterpriseId}