Commit 98b24367 LN

bug修改

1 个父辈 7e0a1634
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<add key="App_AutoRun" value="1" /> <add key="App_AutoRun" value="1" />
<add key="App_Title" value="自动点料机" /> <add key="App_Title" value="自动点料机" />
<!--<add key="ServerAddr" value="http://10.85.17.233"/>--> <add key="ServerAddr" value="http://10.85.17.233"/>
<add key="ConfigPath_Robot" value="\RobotConfig\Config_Robot.csv" /> <add key="ConfigPath_Robot" value="\RobotConfig\Config_Robot.csv" />
<add key="ConfigPath_XRay" value="\RobotConfig\Config_XRay.csv" /> <add key="ConfigPath_XRay" value="\RobotConfig\Config_XRay.csv" />
......
...@@ -29,6 +29,14 @@ ...@@ -29,6 +29,14 @@
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage3 = new System.Windows.Forms.TabPage(); this.tabPage3 = new System.Windows.Forms.TabPage();
this.groupBox6 = new System.Windows.Forms.GroupBox(); this.groupBox6 = new System.Windows.Forms.GroupBox();
this.btnReturn = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.txtPN = new System.Windows.Forms.TextBox();
this.btnCheck = new System.Windows.Forms.Button();
this.label6 = new System.Windows.Forms.Label();
this.txtQty = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.txtReelId = new System.Windows.Forms.TextBox();
this.chbAutoIn = new System.Windows.Forms.CheckBox(); this.chbAutoIn = new System.Windows.Forms.CheckBox();
this.btnRReset = new System.Windows.Forms.Button(); this.btnRReset = new System.Windows.Forms.Button();
this.btnLReset = new System.Windows.Forms.Button(); this.btnLReset = new System.Windows.Forms.Button();
...@@ -37,8 +45,6 @@ ...@@ -37,8 +45,6 @@
this.btnPutTray = new System.Windows.Forms.Button(); this.btnPutTray = new System.Windows.Forms.Button();
this.comInP = new System.Windows.Forms.ComboBox(); this.comInP = new System.Windows.Forms.ComboBox();
this.btnRScan = new System.Windows.Forms.Button(); this.btnRScan = new System.Windows.Forms.Button();
this.btnUpdateShelf = new System.Windows.Forms.Button();
this.txtShelfID = new System.Windows.Forms.TextBox();
this.lblMoveInfo = new System.Windows.Forms.Label(); this.lblMoveInfo = new System.Windows.Forms.Label();
this.lblAgvInfo = new System.Windows.Forms.Label(); this.lblAgvInfo = new System.Windows.Forms.Label();
this.lblThisSta = new System.Windows.Forms.Label(); this.lblThisSta = new System.Windows.Forms.Label();
...@@ -283,6 +289,14 @@ ...@@ -283,6 +289,14 @@
this.groupBox6.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.groupBox6.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox6.Controls.Add(this.btnReturn);
this.groupBox6.Controls.Add(this.label2);
this.groupBox6.Controls.Add(this.txtPN);
this.groupBox6.Controls.Add(this.btnCheck);
this.groupBox6.Controls.Add(this.label6);
this.groupBox6.Controls.Add(this.txtQty);
this.groupBox6.Controls.Add(this.label3);
this.groupBox6.Controls.Add(this.txtReelId);
this.groupBox6.Controls.Add(this.chbAutoIn); this.groupBox6.Controls.Add(this.chbAutoIn);
this.groupBox6.Controls.Add(this.btnRReset); this.groupBox6.Controls.Add(this.btnRReset);
this.groupBox6.Controls.Add(this.btnLReset); this.groupBox6.Controls.Add(this.btnLReset);
...@@ -291,9 +305,7 @@ ...@@ -291,9 +305,7 @@
this.groupBox6.Controls.Add(this.btnPutTray); this.groupBox6.Controls.Add(this.btnPutTray);
this.groupBox6.Controls.Add(this.comInP); this.groupBox6.Controls.Add(this.comInP);
this.groupBox6.Controls.Add(this.btnRScan); this.groupBox6.Controls.Add(this.btnRScan);
this.groupBox6.Controls.Add(this.btnUpdateShelf);
this.groupBox6.Controls.Add(this.btnScan); this.groupBox6.Controls.Add(this.btnScan);
this.groupBox6.Controls.Add(this.txtShelfID);
this.groupBox6.Controls.Add(this.lblMoveInfo); this.groupBox6.Controls.Add(this.lblMoveInfo);
this.groupBox6.Controls.Add(this.lblAgvInfo); this.groupBox6.Controls.Add(this.lblAgvInfo);
this.groupBox6.Controls.Add(this.lblThisSta); this.groupBox6.Controls.Add(this.lblThisSta);
...@@ -304,6 +316,97 @@ ...@@ -304,6 +316,97 @@
this.groupBox6.TabStop = false; this.groupBox6.TabStop = false;
this.groupBox6.Text = "消息"; this.groupBox6.Text = "消息";
// //
// btnReturn
//
this.btnReturn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnReturn.BackColor = System.Drawing.Color.White;
this.btnReturn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReturn.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReturn.Location = new System.Drawing.Point(308, 442);
this.btnReturn.Name = "btnReturn";
this.btnReturn.Size = new System.Drawing.Size(110, 40);
this.btnReturn.TabIndex = 306;
this.btnReturn.Text = "上传点料结果";
this.btnReturn.UseVisualStyleBackColor = false;
this.btnReturn.Click += new System.EventHandler(this.btnReturn_Click);
//
// label2
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(9, 398);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(37, 17);
this.label2.TabIndex = 305;
this.label2.Text = "PN:";
//
// txtPN
//
this.txtPN.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtPN.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtPN.Location = new System.Drawing.Point(69, 393);
this.txtPN.MaxLength = 6;
this.txtPN.Name = "txtPN";
this.txtPN.Size = new System.Drawing.Size(221, 26);
this.txtPN.TabIndex = 304;
this.txtPN.Text = "6C.R0034.1D1";
//
// btnCheck
//
this.btnCheck.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCheck.BackColor = System.Drawing.Color.White;
this.btnCheck.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCheck.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCheck.Location = new System.Drawing.Point(308, 393);
this.btnCheck.Name = "btnCheck";
this.btnCheck.Size = new System.Drawing.Size(110, 40);
this.btnCheck.TabIndex = 303;
this.btnCheck.Text = "判断是否测值";
this.btnCheck.UseVisualStyleBackColor = false;
this.btnCheck.Click += new System.EventHandler(this.btnCheck_Click);
//
// label6
//
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(9, 462);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(40, 17);
this.label6.TabIndex = 302;
this.label6.Text = "Qty:";
//
// txtQty
//
this.txtQty.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtQty.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtQty.Location = new System.Drawing.Point(69, 457);
this.txtQty.MaxLength = 6;
this.txtQty.Name = "txtQty";
this.txtQty.Size = new System.Drawing.Size(221, 26);
this.txtQty.TabIndex = 301;
this.txtQty.Text = "98765";
//
// label3
//
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(9, 430);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(58, 17);
this.label3.TabIndex = 300;
this.label3.Text = "ReelID:";
//
// txtReelId
//
this.txtReelId.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtReelId.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtReelId.Location = new System.Drawing.Point(69, 425);
this.txtReelId.MaxLength = 6;
this.txtReelId.Name = "txtReelId";
this.txtReelId.Size = new System.Drawing.Size(221, 26);
this.txtReelId.TabIndex = 299;
this.txtReelId.Text = "R014212020051100876";
//
// chbAutoIn // chbAutoIn
// //
this.chbAutoIn.AutoSize = true; this.chbAutoIn.AutoSize = true;
...@@ -414,30 +517,6 @@ ...@@ -414,30 +517,6 @@
this.btnRScan.UseVisualStyleBackColor = false; this.btnRScan.UseVisualStyleBackColor = false;
this.btnRScan.Click += new System.EventHandler(this.btnRScan_Click); this.btnRScan.Click += new System.EventHandler(this.btnRScan_Click);
// //
// btnUpdateShelf
//
this.btnUpdateShelf.BackColor = System.Drawing.Color.White;
this.btnUpdateShelf.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpdateShelf.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpdateShelf.Location = new System.Drawing.Point(121, 435);
this.btnUpdateShelf.Name = "btnUpdateShelf";
this.btnUpdateShelf.Size = new System.Drawing.Size(110, 40);
this.btnUpdateShelf.TabIndex = 281;
this.btnUpdateShelf.Text = "更改料串号";
this.btnUpdateShelf.UseVisualStyleBackColor = false;
this.btnUpdateShelf.Visible = false;
this.btnUpdateShelf.Click += new System.EventHandler(this.btnUpdateShelf_Click);
//
// txtShelfID
//
this.txtShelfID.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtShelfID.Location = new System.Drawing.Point(13, 442);
this.txtShelfID.MaxLength = 6;
this.txtShelfID.Name = "txtShelfID";
this.txtShelfID.Size = new System.Drawing.Size(100, 26);
this.txtShelfID.TabIndex = 280;
this.txtShelfID.Visible = false;
//
// lblMoveInfo // lblMoveInfo
// //
this.lblMoveInfo.AutoSize = true; this.lblMoveInfo.AutoSize = true;
...@@ -1815,8 +1894,6 @@ ...@@ -1815,8 +1894,6 @@
internal System.Windows.Forms.Button btnUP2_R; internal System.Windows.Forms.Button btnUP2_R;
private System.Windows.Forms.CheckBox chbMoveStop; private System.Windows.Forms.CheckBox chbMoveStop;
private System.Windows.Forms.TabPage tabPage3; private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.Button btnUpdateShelf;
private System.Windows.Forms.TextBox txtShelfID;
private System.Windows.Forms.Button btnOpenAllAxis; private System.Windows.Forms.Button btnOpenAllAxis;
private System.Windows.Forms.Button btnCloseAxis; private System.Windows.Forms.Button btnCloseAxis;
private System.Windows.Forms.Button L_LineRun_Start; private System.Windows.Forms.Button L_LineRun_Start;
...@@ -1871,6 +1948,14 @@ ...@@ -1871,6 +1948,14 @@
private System.Windows.Forms.Button btnRReset; private System.Windows.Forms.Button btnRReset;
private System.Windows.Forms.Button btnLReset; private System.Windows.Forms.Button btnLReset;
private System.Windows.Forms.CheckBox chbAutoIn; private System.Windows.Forms.CheckBox chbAutoIn;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtPN;
private System.Windows.Forms.Button btnCheck;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtQty;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtReelId;
private System.Windows.Forms.Button btnReturn;
} }
} }
...@@ -748,6 +748,23 @@ namespace OnlineStore.AutoCountClient ...@@ -748,6 +748,23 @@ namespace OnlineStore.AutoCountClient
{ {
equipBean.DefautTargetP = comTP.SelectedIndex + 1; equipBean.DefautTargetP = comTP.SelectedIndex + 1;
} }
private void btnCheck_Click(object sender, EventArgs e)
{
string reelId = txtReelId.Text;
string pn = txtPN.Text;
int p = 0;
SServerManager.Get_VMICheckRLC("测试按钮", pn + ";" + reelId, out p);
}
private void btnReturn_Click(object sender, EventArgs e)
{
int qty = FormUtil.GetIntValue(txtQty ) ;
string reelId = txtReelId.Text;
string pn = txtPN.Text;
int p = 0;
SServerManager.Return_Material ("测试按钮", pn + ";" + reelId, qty);
}
} }
} }
......
...@@ -42,7 +42,7 @@ namespace OnlineStore.Common ...@@ -42,7 +42,7 @@ namespace OnlineStore.Common
protected override WebRequest GetWebRequest(Uri address) protected override WebRequest GetWebRequest(Uri address)
{ {
var result = base.GetWebRequest(address); HttpWebRequest result = (HttpWebRequest)base.GetWebRequest(address);
result.Timeout = this._timeout; result.Timeout = this._timeout;
return result; return result;
} }
...@@ -71,22 +71,15 @@ namespace OnlineStore.Common ...@@ -71,22 +71,15 @@ namespace OnlineStore.Common
} }
} }
return true; return true;
} }
public static string Post(string url, string paramData, int timeOut = 10000) public static string Post(string url, string paramData, int timeOut = 10000)
{ {
return Post(url, paramData, Encoding.UTF8, timeOut); return Post(url, paramData, Encoding.UTF8, timeOut);
} }
private static int isLog = ConfigAppSettings.GetIntValue(Setting_Init.Server_Log_Open);
public static string Post(string url, string paramData, Encoding encoding, int timeOut = 10000) public static string Post(string url, string paramData, Encoding encoding, int timeOut = 10000)
{ {
if (isLog == 1)
{
LogUtil.info("给服务器发送数据【" + paramData + "】 ");
}
if (paramData != "null" && paramData != null)
{
// LogUtil.debug(LOGGER, "HTTP POST to " + url + " \n\t >> " + paramData);
}
string result = ""; string result = "";
if (url.ToLower().IndexOf("https", System.StringComparison.Ordinal) > -1) if (url.ToLower().IndexOf("https", System.StringComparison.Ordinal) > -1)
...@@ -99,7 +92,10 @@ namespace OnlineStore.Common ...@@ -99,7 +92,10 @@ namespace OnlineStore.Common
{ {
var wc = new MyWebClient(10000); var wc = new MyWebClient(10000);
if (string.IsNullOrEmpty(wc.Headers["Content-Type"])) if (string.IsNullOrEmpty(wc.Headers["Content-Type"]))
{
wc.Headers.Add("Content-Type", "application/json;charset=UTF-8"); wc.Headers.Add("Content-Type", "application/json;charset=UTF-8");
}
wc.Headers.Add("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
wc.Encoding = encoding; wc.Encoding = encoding;
result = wc.UploadString(url, "POST", paramData); result = wc.UploadString(url, "POST", paramData);
...@@ -109,14 +105,7 @@ namespace OnlineStore.Common ...@@ -109,14 +105,7 @@ namespace OnlineStore.Common
{ {
LogUtil.error("POST ERROR:" + e.ToString(), 101); LogUtil.error("POST ERROR:" + e.ToString(), 101);
} }
if (!result.Contains("null") && result.Length != 0)
{
//LogUtil.debug(LOGGER,"receive << " + result);
}
if (isLog == 1)
{
LogUtil.info("收到服务器数据【" + result + "】");
}
return result; return result;
} }
...@@ -124,18 +113,17 @@ namespace OnlineStore.Common ...@@ -124,18 +113,17 @@ namespace OnlineStore.Common
{ {
return Get(url, Encoding.UTF8); return Get(url, Encoding.UTF8);
} }
public static string Get(string url, Encoding encoding, int timeOut = 10000)
public static string Get(string url, Encoding encoding)
{ {
try try
{ {
LogUtil.info( "HTTP GET FROM: " + url); LogUtil.debug("HTTP GET FROM: " + url);
var wc = new WebClient { Encoding = encoding }; var wc = new WebClient { Encoding = encoding };
var readStream = wc.OpenRead(url); var readStream = wc.OpenRead(url);
using (var sr = new StreamReader(readStream, encoding)) using (var sr = new StreamReader(readStream, encoding))
{ {
var result = sr.ReadToEnd(); var result = sr.ReadToEnd();
LogUtil.info( "receive << " + result); LogUtil.debug("receive << " + result);
return result; return result;
} }
} }
......
...@@ -55,8 +55,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -55,8 +55,12 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(MoveInfo.Name + "StartWorking 失败 , MoveInfo 忙碌中=" + MoveInfo.MoveType); LogUtil.error(MoveInfo.Name + "StartWorking 失败 , MoveInfo 忙碌中=" + MoveInfo.MoveType);
return false; return false;
} }
//如果料架在准备状态或送出过程中,不能开始取料 if(ShelfMoveInfo.MoveType.Equals(RobotMoveType.ShelfPro)&&ShelfMoveInfo.MoveStep>= StepEnum.OS_31_ShendShelfOut)
{
LogUtil.error(MoveInfo.Name + "StartWorking 失败 , ShelfMoveInfo 正在送出料架 " + ShelfMoveInfo.MoveType+"_"+ ShelfMoveInfo.MoveStep);
return false;
}
if (IOValue(IO_Type.Out_TrayCheck).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.X_OLine_Run).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.Out_TrayCheck).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.X_OLine_Run).Equals(IO_VALUE.LOW))
{ {
......
...@@ -16,16 +16,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -16,16 +16,16 @@ namespace OnlineStore.DeviceLibrary
//结果上传: //结果上传:
//http://10.85.17.233/ReturnOne/WebServiceF.asmx?op=Return_Material //http://10.85.17.233/ReturnOne/WebServiceF.asmx?op=Return_Material
// http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMICheckRLC?reelID=R014212020051100876&partNum=6C.R0034.1D1
private static string Addr_VMICheckRLC = "/ESMTCommonInterface/CommonService.asmx/VMICheckRLC";
private static string Addr_Return_Material = "/ReturnOne/WebServiceF.asmx/Return_Material";
private static string Addr_VMICheckRLC = "/ESMTCommonInterface/CommonService.asmx?op=VMICheckRLC"; public static string Get_VMICheckRLC(string deviceName, string codeStr, out int targetP)
private static string Addr_Return_Material = "/ReturnOne/WebServiceF.asmx?op=Return_Material";
public static string Get_VMICheckRLC(string deviceName, string codeStr, out int targetP)
{ {
//reelID: //reelID:
//partNum: //partNum:
//{"data":{"IFneed":"不需要","iftest":"","component":"","msg":"不需要测量RLC","status":1}} //{"data":{"IFneed":"不需要","iftest":"","component":"","msg":"不需要测量RLC","status":1}}
targetP=0; targetP = 0;
string msg = ""; string msg = "";
try try
{ {
...@@ -44,37 +44,34 @@ namespace OnlineStore.DeviceLibrary ...@@ -44,37 +44,34 @@ namespace OnlineStore.DeviceLibrary
return "获取是否测值失败"; return "获取是否测值失败";
} }
DateTime startTime = DateTime.Now; DateTime startTime = DateTime.Now;
string resultStr = HttpHelper.Post(server, ""); string resultStr = HttpHelper.Get(server);
LogUtil.info("Get_VMICheckRLC " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】"); LogUtil.info(deviceName + "Get_VMICheckRLC " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
//{"data":{"IFneed":"不需要","iftest":"","component":"","msg":"不需要测量RLC","status":1}} //{"data":{"IFneed":"不需要","iftest":"","component":"","msg":"不需要测量RLC","status":1}}
CheckData dataResult = JsonHelper.DeserializeJsonToObject<CheckData>(resultStr); ResultData strData = JsonHelper.DeserializeJsonToObject<ResultData>(resultStr);
if (strData != null && strData.data != null)
if (dataResult == null) {
{ if (strData.data.status.Equals(1) && strData.data.IFneed.Equals("不需要"))
return "获取是否测值失败"; {
} targetP = 1;
else if (dataResult.status.Equals(1) && dataResult.IFneed.Equals("不需要")) return "";
{ }
targetP=1; else if (strData.data.status.Equals(1) && strData.data.IFneed.Equals("需要"))
return ""; {
} //需要时,component是电容 或者电阻
else if (dataResult.status.Equals(1) && dataResult.IFneed.Equals("需要")) if (strData.data.component.Equals("电容"))
{ {
//需要时,component是电容 或者电阻 targetP = 2;
if (dataResult.component.Equals("电容")) }
{ else
targetP = 2; {
targetP = 3;
}
return "";
} }
else
{
targetP = 3;
}
return "";
} }
else else
{ {
targetP = 0; return "获取是否测值失败";
return msg;
} }
} }
catch (Exception ex) catch (Exception ex)
...@@ -82,6 +79,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -82,6 +79,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(deviceName + " ", ex); LogUtil.error(deviceName + " ", ex);
return ex.ToString(); return ex.ToString();
} }
return msg;
} }
...@@ -108,8 +106,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -108,8 +106,8 @@ namespace OnlineStore.DeviceLibrary
return ""; return "";
} }
DateTime startTime = DateTime.Now; DateTime startTime = DateTime.Now;
string resultStr = HttpHelper.Post(server, ""); string resultStr = HttpHelper.Get(server);
LogUtil.info("Return_Material " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】"); LogUtil.info(deviceName+ "Return_Material " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -145,11 +143,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -145,11 +143,16 @@ namespace OnlineStore.DeviceLibrary
return !String.IsNullOrEmpty(server); return !String.IsNullOrEmpty(server);
} }
} }
// http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMICheckRLC?reelID=R014212020051100876&partNum=6C.R0034.1D1
// {"data":{"IFneed":"需要","iftest":"未测值","component":"","msg":"未获取到测量RLC时间","status":1}}
public class ResultData
{
public CheckData data { get; set; }
}
public class CheckData public class CheckData
{ {
//{"data":{"IFneed":"不需要","iftest":"","component":"","msg":"不需要测量RLC","status":1}} //{"data":{"IFneed":"不需要","iftest":"","component":"","msg":"不需要测量RLC","status":1}}
public int IFneed { get; set; } public string IFneed { get; set; }
public string iftest { get; set; } public string iftest { get; set; }
public string component { get; set; } public string component { get; set; }
public string msg { get; set; } public string msg { get; set; }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!