|
|
@ -1,11 +1,11 @@
|
|
|
|
package org.dromara.wms.controller;
|
|
|
|
package org.dromara.wms.controller;
|
|
|
|
|
|
|
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
import org.dromara.common.core.domain.R;
|
|
|
|
import org.dromara.common.core.domain.R;
|
|
|
|
|
|
|
|
import org.dromara.common.core.utils.DateUtils;
|
|
|
|
import org.dromara.common.web.core.BaseController;
|
|
|
|
import org.dromara.common.web.core.BaseController;
|
|
|
|
import org.dromara.wms.domain.ShiftChange;
|
|
|
|
import org.dromara.wms.domain.*;
|
|
|
|
import org.dromara.wms.domain.WmsInventory;
|
|
|
|
|
|
|
|
import org.dromara.wms.domain.WmsOutstockRecord;
|
|
|
|
|
|
|
|
import org.dromara.wms.domain.bo.WmsReturnOrderBo;
|
|
|
|
import org.dromara.wms.domain.bo.WmsReturnOrderBo;
|
|
|
|
import org.dromara.wms.domain.vo.*;
|
|
|
|
import org.dromara.wms.domain.vo.*;
|
|
|
|
import org.dromara.wms.service.*;
|
|
|
|
import org.dromara.wms.service.*;
|
|
|
@ -93,23 +93,23 @@ public class WmsPdaApiController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 原材料出库提交
|
|
|
|
* 原材料出库提交
|
|
|
|
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PostMapping("/raw/selectInVentoryByBatchCode")
|
|
|
|
@PostMapping("/raw/selectInVentoryByBatchCode")
|
|
|
|
public R<Void> rawSelectInVentoryByBatchCode(WmsOutstockRecord outstockRecord) {
|
|
|
|
public R<Void> rawSelectInVentoryByBatchCode(WmsOutstockRecord outstockRecord) {
|
|
|
|
// 验证库存
|
|
|
|
// 验证库存
|
|
|
|
WmsInventory wmsInventory=apiService.outSelectInVentoryByBatch(outstockRecord);
|
|
|
|
WmsInventory wmsInventory = apiService.outSelectInVentoryByBatch(outstockRecord);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// WmsInventoryVo wmsInventoryVo=apiService.selectInVentoryByBatchCode(outstockRecord.getBatchCode(),outstockRecord.getLocationCode());
|
|
|
|
// WmsInventoryVo wmsInventoryVo=apiService.selectInVentoryByBatchCode(outstockRecord.getBatchCode(),outstockRecord.getLocationCode());
|
|
|
|
if (wmsInventory == null) {
|
|
|
|
if (wmsInventory == null) {
|
|
|
|
R.fail("物料不在待出库列表内");
|
|
|
|
R.fail("物料不在待出库列表内");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (wmsInventory.getInventoryQty().compareTo(outstockRecord.getOutstockQty())<0){
|
|
|
|
if (wmsInventory.getInventoryQty().compareTo(outstockRecord.getOutstockQty()) < 0) {
|
|
|
|
R.fail("当前库位库存为:"+wmsInventory.getInventoryQty());
|
|
|
|
R.fail("当前库位库存为:" + wmsInventory.getInventoryQty());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Boolean result = apiService.rawOutSubmit(outstockRecord,wmsInventory);
|
|
|
|
Boolean result = apiService.rawOutSubmit(outstockRecord, wmsInventory);
|
|
|
|
return result ? R.ok() : R.fail();
|
|
|
|
return result ? R.ok() : R.fail();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -218,11 +218,12 @@ public class WmsPdaApiController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询班组和班次列表
|
|
|
|
* 查询班组和班次列表
|
|
|
|
|
|
|
|
*
|
|
|
|
* @return 自定义类
|
|
|
|
* @return 自定义类
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PostMapping("/selectTeams")
|
|
|
|
@PostMapping("/selectTeams")
|
|
|
|
public R<List<TeamInfoVo>> selectTeams() {
|
|
|
|
public R<List<TeamInfoVo>> selectTeams() {
|
|
|
|
List<TeamInfoVo> teamList =apiService.selectTeams();
|
|
|
|
List<TeamInfoVo> teamList = apiService.selectTeams();
|
|
|
|
return R.ok(teamList);
|
|
|
|
return R.ok(teamList);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -231,9 +232,51 @@ public class WmsPdaApiController extends BaseController {
|
|
|
|
Boolean result = apiService.shiftChangeSubmit(shiftChange);
|
|
|
|
Boolean result = apiService.shiftChangeSubmit(shiftChange);
|
|
|
|
return result ? R.ok() : R.fail();
|
|
|
|
return result ? R.ok() : R.fail();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/selectStoreInfo")
|
|
|
|
@PostMapping("/selectStoreInfo")
|
|
|
|
public void selectStoreInfo(String type){
|
|
|
|
public R<List<StoreInfoVo>> selectStoreInfo(String type) {
|
|
|
|
List<StoreInfoVo> list=apiService.selectStoreInfo(type);
|
|
|
|
List<StoreInfoVo> list = apiService.selectStoreInfo(type);
|
|
|
|
|
|
|
|
if (list == null || list.isEmpty()) {
|
|
|
|
|
|
|
|
return R.fail(type + "仓库查询失败");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return R.ok(list);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 查询库存存储库位
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param type
|
|
|
|
|
|
|
|
* @param storeId
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@PostMapping("/storeCheck/selectInventorLocationList")
|
|
|
|
|
|
|
|
public R<List<WmsBaseLocationVo>> storeCheckSelectLocation(String type, Long storeId) {
|
|
|
|
|
|
|
|
List<WmsBaseLocationVo> list = apiService.storeCheckSelectLocation(type, storeId);
|
|
|
|
|
|
|
|
if (list == null || list.isEmpty()) {
|
|
|
|
|
|
|
|
return R.fail(type + "库位查询失败");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return R.ok(list);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/storeCheck/submitOrder")
|
|
|
|
|
|
|
|
public R<WmsInventoryCheck> storeCheckSubmitOrder(@RequestParam("storeId") Long storeId,@RequestParam("location") List<String> list) {
|
|
|
|
|
|
|
|
WmsInventoryCheck wmsInventoryCheck= apiService.storeCheckSubmitOrder(storeId,list);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return R.ok(wmsInventoryCheck);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 根据库位查询库存
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/storeCheck/selectInventory")
|
|
|
|
|
|
|
|
public R< List<WmsInventoryVo>> storeCheckSelectInventory(String locationCode) {
|
|
|
|
|
|
|
|
List<WmsInventoryVo> list=apiService.storeCheckSelectInventory(locationCode);
|
|
|
|
|
|
|
|
if (list == null || list.isEmpty()) {
|
|
|
|
|
|
|
|
return R.fail();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return R.ok(list);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@PostMapping("/storeCheck/submitCheckRecord")
|
|
|
|
|
|
|
|
public R< Void> storeCheckSubmitCheckRecord(@RequestBody WmsInventoryCheckRecord wmsInventoryCheckRecord) {
|
|
|
|
|
|
|
|
Boolean result=apiService.storeCheckSubmitCheckRecord(wmsInventoryCheckRecord);
|
|
|
|
|
|
|
|
return result ? R.ok() : R.fail();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|