DS7_JinGang
hanxuntao 2 years ago
parent bea67ab9f4
commit 8998fbc262

@ -2445,6 +2445,8 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
if (result.Success) { if (result.Success) {
if (ConfigurationManager.AppSettings["FanWeiOAAPI"] == "true")
{
var _r = FanWeiOA_Submit(headdata, USERID, usercode, companyid); var _r = FanWeiOA_Submit(headdata, USERID, usercode, companyid);
if (!_r.Success) if (!_r.Success)
@ -2455,7 +2457,8 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
return result; return result;
} }
else { else
{
var requestid = result.Data.ToString(); var requestid = result.Data.ToString();
var cmdupdate = db.GetSqlStringCommand("update ch_fee_payapplication set PAYAPPID='" + requestid + "' where BILLNO=@BILLNO"); var cmdupdate = db.GetSqlStringCommand("update ch_fee_payapplication set PAYAPPID='" + requestid + "' where BILLNO=@BILLNO");
@ -2464,6 +2467,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
db.ExecuteNonQuery(cmdupdate, tran); db.ExecuteNonQuery(cmdupdate, tran);
} }
} }
}
tran.Commit(); tran.Commit();
} }
catch (Exception e) catch (Exception e)
@ -2620,11 +2624,16 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
} }
} }
if (ConfigurationManager.AppSettings["FanWeiOAAPI"] == "true")
{
foreach (var headdata in oacommitList)
{
foreach (var headdata in oacommitList) {
var _r = FanWeiOA_Submit(headdata, USERID, usercode, companyid); var _r = FanWeiOA_Submit(headdata, USERID, usercode, companyid);
if (!_r.Success) { if (!_r.Success)
{
tran.Rollback(); tran.Rollback();
result.Success = false; result.Success = false;
result.Message = $"提交审核错误[{_r.Message}],请重试或联系系统管理员"; result.Message = $"提交审核错误[{_r.Message}],请重试或联系系统管理员";
@ -2641,6 +2650,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
db.ExecuteNonQuery(cmdupdate, tran); db.ExecuteNonQuery(cmdupdate, tran);
} }
} }
}
tran.Commit(); tran.Commit();

