协议接口优化
This commit is contained in:
parent
bc38149902
commit
dbe78893be
|
|
@ -8,17 +8,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="getUnitData" resultType="com.bonus.material.common.domain.vo.SelectVo">
|
<select id="getUnitData" resultType="com.bonus.material.common.domain.vo.SelectVo">
|
||||||
/*根据标段工程id关联协议查询往来单位*/
|
/*根据标段工程id关联协议查询往来单位*/
|
||||||
<if test="id != null and id != ''">
|
<if test="id != null and id != ''">
|
||||||
SELECT DISTINCT bui.unit_id AS id,
|
SELECT DISTINCT bu.unit_id AS id,
|
||||||
bui.unit_name AS `name`
|
bu.unit_name AS `name`
|
||||||
FROM bm_project_lot bpl
|
FROM bm_project bpl
|
||||||
LEFT JOIN bm_agreement_info bai ON bpl.lot_id = bai.project_id AND bai.`status` = '1'
|
LEFT JOIN bm_agreement_info bai ON bpl.pro_id = bai.project_id AND bai.`status` = '1'
|
||||||
LEFT JOIN bm_unit_info bui ON bai.unit_id = bui.unit_id AND bui.del_flag = '0'
|
LEFT JOIN bm_unit bu ON bai.unit_id = bu.unit_id AND bu.del_flag = '0'
|
||||||
WHERE bpl.lot_id = #{id} AND bpl.del_flag = '0'
|
WHERE bpl.lot_id = #{id} AND bpl.del_flag = '0'
|
||||||
</if>
|
</if>
|
||||||
<if test="id == null or id == ''">
|
<if test="id == null or id == ''">
|
||||||
SELECT unit_id AS id,
|
SELECT unit_id AS id,
|
||||||
unit_name AS `name`
|
unit_name AS `name`
|
||||||
FROM bm_unit_info
|
FROM bm_unit
|
||||||
WHERE del_flag = '0'
|
WHERE del_flag = '0'
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -29,15 +29,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="id != null and id != ''">
|
<if test="id != null and id != ''">
|
||||||
SELECT DISTINCT bpl.lot_id AS id,
|
SELECT DISTINCT bpl.lot_id AS id,
|
||||||
bpl.lot_name AS `name`
|
bpl.lot_name AS `name`
|
||||||
FROM bm_unit_info bui
|
FROM bm_unit bu
|
||||||
LEFT JOIN bm_agreement_info bai ON bui.unit_id = bai.unit_id AND bai.`status` = '1'
|
LEFT JOIN bm_agreement_info bai ON bui.unit_id = bai.unit_id AND bai.`status` = '1'
|
||||||
LEFT JOIN bm_project_lot bpl ON bai.project_id = bpl.lot_id AND bpl.del_flag = '0'
|
LEFT JOIN bm_project bpl ON bai.project_id = bpl.pro_id AND bpl.del_flag = '0'
|
||||||
WHERE bui.unit_id = #{id} AND bui.del_flag = '0'
|
WHERE bu.unit_id = #{id} AND bu.del_flag = '0'
|
||||||
</if>
|
</if>
|
||||||
<if test="id == null or id == ''">
|
<if test="id == null or id == ''">
|
||||||
SELECT lot_id AS id,
|
SELECT lot_id AS id,
|
||||||
lot_name AS `name`
|
lot_name AS `name`
|
||||||
FROM bm_project_lot
|
FROM bm_project
|
||||||
WHERE del_flag = '0'
|
WHERE del_flag = '0'
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -145,7 +145,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="getProCbx" resultType="com.bonus.material.common.domain.vo.SelectVo">
|
<select id="getProCbx" resultType="com.bonus.material.common.domain.vo.SelectVo">
|
||||||
SELECT pro_id AS id,
|
SELECT pro_id AS id,
|
||||||
pro_name AS `name`
|
pro_name AS `name`
|
||||||
FROM bm_project_info
|
FROM bm_project
|
||||||
WHERE del_flag = '0' AND status = '0'
|
WHERE del_flag = '0' AND status = '0'
|
||||||
ORDER BY create_time
|
ORDER BY create_time
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue