Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-api-boot-master
Commits
6511ebe3
Commit
6511ebe3
authored
Jun 26, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-06-26提交
parent
185caeff
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
99 additions
and
17 deletions
+99
-17
CustomerAnalysisReq.java
...der/yudao/module/delivery/entity/CustomerAnalysisReq.java
+5
-1
CustomerAnalysisImpl.java
...ao/module/delivery/service/Impl/CustomerAnalysisImpl.java
+19
-2
CustomerAnalysisMapper.xml
...rest/src/main/resources/mapper/CustomerAnalysisMapper.xml
+9
-3
WarehouseServiceImpl.java
...pository/service/warehouse/impl/WarehouseServiceImpl.java
+2
-1
WarehouseController.java
...itory/controller/admin/warehouse/WarehouseController.java
+11
-3
ProductPriceExcelExportListener.java
...ule/product/listener/ProductPriceExcelExportListener.java
+2
-1
ProductPriceServiceImpl.java
...product/service/product/impl/ProductPriceServiceImpl.java
+15
-6
ProductPricePageReqVO.java
...module/product/vo/productPrice/ProductPricePageReqVO.java
+6
-0
ProductPriceMapper.xml
.../src/main/resources/mapper/product/ProductPriceMapper.xml
+30
-0
No files found.
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/CustomerAnalysisReq.java
View file @
6511ebe3
...
...
@@ -18,6 +18,10 @@ import java.util.List;
@ToString
(
callSuper
=
true
)
public
class
CustomerAnalysisReq
extends
PageParam
{
private
String
orderfield
;
//排序字段
private
String
ordertype
;
//排序方式
private
int
start
;
private
int
size
;
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/service/Impl/CustomerAnalysisImpl.java
View file @
6511ebe3
...
...
@@ -160,6 +160,24 @@ public class CustomerAnalysisImpl implements CustomerAnalysisService {
对查询逻辑做处理 lanbm 2024-04-16 add
*/
public
CustomerAnalysisReq
getReq
(
CustomerAnalysisReq
Req
)
{
//处理排序问题
if
(
Req
.
getOrderfield
()
==
null
||
Req
.
getOrderfield
().
length
()
==
0
)
{
Req
.
setOrderfield
(
"allsumvolume"
);
Req
.
setOrdertype
(
"desc"
);
}
else
{
if
(
Req
.
getOrderfield
().
equals
(
"sumvolumeV1"
)==
true
)
{
Req
.
setOrderfield
(
"sumvolume1"
);
}
}
if
(
Req
.
getOrdertype
()
!=
null
&&
Req
.
getOrdertype
().
equals
(
"descending"
)==
true
)
{
Req
.
setOrdertype
(
"desc"
);
}
else
{
Req
.
setOrdertype
(
"asc"
);
}
//计算月份差
long
lc
=
monthDiff
(
Req
.
getSdate
(),
Req
.
getEdate
());
if
(
lc
==
0
)
{
...
...
@@ -231,8 +249,7 @@ public class CustomerAnalysisImpl implements CustomerAnalysisService {
/*
设置部门多选
*/
private
void
setDept
(
CustomerAnalysisReq
Req
)
{
private
void
setDept
(
CustomerAnalysisReq
Req
)
{
if
(
Req
.
getDeptid
()
!=
null
&&
Req
.
getDeptid
().
size
()
>
0
)
{
if
(
Req
.
getDeptid
().
size
()
==
1
)
{
Req
.
setDeptidstr
(
Req
.
getDeptid
().
get
(
0
).
toString
());
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/resources/mapper/CustomerAnalysisMapper.xml
View file @
6511ebe3
...
...
@@ -58,7 +58,13 @@
)
select * from dataTJ
<include
refid=
"WherePage2"
/>
order by allsumvolume desc,number desc
<if
test=
"orderfield!=null and orderfield!=''
and ordertype!=null and ordertype!=''"
>
order by ${orderfield} ${ordertype}
</if>
limit #{start},#{size}
</select>
...
...
@@ -198,8 +204,8 @@
and c.customer_service in ${salesmanidstrs}
</if>
<if
test=
"deptid
!=null and deptid
!=''"
>
and u_d.dept_id= #{deptid}
<if
test=
"deptid
str!=null and deptidstr
!=''"
>
and u_d.dept_id= #{deptid
str
}
</if>
<if
test=
"deptidstrs!=null and deptidstrs!=''"
>
and u_d.dept_id in ${deptidstrs}
...
...
yudao-module-depository/yudao-module-depository-core/src/main/java/cn/iocoder/yudao/module/depository/service/warehouse/impl/WarehouseServiceImpl.java
View file @
6511ebe3
...
...
@@ -532,7 +532,8 @@ public class WarehouseServiceImpl implements WarehouseService {
if
(
regionId
.
equals
(
""
))
{
return
new
ArrayList
();
}
List
<
WarehouseTreeRegionVO
>
list
=
warehouseMapper
.
getRegionList
(
type
,
regionId
,
destCountryId
,
objectiveId
,
destWarehouseId
);
List
<
WarehouseTreeRegionVO
>
list
=
warehouseMapper
.
getRegionList
(
type
,
regionId
,
destCountryId
,
objectiveId
,
destWarehouseId
);
return
list
;
}
}
yudao-module-depository/yudao-module-depository-rest/src/main/java/cn/iocoder/yudao/module/depository/controller/admin/warehouse/WarehouseController.java
View file @
6511ebe3
...
...
@@ -101,9 +101,17 @@ public class WarehouseController {
}
@GetMapping
(
"/getRegionList"
)
public
CommonResult
<
List
<
WarehouseTreeRegionVO
>>
getRegionList
(
@RequestParam
(
value
=
"type"
,
required
=
false
)
Integer
type
,
String
regionId
,
String
destCountryId
,
String
objectiveId
,
String
destWarehouseId
){
List
<
WarehouseTreeRegionVO
>
list
=
warehouseService
.
getRegionList
(
type
,
regionId
,
destCountryId
,
objectiveId
,
destWarehouseId
);
public
CommonResult
<
List
<
WarehouseTreeRegionVO
>>
getRegionList
(
@RequestParam
(
value
=
"type"
,
required
=
false
)
Integer
type
,
String
regionId
,
String
destCountryId
,
String
objectiveId
,
String
destWarehouseId
){
List
<
WarehouseTreeRegionVO
>
list
=
warehouseService
.
getRegionList
(
type
,
regionId
,
destCountryId
,
objectiveId
,
destWarehouseId
);
return
success
(
list
);
}
...
...
yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/listener/ProductPriceExcelExportListener.java
View file @
6511ebe3
...
...
@@ -110,7 +110,8 @@ public class ProductPriceExcelExportListener {
//先定义一个空集合每次循环使他变成null减少内存的占用
int
start
=
(
i
-
1
)
*
pageSize
;
int
end
=
i
*
pageSize
;
List
<
ProductPriceExcelData
>
list
=
productPriceService
.
getExcelList
(
pageSize
,
maxId
,
exportReqVO
);
List
<
ProductPriceExcelData
>
list
=
productPriceService
.
getExcelList
(
pageSize
,
maxId
,
exportReqVO
);
log
.
error
(
"路线价格数据{}-{}处理成功"
,
start
,
end
);
if
(
CollectionUtil
.
isEmpty
(
list
))
continue
;
maxId
=
list
.
get
(
list
.
size
()
-
1
).
getId
();
...
...
yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/service/product/impl/ProductPriceServiceImpl.java
View file @
6511ebe3
...
...
@@ -1757,21 +1757,27 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
@Override
public
void
matchLineAndProduct
(
List
<
ProductPriceRespVO
>
list
)
{
if
(
CollectionUtil
.
isNotEmpty
(
list
))
{
//线路ID
List
<
Long
>
lineIdList
=
list
.
stream
()
.
map
(
ProductPriceBaseVO:
:
getWarehouseLineId
)
.
collect
(
Collectors
.
toList
());
List
<
WarehouseLineDO
>
lineDOList
=
warehouseService
.
selectBylineIdList
(
lineIdList
);
List
<
WarehouseLineDO
>
lineDOList
=
warehouseService
.
selectBylineIdList
(
lineIdList
);
//产品ID
List
<
Long
>
productIdList
=
list
.
stream
()
.
map
(
ProductPriceBaseVO:
:
getProductId
)
.
collect
(
Collectors
.
toList
());
List
<
ProductDO
>
productDOList
=
productService
.
getProductList
(
productIdList
);
Map
<
Long
,
ProductDO
>
productMap
=
productDOList
.
stream
()
.
collect
(
Collectors
.
toMap
(
ProductDO:
:
getId
,
(
v
->
v
),
(
v1
,
v2
)
->
v2
));
.
collect
(
Collectors
.
toMap
(
ProductDO:
:
getId
,
(
v
->
v
),
(
v1
,
v2
)
->
v2
));
Map
<
Long
,
WarehouseLineDO
>
lineMap
=
lineDOList
.
stream
()
.
collect
(
Collectors
.
toMap
(
WarehouseLineDO:
:
getId
,
(
v
->
v
),
(
v1
,
v2
)
->
v2
));
.
collect
(
Collectors
.
toMap
(
WarehouseLineDO:
:
getId
,
(
v
->
v
),
(
v1
,
v2
)
->
v2
));
list
.
forEach
(
t
->
{
t
.
setWarehouseLineDO
(
lineMap
.
get
(
t
.
getWarehouseLineId
()));
t
.
setProductDO
(
productMap
.
get
(
t
.
getProductId
()));
...
...
@@ -1787,17 +1793,20 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
@Override
public
List
<
ProductPriceExcelData
>
getExcelList
(
int
pageSize
,
Long
maxId
,
ProductPricePageReqVO
params
)
{
List
<
ProductPriceExcelData
>
list
=
baseMapper
.
getExcelList
(
pageSize
,
maxId
,
params
);
List
<
ProductPriceExcelData
>
list
=
baseMapper
.
getExcelList
(
pageSize
,
maxId
,
params
);
if
(
CollectionUtil
.
isNotEmpty
(
list
))
{
List
<
Long
>
idList
=
list
.
stream
()
.
map
(
ProductPriceExcelData:
:
getId
)
.
collect
(
Collectors
.
toList
());
List
<
ProductPriceSpecialDO
>
specialList
=
productPriceSpecialService
.
getProductPriceSpecialList
(
idList
);
List
<
ProductPriceSpecialDO
>
specialList
=
productPriceSpecialService
.
getProductPriceSpecialList
(
idList
);
Map
<
Long
,
List
<
ProductPriceSpecialDO
>>
specialMap
=
specialList
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
ProductPriceSpecialDO:
:
getProductPriceId
));
List
<
ProductPriceStepDO
>
stepList
=
productPriceStepService
.
getProductPriceStepList
(
idList
);
List
<
ProductPriceStepDO
>
stepList
=
productPriceStepService
.
getProductPriceStepList
(
idList
);
List
<
Long
>
stepIdList
=
stepList
.
stream
()
.
map
(
ProductPriceStepDO:
:
getId
)
.
collect
(
toList
());
...
...
yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/vo/productPrice/ProductPricePageReqVO.java
View file @
6511ebe3
...
...
@@ -100,6 +100,12 @@ public class ProductPricePageReqVO extends PageParam {
@ApiModelProperty
(
value
=
"运输方式"
)
private
String
transportType
;
@ApiModelProperty
(
value
=
"国家"
)
private
Long
destCountryId
;
@ApiModelProperty
(
value
=
"目的仓"
)
private
Long
destWarehouseId
;
@ApiModelProperty
(
value
=
"商品编码"
)
private
String
productCode
;
@ApiModelProperty
(
value
=
"海关编码"
)
...
...
yudao-module-product/yudao-module-product-core/src/main/resources/mapper/product/ProductPriceMapper.xml
View file @
6511ebe3
...
...
@@ -23,6 +23,7 @@
AND ep.deleted = 0
AND FIND_IN_SET(ewl.transport_type, ew_start.freight)>0
AND FIND_IN_SET(ewl.transport_type, ew_dest.freight)>0
<if
test=
"params.productCode != null and params.productCode !=''"
>
and ep.product_code like CONCAT('%',#{params.productCode},'%')
</if>
...
...
@@ -112,6 +113,15 @@
and ew_dest.shi = #{params.destCityId}
</if>
<!--目的国-->
<if
test=
"params.destCountryId != null"
>
and ew_dest.guojia=#{params.destCountryId}
</if>
<!--目的仓-->
<if
test=
"params.destWarehouseId != null"
>
and ew_dest.id=#{params.destWarehouseId}
</if>
<if
test=
"params.blacklist != null"
>
and epp.blacklist = #{params.blacklist}
</if>
...
...
@@ -268,6 +278,16 @@
<if
test=
"params.destCityId != null"
>
and ew_dest.shi = #{params.destCityId}
</if>
<!--目的国-->
<if
test=
"params.destCountryId != null"
>
and ew_dest.guojia=#{params.destCountryId}
</if>
<!--目的仓-->
<if
test=
"params.destWarehouseId != null"
>
and ew_dest.id=#{params.destWarehouseId}
</if>
<if
test=
"params.blacklist != null"
>
and epp.blacklist = #{params.blacklist}
</if>
...
...
@@ -387,6 +407,16 @@
<if
test=
"params.destCityId != null"
>
and ew_dest.shi = #{params.destCityId}
</if>
<!--目的国-->
<if
test=
"params.destCountryId != null"
>
and ew_dest.guojia=#{params.destCountryId}
</if>
<!--目的仓-->
<if
test=
"params.destWarehouseId != null"
>
and ew_dest.id=#{params.destWarehouseId}
</if>
<if
test=
"params.blacklist != null"
>
and epp.blacklist = #{params.blacklist}
</if>
...
...
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