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
65a35955
Commit
65a35955
authored
Jul 30, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
d5affc7d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
15 deletions
+6
-15
MaterialMasterServiceImpl.java
...o/services/material_master/MaterialMasterServiceImpl.java
+2
-5
PriceListServiceImpl.java
...m/egolm/sso/services/price_list/PriceListServiceImpl.java
+4
-10
No files found.
src/main/java/com/egolm/sso/services/material_master/MaterialMasterServiceImpl.java
View file @
65a35955
...
@@ -63,6 +63,8 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
...
@@ -63,6 +63,8 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
}
}
List
<
ITEM
>
items
=
RECORD
.
getITEM
();
List
<
ITEM
>
items
=
RECORD
.
getITEM
();
Long
BATCHID
=
common
.
getNextval
(
dateString
+
"T_VEN_GOODS_BATCH_"
+
DIS_CODE
);
String
BATCH
=
dateString
+
"-"
+
BATCHID
;
if
(
items
!=
null
)
{
if
(
items
!=
null
)
{
for
(
ITEM
item
:
items
)
{
for
(
ITEM
item
:
items
)
{
...
@@ -75,7 +77,6 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
...
@@ -75,7 +77,6 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
goods
.
put
(
"DIS_CODE"
,
DIS_CODE
);
goods
.
put
(
"DIS_CODE"
,
DIS_CODE
);
goods
.
put
(
"DATUM"
,
DateUtil
.
parseDate
(
DATUM
,
DateUtil
.
FMT_DATE
));
goods
.
put
(
"DATUM"
,
DateUtil
.
parseDate
(
DATUM
,
DateUtil
.
FMT_DATE
));
goods
.
put
(
"UZEIT"
,
DateUtil
.
parseDate
(
UZEIT
,
DateUtil
.
FMT_TIME
));
goods
.
put
(
"UZEIT"
,
DateUtil
.
parseDate
(
UZEIT
,
DateUtil
.
FMT_TIME
));
goods
.
put
(
"GOODS_CODE"
,
GOODS_CODE
);
goods
.
put
(
"GOODS_CODE"
,
GOODS_CODE
);
goods
.
put
(
"ROUGH_WEIGHT"
,
Double
.
valueOf
(
item
.
getBRGEW
()));
goods
.
put
(
"ROUGH_WEIGHT"
,
Double
.
valueOf
(
item
.
getBRGEW
()));
goods
.
put
(
"NET_WEIGHT"
,
Double
.
valueOf
(
item
.
getNTGEW
()));
goods
.
put
(
"NET_WEIGHT"
,
Double
.
valueOf
(
item
.
getNTGEW
()));
...
@@ -105,16 +106,12 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
...
@@ -105,16 +106,12 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
goods
.
put
(
"MEABM_B"
,
item
.
getMEABM_B
());
goods
.
put
(
"MEABM_B"
,
item
.
getMEABM_B
());
goods
.
put
(
"PUBLIC"
,
item
.
getPUBLIC
());
goods
.
put
(
"PUBLIC"
,
item
.
getPUBLIC
());
goods
.
put
(
"INTERNET"
,
item
.
getINTERNET
());
goods
.
put
(
"INTERNET"
,
item
.
getINTERNET
());
if
(
DIS_CODE
==
null
||
DIS_CODE
.
trim
().
isEmpty
())
{
if
(
DIS_CODE
==
null
||
DIS_CODE
.
trim
().
isEmpty
())
{
throw
new
XRException
(
"Unable to generate batch number, Distributor number cannot be empty"
);
throw
new
XRException
(
"Unable to generate batch number, Distributor number cannot be empty"
);
}
}
Long
BATCHID
=
common
.
getNextval
(
dateString
+
"T_VEN_GOODS_BATCH_"
+
DIS_CODE
);
String
BATCH
=
dateString
+
"-"
+
BATCHID
;
goods
.
put
(
"TRACE_NO"
,
"sapmaterialmaster"
+
DateUtil
.
formatDate
(
now
,
DateUtil
.
FMT_DATETIME
));
goods
.
put
(
"TRACE_NO"
,
"sapmaterialmaster"
+
DateUtil
.
formatDate
(
now
,
DateUtil
.
FMT_DATETIME
));
goods
.
put
(
"BATCH"
,
BATCH
);
goods
.
put
(
"BATCH"
,
BATCH
);
goods
.
put
(
"SEND_STATUS"
,
"N"
);
goods
.
put
(
"SEND_STATUS"
,
"N"
);
if
(
goods
.
get
(
"ID"
)
!=
null
)
{
if
(
goods
.
get
(
"ID"
)
!=
null
)
{
updateGoods
(
goods
);
updateGoods
(
goods
);
}
else
{
}
else
{
...
...
src/main/java/com/egolm/sso/services/price_list/PriceListServiceImpl.java
View file @
65a35955
...
@@ -64,6 +64,10 @@ public class PriceListServiceImpl implements PriceListService {
...
@@ -64,6 +64,10 @@ public class PriceListServiceImpl implements PriceListService {
DATUM
=
h
.
getDATUM
();
DATUM
=
h
.
getDATUM
();
UZEIT
=
h
.
getUZEIT
();
UZEIT
=
h
.
getUZEIT
();
}
}
if
(
KUNNR
==
null
||
KUNNR
.
trim
().
isEmpty
())
{
throw
new
XRException
(
"Unable to generate batch number, Distributor number cannot be empty"
);
}
String
BATCH
=
dateString
+
"-"
+
common
.
getNextval
(
"T_PRICE_LIST_BATCH_"
+
KUNNR
);
if
(
items
!=
null
)
{
if
(
items
!=
null
)
{
for
(
ITEM
item
:
items
)
{
for
(
ITEM
item
:
items
)
{
if
(
item
!=
null
)
{
if
(
item
!=
null
)
{
...
@@ -72,12 +76,10 @@ public class PriceListServiceImpl implements PriceListService {
...
@@ -72,12 +76,10 @@ public class PriceListServiceImpl implements PriceListService {
if
(
priceObj
==
null
)
{
if
(
priceObj
==
null
)
{
priceObj
=
new
HashMap
<>();
priceObj
=
new
HashMap
<>();
}
}
priceObj
.
put
(
"KUNNR"
,
KUNNR
);
priceObj
.
put
(
"KUNNR"
,
KUNNR
);
priceObj
.
put
(
"DATUM"
,
DateUtil
.
parseDate
(
DATUM
,
DateUtil
.
FMT_DATE
));
priceObj
.
put
(
"DATUM"
,
DateUtil
.
parseDate
(
DATUM
,
DateUtil
.
FMT_DATE
));
priceObj
.
put
(
"UZEIT"
,
DateUtil
.
parseDate
(
UZEIT
,
DateUtil
.
FMT_TIME
));
priceObj
.
put
(
"UZEIT"
,
DateUtil
.
parseDate
(
UZEIT
,
DateUtil
.
FMT_TIME
));
priceObj
.
put
(
"MATNR"
,
MATNR
);
priceObj
.
put
(
"MATNR"
,
MATNR
);
priceObj
.
put
(
"KBETR"
,
StringUtil
.
toDouble
(
item
.
getKBETR
()));
priceObj
.
put
(
"KBETR"
,
StringUtil
.
toDouble
(
item
.
getKBETR
()));
priceObj
.
put
(
"KONWA"
,
item
.
getKONWA
());
priceObj
.
put
(
"KONWA"
,
item
.
getKONWA
());
priceObj
.
put
(
"KPEIN"
,
item
.
getKPEIN
());
priceObj
.
put
(
"KPEIN"
,
item
.
getKPEIN
());
...
@@ -89,15 +91,7 @@ public class PriceListServiceImpl implements PriceListService {
...
@@ -89,15 +91,7 @@ public class PriceListServiceImpl implements PriceListService {
priceObj
.
put
(
"DATBI"
,
DateUtil
.
parseDate
(
item
.
getDATBI
(),
DateUtil
.
FMT_DATE
));
priceObj
.
put
(
"DATBI"
,
DateUtil
.
parseDate
(
item
.
getDATBI
(),
DateUtil
.
FMT_DATE
));
priceObj
.
put
(
"PLINE"
,
item
.
getPLINE
());
priceObj
.
put
(
"PLINE"
,
item
.
getPLINE
());
priceObj
.
put
(
"PRSCH_1"
,
StringUtil
.
toDouble
(
item
.
getPRSCH_1
()));
priceObj
.
put
(
"PRSCH_1"
,
StringUtil
.
toDouble
(
item
.
getPRSCH_1
()));
priceObj
.
put
(
"SEND_STATUS"
,
"N"
);
priceObj
.
put
(
"SEND_STATUS"
,
"N"
);
if
(
KUNNR
==
null
||
KUNNR
.
trim
().
isEmpty
())
{
throw
new
XRException
(
"Unable to generate batch number, Distributor number cannot be empty"
);
}
Long
BATCHID
=
common
.
getNextval
(
"T_PRICE_LIST_BATCH_"
+
KUNNR
);
String
BATCH
=
dateString
+
"-"
+
BATCHID
;
priceObj
.
put
(
"TRACE_NO"
,
"sappricelist"
+
DateUtil
.
formatDate
(
now
,
DateUtil
.
FMT_DATETIME
));
priceObj
.
put
(
"TRACE_NO"
,
"sappricelist"
+
DateUtil
.
formatDate
(
now
,
DateUtil
.
FMT_DATETIME
));
priceObj
.
put
(
"BATCH"
,
BATCH
);
priceObj
.
put
(
"BATCH"
,
BATCH
);
if
(
priceObj
.
get
(
"ID"
)
!=
null
)
{
if
(
priceObj
.
get
(
"ID"
)
!=
null
)
{
...
...
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