|
@@ -17,13 +17,25 @@ import java.util.Properties;
|
|
|
public class DataUtil {
|
|
public class DataUtil {
|
|
|
public static final Logger log = LoggerFactory.getLogger(DataUtil.class);
|
|
public static final Logger log = LoggerFactory.getLogger(DataUtil.class);
|
|
|
|
|
|
|
|
|
|
+ //删除当前工位工件码
|
|
|
|
|
+ public static JSONObject delCurSn(String oprno,String serverIp,String lineSn){
|
|
|
|
|
+ try {
|
|
|
|
|
+ String url = "http://"+serverIp+":8980/js/a/mes/mesProductRecord/cancelCurSn";
|
|
|
|
|
+ String params = "__ajax=json&oprno="+oprno+"&lineSn="+lineSn+"&__sid="+MesClient.sessionid;
|
|
|
|
|
+ JSONObject result = JSONObject.parseObject(doPost(url, params));
|
|
|
|
|
+// log.info("请求参数:"+params);
|
|
|
|
|
+ return result;
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ log.info("e="+e.getMessage());
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
//获取当前工位工件码
|
|
//获取当前工位工件码
|
|
|
public static JSONObject getCurSn(String oprno,String serverIp,String lineSn){
|
|
public static JSONObject getCurSn(String oprno,String serverIp,String lineSn){
|
|
|
try {
|
|
try {
|
|
|
String url = "http://"+serverIp+":8980/js/a/mes/mesProductRecord/getCurSn";
|
|
String url = "http://"+serverIp+":8980/js/a/mes/mesProductRecord/getCurSn";
|
|
|
String params = "__ajax=json&oprno="+oprno+"&lineSn="+lineSn+"&__sid="+MesClient.sessionid;
|
|
String params = "__ajax=json&oprno="+oprno+"&lineSn="+lineSn+"&__sid="+MesClient.sessionid;
|
|
|
JSONObject result = JSONObject.parseObject(doPost(url, params));
|
|
JSONObject result = JSONObject.parseObject(doPost(url, params));
|
|
|
-
|
|
|
|
|
return result;
|
|
return result;
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
log.info("e="+e.getMessage());
|
|
log.info("e="+e.getMessage());
|