@ -365,12 +365,13 @@ namespace DSWeb.MvcShipping.Controllers
var bodyList = JsonConvert.Deserialize<List<MsChFee>>(chfeebody); var bodyList = JsonConvert.Deserialize<List<MsChFee>>(chfeebody);
var result =new DBResult(); var result =new DBResult();
T_ALL_DA T_ALL_DA = new T_ALL_DA(); T_ALL_DA T_ALL_DA = new T_ALL_DA();
decimal feetype = 0;
var custstr = ""; var custstr = "";
if (bodyList != null) if (bodyList != null)
{ {
foreach (var enumValue in bodyList) foreach (var enumValue in bodyList)
{ {
feetype = enumValue.FeeType;
var BLCOUNT2 = T_ALL_DA.GetStrSQL("BLCOUNT", "select count(*) BLCOUNT from info_client WHERE ISNULL(ISSTOP,0)=0 AND SHORTNAME='" + enumValue.CustomerName + "'"); var BLCOUNT2 = T_ALL_DA.GetStrSQL("BLCOUNT", "select count(*) BLCOUNT from info_client WHERE ISNULL(ISSTOP,0)=0 AND SHORTNAME='" + enumValue.CustomerName + "'");
if (BLCOUNT2 == "0") if (BLCOUNT2 == "0")
{ {
@ -389,9 +390,37 @@ namespace DSWeb.MvcShipping.Controllers
} }
var FEESAVENOTSAMEAMOUNT = MsSysParamSetDAL.GetData("PARAMNAME='FEESAVENOTSAMEAMOUNT'"); var FEESAVENOTSAMEAMOUNT = MsSysParamSetDAL.GetData("PARAMNAME='FEESAVENOTSAMEAMOUNT'");
if (FEESAVENOTSAMEAMOUNT.PARAMVALUE == "1") if (FEESAVENOTSAMEAMOUNT.PARAMVALUE == "1"&& feetype==2)
{ {
var oldfeelist = MsChFeeDAL.GetAllDataList("BSNO='" + bsno + "' AND FEETYPE=2");
var findlist = new List<MsChFee>(); var findlist = new List<MsChFee>();
foreach (var fee in oldfeelist)
{
var newfee = bodyList.Find(X => X.GId == fee.GId);
if (newfee == null&&fee.FeeType == 2)
{
var newinvlink = findlist.Find(X => X.Currency == fee.Currency && X.CustomerName == fee.CustomerName && X.Amount == fee.Amount);
if (newinvlink == null)
{
var InvLink = new MsChFee();
InvLink.Currency = fee.Currency;
InvLink.CustomerName = fee.CustomerName;
InvLink.Amount = fee.Amount;
findlist.Add(InvLink);
}
else
{
var jsonRespose3 = new JsonResponse
{
Success = false,
Message = "客户名称,金额,币别 ,相同,不允许保存,请调整!",
};
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose3) };
}
}
}
foreach (var fee in bodyList) foreach (var fee in bodyList)
{ {
if (fee.FeeType == 2) if (fee.FeeType == 2)

@ -1276,6 +1276,8 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL
else else
{ {
rangstr = GetSumRangDAStr(userid, username, companyid); rangstr = GetSumRangDAStr(userid, username, companyid);
}
var nopowerOpen = MsSysParamSetDAL.GetData("PARAMNAME='FeeSumIsContentNotOpen'"); var nopowerOpen = MsSysParamSetDAL.GetData("PARAMNAME='FeeSumIsContentNotOpen'");
var isopen = MsBaseInfoDAL.MsBaseInfoDAL.GetUserModuleEnable("modFeenotopen", userid); var isopen = MsBaseInfoDAL.MsBaseInfoDAL.GetUserModuleEnable("modFeenotopen", userid);
var isopenstr = ""; var isopenstr = "";
@ -1312,10 +1314,6 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL
} }
}
var FeenotPr = MsBaseInfoDAL.MsBaseInfoDAL.GetUserModuleEnable("modFeenotPr", userid); var FeenotPr = MsBaseInfoDAL.MsBaseInfoDAL.GetUserModuleEnable("modFeenotPr", userid);
if (!string.IsNullOrEmpty(rangstr)) if (!string.IsNullOrEmpty(rangstr))
@ -1385,6 +1383,42 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL
else else
{ {
rangstr = GetSumRangDAStr(userid, username, companyid); rangstr = GetSumRangDAStr(userid, username, companyid);
//var nopowerOpen = MsSysParamSetDAL.GetData("PARAMNAME='FeeSumIsContentNotOpen'");
//var isopen = MsBaseInfoDAL.MsBaseInfoDAL.GetUserModuleEnable("modFeenotopen", userid);
//var isopenstr = "";
//if (isopen == false)
//{
// #region 2018年2月7日15:54:52 李进举 鼎世
// if (nopowerOpen.PARAMVALUE == "0")
// {
// //配置否,则走正常机密费用逻辑
// isopenstr = " ( ENTEROPERATOR='" + userid + "' OR ( ENTEROPERATOR<>'" + userid + "' AND (ISOPEN=0 OR ISOPEN IS NULL))) ";
// if (!string.IsNullOrEmpty(rangstr))
// rangstr = rangstr + " and " + isopenstr;
// else
// rangstr = isopenstr;
// }
// else
// {
// //配置是,则不走机密费用逻辑
// rangstr = " 1 = 1 ";
// }
// #endregion
//}
//var isacc = MsBaseInfoDAL.MsBaseInfoDAL.GetUserModuleEnable("modISWACC", userid);
//var isaccstr = "";
//if (isacc == false)
//{
// isaccstr = " ISNULL(ISACC,0)=0 ";
// if (!string.IsNullOrEmpty(rangstr))
// rangstr = rangstr + " and " + isaccstr;
// else
// rangstr = isaccstr;
//}
}
var nopowerOpen = MsSysParamSetDAL.GetData("PARAMNAME='FeeSumIsContentNotOpen'"); var nopowerOpen = MsSysParamSetDAL.GetData("PARAMNAME='FeeSumIsContentNotOpen'");
var isopen = MsBaseInfoDAL.MsBaseInfoDAL.GetUserModuleEnable("modFeenotopen", userid); var isopen = MsBaseInfoDAL.MsBaseInfoDAL.GetUserModuleEnable("modFeenotopen", userid);
var isopenstr = ""; var isopenstr = "";
@ -1419,7 +1453,6 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL
else else
rangstr = isaccstr; rangstr = isaccstr;
} }
}
var FeenotPr = MsBaseInfoDAL.MsBaseInfoDAL.GetUserModuleEnable("modFeenotPr", userid); var FeenotPr = MsBaseInfoDAL.MsBaseInfoDAL.GetUserModuleEnable("modFeenotPr", userid);

Loading…
Cancel
Save