lvzhikai 4 anos atrás
pai
commit
162e540141

+ 16 - 1
src/main/java/com/chinaitop/depot/basic/mapper/BasicStorehouseMapper.xml

@@ -1201,7 +1201,22 @@
1201 1201
   <select id="getThreeTempCheckList" parameterType="java.util.Map" resultMap="BaseResultMap">
1202 1202
     select DISTINCT storehouse_id
1203 1203
     from basic_storehouse storehouse
1204
-    inner join t_testdata testdata on testdata.org_id = storehouse.org_id and testdata.storehouse = storehouse.storehouse_code
1204
+    inner join (SELECT
1205
+    *
1206
+    FROM
1207
+    (
1208
+    SELECT
1209
+    org_id,
1210
+    storehouse
1211
+    FROM
1212
+    t_testdata
1213
+    WHERE
1214
+    org_id = #{orgId}
1215
+    ORDER BY
1216
+    storehouse
1217
+    )
1218
+    WHERE
1219
+    rownum = 1) testdata on testdata.org_id = storehouse.org_id and testdata.storehouse = storehouse.storehouse_code
1205 1220
     <where>
1206 1221
       <if test="orgId != null">
1207 1222
       	storehouse.org_id = #{orgId}