Commit 537b4191 authored by liudong1993's avatar liudong1993

1

parent 9bdcd6ce
...@@ -2866,76 +2866,77 @@ namespace Property.Module.FixedAssets ...@@ -2866,76 +2866,77 @@ namespace Property.Module.FixedAssets
if (Id > 0) if (Id > 0)
{ {
#region 生成财务单据 #region 生成财务单据 2021-04-14 ld 教育暂不生成
var detailList = applyModel.DetailList.Select(x => new //var detailList = applyModel.DetailList.Select(x => new
{ //{
CostTypeId = applyModel.CheckStatus == PropertyCheckStatusEnum.InventoryLosses ? 225 : 226, // CostTypeId = applyModel.CheckStatus == PropertyCheckStatusEnum.InventoryLosses ? 225 : 226,
Number = x.ReportLossNum, // Number = x.ReportLossNum,
OriginalMoney = (x.ReportLossPrice ?? 0), // OriginalMoney = (x.ReportLossPrice ?? 0),
UnitPrice = Math.Round((x.ReportLossPrice ?? 0) / (x.ReportLossNum ?? 1), 2, MidpointRounding.AwayFromZero), // UnitPrice = Math.Round((x.ReportLossPrice ?? 0) / (x.ReportLossNum ?? 1), 2, MidpointRounding.AwayFromZero),
Remark = x.GoodsName + x.SpecificationName // Remark = x.GoodsName + x.SpecificationName
}); //});
string sign = ""; //string sign = "";
if (applyModel.CheckStatus == PropertyCheckStatusEnum.InventoryLosses) //if (applyModel.CheckStatus == PropertyCheckStatusEnum.InventoryLosses)
{ //{
var financeObj = new // var financeObj = new
{ // {
demodel.CreateBy, // demodel.CreateBy,
IsPublic = 0,// supplierModel.ClientBankAccount.AccountType, //financeConfigurineModel.AccountType, // IsPublic = 0,// supplierModel.ClientBankAccount.AccountType, //financeConfigurineModel.AccountType,
ClientType = 10, // ClientType = 10,
ClientID = 3170, // ClientID = 3170,
CurrencyId = Config.OutCurrencyId, // CurrencyId = Config.OutCurrencyId,
WBMoney = applyModel.DetailList.Sum(x => (x.ReportLossPrice ?? 0)), // WBMoney = applyModel.DetailList.Sum(x => (x.ReportLossPrice ?? 0)),
RB_Branch_Id = Config.ExpendBranchId, // RB_Branch_Id = Config.ExpendBranchId,
PayDate = System.DateTime.Now.ToString("yyyy-MM-dd"), // PayDate = System.DateTime.Now.ToString("yyyy-MM-dd"),
TemplateId = 129, // TemplateId = 129,
OrderSource = 16, // OrderSource = 16,
OtherType = 17, // OtherType = 17,
Remark = System.DateTime.Now.ToString("yyyy年MM月dd日") + "生成" + (applyModel.CheckStatus == PropertyCheckStatusEnum.InventoryLosses ? "盘亏" : "盘盈") + "财务单据", // Remark = System.DateTime.Now.ToString("yyyy年MM月dd日") + "生成" + (applyModel.CheckStatus == PropertyCheckStatusEnum.InventoryLosses ? "盘亏" : "盘盈") + "财务单据",
detailList, // detailList,
RB_Depart_Id = RB_Department_Id, // RB_Depart_Id = RB_Department_Id,
ReFinanceId = Id // ReFinanceId = Id
}; // };
sign = EncryptionHelper.AesEncrypt(JsonHelper.Serialize(financeObj), Config.FinanceKey); // sign = EncryptionHelper.AesEncrypt(JsonHelper.Serialize(financeObj), Config.FinanceKey);
} //}
else if (applyModel.CheckStatus == PropertyCheckStatusEnum.InventoryProfit) //else if (applyModel.CheckStatus == PropertyCheckStatusEnum.InventoryProfit)
{ //{
var financeObj = new // var financeObj = new
{ // {
applyModel.CreateBy, // applyModel.CreateBy,
IsPublic = 0, // IsPublic = 0,
BType = 4, // BType = 4,
AccountId = 27, // AccountId = 27,
WBMoney = applyModel.DetailList.Sum(x => (x.ReportLossPrice ?? 0)), // WBMoney = applyModel.DetailList.Sum(x => (x.ReportLossPrice ?? 0)),
RB_Branch_Id = Config.ExpendBranchId, // RB_Branch_Id = Config.ExpendBranchId,
RemitterName = "商品盘点-盘盈", // RemitterName = "商品盘点-盘盈",
TradeDate = System.DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"), // TradeDate = System.DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"),
AccountNumber = System.DateTime.Now.AddDays(-1).ToString("yyyyMMdd"), // AccountNumber = System.DateTime.Now.AddDays(-1).ToString("yyyyMMdd"),
TemplateId = 130, // TemplateId = 130,
OrderSource = 16, // OrderSource = 16,
OtherType = 17, // OtherType = 17,
Remark = System.DateTime.Now.ToString("yyyy年MM月dd日") + "自动生成财务单据", // Remark = System.DateTime.Now.ToString("yyyy年MM月dd日") + "自动生成财务单据",
detailList, // detailList,
RB_Depart_Id = RB_Department_Id, // RB_Depart_Id = RB_Department_Id,
ReFinanceId = Id // ReFinanceId = Id
}; // };
sign = EncryptionHelper.AesEncrypt(JsonHelper.Serialize(financeObj), Config.FinanceKey); // sign = EncryptionHelper.AesEncrypt(JsonHelper.Serialize(financeObj), Config.FinanceKey);
} //}
var resultInfo = new //var resultInfo = new
{ //{
msg = sign, // msg = sign,
}; //};
string apiResult = HttpHelper.HttpPost(applyModel.CheckStatus == PropertyCheckStatusEnum.InventoryLosses ? Config.PaymentFinanceApi : Config.IncomeFinanceApi, JsonHelper.Serialize(resultInfo), ""); //string apiResult = HttpHelper.HttpPost(applyModel.CheckStatus == PropertyCheckStatusEnum.InventoryLosses ? Config.PaymentFinanceApi : Config.IncomeFinanceApi, JsonHelper.Serialize(resultInfo), "");
JObject parmsJob = JObject.Parse(apiResult); //JObject parmsJob = JObject.Parse(apiResult);
string resultCode = parmsJob.GetStringValue("resultCode"); //string resultCode = parmsJob.GetStringValue("resultCode");
int frid = parmsJob.GetInt("data", 0); //int frid = parmsJob.GetInt("data", 0);
#endregion #endregion
string resultCode = "1";
if (resultCode == "1" && frid > 0)//新增记录 int frid = 0;
if (resultCode == "1" && frid >= 0)//新增记录
{ {
applyModel.FinanceId = frid; applyModel.FinanceId = frid;
applyModel.DetailList.ForEach(x => x.ReportLossRecordId = Id); applyModel.DetailList.ForEach(x => x.ReportLossRecordId = Id);
...@@ -2955,7 +2956,7 @@ namespace Property.Module.FixedAssets ...@@ -2955,7 +2956,7 @@ namespace Property.Module.FixedAssets
{ nameof(RB_Supplies_CheckDetail.UpdateBy),applyModel.CreateBy}, { nameof(RB_Supplies_CheckDetail.UpdateBy),applyModel.CreateBy},
{ nameof(RB_Supplies_CheckDetail.UpdateDate),applyModel.CreateDate}, { nameof(RB_Supplies_CheckDetail.UpdateDate),applyModel.CreateDate},
{ nameof(RB_Supplies_CheckDetail.FinanceId),frid}, { nameof(RB_Supplies_CheckDetail.FinanceId),frid},
{ nameof(RB_Supplies_CheckDetail.Remark),item.Remark+(string.IsNullOrWhiteSpace(item.Remark)?"":",")+ " 自动生成财务单据:"+frid+",制单单价:"+Math.Round((item.ReportLossPrice ?? 0) / (item.ReportLossNum ?? 1), 2, MidpointRounding.AwayFromZero)}, { nameof(RB_Supplies_CheckDetail.Remark),item.Remark},
}; };
List<WhereHelper> wheresApplyGoods = new List<WhereHelper>() { List<WhereHelper> wheresApplyGoods = new List<WhereHelper>() {
new WhereHelper(){ new WhereHelper(){
......
...@@ -166,7 +166,6 @@ WHERE 1=1 {1} ...@@ -166,7 +166,6 @@ WHERE 1=1 {1}
public List<RB_Account_ViewModel> GetStudentExt(RB_Account_ViewModel query) public List<RB_Account_ViewModel> GetStudentExt(RB_Account_ViewModel query)
{ {
StringBuilder where = new StringBuilder(); StringBuilder where = new StringBuilder();
StringBuilder where2 = new StringBuilder();
if (query != null) if (query != null)
{ {
if (query.Group_Id > 0) if (query.Group_Id > 0)
......
...@@ -110,7 +110,7 @@ namespace Property.WebApi.Controllers.Login ...@@ -110,7 +110,7 @@ namespace Property.WebApi.Controllers.Login
{ {
{"iat",secondsSinceEpoch }, {"iat",secondsSinceEpoch },
{"exp",secondsSinceEpoch+Config.JwtExpirTime}, {"exp",secondsSinceEpoch+Config.JwtExpirTime},
{"pro_userInfo",userInfo } {"edu_userInfo",userInfo }
}; };
IJwtAlgorithm algorithm = new HMACSHA256Algorithm(); IJwtAlgorithm algorithm = new HMACSHA256Algorithm();
IJsonSerializer serializer = new JsonNetSerializer(); IJsonSerializer serializer = new JsonNetSerializer();
......
...@@ -19,6 +19,11 @@ namespace Property.WebApi.Controllers.User ...@@ -19,6 +19,11 @@ namespace Property.WebApi.Controllers.User
private readonly SchoolModule schoolModule = new SchoolModule(); private readonly SchoolModule schoolModule = new SchoolModule();
//部门 //部门
private readonly DepartmentModule departmentModule = new DepartmentModule(); private readonly DepartmentModule departmentModule = new DepartmentModule();
/// <summary>
/// 菜单处理类对象
/// </summary>
private readonly MenuModule menuModule = new MenuModule();
/// <summary> /// <summary>
/// 获取公司列表 /// 获取公司列表
...@@ -57,7 +62,8 @@ namespace Property.WebApi.Controllers.User ...@@ -57,7 +62,8 @@ namespace Property.WebApi.Controllers.User
var robj = list.Select(x => new var robj = list.Select(x => new
{ {
EmployeeId = x.Id, EmployeeId = x.Id,
EmName = x.EmployeeName EmName = x.EmployeeName,
x.AccountType
}); });
return ApiResult.Success("", robj); return ApiResult.Success("", robj);
} }
...@@ -83,5 +89,28 @@ namespace Property.WebApi.Controllers.User ...@@ -83,5 +89,28 @@ namespace Property.WebApi.Controllers.User
return ApiResult.Success("", list); return ApiResult.Success("", list);
} }
/// <summary>
/// 获取用户登录菜单(教育直接跳转资产管理)
/// </summary>
/// <param name="requestMsg"></param>
/// <returns></returns>
[HttpPost]
public ApiResult GetUserLoginMenu()
{
var requestParm = GetRequestParm();
UserInfo userInfo = CacheManager.User.UserReidsCache.GetUserLoginInfo(requestParm.uid);
JObject parms = JObject.Parse(requestParm.msg.ToString());
int accountType = parms.GetInt("AccountType", 1);
var treeList = menuModule.GetPostMenuTreeModule(new RB_Menu_ViewModel()
{
MenuType = accountType
}, out List<RB_Menu_ViewModel> userCenterList, postIds: userInfo.RB_Post_Id.ToString());
userInfo.UserMenu = treeList;
userInfo.token = requestParm.token;
return ApiResult.Success(data: userInfo);
}
} }
} }
...@@ -144,7 +144,7 @@ namespace Property.WebApi.Filter ...@@ -144,7 +144,7 @@ namespace Property.WebApi.Filter
string secret = Config.JwtSecretKey; string secret = Config.JwtSecretKey;
var json = decoder.Decode(token, secret, verify: true);//token为之前生成的字符串 var json = decoder.Decode(token, secret, verify: true);//token为之前生成的字符串
JObject jwtJson = JObject.Parse(json); JObject jwtJson = JObject.Parse(json);
actionContext.HttpContext.Items[GlobalKey.TokenUserInfo] = jwtJson["pro_userInfo"]; actionContext.HttpContext.Items[GlobalKey.TokenUserInfo] = jwtJson["edu_userInfo"];
} }
catch (SignatureVerificationException sve) catch (SignatureVerificationException sve)
{ {
......
...@@ -56,15 +56,7 @@ namespace Property.WebApi ...@@ -56,15 +56,7 @@ namespace Property.WebApi
"http://localhost:8080", "http://localhost:8080",
"http://localhost:8081", "http://localhost:8081",
"http://localhost:8082", "http://localhost:8082",
"http://testzcyx.oytour.com:8080", "http://zcedu.oytour.com",
"http://testzcyx.oytour.com:8081",
"http://testzcyx.oytour.com",
"http://testzcerp.oytour.com",
"http://zcyx.oytour.com",
"http://yx.oytour.com",
"http://mall.oytour.com",
"http://mallapi.oytour.com",
"http://www.oytour.com"
}; };
if (!string.IsNullOrEmpty(accessSiteStr)) if (!string.IsNullOrEmpty(accessSiteStr))
{ {
......
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