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
5bea2a2f
Commit
5bea2a2f
authored
Oct 17, 2023
by
陶然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配置优化
parent
db2418b8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
8 deletions
+13
-8
ApplyExtension.cs
Src/ApplyExtension.cs
+7
-2
Configs.cs
Src/Configs.cs
+4
-4
BillApply.cs
Src/Entities/BillApply.cs
+2
-2
No files found.
Src/ApplyExtension.cs
View file @
5bea2a2f
...
...
@@ -2,6 +2,7 @@
using
Kivii.Finances.Entities
;
using
Kivii.Finances.Seeyon.Entities
;
using
Kivii.Seeyon.Entities
;
using
Kivii.Text
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
...
...
@@ -97,12 +98,12 @@ namespace Kivii.Finances.Seeyon.Extensions
{
if
(
client
==
null
)
throw
new
ArgumentNullException
(
"client"
);
if
(
form
==
null
)
throw
new
ArgumentNullException
(
"form"
);
var
token
=
client
.
RequestRestToken
(
session
.
Full
Name
);
var
token
=
client
.
RequestRestToken
(
session
.
UserAuth
Name
);
var
request
=
new
RequestForm
<
RequestForm_InvoiceApply
>();
request
.
appName
=
Configs
.
appName
;
//"collaboration";
request
.
data
=
new
RequestData
<
RequestForm_InvoiceApply
>();
request
.
data
.
templateCode
=
Configs
.
templateCode
;
//"JYHTSQ";
request
.
data
.
draft
=
"
1
"
;
request
.
data
.
draft
=
"
0
"
;
//request.data.senderLoginName = token.bindingUser.loginName;
request
.
data
.
subject
=
$"预借发票申请(
{
token
.
bindingUser
.
name
}
{
DateTime
.
Now
:
yyyy
-
MM
-
dd
HH
:
mm
}
)"
;
request
.
data
.
data
=
new
RequestForm_InvoiceApply
();
...
...
@@ -110,6 +111,10 @@ namespace Kivii.Finances.Seeyon.Extensions
request
.
data
.
data
.
formmain_0171
=
form
;
request
.
data
.
data
.
formson_0172
=
new
List
<
Form_InvoiceApplyDetail
>();
request
.
data
.
data
.
formson_0172
=
details
;
Console
.
WriteLine
(
$"----------------------Route:
{
Configs
.
RouteRequestForm
}
?token=
{
token
.
id
}
----------------------------------------"
);
Console
.
WriteLine
(
$"----------------------Request----------------------------------------"
);
Console
.
WriteLine
(
$"
{
JsonSerializer
.
SerializeToString
(
request
)}
"
);
Console
.
WriteLine
(
$"----------------------End----------------------------------------"
);
var
rtns
=
client
.
Post
<
ResponseForm
<
ResponseData
>>(
$"
{
Configs
.
RouteRequestForm
}
?token=
{
token
.
id
}
"
,
request
);
return
rtns
;
}
...
...
Src/Configs.cs
View file @
5bea2a2f
...
...
@@ -8,7 +8,7 @@ namespace Kivii.Finances.Seeyon
{
internal
static
class
Configs
{
internal
static
string
BaseUrl
=
"http://
61.132.52.110:82"
;
//"http://
zyoa.jst-gov.com";
internal
static
string
BaseUrl
=
"http://zyoa.jst-gov.com"
;
public
const
string
TableNameApply
=
"FINA_Applies"
;
...
...
@@ -16,9 +16,9 @@ namespace Kivii.Finances.Seeyon
internal
static
string
RouteRestToken
=
"/seeyon/rest/token"
;
internal
static
string
appName
=
"collaboration"
;
//"collaboration";//OA提供
internal
static
string
templateCode
=
"
AdvanceInvoice
"
;
//"JYHTSQ";//OA提供
internal
static
string
templateCode
=
"
JPSQ
"
;
//"JYHTSQ";//OA提供
internal
static
string
restUserName
=
"
settlement"
;
//"
rest";
internal
static
string
restPassword
=
"
53aab6e3-05e5-4f6f-9084-38247e6142b6"
;
//"
fba09671-2b1e-4c8c-9aaf-de16821070df";
internal
static
string
restUserName
=
"rest"
;
internal
static
string
restPassword
=
"fba09671-2b1e-4c8c-9aaf-de16821070df"
;
}
}
Src/Entities/BillApply.cs
View file @
5bea2a2f
...
...
@@ -179,8 +179,8 @@ namespace Kivii.Finances.Seeyon.Entities
applys
.
ThrowIfNullOrEmpty
(
"未找到借票信息!"
);
if
(
applys
.
Exists
(
o
=>
o
.
Status
>
(
int
)
InvoiceApplyStatus
.
ProcessAdoption
))
throw
new
Exception
(
"当前账单借票非待审批状态,无法申请审批!"
);
var
groupPayer
=
applys
.
GroupBy
(
a
=>
a
.
PayerName
);
if
(
groupPayer
.
Count
()
!=
1
)
throw
new
Exception
(
"不允许多个借票抬头同时申请!"
);
//
var groupPayer = applys.GroupBy(a => a.PayerName);
//
if (groupPayer.Count() != 1) throw new Exception("不允许多个借票抬头同时申请!");
//var applySum = new InvoiceApply();
//applySum.PopulateWith(applys[0]);
//applySum.Amount = applys.Sum(a => a.Amount);
...
...
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