|
|
@@ -322,8 +322,11 @@ namespace UAS_MES_NEW.Make
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- string sr_id = dh.getFieldDataByCondition("spotcheckrecord", "sr_id", $"sr_makecode = '{workOrder}' and sr_linecode = '{line}' and sr_type='首件检验'").ToString();
|
|
|
+ //string sr_id = dh.getFieldDataByCondition("spotcheckrecord", "sr_id", $"sr_makecode = '{workOrder}' and sr_linecode = '{line}' and sr_type='首件检验'").ToString();
|
|
|
|
|
|
+ dt = (DataTable)dh.ExecuteSql($@"SELECT * FROM( SELECT * FROM spotcheckrecord WHERE sr_makecode = '{workOrder}' AND sr_linecode = '{line}'
|
|
|
+ AND sr_type = '首件检验' ORDER BY sr_indate DESC) WHERE ROWNUM = 1", "select");
|
|
|
+ string sr_id = dt.Rows[0]["sr_id"].ToString();
|
|
|
|
|
|
string uploadFileApi = "http://192.168.41.232:8098/mes/MEScommon/uploadFiles.action?_noc=1";
|
|
|
Dictionary<string, object> uploadFileParams = new Dictionary<string, object>()
|
|
|
@@ -337,7 +340,7 @@ namespace UAS_MES_NEW.Make
|
|
|
{
|
|
|
LogMessage(1, $"文件上传成功{itemFileList[1].Replace(txtPath.Text, "")}");
|
|
|
|
|
|
- dh.ExecuteSql($@"UPDATE spotcheckrecord SET sr_prodtype = '{fp_id};' WHERE sr_id = '{sr_id}'", "update");
|
|
|
+ dh.ExecuteSql($@"UPDATE spotcheckrecord SET sr_prodtype = '{fp_id}' WHERE sr_id = '{sr_id}'", "update");
|
|
|
LogMessage(1, $"首件检验单:C{workOrder.ToUpper()} ,附件上传成功");
|
|
|
|
|
|
using (StreamReader SR = new StreamReader(itemFileList[0], Encoding.GetEncoding("GBK")))
|