fix:大屏筛选数据、MES调用LMS包装关系报错优化

This commit is contained in:
zhouz
2024-08-06 08:56:21 +08:00
parent 23e1d9a121
commit 1fd76c3924
2 changed files with 7 additions and 2 deletions

View File

@@ -1289,11 +1289,16 @@ public class MesToLmsServiceImpl implements MesToLmsService {
//查询库内是否存在相同的子卷号
JSONObject container_jo = WQLObject.getWQLObject("PDM_BI_SubPackageRelation").query("container_name = '" + ContainerName + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(container_jo)) {
if (container_jo.getString("need_delete").equals("99")) {
if (StrUtil.isNotEmpty(container_jo.getString("need_delete")) && container_jo.getString("need_delete").equals("99")) {
WQLObject tab = WQLObject.getWQLObject("PDM_BI_SubPackageRelation");
HashMap<String, String> map = new HashMap<>();
map.put("need_delete", "");
tab.update(map, "package_box_sn = '" + PackageBoxSN + "'");
result.put("RTYPE", "S");
result.put("RTMSG", "操作成功!");
result.put("RTOAL", 1);
result.put("RTDAT", null);
return result;
} else {
throw new BadRequestException("LMS系统中已存在子卷号" + ContainerName + ",请检查!");
}

View File

@@ -32,7 +32,7 @@ public class LmsToBigScreenServiceImpl implements LmsToBigScreenService {
JSONObject json = new JSONObject();
for (URLEnum url : URLEnum.values()) {
String product_area = url.getProduct_area();
if (product_area.equals("BLK") || product_area.equals("B2")) {
if (product_area.startsWith("B")) {
continue;
}
JSONArray rows = WQLObject.getWQLObject("em_bi_monitordevice").query("send_szls = '1' AND product_area = '" + product_area + "'").getResultJSONArray(0);