新增上传完报价
Цей коміт міститься в:
@@ -31,6 +31,7 @@
|
|||||||
typeof(CeErpTradeCell),
|
typeof(CeErpTradeCell),
|
||||||
typeof(XLog),
|
typeof(XLog),
|
||||||
typeof(CeErpTradeLog),
|
typeof(CeErpTradeLog),
|
||||||
|
typeof(CeErpProduct),
|
||||||
typeof(CeErpDataSendOrderInfo),
|
typeof(CeErpDataSendOrderInfo),
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -344,9 +344,10 @@ public partial class copydownload : System.Web.UI.Page
|
|||||||
|
|
||||||
private string getDesignDate(object v)
|
private string getDesignDate(object v)
|
||||||
{
|
{
|
||||||
return DateTime.Now.ToString("yyyy-MM-dd");
|
int year = DateTime.Now.Year;
|
||||||
if (v.ToString() == "") return "";
|
int month = DateTime.Now.Month;
|
||||||
return Convert.ToDateTime(v).ToString("yyyy-MM-dd");
|
int day = DateTime.Now.Day;
|
||||||
|
return year + "\\" + month + "\\" + day;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 批量进行多个文件压缩到一个文件
|
/// 批量进行多个文件压缩到一个文件
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ using System.Security.Principal;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using MSharp.Framework;
|
||||||
|
using System.Net.Http.Headers;
|
||||||
|
using System.Net.Http;
|
||||||
|
|
||||||
public partial class uploadFile : System.Web.UI.Page
|
public partial class uploadFile : System.Web.UI.Page
|
||||||
{
|
{
|
||||||
@@ -76,7 +79,6 @@ public partial class uploadFile : System.Web.UI.Page
|
|||||||
// return;
|
// return;
|
||||||
//}
|
//}
|
||||||
//CeErpTradeCell.GetByCtid("1717009344450030601");
|
//CeErpTradeCell.GetByCtid("1717009344450030601");
|
||||||
|
|
||||||
if (Request.Files.Count < 1)
|
if (Request.Files.Count < 1)
|
||||||
{
|
{
|
||||||
conErc("空文件!");
|
conErc("空文件!");
|
||||||
@@ -102,7 +104,7 @@ public partial class uploadFile : System.Web.UI.Page
|
|||||||
MatchCollection nameMatches = nameReg.Matches(file_name);//设定要查找的字符串
|
MatchCollection nameMatches = nameReg.Matches(file_name);//设定要查找的字符串
|
||||||
if (nameMatches.Count > 0)
|
if (nameMatches.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (System.Text.RegularExpressions.Match match in nameMatches)
|
foreach (Match match in nameMatches)
|
||||||
{
|
{
|
||||||
file_name = file_name.Replace(match.Value, "");
|
file_name = file_name.Replace(match.Value, "");
|
||||||
}
|
}
|
||||||
@@ -264,7 +266,8 @@ public partial class uploadFile : System.Web.UI.Page
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!entity.seller_memo.Contains("出货"))
|
string patterns = "出货|加急|顺丰|打印|专版|当天发";
|
||||||
|
if (!Regex.IsMatch(entity.seller_memo, patterns) && string.IsNullOrEmpty(entity.OtherMemo) && !entity.ctid.Contains("S_"))
|
||||||
{
|
{
|
||||||
if (entity.payment <= 300 && num >= 200 && num <= 3000 && entity.ShopId != 14 && entity.ShopId != 99)
|
if (entity.payment <= 300 && num >= 200 && num <= 3000 && entity.ShopId != 14 && entity.ShopId != 99)
|
||||||
{
|
{
|
||||||
@@ -420,7 +423,9 @@ public partial class uploadFile : System.Web.UI.Page
|
|||||||
entity.Update();
|
entity.Update();
|
||||||
//CeErpTradeCell.UpdateRelationOrder(entity);
|
//CeErpTradeCell.UpdateRelationOrder(entity);
|
||||||
CeErpTradeCell.UpdateRelationOrder(entity.ctid);
|
CeErpTradeCell.UpdateRelationOrder(entity.ctid);
|
||||||
|
CeErpProduct product = CeErpProduct.GetById(entity.ProductId);
|
||||||
|
string param = "[{ \"product_type\": \"" + product.PType + "\", \"remark\": \"" + entity.seller_memo + "\" }]";
|
||||||
|
sysHttpClient(param);
|
||||||
CeErpTradeLog.AddLog(entity.ctid, entity.OrderState, userId, "上传设计文件-" + saveFile);
|
CeErpTradeLog.AddLog(entity.ctid, entity.OrderState, userId, "上传设计文件-" + saveFile);
|
||||||
if (ctid.IndexOf("S_") >= -1)
|
if (ctid.IndexOf("S_") >= -1)
|
||||||
{
|
{
|
||||||
@@ -622,8 +627,41 @@ public partial class uploadFile : System.Web.UI.Page
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void sysHttpClient(string param)
|
||||||
|
{
|
||||||
|
Task.Run(async () =>
|
||||||
|
{
|
||||||
|
var client = new HttpClient();
|
||||||
|
var request = new HttpRequestMessage
|
||||||
|
{
|
||||||
|
Method = HttpMethod.Post,
|
||||||
|
RequestUri = new Uri("http://47.122.57.102:11004/quotations/batch"),
|
||||||
|
Content = new StringContent(param)
|
||||||
|
{
|
||||||
|
Headers =
|
||||||
|
{
|
||||||
|
ContentType = new MediaTypeHeaderValue("application/json")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var task = Task.Run(() =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var response = client.SendAsync(request).Result;
|
||||||
|
response.EnsureSuccessStatusCode();
|
||||||
|
return response.Content.ReadAsStringAsync().Result;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private void Decompress(string GzipFile, string targetPath)
|
private void Decompress(string GzipFile, string targetPath)
|
||||||
{
|
{
|
||||||
//string directoryName = Path.GetDirectoryName(targetPath + "\\") + "\\";
|
//string directoryName = Path.GetDirectoryName(targetPath + "\\") + "\\";
|
||||||
|
|||||||
Посилання в новій задачі
Заблокувати користувача