jidj лет назад: 5
Родитель
Сommit
38f40d8949

+ 1 - 1
src/main/java/com/chinaitop/depot/storage/mapper/StorageQualitycheckMapper.java

@@ -46,7 +46,7 @@ public interface StorageQualitycheckMapper {
46 46
     List<StorageQualitycheck> getWareHouseIdList(
47 47
             StorageQualitycheck qualitycheck);
48 48
     List<StorageQualitycheck> getThirdCheckList(StorageQualitycheck qualitycheck);
49
-    List<StorageQualitycheck> getQualitycheckListByFoodbasicinfoCheck(Integer id);
49
+    List<StorageQualitycheck> getQualitycheckListByFoodbasicinfoCheck(StorageQualitycheck qualitycheck);
50 50
     StorageQualitycheck queryPrimaryKey(Integer id);
51 51
     List<StorageQualitycheck> queryByExample(StorageQualitycheck example);
52 52
     List<Map<String,Object>> getStoreQualityList(Integer orgId);

+ 12 - 15
src/main/java/com/chinaitop/depot/storage/mapper/StorageQualitycheckMapper.xml

@@ -1559,25 +1559,22 @@
1559 1559
     <if test="warehouseId !=null">
1560 1560
       and warehouse_id = #{warehouseId}
1561 1561
     </if>
1562
-
1563
-
1564 1562
   </select>
1565 1563
 
1566
-  <select id="getQualitycheckListByFoodbasicinfoCheck" parameterType="java.lang.Integer" resultMap="BaseResultMap">
1564
+  <select id="getQualitycheckListByFoodbasicinfoCheck" resultMap="BaseResultMap">
1567 1565
     SELECT
1568 1566
     <include refid="Base_Column_List" />
1569
-      FROM
1570
-      storage_qualitycheck sqk
1571
-    WHERE
1572
-    sqk.id in (
1573
-      SELECT
1574
-      fcs.qualitycheck_id
1575
-      FROM
1576
-      storage_foodbasicinfochecks fcs
1577
-      WHERE
1578
-      fcs.foodbasicinfo_id =#{id}
1579
-    )
1580
-
1567
+    FROM storage_qualitycheck
1568
+    WHERE type = '2'
1569
+    <if test="houseId !=null">
1570
+      and house_id = #{houseId}
1571
+    </if>
1572
+    <if test="tankId !=null">
1573
+      and tank_id = #{tankId}
1574
+    </if>
1575
+    <if test="warehouseId !=null">
1576
+      and warehouse_id = #{warehouseId}
1577
+    </if>
1581 1578
   </select>
1582 1579
 
1583 1580
   <sql id="ExtBase_Column_List">

+ 2 - 1
src/main/java/com/chinaitop/depot/storage/service/impl/StorageQualitycheckServiceImpl.java

@@ -83,7 +83,8 @@ public class StorageQualitycheckServiceImpl implements StorageQualitycheckServic
83 83
 
84 84
 	@Override
85 85
 	public List<StorageQualitycheck> getQualitycheckListByFoodbasicinfoCheck(StorageQualitycheck qualitycheck,Integer foodbasicinfoId) {
86
-        List<StorageQualitycheck> list = qualitycheckMapper.getThirdCheckList(qualitycheck);
86
+	    //获取春秋普查
87
+        List<StorageQualitycheck> list = qualitycheckMapper.getQualitycheckListByFoodbasicinfoCheck(qualitycheck);
87 88
         if(list.size()>0){
88 89
             int i = 0;
89 90
             for(;i<list.size();i++){