记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
董敬伟
liquidnet-bus-v1
Commits
0f14b19f
Commit
0f14b19f
authored
Jan 04, 2023
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp 修改 同步库存和推送订单
parent
2440228c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
WdtServiceImpl.java
...idnet/service/goblin/service/impl/erp/WdtServiceImpl.java
+8
-4
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/erp/WdtServiceImpl.java
View file @
0f14b19f
...
...
@@ -104,6 +104,8 @@ public class WdtServiceImpl implements IGoblinErpService {
),
GoblinGoodsSkuInfoVo
.
class
,
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
());
//总条数
int
pageCount
=
(
allCount
/
pageSize
)
+
1
;
param
.
put
(
"page_size"
,
pageSize
+
""
);
// param.put("warehouse_no", "mdtk2-test");
// param.put("spec_no", "md111-1");
for
(
int
i
=
0
;
i
<
pageCount
;
i
++)
{
param
.
put
(
"page_no"
,
i
+
""
);
json
=
erpWdtClient
.
execute
(
ErpEnum
.
WdtAPI
.
STOCK_QUERY
.
getUri
(),
param
);
...
...
@@ -179,7 +181,7 @@ public class WdtServiceImpl implements IGoblinErpService {
}
log
.
info
(
"skuId:{},库存:{}"
,
skuId
,
stock
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
log
.
error
(
"同步库存失败 skuId:{},erpSpecNo:{},warehouseNo:{}"
,
skuId
,
vo
.
getSpecNo
(),
vo
.
getWarehouseNo
());
}
}
...
...
@@ -201,7 +203,7 @@ public class WdtServiceImpl implements IGoblinErpService {
List
<
String
>
list
=
CollectionUtil
.
arrayListString
();
for
(
int
i
=
0
;
i
<
contentSize
;
i
++)
{
String
orderId
=
goblinRedisUtils
.
erpLeftPop
(
i
);
if
(
orderId
!=
null
)
{
if
(
orderId
!=
null
)
{
list
.
add
(
orderId
);
}
}
...
...
@@ -243,6 +245,7 @@ public class WdtServiceImpl implements IGoblinErpService {
List
<
OrderListParam
>
listOrderSku
=
ErpObjectUtil
.
orderListParam
();
String
warehouseNo
=
""
;
int
erpHosting
=
0
;
BigDecimal
priceA
=
BigDecimal
.
ZERO
;
//配置sku维度数据
for
(
String
orderSkuId
:
orderSkuIds
)
{
OrderListParam
orderSkuParam
=
OrderListParam
.
getNew
();
...
...
@@ -254,7 +257,7 @@ public class WdtServiceImpl implements IGoblinErpService {
}
orderSkuParam
.
setOid
(
orderSkuVo
.
getOrderSkuId
());
orderSkuParam
.
setNum
(
BigDecimal
.
valueOf
(
orderSkuVo
.
getNum
()));
orderSkuParam
.
setPrice
(
orderSkuVo
.
getSkuPrice
());
orderSkuParam
.
setPrice
(
orderSkuVo
.
getSkuPrice
());
//.multiply(BigDecimal.valueOf(orderSkuVo.getNum()))
orderSkuParam
.
setStatus
(
ErpEnum
.
WdtStatus
.
STATUS_UN_SEND
.
WdtStatus
());
orderSkuParam
.
setRefund_status
(
0
);
orderSkuParam
.
setGoods_id
(
orderSkuVo
.
getSpuId
());
...
...
@@ -266,6 +269,7 @@ public class WdtServiceImpl implements IGoblinErpService {
orderSkuParam
.
setDiscount
(
BigDecimal
.
ZERO
);
orderSkuParam
.
setShare_discount
(
orderSkuVo
.
getPriceVoucher
());
warehouseNo
=
orderSkuVo
.
getErpWarehouseNo
();
priceA
=
priceA
.
add
(
orderSkuVo
.
getSkuPrice
());
listOrderSku
.
add
(
orderSkuParam
);
}
//配置订单维度数据
...
...
@@ -303,7 +307,7 @@ public class WdtServiceImpl implements IGoblinErpService {
tradeListParam
.
setPost_amount
(
orderVo
.
getPriceExpress
());
tradeListParam
.
setExt_cod_fee
(
BigDecimal
.
ZERO
);
tradeListParam
.
setOther_amount
(
BigDecimal
.
ZERO
);
tradeListParam
.
setPaid
(
orderVo
.
getPriceActual
(
));
tradeListParam
.
setPaid
(
priceA
.
add
(
orderVo
.
getPriceExpress
()
));
tradeListParam
.
setWarehouse_no
(
warehouseNo
);
if
(
erpHosting
==
1
)
{
listOrder
.
add
(
tradeListParam
);
...
...
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