Browse Source

[feat]

1、优化预警统计

(cherry picked from commit 919f31f10c)
pull/1/head
杨威 3 months ago
parent
commit
725b6a3de1
  1. 18
      dk-modules/business/src/main/java/org/dromara/business/controller/BusinessAlertStatisticsController.java
  2. 2
      dk-modules/business/src/main/java/org/dromara/business/domain/BusinessTask.java
  3. 2
      dk-modules/business/src/main/java/org/dromara/business/domain/bo/BusinessAlertBo.java
  4. 4
      dk-modules/business/src/main/java/org/dromara/business/service/IBusinessAlertService.java
  5. 2
      dk-modules/business/src/main/java/org/dromara/business/service/IBusinessAlertStatisticsService.java
  6. 94
      dk-modules/business/src/main/java/org/dromara/business/service/impl/BusinessAlertServiceImpl.java
  7. 80
      dk-modules/business/src/main/java/org/dromara/business/service/impl/BusinessAlertStatisticsServiceImpl.java
  8. 77
      dk-modules/business/src/main/resources/mapper/business/BusinessAlertMapper.xml

18
dk-modules/business/src/main/java/org/dromara/business/controller/BusinessAlertStatisticsController.java

@ -101,7 +101,7 @@ public class BusinessAlertStatisticsController extends BaseController {
* @param businessAlertBo * @param businessAlertBo
* @return * @return
*/ */
@Operation(summary="综治管理-资规/农水/环保(高发分析)/住建(高发分析)", description="综治管理-资规/农水/环保(高发分析)/住建(高发分析)") @Operation(summary="综治管理-资规/农水/环保(高发分析)/住建(高发分析)(参数:postCode)", description="综治管理-资规/农水/环保(高发分析)/住建(高发分析)")
@GetMapping(value = "/comprehensive/manage") @GetMapping(value = "/comprehensive/manage")
public R<Map<String,Object>> comprehensiveManage(BusinessAlertBo businessAlertBo) { public R<Map<String,Object>> comprehensiveManage(BusinessAlertBo businessAlertBo) {
return R.ok(statisticsService.comprehensiveManage(businessAlertBo)); return R.ok(statisticsService.comprehensiveManage(businessAlertBo));
@ -114,7 +114,7 @@ public class BusinessAlertStatisticsController extends BaseController {
*/ */
@Operation(summary="预警信息-资规/农水", description="预警信息-资规/农水") @Operation(summary="预警信息-资规/农水", description="预警信息-资规/农水")
@GetMapping(value = "/alert/list") @GetMapping(value = "/alert/list")
public R<List<Map<String,Object>>> listAlert(BusinessAlertBo businessAlertBo) { public R<Map<String,Object>> listAlert(BusinessAlertBo businessAlertBo) {
return R.ok(businessAlertService.listAlert(businessAlertBo)); return R.ok(businessAlertService.listAlert(businessAlertBo));
} }
@ -124,9 +124,9 @@ public class BusinessAlertStatisticsController extends BaseController {
* @param businessAlertBo * @param businessAlertBo
* @return * @return
*/ */
@Operation(summary="综治管理-城管/环保(事件处理情况)/住建(事件处理情况)", description="综治管理-城管/环保(事件处理情况)/住建(事件处理情况)") @Operation(summary="综治管理-城管/环保(事件处理情况)/住建(事件处理情况)(参数:postCode、aiName)", description="综治管理-城管/环保(事件处理情况)/住建(事件处理情况)")
@GetMapping(value = "/city/comprehensive/manage") @GetMapping(value = "/city/comprehensive/manage")
public R<List<Map<String,Object>>> cityComprehensiveManage(BusinessAlertBo businessAlertBo) { public R<Map<String,Object>> cityComprehensiveManage(BusinessAlertBo businessAlertBo) {
return R.ok(statisticsService.cityComprehensiveManage(businessAlertBo)); return R.ok(statisticsService.cityComprehensiveManage(businessAlertBo));
} }
@ -138,19 +138,11 @@ public class BusinessAlertStatisticsController extends BaseController {
*/ */
@Operation(summary="预警信息-城管/环保/住建", description="预警信息-城管/环保/住建") @Operation(summary="预警信息-城管/环保/住建", description="预警信息-城管/环保/住建")
@GetMapping(value = "/city/alert/list") @GetMapping(value = "/city/alert/list")
public R<List<Map<String,Object>>> cityListAlert(BusinessAlertBo businessAlertBo) { public R<Map<String, Object>> cityListAlert(BusinessAlertBo businessAlertBo) {
return R.ok(businessAlertService.cityListAlert(businessAlertBo)); return R.ok(businessAlertService.cityListAlert(businessAlertBo));
} }
//饼图显示每个月根据部门 //饼图显示每个月根据部门
@Operation(summary="根据月份显示预警个数", description="根据月份显示预警个数") @Operation(summary="根据月份显示预警个数", description="根据月份显示预警个数")
@GetMapping(value = "/month/count") @GetMapping(value = "/month/count")

2
dk-modules/business/src/main/java/org/dromara/business/domain/BusinessTask.java

@ -63,7 +63,7 @@ public class BusinessTask extends BaseEntity {
private String deptName; private String deptName;
private String waylineId; private String waylineId;
private String fileName; private String waylineName;
private String jobName; private String jobName;
private String jobId; private String jobId;

2
dk-modules/business/src/main/java/org/dromara/business/domain/bo/BusinessAlertBo.java

@ -239,4 +239,6 @@ public class BusinessAlertBo {
private String endTime; private String endTime;
private String aiName;
} }

4
dk-modules/business/src/main/java/org/dromara/business/service/IBusinessAlertService.java

@ -69,9 +69,9 @@ public interface IBusinessAlertService {
TableDataInfo<BusinessAlert> getInfo(BusinessAlertBo bo, PageQuery pageQuery, String alertCode); TableDataInfo<BusinessAlert> getInfo(BusinessAlertBo bo, PageQuery pageQuery, String alertCode);
List<Map<String,Object>> listAlert(BusinessAlertBo businessAlertBo); Map<String,Object> listAlert(BusinessAlertBo businessAlertBo);
List<Map<String, Object>> cityListAlert(BusinessAlertBo businessAlertBo); Map<String, Object> cityListAlert(BusinessAlertBo businessAlertBo);
List<BusinessAlertVo> listVerifyAlert(RemoteBusinessAlertBo businessAlertBo); List<BusinessAlertVo> listVerifyAlert(RemoteBusinessAlertBo businessAlertBo);

2
dk-modules/business/src/main/java/org/dromara/business/service/IBusinessAlertStatisticsService.java

@ -34,5 +34,5 @@ public interface IBusinessAlertStatisticsService {
Map<String, Object> comprehensiveManage(BusinessAlertBo businessAlertBo); Map<String, Object> comprehensiveManage(BusinessAlertBo businessAlertBo);
List<Map<String,Object>> cityComprehensiveManage(BusinessAlertBo businessAlertBo); Map<String,Object> cityComprehensiveManage(BusinessAlertBo businessAlertBo);
} }

94
dk-modules/business/src/main/java/org/dromara/business/service/impl/BusinessAlertServiceImpl.java

@ -1,6 +1,7 @@
package org.dromara.business.service.impl; package org.dromara.business.service.impl;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -317,71 +318,56 @@ public class BusinessAlertServiceImpl implements IBusinessAlertService {
@Override @Override
public List<Map<String,Object>> listAlert(BusinessAlertBo businessAlertBo) { public Map<String,Object> listAlert(BusinessAlertBo businessAlertBo) {
List<Map<String,Object>> resultList = new ArrayList<>(); Map<String,Object> result = new HashMap<>();
//生成近一周开始时间、结束时间 //生成近一周开始时间、结束时间
List<String> dayList = getLastSixDays(); List<String> dayList = getLastSixDays();
String startTime = dayList.get(dayList.size() - 1); String startTime = dayList.get(dayList.size() - 1);
String endTime = dayList.get(0); String endTime = dayList.get(0);
result.put("date", startTime + "~" + endTime);
//查看的是总览的预警信息 //查看的是总览的预警信息
if (ObjectUtil.isEmpty(businessAlertBo.getPostCode())) { if (ObjectUtil.isEmpty(businessAlertBo.getPostCode())) {
Map<String,Object> result = new HashMap<>();
result.put("date", startTime + "~" + endTime);
result.put("list",this.baseMapper.listAlert(businessAlertBo,startTime,endTime)); result.put("list",this.baseMapper.listAlert(businessAlertBo,startTime,endTime));
resultList.add(result); return result;
return resultList;
} }
//不是空的话查看是对应各局的 //不是空的话查看是对应各局的
List<RemoteAiLabelPostVo> postVoList = remoteLablePostService.selectLabelByList(businessAlertBo.getPostCode(), LoginHelper.getDeptId()); businessAlertBo.setAiLabelEnList(List.of(businessAlertBo.getLabelEn()));
postVoList.forEach(postVo -> {
Map<String,Object> labelResult = new HashMap<>();
Map<String,Object> result = new HashMap<>();
businessAlertBo.setAiLabelEnList(List.of(postVo.getLabelEn()));
Map<String,Object> handlerMap = new HashMap<>(); Map<String,Object> handlerMap = new HashMap<>();
List<BusinessAlert> alertList = this.baseMapper.listAlert(businessAlertBo, startTime, endTime); List<BusinessAlert> alertList = this.baseMapper.listAlert(businessAlertBo, startTime, endTime);
handlerMap.put("total",alertList.size()); handlerMap.put("total",alertList.size());
handlerMap.put("finishCount",ObjectUtil.isEmpty(alertList)?0:alertList.stream().filter(p-> p.getHandleType().equalsIgnoreCase(BusinessStatusEnum.FINISH.getStatus())).count()); handlerMap.put("finishCount",ObjectUtil.isEmpty(alertList)?0:alertList.stream().filter(p-> p.getHandleType().equalsIgnoreCase(BusinessStatusEnum.FINISH.getStatus())).count());
handlerMap.put("todoCount",ObjectUtil.isEmpty(alertList)?0:alertList.stream().filter(p-> p.getHandleType().equalsIgnoreCase(BusinessStatusEnum.WAITING.getStatus())).count()); handlerMap.put("todoCount",ObjectUtil.isEmpty(alertList)?0:alertList.stream().filter(p-> p.getHandleType().equalsIgnoreCase(BusinessStatusEnum.WAITING.getStatus())).count());
handlerMap.put("cancelCount",ObjectUtil.isEmpty(alertList)?0:alertList.stream().filter(p-> p.getHandleType().equalsIgnoreCase(BusinessStatusEnum.CANCEL.getStatus())).count()); handlerMap.put("cancelCount",ObjectUtil.isEmpty(alertList)?0:alertList.stream().filter(p-> p.getHandleType().equalsIgnoreCase(BusinessStatusEnum.CANCEL.getStatus())).count());
result.put("panel",handlerMap); result.put("panel",handlerMap);
result.put("list",alertList); result.put("list",alertList);
result.put("date", startTime + "~" + endTime); return result;
labelResult.put(postVo.getLabelCn(),result);
resultList.add(labelResult);
});
return resultList;
} }
@Override @Override
public List<Map<String, Object>> cityListAlert(BusinessAlertBo businessAlertBo) { public Map<String, Object> cityListAlert(BusinessAlertBo businessAlertBo) {
List<Map<String,Object>> resultList = new ArrayList<>(); if (ObjectUtil.hasEmpty(businessAlertBo.getPostCode(),businessAlertBo.getAiName())) {
throw new ServiceException("参数为空!");
}
Map<String,Object> infoMap = new HashMap<>();
//生成近一周开始时间、结束时间 //生成近一周开始时间、结束时间
List<String> dayList = getLastSixDays(); List<String> dayList = getLastSixDays();
String startTime = dayList.get(dayList.size() - 1); String startTime = dayList.get(dayList.size() - 1);
String endTime = dayList.get(0); String endTime = dayList.get(0);
infoMap.put("date", startTime + "~" + endTime);
//不是空的话查看是对应各局的 //不是空的话查看是对应各局的
List<RemoteAiLabelPostVo> postVoList = remoteLablePostService.selectLabelByList(businessAlertBo.getPostCode(), LoginHelper.getDeptId()); List<RemoteAiLabelPostVo> postVoList = remoteLablePostService.selectLabelByList(businessAlertBo.getPostCode(), LoginHelper.getDeptId());
@ -389,36 +375,30 @@ public class BusinessAlertServiceImpl implements IBusinessAlertService {
Map<String, List<RemoteAiLabelPostVo>> aiNameMap = postVoList.stream().collect(Collectors.groupingBy(RemoteAiLabelPostVo::getAiName)); Map<String, List<RemoteAiLabelPostVo>> aiNameMap = postVoList.stream().collect(Collectors.groupingBy(RemoteAiLabelPostVo::getAiName));
if (ObjectUtil.isEmpty(postVoList)){ if (ObjectUtil.isEmpty(postVoList)){
return resultList; infoMap.put("panel",Map.of());
}
aiNameMap.keySet().forEach(key -> { infoMap.put("list", ListUtil.empty());
Map<String,Object> result = new HashMap<>();
Map<String,Object> infoMap = new HashMap<>(); return infoMap;
}
businessAlertBo.setAiLabelEnList(aiNameMap.get(key).stream().map(RemoteAiLabelPostVo::getLabelEn).distinct().toList());
List<BusinessAlert> alertList = this.baseMapper.listAlert(businessAlertBo, startTime, endTime);
Map<String, Integer> labelCnMap = alertList.stream() businessAlertBo.setAiLabelEnList(aiNameMap.get(businessAlertBo.getAiName()).stream().map(RemoteAiLabelPostVo::getLabelEn).distinct().toList());
.collect(Collectors.groupingBy(
BusinessAlert::getLabelCn,
Collectors.summingInt(e -> 1)
));
infoMap.put("panel",labelCnMap); List<BusinessAlert> alertList = this.baseMapper.listAlert(businessAlertBo, startTime, endTime);
infoMap.put("list",alertList); Map<String, Integer> labelCnMap = alertList.stream()
.collect(Collectors.groupingBy(
BusinessAlert::getLabelEn,
Collectors.summingInt(e -> 1)
));
infoMap.put("date", startTime + "~" + endTime); infoMap.put("panel",labelCnMap);
result.put(key,infoMap); infoMap.put("list",alertList);
resultList.add(result);
});
return resultList; return infoMap;
} }
@Override @Override

80
dk-modules/business/src/main/java/org/dromara/business/service/impl/BusinessAlertStatisticsServiceImpl.java

@ -29,7 +29,6 @@ import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream;
import static org.dromara.common.core.constant.Constants.FLY_ACC_TIME; import static org.dromara.common.core.constant.Constants.FLY_ACC_TIME;
import static org.dromara.common.core.constant.Constants.FLY_COUNT; import static org.dromara.common.core.constant.Constants.FLY_COUNT;
@ -579,13 +578,11 @@ public class BusinessAlertStatisticsServiceImpl implements IBusinessAlertStatist
} }
@Override @Override
public List<Map<String,Object>> cityComprehensiveManage(BusinessAlertBo businessAlertBo) { public Map<String,Object> cityComprehensiveManage(BusinessAlertBo businessAlertBo) {
if (ObjectUtil.isEmpty(businessAlertBo.getPostCode())) { if (ObjectUtil.hasEmpty(businessAlertBo.getPostCode(),businessAlertBo.getAiName())) {
throw new ServiceException("【postCode】 岗位编码为空!"); throw new ServiceException("【参数为空!】");
} }
List<Map<String,Object>> resultList = new ArrayList<>();
//-------------------------------------------------------条件构建-------------------------------------------- //-------------------------------------------------------条件构建--------------------------------------------
List<RemoteAiLabelPostVo> postVoList = remoteLabelPostService.selectLabelByList(businessAlertBo.getPostCode(), LoginHelper.getDeptId()); List<RemoteAiLabelPostVo> postVoList = remoteLabelPostService.selectLabelByList(businessAlertBo.getPostCode(), LoginHelper.getDeptId());
@ -600,68 +597,59 @@ public class BusinessAlertStatisticsServiceImpl implements IBusinessAlertStatist
if (ObjectUtil.isEmpty(postVoList)) { if (ObjectUtil.isEmpty(postVoList)) {
return ListUtil.empty(); return Map.of();
} }
aiNameMap.keySet().forEach(key -> { Map<String,Object> keyMap = new HashMap<>();
Map<String,Object> result = new HashMap<>();
Map<String,Object> keyMap = new HashMap<>();
//-------------------------------------------------------事件处理情况--------------------------------------------
List<String> aiLabelList = aiNameMap.get(key).stream().map(RemoteAiLabelPostVo::getLabelEn).distinct().toList(); //-------------------------------------------------------事件处理情况--------------------------------------------
businessAlertBo.setAiLabelEnList(aiLabelList); List<String> aiLabelList = aiNameMap.get(businessAlertBo.getAiName()).stream().map(RemoteAiLabelPostVo::getLabelEn).distinct().toList();
businessAlertBo.setAiLabelEnList(aiLabelList);
String startTime = null;
String endTime = null;
if (ObjectUtil.isEmpty(businessAlertBo.getDateType())){
Map<String,String> dateMap = getStartTimeAndEndTime(0);
startTime = dateMap.get("startTime");
endTime = dateMap.get("endTime");
}else {
Map<String,String> dateMap = getStartTimeAndEndTime(businessAlertBo.getDateType());
startTime = dateMap.get("startTime");
endTime = dateMap.get("endTime");
}
String startTime = null;
String endTime = null;
List<Map<String,Object>> labelMapList = this.baseMapper.countAiLabel(businessAlertBo,startTime,endTime); if (ObjectUtil.isEmpty(businessAlertBo.getDateType())){
Map<String,String> dateMap = getStartTimeAndEndTime(0);
startTime = dateMap.get("startTime");
endTime = dateMap.get("endTime");
}else {
Map<String,String> dateMap = getStartTimeAndEndTime(businessAlertBo.getDateType());
startTime = dateMap.get("startTime");
endTime = dateMap.get("endTime");
}
List<StatObj> incidentHandlerStatStat = new ArrayList<>();
labelMapList.forEach(map -> { List<Map<String,Object>> labelMapList = this.baseMapper.countAiLabel(businessAlertBo,startTime,endTime);
incidentHandlerStatStat.add(new StatObj(map.get("labelCn").toString(),map.get("total")));
});
keyMap.put("incidentHandlerStat", incidentHandlerStatStat); List<StatObj> incidentHandlerStatStat = new ArrayList<>();
labelMapList.forEach(map -> {
incidentHandlerStatStat.add(new StatObj(map.get("labelCn").toString(),map.get("total")));
});
//-------------------------------------------------------事件高发区-------------------------------------------- keyMap.put("incidentHandlerStat", incidentHandlerStatStat);
//事件高发区top1
Map<String,Object> topStreet = this.baseMapper.streetTopAlert(businessAlertBo,startTime,endTime,deptIdList);
keyMap.put("incidentTop1",ObjectUtil.isEmpty(topStreet)?null:topStreet.get("deptName")); //-------------------------------------------------------事件高发区--------------------------------------------
//-------------------------------------------------------处理效率-------------------------------------------- //事件高发区top1
//处理效率top1 Map<String,Object> topStreet = this.baseMapper.streetTopAlert(businessAlertBo,startTime,endTime,deptIdList);
Map<String,Object> topStreetRate = this.baseMapper.streetRateTopAlert(businessAlertBo,startTime,endTime,deptIdList);
keyMap.put("handlerRateTop1", ObjectUtil.isEmpty(topStreetRate)?null:topStreetRate.get("deptName")); keyMap.put("incidentTop1",ObjectUtil.isEmpty(topStreet)?null:topStreet.get("deptName"));
//-------------------------------------------------------处理效率--------------------------------------------
//处理效率top1
Map<String,Object> topStreetRate = this.baseMapper.streetRateTopAlert(businessAlertBo,startTime,endTime,deptIdList);
//-------------------------------------------------------存储结果-------------------------------------------- keyMap.put("handlerRateTop1", ObjectUtil.isEmpty(topStreetRate)?null:topStreetRate.get("deptName"));
result.put(key, keyMap);
resultList.add(result);
});
return resultList; return keyMap;
} }
/** /**

77
dk-modules/business/src/main/resources/mapper/business/BusinessAlertMapper.xml

@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
b.business_id businessId, b.business_id businessId,
b.id instanceId b.id instanceId
from dk_business.business_alert ba from dk_business.business_alert ba
left join dk_workflow.flow_instance b on ba.id = b.business_id) t INNER join dk_workflow.flow_instance b on ba.id = b.business_id) t
${ew.getCustomSqlSegment} ${ew.getCustomSqlSegment}
</select> </select>
@ -461,16 +461,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="countAiLabel" resultType="java.util.Map"> <select id="countAiLabel" resultType="java.util.Map">
select WITH warning_summary AS (
COUNT(DISTINCT ba.id) AS total, SELECT al.label_cn, al.label_en
ba.label_cn labelCn, FROM dk_cloud.ai_label al where al.label_en in
ba.label_en labelEn <foreach collection="param.aiLabelEnList" item="item" open="(" close=")" separator=",">
from business_alert ba #{item}
where 1=1 </foreach>
)
SELECT
ws.label_cn AS labelCn,
ws.label_en AS labelEn,
COALESCE(COUNT(DISTINCT ba.id), 0) AS total
FROM
warning_summary ws
LEFT JOIN business_alert ba ON ws.label_en = ba.label_en
WHERE
1=1
and ba.handle_type != 'verify'
and <![CDATA[ DATE_FORMAT(ba.create_time, '%Y-%m-%d') >= #{startTime} ]]> and <![CDATA[ DATE_FORMAT(ba.create_time, '%Y-%m-%d') >= #{startTime} ]]>
and <![CDATA[ DATE_FORMAT(ba.create_time, '%Y-%m-%d') <= #{endTime} ]]> and <![CDATA[ DATE_FORMAT(ba.create_time, '%Y-%m-%d') <= #{endTime} ]]>
<include refid="searchSql"></include> and ws.label_en in
group by ba.label_cn,ba.label_en <foreach collection="param.aiLabelEnList" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
GROUP BY
ws.label_cn,
ws.label_en
</select> </select>
<select id="countStreetAlert" resultType="java.util.Map"> <select id="countStreetAlert" resultType="java.util.Map">
@ -687,34 +703,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="countLabelRateAlert" resultType="java.util.Map"> <select id="countLabelRateAlert" resultType="java.util.Map">
WITH warning_summary AS ( WITH warning_summary AS (
SELECT al.label_cn, al.label_en FROM dk_cloud.ai_label al WHERE al.label_en IN SELECT
al.label_cn,
al.label_en
FROM
dk_cloud.ai_label al
WHERE
al.label_en IN
<foreach collection="param.aiLabelEnList" item="item" open="(" close=")" separator=","> <foreach collection="param.aiLabelEnList" item="item" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
) )
SELECT SELECT
label_cn AS labelCn, ws.label_cn AS labelCn,
label_en AS labelEn, ws.label_en AS labelEn,
avg_duration AS avgInfo COALESCE(ROUND(
FROM ( SUM(
SELECT TIMESTAMPDIFF(HOUR, ba.create_time, ba.complete_date)
dt.label_cn, ) / COUNT(ba.id)
dt.label_en, ), 0) AS avgInfo
ROUND( FROM
SUM(TIMESTAMPDIFF(HOUR, ba.create_time, ba.complete_date)) warning_summary ws
/ COUNT(ba.id) LEFT JOIN business_alert ba ON ws.label_en = ba.label_en
) AS avg_duration where
FROM business_alert ba 1=1
JOIN warning_summary dt
ON ba.label_en = dt.label_en
WHERE 1=1
and ba.handle_type = 'finish' and ba.handle_type = 'finish'
and <![CDATA[ DATE_FORMAT(ba.create_time, '%Y-%m-%d') >= #{startTime} ]]> and <![CDATA[ DATE_FORMAT(ba.create_time, '%Y-%m-%d') >= #{startTime} ]]>
and <![CDATA[ DATE_FORMAT(ba.create_time, '%Y-%m-%d') <= #{endTime} ]]> and <![CDATA[ DATE_FORMAT(ba.create_time, '%Y-%m-%d') <= #{endTime} ]]>
<include refid="searchSql"></include> <include refid="searchSql"></include>
GROUP BY dt.label_en, dt.label_cn GROUP BY
) label_stats ws.label_en,
ORDER BY avgInfo DESC ws.label_cn
ORDER BY
avgInfo DESC
</select> </select>

Loading…
Cancel
Save