Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cocktail-party-server
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
cocktail-party
cocktail-party-server
Commits
06a9e71e
提交
06a9e71e
authored
10月 23, 2025
作者:
吕本才
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1、全国经销商的达成率
上级
8aa034b3
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
52 行增加
和
8 行删除
+52
-8
DealerBigScreenController.java
...uoyi/web/controller/dealer/DealerBigScreenController.java
+1
-1
Constants.java
...on/src/main/java/com/ruoyi/common/constant/Constants.java
+4
-1
DealerResult.java
...m/src/main/java/com/ruoyi/dealer/domain/DealerResult.java
+1
-1
IDealerRoundResultService.java
...a/com/ruoyi/dealer/service/IDealerRoundResultService.java
+2
-0
DealerBaseInfoImpl.java
...ava/com/ruoyi/dealer/service/impl/DealerBaseInfoImpl.java
+4
-5
DealerRoundResultServiceImpl.java
...oyi/dealer/service/impl/DealerRoundResultServiceImpl.java
+40
-0
没有找到文件。
ruoyi-admin/src/main/java/com/ruoyi/web/controller/dealer/DealerBigScreenController.java
浏览文件 @
06a9e71e
...
...
@@ -94,7 +94,7 @@ public class DealerBigScreenController extends BaseController {
@GetMapping
(
"/result/quanguoResult"
)
public
AjaxResult
quanguoResult
()
{
DealerBigScreenTotalResultRes
res
=
resultService
.
total
Result
();
DealerBigScreenTotalResultRes
res
=
resultService
.
quanguo
Result
();
return
success
(
res
);
}
...
...
ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java
浏览文件 @
06a9e71e
package
com
.
ruoyi
.
common
.
constant
;
import
java.util.Locale
;
import
io.jsonwebtoken.Claims
;
import
java.util.Locale
;
/**
* 通用常量信息
*
...
...
@@ -172,4 +173,6 @@ public class Constants
"org.springframework"
,
"org.apache"
,
"com.ruoyi.common.utils.file"
,
"com.ruoyi.common.config"
,
"com.ruoyi.generator"
};
public
static
final
String
DEALER_ROUND
=
"dealer.round"
;
public
static
final
String
DEALER_ROUND_OVER
=
"dealer.round.over"
;
public
static
final
String
TOTAL_WEIDAO
=
"total.weidao"
;
public
static
final
String
TOTAL_QUANGUO_GOAL
=
"total.goal"
;
}
ruoyi-system/src/main/java/com/ruoyi/dealer/domain/DealerResult.java
浏览文件 @
06a9e71e
...
...
@@ -49,7 +49,7 @@ public class DealerResult {
*/
// @Excel(name = "经销商分组")
// private String groupName;
@Excel
(
name
=
"经销商目标"
)
@Excel
(
name
=
"经销商目标"
,
scale
=
4
)
private
Integer
goalTtlAct
;
/**
* 预付款达成的百分比
...
...
ruoyi-system/src/main/java/com/ruoyi/dealer/service/IDealerRoundResultService.java
浏览文件 @
06a9e71e
...
...
@@ -28,4 +28,6 @@ public interface IDealerRoundResultService extends IService<DealerRoundResult> {
void
downloadExcel
(
HttpServletResponse
response
,
String
group
);
List
<
DealerBigScreenRewardResultRes
>
getRewardList
(
String
groupType
,
Integer
ranking
,
String
groupName
);
DealerBigScreenTotalResultRes
quanguoResult
();
}
ruoyi-system/src/main/java/com/ruoyi/dealer/service/impl/DealerBaseInfoImpl.java
浏览文件 @
06a9e71e
...
...
@@ -10,7 +10,6 @@ import com.ruoyi.dealer.domain.DealerBaseInfo;
import
com.ruoyi.dealer.domain.DealerRoundResult
;
import
com.ruoyi.dealer.domain.dto.WechatDealerRoundInfoRes
;
import
com.ruoyi.dealer.mapper.DealerBaseInfoMapper
;
import
com.ruoyi.dealer.service.DealerRoundInfoService
;
import
com.ruoyi.dealer.service.IDealerBaseInfoService
;
import
com.ruoyi.dealer.service.IDealerRoundResultService
;
import
com.ruoyi.system.service.ISysConfigService
;
...
...
@@ -29,10 +28,10 @@ import java.util.List;
*/
@Service
public
class
DealerBaseInfoImpl
extends
ServiceImpl
<
DealerBaseInfoMapper
,
DealerBaseInfo
>
implements
IDealerBaseInfoService
{
@Autowired
private
DealerBaseInfoMapper
dealerBaseInfoMapper
;
@Autowired
private
DealerRoundInfoService
dealerRoundInfoService
;
//
@Autowired
//
private DealerBaseInfoMapper dealerBaseInfoMapper;
//
@Autowired
//
private DealerRoundInfoService dealerRoundInfoService;
@Autowired
private
IDealerRoundResultService
resultService
;
@Autowired
...
...
ruoyi-system/src/main/java/com/ruoyi/dealer/service/impl/DealerRoundResultServiceImpl.java
浏览文件 @
06a9e71e
...
...
@@ -7,6 +7,7 @@ import cn.hutool.core.util.ZipUtil;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.constant.Constants
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.dealer.domain.DealerBaseInfo
;
import
com.ruoyi.dealer.domain.DealerResult
;
...
...
@@ -18,6 +19,7 @@ import com.ruoyi.dealer.service.DealerRoundInfoService;
import
com.ruoyi.dealer.service.IDealerBaseInfoService
;
import
com.ruoyi.dealer.service.IDealerResultService
;
import
com.ruoyi.dealer.service.IDealerRoundResultService
;
import
com.ruoyi.system.service.ISysConfigService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -45,6 +47,8 @@ public class DealerRoundResultServiceImpl extends ServiceImpl<DealerRoundResultM
private
IDealerResultService
resultService
;
@Autowired
private
DealerRoundInfoService
roundInfoService
;
@Autowired
private
ISysConfigService
configService
;
/**
* 大屏 个人分组查询
...
...
@@ -341,6 +345,42 @@ public class DealerRoundResultServiceImpl extends ServiceImpl<DealerRoundResultM
}
}
@Override
public
DealerBigScreenTotalResultRes
quanguoResult
()
{
DealerBigScreenTotalResultRes
res
=
null
;
DealerResult
total
=
resultService
.
getOne
(
new
LambdaQueryWrapper
<
DealerResult
>()
.
eq
(
DealerResult:
:
getSalesRegionGroupName
,
"total"
)
);
if
(
ObjectUtil
.
isNotEmpty
(
total
))
{
res
=
new
DealerBigScreenTotalResultRes
();
res
.
setPaymentTtl
(
total
.
getPaymentTtl
());
res
.
setGoalTtlAct
(
total
.
getGoalTtlAct
());
res
.
setPaymentPercentage
(
new
BigDecimal
(
res
.
getPaymentTtl
())
.
multiply
(
new
BigDecimal
(
100
))
.
divide
(
new
BigDecimal
(
res
.
getGoalTtlAct
()),
2
,
RoundingMode
.
HALF_UP
)
.
toPlainString
()
+
"%"
);
}
else
{
List
<
DealerBigScreenTotalResultRes
>
roundResults
=
this
.
baseMapper
.
getTotalResult
();
res
=
roundResults
.
get
(
0
);
res
.
setPaymentPercentage
(
new
BigDecimal
(
res
.
getPaymentTtl
())
.
multiply
(
new
BigDecimal
(
100
))
.
divide
(
new
BigDecimal
(
res
.
getGoalTtlAct
()),
2
,
RoundingMode
.
HALF_UP
)
.
toPlainString
()
+
"%"
);
}
String
totalWeidao
=
configService
.
selectConfigByKeyFromDb
(
Constants
.
TOTAL_WEIDAO
);
Integer
totalWeidaoInt
=
Integer
.
parseInt
(
totalWeidao
);
String
totalQuanguoGoal
=
configService
.
selectConfigByKeyFromDb
(
Constants
.
TOTAL_QUANGUO_GOAL
);
Integer
totalQuanguoGoalInt
=
Integer
.
parseInt
(
totalQuanguoGoal
);
res
.
setPaymentTtl
(
res
.
getPaymentTtl
()+
totalWeidaoInt
);
res
.
setGoalTtlAct
(
totalQuanguoGoalInt
);
res
.
setPaymentPercentage
(
getPercentage
(
res
.
getPaymentTtl
(),
res
.
getGoalTtlAct
(),
2
)+
"%"
);
return
res
;
}
private
String
getPercentage
(
Integer
paymentTtl
,
Integer
goalTtlAct
,
Integer
scale
)
{
if
(
null
==
paymentTtl
||
null
==
goalTtlAct
)
{
return
"0"
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论