Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sap-service
Project
Project
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
曲欣亮
sap-service
Commits
8368a263
Commit
8368a263
authored
Jul 26, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
20416fb5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
40 deletions
+46
-40
PrformaInvoiceServiceImpl.java
...o/services/prforma_invoice/PrformaInvoiceServiceImpl.java
+46
-40
No files found.
src/main/java/com/egolm/sso/services/prforma_invoice/PrformaInvoiceServiceImpl.java
View file @
8368a263
...
@@ -76,15 +76,17 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
...
@@ -76,15 +76,17 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
}
}
if
(
partnerList
!=
null
)
{
if
(
partnerList
!=
null
)
{
for
(
HEADER_PARTNER_DATA
HEADER_PARTNER_DATA
:
partnerList
)
{
for
(
HEADER_PARTNER_DATA
HEADER_PARTNER_DATA
:
partnerList
)
{
String
PARVW
=
HEADER_PARTNER_DATA
.
getPARVW
();
if
(
HEADER_PARTNER_DATA
!=
null
)
{
if
(
"AG"
.
equals
(
PARVW
))
{
String
PARVW
=
HEADER_PARTNER_DATA
.
getPARVW
();
headMap
.
put
(
"PARTNER_PARVW1"
,
HEADER_PARTNER_DATA
.
getPARVW
());
if
(
"AG"
.
equals
(
PARVW
))
{
headMap
.
put
(
"PARTNER_PARTN1"
,
HEADER_PARTNER_DATA
.
getPARTN
());
headMap
.
put
(
"PARTNER_PARVW1"
,
HEADER_PARTNER_DATA
.
getPARVW
());
}
else
if
(
"WE"
.
equals
(
PARVW
))
{
headMap
.
put
(
"PARTNER_PARTN1"
,
HEADER_PARTNER_DATA
.
getPARTN
());
headMap
.
put
(
"PARTNER_PARVW2"
,
HEADER_PARTNER_DATA
.
getPARVW
());
}
else
if
(
"WE"
.
equals
(
PARVW
))
{
headMap
.
put
(
"PARTNER_PARTN2"
,
HEADER_PARTNER_DATA
.
getPARTN
());
headMap
.
put
(
"PARTNER_PARVW2"
,
HEADER_PARTNER_DATA
.
getPARVW
());
}
else
{
headMap
.
put
(
"PARTNER_PARTN2"
,
HEADER_PARTNER_DATA
.
getPARTN
());
throw
new
XRException
(
"Partner type undefined ["
+
PARVW
+
"] in HEADER_PARTNER_DATA"
);
}
else
{
throw
new
XRException
(
"Partner type undefined ["
+
PARVW
+
"] in HEADER_PARTNER_DATA"
);
}
}
}
}
}
}
}
...
@@ -107,19 +109,20 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
...
@@ -107,19 +109,20 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
if
(
summaryList
!=
null
)
{
if
(
summaryList
!=
null
)
{
for
(
int
i
=
0
;
i
<
summaryList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
summaryList
.
size
();
i
++)
{
SUMMARY_GENERAL
SUMMARY_GENERAL
=
summaryList
.
get
(
i
);
SUMMARY_GENERAL
SUMMARY_GENERAL
=
summaryList
.
get
(
i
);
String
SUMID
=
SUMMARY_GENERAL
.
getSUMID
();
if
(
SUMMARY_GENERAL
!=
null
)
{
if
(
"005"
.
equals
(
SUMID
))
{
String
SUMID
=
SUMMARY_GENERAL
.
getSUMID
();
headMap
.
put
(
"SUMMARY_SUMID1"
,
SUMMARY_GENERAL
.
getSUMID
());
if
(
"005"
.
equals
(
SUMID
))
{
headMap
.
put
(
"SUMMARY_SUMME1"
,
SUMMARY_GENERAL
.
getSUMME
());
headMap
.
put
(
"SUMMARY_SUMID1"
,
SUMMARY_GENERAL
.
getSUMID
());
headMap
.
put
(
"SUMMARY_WAERQ1"
,
SUMMARY_GENERAL
.
getWAERQ
());
headMap
.
put
(
"SUMMARY_SUMME1"
,
SUMMARY_GENERAL
.
getSUMME
());
}
else
if
(
"010"
.
equals
(
SUMID
))
{
headMap
.
put
(
"SUMMARY_WAERQ1"
,
SUMMARY_GENERAL
.
getWAERQ
());
headMap
.
put
(
"SUMMARY_SUMID2"
,
SUMMARY_GENERAL
.
getSUMID
());
}
else
if
(
"010"
.
equals
(
SUMID
))
{
headMap
.
put
(
"SUMMARY_SUMME2"
,
SUMMARY_GENERAL
.
getSUMME
());
headMap
.
put
(
"SUMMARY_SUMID2"
,
SUMMARY_GENERAL
.
getSUMID
());
headMap
.
put
(
"SUMMARY_WAERQ2"
,
SUMMARY_GENERAL
.
getWAERQ
());
headMap
.
put
(
"SUMMARY_SUMME2"
,
SUMMARY_GENERAL
.
getSUMME
());
}
else
{
headMap
.
put
(
"SUMMARY_WAERQ2"
,
SUMMARY_GENERAL
.
getWAERQ
());
throw
new
XRException
(
"Amount type undefined ["
+
SUMID
+
"] in SUMMARY_GENERAL"
);
}
else
{
throw
new
XRException
(
"Amount type undefined ["
+
SUMID
+
"] in SUMMARY_GENERAL"
);
}
}
}
}
}
}
}
headMap
.
put
(
"BATCH"
,
dateString
+
"-"
+
common
.
getNextval
(
"T_PERFORM_INVOICE_HEADER_BATCH_"
+
dateString
));
headMap
.
put
(
"BATCH"
,
dateString
+
"-"
+
common
.
getNextval
(
"T_PERFORM_INVOICE_HEADER_BATCH_"
+
dateString
));
...
@@ -158,17 +161,18 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
...
@@ -158,17 +161,18 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
if
(
itemAmountList
!=
null
)
{
if
(
itemAmountList
!=
null
)
{
for
(
int
i
=
0
;
i
<
itemAmountList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
itemAmountList
.
size
();
i
++)
{
ITEM_AMOUNT_DATA
ITEM_AMOUNT_DATA
=
itemAmountList
.
get
(
i
);
ITEM_AMOUNT_DATA
ITEM_AMOUNT_DATA
=
itemAmountList
.
get
(
i
);
String
QUALF
=
ITEM_AMOUNT_DATA
.
getQUALF
();
if
(
ITEM_AMOUNT_DATA
!=
null
)
{
if
(
"001"
.
equals
(
QUALF
))
{
String
QUALF
=
ITEM_AMOUNT_DATA
.
getQUALF
();
itemDataMap
.
put
(
"AMOUNT_QUALF1"
,
ITEM_AMOUNT_DATA
.
getQUALF
());
if
(
"001"
.
equals
(
QUALF
))
{
itemDataMap
.
put
(
"AMOUNT_BETRG1"
,
ITEM_AMOUNT_DATA
.
getBETRG
());
itemDataMap
.
put
(
"AMOUNT_QUALF1"
,
ITEM_AMOUNT_DATA
.
getQUALF
());
}
else
if
(
"003"
.
equals
(
QUALF
))
{
itemDataMap
.
put
(
"AMOUNT_BETRG1"
,
ITEM_AMOUNT_DATA
.
getBETRG
());
itemDataMap
.
put
(
"AMOUNT_QUALF2"
,
ITEM_AMOUNT_DATA
.
getQUALF
());
}
else
if
(
"003"
.
equals
(
QUALF
))
{
itemDataMap
.
put
(
"AMOUNT_BETRG2"
,
ITEM_AMOUNT_DATA
.
getBETRG
());
itemDataMap
.
put
(
"AMOUNT_QUALF2"
,
ITEM_AMOUNT_DATA
.
getQUALF
());
}
else
{
itemDataMap
.
put
(
"AMOUNT_BETRG2"
,
ITEM_AMOUNT_DATA
.
getBETRG
());
throw
new
XRException
(
"Amount type undefined ["
+
QUALF
+
"] in ITEM_AMOUNT_LIST"
);
}
else
{
throw
new
XRException
(
"Amount type undefined ["
+
QUALF
+
"] in ITEM_AMOUNT_LIST"
);
}
}
}
}
}
}
}
if
(
ITEM_VAT_DATA
!=
null
)
{
if
(
ITEM_VAT_DATA
!=
null
)
{
...
@@ -178,15 +182,17 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
...
@@ -178,15 +182,17 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
if
(
poTypeList
!=
null
)
{
if
(
poTypeList
!=
null
)
{
for
(
int
i
=
0
;
i
<
poTypeList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
poTypeList
.
size
();
i
++)
{
ITEM_REFERENCE_PO_TYPE
ITEM_REFERENCE_PO_TYPE
=
poTypeList
.
get
(
i
);
ITEM_REFERENCE_PO_TYPE
ITEM_REFERENCE_PO_TYPE
=
poTypeList
.
get
(
i
);
String
TDID
=
ITEM_REFERENCE_PO_TYPE
.
getTDID
();
if
(
ITEM_REFERENCE_PO_TYPE
!=
null
)
{
if
(
"ZXI1"
.
equals
(
TDID
))
{
String
TDID
=
ITEM_REFERENCE_PO_TYPE
.
getTDID
();
itemDataMap
.
put
(
"REFERENCE_PO_TYPE_TDID1"
,
ITEM_REFERENCE_PO_TYPE
.
getTDID
());
if
(
"ZXI1"
.
equals
(
TDID
))
{
itemDataMap
.
put
(
"REFERENCE_PO_DATA_TDLINE1"
,
ITEM_REFERENCE_PO_TYPE
.
getITEM_REFERENCE_PO_DATA
().
getTDLINE
());
itemDataMap
.
put
(
"REFERENCE_PO_TYPE_TDID1"
,
ITEM_REFERENCE_PO_TYPE
.
getTDID
());
}
else
if
(
"ZXI2"
.
equals
(
TDID
))
{
itemDataMap
.
put
(
"REFERENCE_PO_DATA_TDLINE1"
,
ITEM_REFERENCE_PO_TYPE
.
getITEM_REFERENCE_PO_DATA
().
getTDLINE
());
itemDataMap
.
put
(
"REFERENCE_PO_TYPE_TDID2"
,
ITEM_REFERENCE_PO_TYPE
.
getTDID
());
}
else
if
(
"ZXI2"
.
equals
(
TDID
))
{
itemDataMap
.
put
(
"REFERENCE_PO_DATA_TDLINE2"
,
ITEM_REFERENCE_PO_TYPE
.
getITEM_REFERENCE_PO_DATA
().
getTDLINE
());
itemDataMap
.
put
(
"REFERENCE_PO_TYPE_TDID2"
,
ITEM_REFERENCE_PO_TYPE
.
getTDID
());
}
else
{
itemDataMap
.
put
(
"REFERENCE_PO_DATA_TDLINE2"
,
ITEM_REFERENCE_PO_TYPE
.
getITEM_REFERENCE_PO_DATA
().
getTDLINE
());
throw
new
XRException
(
"Text type undefined ["
+
TDID
+
"] in ITEM_REFERENCE_PO_TYPE"
);
}
else
{
throw
new
XRException
(
"Text type undefined ["
+
TDID
+
"] in ITEM_REFERENCE_PO_TYPE"
);
}
}
}
}
}
}
}
...
...
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