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
7562303f
Commit
7562303f
authored
Oct 11, 2023
by
陶然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
cd9f739c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
56 deletions
+50
-56
ApplyExtension.cs
Src/ApplyExtension.cs
+25
-21
Configs.cs
Src/Configs.cs
+7
-7
BillApply.cs
Src/Entities/BillApply.cs
+16
-26
AssemblyInfo.cs
Src/Properties/AssemblyInfo.cs
+2
-2
No files found.
Src/ApplyExtension.cs
View file @
7562303f
...
...
@@ -17,6 +17,8 @@ namespace Kivii.Finances.Seeyon.Extensions
if
(
client
==
null
)
throw
new
ArgumentNullException
(
"client"
);
if
(
loginName
.
IsNullOrEmpty
())
throw
new
ArgumentNullException
(
"loginName"
);
try
{
var
request
=
new
RequestRestToken
();
request
.
userName
=
Configs
.
restUserName
;
request
.
password
=
Configs
.
restPassword
;
...
...
@@ -24,28 +26,30 @@ namespace Kivii.Finances.Seeyon.Extensions
var
rtns
=
client
.
Post
<
ResponseToken
>(
$"
{
Configs
.
RouteRestToken
}
"
,
request
);
return
rtns
;
}
catch
(
Exception
ex
)
{
throw
new
Exception
(
$"
{
ex
.
Message
}
,可能原因:当前登录人
{
loginName
}
,无法与OA账号对应,请联系管理员确认!"
);
}
}
public
static
Form_InvoiceApply
ConvertToForm
(
this
InvoiceApply
apply
)
{
var
rtns
=
new
Form_InvoiceApply
();
var
settlementType
=
"code|MonthlySettlement"
;
//默认月结
//
var settlementType = "code|MonthlySettlement";//默认月结
rtns
.
业务类型
=
typeof
(
BillApply
).
FullName
;
rtns
.
业务编号
=
apply
.
Kvid
.
ToString
();
rtns
.
申请人
=
KiviiContext
.
CurrentMember
.
FullName
;
rtns
.
申请科室
=
KiviiContext
.
CurrentMember
.
DepartmentName
;
rtns
.
申请日期
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
);
rtns
.
企业名称
=
apply
.
PayerName
;
rtns
.
地址
=
apply
.
PayerCompanyAddress
;
rtns
.
联系人
=
apply
.
PayerRegisteredBank
;
rtns
.
联系电话
=
apply
.
PayerPhone
;
rtns
.
收费
=
apply
.
Amount
.
ToString
();
rtns
.
结算方式
=
settlementType
;
rtns
.
开始日期
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
);
rtns
.
结束日期
=
DateTime
.
Now
.
AddDays
(
10
).
ToString
(
"yyyy-MM-dd"
);
;
rtns
.
合同负责人
=
apply
.
OperatorName
;
rtns
.
附加备注
=
apply
.
Remark
;
rtns
.
是否定制价
=
"2"
;
rtns
.
说明
=
apply
.
Remark
;
rtns
.
单据编号
=
apply
.
SerialNumber
;
rtns
.
日期
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
);
rtns
.
所属部门
=
KiviiContext
.
CurrentMember
.
DepartmentName
;
rtns
.
经办人
=
apply
.
OperatorName
;
rtns
.
付款单位名称
=
apply
.
PayerName
;
rtns
.
纳税人识别号
=
apply
.
PayerTaxNumber
;
rtns
.
地址电话
=
$"
{
apply
.
PayerCompanyAddress
}{
apply
.
PayerPhone
}
"
;
rtns
.
开户行及账号
=
$"
{
apply
.
PayerRegisteredBank
}{
apply
.
PayerBankAccount
}
"
;
rtns
.
发票类型
=
apply
.
Type
==
"增值税专用发票"
?
"-4189929216282050282"
:
"4529935671729733794"
;
rtns
.
申请原因
=
apply
.
Remark
;
rtns
.
数量
=
"1"
;
rtns
.
金额
=
apply
.
Amount
.
ToString
();
return
rtns
;
}
...
...
@@ -53,17 +57,17 @@ namespace Kivii.Finances.Seeyon.Extensions
{
if
(
client
==
null
)
throw
new
ArgumentNullException
(
"client"
);
if
(
form
==
null
)
throw
new
ArgumentNullException
(
"form"
);
var
token
=
client
.
RequestRestToken
(
session
.
UserAuth
Name
);
var
token
=
client
.
RequestRestToken
(
session
.
Full
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
.
senderLoginName
=
token
.
bindingUser
.
loginName
;
request
.
data
.
subject
=
$"
检验合同
申请(
{
token
.
bindingUser
.
name
}
{
DateTime
.
Now
:
yyyy
-
MM
-
dd
HH
:
mm
}
)"
;
//
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
();
request
.
data
.
data
.
formmain_0
061
=
new
Form_InvoiceApply
();
request
.
data
.
data
.
formmain_0
061
=
form
;
request
.
data
.
data
.
formmain_0
318
=
new
Form_InvoiceApply
();
request
.
data
.
data
.
formmain_0
318
=
form
;
var
rtns
=
client
.
Post
<
ResponseForm
<
ResponseData
>>(
$"
{
Configs
.
RouteRequestForm
}
?token=
{
token
.
id
}
"
,
request
);
return
rtns
;
}
...
...
Src/Configs.cs
View file @
7562303f
...
...
@@ -8,17 +8,17 @@ namespace Kivii.Finances.Seeyon
{
internal
static
class
Configs
{
internal
static
string
BaseUrl
=
""
;
//"http://zyoa.jst-gov.com";
internal
static
string
BaseUrl
=
"
http://61.132.52.110:82
"
;
//"http://zyoa.jst-gov.com";
public
const
string
TableNameApply
=
"FINA_Applies"
;
internal
static
string
RouteRequestForm
=
"
"
;
//"
/seeyon/rest/bpm/process/start";
internal
static
string
RouteRestToken
=
"
"
;
//"
/seeyon/rest/token";
internal
static
string
RouteRequestForm
=
"/seeyon/rest/bpm/process/start"
;
internal
static
string
RouteRestToken
=
"/seeyon/rest/token"
;
internal
static
string
appName
=
"
"
;
//"
collaboration";//"collaboration";//OA提供
internal
static
string
templateCode
=
"
"
;
//"JYHTSQ
";//"JYHTSQ";//OA提供
internal
static
string
appName
=
"collaboration"
;
//"collaboration";//OA提供
internal
static
string
templateCode
=
"
AdvanceInvoice
"
;
//"JYHTSQ";//OA提供
internal
static
string
restUserName
=
""
;
//"rest";
internal
static
string
restPassword
=
""
;
//"fba09671-2b1e-4c8c-9aaf-de16821070df";
internal
static
string
restUserName
=
"
settlement
"
;
//"rest";
internal
static
string
restPassword
=
"
53aab6e3-05e5-4f6f-9084-38247e6142b6
"
;
//"fba09671-2b1e-4c8c-9aaf-de16821070df";
}
}
Src/Entities/BillApply.cs
View file @
7562303f
...
...
@@ -113,7 +113,7 @@ namespace Kivii.Finances.Seeyon.Entities
public
class
RequestForm_InvoiceApply
{
public
Form_InvoiceApply
formmain_0
061
{
get
;
set
;
}
public
Form_InvoiceApply
formmain_0
318
{
get
;
set
;
}
}
public
class
Form_InvoiceApply
{
...
...
@@ -127,38 +127,28 @@ namespace Kivii.Finances.Seeyon.Entities
/// </summary>
public
string
业务类型
{
get
;
set
;
}
/// <summary>
///
人员登陆名
///
单据编号
/// </summary>
public
string
申请人
{
get
;
set
;
}
public
string
单据编号
{
get
;
set
;
}
/// <summary>
///
部门编码
///
格式:2023-10-11
/// </summary>
public
string
申请科室
{
get
;
set
;
}
public
string
日期
{
get
;
set
;
}
public
string
申请日期
{
get
;
set
;
}
public
string
企业名称
{
get
;
set
;
}
public
string
地址
{
get
;
set
;
}
public
string
联系人
{
get
;
set
;
}
public
string
联系电话
{
get
;
set
;
}
public
string
所属部门
{
get
;
set
;
}
public
string
经办人
{
get
;
set
;
}
public
string
付款单位名称
{
get
;
set
;
}
public
string
纳税人识别号
{
get
;
set
;
}
public
string
地址电话
{
get
;
set
;
}
public
string
开户行及账号
{
get
;
set
;
}
/// <summary>
///
折扣
///
发票类型{普通:4529935671729733794 专票:-4189929216282050282}
/// </summary>
public
string
收费
{
get
;
set
;
}
/// <summary>
/// 形如code|xxx,MonthlySettlement月结,BatchSettlement批结,QuarterlySettlement季结
/// </summary>
public
string
结算方式
{
get
;
set
;
}
public
string
开始日期
{
get
;
set
;
}
public
string
结束日期
{
get
;
set
;
}
public
string
合同负责人
{
get
;
set
;
}
public
string
附加备注
{
get
;
set
;
}
/// <summary>
/// 0是 1否 2其他
/// </summary>
public
string
是否定制价
{
get
;
set
;
}
public
string
说明
{
get
;
set
;
}
public
string
发票类型
{
get
;
set
;
}
public
string
申请原因
{
get
;
set
;
}
public
string
数量
{
get
;
set
;
}
public
string
金额
{
get
;
set
;
}
}
}
Src/Properties/AssemblyInfo.cs
View file @
7562303f
...
...
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.4.2023.
925
0")]
[assembly: AssemblyFileVersion("5.4.2023.
925
0")]
[assembly: AssemblyVersion("5.4.2023.
1011
0")]
[assembly: AssemblyFileVersion("5.4.2023.
1011
0")]
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