callm hace 1 año
padre
commit
b376d416ac
Se han modificado 1 ficheros con 13 adiciones y 7 borrados
  1. 13 7
      src/main/java/com/uas/eis/serviceImpl/MESHelperServiceImpl.java

+ 13 - 7
src/main/java/com/uas/eis/serviceImpl/MESHelperServiceImpl.java

@@ -619,6 +619,7 @@ public class MESHelperServiceImpl implements MESHelperService {
 		Map<String, Object> map=null;
 		JSONObject object = JSONObject.fromObject(data);
 		JSONArray object1=object.getJSONArray("NonconformData");
+
 		Object Barcode=object.get("Barcode");
 		Object EquipmentEncode=object.get("EquipmentEncode");
 		Object ModelType=object.get("ModelType");
@@ -629,16 +630,21 @@ public class MESHelperServiceImpl implements MESHelperService {
 		Object ShiftName=object.get("ShiftName");
 		Object LineBody=object.get("LineBody");
 		Object Inspector=object.get("Inspector");
-
-
+		int XT_ID = baseDao.getSeqId("xraytest_seq");
+		baseDao.execute("insert into xraytest(XT_ID, BARCODE, EQUIPMENTENCODE, MODELTYPE, CHECKNUMBER, NCMNUMBER, NONCONFORMNUMBER, CHECKDATE, SHIFTNAME, LINEBODY, INSPECTOR)" +
+				"values("+XT_ID+",'"+Barcode+"','"+EquipmentEncode+"','"+ModelType+"','"+CheckNumber+"','"+NcmNumber+"','"+NonconformNumber+"',to_date('"+CheckDate+"','yyyy-mm-dd hh24:mi:ss')" +
+				",'"+ShiftName+"','"+LineBody+"','"+Inspector+"')");
 		for (int i=0;i<object1.size();i++){
 			JSONObject map1=object1.getJSONObject(i);
-			System.out.println(map1.getString("NonconformANo"));
-			System.out.println(map1.getString("NonconformDescription"));
+			String NonconformANo=map1.getString("NonconformANo");
+			String NonconformDescription=map1.getString("NonconformDescription");
+			baseDao.execute("insert into XrayTestdetail(xtd_xtid,xtd_id,NONCONFORMANO, NONCONFORMDESCRIPTION)" +
+					"values("+XT_ID+",XrayTestdetail_seq.nextval,'"+NonconformANo+"','"+NonconformDescription+"')");
 		}
-//		for (Map.Entry<Object, Object> entry : object1) {
-//			System.out.println(entry.getKey());
-//		}
+		rmap.put("code","0");
+		rmap.put("result","OK");
+		rmap.put("ServerMessage","MES:检查数据上传成功!");
+
 		return rmap;
 	}