|
@@ -331,13 +331,15 @@ namespace FileWatcher
|
|
|
try
|
|
try
|
|
|
{
|
|
{
|
|
|
string ftppath = "/" + DateTime.Now.ToString("yyyy-MM-dd") + "/";
|
|
string ftppath = "/" + DateTime.Now.ToString("yyyy-MM-dd") + "/";
|
|
|
|
|
+ OperateResult.AppendText("开始上传日志:" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss fff") + "\n");
|
|
|
ftp.UpLoadFile(folderpath, SN + ".txt", ftppath, "");
|
|
ftp.UpLoadFile(folderpath, SN + ".txt", ftppath, "");
|
|
|
|
|
+ OperateResult.AppendText("上传日志结束:" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss fff") + "\n");
|
|
|
int num = int.Parse(dh.ExecuteSql("insert into STEPTESTDETAIL (std_id,std_sn,std_makecode,std_indate,std_class)select STEPTESTDETAIL_seq.nextval,ms_sncode,ms_makecode,sysdate,'http://113.98.196.181:8099/ftp" + ftppath + SN + ".txt" + "' from makeserial where substr(ms_sncode,0,12)='" + SN + "'", "insert").ToString());
|
|
int num = int.Parse(dh.ExecuteSql("insert into STEPTESTDETAIL (std_id,std_sn,std_makecode,std_indate,std_class)select STEPTESTDETAIL_seq.nextval,ms_sncode,ms_makecode,sysdate,'http://113.98.196.181:8099/ftp" + ftppath + SN + ".txt" + "' from makeserial where substr(ms_sncode,0,12)='" + SN + "'", "insert").ToString());
|
|
|
if (num > 0)
|
|
if (num > 0)
|
|
|
{
|
|
{
|
|
|
OperateResult.AppendText("序列号:" + SN + "上传成功\n");
|
|
OperateResult.AppendText("序列号:" + SN + "上传成功\n");
|
|
|
- if (BackUpFolderPath.Text != "")
|
|
|
|
|
- File.Move(filename, BackUpFolderPath.Text);
|
|
|
|
|
|
|
+ if (BackUpFolderPath.Text != "")
|
|
|
|
|
+ File.Move(filename, BackUpFolderPath.Text+"/"+ SN+".txt");
|
|
|
//SafeDeleteFile(FileName);
|
|
//SafeDeleteFile(FileName);
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
@@ -377,15 +379,15 @@ namespace FileWatcher
|
|
|
try
|
|
try
|
|
|
{
|
|
{
|
|
|
string ftppath = "/" + DateTime.Now.ToString("yyyy-MM-dd") + "/";
|
|
string ftppath = "/" + DateTime.Now.ToString("yyyy-MM-dd") + "/";
|
|
|
- OperateResult.AppendText(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss fff") + "\n");
|
|
|
|
|
|
|
+ OperateResult.AppendText("开始上传日志:" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss fff") + "\n");
|
|
|
ftp.UpLoadFile(folderpath, SN + ".txt", ftppath, "");
|
|
ftp.UpLoadFile(folderpath, SN + ".txt", ftppath, "");
|
|
|
- OperateResult.AppendText(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss fff") + "\n");
|
|
|
|
|
|
|
+ OperateResult.AppendText("上传日志结束:" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss fff") + "\n");
|
|
|
int num = int.Parse(dh.ExecuteSql("insert into STEPTESTDETAIL (std_id,std_sn,std_makecode,std_indate,std_class)select STEPTESTDETAIL_seq.nextval,ms_sncode,ms_makecode,sysdate,'http://113.98.196.181:8099/ftp" + ftppath + SN + ".txt" + "' from makeserial where ms_sncode='" + SN + "'", "insert").ToString());
|
|
int num = int.Parse(dh.ExecuteSql("insert into STEPTESTDETAIL (std_id,std_sn,std_makecode,std_indate,std_class)select STEPTESTDETAIL_seq.nextval,ms_sncode,ms_makecode,sysdate,'http://113.98.196.181:8099/ftp" + ftppath + SN + ".txt" + "' from makeserial where ms_sncode='" + SN + "'", "insert").ToString());
|
|
|
if (num > 0)
|
|
if (num > 0)
|
|
|
{
|
|
{
|
|
|
OperateResult.AppendText("序列号:" + SN + "上传成功\n");
|
|
OperateResult.AppendText("序列号:" + SN + "上传成功\n");
|
|
|
if (BackUpFolderPath.Text != "")
|
|
if (BackUpFolderPath.Text != "")
|
|
|
- File.Move(filename, BackUpFolderPath.Text);
|
|
|
|
|
|
|
+ File.Move(filename, BackUpFolderPath.Text + "/" + SN + ".txt");
|
|
|
//SafeDeleteFile(FileName);
|
|
//SafeDeleteFile(FileName);
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|