Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
Njzj.Biz.Ngstc.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
陶然
Njzj.Biz.Ngstc.V4.5
Commits
3417cf46
Commit
3417cf46
authored
Dec 13, 2023
by
陶然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
73418625
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
5 deletions
+67
-5
Entities.cs
Src/Entities.cs
+1
-1
Extension.cs
Src/Extension.cs
+25
-0
AssemblyInfo.cs
Src/Properties/AssemblyInfo.cs
+2
-2
南京国检财务对接.docx
Src/Resoures/南京国检财务对接.docx
+0
-0
Restful.cs
Src/Restful.cs
+39
-2
No files found.
Src/Entities.cs
View file @
3417cf46
...
...
@@ -69,7 +69,7 @@ namespace Njzj.Ngstc
public
string
BillState
{
get
;
set
;
}
[
ApiMember
(
Description
=
"收款日期"
)]
public
DateTime
PayDate
{
get
;
set
;
}
public
DateTime
?
PayDate
{
get
;
set
;
}
[
ApiMember
(
Description
=
"备注"
)]
public
string
Remark
{
get
;
set
;
}
...
...
Src/Extension.cs
View file @
3417cf46
using
Kivii
;
using
Kivii.Finances.Entities
;
using
Kivii.Linq
;
using
Kivii.Organizations.Entities
;
using
System
;
...
...
@@ -22,6 +23,30 @@ namespace Njzj.Ngstc
return
rtns
.
SFBillInfos
;
}
public
static
List
<
SettlementDetail
>
ConvertToSettlementDetail
(
this
List
<
NgstcDetail
>
ngstcDetails
)
{
var
rtns
=
new
List
<
SettlementDetail
>();
foreach
(
var
item
in
ngstcDetails
)
{
var
detail
=
new
SettlementDetail
();
detail
.
GoodsFullName
=
item
.
BatchNo
;
detail
.
GoodsId
=
item
.
Region
;
detail
.
GoodsSpecifications
=
item
.
BillType
;
detail
.
GoodsModel
=
item
.
Source
;
detail
.
BizId
=
item
.
CShortName
;
detail
.
BizType
=
item
.
CName
;
detail
.
Remark
=
item
.
TabDate
;
detail
.
QuantityUnitPrice
=
item
.
AmountComplete
;
detail
.
QuantityUnitPricePlan
=
item
.
Amount
;
detail
.
Quantity
=
item
.
Weight
;
detail
.
Amount
=
item
.
CurPrice
;
detail
.
AmountPlan
=
item
.
OriPrice
;
rtns
.
Add
(
detail
);
}
return
rtns
;
}
public
static
string
UpdateNgstcBill
(
this
NgstcUpdate
ngstcUpdate
)
{
var
client
=
new
JsonHttpClient
(
Configs
.
baseUrl
);
...
...
Src/Properties/AssemblyInfo.cs
View file @
3417cf46
...
...
@@ -33,5 +33,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.4.2023.
921
0")]
[assembly: AssemblyFileVersion("5.4.2023.
921
0")]
[assembly: AssemblyVersion("5.4.2023.
1213
0")]
[assembly: AssemblyFileVersion("5.4.2023.
1213
0")]
Src/Resoures/南京国检财务对接.docx
View file @
3417cf46
No preview for this file type
Src/Restful.cs
View file @
3417cf46
...
...
@@ -26,12 +26,48 @@ namespace Njzj.Ngstc
}
}
[
Api
(
Description
=
"珠宝结算查看接口"
)]
public
class
NgstcDetailRead
:
RestfulExecution
<
NgstcDetail
>
{
public
Guid
Kvid
{
get
;
set
;
}
public
bool
IncludeDetail
{
get
;
set
;
}
public
override
object
OnExecution
(
IRequest
req
,
IResponse
res
)
{
Kvid
.
ThrowIfEmpty
(
"请传入要查询的结算信息"
);
var
rtns
=
new
RestfulReadResponse
<
Settlement
>();
rtns
.
Result
=
new
Settlement
();
var
conn
=
KiviiContext
.
GetOpenedDbConnection
<
Settlement
>();
var
settlement
=
conn
.
SingleById
<
Settlement
>(
Kvid
);
if
(
settlement
!=
null
)
rtns
.
Result
.
PopulateWith
(
settlement
);
if
(
IncludeDetail
)
{
if
(
settlement
.
BizType
!=
typeof
(
NgstcDetail
).
FullName
)
throw
new
Exception
(
"请传入珠宝系统结算信息!"
);
var
ngstcDetails
=
settlement
.
BizId
.
GetNgstcDetails
();
var
details
=
ngstcDetails
.
ConvertToSettlementDetail
();
rtns
.
Result
.
Details
=
new
List
<
SettlementDetail
>();
rtns
.
Result
.
Details
.
AddRange
(
details
);
}
return
rtns
;
}
}
[
Api
(
Description
=
"珠宝账单回传"
)]
public
class
NgstcUpdateBill
:
RestfulExecution
<
NgstcUpdate
>
{
public
NgstcUpdate
NgstcUpdate
{
get
;
set
;
}
public
override
object
OnExecution
(
IRequest
req
,
IResponse
res
)
{
//Settlement item= new Settlement();
//NgstcUpdate order = new NgstcUpdate();
//order.BillNo = item.BizId;
//order.UnPaid = (item.Amount - item.AmountPayment) < 0 ? 0 : item.Amount - item.AmountPayment;
//order.Paid = item.AmountPayment < 0 ? 0 : item.AmountPayment;
//order.BillState = "已结账";
//order.PayDate = item.PayedTime;
NgstcUpdate
.
ThrowIfNull
(
"请传入账单信息!"
);
var
results
=
NgstcUpdate
.
UpdateNgstcBill
();
var
rtns
=
new
RestfulQueryResponse
<
NgstcUpdate
>();
...
...
@@ -72,9 +108,10 @@ namespace Njzj.Ngstc
Item
.
Type
=
Item
.
Type
.
IsNullOrEmpty
()
?
"珠宝结算"
:
Item
.
Type
;
Item
.
Category
=
"珠宝结算"
;
Item
.
OperateTime
=
Item
.
OperateTime
==
DateTime
.
MinValue
?
DateTime
.
Now
:
Item
.
OperateTime
;
Item
.
PayeeName
=
Item
.
PayeeName
.
IsNullOrEmpty
()
?
"南京市产品质量监督检验院(南京市质量发展与先进技术应用研究院)"
:
Item
.
PayeeName
;
Item
.
PayeeName
=
"珠宝系统结算"
;
//Item.PayeeName = Item.PayeeName.IsNullOrEmpty() ? "珠宝系统结算" : Item.PayeeName;
Item
.
AmountPayment
=
0
;
Item
.
BizType
=
typeof
(
Settlement
).
FullName
;
Item
.
BizType
=
typeof
(
NgstcDetail
).
FullName
;
Item
.
Currency
=
CurrencyUnit
.
CNY
;
var
detail
=
new
EntitySettlementDetail
<
Settlement
>();
...
...
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