|
@@ -5,6 +5,7 @@ import java.util.List;
|
|
|
|
|
|
import com.ruoyi.ams.box.mapper.WmsBoxInfoMapper;
|
|
|
import com.ruoyi.ams.inv.domain.InvLotLocId;
|
|
|
+import com.ruoyi.ams.inv.mapper.InvLotLocIdMapper;
|
|
|
import com.ruoyi.ams.inv.service.IInvLotLocIdService;
|
|
|
import com.ruoyi.ams.order.domain.ActAllocationDetails;
|
|
|
import com.ruoyi.ams.order.domain.WmsDocOrderDetails;
|
|
@@ -41,6 +42,8 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
|
|
|
private IWmsDocOrderHeaderService wmsDocOrderHeaderService;
|
|
|
@Autowired
|
|
|
private WmsBoxInfoMapper wmsBoxInfoMapper;
|
|
|
+ @Autowired
|
|
|
+ private InvLotLocIdMapper invLotLocIdMapper;
|
|
|
|
|
|
/**
|
|
|
* 查询出库单头
|
|
@@ -267,21 +270,49 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
|
|
|
//库存进行移动
|
|
|
invLotLocIdService.stockTransfer(actAllocationDetails.getLocationId(), Long.parseLong(actAllocationDetails.getPickToLocation()));
|
|
|
//托盘进行绑定修改
|
|
|
- wmsBoxInfoMapper.updateLocationBind(actAllocationDetails.getLocationId(), Long.parseLong(p.getLocationTo()),p.getFullTag());
|
|
|
+ wmsBoxInfoMapper.updateLocationBind(actAllocationDetails.getLocationId(), Long.parseLong(p.getLocationTo()), p.getFullTag());
|
|
|
//TODO 是否需要生成任务
|
|
|
+
|
|
|
}
|
|
|
return AjaxResult.success("操作成功");
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public AjaxResult doCheckout(List<CheckOutForm> checkOutForms) {
|
|
|
+ //TODO 生成任务呼叫到接驳位
|
|
|
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
+ @Transactional
|
|
|
@Override
|
|
|
- public List<StockOrderVO> selectStockOrder(String palletNo) {
|
|
|
-
|
|
|
+ public AjaxResult doShipped(String orderNo) {
|
|
|
+ List<ActAllocationDetails> actAllocationDetails = actAllocationDetailsService.queryAllocationDetailsByOrderNo(orderNo);
|
|
|
+ for (ActAllocationDetails details : actAllocationDetails) {
|
|
|
+ String pickToLocation = details.getPickToLocation();
|
|
|
+ //更新发运数
|
|
|
+ WmsDocOrderDetails orderDetails = wmsDocOrderDetailsMapper.selectWmsDocOrderDetailsByNoLineNo(details.getOrderNo(), details.getLineNo());
|
|
|
+ orderDetails.setQtyShipped(details.getPickQty());
|
|
|
+ if (orderDetails.getQtyOrdered().equals(details.getPickQty())) {
|
|
|
+ orderDetails.setLineStatus("70");
|
|
|
+ } else {
|
|
|
+ orderDetails.setLineStatus("60");
|
|
|
+ }
|
|
|
+ //更新库存
|
|
|
+ InvLotLocId invLotLocId = invLotLocIdMapper.selectInvLotLocIdByLotnum(details.getLotnum());
|
|
|
+ invLotLocId.setQtyallocated(invLotLocId.getQtyallocated().subtract(details.getQty()));
|
|
|
+ invLotLocId.setQty(invLotLocId.getQty().subtract(details.getQty()));
|
|
|
+ invLotLocIdMapper.updateInvLotLocId(invLotLocId);
|
|
|
+ //更新订单明细
|
|
|
+ wmsDocOrderDetailsMapper.updateWmsDocOrderDetails(orderDetails);
|
|
|
+ //清空托盘绑定关系
|
|
|
+ wmsBoxInfoMapper.unbindBox(pickToLocation);
|
|
|
+ }
|
|
|
return null;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<StockOrderVO> selectStockOrder(String palletNo) {
|
|
|
+ return wmsDocOrderDetailsMapper.selectStockOrder(palletNo);
|
|
|
+ }
|
|
|
}
|