mengy 5 anos atrás
pai
commit
ad9f724fe9

+ 12 - 6
src/main/java/com/chinaitop/depot/storage/mapper/StorageFoodbasicinfoMapper.xml

@@ -49,6 +49,7 @@
49 49
     <result column="auth_code" jdbcType="VARCHAR" property="authCode" />
50 50
     <result column="org_id" jdbcType="INTEGER" property="orgId" />
51 51
     <result column="history_status" jdbcType="INTEGER" property="historyStatus" />
52
+    <result column="seal_date" jdbcType="TIMESTAMP" property="sealDate" />
52 53
   </resultMap>
53 54
   <sql id="Example_Where_Clause">
54 55
     <where>
@@ -133,7 +134,8 @@
133 134
   </select>
134 135
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
135 136
     select 
136
-    <include refid="Base_Column_List" />
137
+    <include refid="Base_Column_List" />,
138
+    seal_date
137 139
     from storage_foodbasicinfo
138 140
     where id = #{id,jdbcType=INTEGER}
139 141
   </select>
@@ -325,6 +327,9 @@
325 327
       <if test="historyStatus != null">
326 328
         history_status,
327 329
       </if>
330
+      <if test="sealDate != null">
331
+        seal_date,
332
+      </if>
328 333
     </trim>
329 334
     <trim prefix="values (" suffix=")" suffixOverrides=",">
330 335
       <if test="id != null">
@@ -468,6 +473,9 @@
468 473
       <if test="historyStatus != null">
469 474
         #{historyStatus,jdbcType=INTEGER},
470 475
       </if>
476
+      <if test="sealDate != null">
477
+        #{sealDate,jdbcType=TIMESTAMP},
478
+      </if>
471 479
     </trim>
472 480
   </insert>
473 481
   <select id="countByExample" parameterType="com.chinaitop.depot.storage.model.StorageFoodbasicinfoExample" resultType="java.lang.Integer">
@@ -899,6 +907,7 @@
899 907
         bs.design_capacity design_house_capacity,
900 908
         sf.length,
901 909
         sf.width,
910
+        sf.seal_date,
902 911
         bs.storeHouse_name storehouseName,
903 912
         bw.warehouse_name wareHouseName,
904 913
         <!--bs.depot_name keep_unite,-->
@@ -927,8 +936,7 @@
927 936
   temp_sqk.id sqkid,
928 937
   temp_sqk.full_good_ration fullGoodRation,
929 938
   temp_sqk.husked_ration huskedRation,
930
-  temp_sqk.location location,
931
-  temp_sqk.seal_date sealDate
939
+  temp_sqk.location location
932 940
       FROM
933 941
         storage_foodbasicinfo sf
934 942
       LEFT JOIN basic_warehouse bw ON bw.storehouse_id = sf.house_id
@@ -1005,13 +1013,12 @@
1005 1013
 
1006 1014
 <select id="queryByExample" parameterType="com.chinaitop.depot.storage.model.StorageFoodbasicinfoExample" resultMap="BaseResultMap">
1007 1015
     select DISTINCT
1008
-    sq.seal_date sealDate,
1009 1016
     <include refid="ExtBase_Column_List" />,
1017
+    sfo.seal_date,
1010 1018
     bs.storeHouse_name storehouseName,bw.warehouse_name wareHouseName
1011 1019
     FROM storage_foodbasicinfo sfo
1012 1020
     LEFT JOIN basic_storehouse bs on bs.storehouse_id = sfo.house_id
1013 1021
     LEFT JOIN basic_warehouse bw on bw.warehouse_id = sfo.warehouse_id
1014
-    LEFT JOIN storage_qualitycheck sq on sq.warehouse_id = sfo.warehouse_id
1015 1022
    <where>
1016 1023
       <if test="houseId != null">
1017 1024
         and sfo.house_id = #{houseId}
@@ -1025,7 +1032,6 @@
1025 1032
      <if test="historyStatus != null">
1026 1033
        and sfo.history_status = #{historyStatus}
1027 1034
      </if>
1028
-     and sq.seal_date > 0
1029 1035
    </where>
1030 1036
   order by sfo.id desc
1031 1037
 </select>

+ 3 - 5
src/main/java/com/chinaitop/depot/storage/mapper/StorageQualitycheckMapper.xml

@@ -1892,12 +1892,10 @@
1892 1892
     select
1893 1893
     <include refid="ExtBase_Column_List" />,
1894 1894
     bs.storeHouse_name storehouseName,
1895
-    bw.warehouse_name wareHouseName,
1896
-    sfo.id foodbasicinfoId
1895
+    bw.warehouse_name wareHouseName
1897 1896
     FROM storage_qualitycheck sqk
1898 1897
     LEFT JOIN basic_storehouse bs on bs.storehouse_id = sqk.house_id
1899 1898
     LEFT JOIN basic_warehouse bw  on bw.warehouse_id = sqk.warehouse_id
1900
-    LEFT JOIN storage_foodbasicinfo sfo on sfo.house_id = sqk.house_id and sfo.warehouse_id = sqk.warehouse_id
1901 1899
     <where>
1902 1900
       <if test="houseId !=null">
1903 1901
         and sqk.house_id = #{houseId}
@@ -1929,8 +1927,8 @@
1929 1927
       <if test="checkResult !=null">
1930 1928
         and sqk.check_result = #{checkResult}
1931 1929
       </if>
1932
-    </where>
1933
-    group by sfo.id
1930
+   </where>
1931
+  <!--   group by sfo.id-->
1934 1932
     order by sqk.id desc
1935 1933
   </select>
1936 1934
 

+ 1 - 0
src/main/java/com/chinaitop/depot/storage/service/impl/StorageFoodbasicInfoServiceImpl.java

@@ -206,6 +206,7 @@ public class StorageFoodbasicInfoServiceImpl implements StorageFoodbasicInfoServ
206 206
         //1.2封仓时间
207 207
         Date date=foodbasicInfo.getSealDate();
208 208
         qualitycheck.setSealDate(date);
209
+        foodbasicInfo.setSealDate(date);
209 210
         //⑦更新货位的状态
210 211
       //  warehouse.setWarehouseStatus(2965);//满货位
211 212