DS7_JinGang
hanxuntao 2 years ago
parent bea67ab9f4
commit 8998fbc262

@ -2445,23 +2445,27 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
if (result.Success) {
var _r = FanWeiOA_Submit(headdata, USERID, usercode, companyid);
if (!_r.Success)
if (ConfigurationManager.AppSettings["FanWeiOAAPI"] == "true")
{
tran.Rollback();
result.Success = false;
result.Message = $"提交审核错误[{_r.Message}],请重试或联系系统管理员";
var _r = FanWeiOA_Submit(headdata, USERID, usercode, companyid);
return result;
}
else {
var requestid = result.Data.ToString();
if (!_r.Success)
{
tran.Rollback();
result.Success = false;
result.Message = $"提交审核错误[{_r.Message}],请重试或联系系统管理员";
var cmdupdate = db.GetSqlStringCommand("update ch_fee_payapplication set PAYAPPID='"+ requestid + "' where BILLNO=@BILLNO");
cmdupdate.Parameters.Clear();
db.AddInParameter(cmdupdate, "@BILLNO", DbType.String, bill);
db.ExecuteNonQuery(cmdupdate, tran);
return result;
}
else
{
var requestid = result.Data.ToString();
var cmdupdate = db.GetSqlStringCommand("update ch_fee_payapplication set PAYAPPID='" + requestid + "' where BILLNO=@BILLNO");
cmdupdate.Parameters.Clear();
db.AddInParameter(cmdupdate, "@BILLNO", DbType.String, bill);
db.ExecuteNonQuery(cmdupdate, tran);
}
}
}
tran.Commit();
@ -2620,25 +2624,31 @@ 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);
if (!_r.Success) {
tran.Rollback();
result.Success = false;
result.Message = $"提交审核错误[{_r.Message}],请重试或联系系统管理员";
var _r = FanWeiOA_Submit(headdata, USERID, usercode, companyid);
return result;
}
else
{
var requestid = _r.Data.ToString();
if (!_r.Success)
{
tran.Rollback();
result.Success = false;
result.Message = $"提交审核错误[{_r.Message}],请重试或联系系统管理员";
var cmdupdate = db.GetSqlStringCommand("update ch_fee_payapplication set PAYAPPID='" + requestid + "' where BILLNO=@BILLNO");
cmdupdate.Parameters.Clear();
db.AddInParameter(cmdupdate, "@BILLNO", DbType.String, headdata.BILLNO);
db.ExecuteNonQuery(cmdupdate, tran);
return result;
}
else
{
var requestid = _r.Data.ToString();
var cmdupdate = db.GetSqlStringCommand("update ch_fee_payapplication set PAYAPPID='" + requestid + "' where BILLNO=@BILLNO");
cmdupdate.Parameters.Clear();
db.AddInParameter(cmdupdate, "@BILLNO", DbType.String, headdata.BILLNO);
db.ExecuteNonQuery(cmdupdate, tran);
}
}
}

@ -365,12 +365,13 @@ namespace DSWeb.MvcShipping.Controllers
var bodyList = JsonConvert.Deserialize<List<MsChFee>>(chfeebody);
var result =new DBResult();
T_ALL_DA T_ALL_DA = new T_ALL_DA();
decimal feetype = 0;
var custstr = "";
if (bodyList != null)
{
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 + "'");
if (BLCOUNT2 == "0")
{
@ -389,9 +390,37 @@ namespace DSWeb.MvcShipping.Controllers
}
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>();
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)
{
if (fee.FeeType == 2)

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

Loading…
Cancel
Save