Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-fb
Overview
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
王衍超
cloud-fb
Commits
60fee84a
Commit
60fee84a
authored
Apr 22, 2021
by
shiwenbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
库存查询对接今日砂价
parent
96d28b03
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
build.gradle
backend/xyst.dinas.sales/build.gradle
+1
-0
InventoryServiceImpl.java
...st/dinas/sales/internal/service/InventoryServiceImpl.java
+19
-2
No files found.
backend/xyst.dinas.sales/build.gradle
View file @
60fee84a
...
@@ -21,6 +21,7 @@ dependencies {
...
@@ -21,6 +21,7 @@ dependencies {
compile
project
(
":inz.basis"
)
compile
project
(
":inz.basis"
)
compile
project
(
":xyst.dinas.biz"
)
compile
project
(
":xyst.dinas.biz"
)
compile
project
(
":xyst.dinas.contract"
)
compile
project
(
":xyst.dinas.contract"
)
compile
project
(
":xyst.dinas.price"
)
testCompile
lib
.
amino_boot_web
testCompile
lib
.
amino_boot_web
...
...
backend/xyst.dinas.sales/src/main/java/com/xyst/dinas/sales/internal/service/InventoryServiceImpl.java
View file @
60fee84a
...
@@ -6,6 +6,7 @@ import java.util.ArrayList;
...
@@ -6,6 +6,7 @@ import java.util.ArrayList;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.UUID
;
import
java.util.UUID
;
import
java.util.stream.Collectors
;
import
javax.transaction.Transactional
;
import
javax.transaction.Transactional
;
...
@@ -25,6 +26,8 @@ import com.beecode.inz.basis.team.pojo.ResponseObj;
...
@@ -25,6 +26,8 @@ import com.beecode.inz.basis.team.pojo.ResponseObj;
import
com.xyst.dinas.biz.service.DinasOrganizationService
;
import
com.xyst.dinas.biz.service.DinasOrganizationService
;
import
com.xyst.dinas.biz.service.DinasTypeService
;
import
com.xyst.dinas.biz.service.DinasTypeService
;
import
com.xyst.dinas.biz.service.StationService
;
import
com.xyst.dinas.biz.service.StationService
;
import
com.xyst.dinas.price.entity.StationDinasTypePriceDetail
;
import
com.xyst.dinas.price.service.PriceAdjustmentService
;
import
com.xyst.dinas.sales.constant.InventoryConstant
;
import
com.xyst.dinas.sales.constant.InventoryConstant
;
import
com.xyst.dinas.sales.dao.InventoryDao
;
import
com.xyst.dinas.sales.dao.InventoryDao
;
import
com.xyst.dinas.sales.entity.InventoryLog
;
import
com.xyst.dinas.sales.entity.InventoryLog
;
...
@@ -43,6 +46,9 @@ public class InventoryServiceImpl implements InventoryService {
...
@@ -43,6 +46,9 @@ public class InventoryServiceImpl implements InventoryService {
public
DinasOrganizationService
dinasOrganizationService
;
public
DinasOrganizationService
dinasOrganizationService
;
@Autowired
@Autowired
public
PriceAdjustmentService
priceAdjustmentService
;
@Autowired
public
LogService
logService
;
public
LogService
logService
;
@Autowired
@Autowired
...
@@ -195,9 +201,20 @@ public class InventoryServiceImpl implements InventoryService {
...
@@ -195,9 +201,20 @@ public class InventoryServiceImpl implements InventoryService {
//根据场站查砂石类型改成根据区域公司查砂石类型,默认每个场站都会卖这些砂石类型,把对应关系全部维护起来。
//根据场站查砂石类型改成根据区域公司查砂石类型,默认每个场站都会卖这些砂石类型,把对应关系全部维护起来。
List
<
KObject
>
dinasTypeList
=
dinasTypeService
.
getByRegionalCompanyId
(
regionalCompany
);
List
<
KObject
>
dinasTypeList
=
dinasTypeService
.
getByRegionalCompanyId
(
regionalCompany
);
for
(
KObject
station
:
stationList
)
{
for
(
KObject
station
:
stationList
)
{
//TODO:带出今日砂价
List
<
StationDinasTypePriceDetail
>
priceList
=
priceAdjustmentService
.
getNewDetailListByStation
(
station
.
getUuid
(
"id"
));
for
(
KObject
dinasType
:
dinasTypeList
)
{
for
(
KObject
dinasType
:
dinasTypeList
)
{
StationDinasTypeRelation
item
=
new
StationDinasTypeRelation
(
station
.
getUuid
(
"id"
),
dinasType
.
getUuid
(
"id"
),
new
BigDecimal
(
0
));
List
<
StationDinasTypePriceDetail
>
price
=
null
;
StationDinasTypeRelation
item
=
null
;
if
(
priceList
!=
null
)
{
price
=
priceList
.
stream
().
filter
(
StationDinasTypePriceDetail
->
StationDinasTypePriceDetail
.
getDinasTypeId
().
equals
(
dinasType
.
getUuid
(
"id"
))
&&
StationDinasTypePriceDetail
.
getStationId
().
equals
(
station
.
getUuid
(
"id"
))
).
collect
(
Collectors
.
toList
());
if
(
price
.
size
()
>
0
)
{
item
=
new
StationDinasTypeRelation
(
station
.
getUuid
(
"id"
),
dinasType
.
getUuid
(
"id"
),
price
.
get
(
0
).
getDinasPrice
());
}
else
{
item
=
new
StationDinasTypeRelation
(
station
.
getUuid
(
"id"
),
dinasType
.
getUuid
(
"id"
),
new
BigDecimal
(
0
));
}
}
else
{
item
=
new
StationDinasTypeRelation
(
station
.
getUuid
(
"id"
),
dinasType
.
getUuid
(
"id"
),
new
BigDecimal
(
0
));
}
relation
.
add
(
item
);
relation
.
add
(
item
);
}
}
}
}
...
...
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