dev:设备禁用不影响和MES进行接口对接,只影响AGV运行

This commit is contained in:
2023-12-04 09:33:08 +08:00
parent 95ba893f55
commit c073c02cd1
3 changed files with 22 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
package org.nl.modules.wql.core.engine.syntax;
import cn.hutool.core.util.StrUtil;
import lombok.extern.slf4j.Slf4j;
import org.nl.modules.wql.WQLCore;
import org.nl.modules.wql.core.DataType;
@@ -370,10 +371,15 @@ public class wqlSELECT extends IWQL {
//2.2、对分页进行处理
Set keySettTempTable = WQLCore.tempTableMap.keySet();
if (this.isInQuery && this.isPageQuery) {
if ((wo.wp.PAGE_PAGESTART != -99 && wo.wp.PAGE_PAGERECORDNUM != -99) && (wo.wp.SORT_ORDERBYFIELD.length() > 0)) {
if ((wo.wp.PAGE_PAGESTART != -99 && wo.wp.PAGE_PAGERECORDNUM != -99) ) {
// String sqlTmp = "select * from("+wo.wp.sSQL+") TOTALRECORDVIEW order by " + wo.wp.SORT_ORDERBYFIELD + " limit "+wo.wp.PAGE_PAGESTART+","+wo.wp.PAGE_PAGERECORDNUM;
String sqlTmp = wo.wp.sSQL + " order by " + wo.wp.SORT_ORDERBYFIELD + " limit " + wo.wp.PAGE_PAGESTART + "," + wo.wp.PAGE_PAGERECORDNUM;
if (StrUtil.isEmpty(wo.wp.SORT_ORDERBYFIELD)){
sqlTmp = wo.wp.sSQL + " limit " + wo.wp.PAGE_PAGESTART + "," + wo.wp.PAGE_PAGERECORDNUM;
}
// String sqlTmp = "select * from (select PAGE_SRCRESULTSET_1.*, row_number() over(order by " + wo.wp.SORT_ORDERBYFIELD + ")"
// + " as SORT_INDEXFIELDALIAS from ( "
// + wo.wp.sSQL
@@ -406,7 +412,7 @@ public class wqlSELECT extends IWQL {
log.error("关闭st,rs出错" + e.toString());
}
}
if (wo.wp.SORT_ORDERBYFIELD.length() > 0) {
if (this.isPageQuery) {
//对sql进行特殊处理找出和第一个select配对的from并把中间全部换为1
// String page_sql = change_1(wo.wp.sSQL);
String page_sql = wo.wp.sSQL;

View File

@@ -96,7 +96,11 @@ public class BakingServiceImpl implements BakingService {
throw new BadRequestException("未查询到母卷号:" + container_name + "对应的生箔机台编号!");
}
if (StrUtil.equals("1", sb_jo.getString("is_used")) && !raw_jo.getString("is_baking").equals("1")) {
/*if (StrUtil.equals("1", sb_jo.getString("is_used")) && !raw_jo.getString("is_baking").equals("1")) {
throw new BadRequestException("该母卷在MES上未进行决策入烘箱不允许进行入烘箱操作");
}*/
if (!raw_jo.getString("is_baking").equals("1")) {
throw new BadRequestException("该母卷在MES上未进行决策入烘箱不允许进行入烘箱操作");
}
@@ -468,7 +472,11 @@ public class BakingServiceImpl implements BakingService {
throw new BadRequestException("未查询到母卷号:" + container_name + "对应的生箔机台编号!");
}
if (StrUtil.equals("1", sb_jo.getString("is_used")) && !raw_jo.getString("is_instor").equals("1")) {
/*if (StrUtil.equals("1", sb_jo.getString("is_used")) && !raw_jo.getString("is_instor").equals("1")) {
throw new BadRequestException("该母卷在MES上未进行决策入半成品库不允许进行入冷却操作");
}*/
if (!raw_jo.getString("is_instor").equals("1")) {
throw new BadRequestException("该母卷在MES上未进行决策入半成品库不允许进行入冷却操作");
}

View File

@@ -158,9 +158,9 @@ public class RawFoilServiceImpl implements RawFoilService {
JSONObject jsonSb = sbTab.query("ext_code = '" + jsonRaw.getString("resource_name") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonSb)) throw new BadRequestException("点位:"+jsonRaw.getString("resource_name")+"生箔设备不存在");
/*if (StrUtil.equals("0", jsonSb.getString("is_used"))) {
if (StrUtil.equals("0", jsonSb.getString("is_used"))) {
throw new BadRequestException("当前生箔机:"+jsonSb.getString("ext_code")+"未启用!");
}*/
}
String start_pint_code = "";
String point_code4 = "";
@@ -216,9 +216,9 @@ public class RawFoilServiceImpl implements RawFoilService {
throw new BadRequestException("未查到相关的生箔机点位!");
}
/*if (StrUtil.equals("0", raw_jo.getString("is_used"))) {
if (StrUtil.equals("0", raw_jo.getString("is_used"))) {
throw new BadRequestException("当前生箔机:"+raw_jo.getString("ext_code")+"未启用!");
}*/
}
// 2.根据就近原则查对应空卷抽
JSONObject map = new JSONObject();