Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
srm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
aship
srm
Commits
465a47e6
Commit
465a47e6
authored
Aug 14, 2019
by
顾俭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aship/aship#3 防伪码功能-作废重打:request xml
parent
099f9cb3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
4 deletions
+61
-4
BarcodeGetStatusService.java
...a/com/i1/erp/barcode/service/BarcodeGetStatusService.java
+26
-2
BarcodeVoidService.java
...n/java/com/i1/erp/barcode/service/BarcodeVoidService.java
+35
-2
No files found.
src/main/java/com/i1/erp/barcode/service/BarcodeGetStatusService.java
View file @
465a47e6
package
com
.
i1
.
erp
.
barcode
.
service
;
package
com
.
i1
.
erp
.
barcode
.
service
;
import
com.i1.base.exception.IOneServiceException
;
import
com.i1.base.exception.IOneServiceException
;
import
com.i1.erp.entity.request.Request
;
import
com.i1.erp.entity.request.*
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
@Service
@Service
public
class
BarcodeGetStatusService
implements
IBarcodeGetStatusService
{
public
class
BarcodeGetStatusService
implements
IBarcodeGetStatusService
{
@Override
@Override
public
Request
getRequestXml
(
String
organization
,
String
barcode
)
throws
IOneServiceException
{
public
Request
getRequestXml
(
String
organization
,
String
barcode
)
throws
IOneServiceException
{
if
(
StringUtils
.
isBlank
(
organization
)
||
StringUtils
.
isBlank
(
barcode
))
{
throw
new
IOneServiceException
(
"防伪码状态查询参数为空"
);
}
Access
access
=
Access
.
of
(
Authentication
.
of
(
"017552"
,
"tiptop"
),
Connection
.
of
(
"SRM"
,
"192.168.1.1"
),
Organization
.
of
(
organization
),
Locale
.
of
(
"zh_cn"
));
List
<
Field
>
mstFieldList
=
new
ArrayList
<>();
mstFieldList
.
add
(
Field
.
of
(
"barcode"
,
barcode
));
Record
mstRecord
=
Record
.
of
(
mstFieldList
);
Master
mst
=
Master
.
of
(
mstRecord
,
"MST"
);
RecordSet
recordSet
=
RecordSet
.
of
(
"1"
,
mst
);
List
<
RecordSet
>
recordSetList
=
new
ArrayList
<>();
recordSetList
.
add
(
recordSet
);
RequestContent
requestContent
=
new
RequestContent
();
requestContent
.
setDocument
(
Document
.
of
(
recordSetList
));
requestContent
.
setParameter
(
Parameter
.
of
(
Record
.
of
(
null
)));
return
null
;
return
Request
.
of
(
access
,
requestContent
)
;
}
}
}
}
src/main/java/com/i1/erp/barcode/service/BarcodeVoidService.java
View file @
465a47e6
package
com
.
i1
.
erp
.
barcode
.
service
;
package
com
.
i1
.
erp
.
barcode
.
service
;
import
com.i1.base.exception.IOneServiceException
;
import
com.i1.base.exception.IOneServiceException
;
import
com.i1.erp.entity.request.
Request
;
import
com.i1.erp.entity.request.
*
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
@Service
@Service
public
class
BarcodeVoidService
implements
IBarcodeVoidService
{
public
class
BarcodeVoidService
implements
IBarcodeVoidService
{
@Override
@Override
public
Request
getRequestXml
(
String
organization
,
String
barcode
)
throws
IOneServiceException
{
public
Request
getRequestXml
(
String
organization
,
String
barcode
)
throws
IOneServiceException
{
return
null
;
Access
access
=
Access
.
of
(
Authentication
.
of
(
"017552"
,
"tiptop"
),
Connection
.
of
(
"SRM"
,
"192.168.1.1"
),
Organization
.
of
(
organization
),
Locale
.
of
(
"zh_cn"
));
List
<
Field
>
mstFieldList
=
new
ArrayList
<>();
// 1、批次作废2、单个条码作废
mstFieldList
.
add
(
Field
.
of
(
"type"
,
"2"
));
Record
mstRecord
=
Record
.
of
(
mstFieldList
);
Master
mst
=
Master
.
of
(
mstRecord
,
"MST"
);
List
<
Detail
>
detailList
=
new
ArrayList
<>();
List
<
Record
>
dtlRecordList
=
new
ArrayList
<>();
List
<
Field
>
dtlFieldList
=
new
ArrayList
<>();
dtlFieldList
.
add
(
Field
.
of
(
"barcode"
,
barcode
));
Record
dtlRecord
=
Record
.
of
(
dtlFieldList
);
dtlRecordList
.
add
(
dtlRecord
);
Detail
detail
=
Detail
.
of
(
dtlRecordList
,
"DTL"
);
detailList
.
add
(
detail
);
// recordSet:mst + dtl
RecordSet
recordSet
=
RecordSet
.
of
(
"1"
,
mst
,
detailList
);
List
<
RecordSet
>
recordSetList
=
new
ArrayList
<>();
recordSetList
.
add
(
recordSet
);
RequestContent
requestContent
=
new
RequestContent
();
requestContent
.
setDocument
(
Document
.
of
(
recordSetList
));
requestContent
.
setParameter
(
Parameter
.
of
(
Record
.
of
(
null
)));
return
Request
.
of
(
access
,
requestContent
);
}
}
}
}
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