工单检索及楼层管理员列表、无效工单列表

This commit is contained in:
lujiang 2024-08-19 19:30:48 +08:00
parent 3787fe83a2
commit 0bacded2eb
6 changed files with 34 additions and 21 deletions

View File

@ -78,12 +78,15 @@ public class RepairController extends BaseController {
/** /**
* 工单列表 * 工单列表
* menu:1.报修查询3派单入口5维修入口, 7 管理员 * menu:1.报修查询3派单入口5维修入口, 7 管理员,9 楼层管理员
* <p> * <p>
* 报修查询全部处理中待评价已评价 type对应值allprocessevalingevaled * 报修查询全部处理中待评价已评价无效申请 type对应值allprocessevalingevaledinvalid
* 派单入口重新派单待派单已派单已关闭 type对应值anewwaitalreadyclose * 派单入口重新派单待派单已派单已关闭无效申请 type对应值anewwaitalreadyclose
* 维修入口待完成进行中已完成 type对应值waitworkingclose * 维修入口待完成进行中已完成 type对应值waitworkingclose
* 管理员重派单全部 type对应值anewall 小程序暂时用不到 * 管理员重派单全部无效申请 type对应值anewallinvalid 小程序暂时用不到
* 楼层管理员全部无效申请 type对应值allinvalid
*
* name : 工单名称搜索关键字
* </p> * </p>
*/ */
@RequiresPermissions(value = {"repair:manage:operator", "member:center:view"}, logical = Logical.OR) @RequiresPermissions(value = {"repair:manage:operator", "member:center:view"}, logical = Logical.OR)
@ -91,10 +94,11 @@ public class RepairController extends BaseController {
public R list(@RequestBody Map<String, String> map) { public R list(@RequestBody Map<String, String> map) {
String type = map.get("type"); String type = map.get("type");
String menu = map.get("menu"); String menu = map.get("menu");
String repairName = map.get("name");
if (StringUtils.isBlank(type) || StringUtils.isBlank(menu)) return R.error(); if (StringUtils.isBlank(type) || StringUtils.isBlank(menu)) return R.error();
startPage(); startPage();
Long userId = getLoginStaffId(); Long userId = getLoginStaffId();
return result(repairService.repairList(menu, userId.toString(), type)); return result(repairService.repairList(menu, userId.toString(), type, repairName));
} }
/** /**

View File

@ -47,7 +47,7 @@ public class RepairStatsController extends BaseController {
@RequestMapping("oneWorkerList") @RequestMapping("oneWorkerList")
public R oneWorkerList(String workerId) { public R oneWorkerList(String workerId) {
startPage(); startPage();
return result(repairService.repairList("5", workerId, "")); return result(repairService.repairList("5", workerId, "", null));
} }
/** /**

View File

@ -22,14 +22,13 @@ public interface RepairMapper {
*/ */
Repair selectRepairById(Long id); Repair selectRepairById(Long id);
List<Repair> normalRepairList(@Param("userId") String userId, @Param("type") String type, @Param("repairName") String repairName);
List<Repair> normalRepairList(@Param("userId") String userId, @Param("type") String type); List<Repair> preRepairList(@Param("userId") String userId, @Param("type") String type, @Param("repairName") String repairName);
List<Repair> preRepairList(@Param("userId") String userId, @Param("type") String type); List<Repair> workRepairList(@Param("userId") String userId, @Param("type") String type, @Param("repairName") String repairName);
List<Repair> workRepairList(@Param("userId") String userId, @Param("type") String type); List<Repair> adminRepairList(@Param("userId") String userId, @Param("type") String type, @Param("repairName") String repairName);
List<Repair> adminRepairList(@Param("userId") String userId, @Param("type") String type);
/** /**
* 维修工 工单 数量统计 * 维修工 工单 数量统计
@ -41,10 +40,10 @@ public interface RepairMapper {
/** /**
* 楼层管理管工单列表 * 楼层管理管工单列表
* @param floorerId 管理员id * @param floorerId 楼层管理员id
* @return * @return
*/ */
List<Repair> floorRepairList(@Param("floorerId")String floorerId); List<Repair> floorRepairList(@Param("floorerId") String floorerId, @Param("type") String type, @Param("repairName") String repairName);
/** /**
* 新增工单 * 新增工单
* *

View File

@ -39,7 +39,7 @@ public interface IRepairService {
* @param menu 1.普通用户3派单员5维修人, 7管理员 * @param menu 1.普通用户3派单员5维修人, 7管理员
* 查询工单列表 * 查询工单列表
*/ */
List<Repair> repairList(String menu, String userId, String type); List<Repair> repairList(String menu, String userId, String type ,String repairName);
/** /**
* 获取维修人员工单数量 * 获取维修人员工单数量

View File

@ -337,13 +337,14 @@ public class RepairServiceImpl implements IRepairService {
* 查询工单列表 * 查询工单列表
*/ */
@Override @Override
public List<Repair> repairList(String menu, String userId, String type) { public List<Repair> repairList(String menu, String userId, String type, String repairName) {
List<Repair> list = null; List<Repair> list = null;
//1.普通用户3派单员5维修人, 7管理员 //1.普通用户3派单员5维修人, 7管理员 ,9楼层管理员
if ("7".equals(menu)) list = repairMapper.adminRepairList(userId, type); if ("9".equals(menu)) list = repairMapper.floorRepairList(userId, type, repairName);
if ("5".equals(menu)) list = repairMapper.workRepairList(userId, type); if ("7".equals(menu)) list = repairMapper.adminRepairList(userId, type, repairName);
if ("3".equals(menu)) list = repairMapper.preRepairList(userId, type); if ("5".equals(menu)) list = repairMapper.workRepairList(userId, type, repairName);
if ("1".equals(menu)) list = repairMapper.normalRepairList(userId, type); if ("3".equals(menu)) list = repairMapper.preRepairList(userId, type, repairName);
if ("1".equals(menu)) list = repairMapper.normalRepairList(userId, type, repairName);
if (list != null && list.size() > 0) { if (list != null && list.size() > 0) {
for (Repair repair : list) { for (Repair repair : list) {
if (repair.getPerUserId() != null && repair.getPerUserId() > 0) { if (repair.getPerUserId() != null && repair.getPerUserId() > 0) {
@ -381,7 +382,7 @@ public class RepairServiceImpl implements IRepairService {
@Override @Override
public List<Repair> floorRepairList(String floorerId) { public List<Repair> floorRepairList(String floorerId) {
return repairMapper.floorRepairList(floorerId); return repairMapper.floorRepairList(floorerId, "all", null);
} }
/** /**

View File

@ -209,6 +209,8 @@
<if test="type == 'process'">and status <![CDATA[ < ]]> 9 </if> <if test="type == 'process'">and status <![CDATA[ < ]]> 9 </if>
<if test="type == 'evaling'">and status = 9</if> <if test="type == 'evaling'">and status = 9</if>
<if test="type == 'evaled'">and status = 13</if> <if test="type == 'evaled'">and status = 13</if>
<if test="type == 'invalid'">and status = 11</if>
<if test="repairName != null and repairName != ''"> AND repair_name LIKE CONCAT('%', #{repairName}, '%')</if>
order by create_time desc order by create_time desc
</select> </select>
<!--派单员--> <!--派单员-->
@ -219,6 +221,7 @@
<if test="type == 'wait'">and status = 1</if> <if test="type == 'wait'">and status = 1</if>
<if test="type == 'already'">and status <![CDATA[ > ]]> 3 and status <![CDATA[ <> ]]> 11</if> <if test="type == 'already'">and status <![CDATA[ > ]]> 3 and status <![CDATA[ <> ]]> 11</if>
<if test="type == 'close'">and status = 11</if> <if test="type == 'close'">and status = 11</if>
<if test="repairName != null and repairName != ''"> AND repair_name LIKE CONCAT('%', #{repairName}, '%')</if>
order by create_time desc order by create_time desc
</select> </select>
<!--维修人员--> <!--维修人员-->
@ -228,6 +231,7 @@
<if test="type == 'wait'">and status = 5</if> <if test="type == 'wait'">and status = 5</if>
<if test="type == 'working'">and status = 7</if> <if test="type == 'working'">and status = 7</if>
<if test="type == 'close'">and (status = 9 or status = 13)</if> <if test="type == 'close'">and (status = 9 or status = 13)</if>
<if test="repairName != null and repairName != ''"> AND repair_name LIKE CONCAT('%', #{repairName}, '%')</if>
order by create_time desc order by create_time desc
</select> </select>
<!--管理员--> <!--管理员-->
@ -235,7 +239,9 @@
<include refid="selectRepairVo"/> <include refid="selectRepairVo"/>
where delete_flag = 0 where delete_flag = 0
<if test="type == 'anew'">and status = 3</if> <if test="type == 'anew'">and status = 3</if>
<if test="type == 'invalid'">and status = 11</if>
<if test="type == 'all'"></if> <if test="type == 'all'"></if>
<if test="repairName != null and repairName != ''"> AND repair_name LIKE CONCAT('%', #{repairName}, '%')</if>
order by create_time desc order by create_time desc
</select> </select>
@ -254,6 +260,9 @@
ics_repair rep,ics_repair_address_floor floor ics_repair rep,ics_repair_address_floor floor
where where
rep.delete_flag=0 and floor.delete_flag=0 and floor.id=rep.floor_id and floor.admin_id= #{floorerId} rep.delete_flag=0 and floor.delete_flag=0 and floor.id=rep.floor_id and floor.admin_id= #{floorerId}
<if test="type == 'invalid'">and rep.status = 11</if>
<if test="type == 'all'"></if>
<if test="repairName != null and repairName != ''"> AND rep.repair_name LIKE CONCAT('%', #{repairName}, '%')</if>
order by create_time desc order by create_time desc
</select> </select>