rev:修改单据出库校验

This commit is contained in:
zhangzq
2024-12-04 17:00:20 +08:00
parent dd8a2fa67e
commit f5bcfdd3af

View File

@@ -41,16 +41,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.math.BigDecimal;
import java.net.URI;
import java.net.URL;
import java.net.URLConnection;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Paths;
import java.util.*;
@Service
@@ -139,6 +130,9 @@ public class PdaIOService {
throw new BadRequestException("明细物料没有指定批号");
}
List<StructAssignQty> structMaterials = iStIvtStructattrService.getStructIvtAssign(ListOf.of(ivtDtl.getMaterial_id()), storCode);
if (CollectionUtils.isEmpty(structMaterials)){
throw new BadRequestException(dtl.getMaterial_code()+"物料该批号库存不足");
}
for (StructAssignQty assignQty : structMaterials) {
if (assignQty.getPcsn().equals(pcsn)){
boolean b = assignQty.getSto_qty().intValue() >= dtl.getNow_assign_qty().intValue();