fix:空指针卡控

This commit is contained in:
zhouz
2025-10-10 09:45:21 +08:00
parent 85b4c48861
commit 85024f269d
4 changed files with 5 additions and 4 deletions

View File

@@ -87,6 +87,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.swing.*;
import java.lang.reflect.Method;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
@@ -960,7 +961,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
JSONObject bake_jo = new JSONObject();
bake_jo.put("point_code", device_code);
bake_jo.put("option", "2");
new BakingServiceImpl().ovenInAndOut(bake_jo);
BakingServiceImpl bakingService = SpringContextHolder.getBean(BakingServiceImpl.class);
bakingService.ovenInAndOut(bake_jo);
}
} else {
throw new BadRequestException("请输入正确的任务类型!");

View File

@@ -2096,7 +2096,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
public JSONObject getRollInfo(JSONObject param) {
JSONObject result = new JSONObject();
String ContainerName = param.getString("ContainerName");
PdmBiSlittingproductionplan one = slittingproductionplanService.getOne(new LambdaQueryWrapper<PdmBiSlittingproductionplan>().eq(PdmBiSlittingproductionplan::getContainer_name, ContainerName));
PdmBiSlittingproductionplan one = slittingproductionplanService.getOne(new LambdaQueryWrapper<PdmBiSlittingproductionplan>().eq(PdmBiSlittingproductionplan::getContainer_name, ContainerName).eq(PdmBiSlittingproductionplan::getIs_delete,"0"));
if (ObjectUtil.isEmpty(one)) {
throw new BadRequestException("未查询到子卷号为[" + ContainerName + "]的分切计划!");
}

View File

@@ -97,7 +97,7 @@ public class VirtualOutServiceImpl implements VirtualOutService {
if (ObjectUtil.isNotEmpty(whereJson.getString("box_no"))) {
JSONObject jsonSub = WQL.getWO("PDA_VIRTUALOUT").addParam("flag", "4").addParam("box_no", whereJson.getString("box_no")).process().uniqueResult(0);
if (ObjectUtil.isEmpty(jsonSub)){
if (ObjectUtil.isEmpty(jsonSub) || ObjectUtil.isEmpty(jsonSub.getString("net_weight_num"))){
throw new BadRequestException("未查询到设木箱号为["+whereJson.getString("box_no")+"]的子卷包装关系信息!");
}

View File

@@ -304,7 +304,6 @@
WHERE
attr.block_num = 输入.block_num
AND attr.row_num = 输入.row_num
AND attr.sect_id = 输入.sect_id
AND IFNULL( attr.storagevehicle_code, '' ) <> ''
ENDSELECT
ENDQUERY