This commit is contained in:
cwchen 2024-03-18 10:02:51 +08:00
parent b76523e154
commit 3d1f02c07e
3 changed files with 39 additions and 18 deletions

View File

@ -21,4 +21,7 @@ public class GxPlanDto {
@ApiModelProperty(value = "关键字") @ApiModelProperty(value = "关键字")
private String keyWord; private String keyWord;
@ApiModelProperty(value = "工程类型 变电/线路")
private String proType;
} }

View File

@ -252,16 +252,26 @@
tgp.end_time AS endTime, tgp.end_time AS endTime,
tgp.dela_reason AS delaReason, tgp.dela_reason AS delaReason,
tgp.bid_code AS bidCode, tgp.bid_code AS bidCode,
<if test="proType == '变电'">
sd.dict_name AS gxName, sd.dict_name AS gxName,
IFNULL(sd.dict_name,tpg.gt_name) AS gxName </if>
<if test="proType == '线路'">
tpg.gt_name AS gxName,
</if>
tgp.gx_id AS gxId
FROM tb_gx_plan tgp FROM tb_gx_plan tgp
<if test="proType == '变电'">
LEFT JOIN sys_dict sd ON sd.dict_code = tgp.gx_id LEFT JOIN sys_dict sd ON sd.dict_code = tgp.gx_id
</if>
<if test="proType == '线路'">
LEFT JOIN t_pro_gt tpg ON tgp.gx_id = tpg.gt_id LEFT JOIN t_pro_gt tpg ON tgp.gx_id = tpg.gt_id
</if>
WHERE tgp.bid_code = #{bidCode} WHERE tgp.bid_code = #{bidCode}
<if test="keyWord!=null and keyWord!=''"> <if test="proType == '变电'">
AND ( AND INSTR(sd.dict_name,#{keyWord}) > 0
INSTR(tgp.gx_weight,#{keyWord}) > 0 </if>
) <if test="proType == '线路'">
AND INSTR(tpg.gt_name,#{keyWord}) > 0
</if> </if>
</select> </select>
<!--工序计划详情--> <!--工序计划详情-->

View File

@ -82,18 +82,26 @@
tgp.end_time AS endTime, tgp.end_time AS endTime,
tgp.dela_reason AS delaReason, tgp.dela_reason AS delaReason,
tgp.bid_code AS bidCode, tgp.bid_code AS bidCode,
<if test="proType == '变电'">
sd.dict_name AS gxName, sd.dict_name AS gxName,
tgp.bid_code AS bidCode, </if>
tgp.gx_id AS gxId, <if test="proType == '线路'">
IFNULL(sd.dict_name,tpg.gt_name) AS gxName tpg.gt_name AS gxName,
</if>
tgp.gx_id AS gxId
FROM tb_gx_plan tgp FROM tb_gx_plan tgp
<if test="proType == '变电'">
LEFT JOIN sys_dict sd ON sd.dict_code = tgp.gx_id LEFT JOIN sys_dict sd ON sd.dict_code = tgp.gx_id
</if>
<if test="proType == '线路'">
LEFT JOIN t_pro_gt tpg ON tgp.gx_id = tpg.gt_id LEFT JOIN t_pro_gt tpg ON tgp.gx_id = tpg.gt_id
</if>
WHERE tgp.bid_code = #{bidCode} WHERE tgp.bid_code = #{bidCode}
<if test="keyWord!=null and keyWord!=''"> <if test="proType == '变电'">
AND ( AND INSTR(sd.dict_name,#{keyWord}) > 0
INSTR(tgp.gx_weight,#{keyWord}) > 0 </if>
) <if test="proType == '线路'">
AND INSTR(tpg.gt_name,#{keyWord}) > 0
</if> </if>
</select> </select>
<!--工序计划延期提醒--> <!--工序计划延期提醒-->