Forráskód Böngészése

PDA入库码盘解绑修改

k 2 éve
szülő
commit
f45d8a9573

+ 11 - 10
warewms-ams/src/main/java/com/ruoyi/ams/asn/service/impl/WmsDocAsnHeaderServiceImpl.java

@@ -579,7 +579,7 @@ public class WmsDocAsnHeaderServiceImpl implements IWmsDocAsnHeaderService {
         InvLotLocId query = new InvLotLocId();
         query.setLotnum(unlockForm.getLotnum());
         query.setSku(unlockForm.getSku());
-        //query.setLocationId(wmsBoxInfo.getLocationId().toString());
+        query.setLocationId(wmsBoxInfo.getLocationId().toString());
         List<InvLotLocId> invLotLocIdList = invLotLocIdMapper.selectInvLotLocIdList(query);
         if (invLotLocIdList == null || invLotLocIdList.size() == 0) {
             return AjaxResult.error("该托盘不存在库存");
@@ -595,18 +595,19 @@ public class WmsDocAsnHeaderServiceImpl implements IWmsDocAsnHeaderService {
             for (WmsDocAsnDetails d : details) {
                 wmsDocAsnDetailsMapper.updateWmsReceivedQty(d.getAsnNo(), d.getAsnLineNo().intValue(), BigDecimal.valueOf(-1 * inv.getQty().doubleValue()), "30");
             }
-            //查询入库单明细并进行修改
+            //删除库存
             invLotLocIdMapper.deleteInvLotLocIdBy(inv.getLotnum(), inv.getSku(), inv.getLocationId(), inv.getCustomerId());
         }
         //查询分配单
-        ActAllocationDetails allQuery = new ActAllocationDetails();
-        allQuery.setUserdefine1(unlockForm.getPalletNo());
-        List<ActAllocationDetails> allocationDetails = actAllocationDetailsService.selectActAllocationDetailsList(allQuery);
-        for (ActAllocationDetails actAllocationDetails : allocationDetails) {
-            //删除分配表
-            actAllocationDetailsService.deleteActAllocationDetailsByAllocationId(actAllocationDetails.getAllocationId());
-            wmsDocOrderDetailsMapper.updateOrderDetailsStock(actAllocationDetails.getOrderNo(), actAllocationDetails.getLineNo(), (-1 * actAllocationDetails.getQty().doubleValue()), "00");
-        }
+//        ActAllocationDetails allQuery = new ActAllocationDetails();
+//        allQuery.setLotnum(unlockForm.getLotnum());
+//        allQuery.setUserdefine1(unlockForm.getPalletNo());
+//        List<ActAllocationDetails> allocationDetails = actAllocationDetailsService.selectActAllocationDetailsList(allQuery);
+//        for (ActAllocationDetails actAllocationDetails : allocationDetails) {
+//            //删除分配表
+//            actAllocationDetailsService.deleteActAllocationDetailsByAllocationId(actAllocationDetails.getAllocationId());
+//            wmsDocOrderDetailsMapper.updateOrderDetailsStock(actAllocationDetails.getOrderNo(), actAllocationDetails.getLineNo(), (-1 * actAllocationDetails.getQty().doubleValue()), "00");
+//        }
         return AjaxResult.success("解绑成功");
     }
 

+ 3 - 1
warewms-ams/src/main/resources/mapper/docOrder/ActAllocationDetailsMapper.xml

@@ -58,6 +58,8 @@
             <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="lotnum != null  and lotnum != ''"> and lotnum = #{lotnum}</if>
+            <if test="userdefine1 != null  and userdefine1 != ''"> and userdefine1 = #{userdefine1}</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')
@@ -181,4 +183,4 @@
     <update id="updateAllocationDetailsLocationIdByPalletNo">
         update act_allocation_details set location_id = #{locationId} where userdefine1 = #{palletNo}
     </update>
-</mapper>
+</mapper>