增加 工位查询
parent
499ab08dd9
commit
828420bade
@ -0,0 +1,61 @@
|
|||||||
|
package org.dromara.wms.controller.api;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.encrypt.annotation.ApiEncrypt;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.wms.domain.vo.WmsHppInStockDetailVo;
|
||||||
|
import org.dromara.wms.domain.vo.WmsHppStorePlaceVo;
|
||||||
|
import org.dromara.wms.domain.vo.WmsInventoryVo;
|
||||||
|
import org.dromara.wms.service.IWmsHppStorePlaceService;
|
||||||
|
import org.dromara.wms.service.IWmsPdaApiService;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/machineApi")
|
||||||
|
public class MachineApiController extends BaseController {
|
||||||
|
|
||||||
|
private final IWmsPdaApiService apiService;
|
||||||
|
|
||||||
|
private final IWmsHppStorePlaceService wmsHppStorePlaceService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 半成品入库提交
|
||||||
|
*
|
||||||
|
* @param vo xinx
|
||||||
|
*/
|
||||||
|
@ApiEncrypt
|
||||||
|
@PostMapping("/semi/submitInstore")
|
||||||
|
public R<Void> semiSubmitInStoreInfo(@RequestBody WmsHppInStockDetailVo vo) {
|
||||||
|
// 验证库位条码
|
||||||
|
WmsHppStorePlaceVo wmsPsmStorePlace = wmsHppStorePlaceService.selectStorePlaceInfoByCode(vo.getStorePlaceCode());
|
||||||
|
if (wmsPsmStorePlace == null) {
|
||||||
|
return R.fail("库位编码扫描错误");
|
||||||
|
}
|
||||||
|
vo.setStorePlaceId(wmsPsmStorePlace.getObjId());
|
||||||
|
Boolean result = apiService.updataInStoreRecord(vo);
|
||||||
|
return result ? R.ok() : R.fail();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 根据库位查询库存
|
||||||
|
@PostMapping("/storeCheck/selectInventory")
|
||||||
|
public R<List<WmsInventoryVo>> storeCheckSelectInventory(String locationCode, String type) {
|
||||||
|
List<WmsInventoryVo> list = apiService.storeCheckSelectInventory(locationCode, type);
|
||||||
|
if (list == null || list.isEmpty()) {
|
||||||
|
return R.fail();
|
||||||
|
}
|
||||||
|
return R.ok(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue