|
@@ -325,8 +325,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="enterpriseId != null and enterpriseId != ''"> and a.dept_id = #{enterpriseId}</if>
|
|
|
</select>
|
|
|
|
|
|
- <select id="getJoinHouseUserList" parameterType="CenterdataTHousingconstructionSteelcylinder" resultType="map">
|
|
|
- SELECT
|
|
|
+
|
|
|
+ <!--SELECT
|
|
|
a.id,
|
|
|
a.`name`,
|
|
|
b.join_house_id joinHouseId,
|
|
@@ -345,7 +345,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="enterpriseId != null and enterpriseId != ''"> and a.enterprise_id = #{enterpriseId}</if>
|
|
|
<if test="steelcylinderNumber != null and steelcylinderNumber != ''"> and a.steelcylinder_number like concat('%', #{steelcylinderNumber}, '%')</if>
|
|
|
<if test="state != null and state != ''"> and DATE( b.delivery_time ) = DATE( NOW( ) )</if>
|
|
|
+ ${params.dataScope}-->
|
|
|
+ <select id="getJoinHouseUserList" parameterType="CenterdataTHousingconstructionSteelcylinder" resultType="map">
|
|
|
+ SELECT b.gas_address as gasAddress,
|
|
|
+ a.steelcylinder_name as steelcylinderName,
|
|
|
+ a.join_house_id as joinHouseId,
|
|
|
+ a.join_house_name as joinHouseName,
|
|
|
+ b.dept_id as id,
|
|
|
+ b.dept_name as name,
|
|
|
+ a.delivery_time deliveryTime,
|
|
|
+ a.delivery_name deliveryName
|
|
|
+ FROM (
|
|
|
+ SELECT steelcylinder_name, join_house_id, join_house_name, delivery_time, delivery_name FROM centerdata_t_housingconstruction_steelcylinder_log
|
|
|
+ <where>
|
|
|
+ steelcylinder_id in (
|
|
|
+ select id FROM centerdata_t_housingconstruction_steelcylinder
|
|
|
+ <where>
|
|
|
+ AND state = 'state_4'
|
|
|
+ <if test="enterpriseId != null and enterpriseId != ''">
|
|
|
+ and enterprise_id = #{enterpriseId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ )
|
|
|
+ <if test="state != null and state != ''">
|
|
|
+ and DATE(sign_time) = CURDATE()
|
|
|
+ </if>
|
|
|
+ <if test="steelcylinderName != null and steelcylinderName != ''">
|
|
|
+ and steelcylinder_name like concat('%', #{steelcylinderName}, '%')
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ) a
|
|
|
+ LEFT JOIN (
|
|
|
+ SELECT gas_address, id, dept_id, dept_name FROM centerdata_t_housingconstruction_realnameuser
|
|
|
+ <where>
|
|
|
+ <if test="enterpriseId != null and enterpriseId != ''">
|
|
|
+ and enterprise_id = #{enterpriseId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ) b on a.join_house_id = b.id
|
|
|
+ LEFT JOIN ${database_system}.sys_dept d ON b.dept_id = d.dept_id
|
|
|
+ <where>
|
|
|
${params.dataScope}
|
|
|
+ </where>
|
|
|
</select>
|
|
|
|
|
|
<select id="getGassourceList" parameterType="CenterdataTHousingconstructionSteelcylinder" resultType="map">
|
|
@@ -357,9 +398,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
FROM
|
|
|
centerdata_t_housingconstruction_gassource a
|
|
|
left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
|
|
|
- where
|
|
|
- <if test="enterpriseId != null and enterpriseId != ''"> and a.enterprise_id = #{enterpriseId}</if>
|
|
|
- ${params.dataScope}
|
|
|
+ <where>
|
|
|
+ <if test="enterpriseId != null and enterpriseId != ''"> and a.enterprise_id = #{enterpriseId}</if>
|
|
|
+ ${params.dataScope}
|
|
|
+ </where>
|
|
|
</select>
|
|
|
|
|
|
<select id="getSteelcylinderPointList" parameterType="CenterdataTHousingconstructionSteelcylinder" resultType="map">
|