Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
Kivii.Third.Finances.Seeyon.V4.5
Project
Overview
Details
Activity
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
陶然
Kivii.Third.Finances.Seeyon.V4.5
Commits
464edd28
Commit
464edd28
authored
Aug 01, 2024
by
Neo Turing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
9090c9d8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
9 deletions
+56
-9
Configs.cs
Src/Configs.cs
+2
-0
OaEntity.cs
Src/Entities/OaEntity.cs
+2
-2
AssemblyInfo.cs
Src/Properties/AssemblyInfo.cs
+2
-2
RestfulOA.cs
Src/RestfulOA.cs
+50
-5
No files found.
Src/Configs.cs
View file @
464edd28
...
@@ -39,6 +39,8 @@ namespace Kivii.Finances.Seeyon
...
@@ -39,6 +39,8 @@ namespace Kivii.Finances.Seeyon
internal
static
string
templateCodeInvoiceVoid
=
"InvoiceVoid"
;
//OA提供
internal
static
string
templateCodeInvoiceVoid
=
"InvoiceVoid"
;
//OA提供
internal
static
string
templateCodeInvoiceRedOffset
=
"InvoiceRedOffset"
;
//OA提供
internal
static
string
templateCodeInvoiceRedOffset
=
"InvoiceRedOffset"
;
//OA提供
internal
static
string
templateCodeIncome
=
"DEPARTMENTALREVENUE"
;
//OA提供
internal
static
string
templateCodeIncome
=
"DEPARTMENTALREVENUE"
;
//OA提供
internal
static
string
templateCodeContract
=
"contractFile"
;
//OA提供
internal
static
string
templateCodeContractRightId
=
"7866746717091285245.6832991593302278445_-6245354230910071662.-712354477639973320_683831699372263267.-3542418042388265102"
;
//OA提供
internal
static
string
restUserName
=
"settlement"
;
//"rest";
internal
static
string
restUserName
=
"settlement"
;
//"rest";
internal
static
string
restPassword
=
"53aab6e3-05e5-4f6f-9084-38247e6142b6"
;
//"fba09671-2b1e-4c8c-9aaf-de16821070df";
internal
static
string
restPassword
=
"53aab6e3-05e5-4f6f-9084-38247e6142b6"
;
//"fba09671-2b1e-4c8c-9aaf-de16821070df";
...
...
Src/Entities/OaEntity.cs
View file @
464edd28
...
@@ -35,7 +35,7 @@ namespace Kivii.Finances.Seeyon.Entities
...
@@ -35,7 +35,7 @@ namespace Kivii.Finances.Seeyon.Entities
/// <summary>
/// <summary>
/// 表单模版code(与应用绑定中保持一致)
/// 表单模版code(与应用绑定中保持一致)
/// </summary>
/// </summary>
public
string
templateCode
{
get
;
set
;
}
public
string
templateCode
{
get
;
set
;
}
=
Configs
.
templateCodeContract
;
/// <summary>
/// <summary>
/// 导出数据的起始时间.eg:2020-06-30
/// 导出数据的起始时间.eg:2020-06-30
...
@@ -50,7 +50,7 @@ namespace Kivii.Finances.Seeyon.Entities
...
@@ -50,7 +50,7 @@ namespace Kivii.Finances.Seeyon.Entities
/// <summary>
/// <summary>
/// 权限id
/// 权限id
/// </summary>
/// </summary>
public
string
rightId
{
get
;
set
;
}
public
string
rightId
{
get
;
set
;
}
=
Configs
.
templateCodeContractRightId
;
/// <summary>
/// <summary>
/// 数据id
/// 数据id
...
...
Src/Properties/AssemblyInfo.cs
View file @
464edd28
...
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
...
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.4.2024.
402
0")]
[assembly: AssemblyVersion("5.4.2024.
729
0")]
[assembly: AssemblyFileVersion("5.4.2024.
402
0")]
[assembly: AssemblyFileVersion("5.4.2024.
729
0")]
Src/RestfulOA.cs
View file @
464edd28
...
@@ -28,23 +28,48 @@ namespace Kivii.Finances.Seeyon
...
@@ -28,23 +28,48 @@ namespace Kivii.Finances.Seeyon
}
}
}
}
[
RequiresAnyRole
(
SystemRoles
.
Everyone
)]
public
class
ContractGetFromOa
:
RestfulExecution
<
Contract
>
public
class
ContractGetFromOa
:
RestfulExecution
<
Contract
>
{
{
public
RequestOaContract
Item
{
get
;
set
;
}
/// <summary>
/// 导出数据的起始时间.eg:2020-06-30
/// </summary>
public
DateTime
BeginTime
{
get
;
set
;
}
/// <summary>
/// 导出数据的截止创建时间.eg:2020-06-30
/// </summary>
public
DateTime
EndTime
{
get
;
set
;
}
/// <summary>
/// 权限id
/// </summary>
public
string
rightId
{
get
;
set
;
}
=
Configs
.
templateCodeContractRightId
;
public
string
loginName
{
get
;
set
;
}
public
string
loginName
{
get
;
set
;
}
public
override
object
OnExecution
(
IRequest
req
,
IResponse
res
)
public
override
object
OnExecution
(
IRequest
req
,
IResponse
res
)
{
{
if
(
loginName
.
IsNullOrEmpty
())
{
var
session
=
KiviiContext
.
Request
.
GetSession
();
loginName
=
session
.
FullName
;
}
var
item
=
new
RequestOaContract
();
if
(
BeginTime
==
DateTime
.
MinValue
)
item
.
beginDateTime
=
$"
{
DateTime
.
Now
.
Year
}
-01-01"
;
else
item
.
beginDateTime
=
$"
{
BeginTime
.
ToString
(
"yyyy-MM-dd"
)}
"
;
if
(
EndTime
==
DateTime
.
MinValue
)
item
.
endDateTime
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
);
else
item
.
endDateTime
=
$"
{
EndTime
.
ToString
(
"yyyy-MM-dd"
)}
"
;
var
client
=
new
JsonServiceClient
(
Configs
.
BaseUrl
);
var
client
=
new
JsonServiceClient
(
Configs
.
BaseUrl
);
var
token
=
client
.
RequestRestToken
(
loginName
);
var
token
=
client
.
RequestRestToken
(
loginName
);
var
reps
=
client
.
RequestGetOaContract
(
I
tem
,
token
);
var
reps
=
client
.
RequestGetOaContract
(
i
tem
,
token
);
var
rtns
=
new
RestfulQueryResponse
<
Contract
>();
var
rtns
=
new
RestfulQueryResponse
<
Contract
>();
rtns
.
Results
=
new
List
<
Contract
>();
rtns
.
Results
=
new
List
<
Contract
>();
foreach
(
var
item
in
reps
.
data
.
data
.
data
)
foreach
(
var
data
in
reps
.
data
.
data
.
data
)
{
{
var
oaData
=
item
.
masterData
;
var
oaData
=
data
.
masterData
;
var
rtn
=
new
Contract
();
var
rtn
=
new
Contract
();
rtn
.
ContractNumber
=
oaData
.
Field0063
.
showValue
;
rtn
.
ContractNumber
=
oaData
.
Field0063
.
showValue
;
rtn
.
SerialNumber
=
oaData
.
Field0081
.
showValue
;
rtn
.
SerialNumber
=
oaData
.
Field0081
.
showValue
;
...
@@ -52,6 +77,10 @@ namespace Kivii.Finances.Seeyon
...
@@ -52,6 +77,10 @@ namespace Kivii.Finances.Seeyon
rtn
.
Field0060
=
oaData
.
Field0060
.
showValue
;
rtn
.
Field0060
=
oaData
.
Field0060
.
showValue
;
rtn
.
Field0062
=
oaData
.
Field0062
.
showValue
;
rtn
.
Field0062
=
oaData
.
Field0062
.
showValue
;
rtn
.
ApplierName
=
oaData
.
Field0059
.
showValue
;
rtn
.
ApplierName
=
oaData
.
Field0059
.
showValue
;
//if (DateTime.TryParse(oaData.Field0043.showValue, out var field0043))
//{
// rtn.ApplyTime = field0043;
//}
rtn
.
ApplyTime
=
oaData
.
Field0043
.
showValue
;
rtn
.
ApplyTime
=
oaData
.
Field0043
.
showValue
;
rtn
.
ApplyDepart
=
oaData
.
Field0078
.
showValue
;
rtn
.
ApplyDepart
=
oaData
.
Field0078
.
showValue
;
rtn
.
DepartCode
=
oaData
.
Field0079
.
showValue
;
rtn
.
DepartCode
=
oaData
.
Field0079
.
showValue
;
...
@@ -73,6 +102,14 @@ namespace Kivii.Finances.Seeyon
...
@@ -73,6 +102,14 @@ namespace Kivii.Finances.Seeyon
rtn
.
Type
=
oaData
.
Field0011
.
showValue
;
rtn
.
Type
=
oaData
.
Field0011
.
showValue
;
rtn
.
Field0072
=
oaData
.
Field0072
.
showValue
;
rtn
.
Field0072
=
oaData
.
Field0072
.
showValue
;
rtn
.
AgreeYear
=
oaData
.
Field0012
.
showValue
;
rtn
.
AgreeYear
=
oaData
.
Field0012
.
showValue
;
//if (DateTime.TryParse(oaData.Field0045.showValue, out var field0045))
//{
// rtn.AgreeBeginTime = field0045;
//}
//if (DateTime.TryParse(oaData.Field0046.showValue, out var field0046))
//{
// rtn.AgreeEndTime = field0046;
//}
rtn
.
AgreeBeginTime
=
oaData
.
Field0045
.
showValue
;
rtn
.
AgreeBeginTime
=
oaData
.
Field0045
.
showValue
;
rtn
.
AgreeEndTime
=
oaData
.
Field0046
.
showValue
;
rtn
.
AgreeEndTime
=
oaData
.
Field0046
.
showValue
;
rtn
.
RateText
=
oaData
.
Field0014
.
showValue
;
rtn
.
RateText
=
oaData
.
Field0014
.
showValue
;
...
@@ -85,9 +122,17 @@ namespace Kivii.Finances.Seeyon
...
@@ -85,9 +122,17 @@ namespace Kivii.Finances.Seeyon
rtn
.
Quantity
=
oaData
.
Field0033
.
showValue
;
rtn
.
Quantity
=
oaData
.
Field0033
.
showValue
;
rtn
.
LimsNumber
=
oaData
.
Field0085
.
showValue
;
rtn
.
LimsNumber
=
oaData
.
Field0085
.
showValue
;
rtn
.
Field0064
=
oaData
.
Field0064
.
showValue
;
rtn
.
Field0064
=
oaData
.
Field0064
.
showValue
;
//if (DateTime.TryParse(oaData.Field0070.showValue, out var field0070))
//{
// rtn.FirstPayTime = field0070;
//}
//if (DateTime.TryParse(oaData.Field0089.showValue, out var field0089))
//{
// rtn.StampTime = field0089;
//}
rtn
.
FirstPayTime
=
oaData
.
Field0070
.
showValue
;
rtn
.
FirstPayTime
=
oaData
.
Field0070
.
showValue
;
rtn
.
Field0074
=
oaData
.
Field0074
.
showValue
;
rtn
.
StampTime
=
oaData
.
Field0089
.
showValue
;
rtn
.
StampTime
=
oaData
.
Field0089
.
showValue
;
rtn
.
Field0074
=
oaData
.
Field0074
.
showValue
;
rtns
.
Results
.
Add
(
rtn
);
rtns
.
Results
.
Add
(
rtn
);
}
}
...
...
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