|
|
@@ -237,17 +237,16 @@ namespace FileWatcher
|
|
|
if (!dh.CheckExist("Devicetestinfo", "(dti_uptime)=to_date('" + filedt.Rows[i]["上架时间"].ToString() + "','yyyy/mm/dd hh24:mi:ss') and dti_ipaddress='" + IPAddress + "'"))
|
|
|
{
|
|
|
string filename = filedt.Rows[i]["文件路径"].ToString();
|
|
|
- string ftppath = "/AGING/" + DateTime.Now.ToString("yyyy") + "/" + DateTime.Now.ToString("yyyy-MM") + "/" + DateTime.Now.ToString("MM-dd") + "/";
|
|
|
- string folderpath = filename.Substring(0, filename.LastIndexOf(@"\"));
|
|
|
- //ftp.UpLoadFile(folderpath, filename.Substring(filename.LastIndexOf(@"\")), ftppath, "");
|
|
|
- Dictionary<string, object> dic = new Dictionary<string, object>();
|
|
|
- dic.Add("em_name", "管理员");
|
|
|
- dic.Add("em_code", "ADMIN");
|
|
|
- dic.Add("caller", "AGING");
|
|
|
+ Dictionary<string, object> dic = new Dictionary<string, object>
|
|
|
+ {
|
|
|
+ { "em_name", "管理员" },
|
|
|
+ { "em_code", "ADMIN" },
|
|
|
+ { "caller", "AGING" }
|
|
|
+ };
|
|
|
string fp_id;
|
|
|
string fp_path;
|
|
|
- UploadFilesToRemoteUrl("http://192.168.199.173:8080/mes/MEScommon/uploadFiles.action?_noc=1", filename, dic,out fp_path, out fp_id);
|
|
|
- fp_path = "http://192.168.199.173:8080/" + fp_path.Replace("/app/uas/webapps/", "");
|
|
|
+ UploadFilesToRemoteUrl("http://192.168.6.253:8099/mes/MEScommon/uploadFiles.action?_noc=1", filename, dic,out fp_path, out fp_id);
|
|
|
+ fp_path = "http://192.168.6.253:8099/" + fp_path.Replace("/app/uas/webapps/", "");
|
|
|
fp_path= fp_path.Replace("\"","");
|
|
|
dh.ExecuteSql("insert into Devicetestinfo(dti_id,dti_prodcode,dti_area,dti_uptime,dti_downtime,dti_upqty,dti_okqty,dti_ngqty,dti_ipaddress,dti_filepath,dti_indate,dti_fpid)values(Devicetestinfo_seq.nextval,'" + filedt.Rows[i]["产品代码"].ToString() + "','" + filedt.Rows[i]["区域"].ToString() + "',to_date('" + filedt.Rows[i]["上架时间"].ToString() + "','yyyy/mm/dd hh24:mi:ss'),to_date('" + filedt.Rows[i]["下架时间"].ToString() + "','yyyy/mm/dd hh24:mi:ss'),'" + filedt.Rows[i]["上架数量"].ToString() + "','" + filedt.Rows[i]["合格数量"].ToString() + "','" + filedt.Rows[i]["不良数量"].ToString() + "','" + IPAddress + "','"+ fp_path + "',sysdate,'"+ fp_id + "')", "insert");
|
|
|
OperateResult.AppendText("上传文件" + filename + "\n");
|