Browse Source

拣货多次拣货

andy 2 years ago
parent
commit
206cfe725f

+ 7 - 2
warewms-ams/src/main/java/com/ruoyi/ams/inv/service/impl/InvLotLocIdServiceImpl.java

@@ -386,7 +386,12 @@ public class InvLotLocIdServiceImpl implements IInvLotLocIdService {
         if (queryList == null || queryList.size() == 0) {
             invLotLocIdMapper.insertInvLotLocId(invLotLocId);
         } else {
-            invLotLocIdMapper.updateInvLotLocId(queryList.get(0));
+            InvLotLocId tmp = queryList.get(0);
+            tmp.setQty(tmp.getQty().add(invLotLocId.getQty()));
+            tmp.setQtyEach(tmp.getQtyEach().add(invLotLocId.getQtyEach()));
+            tmp.setQtyallocated(tmp.getQtyallocated().add(invLotLocId.getQtyallocated()));
+            tmp.setQtyallocatedEach(tmp.getQtyallocatedEach().add(invLotLocId.getQtyallocatedEach()));
+            invLotLocIdMapper.updateInvLotLocId(tmp);
         }
         return AjaxResult.success("");
     }
@@ -523,7 +528,7 @@ public class InvLotLocIdServiceImpl implements IInvLotLocIdService {
                 copy.setQtyEach(qty);
                 copy.setQtyallocated(qty);
                 copy.setQtyallocatedEach(qty);
-                invLotLocIdService.insertInvLotLocId(copy);
+                invLotLocIdService.saveOrUpdate(copy);
 
                 BigDecimal invqty = inv.getQty();
                 inv.setQty(invqty.subtract(qty));

+ 10 - 0
warewms-ams/src/main/resources/mapper/docOrder/ActAllocationDetailsMapper.xml

@@ -55,6 +55,16 @@
             resultMap="ActAllocationDetailsResult">
         <include refid="selectActAllocationDetailsVo"/>
         <where>
+            <if test="allocationId != null  and allocationId != ''"> and allocation_id = #{allocationId}</if>
+            <if test="orderNo != null  and orderNo != ''"> and order_no like concat('%', #{orderNo}, '%')</if>
+            <if test="material != null  and material != ''"> and material = #{material}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="params.beginTime != null and params.beginTime != ''">
+                AND date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
+            </if>
+            <if test="params.endTime != null and params.endTime != ''">
+                AND date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
+            </if>
         </where>
     </select>