DS7_JinGang
hanxuntao 2 years ago
parent bea67ab9f4
commit 8998fbc262

@ -2445,23 +2445,27 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
if (result.Success) { if (result.Success) {
var _r = FanWeiOA_Submit(headdata, USERID, usercode, companyid); if (ConfigurationManager.AppSettings["FanWeiOAAPI"] == "true")
if (!_r.Success)
{ {
tran.Rollback(); var _r = FanWeiOA_Submit(headdata, USERID, usercode, companyid);
result.Success = false;
result.Message = $"提交审核错误[{_r.Message}],请重试或联系系统管理员";
return result; if (!_r.Success)
} {
else { tran.Rollback();
var requestid = result.Data.ToString(); result.Success = false;
result.Message = $"提交审核错误[{_r.Message}],请重试或联系系统管理员";
var cmdupdate = db.GetSqlStringCommand("update ch_fee_payapplication set PAYAPPID='"+ requestid + "' where BILLNO=@BILLNO"); return result;
cmdupdate.Parameters.Clear(); }
db.AddInParameter(cmdupdate, "@BILLNO", DbType.String, bill); else
db.ExecuteNonQuery(cmdupdate, tran); {
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(); 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) { var _r = FanWeiOA_Submit(headdata, USERID, usercode, companyid);
tran.Rollback();
result.Success = false;
result.Message = $"提交审核错误[{_r.Message}],请重试或联系系统管理员";
return result; if (!_r.Success)
} {
else tran.Rollback();
{ result.Success = false;
var requestid = _r.Data.ToString(); result.Message = $"提交审核错误[{_r.Message}],请重试或联系系统管理员";
var cmdupdate = db.GetSqlStringCommand("update ch_fee_payapplication set PAYAPPID='" + requestid + "' where BILLNO=@BILLNO"); return result;
cmdupdate.Parameters.Clear(); }
db.AddInParameter(cmdupdate, "@BILLNO", DbType.String, headdata.BILLNO); else
db.ExecuteNonQuery(cmdupdate, tran); {
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 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,46 +1276,44 @@ 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") var nopowerOpen = MsSysParamSetDAL.GetData("PARAMNAME='FeeSumIsContentNotOpen'");
{ var isopen = MsBaseInfoDAL.MsBaseInfoDAL.GetUserModuleEnable("modFeenotopen", userid);
//配置否,则走正常机密费用逻辑 var isopenstr = "";
isopenstr = " ( ENTEROPERATOR='" + userid + "' OR ( ENTEROPERATOR<>'" + userid + "' AND (ISOPEN=0 OR ISOPEN IS NULL))) "; 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)) if (!string.IsNullOrEmpty(rangstr))
rangstr = rangstr + " and " + isopenstr; rangstr = rangstr + " and " + isopenstr;
else else
rangstr = isopenstr; rangstr = isopenstr;
}
else
{
//配置是,则不走机密费用逻辑
rangstr = " 1 = 1 ";
}
#endregion
} }
else
var isacc = MsBaseInfoDAL.MsBaseInfoDAL.GetUserModuleEnable("modISWACC", userid);
var isaccstr = "";
if (isacc == false)
{ {
isaccstr = " ISNULL(ISACC,0)=0 "; //配置是,则不走机密费用逻辑
if (!string.IsNullOrEmpty(rangstr)) rangstr = " 1 = 1 ";
rangstr = rangstr + " and " + isaccstr;
else
rangstr = isaccstr;
} }
#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); var FeenotPr = MsBaseInfoDAL.MsBaseInfoDAL.GetUserModuleEnable("modFeenotPr", userid);
if (!string.IsNullOrEmpty(rangstr)) if (!string.IsNullOrEmpty(rangstr))
@ -1385,40 +1383,75 @@ 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 = "";
if (isopen == false) //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 李进举 鼎世 var nopowerOpen = MsSysParamSetDAL.GetData("PARAMNAME='FeeSumIsContentNotOpen'");
if (nopowerOpen.PARAMVALUE == "0") var isopen = MsBaseInfoDAL.MsBaseInfoDAL.GetUserModuleEnable("modFeenotopen", userid);
{ var isopenstr = "";
//配置否,则走正常机密费用逻辑 if (isopen == false)
isopenstr = " ( ENTEROPERATOR='" + userid + "' OR ( ENTEROPERATOR<>'" + userid + "' AND (ISOPEN=0 OR ISOPEN IS NULL))) "; {
#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)) if (!string.IsNullOrEmpty(rangstr))
rangstr = rangstr + " and " + isopenstr; rangstr = rangstr + " and " + isopenstr;
else else
rangstr = isopenstr; rangstr = isopenstr;
}
else
{
//配置是,则不走机密费用逻辑
rangstr = " 1 = 1 ";
}
#endregion
} }
else
var isacc = MsBaseInfoDAL.MsBaseInfoDAL.GetUserModuleEnable("modISWACC", userid);
var isaccstr = "";
if (isacc == false)
{ {
isaccstr = " ISNULL(ISACC,0)=0 "; //配置是,则不走机密费用逻辑
if (!string.IsNullOrEmpty(rangstr)) rangstr = " 1 = 1 ";
rangstr = rangstr + " and " + isaccstr;
else
rangstr = isaccstr;
} }
#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