采购到货拆批增加是否保密拆批逻辑
This commit is contained in:
parent
0e952beae1
commit
1784833683
@ -22,7 +22,7 @@ public class DocumentDetailedDto extends DocumentDetailed {
|
||||
}
|
||||
|
||||
public void setIsSecrecy(boolean isSecrecy) {
|
||||
isSecrecy = isSecrecy;
|
||||
this.isSecrecy = isSecrecy;
|
||||
}
|
||||
|
||||
private String isPack;
|
||||
|
||||
@ -386,7 +386,7 @@ public class ZWmsInventoryController {
|
||||
String qmsSpecialMarking = request.get("qmsSpecialMarking");
|
||||
String printer = request.get("printer");
|
||||
boolean isSecrecy = Boolean.parseBoolean(request.get("isSecrecy"));
|
||||
List<Inventory> inventoryIdObj = inventoryService.splitInventory(site, user, parentInventoryId, splitQty, splitNum, null, null, null, null, qmsSpecialMarking, printer, isSecrecy);
|
||||
List<Inventory> inventoryIdObj = inventoryService.splitInventory(site, user, parentInventoryId, splitQty, splitNum, null, null, null, null, qmsSpecialMarking, printer, isSecrecy,false);
|
||||
List<String> splitInventoryIdList = inventoryIdObj.stream().map(Inventory::getInventoryId).collect(Collectors.toList());
|
||||
splitInventoryIdList.add(parentInventoryId);
|
||||
splitInventoryIdList.remove(splitInventoryIdList.size() - 1);
|
||||
|
||||
@ -89,9 +89,9 @@ public interface ZWmsInventoryService extends IService<Inventory> {
|
||||
*/
|
||||
List<Inventory> splitInventory(String site, String user, String parentInventory, BigDecimal splitQty, int splitNum, String documentNo, String documentType, String storageBinBo);
|
||||
|
||||
List<Inventory> splitInventory(String site, String user, String parentInventoryId, BigDecimal splitQty, int splitNum, String documentNo, String documentType, String storageBinBo, boolean isSecrecy);
|
||||
List<Inventory> splitInventory(String site, String user, String parentInventoryId, BigDecimal splitQty, int splitNum, String documentNo, String documentType,boolean isSecrecy, boolean inventoryIdSelect);
|
||||
|
||||
List<Inventory> splitInventory(String site, String user, String parentInventoryId, BigDecimal splitQty, int splitNum, String documentNo, String documentType, String storageBinBo, List<String> newInventoryIdList, String qmsSpecialMarking, String printerName, boolean isSecrecy);
|
||||
List<Inventory> splitInventory(String site, String user, String parentInventoryId, BigDecimal splitQty, int splitNum, String documentNo, String documentType, String storageBinBo, List<String> newInventoryIdList, String qmsSpecialMarking, String printerName, boolean isSecrecy, boolean inventoryIdSelect);
|
||||
|
||||
/**
|
||||
* 合并库存
|
||||
|
||||
@ -2079,7 +2079,7 @@ public class DocumentServiceImpl extends ServiceImpl<DocumentMapper, Document> i
|
||||
// String parentInventoryStatus = parentInventory.getStatus();
|
||||
|
||||
//库存拆分
|
||||
Inventory inventoryIdObj = inventoryService.splitInventory(site, user, parentInventoryId, inventoryQty, 1, documentNo, byCode.getDocumentType(), null,isSecrecy).get(0);
|
||||
Inventory inventoryIdObj = inventoryService.splitInventory(site, user, parentInventoryId, inventoryQty, 1, documentNo, byCode.getDocumentType(),isSecrecy,true).get(0);
|
||||
String inventoryId = inventoryIdObj.getInventoryId();
|
||||
|
||||
requestQty = requestQty.add(inventoryQty);
|
||||
@ -5746,7 +5746,7 @@ public class DocumentServiceImpl extends ServiceImpl<DocumentMapper, Document> i
|
||||
documentNo,
|
||||
null,
|
||||
storageBinBindInventory.getStorageBinBo(),
|
||||
Collections.singletonList(parentInventoryId + "-1"), null, null, false
|
||||
Collections.singletonList(parentInventoryId + "-1"), null, null, false,false
|
||||
).get(0);
|
||||
String freezeInventoryId = inventoryIdObj.getInventoryId();
|
||||
inventoryService.update(Wrappers.lambdaUpdate(Inventory.class)
|
||||
|
||||
@ -381,20 +381,26 @@ public class ZWmsInventoryServiceImpl extends ServiceImpl<ZWmsInventoryMapper, I
|
||||
|
||||
@Override
|
||||
public List<Inventory> splitInventory(String site, String user, String parentInventoryId, BigDecimal splitQty, int splitNum, String documentNo, String documentType, String storageBinBo) {
|
||||
return splitInventory(site, user, parentInventoryId, splitQty, splitNum, documentNo, documentType, storageBinBo, null, null, null, false);
|
||||
return splitInventory(site, user, parentInventoryId, splitQty, splitNum, documentNo, documentType, storageBinBo, null, null, null, false,false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Inventory> splitInventory(String site, String user, String parentInventoryId, BigDecimal splitQty, int splitNum, String documentNo, String documentType, String storageBinBo, boolean isSecrecy) {
|
||||
return splitInventory(site, user, parentInventoryId, splitQty, splitNum, documentNo, documentType, storageBinBo, null, null, null, isSecrecy);
|
||||
public List<Inventory> splitInventory(String site, String user, String parentInventoryId, BigDecimal splitQty, int splitNum, String documentNo, String documentType, boolean isSecrecy,boolean inventoryIdSelect) {
|
||||
return splitInventory(site, user, parentInventoryId, splitQty, splitNum, documentNo, documentType, null, null, null, null, isSecrecy,inventoryIdSelect);
|
||||
}
|
||||
|
||||
//@GlobalTransactional
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public List<Inventory> splitInventory(String site, String user, String parentInventoryId, BigDecimal splitQty, int splitNum, String documentNo, String documentType, String storageBinBo, List<String> newInventoryIdList, String qmsSpecialMarking, String printerName, boolean isSecrecy) {
|
||||
Inventory parentInventory = isSecrecy ? lambdaQuery().eq(Inventory::getSite, site).eq(Inventory::getSecrecyId, parentInventoryId)
|
||||
.one() : getById(Inventory.genHandle(site, parentInventoryId));
|
||||
public List<Inventory> splitInventory(String site, String user, String parentInventoryId, BigDecimal splitQty, int splitNum, String documentNo, String documentType, String storageBinBo, List<String> newInventoryIdList, String qmsSpecialMarking, String printerName, boolean isSecrecy,boolean inventoryIdSelect) {
|
||||
Inventory parentInventory = null;
|
||||
if(inventoryIdSelect){
|
||||
// 优先级最高
|
||||
parentInventory = getById(Inventory.genHandle(site, parentInventoryId));
|
||||
}else{
|
||||
parentInventory = isSecrecy ? lambdaQuery().eq(Inventory::getSite, site).eq(Inventory::getSecrecyId, parentInventoryId)
|
||||
.one() : getById(Inventory.genHandle(site, parentInventoryId));
|
||||
}
|
||||
if (parentInventory == null) {
|
||||
throw BusinessException.build("库存不存在");
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user