Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
Njhg.Third.Semir.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
陶然
Njhg.Third.Semir.V4.5
Commits
f4356ff9
Commit
f4356ff9
authored
Jan 19, 2024
by
陶然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
e504a481
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
40 deletions
+40
-40
SemirOrderBase.cs
Src/Entities/SemirOrderBase.cs
+40
-40
No files found.
Src/Entities/SemirOrderBase.cs
View file @
f4356ff9
...
...
@@ -20,51 +20,51 @@ namespace Njhg.Third.Semir.Entities
public
Report
OnInstanceThirdReport
(
Guid
ThirdReportOrderKvid
)
{
return
null
;
//
if (ThirdReportOrderKvid == Guid.Empty) return null;
//
var conn = KiviiContext.GetOpenedDbConnection<ThirdReportOrder>();
//
var third = conn.SingleById<ThirdReportOrder>(ThirdReportOrderKvid);
//
if (third == null) return null;
//
if (third.ThirdType != typeof(SemirOrder).FullName) return null;
//
if (third.Metadata == null) return null;
//
var semir = third.Metadata.DicToObject();
//
return null;
if
(
ThirdReportOrderKvid
==
Guid
.
Empty
)
return
null
;
var
conn
=
KiviiContext
.
GetOpenedDbConnection
<
ThirdReportOrder
>();
var
third
=
conn
.
SingleById
<
ThirdReportOrder
>(
ThirdReportOrderKvid
);
if
(
third
==
null
)
return
null
;
if
(
third
.
ThirdType
!=
typeof
(
SemirOrder
).
FullName
)
return
null
;
if
(
third
.
Metadata
==
null
)
return
null
;
var
semir
=
third
.
Metadata
.
DicToObject
();
//
var report = new Report();
//
report.BizId = third.SerialNumber;
//
report.BizKvid = third.Kvid;
//
report.BizType = typeof(ThirdReportOrder).FullName;
//
report.ReportId = $"{semir.BRAND_DISPLAY}{DateTime.Now:yyyyMMddHHmmss}";
//
//
contract.OrderID = semir.DOC_NO;
//
report.Type = "B";
//
report.TypeEx = "W";
//
report.TypeName = "委托送样";
//
report.Category = "SE";
//
report.DemanderName = semir.COMPANY_NAME;
//
report.DemanderContactName = semir.CONTACT_PERSON;
//
report.DemanderContactNumber = semir.CONTACT_PHONE;
//
report.DemanderContactAddress = semir.COMPANY_ADDRESS;
var
report
=
new
Report
();
report
.
BizId
=
third
.
SerialNumber
;
report
.
BizKvid
=
third
.
Kvid
;
report
.
BizType
=
typeof
(
ThirdReportOrder
).
FullName
;
report
.
ReportId
=
$"
{
semir
.
BRAND_DISPLAY
}{
DateTime
.
Now
:
yyyyMMddHHmmss
}
"
;
//contract.OrderID = semir.DOC_NO;
report
.
Type
=
"B"
;
report
.
TypeEx
=
"W"
;
report
.
TypeName
=
"委托送样"
;
report
.
Category
=
"SE"
;
report
.
DemanderName
=
semir
.
COMPANY_NAME
;
report
.
DemanderContactName
=
semir
.
CONTACT_PERSON
;
report
.
DemanderContactNumber
=
semir
.
CONTACT_PHONE
;
report
.
DemanderContactAddress
=
semir
.
COMPANY_ADDRESS
;
//
report.SampleManufacturerName = semir.APPLY_ORG_NAME;
//
report.SampleManufacturerContactName = semir.PAYER_CONTACT_PERSON;
//
report.SampleManufacturerContactNumber = semir.PAYER_CONTACT_PHONE;
//
report.SampleManufacturerAddress = semir.PAYER_ORG_ADDRESS;
report
.
SampleManufacturerName
=
semir
.
APPLY_ORG_NAME
;
report
.
SampleManufacturerContactName
=
semir
.
PAYER_CONTACT_PERSON
;
report
.
SampleManufacturerContactNumber
=
semir
.
PAYER_CONTACT_PHONE
;
report
.
SampleManufacturerAddress
=
semir
.
PAYER_ORG_ADDRESS
;
//
report.SampleName = semir.MAT_NAME;
//
report.SampleBrand = semir.BRAND_DISPLAY;
//
report.SampleGradeSafety = semir.CHECK_LEVEL;
//
report.SampleGrade = semir.SAMPLE_GRADE;
report
.
SampleName
=
semir
.
MAT_NAME
;
report
.
SampleBrand
=
semir
.
BRAND_DISPLAY
;
report
.
SampleGradeSafety
=
semir
.
CHECK_LEVEL
;
report
.
SampleGrade
=
semir
.
SAMPLE_GRADE
;
//
report.SampleBatchNumber = semir.FG_MAT_CODE;
report
.
SampleBatchNumber
=
semir
.
FG_MAT_CODE
;
//
var details = new List<string>();
//
foreach (var detail in semir.ITEMS)
//
{
//
details.Add($"{detail.ITEM_NAME}({detail.ITEM_STANDARD})");
//
}
//
var tasks = string.Join("、", details.ToArray());
//
report.Metadata = new Dictionary<string, string>();
//
report.Metadata.Add("ERemark", tasks);
//
return report;
var
details
=
new
List
<
string
>();
foreach
(
var
detail
in
semir
.
ITEMS
)
{
details
.
Add
(
$"
{
detail
.
ITEM_NAME
}
(
{
detail
.
ITEM_STANDARD
}
)"
);
}
var
tasks
=
string
.
Join
(
"、"
,
details
.
ToArray
());
report
.
Metadata
=
new
Dictionary
<
string
,
string
>();
report
.
Metadata
.
Add
(
"ERemark"
,
tasks
);
return
report
;
}
public
bool
OnRejectThirdReport
(
Guid
ThirdReportOrderKvid
)
...
...
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