Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-link-module-bi
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-link-module-bi
Commits
3e75da50
提交
3e75da50
authored
2月 10, 2025
作者:
吕本才
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1、增加店铺筛选,
2、增加多线程优化
上级
33f9deec
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
47 行增加
和
166 行删除
+47
-166
IFinanceOrderDetailDao.java
...n/java/com/link/bi/domain/dao/IFinanceOrderDetailDao.java
+2
-2
FinanceOrderDetail.java
...in/java/com/link/bi/domain/entity/FinanceOrderDetail.java
+0
-137
FinanceCostVo.java
src/main/java/com/link/bi/pojo/request/FinanceCostVo.java
+4
-0
FinanceOrderDetailServiceImpl.java
...m/link/bi/service/impl/FinanceOrderDetailServiceImpl.java
+0
-0
FinanceOrderDetailMapper.xml
src/main/resources/mapper/bi/FinanceOrderDetailMapper.xml
+41
-27
没有找到文件。
src/main/java/com/link/bi/domain/dao/IFinanceOrderDetailDao.java
浏览文件 @
3e75da50
...
...
@@ -11,7 +11,7 @@ import com.link.bi.domain.wq.FinanceCostWq;
*/
public
interface
IFinanceOrderDetailDao
{
PageInfo
<
FinanceOrderDetail
>
selectBiFinanceCostList
(
FinanceCostWq
qw
);
PageInfo
<
FinanceOrderDetail
>
selectBiFinanceCostList
(
FinanceCostWq
wq
);
PageInfo
<
FinanceOrderDetail
>
selectBiFinanceCostDetailList
(
FinanceCostWq
qw
);
PageInfo
<
FinanceOrderDetail
>
selectBiFinanceCostDetailList
(
FinanceCostWq
wq
);
}
src/main/java/com/link/bi/domain/entity/FinanceOrderDetail.java
浏览文件 @
3e75da50
...
...
@@ -5,13 +5,9 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
org.apache.commons.lang3.ObjectUtils
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Map
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
/**
* 旺店通订单明细表 wangdiantong_order_detail
...
...
@@ -290,142 +286,9 @@ public class FinanceOrderDetail {
@TableField
(
exist
=
false
)
private
String
queryType
;
/**
* 是否删除标志0未删除1已删除
*/
private
String
delFlag
;
public
String
getFenxiaoId
(
FinanceOrder
order
,
Long
tradeId
)
{
// 如果不为空,解析出
if
(
ObjectUtils
.
isNotEmpty
(
order
.
getFenxiaoNick
()))
{
String
id
=
extractDistributorId
(
order
.
getFenxiaoNick
());
return
id
;
}
return
""
;
}
/**
* 从输入字符串中提取分销商 ID
*
* @param input 包含分销商 ID 的字符串
* @return 提取出的分销商 ID,如果未找到则返回空字符串
*/
public
String
extractDistributorId
(
String
input
)
{
// 使用正则表达式匹配id
Pattern
pattern
=
Pattern
.
compile
(
"id:(\\d+);"
);
Matcher
matcher
=
pattern
.
matcher
(
input
);
if
(
matcher
.
find
())
{
return
matcher
.
group
(
1
);
}
return
""
;
}
public
String
extractDistributorName
(
String
input
)
{
// 使用正则表达式匹配逗号后面的字符
Pattern
pattern
=
Pattern
.
compile
(
";(.*)】"
);
Matcher
matcher
=
pattern
.
matcher
(
input
);
if
(
matcher
.
find
())
{
return
matcher
.
group
(
1
);
}
return
""
;
}
/**
* 根据订单和交易 ID 获取分销商名称
*
* @param order 订单
* @param tradeId 交易 ID
* @return 分销商名称,如果未找到则返回空字符串
*/
public
String
getFenxiaoName
(
FinanceOrder
order
,
Long
tradeId
)
{
// 如果不为空,解析出
if
(
ObjectUtils
.
isNotEmpty
(
order
.
getFenxiaoNick
()))
{
String
id
=
extractDistributorName
(
order
.
getFenxiaoNick
());
return
id
;
}
return
""
;
}
public
String
getFenxiaoNick
(
FinanceOrder
order
)
{
return
order
.
getFenxiaoNick
();
}
public
String
extractByRegex
(
String
input
,
String
regex
)
{
// 使用正则表达式匹配逗号后面的字符
Pattern
pattern
=
Pattern
.
compile
(
regex
);
Matcher
matcher
=
pattern
.
matcher
(
input
);
if
(
matcher
.
find
())
{
return
matcher
.
group
(
1
);
}
return
""
;
}
public
String
getZbjName
(
String
remark
,
FinanceOrderDetail
sameDetail
)
{
if
(
ObjectUtils
.
isNotEmpty
(
sameDetail
)
&&
ObjectUtils
.
isNotEmpty
(
sameDetail
.
getZbjName
()))
{
return
sameDetail
.
getZbjName
();
}
// 如果不为空,解析出
if
(
ObjectUtils
.
isNotEmpty
(
remark
)
&&
remark
.
contains
(
"直播"
))
{
return
extractByRegex
(
remark
,
"“【直播】”([^;;]*)"
);
}
return
null
;
}
public
String
getZbjId
(
String
remark
,
FinanceOrderDetail
sameDetail
)
{
if
(
ObjectUtils
.
isNotEmpty
(
sameDetail
)
&&
ObjectUtils
.
isNotEmpty
(
sameDetail
.
getZbjId
()))
{
return
sameDetail
.
getZbjId
();
}
// 如果不为空,解析出
if
(
ObjectUtils
.
isNotEmpty
(
remark
)
&&
remark
.
contains
(
"直播间id"
))
{
return
extractByRegex
(
remark
,
"直播间id:([^;;]\\d+)"
);
}
return
null
;
}
/**
* 根据分销商和remark备注信息获取主播Id
* @param fenxiaoId
* @param remark
* @param sameDetail
* @return
*/
public
String
getZbjZbId
(
String
fenxiaoId
,
String
remark
,
FinanceOrderDetail
sameDetail
)
{
if
(
ObjectUtils
.
isNotEmpty
(
fenxiaoId
))
{
return
fenxiaoId
;
}
if
(
ObjectUtils
.
isNotEmpty
(
sameDetail
)
&&
ObjectUtils
.
isNotEmpty
(
sameDetail
.
getZbjZbId
()))
{
return
sameDetail
.
getZbjZbId
();
}
// 如果不为空,解析出
if
(
ObjectUtils
.
isNotEmpty
(
remark
)
&&
remark
.
contains
(
"主播id"
))
{
return
extractByRegex
(
remark
,
"主播id:([^;;]\\d+)"
);
}
return
null
;
}
public
String
getZbjSaleType
(
String
remark
,
FinanceOrderDetail
sameDetail
)
{
if
(
ObjectUtils
.
isNotEmpty
(
sameDetail
)
&&
ObjectUtils
.
isNotEmpty
(
sameDetail
.
getZbjSaleType
()))
{
return
sameDetail
.
getZbjSaleType
();
}
// 如果不为空,解析出
if
(
ObjectUtils
.
isNotEmpty
(
remark
)
&&
remark
.
contains
(
"销售类型:"
))
{
return
extractByRegex
(
remark
,
"销售类型:([^;;]*);"
);
}
return
null
;
}
public
String
getZbjQdType
(
String
fenxiaoId
,
String
zbjZbId
,
Map
<
String
,
String
>
baseZbjType
)
{
if
(
ObjectUtils
.
isNotEmpty
(
fenxiaoId
))
{
zbjZbId
=
fenxiaoId
;
}
String
zbjType
=
baseZbjType
.
get
(
zbjZbId
);
if
(
ObjectUtils
.
isNotEmpty
(
zbjZbId
)
&&
ObjectUtils
.
isEmpty
(
zbjType
))
{
return
baseZbjType
.
get
(
"其他分销名称"
);
}
return
zbjType
;
}
}
src/main/java/com/link/bi/pojo/request/FinanceCostVo.java
浏览文件 @
3e75da50
...
...
@@ -7,6 +7,10 @@ import java.util.List;
@Data
public
class
FinanceCostVo
{
// 平台id
private
String
platformId
;
// 商铺
private
List
<
String
>
shopNo
;
// 入参 分页当前页
private
Integer
pageNum
=
1
;
...
...
src/main/java/com/link/bi/service/impl/FinanceOrderDetailServiceImpl.java
浏览文件 @
3e75da50
差异被折叠。
点击展开。
src/main/resources/mapper/bi/FinanceOrderDetailMapper.xml
浏览文件 @
3e75da50
...
...
@@ -6,29 +6,29 @@
<!-- 根据 聚合类型和值 查询聚合记录 -->
<select
id=
"selectBiFinanceCostList"
resultMap=
"BaseResultMap"
>
select
<if
test=
" (wq.zbjQdType == null or wq.zbjQdType.isEmpty() )
and (wq.goodsName== null or wq.goodsName.isEmpty() )
and (wq.specName== null or wq.specName.isEmpty() )
and (wq.flavor== null or wq.flavor.isEmpty() )
and (wq.series== null or wq.series.isEmpty() ) "
>
zbj_qd_type,
</if
>
<if
test=
"wq.zbjQdType!= null and !wq.zbjQdType.isEmpty() "
>
zbj_qd_type,
<!-- <if test=" (wq.zbjQdType == null or wq.zbjQdType.isEmpty() )-->
<!-- and (wq.goodsName== null or wq.goodsName.isEmpty() )-->
<!-- and (wq.specName== null or wq.specName.isEmpty() )-->
<!-- and (wq.flavor== null or wq.flavor.isEmpty() )-->
<!-- and (wq.series== null or wq.series.isEmpty() ) ">--
>
<!-- zbj_qd_type,-->
<!-- </if>--
>
zbj_qd_type,
<if
test=
"wq.zbjQdType!= null and !wq.zbjQdType.isEmpty() "
>
<if
test=
"wq.subType!= null and wq.subType == 0 "
>
fenxiao_id, fenxiao_name,
</if>
</if>
<if
test=
"
wq.goodsName!= null and !wq.goodsName.isEmpty()
"
>
<if
test=
"
(wq.goodsName!= null and !wq.goodsName.isEmpty() ) or wq.goodsNameAll == true
"
>
goods_no,goods_name,
</if>
<if
test=
"
wq.specName!= null and !wq.specName.isEmpty()
"
>
<if
test=
"
(wq.specName!= null and !wq.specName.isEmpty() ) or wq.specNameAll == true
"
>
spec_name_erp,
</if>
<if
test=
"
wq.flavor!= null and !wq.flavor.isEmpty()
"
>
<if
test=
"
(wq.flavor!= null and !wq.flavor.isEmpty() ) or wq.flavorAll == true
"
>
flavor_erp,
</if>
<if
test=
"
wq.series!= null and !wq.series.isEmpty()
"
>
<if
test=
"
(wq.series!= null and !wq.series.isEmpty() ) or wq.seriesAll == true
"
>
series,
<if
test=
"wq.subType!= null and wq.subType == 0 "
>
goods_no,goods_name,
...
...
@@ -39,6 +39,7 @@
sum(sum_standard_cost) as sum_standard_cost_sum
from finance_order_detail fod
<where>
shop_no IN ( '016', '070', '091')
<if
test=
"(wq.zbjQdTypeAll == null or wq.zbjQdTypeAll == false) and (wq.zbjQdType!= null and !wq.zbjQdType.isEmpty() )"
>
and fod.zbj_qd_type in
<foreach
collection=
"wq.zbjQdType"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
...
...
@@ -77,33 +78,44 @@
</where>
group by
<trim
suffixOverrides=
","
suffix=
""
>
<if
test=
" (wq.zbjQdType == null or wq.zbjQdType .isEmpty() )
and (wq.goodsName== null or wq.goodsName.isEmpty() )
and (wq.specName== null or wq.specName.isEmpty() )
and (wq.flavor== null or wq.flavor.isEmpty() )
and (wq.series== null or wq.series.isEmpty() ) "
>
zbj_qd_type,
</if>
zbj_qd_type,
<if
test=
"wq.zbjQdType!= null and !wq.zbjQdType.isEmpty() "
>
zbj_qd_type,
<if
test=
"wq.subType!= null and wq.subType == 0 "
>
fenxiao_id, fenxiao_name,
</if>
</if>
<if
test=
"
wq.goodsName!= null and !wq.goodsName.isEmpty()
"
>
<if
test=
"
(wq.goodsName!= null and !wq.goodsName.isEmpty()) or wq.goodsNameAll == true
"
>
goods_no ,goods_name,
</if>
<if
test=
"
wq.specName!= null and !wq.specName.isEmpty()
"
>
<if
test=
"
(wq.specName!= null and !wq.specName.isEmpty()) or wq.specNameAll == true
"
>
spec_name_erp,
</if>
<if
test=
"
wq.flavor!= null and !wq.flavor.isEmpty()
"
>
<if
test=
"
(wq.flavor!= null and !wq.flavor.isEmpty()) or wq.flavorAll == true
"
>
flavor_erp,
</if>
<if
test=
"
wq.series!= null and !wq.series.isEmpty()
"
>
<if
test=
"
(wq.series!= null and !wq.series.isEmpty() ) or wq.seriesAll == true
"
>
series,
</if>
</trim>
order by
<trim
suffixOverrides=
","
suffix=
""
>
<if
test=
" (wq.zbjQdType == null or wq.zbjQdType .isEmpty() )
and (wq.goodsName== null or wq.goodsName.isEmpty() )
and (wq.specName== null or wq.specName.isEmpty() )
and (wq.flavor== null or wq.flavor.isEmpty() )
and (wq.series== null or wq.series.isEmpty() ) "
>
zbj_qd_type desc,
</if>
<if
test=
"wq.zbjQdType!= null and !wq.zbjQdType.isEmpty() "
>
zbj_qd_type desc,
<if
test=
"wq.subType!= null and wq.subType == 0 "
>
fenxiao_id desc ,
</if>
</if>
<if
test=
"(wq.flavor!= null and !wq.flavor.isEmpty()) or wq.flavorAll == true "
>
flavor_erp desc,
</if>
</trim>
</select>
<!-- 根据 类型和聚合的值 查询详情记录 -->
...
...
@@ -112,12 +124,14 @@
<include
refid=
"Base_Column_List"
/>
from finance_order_detail fod
<where>
shop_no IN ( '016', '070', '091')
<if
test=
"wq.startDate!= null "
>
and fod.consign_time between #{wq.startDate} and #{wq.endDate}
</if>
<if
test=
"wq.fenxiaoId!= null and wq.fenxiaoId!='' "
>
and fod.fenxiao_id
= #{wq.fenxiaoId}
and fod.fenxiao_id = #{wq.fenxiaoId}
</if>
<if
test=
"wq.zbjQdType!= null and !wq.zbjQdType.isEmpty() "
>
and fod.zbj_qd_type in
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论