mirror of
https://gitee.com/elegant_wings/dbd-meeting.git
synced 2025-06-21 17:09:36 +08:00
部分统计接口
This commit is contained in:
parent
465f392f12
commit
55a34391ad
@ -1,7 +1,9 @@
|
||||
package com.ics.admin.controller;
|
||||
|
||||
import com.ics.admin.domain.RepairFloorStatsVo;
|
||||
import com.ics.admin.domain.RepairWorkerStatsVo;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ics.admin.vo.RepairAdminStatsVo;
|
||||
import com.ics.admin.vo.RepairFloorStatsVo;
|
||||
import com.ics.admin.vo.RepairWorkerStatsVo;
|
||||
import com.ics.admin.service.IRepairService;
|
||||
import com.ics.admin.service.IRepairStatsService;
|
||||
import com.ics.common.core.controller.BaseController;
|
||||
@ -68,4 +70,23 @@ public class RepairStatsController extends BaseController {
|
||||
return result(repairService.floorRepairList(floorerId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 第一行 管理员 工单与 通知统计
|
||||
*/
|
||||
@RequiresPermissions(value = {"repair:manage:operator"})
|
||||
@RequestMapping("repairAdminStats")
|
||||
public R repairAdminStats() {
|
||||
RepairAdminStatsVo repairAdminStatsVo = repairWorkerStatsService.repairAdminStats();
|
||||
return R.ok().put("repairAdminStats", repairAdminStatsVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 第二、三行 工单统计、工单完成情况、评价情况
|
||||
*/
|
||||
@RequiresPermissions(value = {"repair:manage:operator"})
|
||||
@RequestMapping("repairStats")
|
||||
public R repairStats() {
|
||||
return R.ok().put("currentMonth", repairWorkerStatsService.repairStats(true))
|
||||
.put("currentYear", repairWorkerStatsService.repairStats(false));
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +0,0 @@
|
||||
package com.ics.admin.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* created at 2024-8-15 21:46
|
||||
*
|
||||
* @author lujiang
|
||||
* @version 1.0.0
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class RepairStatsByTimeVo implements Serializable {
|
||||
private static final long serialVersionUID = -202408152311L;
|
||||
|
||||
|
||||
}
|
@ -1,9 +1,13 @@
|
||||
package com.ics.admin.mapper;
|
||||
|
||||
import com.ics.admin.domain.RepairFloorStatsVo;
|
||||
import com.ics.admin.domain.RepairWorkerStatsVo;
|
||||
import com.ics.admin.vo.RepairAdminStatsVo;
|
||||
import com.ics.admin.vo.RepairFloorStatsVo;
|
||||
import com.ics.admin.vo.RepairStatsVo;
|
||||
import com.ics.admin.vo.RepairWorkerStatsVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -30,4 +34,16 @@ public interface RepairStatsMapper {
|
||||
* @return VIEW集合
|
||||
*/
|
||||
List<RepairFloorStatsVo> selectRepairFloorStatsVoList(RepairFloorStatsVo repairFloorStatsVo);
|
||||
|
||||
/**
|
||||
* 第一行 管理员 工单与 通知统计
|
||||
* @return
|
||||
*/
|
||||
List<RepairAdminStatsVo> repairAdminStats();
|
||||
|
||||
/**
|
||||
* 第二、三行 工单统计、工单完成情况、评价情况
|
||||
* @return
|
||||
*/
|
||||
List<RepairStatsVo> repairStats(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
|
||||
}
|
||||
|
@ -1,9 +1,13 @@
|
||||
package com.ics.admin.service;
|
||||
|
||||
import com.ics.admin.domain.RepairFloorStatsVo;
|
||||
import com.ics.admin.domain.RepairWorkerStatsVo;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ics.admin.vo.RepairAdminStatsVo;
|
||||
import com.ics.admin.vo.RepairFloorStatsVo;
|
||||
import com.ics.admin.vo.RepairStatsVo;
|
||||
import com.ics.admin.vo.RepairWorkerStatsVo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 维修人员统计接口
|
||||
@ -27,4 +31,15 @@ public interface IRepairStatsService {
|
||||
* @return VIEW集合
|
||||
*/
|
||||
List<RepairFloorStatsVo> selectRepairFloorStatsVoList(RepairFloorStatsVo repairFloorStatsVo);
|
||||
|
||||
/**
|
||||
* 第一行 管理员 工单与 通知统计
|
||||
*/
|
||||
RepairAdminStatsVo repairAdminStats();
|
||||
/**
|
||||
* 第二、三行 工单统计、工单完成情况、评价情况
|
||||
* @param isMonth true 本月,false 本年
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> repairStats(boolean isMonth);
|
||||
}
|
||||
|
@ -1,16 +1,21 @@
|
||||
package com.ics.admin.service.impl;
|
||||
|
||||
import com.ics.admin.domain.RepairFloorStatsVo;
|
||||
import com.ics.admin.domain.RepairWorkerStatsVo;
|
||||
import com.ics.admin.mapper.RepairStatsMapper;
|
||||
import com.ics.admin.service.IRepairStatsService;
|
||||
import com.ics.admin.vo.RepairAdminStatsVo;
|
||||
import com.ics.admin.vo.RepairFloorStatsVo;
|
||||
import com.ics.admin.vo.RepairStatsVo;
|
||||
import com.ics.admin.vo.RepairWorkerStatsVo;
|
||||
import com.ics.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* created at 2024-8-15 20:34
|
||||
@ -46,23 +51,50 @@ public class RepairStatsServiceImpl implements IRepairStatsService {
|
||||
return repairStatsMapper.selectRepairFloorStatsVoList(repairFloorStatsVo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RepairAdminStatsVo repairAdminStats() {
|
||||
List<RepairAdminStatsVo> list = repairStatsMapper.repairAdminStats();
|
||||
if (list != null && list.size() > 0) return list.get(0);
|
||||
return null;
|
||||
}
|
||||
|
||||
//
|
||||
// public void tt() {
|
||||
//// Calendar c = getCalendar(2024, 9);
|
||||
////
|
||||
////
|
||||
//// System.out.println(getDate(c, 1, true));
|
||||
//// System.out.println(getDate(c, 1, false));
|
||||
//// System.out.println(getDate(c, 2, true));
|
||||
//// System.out.println(getDate(c, 2, false));
|
||||
//// System.out.println(getDate(c, 3, true));
|
||||
//// System.out.println(getDate(c, 3, false));
|
||||
// }
|
||||
@Override
|
||||
public Map<String, Object> repairStats(boolean isMonth) {
|
||||
List<RepairStatsVo> list = isMonth ?
|
||||
repairStatsMapper.repairStats(getDate(null, 2, true), getDate(null, 2, false)) :
|
||||
repairStatsMapper.repairStats(getDate(null, 3, true), getDate(null, 3, false));
|
||||
|
||||
if (list == null || list.size() == 0) return null;
|
||||
RepairStatsVo repairStatsVo = list.get(0);
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("status", repairStatsVo);
|
||||
List<Map<String, Object>> wc = new ArrayList<>();
|
||||
wc.add(getMap("已完成", repairStatsVo.getWc()));
|
||||
wc.add(getMap("未完成", repairStatsVo.getZs() - repairStatsVo.getWc()));
|
||||
map.put("wc", wc);
|
||||
List<Map<String, Object>> timeout = new ArrayList<>();
|
||||
timeout.add(getMap("严重超时", repairStatsVo.getHtimeout()));
|
||||
timeout.add(getMap("超时", repairStatsVo.getMtimeout()));
|
||||
timeout.add(getMap("轻微超时", repairStatsVo.getLtimeout()));
|
||||
timeout.add(getMap("未超时", repairStatsVo.getNtimeout()));
|
||||
map.put("timeout", timeout);
|
||||
List<Map<String, Object>> pj = new ArrayList<>();
|
||||
pj.add(getMap("好评", repairStatsVo.getH()));
|
||||
pj.add(getMap("中评", repairStatsVo.getM()));
|
||||
pj.add(getMap("差评", repairStatsVo.getL()));
|
||||
map.put("pj", pj);
|
||||
return map;
|
||||
}
|
||||
|
||||
private Map<String, Object> getMap(String name, Object value) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("name", name);
|
||||
map.put("value", value);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定年月的日历
|
||||
* 获取指定年月的日历 Calendar c = getCalendar(2024, 9);
|
||||
*/
|
||||
private Calendar getCalendar(int year, int month) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
@ -0,0 +1,36 @@
|
||||
package com.ics.admin.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* created at 2024-8-16 22:30
|
||||
*
|
||||
* @author lujiang
|
||||
* @version 1.0.0
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class RepairAdminStatsVo implements Serializable {
|
||||
private static final long serialVersionUID = -202408162231L;
|
||||
|
||||
/**
|
||||
* 待派工单
|
||||
*/
|
||||
private Integer wait;
|
||||
|
||||
/**
|
||||
* 已重新派单
|
||||
*/
|
||||
private Integer anew;
|
||||
/**
|
||||
* 未查看通知
|
||||
*/
|
||||
private Integer newnotice;
|
||||
|
||||
/**
|
||||
* 已查看通知
|
||||
*/
|
||||
private Integer oldnotice;
|
||||
}
|
@ -1,7 +1,9 @@
|
||||
package com.ics.admin.domain;
|
||||
package com.ics.admin.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 对应视图floor_stats
|
||||
* created at 2024-8-15 21:18
|
||||
@ -11,7 +13,7 @@ import lombok.Data;
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class RepairFloorStatsVo {
|
||||
public class RepairFloorStatsVo implements Serializable {
|
||||
private static final long serialVersionUID = -202408152119L;
|
||||
/**
|
||||
* 用户id
|
@ -0,0 +1,79 @@
|
||||
package com.ics.admin.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* created at 2024-8-15 21:46
|
||||
*
|
||||
* @author lujiang
|
||||
* @version 1.0.0
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class RepairStatsVo implements Serializable {
|
||||
private static final long serialVersionUID = -202408152311L;
|
||||
|
||||
/**
|
||||
* 工单总数
|
||||
*/
|
||||
private Integer zs;
|
||||
|
||||
/**
|
||||
* 待维修工单
|
||||
*/
|
||||
private Integer wait;
|
||||
|
||||
/**
|
||||
* 超时量
|
||||
*/
|
||||
private Integer timeout;
|
||||
/**
|
||||
* 评价总数
|
||||
*/
|
||||
@JsonIgnore
|
||||
private Integer pj;
|
||||
|
||||
/**
|
||||
* 好评
|
||||
*/
|
||||
private Integer h;
|
||||
|
||||
/**
|
||||
* 中评
|
||||
*/
|
||||
private Integer m;
|
||||
|
||||
/**
|
||||
* 差评
|
||||
*/
|
||||
private Integer l;
|
||||
|
||||
/**
|
||||
* 已完成
|
||||
*/
|
||||
@JsonIgnore
|
||||
private Integer wc;
|
||||
/**
|
||||
* 严重超时
|
||||
*/
|
||||
@JsonIgnore
|
||||
private Integer htimeout;
|
||||
/**
|
||||
* 超时
|
||||
*/
|
||||
@JsonIgnore
|
||||
private Integer mtimeout;
|
||||
/**
|
||||
* 轻微超时
|
||||
*/
|
||||
@JsonIgnore
|
||||
private Integer ltimeout;
|
||||
/**
|
||||
* 未超时
|
||||
*/
|
||||
@JsonIgnore
|
||||
private Integer ntimeout;
|
||||
}
|
@ -1,197 +0,0 @@
|
||||
package com.ics.admin.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ics.admin.domain.BannerImage;
|
||||
import com.ics.admin.domain.RepairLog;
|
||||
import com.ics.admin.handler.BannerImageHandler;
|
||||
import com.ics.system.domain.vo.UserVO;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报修VO
|
||||
*
|
||||
* @author jack
|
||||
*/
|
||||
@Data
|
||||
public class RepairVO {
|
||||
|
||||
/**
|
||||
* 最大Banner图片数量
|
||||
*/
|
||||
public static final int MAX_REPAIR_IMAGE_SIZE = 4;
|
||||
|
||||
/**
|
||||
* Id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 报修单号
|
||||
*/
|
||||
private String sn;
|
||||
|
||||
/**
|
||||
* 报修人
|
||||
*/
|
||||
private String name;
|
||||
|
||||
private String repairName;
|
||||
|
||||
private String repairLevel;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 报修区域
|
||||
*/
|
||||
private String area;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 状态名称
|
||||
*/
|
||||
private String statusName;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 报修时间
|
||||
*/
|
||||
private Date repairTime;
|
||||
|
||||
/**
|
||||
* 维修费
|
||||
*/
|
||||
private Long repairFee;
|
||||
|
||||
/**
|
||||
* 评价
|
||||
*/
|
||||
private Long repairScore;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 维修材料
|
||||
*/
|
||||
private String repairMateriel;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date beginDate;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endDate;
|
||||
|
||||
/**
|
||||
* 评价工人
|
||||
*/
|
||||
private Long workerScore;
|
||||
|
||||
/**
|
||||
* 工人ID
|
||||
*/
|
||||
private Long workerId;
|
||||
|
||||
/**
|
||||
* 公司ID
|
||||
*/
|
||||
private Long customerId;
|
||||
|
||||
/**
|
||||
* 公司
|
||||
*/
|
||||
private CustomerVO customerVO;
|
||||
|
||||
/**
|
||||
* 园区ID
|
||||
*/
|
||||
private Long parkId;
|
||||
|
||||
/**
|
||||
* 园区
|
||||
*/
|
||||
private ParkVO parkVO;
|
||||
|
||||
/**
|
||||
* 用户
|
||||
*/
|
||||
private UserVO userVO;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date failureDate;
|
||||
|
||||
|
||||
/**
|
||||
* 工单记录
|
||||
*/
|
||||
private List<RepairLog> repairLogs = new ArrayList<>();
|
||||
|
||||
|
||||
/**
|
||||
* 报修图片
|
||||
*/
|
||||
private String repairImages;
|
||||
|
||||
|
||||
private String typeName;
|
||||
|
||||
private String repairDeviceName;
|
||||
|
||||
private String failureTypeName;
|
||||
|
||||
private String userName;
|
||||
|
||||
private String workerName;
|
||||
|
||||
//评分
|
||||
private Integer speed;
|
||||
|
||||
private Integer serve;
|
||||
|
||||
private Integer effect;
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.ics.admin.domain;
|
||||
package com.ics.admin.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -4,23 +4,7 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ics.admin.mapper.RepairStatsMapper">
|
||||
|
||||
<resultMap type="com.ics.admin.domain.RepairWorkerStatsVo" id="RepairWorkerStatsVoResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="username" column="username"/>
|
||||
<result property="mobile" column="mobile"/>
|
||||
<result property="typeid" column="typeid"/>
|
||||
<result property="typename" column="typename"/>
|
||||
<result property="zs" column="zs"/>
|
||||
<result property="process" column="process"/>
|
||||
<result property="closed" column="closed"/>
|
||||
<result property="unresolved" column="Unresolved"/>
|
||||
<result property="pj" column="pj"/>
|
||||
<result property="h" column="h"/>
|
||||
<result property="m" column="m"/>
|
||||
<result property="l" column="l"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectRepairWorkerStatsList" parameterType="RepairWorkerStatsVo" resultMap="RepairWorkerStatsVoResult">
|
||||
<select id="selectRepairWorkerStatsList" parameterType="com.ics.admin.vo.RepairWorkerStatsVo" resultType="com.ics.admin.vo.RepairWorkerStatsVo">
|
||||
SELECT id, username, mobile, typeid, typename, zs, process, closed, Unresolved, pj,
|
||||
case when pj>0 then CONCAT(h,',',ROUND(h/pj*100,1),'%') else '0,0%' end as h,
|
||||
case when pj>0 then CONCAT(m,',',ROUND(m/pj*100,1),'%') else '0,0%' end as m,
|
||||
@ -33,22 +17,7 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<resultMap type="com.ics.admin.domain.RepairFloorStatsVo" id="RepairFloorStatsVoResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="mobile" column="mobile"/>
|
||||
<result property="adr" column="adr"/>
|
||||
<result property="zs" column="zs"/>
|
||||
<result property="process" column="process"/>
|
||||
<result property="closed" column="closed"/>
|
||||
<result property="unresolved" column="Unresolved"/>
|
||||
<result property="pj" column="pj"/>
|
||||
<result property="h" column="h"/>
|
||||
<result property="m" column="m"/>
|
||||
<result property="l" column="l"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectRepairFloorStatsVoList" parameterType="RepairFloorStatsVo" resultMap="RepairFloorStatsVoResult">
|
||||
<select id="selectRepairFloorStatsVoList" parameterType="com.ics.admin.vo.RepairFloorStatsVo" resultType="com.ics.admin.vo.RepairFloorStatsVo">
|
||||
SELECT id, name, mobile, adr, zs, process, closed, Unresolved, pj,
|
||||
case when pj>0 then CONCAT(h,',',ROUND(h/pj*100,1),'%') else '0,0%' end as h,
|
||||
case when pj>0 then CONCAT(m,',',ROUND(m/pj*100,1),'%') else '0,0%' end as m,
|
||||
@ -61,21 +30,37 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="statsRepairByTime">
|
||||
<!-- 第一行 管理员 工单与 通知统计 -->
|
||||
<select id="repairAdminStats" resultType="com.ics.admin.vo.RepairAdminStatsVo">
|
||||
<![CDATA[
|
||||
SELECT
|
||||
count(id) zs,
|
||||
sum(case when status < 7 then 1 else 0 end) wait,
|
||||
sum(case when timeout is not null and timeout < now() and status < 9 then 1 else 0 end) timeout,
|
||||
SUM(case when eval_service is not null then 1 else 0 end) as pj,
|
||||
SUM(case when eval_service is not null and eval_service >=4 then 1 else 0 end) as h,
|
||||
SUM(case when eval_service is not null and eval_service =3 then 1 else 0 end) as m,
|
||||
SUM(case when eval_service is not null and eval_service <=2 then 1 else 0 end) as l
|
||||
FROM
|
||||
ics_repair
|
||||
WHERE
|
||||
delete_flag = 0 and creat_time between #{startTime} and #{endTime}
|
||||
SELECT `wait`,`anew`,0 as newnotice,0 as oldnotice FROM
|
||||
(SELECT count(id) as `wait` FROM ics_repair where delete_flag=0 and status=3) as A,
|
||||
(SELECT count(DISTINCT repair_id) as `anew` FROM ics_repair_log where delete_flag=0 and node_form=3) as B
|
||||
]]>
|
||||
</select>
|
||||
|
||||
<!-- 第二、三行 工单统计、工单完成情况、评价情况 -->
|
||||
<select id="repairStats" resultType="com.ics.admin.vo.RepairStatsVo">
|
||||
<![CDATA[
|
||||
SELECT
|
||||
count(id) zs,
|
||||
sum(case when status < 9 then 1 else 0 end) `wait`,
|
||||
sum(case when predate is not null and predate < now() and status < 9 then 1 else 0 end) timeout,
|
||||
sum(case when eval_service is not null then 1 else 0 end) as pj,
|
||||
sum(case when eval_service is not null and eval_service >=4 then 1 else 0 end) as h,
|
||||
sum(case when eval_service is not null and eval_service =3 then 1 else 0 end) as m,
|
||||
sum(case when eval_service is not null and eval_service <=2 then 1 else 0 end) as l,
|
||||
sum(case when status > 7 then 1 else 0 end) wc,
|
||||
sum(case when timeout =5 and status>=9 then 1 else 0 end) htimeout,
|
||||
sum(case when timeout =3 and status>=9 then 1 else 0 end) mtimeout,
|
||||
sum(case when predate < end_date and timeout=1 and status>=9 then 1 else 0 end) ltimeout,
|
||||
sum(case when predate > end_date and timeout=1 and status>=9 then 1 else 0 end) ntimeout
|
||||
FROM
|
||||
ics_repair
|
||||
WHERE
|
||||
delete_flag = 0 and create_time between #{startTime} and #{endTime}
|
||||
]]>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user