YL2767 il y a 2 semaines
Parent
révision
c5d9e10fad

+ 2
- 2
src/main/java/com/th/demo/service/impl/ware/MoveServiceImpl.java Voir le fichier

@@ -156,8 +156,8 @@ public class MoveServiceImpl implements MoveService {
156 156
     @Override
157 157
     public String allDown(String wareId,String stackId, String userId, String belongId) {
158 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 161
             num += storeMapper.updateByPrimaryKey(listStore.get(i));
162 162
         }
163 163
         result = Tools.moreThanZeroResultJSON(num);

+ 1
- 1
src/main/resource/mapper/ware/InRecordMapper.xml Voir le fichier

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

+ 4
- 6
src/main/resource/mapper/ware/StoreMapper.xml Voir le fichier

@@ -409,18 +409,16 @@
409 409
 
410 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 413
     <if test="param1 != ''" >
416
-      and  t.ware_name = #{param1,jdbcType=VARCHAR}
414
+      and  t.ware_id = #{param1,jdbcType=VARCHAR}
417 415
     </if>
418 416
     <if test="param2 != ''" >
419
-      and  t.stack_name = #{param2,jdbcType=VARCHAR}
417
+      and  t.stack_id = #{param2,jdbcType=VARCHAR}
420 418
     </if>
421 419
     and ifnull(t.cancel_flag,'0') = '0'
422 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 423
   </select>
426 424
 

Loading…
Annuler
Enregistrer