佣金导入,改回成费用锁定后无法导入的逻辑

DS7_JinGang
ddlucky 2 years ago
parent 27d0f0b5e9
commit d99c992d95

@ -1858,7 +1858,10 @@ namespace DSWeb.MvcShipping.Controllers
var USERID = Convert.ToString(Session["USERID"]).ToString(); var USERID = Convert.ToString(Session["USERID"]).ToString();
Helper Helper = new Helper(USERID, Convert.ToString(Session["SHOWNAME"]).ToString(), Convert.ToString(Session["COMPANYID"]).ToString()); //新增更改单Helper 新增更改单Helper = new 新增更改单Helper(USERID, Convert.ToString(Session["SHOWNAME"]).ToString(), Convert.ToString(Session["COMPANYID"]).ToString());
foreach (DataRow row in table.Rows) { foreach (DataRow row in table.Rows) {
@ -1876,51 +1879,54 @@ namespace DSWeb.MvcShipping.Controllers
if (head.FEESTATUS == 1) if (head.FEESTATUS == 1)
{ {
//建立一个费用更改单
Helper.AddHead(head, USERID, filename + "佣金导入");
message = message + " 提单号:" + MBLNO + " 无法导入,请确认提单号正确并未费用封账!";
break;
//建立一个费用更改单
var mblno=Convert.ToString(row["主提单号"]); //新增更改单Helper.AddHead(head, USERID, filename + "佣金导入");
var DRCRStr = Convert.ToString(row["收/付"]);
//var DRCR = DRCRStr == "收" ? 1 : 2;
var FEENAME = Convert.ToString(row["费用名称"]).Trim(); //var mblno=Convert.ToString(row["主提单号"]);
//var DRCRStr = Convert.ToString(row["收/付"]);
var CUSTNAME = Convert.ToString(row["结算对象"]).Trim(); ////var DRCR = DRCRStr == "收" ? 1 : 2;
var BLCOUNT = T_ALL_DA.GetStrSQL("BLCOUNT", "select COUNT(*) BLCOUNT from info_client where SHORTNAME='" + CUSTNAME + "'"); //var FEENAME = Convert.ToString(row["费用名称"]).Trim();
if (BLCOUNT == "0")
{ //var CUSTNAME = Convert.ToString(row["结算对象"]).Trim();
isSucess = false; //var BLCOUNT = T_ALL_DA.GetStrSQL("BLCOUNT", "select COUNT(*) BLCOUNT from info_client where SHORTNAME='" + CUSTNAME + "'");
message = message + " 提单号:" + MBLNO + " 无法导入,请确认客户名称:" + CUSTNAME + ",是否正确!"; //if (BLCOUNT == "0")
//jsonRespose.Success = false; //{
//jsonRespose.Message = message; // isSucess = false;
//return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; // message = message + " 提单号:" + MBLNO + " 无法导入,请确认客户名称:" + CUSTNAME + ",是否正确!";
} // //jsonRespose.Success = false;
BLCOUNT = T_ALL_DA.GetStrSQL("BLCOUNT", "select COUNT(*) BLCOUNT from code_fee where [NAME]='" + FEENAME + "'"); // //jsonRespose.Message = message;
if (BLCOUNT == "0") // //return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
{ //}
isSucess = false; //BLCOUNT = T_ALL_DA.GetStrSQL("BLCOUNT", "select COUNT(*) BLCOUNT from code_fee where [NAME]='" + FEENAME + "'");
//if (i != 0) message = "已导入" + i.ToString() + "条费用。"; //if (BLCOUNT == "0")
message = message + " 提单号:" + MBLNO + " 无法导入,请确认费用名称:" + FEENAME + ",是否正确!"; //{
break; // isSucess = false;
// //if (i != 0) message = "已导入" + i.ToString() + "条费用。";
} // message = message + " 提单号:" + MBLNO + " 无法导入,请确认费用名称:" + FEENAME + ",是否正确!";
// break;
var AMOUNTSTR = Convert.ToString(row["金额"]);
var EXRATESTR = Convert.ToString(row["汇率"]); //}
var CURR = Convert.ToString(row["币种"]);
var ISOPEN = Convert.ToString(row["是否机密"]); //var AMOUNTSTR = Convert.ToString(row["金额"]);
decimal amount = 0M; //var EXRATESTR = Convert.ToString(row["汇率"]);
decimal exrate = 0M; //var CURR = Convert.ToString(row["币种"]);
try { //var ISOPEN = Convert.ToString(row["是否机密"]);
amount = Convert.ToDecimal(AMOUNTSTR); //decimal amount = 0M;
exrate = Convert.ToDecimal(EXRATESTR); //decimal exrate = 0M;
} //try {
catch (Exception e) { // amount = Convert.ToDecimal(AMOUNTSTR);
// exrate = Convert.ToDecimal(EXRATESTR);
} //}
//catch (Exception e) {
Helper.AddFee(mblno, DRCRStr, FEENAME, CUSTNAME, amount,exrate,CURR, ISOPEN);
//}
//新增更改单Helper.AddFee(mblno, DRCRStr, FEENAME, CUSTNAME, amount,exrate,CURR, ISOPEN);
} }
} }
} }
@ -1931,7 +1937,7 @@ namespace DSWeb.MvcShipping.Controllers
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
} }
else { else {
Helper.DoSave(); //新增更改单Helper.DoSave();
} }
var i = 0; var i = 0;

Loading…
Cancel
Save