提供qms模块一个获取LOT的方法供调用

This commit is contained in:
彭枝刚 2024-11-23 13:09:28 +08:00
parent 0c2b18ddab
commit 9edc87b747
4 changed files with 31 additions and 0 deletions

View File

@ -8,6 +8,8 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestHeader;
import java.util.List;
/** /**
* @program: mom-wms-biz * @program: mom-wms-biz
* @description: 仓库管理 * @description: 仓库管理
@ -20,4 +22,7 @@ public interface RemoteWmsInventoryService {
@PostMapping("/wms-inventory/api/createInventory") @PostMapping("/wms-inventory/api/createInventory")
R createInventory(@RequestBody Inventory wmsInventory); R createInventory(@RequestBody Inventory wmsInventory);
@PostMapping("/wms-inventory/api/iqcGetLot")
R<List<Inventory>> iqcGetLot(@RequestBody String documentNo, String lineNo, String itemNo);
} }

View File

@ -46,6 +46,13 @@ public class ZWmsInventoryController {
private final BarCodeQueryService barCodeQueryService; private final BarCodeQueryService barCodeQueryService;
@ApiOperation(value = "IQC获取LOT", notes = "IQC获取LOT")
@SysLog("IQC获取LOT")
@PostMapping("/api/iqcGetLot")
public R<List<Inventory>> iqcGetLot(@RequestBody String documentNo, String lineNo, String itemNo) {
return R.ok(inventoryService.iqcGetLot( documentNo, lineNo, itemNo));
}
@ApiOperation(value = "产出下料-创建库存", notes = "产出下料-创建库存") @ApiOperation(value = "产出下料-创建库存", notes = "产出下料-创建库存")
@SysLog("产出下料-创建库存") @SysLog("产出下料-创建库存")
@PostMapping("/api/createInventory") @PostMapping("/api/createInventory")

View File

@ -23,6 +23,8 @@ public interface ZWmsInventoryService extends IService<Inventory> {
void createInventory(Inventory wmsInventory); void createInventory(Inventory wmsInventory);
List<Inventory> iqcGetLot(String documentNo, String lineNo, String itemNo);
// NLV 已用 Snow // NLV 已用 Snow
InventoryDto validateInventoryId(Inventory wmsInventory); InventoryDto validateInventoryId(Inventory wmsInventory);

View File

@ -2,6 +2,7 @@ package com.foreverwin.mom.wms.service.impl;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.exceptions.MybatisPlusException; import com.baomidou.mybatisplus.core.exceptions.MybatisPlusException;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
@ -76,6 +77,22 @@ public class ZWmsInventoryServiceImpl extends ServiceImpl<ZWmsInventoryMapper, I
this.baseMapper.insert(wmsInventory); this.baseMapper.insert(wmsInventory);
} }
// NLV 已用 Snow
@Override
public List<Inventory> iqcGetLot(String documentNo, String lineNo, String itemNo) {
String site = TenantContextHolder.getTenantId();
String inventoryId = documentNo + "-" + lineNo + "-" + itemNo;
QueryWrapper<Inventory> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(Inventory::getInventoryId, inventoryId).eq(Inventory::getSite, site);
Inventory inventory = this.baseMapper.selectOne(queryWrapper);
if(inventory!=null){
QueryWrapper<Inventory> inventoryQueryWrapper = new QueryWrapper<>();
inventoryQueryWrapper.lambda().eq(Inventory::getParentInventoryBo, inventory.getHandle());
return this.baseMapper.selectList(inventoryQueryWrapper);
}
return null;
}
// NLV 已用 Snow // NLV 已用 Snow
@Override @Override
public InventoryDto validateInventoryId(Inventory wmsInventory) { public InventoryDto validateInventoryId(Inventory wmsInventory) {