Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PropertyEdu
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liudong1993
PropertyEdu
Commits
537b4191
Commit
537b4191
authored
Apr 15, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
9bdcd6ce
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
104 additions
and
83 deletions
+104
-83
SuppliesModule.cs
Property.Modele.FixedAssets/SuppliesModule.cs
+71
-70
RB_AccountRepository.cs
Property.Repository/User/RB_AccountRepository.cs
+0
-1
LoginController.cs
Property.WebApi/Controllers/Login/LoginController.cs
+1
-1
UserController.cs
Property.WebApi/Controllers/UserManger/UserController.cs
+30
-1
ApiFilterAttribute.cs
Property.WebApi/Filter/ApiFilterAttribute.cs
+1
-1
Startup.cs
Property.WebApi/Startup.cs
+1
-9
No files found.
Property.Modele.FixedAssets/SuppliesModule.cs
View file @
537b4191
...
...
@@ -2866,76 +2866,77 @@ namespace Property.Module.FixedAssets
if
(
Id
>
0
)
{
#
region
生成财务单据
var
detailList
=
applyModel
.
DetailList
.
Select
(
x
=>
new
{
CostTypeId
=
applyModel
.
CheckStatus
==
PropertyCheckStatusEnum
.
InventoryLosses
?
225
:
226
,
Number
=
x
.
ReportLossNum
,
OriginalMoney
=
(
x
.
ReportLossPrice
??
0
),
UnitPrice
=
Math
.
Round
((
x
.
ReportLossPrice
??
0
)
/
(
x
.
ReportLossNum
??
1
),
2
,
MidpointRounding
.
AwayFromZero
),
Remark
=
x
.
GoodsName
+
x
.
SpecificationName
});
string
sign
=
""
;
if
(
applyModel
.
CheckStatus
==
PropertyCheckStatusEnum
.
InventoryLosses
)
{
var
financeObj
=
new
{
demodel
.
CreateBy
,
IsPublic
=
0
,
// supplierModel.ClientBankAccount.AccountType, //financeConfigurineModel.AccountType,
ClientType
=
10
,
ClientID
=
3170
,
CurrencyId
=
Config
.
OutCurrencyId
,
WBMoney
=
applyModel
.
DetailList
.
Sum
(
x
=>
(
x
.
ReportLossPrice
??
0
)),
RB_Branch_Id
=
Config
.
ExpendBranchId
,
PayDate
=
System
.
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
),
TemplateId
=
129
,
OrderSource
=
16
,
OtherType
=
17
,
Remark
=
System
.
DateTime
.
Now
.
ToString
(
"yyyy年MM月dd日"
)
+
"生成"
+
(
applyModel
.
CheckStatus
==
PropertyCheckStatusEnum
.
InventoryLosses
?
"盘亏"
:
"盘盈"
)
+
"财务单据"
,
detailList
,
RB_Depart_Id
=
RB_Department_Id
,
ReFinanceId
=
Id
};
sign
=
EncryptionHelper
.
AesEncrypt
(
JsonHelper
.
Serialize
(
financeObj
),
Config
.
FinanceKey
);
}
else
if
(
applyModel
.
CheckStatus
==
PropertyCheckStatusEnum
.
InventoryProfit
)
{
var
financeObj
=
new
{
applyModel
.
CreateBy
,
IsPublic
=
0
,
BType
=
4
,
AccountId
=
27
,
WBMoney
=
applyModel
.
DetailList
.
Sum
(
x
=>
(
x
.
ReportLossPrice
??
0
)),
RB_Branch_Id
=
Config
.
ExpendBranchId
,
RemitterName
=
"商品盘点-盘盈"
,
TradeDate
=
System
.
DateTime
.
Now
.
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd"
),
AccountNumber
=
System
.
DateTime
.
Now
.
AddDays
(-
1
).
ToString
(
"yyyyMMdd"
),
TemplateId
=
130
,
OrderSource
=
16
,
OtherType
=
17
,
Remark
=
System
.
DateTime
.
Now
.
ToString
(
"yyyy年MM月dd日"
)
+
"自动生成财务单据"
,
detailList
,
RB_Depart_Id
=
RB_Department_Id
,
ReFinanceId
=
Id
};
sign
=
EncryptionHelper
.
AesEncrypt
(
JsonHelper
.
Serialize
(
financeObj
),
Config
.
FinanceKey
);
}
var
resultInfo
=
new
{
msg
=
sign
,
};
string
apiResult
=
HttpHelper
.
HttpPost
(
applyModel
.
CheckStatus
==
PropertyCheckStatusEnum
.
InventoryLosses
?
Config
.
PaymentFinanceApi
:
Config
.
IncomeFinanceApi
,
JsonHelper
.
Serialize
(
resultInfo
),
""
);
JObject
parmsJob
=
JObject
.
Parse
(
apiResult
);
string
resultCode
=
parmsJob
.
GetStringValue
(
"resultCode"
);
int
frid
=
parmsJob
.
GetInt
(
"data"
,
0
);
#
region
生成财务单据
2021
-
04
-
14
ld
教育暂不生成
//
var detailList = applyModel.DetailList.Select(x => new
//
{
//
CostTypeId = applyModel.CheckStatus == PropertyCheckStatusEnum.InventoryLosses ? 225 : 226,
//
Number = x.ReportLossNum,
//
OriginalMoney = (x.ReportLossPrice ?? 0),
//
UnitPrice = Math.Round((x.ReportLossPrice ?? 0) / (x.ReportLossNum ?? 1), 2, MidpointRounding.AwayFromZero),
//
Remark = x.GoodsName + x.SpecificationName
//
});
//
string sign = "";
//
if (applyModel.CheckStatus == PropertyCheckStatusEnum.InventoryLosses)
//
{
//
var financeObj = new
//
{
//
demodel.CreateBy,
//
IsPublic = 0,// supplierModel.ClientBankAccount.AccountType, //financeConfigurineModel.AccountType,
//
ClientType = 10,
//
ClientID = 3170,
//
CurrencyId = Config.OutCurrencyId,
//
WBMoney = applyModel.DetailList.Sum(x => (x.ReportLossPrice ?? 0)),
//
RB_Branch_Id = Config.ExpendBranchId,
//
PayDate = System.DateTime.Now.ToString("yyyy-MM-dd"),
//
TemplateId = 129,
//
OrderSource = 16,
//
OtherType = 17,
//
Remark = System.DateTime.Now.ToString("yyyy年MM月dd日") + "生成" + (applyModel.CheckStatus == PropertyCheckStatusEnum.InventoryLosses ? "盘亏" : "盘盈") + "财务单据",
//
detailList,
//
RB_Depart_Id = RB_Department_Id,
//
ReFinanceId = Id
//
};
//
sign = EncryptionHelper.AesEncrypt(JsonHelper.Serialize(financeObj), Config.FinanceKey);
//
}
//
else if (applyModel.CheckStatus == PropertyCheckStatusEnum.InventoryProfit)
//
{
//
var financeObj = new
//
{
//
applyModel.CreateBy,
//
IsPublic = 0,
//
BType = 4,
//
AccountId = 27,
//
WBMoney = applyModel.DetailList.Sum(x => (x.ReportLossPrice ?? 0)),
//
RB_Branch_Id = Config.ExpendBranchId,
//
RemitterName = "商品盘点-盘盈",
//
TradeDate = System.DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"),
//
AccountNumber = System.DateTime.Now.AddDays(-1).ToString("yyyyMMdd"),
//
TemplateId = 130,
//
OrderSource = 16,
//
OtherType = 17,
//
Remark = System.DateTime.Now.ToString("yyyy年MM月dd日") + "自动生成财务单据",
//
detailList,
//
RB_Depart_Id = RB_Department_Id,
//
ReFinanceId = Id
//
};
//
sign = EncryptionHelper.AesEncrypt(JsonHelper.Serialize(financeObj), Config.FinanceKey);
//
}
//
var resultInfo = new
//
{
//
msg = sign,
//
};
//
string apiResult = HttpHelper.HttpPost(applyModel.CheckStatus == PropertyCheckStatusEnum.InventoryLosses ? Config.PaymentFinanceApi : Config.IncomeFinanceApi, JsonHelper.Serialize(resultInfo), "");
//
JObject parmsJob = JObject.Parse(apiResult);
//
string resultCode = parmsJob.GetStringValue("resultCode");
//
int frid = parmsJob.GetInt("data", 0);
#
endregion
if
(
resultCode
==
"1"
&&
frid
>
0
)
//新增记录
string
resultCode
=
"1"
;
int
frid
=
0
;
if
(
resultCode
==
"1"
&&
frid
>=
0
)
//新增记录
{
applyModel
.
FinanceId
=
frid
;
applyModel
.
DetailList
.
ForEach
(
x
=>
x
.
ReportLossRecordId
=
Id
);
...
...
@@ -2955,7 +2956,7 @@ namespace Property.Module.FixedAssets
{
nameof
(
RB_Supplies_CheckDetail
.
UpdateBy
),
applyModel
.
CreateBy
},
{
nameof
(
RB_Supplies_CheckDetail
.
UpdateDate
),
applyModel
.
CreateDate
},
{
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
>()
{
new
WhereHelper
(){
...
...
Property.Repository/User/RB_AccountRepository.cs
View file @
537b4191
...
...
@@ -166,7 +166,6 @@ WHERE 1=1 {1}
public
List
<
RB_Account_ViewModel
>
GetStudentExt
(
RB_Account_ViewModel
query
)
{
StringBuilder
where
=
new
StringBuilder
();
StringBuilder
where2
=
new
StringBuilder
();
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
...
...
Property.WebApi/Controllers/Login/LoginController.cs
View file @
537b4191
...
...
@@ -110,7 +110,7 @@ namespace Property.WebApi.Controllers.Login
{
{
"iat"
,
secondsSinceEpoch
},
{
"exp"
,
secondsSinceEpoch
+
Config
.
JwtExpirTime
},
{
"
pro
_userInfo"
,
userInfo
}
{
"
edu
_userInfo"
,
userInfo
}
};
IJwtAlgorithm
algorithm
=
new
HMACSHA256Algorithm
();
IJsonSerializer
serializer
=
new
JsonNetSerializer
();
...
...
Property.WebApi/Controllers/UserManger/UserController.cs
View file @
537b4191
...
...
@@ -19,6 +19,11 @@ namespace Property.WebApi.Controllers.User
private
readonly
SchoolModule
schoolModule
=
new
SchoolModule
();
//部门
private
readonly
DepartmentModule
departmentModule
=
new
DepartmentModule
();
/// <summary>
/// 菜单处理类对象
/// </summary>
private
readonly
MenuModule
menuModule
=
new
MenuModule
();
/// <summary>
/// 获取公司列表
...
...
@@ -57,7 +62,8 @@ namespace Property.WebApi.Controllers.User
var
robj
=
list
.
Select
(
x
=>
new
{
EmployeeId
=
x
.
Id
,
EmName
=
x
.
EmployeeName
EmName
=
x
.
EmployeeName
,
x
.
AccountType
});
return
ApiResult
.
Success
(
""
,
robj
);
}
...
...
@@ -83,5 +89,28 @@ namespace Property.WebApi.Controllers.User
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
);
}
}
}
Property.WebApi/Filter/ApiFilterAttribute.cs
View file @
537b4191
...
...
@@ -144,7 +144,7 @@ namespace Property.WebApi.Filter
string
secret
=
Config
.
JwtSecretKey
;
var
json
=
decoder
.
Decode
(
token
,
secret
,
verify
:
true
);
//token为之前生成的字符串
JObject
jwtJson
=
JObject
.
Parse
(
json
);
actionContext
.
HttpContext
.
Items
[
GlobalKey
.
TokenUserInfo
]
=
jwtJson
[
"
pro
_userInfo"
];
actionContext
.
HttpContext
.
Items
[
GlobalKey
.
TokenUserInfo
]
=
jwtJson
[
"
edu
_userInfo"
];
}
catch
(
SignatureVerificationException
sve
)
{
...
...
Property.WebApi/Startup.cs
View file @
537b4191
...
...
@@ -56,15 +56,7 @@ namespace Property.WebApi
"http://localhost:8080"
,
"http://localhost:8081"
,
"http://localhost:8082"
,
"http://testzcyx.oytour.com:8080"
,
"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"
"http://zcedu.oytour.com"
,
};
if
(!
string
.
IsNullOrEmpty
(
accessSiteStr
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment