Commit bc266271 by guanzhenshan

把帐号改为paypal帐号

parent 38ecf6ee
......@@ -20,12 +20,7 @@ namespace Bailun.DC.Models
public int company_id { get; set; }
/// <summary>
/// 帐号id
/// </summary>
public int account_id { get; set; }
/// <summary>
/// 帐号名称
/// paypal帐号名称
/// </summary>
public string account_name { get; set; }
......
......@@ -2035,7 +2035,7 @@ namespace Bailun.DC.Services
{
if (list.Count > 0)
{
var sql = "insert dc_base_income_ebay_paypal (account_id,account_name,record_time,time_zone,name,type,status,currency,gross,fee,net,from_email,to_email,transaction_id,shipping_address,address_status,item_title,item_id,shipping_handling_amount,insurance_amount,sales_tax,option_name1,option_value1,option_name2,option_value2,reference_txn_id,invoice_number,custom_number,quantity,receipt_id,balance,address_line1,address_line2,town,province,postal_code,country,contact_phone_number,subject,note,country_code,balance_impact,createtime,createuserid,createusername,company_id) values ";
var sql = "insert dc_base_income_ebay_paypal (account_name,record_time,time_zone,name,type,status,currency,gross,fee,net,from_email,to_email,transaction_id,shipping_address,address_status,item_title,item_id,shipping_handling_amount,insurance_amount,sales_tax,option_name1,option_value1,option_name2,option_value2,reference_txn_id,invoice_number,custom_number,quantity,receipt_id,balance,address_line1,address_line2,town,province,postal_code,country,contact_phone_number,subject,note,country_code,balance_impact,createtime,createuserid,createusername,company_id) values ";
var str = " ";
var index = 1;
......@@ -2055,7 +2055,7 @@ namespace Bailun.DC.Services
{
foreach (var item in list)
{
str += $"({item.account_id},'{item.account_name}','{item.record_time}','{item.time_zone}','{item.name.Replace("'","")}','{item.type}','{item.status}','{item.currency}','{item.gross}','{item.fee}','{item.net}','{item.from_email}','{item.to_email}','{item.transaction_id}','{item.shipping_address.Replace("'","")}','{item.address_status}','{item.item_title.Replace("'", "")}','{item.item_id}','{item.shipping_handling_amount}','{item.insurance_amount}','{item.sales_tax}','{item.option_name1}','{item.option_value1}','{item.option_name2}','{item.option_value2}','{item.reference_txn_id}','{item.invoice_number}','{item.custom_number}','{item.quantity}','{item.receipt_id}','{item.balance}','{item.address_line1.Replace("'", "")}','{item.address_line2.Replace("'", "")}','{item.town.Replace("'", "")}','{item.province.Replace("'", "")}','{item.postal_code}','{item.country}','{item.contact_phone_number.Replace("'", "")}','{item.subject.Replace("'", "")}','{item.note.Replace("'", "")}','{item.country_code}','{item.balance_impact}','{item.createtime}','{item.createuserid}','{item.createusername}',{item.company_id}),";
str += $"('{item.account_name}','{item.record_time}','{item.time_zone}','{item.name.Replace("'","")}','{item.type}','{item.status}','{item.currency}','{item.gross}','{item.fee}','{item.net}','{item.from_email}','{item.to_email}','{item.transaction_id}','{item.shipping_address.Replace("'","")}','{item.address_status}','{item.item_title.Replace("'", "")}','{item.item_id}','{item.shipping_handling_amount}','{item.insurance_amount}','{item.sales_tax}','{item.option_name1}','{item.option_value1}','{item.option_name2}','{item.option_value2}','{item.reference_txn_id}','{item.invoice_number}','{item.custom_number}','{item.quantity}','{item.receipt_id}','{item.balance}','{item.address_line1.Replace("'", "")}','{item.address_line2.Replace("'", "")}','{item.town.Replace("'", "")}','{item.province.Replace("'", "")}','{item.postal_code}','{item.country}','{item.contact_phone_number.Replace("'", "")}','{item.subject.Replace("'", "")}','{item.note.Replace("'", "")}','{item.country_code}','{item.balance_impact}','{item.createtime}','{item.createuserid}','{item.createusername}',{item.company_id}),";
}
str = str.Substring(0, str.Length-1);
......
......@@ -4591,19 +4591,10 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var index = file.FileName.IndexOf("==");
var accountname = file.FileName.Substring(index+2, file.FileName.Length - (index + 2));
var indexdot = accountname.IndexOf(".");
var indexdot = accountname.ToLower().IndexOf(".csv");
accountname = accountname.Substring(0, indexdot);
var objAccount = Services.CommonServices.GetCompanyAccount(accountname, companyid);
if (objAccount == null)
{
return Json(new {
success = false,
msg = "找不到该账户,请确认账户是否正确",
});
}
var read = new System.IO.StreamReader(file.OpenReadStream());
var list = new List<dc_base_income_ebay_paypal>();
var s = read.ReadLine(); //不要第一行
......@@ -4634,8 +4625,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
{
company_id = companyid,
record_time = DateTime.Parse(arr[0] + " " + arr[1]),
account_id = objAccount.account_id,
account_name = objAccount.account_name,
account_name = accountname,
time_zone = arr[2],
name = arr[3],
......@@ -4774,7 +4764,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var m = new dc_base_income_ebay_paypal() {
company_id = companyid,
record_time = DateTime.Parse(Date + " " + Time),
account_id = account.account_id,
//account_id = account.account_id,
account_name = account.account_name,
time_zone = row["时区"].ToString(),
......@@ -4866,7 +4856,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var m = new dc_base_income_ebay_paypal() {
company_id = companyid,
record_time = DateTime.Parse(Date + " " + Time),
account_id = account.account_id,
//account_id = account.account_id,
account_name = account.account_name,
time_zone = row["TimeZone"].ToString(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment