diff --git a/Stone.WinForm/Stone.WinBiz/JISAdmin/F_JIS5000_Print.cs b/Stone.WinForm/Stone.WinBiz/JISAdmin/F_JIS5000_Print.cs index 5a51346..4a63584 100644 --- a/Stone.WinForm/Stone.WinBiz/JISAdmin/F_JIS5000_Print.cs +++ b/Stone.WinForm/Stone.WinBiz/JISAdmin/F_JIS5000_Print.cs @@ -805,16 +805,16 @@ namespace Stone.WinBiz.JISAdmin public static string WriteASN_VDA(LocalDBService db ,DataSet dsData, string AsnNumber) { DateTime dtNow = MyDateTime.GetServerDateTime(); - + string fileType = dsData.Tables[0].Rows[0]["fileType"].ToString(); DateTime Date = Convert.ToDateTime(dsData.Tables[0].Rows[0]["Date"]); - + string text = GetASNTemp_Standard(); - - string LocationCode = dsData.Tables[0].Rows[0]["LocationCode"].ToString(); - if (LocationCode == "") - throw new Exception("卸货点代码不能为空"); - + + // string LocationCode = dsData.Tables[0].Rows[0]["LocationCode"].ToString(); + // if (LocationCode == "") + // throw new Exception("卸货点代码不能为空"); + text = text.Replace("{DATE}", dtNow.ToString("yyMMdd")); text = text.Replace("{TIME}", dtNow.ToString("HHmm")); text = text.Replace("{ASNNUMBER}", AsnNumber); @@ -825,8 +825,8 @@ namespace Stone.WinBiz.JISAdmin text = text.Replace("{DATE2}", dtNow.ToString("yyMMdd:HHmm")); //发货时间 text = text.Replace("{LINE}", dsData.Tables[0].Rows.Count.ToString()); text = text.Replace("{TOTAL}", dsData.Tables[0].Compute("SUM(Qty)", "1=1").ToString()); - text = text.Replace("{CUSTOMERCODE}", LocationCode); - + // text = text.Replace("{CUSTOMERCODE}", LocationCode); + string detail = ""; foreach (DataRow drData in dsData.Tables[0].Rows) { @@ -840,12 +840,12 @@ namespace Stone.WinBiz.JISAdmin obj[2] = drData["OrderNumber"].ToString(); obj[3] = drData["PackageNo"].ToString().Trim(); line = string.Format(line, obj); - + detail += line; } - + text = text.Replace("{DETAIL}", detail); - + List lstName = WriteANSFile_Standard(text, fileType, AsnNumber); FtpASN(lstName[0]); @@ -856,6 +856,7 @@ namespace Stone.WinBiz.JISAdmin #endregion return lstName[1]; + // return ""; } public static void WriteQAD_VDA(DataSet dsData, string AsnNumber) diff --git a/Stone.WinForm/Stone.WinModule/Standard/frmJISVDAASN.cs b/Stone.WinForm/Stone.WinModule/Standard/frmJISVDAASN.cs index 734e5bc..d2676dc 100644 --- a/Stone.WinForm/Stone.WinModule/Standard/frmJISVDAASN.cs +++ b/Stone.WinForm/Stone.WinModule/Standard/frmJISVDAASN.cs @@ -174,7 +174,14 @@ namespace Stone.WinModule.Standard if (dsData.Tables[0].Select("[IsUpload]<>True").Length > 0) throw new Exception(AsnNumber + " 未上传,不能补传"); - string filename = F_JIS5000_Print.WriteASN_VDA(new LocalDBService(), dsData, AsnNumber); + // string filename = F_JIS5000_Print.WriteASN_VDA(new LocalDBService(), dsData, AsnNumber); + string filename = AsnNumber; + var db = new LocalDBService(); + #region 增加待生成报文数据 金杯李尔不使用FTP服务器 由服务器监听程序进行报文生成 + var strsql = ""; + strsql = "Insert into t_ASN_UPLOAD (AsnNum) values ('" + AsnNumber + "')"; + db.Exec_NonQuery(strsql); + #endregion F_JIS_Log.WriteLogsEnd(LogID, true, filename); @@ -203,7 +210,7 @@ namespace Stone.WinModule.Standard if (!MyMessageBox.ShowQuestion($"是否要上传 {AsnNumber} ?")) return; - if (!CheckASN(AsnNumber)) return; + // if (!CheckASN(AsnNumber)) return; LogID = F_JIS_Log.WriteLogsStart($"上传ASN {AsnNumber}"); @@ -220,14 +227,14 @@ namespace Stone.WinModule.Standard if (dsData.Tables[0].Select("[IsUpload]=True").Length > 0) throw new Exception(AsnNumber + " 已经上传"); - if (dsData.Tables[0].Select("[IsPrintASN]=False").Length > 0) - throw new Exception(AsnNumber + " 未打印"); + // if (dsData.Tables[0].Select("[IsPrintASN]=False").Length > 0) + // throw new Exception(AsnNumber + " 未打印"); if (dsData.Tables[0].Select("[IsPackingVerification]=False").Length > 0) throw new Exception(AsnNumber + " 未完成装箱校验"); if (dsData.Tables[0].Select("[IsShipingVerification]=False").Length > 0) - throw new Exception(AsnNumber + " 未完成装车校验"); + throw new Exception(AsnNumber + " 未完成发运操作"); DateTime UploadTime = t_JIS_VDA.GetDateTime(); @@ -241,10 +248,16 @@ namespace Stone.WinModule.Standard $"[AsnNumber]='{AsnNumber}'"); - string filename = F_JIS5000_Print.WriteASN_VDA(db, dsData, AsnNumber); + // string filename = F_JIS5000_Print.WriteASN_VDA(db, dsData, AsnNumber); + string filename = AsnNumber; + #region 增加待生成报文数据 金杯李尔不使用FTP服务器 由服务器监听程序进行报文生成 + var strsql = ""; + strsql = "Insert into t_ASN_UPLOAD (AsnNum) values ('" + AsnNumber + "')"; + db.Exec_NonQuery(strsql); + #endregion #region 计算累计发货数量 - var strsql = ""; + strsql = ""; var dtPartOutQty = new DataTable(); strsql = "select * from t_PartOutQty"; dtPartOutQty = db.Exec_DataSet(strsql).Tables[0]; diff --git a/Stone.WinForm/Stone.WinModule/Standard/frmMessageQuestion.cs b/Stone.WinForm/Stone.WinModule/Standard/frmMessageQuestion.cs index 7d1f725..32a3d80 100644 --- a/Stone.WinForm/Stone.WinModule/Standard/frmMessageQuestion.cs +++ b/Stone.WinForm/Stone.WinModule/Standard/frmMessageQuestion.cs @@ -34,7 +34,7 @@ namespace Stone.WinModule.Standard { frmPasswordVerify frm = new frmPasswordVerify(); // frm.UserName = User.UserInfo.UserName; - frm.UserName = "wping"; + frm.UserName = "wzfeng"; if (frm.ShowDialog() == DialogResult.OK) { this.DialogResult = DialogResult.OK;