fix:团队统计修改
This commit is contained in:
parent
7b4395761c
commit
28e51137c5
|
|
@ -20,7 +20,6 @@ import com.ruoyi.ai.domain.AiVideoReportData;
|
|||
import com.ruoyi.ai.service.IAiVideoReportDataService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
|
||||
/**
|
||||
* AI视频生成统计数据,作为其他统计报的数据源Controller
|
||||
|
|
@ -42,10 +41,6 @@ public class AiVideoReportDataController extends BaseController
|
|||
@GetMapping("/list")
|
||||
public TableDataInfo list(AiVideoReportData aiVideoReportData)
|
||||
{
|
||||
if (StringUtils.isEmpty(aiVideoReportData.getStatDate()) || aiVideoReportData.getDeptId() == null)
|
||||
{
|
||||
return getDataTable(java.util.Collections.emptyList());
|
||||
}
|
||||
startPage();
|
||||
List<AiVideoReportData> list = aiVideoReportDataService.selectTeamDailyConsumeList(
|
||||
aiVideoReportData.getStatDate(), aiVideoReportData.getDeptId());
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="selectTeamDailyConsumeList" resultMap="AiVideoReportDataResult">
|
||||
select
|
||||
concat(substr(vrd.date_key, 1, 4), '-', substr(vrd.date_key, 5, 2), '-', substr(vrd.date_key, 7, 2)) as date_key,
|
||||
concat(substr(substr(vrd.date_key, 1, 8), 1, 4), '-', substr(substr(vrd.date_key, 1, 8), 5, 2), '-', substr(substr(vrd.date_key, 1, 8), 7, 2)) as date_key,
|
||||
vrd.dept_id,
|
||||
d.dept_name,
|
||||
sum(vrd.recharge_score) as recharge_score,
|
||||
|
|
@ -93,8 +93,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
sum(vrd.use_tokens) as use_tokens
|
||||
from ai_video_report_data vrd
|
||||
left join sys_dept d on d.dept_id = vrd.dept_id
|
||||
where vrd.date_key like concat(#{statDate}, '%')
|
||||
<where>
|
||||
<if test="statDate != null and statDate != ''">
|
||||
and vrd.date_key like concat(#{statDate}, '%')
|
||||
</if>
|
||||
<if test="deptId != null">
|
||||
and vrd.dept_id = #{deptId}
|
||||
</if>
|
||||
</where>
|
||||
group by substr(vrd.date_key, 1, 8), vrd.dept_id, d.dept_name
|
||||
order by substr(vrd.date_key, 1, 8) desc, vrd.dept_id desc
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue