Pārlūkot izejas kodu

3dDisplayEngine YtiotVAlarmServiceImpl.java 吉超博 commit at 2020-12-02

吉超博 4 gadi atpakaļ
vecāks
revīzija
00a6f271b7

+ 61 - 0
3dDisplayEngine/buildingService/YtiotVAlarmServiceImpl.java

@@ -1848,3 +1848,64 @@ public class YtiotVAlarmServiceImpl implements YtiotVAlarmService {
 					json.put("RESULT", jSONArray);
 				}
 			}
+			return json.toString();
+		}
+	}
+
+
+
+	@Override
+	public String getSjVList(String queryJson, String page, String start, String limit, String sort) throws Exception {
+		// TODO Auto-generated method stub
+		String address = null;
+		String clzt = null;
+		String company_code = null;
+		String company_code_list = null;
+		String Company_Code_List = null;
+		String company_name = null;
+		String device_code = null;
+		String device_code_list = null;
+		String time_start = null;
+		String time_end = null;
+		String COMMSTATUS = null;
+		String V_LOGINNAME = null;
+		String hqlwhere = null;
+		String order = null;
+		String dir = null;
+		String Start = null;
+		String Limit = null;
+		String Page = null;
+		String order_str = null;
+		JSONObject q_json = null;
+		JSONArray Sort = null;
+		JSONArray jSONArray = new JSONArray();
+		JSONObject json = new JSONObject();
+		json.put("action", "getSjVList");
+		if(queryJson!=null) {
+			q_json = JSONObject.fromObject(queryJson);
+			address = q_json.has("address")?q_json.getString("address"):null;
+			V_LOGINNAME = q_json.has("V_LOGINNAME")?q_json.getString("V_LOGINNAME"):null;
+			clzt = q_json.has("clzt")?q_json.getString("clzt"):null;
+			COMMSTATUS = q_json.has("COMMSTATUS")?q_json.getString("COMMSTATUS"):null;
+			if(q_json.has("company_code")) {
+				if((q_json.optJSONObject("company_code")!=null)
+						&&(q_json.optJSONObject("company_code").isArray())) {
+					JSONArray j_tmp = q_json.getJSONArray("company_code");
+					for(int i=0;i<j_tmp.size();i++) {
+						String tmp = j_tmp.getString(i);
+						if(i==0)
+							company_code_list = tmp;
+						else
+							company_code_list += ","+tmp;
+					}
+				}else
+					company_code = q_json.getString("company_code");
+			}
+			company_name = q_json.has("company_name")?q_json.getString("company_name"):null;
+			if(q_json.has("device_code")) {
+				if((q_json.optJSONObject("device_code")!=null)
+						&&(q_json.optJSONObject("device_code").isArray())){
+					JSONArray j_tmp = q_json.getJSONArray("device_code");
+					for(int i=0;i<j_tmp.size();i++) {
+						String tmp = j_tmp.getString(i);
+						if(i==0)