|
|
@@ -1462,24 +1462,23 @@
|
|
1462
|
1462
|
</update>
|
|
1463
|
1463
|
|
|
1464
|
1464
|
<select id="getThreeTempCheckList" parameterType="java.util.Map" resultMap="BaseResultMap">
|
|
1465
|
|
- select DISTINCT storehouse_id
|
|
1466
|
|
- from basic_storehouse storehouse
|
|
1467
|
|
- inner join (SELECT
|
|
1468
|
|
- *
|
|
1469
|
|
- FROM
|
|
1470
|
|
- (
|
|
1471
|
|
- SELECT
|
|
1472
|
|
- org_id,
|
|
1473
|
|
- storehouse
|
|
1474
|
|
- FROM
|
|
1475
|
|
- t_testdata
|
|
1476
|
|
- WHERE
|
|
1477
|
|
- org_id = #{orgId}
|
|
1478
|
|
- ORDER BY
|
|
1479
|
|
- storehouse
|
|
1480
|
|
- )
|
|
1481
|
|
- WHERE
|
|
1482
|
|
- rownum = 1) testdata on testdata.org_id = storehouse.org_id and testdata.storehouse = storehouse.storehouse_code
|
|
|
1465
|
+ SELECT DISTINCT
|
|
|
1466
|
+ storehouse_id
|
|
|
1467
|
+ FROM
|
|
|
1468
|
+ basic_storehouse storehouse
|
|
|
1469
|
+ INNER JOIN (
|
|
|
1470
|
+ SELECT
|
|
|
1471
|
+ org_id,
|
|
|
1472
|
+ storehouse
|
|
|
1473
|
+ FROM
|
|
|
1474
|
+ t_testdata
|
|
|
1475
|
+ WHERE
|
|
|
1476
|
+ org_id = #{orgId}
|
|
|
1477
|
+ ORDER BY
|
|
|
1478
|
+ storehouse
|
|
|
1479
|
+ LIMIT 1
|
|
|
1480
|
+ ) testdata ON testdata.org_id = storehouse.org_id
|
|
|
1481
|
+ AND testdata.storehouse = storehouse.storehouse_code
|
|
1483
|
1482
|
<where>
|
|
1484
|
1483
|
<if test="orgId != null">
|
|
1485
|
1484
|
storehouse.org_id = #{orgId}
|
|
|
@@ -1558,8 +1557,8 @@
|
|
1558
|
1557
|
<!-- 查询当前仓房和油罐的有效容量之和 -->
|
|
1559
|
1558
|
<select id="queryCrAndgw" parameterType="java.lang.Integer" resultType="java.util.Map">
|
|
1560
|
1559
|
SELECT
|
|
1561
|
|
- NVL((SELECT SUM(a.actual_capacity) FROM basic_storehouse a WHERE a.del_flag=1 AND a.library_type='0' and a.org_id=#{orgId,jdbcType=INTEGER}),0) as cr_count,
|
|
1562
|
|
- NVL((SELECT SUM(a.tank_capacity) FROM basic_tank a WHERE a.del_flag=1 AND a.library_type='0' and a.org_id=#{orgId,jdbcType=INTEGER}),0) as gr_count
|
|
|
1560
|
+ IFNULL((SELECT SUM(a.actual_capacity) FROM basic_storehouse a WHERE a.del_flag=1 AND a.library_type='0' and a.org_id=#{orgId,jdbcType=INTEGER}),0) as cr_count,
|
|
|
1561
|
+ IFNULL((SELECT SUM(a.tank_capacity) FROM basic_tank a WHERE a.del_flag=1 AND a.library_type='0' and a.org_id=#{orgId,jdbcType=INTEGER}),0) as gr_count
|
|
1563
|
1562
|
FROM DUAL
|
|
1564
|
1563
|
</select>
|
|
1565
|
1564
|
</mapper>
|