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
ab0de6c0
Commit
ab0de6c0
authored
Apr 29, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-04-29 测试问题修复
parent
f1954200
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
213 additions
and
30 deletions
+213
-30
CustomerAnalysisControl.java
...le/delivery/controller/admin/CustomerAnalysisControl.java
+7
-5
CustomerReportControl.java
...dule/delivery/controller/admin/CustomerReportControl.java
+4
-1
SalesAnalysisControl.java
...odule/delivery/controller/admin/SalesAnalysisControl.java
+74
-8
SalesAnalysisReq.java
...ocoder/yudao/module/delivery/entity/SalesAnalysisReq.java
+22
-4
SalesAnalysisResp.java
...coder/yudao/module/delivery/entity/SalesAnalysisResp.java
+70
-5
CustomerReportMapper.xml
...y-rest/src/main/resources/mapper/CustomerReportMapper.xml
+1
-1
SalesAnalysisMapper.xml
...ry-rest/src/main/resources/mapper/SalesAnalysisMapper.xml
+34
-6
MakeBillOfLadingServiceImpl.java
...service/makeBillOfLading/MakeBillOfLadingServiceImpl.java
+1
-0
No files found.
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/controller/admin/CustomerAnalysisControl.java
View file @
ab0de6c0
...
...
@@ -438,9 +438,10 @@ public class CustomerAnalysisControl {
/*
处理空运数据
*/
private
CustomerAnalysisResp
cal3
(
CustomerAnalysisReq
query
,
CustomerAnalysisResp
r
,
boolean
bZzNull
)
{
String
sTemp
=
""
;
private
CustomerAnalysisResp
cal3
(
CustomerAnalysisReq
query
,
CustomerAnalysisResp
r
,
boolean
bZzNull
)
{
String
sTemp
=
""
;
if
(
bZzNull
==
true
)
{
r
.
setAllsumvolume
(
new
BigDecimal
(
0
));
}
...
...
@@ -448,6 +449,7 @@ public class CustomerAnalysisControl {
//当期值
if
(
r
.
getSumweight3
()
==
null
||
r
.
getSumweight3
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
r
.
setSumweightV3
(
new
BigDecimal
(
0
));
r
.
setSumweight3
(
new
BigDecimal
(
0
));
...
...
@@ -459,7 +461,7 @@ public class CustomerAnalysisControl {
r
.
setAirMothAvg
(
"0"
);
}
}
else
{
r
.
setSumweightV3
(
r
.
getSumweight3
().
multiply
(
new
BigDecimal
(
100
)));
r
.
setSumweightV3
(
r
.
getSumweight3
().
divide
(
new
BigDecimal
(
100
)));
if
(
bZzNull
==
true
)
{
r
.
setAirZb
(
"总值为0"
);
}
else
{
...
...
@@ -478,7 +480,7 @@ public class CustomerAnalysisControl {
r
.
setSumweightTbV3
(
new
BigDecimal
(
0
));
r
.
setSumweightTbShow3
(
"同期值为0"
);
}
else
{
r
.
setSumweightTbV3
(
r
.
getSumweightTb3
().
multiply
(
new
BigDecimal
(
100
)));
r
.
setSumweightTbV3
(
r
.
getSumweightTb3
().
divide
(
new
BigDecimal
(
100
)));
sTemp
=
getPercentage
(
(
r
.
getSumweightV3
().
subtract
(
r
.
getSumweightTbV3
())),
...
...
@@ -625,7 +627,7 @@ public class CustomerAnalysisControl {
PageResult
<
CustomerAnalysisResp
>
pageResult
=
GetDataResult
(
query
);
List
<
CustomerAnalysisResp
>
list
=
pageResult
.
getList
();
List
<
CustomerAnalysisExcelResp
>
listExel
=
List
<
CustomerAnalysisExcelResp
>
listExel
=
CustomerAnalysis
.
INSTANCE
.
convertList
(
list
);
// 导出 Excel
ExcelUtils
.
write
(
response
,
"客户分析报表.xls"
,
"客户分析报表"
,
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/controller/admin/CustomerReportControl.java
View file @
ab0de6c0
...
...
@@ -189,8 +189,11 @@ public class CustomerReportControl {
List
<
String
>
l
=
new
ArrayList
<>();
int
nT
=
1
;
for
(
CustomerReportResp
cr
:
lis
)
{
l
.
add
(
cr
.
getName
());
l
.
add
(
"Top "
+
String
.
valueOf
(
nT
)
+
"_"
+
cr
.
getName
());
//l.add("Top "+String.valueOf(nT));
nT
++;
cr
.
setDuibiYear
(
Req
.
getDuibiYear
());
}
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/controller/admin/SalesAnalysisControl.java
View file @
ab0de6c0
...
...
@@ -46,14 +46,66 @@ public class SalesAnalysisControl {
@Autowired
private
DictDataApi
dictDataApi
;
/*
根据原始信息计算逻辑展示信息 lanbm 2024-04-29 add
*/
private
SalesAnalysisResp
calBis
(
SalesAnalysisResp
r
)
{
String
sTemp
=
""
;
//付款方
if
(
r
.
getDrawee
().
equals
(
"1"
))
{
if
(
r
.
getCfResourceType
().
equals
(
"1"
))
{
r
.
setShowResourceType
(
"开发客户"
);
}
else
if
(
r
.
getCfResourceType
().
equals
(
"2"
))
{
r
.
setShowResourceType
(
"公司客户"
);
}
if
(
r
.
getCfYeJiType
().
equals
(
"0"
))
{
r
.
setShowYeJiType
(
"老客户"
);
}
else
if
(
r
.
getCfYeJiType
().
equals
(
"1"
))
{
r
.
setShowYeJiType
(
"新客户"
);
}
sTemp
=
"发货方"
;
}
else
if
(
r
.
getDrawee
().
equals
(
"2"
))
{
if
(
r
.
getShResourceType
().
equals
(
"1"
))
{
r
.
setShowResourceType
(
"开发客户"
);
}
else
if
(
r
.
getShResourceType
().
equals
(
"2"
))
{
r
.
setShowResourceType
(
"公司客户"
);
}
if
(
r
.
getShYeJitype
().
equals
(
"0"
))
{
r
.
setShowYeJiType
(
"老客户"
);
}
else
if
(
r
.
getShYeJitype
().
equals
(
"1"
))
{
r
.
setShowYeJiType
(
"新客户"
);
}
sTemp
=
"收货方"
;
}
else
if
(
r
.
getDrawee
().
equals
(
"3"
))
{
if
(
r
.
getCfResourceType
().
equals
(
"1"
))
{
r
.
setShowResourceType
(
"开发客户"
);
}
else
if
(
r
.
getCfResourceType
().
equals
(
"2"
))
{
r
.
setShowResourceType
(
"公司客户"
);
}
if
(
r
.
getCfYeJiType
().
equals
(
"0"
))
{
r
.
setShowYeJiType
(
"老客户"
);
}
else
if
(
r
.
getCfYeJiType
().
equals
(
"1"
))
{
r
.
setShowYeJiType
(
"新客户"
);
}
sTemp
=
"自定义"
;
}
r
.
setDraweeName
(
sTemp
);
return
r
;
}
/*
客户分析列表 lanbm 2024-04-02 add
*/
@GetMapping
(
"/getListPage"
)
public
CommonResult
<
PageResult
<
SalesAnalysisResp
>>
getListPage
(
@Valid
SalesAnalysisReq
query
)
{
public
CommonResult
<
PageResult
<
SalesAnalysisResp
>>
getListPage
(
@Valid
SalesAnalysisReq
query
)
{
System
.
out
.
println
(
"订单分析查询条件:"
+
query
);
/*
SalesAnalysisReq query = JSON.parseObject(JSON.toJSONString(map),
SalesAnalysisReq.class);
...
...
@@ -73,6 +125,7 @@ public class SalesAnalysisControl {
salesAnalysisService
.
getListPage
(
query
);
int
nPm
=
query
.
getStart
()
+
1
;
String
sTemp
=
""
;
for
(
SalesAnalysisResp
r
:
pageResult
.
getList
()
)
{
r
.
setPx
(
nPm
);
...
...
@@ -81,14 +134,27 @@ public class SalesAnalysisControl {
//订单状态
r
.
setStatusName
(
map_order_status
.
get
(
r
.
getStatus
()));
if
(
r
.
getTransportId
()
==
"1"
)
r
.
setTransportIdName
(
"海运拼柜"
);
else
if
(
r
.
getTransportId
()
==
"3"
)
r
.
setTransportIdName
(
"专线空运"
);
String
sType
=
""
;
if
(
r
.
getOrdertype
()
==
2
)
{
//是重货,非泡货
sType
=
"是/否"
;
}
else
if
(
r
.
getOrdertype
()
==
3
)
{
sType
=
"否/是"
;
}
else
if
(
r
.
getOrdertype
()
==
1
)
{
sType
=
"普货"
;
}
r
.
setOrdertypeShow
(
sType
);
}
//业务数据逻辑运算
r
=
calBis
(
r
);
if
(
r
.
getUseweightunit
()
==
null
)
r
.
setUseweightunit
(
"无"
);
if
(
r
.
getUsevolumeunit
()
==
null
)
r
.
setUsevolumeunit
(
"无"
);
r
.
setZpUnitShow
(
r
.
getUseweightunit
()
+
"/"
+
r
.
getUsevolumeunit
());
}
return
success
(
pageResult
);
}
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/SalesAnalysisReq.java
View file @
ab0de6c0
...
...
@@ -23,6 +23,7 @@ public class SalesAnalysisReq extends PageParam {
*/
private
int
transportId
;
/*
订单编号查询类型
*/
...
...
@@ -34,9 +35,14 @@ public class SalesAnalysisReq extends PageParam {
/*
提单
编号
提单
的查询类别
*/
private
String
tidanNo
;
private
String
SearchType2
;
/*
提单编号
*/
private
String
tidanNo
;
/*
销售经理
...
...
@@ -51,10 +57,22 @@ public class SalesAnalysisReq extends PageParam {
/*
唛头
*/
private
String
marks
;
private
String
marks
;
/*
是否控货
*/
private
int
isCargoControl
;
private
int
isCargoControl
;
/*
渠道
*/
private
String
shippingChannelId
;
/*
付款方
付款人:1 发货人 2 收货人 3 自定义
*/
private
String
drawee
;
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/SalesAnalysisResp.java
View file @
ab0de6c0
...
...
@@ -19,8 +19,12 @@ public class SalesAnalysisResp {
/*
排名编号
*/
private
int
px
;
private
int
px
;
/*
订单ID
*/
private
String
orderId
;
/*
订单编号
...
...
@@ -53,6 +57,32 @@ public class SalesAnalysisResp {
*/
private
String
orderConsigneeCusId
;
/*
发货人编号
*/
private
String
cfNumber
;
private
long
cfCustomerId
;
/*
收货人编号
*/
private
String
shNumber
;
private
long
shCustomerId
;
/*
资源类型 lanbm 2024-04-29 add
*/
private
String
cfResourceType
;
//发货人资源类型
private
String
shResourceType
;
//收货人资源类型
private
String
showResourceType
;
//显示资源类型,根据付款方来做逻辑判断
/*
业绩类型 新客户,老客户 lanbm 2024-04-29 add
*/
private
String
cfYeJiType
;
//收货人业绩类型
private
String
shYeJitype
;
//发货人业绩类型
private
String
showYeJiType
;
/*
客户经理
*/
...
...
@@ -79,10 +109,12 @@ public class SalesAnalysisResp {
/*
目的国
*/
private
String
muDiGuo
;
/*
目的城市
*/
private
String
muDiShi
;
/*
目的仓
...
...
@@ -92,8 +124,8 @@ public class SalesAnalysisResp {
/*
渠道
*/
private
String
channelid
;
private
String
channelidName
;
private
String
channelid
;
private
String
channelidName
;
/*
唛头
...
...
@@ -113,17 +145,50 @@ public class SalesAnalysisResp {
/*
入仓重量
*/
private
String
sumweight
;
private
String
sumweight
;
/*
是否控货
*/
private
String
iscargocontrol
;
private
String
iscargocontrol
;
/*
订单类型:1 普货 2 重货 3 泡货
*/
private
int
ordertype
;
private
String
ordertypeShow
;
/*
创建时间
*/
private
String
createtime
;
/*
业绩产生时间
*/
private
String
businesstime
;
/*
付款方
付款人:1 发货人 2 收货人 3 自定义
*/
private
String
drawee
;
/*
付款方显示字段
*/
private
String
draweeName
;
/*
计算使用的重货标准基数
*/
private
String
useweightunit
;
/*
计算使用的泡货标准基数
*/
private
String
usevolumeunit
;
private
String
zpUnitShow
;
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/resources/mapper/CustomerReportMapper.xml
View file @
ab0de6c0
...
...
@@ -22,7 +22,7 @@
system_user u LEFT JOIN system_dept d ON u.dept_id = d.id) AS u_d ON c.customer_service = u_d.userid
<include
refid=
"WherePage"
/>
ORDER BY allsumvolume desc
limit 0,
3
0
limit 0,
1
0
</select>
<sql
id=
"WherePage"
>
<where>
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/resources/mapper/SalesAnalysisMapper.xml
View file @
ab0de6c0
...
...
@@ -4,14 +4,24 @@
<select
id=
"getListPage"
parameterType=
"cn.iocoder.yudao.module.delivery.entity.SalesAnalysisReq"
resultType=
"cn.iocoder.yudao.module.delivery.entity.SalesAnalysisResp"
>
select order_no as orderNo, tidan_no as tidanNo,
c.status,salesman_id as salesmanid,transport_id,marks,
w.start_warehouse_name as startwarehousename,
select c.order_id as orderId, order_no as orderNo, tidan_no as tidanNo,
c.status,salesman_id as salesmanid,
(SELECT nickname from system_user where id=c.salesman_id) as salesmanidName,
c.transport_id as transportId,c.drawee,
if(c.transport_id=1,'海运拼柜','专线空运') as transportIdName,
order_type as ordertype,use_weight_unit as useweightunit,
use_volume_unit as usevolumeunit,
marks,w.start_warehouse_name as startwarehousename,
w.dst_warehouse_name as dstwarehousename,w.muDiGuo,w.muDiShi,
c.channel_id as channelid,channel.name_zh as channelidName,
c.create_time as createtime,sum_quantity as sumquantity,
sum_volume as sumvolume,sum_weight as sumweight,
is_cargo_control as iscargocontrol
if(is_cargo_control=0,'否','是') as iscargocontrol,
( if( c.transport_id = 1 , c.load_time, c.rucang_time) ) AS businesstime,
cf.number as fhNumber,sh.number as shNumber,
cf.id as cfCustomerId,sh.id as shCustomerId,
cf.resource_type as cfresourceType,sh.resource_type as shResource_type,
cf.is_new as cfYeJiType,sh.is_new as shYeJitype
from ecw_order c
left join (SELECT ewl.id AS line_id,
ew_start.id AS start_warehouse_id,
...
...
@@ -26,9 +36,14 @@
LEFT JOIN ecw_region r_sdest on ew_dest.shi=r_sdest.id
) w ON w.line_id = c.line_id
left join ecw_channel channel on channel.channel_id =c.channel_id
<!--订单发货人信息-->
left join ecw_order_consignor nor on nor.order_id = c.order_id
left join ecw_customer cf on cf.id=nor.customer_id
<!--订单收货人信息-->
left join ecw_order_consignee nee on nee.order_id = c.order_id
left join ecw_customer sh on sh.id=nee.customer_id
<include
refid=
"WherePage"
/>
ORDER BY c.create_time desc limit #{start}, #{size}
ORDER BY c.create_time asc limit #{start}, #{size}
</select>
<sql
id=
"WherePage"
>
...
...
@@ -43,6 +58,19 @@
and c.order_no= #{orderNo}
</if>
<if
test=
"isCargoControl!=null and isCargoControl!=''"
>
<!--是否控货-->
and c.is_cargo_control= #{isCargoControl}
</if>
<if
test=
"shippingChannelId!=null and shippingChannelId!=''"
>
<!--渠道-->
and c.channel_id= #{shippingChannelId}
</if>
<if
test=
"drawee!=null and drawee!=''"
>
<!--付款方-->
and c.drawee= #{drawee}
</if>
</where>
</sql>
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/makeBillOfLading/MakeBillOfLadingServiceImpl.java
View file @
ab0de6c0
...
...
@@ -445,6 +445,7 @@ public class MakeBillOfLadingServiceImpl extends AbstractService<MakeBillOfLadin
paramMap
.
put
(
"seaFreight"
,
item
.
getOneSeaFreight
()
+
currencyMap
.
get
(
item
.
getSeaFreightCurrency
())
+
"/m³"
);
if
(
item
.
getOneClearanceFreight
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
//paramMap.put("clearanceFreight", "");
//lanbm 2024-04-29 修改为0的显示
paramMap
.
put
(
"clearanceFreight"
,
"0"
+
currencyMap
.
get
(
item
.
getClearanceFreightCurrency
())
+
"/m³"
);
}
else
{
paramMap
.
put
(
"clearanceFreight"
,
item
.
getOneClearanceFreight
()
+
currencyMap
.
get
(
item
.
getClearanceFreightCurrency
())
+
"/m³"
);
...
...
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