Explorar el Código

优化调用停线管控调用

yhluo hace 2 semanas
padre
commit
e3fbd1198e
Se han modificado 1 ficheros con 12 adiciones y 6 borrados
  1. 12 6
      src/main/java/com/uas/eis/serviceImpl/MESHelperServiceImpl.java

+ 12 - 6
src/main/java/com/uas/eis/serviceImpl/MESHelperServiceImpl.java

@@ -11,6 +11,7 @@ import com.uas.eis.service.MESDataService;
 import com.uas.eis.service.MESHelperService;
 import com.uas.eis.utils.*;
 import flexjson.JSON;
+import javafx.print.Printer;
 import net.sf.json.JSONArray;
 import net.sf.json.JSONObject;
 import net.sf.json.JsonConfig;
@@ -376,12 +377,7 @@ public class MESHelperServiceImpl implements MESHelperService {
 				return rmap;
 			}
 
-			String checkMsg = null;
-			String isStop = Objects.toString(baseDao.getFieldDataByCondition("configs","data","caller='MESSetting' and code='stopLine'"),"0");
-			if(isStop.equals("1")){
-				List<String> result = baseDao.callProcedureWithOut("MES_CHECK_STOPLINE",null,new Integer[]{},new Integer[]{1});
-				checkMsg = result.get(0);
-			}
+
 
 			JSONObject record = JSONObject.fromObject(object.get("SPIRecord"));
 			String Username   = record.optString("Username", "");
@@ -424,6 +420,16 @@ public class MESHelperServiceImpl implements MESHelperService {
 				return rmap;
 			}
 
+			String checkMsg = null;
+			String isStop = Objects.toString(baseDao.getFieldDataByCondition("configs","data","caller='MESSetting' and code='stopLine'"),"0");
+			if(isStop.equals("1")){
+				List<String> resultList = baseDao.callProcedureWithOut("MES_CHECK_STOPLINE",new Object[]{
+						String.valueOf(MachineNO)
+						},new Integer[]{1},new Integer[]{2});
+				checkMsg = resultList.get(0);
+			}
+
+
 			String seq = String.valueOf(baseDao.getFieldDataByCondition("dual","devicetestinfo_seq.NEXTVAL seq","1=1"));
 			Map<Object, Object> paramsMap = new HashMap<Object, Object>();
 			paramsMap.put("DTI_ID",seq);