张庆宇 3 months ago
parent
commit
c5d9e10fad

+ 2
- 2
src/main/java/com/th/demo/service/impl/ware/MoveServiceImpl.java View File

156
     @Override
156
     @Override
157
     public String allDown(String wareId,String stackId, String userId, String belongId) {
157
     public String allDown(String wareId,String stackId, String userId, String belongId) {
158
         List<Store> listStore = storeMapper.select(wareId,stackId,userId,belongId);
158
         List<Store> listStore = storeMapper.select(wareId,stackId,userId,belongId);
159
-        for (int i = listStore.size();i>0;i--){
160
-            listStore.get(i).setLayer(i);
159
+        for (int i =0;i < listStore.size();i++){
160
+            listStore.get(i).setLayer(i+1);
161
             num += storeMapper.updateByPrimaryKey(listStore.get(i));
161
             num += storeMapper.updateByPrimaryKey(listStore.get(i));
162
         }
162
         }
163
         result = Tools.moreThanZeroResultJSON(num);
163
         result = Tools.moreThanZeroResultJSON(num);

+ 1
- 1
src/main/resource/mapper/ware/InRecordMapper.xml View File

52
   </sql>
52
   </sql>
53
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
53
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
54
     select 
54
     select 
55
-    <include refid="Base_Column_List" />
55
+    *
56
     from t_ware_in_record
56
     from t_ware_in_record
57
     where id = #{id,jdbcType=VARCHAR}
57
     where id = #{id,jdbcType=VARCHAR}
58
   </select>
58
   </select>

+ 4
- 6
src/main/resource/mapper/ware/StoreMapper.xml View File

409
 
409
 
410
   <select id="select"  resultMap="BaseResultMap" >
410
   <select id="select"  resultMap="BaseResultMap" >
411
 
411
 
412
-select t.* from t_ware_store t where t.ware_name in (
413
-select b.name from t_maint_userware a ,t_maint_ware b  where a.ware_id = b.id
414
-and  user_id = #{param3,jdbcType=VARCHAR}  )  and t.belong_id = #{param4,jdbcType=VARCHAR}
412
+select t.* from t_ware_store t where 1=1  and t.belong_id = #{param4,jdbcType=VARCHAR}
415
     <if test="param1 != ''" >
413
     <if test="param1 != ''" >
416
-      and  t.ware_name = #{param1,jdbcType=VARCHAR}
414
+      and  t.ware_id = #{param1,jdbcType=VARCHAR}
417
     </if>
415
     </if>
418
     <if test="param2 != ''" >
416
     <if test="param2 != ''" >
419
-      and  t.stack_name = #{param2,jdbcType=VARCHAR}
417
+      and  t.stack_id = #{param2,jdbcType=VARCHAR}
420
     </if>
418
     </if>
421
     and ifnull(t.cancel_flag,'0') = '0'
419
     and ifnull(t.cancel_flag,'0') = '0'
422
     and ifnull(t.out_flag,'0') = '0'
420
     and ifnull(t.out_flag,'0') = '0'
423
-order by t.stack_name asc , t.layer desc
421
+order by t.stack_id asc , t.layer asc
424
 
422
 
425
   </select>
423
   </select>
426
 
424
 

Loading…
Cancel
Save