|
|
|
@ -7,6 +7,7 @@ import org.dromara.wms.domain.*;
|
|
|
|
|
import org.dromara.wms.domain.bo.WmsReturnOrderBo;
|
|
|
|
|
import org.dromara.wms.domain.vo.*;
|
|
|
|
|
import org.dromara.wms.service.*;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
@ -99,8 +100,6 @@ public class WmsPdaApiController extends BaseController {
|
|
|
|
|
public R<Void> rawSelectInVentoryByBatchCode(WmsOutstockRecord outstockRecord) {
|
|
|
|
|
// 验证库存
|
|
|
|
|
WmsInventory wmsInventory = apiService.outSelectInVentoryByBatch(outstockRecord);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// WmsInventoryVo wmsInventoryVo=apiService.selectInVentoryByBatchCode(outstockRecord.getBatchCode(),outstockRecord.getLocationCode());
|
|
|
|
|
if (wmsInventory == null) {
|
|
|
|
|
R.fail("物料不在待出库列表内");
|
|
|
|
@ -112,6 +111,24 @@ public class WmsPdaApiController extends BaseController {
|
|
|
|
|
Boolean result = apiService.rawOutSubmit(outstockRecord, wmsInventory);
|
|
|
|
|
return result ? R.ok() : R.fail();
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 特殊出库提交
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping("/raw/specialOutSubmit")
|
|
|
|
|
public R<Void> specialOutSubmit(@RequestBody WmsOutstockRecord outstockRecord) {
|
|
|
|
|
// 验证库存
|
|
|
|
|
WmsInventoryVo WmsInventoryVo=apiService.selectInVentoryByBatchCode(outstockRecord.getBatchCode(),outstockRecord.getLocationCode());
|
|
|
|
|
if (WmsInventoryVo == null) {
|
|
|
|
|
R.fail("条码扫描错误");
|
|
|
|
|
}
|
|
|
|
|
if (WmsInventoryVo.getInventoryQty().compareTo(outstockRecord.getOutstockQty()) < 0) {
|
|
|
|
|
R.fail("无法出库,当前库位库存为:" + WmsInventoryVo.getInventoryQty());
|
|
|
|
|
}
|
|
|
|
|
WmsInventory wmsInventory=new WmsInventory();
|
|
|
|
|
BeanUtils.copyProperties(WmsInventoryVo, wmsInventory);
|
|
|
|
|
Boolean result = apiService.specialOutSubmit(outstockRecord, wmsInventory);
|
|
|
|
|
return result ? R.ok() : R.fail();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostMapping("/product/selectVehicle")
|
|
|
|
|
public R<BaseToolingInfo> productBindSelectVehicle(String code) {
|
|
|
|
|