工作组查询 修改

This commit is contained in:
yuezhihang
2021-11-12 09:27:49 +08:00
parent b714156172
commit 0158e29009
8 changed files with 98 additions and 8 deletions
@@ -8,8 +8,34 @@
</select>
<select id="researchAllDatas" resultType="com.adc.da.slrs.wgStandorpolicyInfo.entity.WgStandorpolicyInfo">
select * from wg_standorpolicy_info
select wg_standorpolicy_info.id ,wg_standorpolicy_info.wg_id , wg_standorpolicy_info.stand_id
<if test="type == 0 ">
, sar_standards_info.STAND_NAME as name ,sar_standards_info.STAND_TYPE as dataType
</if>
<if test="type == 1 ">
,sar_laws_stand_info.LAWS_NAME as name
</if>
from wg_standorpolicy_info
left join wg_work_group on wg_work_group.id = wg_standorpolicy_info.wg_id
<if test="type == 0">
left join sar_standards_info on sar_standards_info.ID = wg_standorpolicy_info.stand_id
</if>
<if test="type == 1">
left join sar_laws_stand_info on sar_laws_stand_info.ID = wg_standorpolicy_info.stand_id
</if>
where wg_work_group.type = #{type}
</select>
<select id="researchAllDatasPartTwo" resultType="com.adc.da.slrs.wgStandorpolicyInfo.entity.WgStandorpolicyInfo">
select wg_standorpolicy_info.id ,wg_standorpolicy_info.wg_id , wg_standorpolicy_info.stand_id
<if test="type == 0 ">
, sar_bussioness_stand.STAND_NAME as name
</if>
from wg_standorpolicy_info
left join wg_work_group on wg_work_group.id = wg_standorpolicy_info.wg_id
<if test="type == 0">
left join sar_bussioness_stand on sar_bussioness_stand.ID = wg_standorpolicy_info.stand_id
</if>
where wg_work_group.type = #{type}
</select>
</mapper>