|
@@ -62,6 +62,11 @@ public class DataUtil {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public static JSONObject sendQuality(String sn,String ret,String user){
|
|
public static JSONObject sendQuality(String sn,String ret,String user){
|
|
|
|
|
+ return sendQuality(sn, ret, user, null);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /** ps 为工艺参数报文,多段用 | 分隔,每段首字符 Y/N 表示结果,如 Y3.33E-08 */
|
|
|
|
|
+ public static JSONObject sendQuality(String sn,String ret,String user,String ps){
|
|
|
try{
|
|
try{
|
|
|
String enconding = "UTF-8";
|
|
String enconding = "UTF-8";
|
|
|
InputStream is = ClassLoader.getSystemResourceAsStream("config/config.properties");
|
|
InputStream is = ClassLoader.getSystemResourceAsStream("config/config.properties");
|
|
@@ -73,6 +78,9 @@ public class DataUtil {
|
|
|
String lineSn = pro.getProperty("mes.line_sn").trim();
|
|
String lineSn = pro.getProperty("mes.line_sn").trim();
|
|
|
String url = "http://"+mes_server_ip+":8980/js/a/mes/mesProductRecord/pcresult";
|
|
String url = "http://"+mes_server_ip+":8980/js/a/mes/mesProductRecord/pcresult";
|
|
|
String params = "__ajax=json&oprno="+oprno+"&lineSn="+lineSn+"&sn="+sn+"&result="+ret+"&ucode="+user;
|
|
String params = "__ajax=json&oprno="+oprno+"&lineSn="+lineSn+"&sn="+sn+"&result="+ret+"&ucode="+user;
|
|
|
|
|
+ if (ps != null && !ps.isEmpty()) {
|
|
|
|
|
+ params += "&ps=" + URLEncoder.encode(ps, enconding);
|
|
|
|
|
+ }
|
|
|
log.info("params="+params);
|
|
log.info("params="+params);
|
|
|
String result = doPost(url,params);
|
|
String result = doPost(url,params);
|
|
|
log.info("result="+result);
|
|
log.info("result="+result);
|