Commit 11b3c89b authored by liudong1993's avatar liudong1993

1

parent d12c7ed5
...@@ -870,28 +870,14 @@ namespace REBORN.Module.FinanceModule ...@@ -870,28 +870,14 @@ namespace REBORN.Module.FinanceModule
else else
{ {
//F_Query_AllIncomPay-查看所有 //F_Query_AllIncomPay-查看所有
if (("," + userInfo.ActionMenuCode + ",").Contains(",F_Query_AllIncomPay,")) if (("," + userInfo.ActionMenuCode + ",").Contains(",F_Query_AllIncomPay,") || ("," + userInfo.ActionMenuCode + ",").Contains(",F_Cashier,"))
{ {
} }
//F_Query_SelfBranch-查看本公司 //F_Query_SelfBranch-查看本公司
else if (("," + userInfo.ActionMenuCode + ",").Contains(",F_Query_SelfBranch,")) else if (("," + userInfo.ActionMenuCode + ",").Contains(",F_Query_SelfBranch,"))
{ {
//日币 春花特殊权限 model.RB_Branch_Id = userInfo.RB_Branch_id;
bool IsJapanSelect = false;
if (userInfo.EmployeeId == 2739 && userInfo.RB_Group_id == 2)
{
IsJapanSelect = true;// 2024-07-25 邱老师同意 春花可以查询所有单据 主要为了核实 付款金额
//验证是否 日本账户&& (model.TradeWay == BranchAccountEnum.Bank || model.TradeWay == BranchAccountEnum.Cash) && model.BankID > 0
//var arModel = accountRelationRepository.GetList(new RB_AccountRelation() { AccountType = model.TradeWay, AccountID = model.BankID }).FirstOrDefault();
//if (arModel != null && arModel.RB_Branch_Id == userInfo.RB_Branch_id) {
// IsJapanSelect = true;
//}
}
if (!IsJapanSelect)
{
model.RB_Branch_Id = userInfo.RB_Branch_id;
}
} }
//F_Query_SelfDepart查看本部门 //F_Query_SelfDepart查看本部门
else if (("," + userInfo.ActionMenuCode + ",").Contains(",F_Query_SelfDepart,")) else if (("," + userInfo.ActionMenuCode + ",").Contains(",F_Query_SelfDepart,"))
...@@ -2116,34 +2102,32 @@ namespace REBORN.Module.FinanceModule ...@@ -2116,34 +2102,32 @@ namespace REBORN.Module.FinanceModule
public List<RB_Finance_Extend> GetList(RB_Finance_Extend model, UserInfo userInfo) public List<RB_Finance_Extend> GetList(RB_Finance_Extend model, UserInfo userInfo)
{ {
//判断条件 //判断条件
//总公司财务 userInfo.ActionMenuCode = GetActionCode(userInfo.RB_Post_Id);
if (Config.FinanceDepartmentId == userInfo.RB_Department_Id || IsHeadOrFinacne(userInfo)) if (string.IsNullOrEmpty(userInfo.ActionMenuCode))
{ {
//TODO不做操作 model.UpdateBy = userInfo.EmployeeId;
} }
//分公司财务和分公司负责人能查看自己所负责的出纳会计窗口的数据 else
else if (IsBranchHeadOrFinacne(userInfo))
{ {
//日币 春花特殊权限 //F_Query_AllIncomPay-查看所有
bool IsJapanSelect = false; if (("," + userInfo.ActionMenuCode + ",").Contains(",F_Query_AllIncomPay,") || ("," + userInfo.ActionMenuCode + ",").Contains(",F_Cashier,"))
if (userInfo.EmployeeId == 2739 && userInfo.RB_Group_id == 2)
{ {
IsJapanSelect = true;
//验证是否 日本账户&& (model.TradeWay == BranchAccountEnum.Bank || model.TradeWay == BranchAccountEnum.Cash) && model.BankID > 0
//var arModel = accountRelationRepository.GetList(new RB_AccountRelation() { AccountType = model.TradeWay, AccountID = model.BankID }).FirstOrDefault();
//if (arModel != null && arModel.RB_Branch_Id == userInfo.RB_Branch_id)
//{
// IsJapanSelect = true;
//}
} }
if (!IsJapanSelect) //F_Query_SelfBranch-查看本公司
else if (("," + userInfo.ActionMenuCode + ",").Contains(",F_Query_SelfBranch,"))
{ {
model.RB_Branch_Id = userInfo.RB_Branch_id; model.RB_Branch_Id = userInfo.RB_Branch_id;
} }
} //F_Query_SelfDepart查看本部门
else else if (("," + userInfo.ActionMenuCode + ",").Contains(",F_Query_SelfDepart,"))
{ {
model.UpdateBy = userInfo.EmployeeId; model.RB_Depart_Id = userInfo.RB_Department_Id;
}
else
{
model.UpdateBy = userInfo.EmployeeId;
}
} }
//国内机票特殊处理 //国内机票特殊处理
if (model.RB_Branch_Id == 45) if (model.RB_Branch_Id == 45)
......
...@@ -3338,23 +3338,14 @@ namespace REBORN.Module.FinanceModule ...@@ -3338,23 +3338,14 @@ namespace REBORN.Module.FinanceModule
else else
{ {
//F_Query_AllIncomPay-查看所有 //F_Query_AllIncomPay-查看所有
if (("," + userInfo.ActionMenuCode + ",").Contains(",F_Query_AllIncomPay,")) if (("," + userInfo.ActionMenuCode + ",").Contains(",F_Query_AllIncomPay,") || ("," + userInfo.ActionMenuCode + ",").Contains(",F_Cashier,"))
{ {
} }
//F_Query_SelfBranch-查看本公司 //F_Query_SelfBranch-查看本公司
else if (("," + userInfo.ActionMenuCode + ",").Contains(",F_Query_SelfBranch,")) else if (("," + userInfo.ActionMenuCode + ",").Contains(",F_Query_SelfBranch,"))
{ {
//日币 春花特殊权限 model.RB_Branch_Id = userInfo.RB_Branch_id;
bool IsJapanSelect = false;
if (userInfo.EmployeeId == 2739 && userInfo.RB_Group_id == 2)
{
IsJapanSelect = true;// 2024-07-25 邱老师同意 春花可以查询所有单据 主要为了核实 付款金额
}
if (!IsJapanSelect)
{
model.RB_Branch_Id = userInfo.RB_Branch_id;
}
} }
else if (("," + userInfo.ActionMenuCode + ",").Contains(",F_Query_SelfDepart,")) else if (("," + userInfo.ActionMenuCode + ",").Contains(",F_Query_SelfDepart,"))
{ {
......
...@@ -6160,6 +6160,32 @@ namespace REBORN.Services.FinanceService ...@@ -6160,6 +6160,32 @@ namespace REBORN.Services.FinanceService
//{ //{
// return ApiResult.Failed("请选择汇款/付款日期"); // return ApiResult.Failed("请选择汇款/付款日期");
//} //}
#region 权限
userInfo.ActionMenuCode = module.GetActionCode(userInfo.RB_Post_Id);
if (string.IsNullOrEmpty(userInfo.ActionMenuCode))
{
return ApiResult.Failed("没有权限");
}
else
{
//F_Query_AllIncomPay-查看所有
if (("," + userInfo.ActionMenuCode + ",").Contains(",F_Query_AllIncomPay,") || ("," + userInfo.ActionMenuCode + ",").Contains(",F_Cashier,"))
{
}
//F_Query_SelfBranch-查看本公司
else if (("," + userInfo.ActionMenuCode + ",").Contains(",F_Query_SelfBranch,"))
{
model.RB_Branch_Id = userInfo.RB_Branch_id;
}
else
{
return ApiResult.Failed("没有权限");
}
}
#endregion
var data = module.GetAccountDetailList(model, out _, out _); var data = module.GetAccountDetailList(model, out _, out _);
var list = data.Select(x => new var list = data.Select(x => new
{ {
...@@ -6290,6 +6316,32 @@ namespace REBORN.Services.FinanceService ...@@ -6290,6 +6316,32 @@ namespace REBORN.Services.FinanceService
return Common.Plugin.ExcelTempLateHelper.ToExcelExtend(slist); return Common.Plugin.ExcelTempLateHelper.ToExcelExtend(slist);
} }
model.IsAirResponsibilitySelect = AccountToExcelType == 2 ? 11 : 0; model.IsAirResponsibilitySelect = AccountToExcelType == 2 ? 11 : 0;
#region 权限
userInfo.ActionMenuCode = module.GetActionCode(userInfo.RB_Post_Id);
if (string.IsNullOrEmpty(userInfo.ActionMenuCode))
{
return Common.Plugin.ExcelTempLateHelper.ToExcelExtend(slist);
}
else
{
//F_Query_AllIncomPay-查看所有
if (("," + userInfo.ActionMenuCode + ",").Contains(",F_Query_AllIncomPay,") || ("," + userInfo.ActionMenuCode + ",").Contains(",F_Cashier,"))
{
}
//F_Query_SelfBranch-查看本公司
else if (("," + userInfo.ActionMenuCode + ",").Contains(",F_Query_SelfBranch,"))
{
model.RB_Branch_Id = userInfo.RB_Branch_id;
}
else
{
return Common.Plugin.ExcelTempLateHelper.ToExcelExtend(slist);
}
}
#endregion
var list = module.GetAccountDetailList(model, out _, out _); var list = module.GetAccountDetailList(model, out _, out _);
#endregion #endregion
if (!list.Any()) if (!list.Any())
......
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