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
0b001df4dc
commit
11ca8d961c
@ -9,6 +9,7 @@ import com.ics.admin.vo.RepairWorkerStatsVo;
|
||||
import com.ics.common.core.controller.BaseController;
|
||||
import com.ics.common.core.domain.R;
|
||||
import com.ics.common.utils.DateUtils;
|
||||
import com.ics.common.utils.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@ -87,6 +88,42 @@ public class RepairStatsController extends BaseController {
|
||||
return result(repairService.repairList(repair));
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员绩效,楼层管理员自行报修情况 2024-08-26
|
||||
*/
|
||||
@RequiresPermissions(value = {"repair:manage:operator"})
|
||||
@RequestMapping("floorCreateList")
|
||||
public R floorCreateList(String keywords, String startDate, String endDate) {
|
||||
Date start = null, end = null;
|
||||
try {
|
||||
if (StringUtils.isNotBlank(startDate) && StringUtils.isNotBlank(endDate)) {
|
||||
start = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, startDate + " 00:00:00");
|
||||
end = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, endDate + " 23:59:59");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return R.error("参数错误");
|
||||
}
|
||||
startPage();
|
||||
return result(repairWorkerStatsService.getRepairFloorCreateStats(keywords, start, end));
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员绩效,指定楼层管理员自行报修情况 2024-08-26
|
||||
*/
|
||||
@RequiresPermissions(value = {"repair:manage:operator"})
|
||||
@RequestMapping("oneFloorCreateList")
|
||||
public R oneFloorCreateList(String floorerId) {
|
||||
Repair repair = new Repair();
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("role", "1");
|
||||
params.put("userId", floorerId);
|
||||
params.put("type", "all");
|
||||
repair.setParams(params);
|
||||
startPage();
|
||||
return result(repairService.repairList(repair));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 第一行 管理员 工单与 通知统计
|
||||
*/
|
||||
|
@ -36,14 +36,26 @@ public interface RepairStatsMapper {
|
||||
*/
|
||||
List<RepairFloorStatsVo> selectRepairFloorStatsVoList(RepairFloorStatsVo repairFloorStatsVo);
|
||||
|
||||
/**
|
||||
* 楼层管理员自行报修情况
|
||||
*
|
||||
* @param keywords 姓名或者手机号
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 保修时间
|
||||
* @return
|
||||
*/
|
||||
List<RepairFloorStatsVo> getRepairFloorCreateStats(@Param("keywords") String keywords, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
|
||||
|
||||
/**
|
||||
* 第一行 管理员 工单与 通知统计
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<RepairAdminStatsVo> repairAdminStats(Long userId);
|
||||
|
||||
/**
|
||||
* 第二、三行 工单统计、工单完成情况、评价情况
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<RepairStatsVo> repairStats(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
|
||||
@ -62,6 +74,7 @@ public interface RepairStatsMapper {
|
||||
* 第四行 右下 故障类型统计
|
||||
*/
|
||||
List<RepairFloorStatsVo> failureStats(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
|
||||
|
||||
/**
|
||||
* 第五行 设备、品牌、评价 统计
|
||||
*/
|
||||
|
@ -34,6 +34,15 @@ public interface IRepairStatsService {
|
||||
* @return VIEW集合
|
||||
*/
|
||||
List<RepairFloorStatsVo> selectRepairFloorStatsVoList(RepairFloorStatsVo repairFloorStatsVo);
|
||||
/**
|
||||
* 楼层管理员自行报修情况
|
||||
*
|
||||
* @param keywords 姓名或者手机号
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 保修时间
|
||||
* @return
|
||||
*/
|
||||
List<RepairFloorStatsVo> getRepairFloorCreateStats(String keywords, Date startTime, Date endTime);
|
||||
|
||||
/**
|
||||
* 第一行 管理员 工单与 通知统计
|
||||
|
@ -76,6 +76,7 @@ public class RepairIOSericeImpl implements IRepairIOSerice {
|
||||
repairCheckVo = list.get(0);
|
||||
repair.setAddressId(repairCheckVo.getPid());
|
||||
repair.setFloorId(repairCheckVo.getSid());
|
||||
repair.setRemark("5110");//工单标记
|
||||
return IRepairIOSerice.OK;
|
||||
}
|
||||
|
||||
|
@ -54,6 +54,11 @@ public class RepairStatsServiceImpl implements IRepairStatsService {
|
||||
return repairStatsMapper.selectRepairFloorStatsVoList(repairFloorStatsVo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RepairFloorStatsVo> getRepairFloorCreateStats(String keywords, Date startTime, Date endTime) {
|
||||
return repairStatsMapper.getRepairFloorCreateStats(keywords, startTime, endTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RepairAdminStatsVo repairAdminStats(Long userId) {
|
||||
List<RepairAdminStatsVo> list = repairStatsMapper.repairAdminStats(userId);
|
||||
|
@ -30,6 +30,43 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 楼层管理员自行报修情况 -->
|
||||
<select id="getRepairFloorCreateStats" resultType="com.ics.admin.vo.RepairFloorStatsVo">
|
||||
<![CDATA[
|
||||
SELECT id, name, mobile, 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,
|
||||
case when pj>0 then CONCAT(l,',',ROUND(l/pj*100,1),'%') else '0,0%' end as l
|
||||
FROM
|
||||
(
|
||||
select user.id,user.name,user.mobile,
|
||||
count(rep.id) as zs,
|
||||
SUM(case when rep.status<9 then 1 else 0 end) as process,
|
||||
SUM(case when rep.status>=9 then 1 else 0 end) as closed,
|
||||
SUM(case when rep.resolve=0 then 1 else 0 end) as unresolved,
|
||||
count(rep.eval_service) pj,
|
||||
SUM(case when rep.eval_service>=4 then 1 else 0 end) as h,
|
||||
SUM(case when rep.eval_service=3 then 1 else 0 end) as m,
|
||||
SUM(case when rep.eval_service<=2 then 1 else 0 end) as l
|
||||
from
|
||||
ics_customer_staff user, (select admin_id from ics_repair_address_floor where delete_flag=0 group by admin_Id) floor, ics_repair rep
|
||||
where
|
||||
user.delete_flag=0 and rep.delete_flag=0
|
||||
and user.id=floor.admin_id and cast(user.id as char)=rep.create_by
|
||||
]]>
|
||||
<if test="startTime != null and endTime != null">
|
||||
and rep.create_time between #{startTime} and #{endTime}
|
||||
</if>
|
||||
<if test="keywords != null and keywords != ''">
|
||||
and (user.name LIKE CONCAT('%', #{keywords}, '%') or user.mobile like CONCAT('%', #{keywords}, '%'))
|
||||
</if>
|
||||
<![CDATA[
|
||||
GROUP BY
|
||||
user.id,user.name,user.mobile
|
||||
) tb
|
||||
]]>
|
||||
</select>
|
||||
|
||||
<!-- 第一行 管理员 工单与 通知统计 -->
|
||||
<select id="repairAdminStats" resultType="com.ics.admin.vo.RepairAdminStatsVo">
|
||||
<![CDATA[
|
||||
|
Loading…
x
Reference in New Issue
Block a user