mirror of
https://gitee.com/elegant_wings/dbd-meeting.git
synced 2025-06-21 18:19:36 +08:00
各角色列表查询变更,故障等级由派单员填写,设备类型增加字段,楼层增加编码
This commit is contained in:
parent
33d381cae7
commit
ad8a38fb97
@ -3,13 +3,17 @@ package com.ics.admin.controller;
|
|||||||
import com.ics.admin.domain.Repair;
|
import com.ics.admin.domain.Repair;
|
||||||
import com.ics.admin.domain.RepairAttach;
|
import com.ics.admin.domain.RepairAttach;
|
||||||
import com.ics.admin.domain.RepairLog;
|
import com.ics.admin.domain.RepairLog;
|
||||||
|
import com.ics.admin.service.IIcsCustomerStaffService;
|
||||||
import com.ics.admin.service.IRepairAttachService;
|
import com.ics.admin.service.IRepairAttachService;
|
||||||
import com.ics.admin.service.IRepairLogService;
|
import com.ics.admin.service.IRepairLogService;
|
||||||
import com.ics.admin.service.IRepairService;
|
import com.ics.admin.service.IRepairService;
|
||||||
import com.ics.admin.utils.RepairDTO;
|
import com.ics.admin.utils.RepairDTO;
|
||||||
|
import com.ics.admin.utils.RepairListDTO;
|
||||||
import com.ics.admin.vo.RepairAttachVO;
|
import com.ics.admin.vo.RepairAttachVO;
|
||||||
import com.ics.common.core.controller.BaseController;
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.IcsCustomerStaff;
|
||||||
import com.ics.common.core.domain.R;
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.DateUtils;
|
||||||
import com.ics.common.utils.StringUtils;
|
import com.ics.common.utils.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@ -20,6 +24,7 @@ import org.wf.jwtp.annotation.Logical;
|
|||||||
import org.wf.jwtp.annotation.RequiresPermissions;
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -43,6 +48,9 @@ public class RepairController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IRepairAttachService repairAttachService;
|
private IRepairAttachService repairAttachService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IIcsCustomerStaffService customerStaffService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报修
|
* 报修
|
||||||
*/
|
*/
|
||||||
@ -50,7 +58,7 @@ public class RepairController extends BaseController {
|
|||||||
@PostMapping("flow/start")
|
@PostMapping("flow/start")
|
||||||
public R startFlow(@RequestBody RepairDTO repairDTO) {
|
public R startFlow(@RequestBody RepairDTO repairDTO) {
|
||||||
Long userId = getLoginStaffId();
|
Long userId = getLoginStaffId();
|
||||||
// if (!repairService.submitCheck(userId.toString())) return R.error("报修过于频繁,请稍后再试.");
|
if (!repairService.submitCheck(userId.toString())) return R.error("报修过于频繁,请稍后再试.");
|
||||||
String result = repairService.handleFlow(repairDTO.getRepair(), userId, repairDTO.getFiles(), null, null);
|
String result = repairService.handleFlow(repairDTO.getRepair(), userId, repairDTO.getFiles(), null, null);
|
||||||
return IRepairService.OK.equals(result) ? R.ok() : R.error(result);
|
return IRepairService.OK.equals(result) ? R.ok() : R.error(result);
|
||||||
}
|
}
|
||||||
@ -86,19 +94,99 @@ public class RepairController extends BaseController {
|
|||||||
* 管理员:重派单,全部,无效申请 type对应值:anew、all、invalid 【小程序暂时用不到】
|
* 管理员:重派单,全部,无效申请 type对应值:anew、all、invalid 【小程序暂时用不到】
|
||||||
* 楼层管理员:全部、无效申请 type对应值:all、invalid
|
* 楼层管理员:全部、无效申请 type对应值:all、invalid
|
||||||
*
|
*
|
||||||
* name : 工单名称搜索关键字
|
* name : 工单描述搜索关键字
|
||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单列表
|
||||||
|
* role 1.普通用户,3派单员,5维修人员, 7管理员, 9 楼层管理员
|
||||||
|
*
|
||||||
|
* 【报修查询】 普通用户,管理员, 楼层管理员
|
||||||
|
* 全部、处理中、待评价、已评价、无效申请
|
||||||
|
* type值:all、process、evaling、evaled、invalid
|
||||||
|
* 【派单入口】
|
||||||
|
* 管理员:
|
||||||
|
* 重新派单、待派单、已派单、无效申请
|
||||||
|
* type值:anew、wait、already、invalid
|
||||||
|
* 派单员:
|
||||||
|
* 待派单、已派单、无效申请
|
||||||
|
* type值:wait、already、invalid
|
||||||
|
* 【维修入口】
|
||||||
|
* 待完成、进行中、已完成
|
||||||
|
* type对应值:wait、process、end
|
||||||
|
* 【查询条件】
|
||||||
|
* repair:
|
||||||
|
* sn: 单号,模糊查询
|
||||||
|
* repairLevel:故障等级,模糊查询
|
||||||
|
* typeId:设备类别id,精确查询
|
||||||
|
* deviceId:设备id,精确查询
|
||||||
|
* name:报修人,模糊查询
|
||||||
|
* phone:联系电话,模糊查询
|
||||||
|
* addressId:报修地点id,精确查询
|
||||||
|
* floorId:报修楼层id,精确查询
|
||||||
|
* room:门牌号,模糊查询
|
||||||
|
* explain:描述,模糊查询
|
||||||
|
* failureTypeId:故障类型id,精确查询
|
||||||
|
* beginTime : 工单创建日期范围;开始时间;格式示例 2024-08-22;成对出现
|
||||||
|
* endTime : 工单创建日期范围;结束时间;格式示例 2024-08-25;成对出现
|
||||||
|
*
|
||||||
|
* ========================================================================
|
||||||
|
*
|
||||||
|
* 普通用户:
|
||||||
|
* 全部、处理中、待评价、已评价、无效申请
|
||||||
|
* type值:all、process-1、3、5、7、evaling-9、evaled-13、invalid-11
|
||||||
|
*
|
||||||
|
* 派单员
|
||||||
|
* 待派单、已派单、无效申请
|
||||||
|
* type值:wait-1、already-5、7、9、13、invalid-11
|
||||||
|
*
|
||||||
|
* 维修人员
|
||||||
|
* 待完成、进行中、已完成
|
||||||
|
* type值:wait-5、process-7、end-9、13
|
||||||
|
*
|
||||||
|
* 管理员:
|
||||||
|
* 全部、重新派单、待派单、已派单、处理中、待评价、已评价、无效申请
|
||||||
|
* type值:all、anew-3、wait-1、already-5、7、9、13、process-1、3、5、7、evaling-9、evaled-13、invalid-11
|
||||||
|
*
|
||||||
|
* 楼层管理员
|
||||||
|
* type值:all、process-1、3、5、7、evaling-9、evaled-13、invalid-11
|
||||||
|
* ========================================================================
|
||||||
|
*/
|
||||||
@RequiresPermissions(value = {"repair:manage:operator", "member:center:view"}, logical = Logical.OR)
|
@RequiresPermissions(value = {"repair:manage:operator", "member:center:view"}, logical = Logical.OR)
|
||||||
@RequestMapping("list")
|
@RequestMapping("list")
|
||||||
public R list(@RequestBody Map<String, String> map) {
|
public R list(@RequestBody RepairListDTO repairListDTO) {
|
||||||
String type = map.get("type");
|
Repair repair = repairListDTO.getRepair();
|
||||||
String menu = map.get("menu");
|
if (repair == null) repair = new Repair();
|
||||||
String repairName = map.get("name");
|
String role = repairListDTO.getRole();
|
||||||
if (StringUtils.isBlank(type) || StringUtils.isBlank(menu)) return R.error();
|
String type = repairListDTO.getType();
|
||||||
startPage();
|
if (StringUtils.isBlank(type) || StringUtils.isBlank(role)) return R.error();
|
||||||
Long userId = getLoginStaffId();
|
Long userId = getLoginStaffId();
|
||||||
return result(repairService.repairList(menu, userId.toString(), type, repairName));
|
if ("7".equals(role)) { //管理员认证角色
|
||||||
|
IcsCustomerStaff customerStaff = customerStaffService.selectIcsCustomerStaffById(userId);
|
||||||
|
if (!"7".equals(customerStaff.getDataType())) return R.error("权限不足!");
|
||||||
|
}
|
||||||
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
params.put("role", role);
|
||||||
|
params.put("type", type);
|
||||||
|
params.put("userId", userId);
|
||||||
|
//时间范围处理
|
||||||
|
String beginTime = repair.getBeginTime(), endTime = repair.getEndTime();
|
||||||
|
if (beginTime != null && endTime != null && beginTime.length() == 10 && endTime.length() == 10) {
|
||||||
|
try {
|
||||||
|
Date s = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, beginTime + " 00:00:00");
|
||||||
|
Date e = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, endTime + " 23:59:59");
|
||||||
|
if (s.getTime() <= e.getTime()) {
|
||||||
|
params.put("beginTime", s);
|
||||||
|
params.put("endTime", e);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
//时间格式处理失败则放弃时间搜索条件
|
||||||
|
}
|
||||||
|
}
|
||||||
|
repair.setParams(params);
|
||||||
|
startPage();
|
||||||
|
return result(repairService.repairList(repair));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.ics.admin.controller;
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.ics.admin.domain.Repair;
|
||||||
import com.ics.admin.vo.RepairAdminStatsVo;
|
import com.ics.admin.vo.RepairAdminStatsVo;
|
||||||
import com.ics.admin.vo.RepairFloorStatsVo;
|
import com.ics.admin.vo.RepairFloorStatsVo;
|
||||||
import com.ics.admin.vo.RepairWorkerStatsVo;
|
import com.ics.admin.vo.RepairWorkerStatsVo;
|
||||||
@ -13,6 +14,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import org.wf.jwtp.annotation.RequiresPermissions;
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工单各种统计接口
|
* 工单各种统计接口
|
||||||
* created at 2024-8-15 20:36
|
* created at 2024-8-15 20:36
|
||||||
@ -46,8 +50,14 @@ public class RepairStatsController extends BaseController {
|
|||||||
@RequiresPermissions(value = {"repair:manage:operator"})
|
@RequiresPermissions(value = {"repair:manage:operator"})
|
||||||
@RequestMapping("oneWorkerList")
|
@RequestMapping("oneWorkerList")
|
||||||
public R oneWorkerList(String workerId) {
|
public R oneWorkerList(String workerId) {
|
||||||
|
Repair repair = new Repair();
|
||||||
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
params.put("role", "5");
|
||||||
|
params.put("type", "all");
|
||||||
|
params.put("userId", workerId);
|
||||||
|
repair.setParams(params);
|
||||||
startPage();
|
startPage();
|
||||||
return result(repairService.repairList("5", workerId, "", null));
|
return result(repairService.repairList(repair));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -66,8 +76,14 @@ public class RepairStatsController extends BaseController {
|
|||||||
@RequiresPermissions(value = {"repair:manage:operator"})
|
@RequiresPermissions(value = {"repair:manage:operator"})
|
||||||
@RequestMapping("oneFloorList")
|
@RequestMapping("oneFloorList")
|
||||||
public R oneFloorList(String floorerId) {
|
public R oneFloorList(String floorerId) {
|
||||||
|
Repair repair = new Repair();
|
||||||
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
params.put("role", "9");
|
||||||
|
params.put("userId", floorerId);
|
||||||
|
params.put("type", "all");
|
||||||
|
repair.setParams(params);
|
||||||
startPage();
|
startPage();
|
||||||
return result(repairService.floorRepairList(floorerId));
|
return result(repairService.repairList(repair));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -64,7 +64,7 @@ public class Repair extends BaseEntity<Repair> {
|
|||||||
/**
|
/**
|
||||||
* 报修地点id
|
* 报修地点id
|
||||||
*/
|
*/
|
||||||
private String addressId;
|
private Long addressId;
|
||||||
/**
|
/**
|
||||||
* 报修地点名称
|
* 报修地点名称
|
||||||
*/
|
*/
|
||||||
@ -72,7 +72,7 @@ public class Repair extends BaseEntity<Repair> {
|
|||||||
/**
|
/**
|
||||||
* 报修楼层id
|
* 报修楼层id
|
||||||
*/
|
*/
|
||||||
private String floorId;
|
private Long floorId;
|
||||||
/**
|
/**
|
||||||
* 报修楼层名称
|
* 报修楼层名称
|
||||||
*/
|
*/
|
||||||
|
@ -23,6 +23,10 @@ public class RepairAddressFloor extends BaseEntity<RepairAddressFloor> {
|
|||||||
* 楼层名称
|
* 楼层名称
|
||||||
*/
|
*/
|
||||||
private String name;
|
private String name;
|
||||||
|
/**
|
||||||
|
* 楼层编码
|
||||||
|
*/
|
||||||
|
private String bm;
|
||||||
|
|
||||||
/** 楼层管理员id */
|
/** 楼层管理员id */
|
||||||
private Long adminId;
|
private Long adminId;
|
||||||
@ -33,7 +37,9 @@ public class RepairAddressFloor extends BaseEntity<RepairAddressFloor> {
|
|||||||
/** 备注 */
|
/** 备注 */
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
private String ext1;
|
||||||
|
private String ext2;
|
||||||
|
private String ext3;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,6 +22,11 @@ public class RepairDeviceType extends BaseEntity<RepairDeviceType> {
|
|||||||
/** 名称 */
|
/** 名称 */
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 该设备类型预计需要完成的天数
|
||||||
|
*/
|
||||||
|
private Integer days;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Long staffId;
|
private Long staffId;
|
||||||
|
|
||||||
@ -42,5 +47,9 @@ public class RepairDeviceType extends BaseEntity<RepairDeviceType> {
|
|||||||
/** 备注 */
|
/** 备注 */
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
private String ext1;
|
||||||
|
private String ext2;
|
||||||
|
private String ext3;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,13 +22,12 @@ 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> preRepairList(@Param("userId") String userId, @Param("type") String type, @Param("repairName") String repairName);
|
* @param repairParam
|
||||||
|
* @return
|
||||||
List<Repair> workRepairList(@Param("userId") String userId, @Param("type") String type, @Param("repairName") String repairName);
|
*/
|
||||||
|
List<Repair> repairList(Repair repairParam);
|
||||||
List<Repair> adminRepairList(@Param("userId") String userId, @Param("type") String type, @Param("repairName") String repairName);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 维修工 工单 数量统计
|
* 维修工 工单 数量统计
|
||||||
@ -38,12 +37,6 @@ public interface RepairMapper {
|
|||||||
*/
|
*/
|
||||||
Integer workerRepairNumber(@Param("userId") String userId, @Param("type") String type);
|
Integer workerRepairNumber(@Param("userId") String userId, @Param("type") String type);
|
||||||
|
|
||||||
/**
|
|
||||||
* 楼层管理管工单列表
|
|
||||||
* @param floorerId 楼层管理员id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<Repair> floorRepairList(@Param("floorerId") String floorerId, @Param("type") String type, @Param("repairName") String repairName);
|
|
||||||
/**
|
/**
|
||||||
* 新增工单
|
* 新增工单
|
||||||
*
|
*
|
||||||
|
@ -36,24 +36,17 @@ public interface IRepairService {
|
|||||||
Repair selectRepairById(Long id);
|
Repair selectRepairById(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param menu 1.普通用户,3派单员,5维修人, 7管理员
|
|
||||||
* 查询工单列表
|
* 查询工单列表
|
||||||
|
* role 1.普通用户,3派单员,5维修人, 7管理员, 9 楼层管理员
|
||||||
|
* @param repairParam 工单查询参数
|
||||||
*/
|
*/
|
||||||
List<Repair> repairList(String menu, String userId, String type ,String repairName);
|
List<Repair> repairList(Repair repairParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取维修人员工单数量
|
* 获取维修人员工单数量
|
||||||
* @param userId 用户id
|
* @param userId 用户id
|
||||||
*/
|
*/
|
||||||
Map<String,Integer> workerRepairNumber(String userId);
|
Map<String,Integer> workerRepairNumber(String userId);
|
||||||
|
|
||||||
/**
|
|
||||||
* 楼层管理管工单列表
|
|
||||||
* @param floorerId 管理员id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<Repair> floorRepairList(String floorerId);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增工单
|
* 新增工单
|
||||||
*
|
*
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
package com.ics.admin.service.impl;
|
package com.ics.admin.service.impl;
|
||||||
|
|
||||||
import com.ics.admin.domain.Repair;
|
import com.ics.admin.domain.Repair;
|
||||||
|
import com.ics.admin.domain.RepairDeviceType;
|
||||||
import com.ics.admin.domain.RepairLog;
|
import com.ics.admin.domain.RepairLog;
|
||||||
import com.ics.admin.domain.RepairRelational;
|
import com.ics.admin.domain.RepairRelational;
|
||||||
import com.ics.admin.domain.RepairRemind;
|
import com.ics.admin.domain.RepairRemind;
|
||||||
import com.ics.admin.mapper.IcsCustomerStaffMapper;
|
import com.ics.admin.mapper.IcsCustomerStaffMapper;
|
||||||
import com.ics.admin.mapper.RepairAttachMapper;
|
import com.ics.admin.mapper.RepairAttachMapper;
|
||||||
|
import com.ics.admin.mapper.RepairDeviceTypeMapper;
|
||||||
import com.ics.admin.mapper.RepairLogMapper;
|
import com.ics.admin.mapper.RepairLogMapper;
|
||||||
import com.ics.admin.mapper.RepairMapper;
|
import com.ics.admin.mapper.RepairMapper;
|
||||||
import com.ics.admin.mapper.RepairRelationalMapper;
|
import com.ics.admin.mapper.RepairRelationalMapper;
|
||||||
@ -45,6 +47,9 @@ public class RepairServiceImpl implements IRepairService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISnService snService;
|
private ISnService snService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RepairDeviceTypeMapper repairDeviceTypeMapper;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RepairRelationalMapper repairRelationalMapper;
|
private RepairRelationalMapper repairRelationalMapper;
|
||||||
|
|
||||||
@ -116,12 +121,16 @@ public class RepairServiceImpl implements IRepairService {
|
|||||||
//没有设置维修人员则到派单环节,否则到“修理工是否接收”环节
|
//没有设置维修人员则到派单环节,否则到“修理工是否接收”环节
|
||||||
to = repair.getRepairUserId() == null ? 1 : 5;
|
to = repair.getRepairUserId() == null ? 1 : 5;
|
||||||
if (repair.getTypeId() == null) return "表单设备类型数据为空";
|
if (repair.getTypeId() == null) return "表单设备类型数据为空";
|
||||||
|
RepairDeviceType repairDeviceType=repairDeviceTypeMapper.selectRepairDeviceTypeById(repair.getTypeId());
|
||||||
|
if (repairDeviceType == null) return "设备类型无效";
|
||||||
List<RepairRelational> listRelational = repairRelationalMapper.selectDispatcherByTypeId(repair.getTypeId());
|
List<RepairRelational> listRelational = repairRelationalMapper.selectDispatcherByTypeId(repair.getTypeId());
|
||||||
if (listRelational == null || listRelational.size() == 0) return "根据表单设备类型找不到派单员";
|
if (listRelational == null || listRelational.size() == 0) return "根据表单设备类型找不到派单员";
|
||||||
nextUser = customerStaffMapper.selectIcsCustomerStaffById(listRelational.get(0).getUserId());//查询派单员
|
nextUser = customerStaffMapper.selectIcsCustomerStaffById(listRelational.get(0).getUserId());//查询派单员
|
||||||
if (nextUser == null) return "没有找到派单员账号";
|
if (nextUser == null) return "没有找到派单员账号";
|
||||||
repair.setSn(snService.generate(Sn.Type.REPAIR));//编单号
|
repair.setSn(snService.generate(Sn.Type.REPAIR));//编单号
|
||||||
repair.setPerUserId(nextUser.getId());//设置派单员
|
repair.setPerUserId(nextUser.getId());//设置派单员
|
||||||
|
int days=repairDeviceType.getDays();
|
||||||
|
repair.setPreDate(new Date(now.getTime() + (days * 24 * 60 * 60 * 1000)));//设置预计完成时间
|
||||||
repair.setTimeout(1);//告警默认绿色
|
repair.setTimeout(1);//告警默认绿色
|
||||||
repair.setWarn(1);//预警默认绿色
|
repair.setWarn(1);//预警默认绿色
|
||||||
repair.setDeleteFlag(0);
|
repair.setDeleteFlag(0);
|
||||||
@ -139,7 +148,8 @@ public class RepairServiceImpl implements IRepairService {
|
|||||||
nextUser = customerStaffMapper.selectIcsCustomerStaffById(repair.getRepairUserId());
|
nextUser = customerStaffMapper.selectIcsCustomerStaffById(repair.getRepairUserId());
|
||||||
if (nextUser == null) return "派单没有找到下一步执行人";
|
if (nextUser == null) return "派单没有找到下一步执行人";
|
||||||
newRepair.setRepairUserId(nextUser.getId());
|
newRepair.setRepairUserId(nextUser.getId());
|
||||||
newRepair.setPreDate(repair.getPreDate());//设置预计完成时间
|
newRepair.setRepairLevel(repair.getRepairLevel());//设置故障等级
|
||||||
|
//newRepair.setPreDate(repair.getPreDate());//设置预计完成时间
|
||||||
}
|
}
|
||||||
if (FlowOperate.BACK.equals(operate)) {
|
if (FlowOperate.BACK.equals(operate)) {
|
||||||
to = 3;
|
to = 3;
|
||||||
@ -337,14 +347,8 @@ public class RepairServiceImpl implements IRepairService {
|
|||||||
* 查询工单列表
|
* 查询工单列表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Repair> repairList(String menu, String userId, String type, String repairName) {
|
public List<Repair> repairList(Repair repairParam) {
|
||||||
List<Repair> list = null;
|
List<Repair> list = repairMapper.repairList(repairParam);
|
||||||
//1.普通用户,3派单员,5维修人, 7管理员 ,9楼层管理员
|
|
||||||
if ("9".equals(menu)) list = repairMapper.floorRepairList(userId, type, repairName);
|
|
||||||
if ("7".equals(menu)) list = repairMapper.adminRepairList(userId, type, repairName);
|
|
||||||
if ("5".equals(menu)) list = repairMapper.workRepairList(userId, type, repairName);
|
|
||||||
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) {
|
||||||
@ -380,11 +384,6 @@ public class RepairServiceImpl implements IRepairService {
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<Repair> floorRepairList(String floorerId) {
|
|
||||||
return repairMapper.floorRepairList(floorerId, "all", null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增工单
|
* 新增工单
|
||||||
*
|
*
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.ics.admin.utils;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.Repair;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单列表查询 传输参数体
|
||||||
|
* created at 2024-8-21 22:28
|
||||||
|
*
|
||||||
|
* @author lujiang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RepairListDTO implements Serializable {
|
||||||
|
private static final long serialVersionUID = -202408212230L;
|
||||||
|
|
||||||
|
private String role;
|
||||||
|
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
private Repair repair;
|
||||||
|
|
||||||
|
}
|
@ -8,8 +8,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="addressId" column="address_id" />
|
<result property="addressId" column="address_id" />
|
||||||
<result property="name" column="name" />
|
<result property="name" column="name" />
|
||||||
|
<result property="bm" column="bm" />
|
||||||
<result property="adminId" column="admin_Id" />
|
<result property="adminId" column="admin_Id" />
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
|
<result property="ext1" column="ext1" />
|
||||||
|
<result property="ext2" column="ext2" />
|
||||||
|
<result property="ext3" column="ext3" />
|
||||||
<result property="deleteFlag" column="delete_flag" />
|
<result property="deleteFlag" column="delete_flag" />
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
@ -20,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectRepairAddressFloorVo">
|
<sql id="selectRepairAddressFloorVo">
|
||||||
SELECT id, address_id, name, admin_Id, remark, delete_flag, create_by, create_time, update_by, update_time, tenant_id, park_id FROM ics_repair_address_floor
|
SELECT id, address_id, name, bm, admin_Id, remark, ext1, ext2, ext3, delete_flag, create_by, create_time, update_by, update_time, tenant_id, park_id FROM ics_repair_address_floor
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectRepairAddressFloorList" parameterType="RepairAddressFloor" resultMap="RepairAddressFloorResult">
|
<select id="selectRepairAddressFloorList" parameterType="RepairAddressFloor" resultMap="RepairAddressFloorResult">
|
||||||
@ -40,8 +44,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="addressId != null ">address_id,</if>
|
<if test="addressId != null ">address_id,</if>
|
||||||
<if test="name != null and name != ''">name,</if>
|
<if test="name != null and name != ''">name,</if>
|
||||||
|
<if test="bm != null and bm != ''">bm,</if>
|
||||||
<if test="adminId != null ">admin_Id,</if>
|
<if test="adminId != null ">admin_Id,</if>
|
||||||
<if test="remark != null and remark != ''">remark,</if>
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
|
<if test="ext1 != null and ext1 != ''">ext1,</if>
|
||||||
|
<if test="ext2 != null and ext2 != ''">ext2,</if>
|
||||||
|
<if test="ext3 != null and ext3 != ''">ext3,</if>
|
||||||
<if test="deleteFlag != null and deleteFlag != ''">delete_flag,</if>
|
<if test="deleteFlag != null and deleteFlag != ''">delete_flag,</if>
|
||||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
<if test="createTime != null ">create_time,</if>
|
<if test="createTime != null ">create_time,</if>
|
||||||
@ -53,8 +61,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="addressId != null ">#{addressId},</if>
|
<if test="addressId != null ">#{addressId},</if>
|
||||||
<if test="name != null and name != ''">#{name},</if>
|
<if test="name != null and name != ''">#{name},</if>
|
||||||
|
<if test="bm != null and bm != ''">#{bm},</if>
|
||||||
<if test="adminId != null ">#{adminId},</if>
|
<if test="adminId != null ">#{adminId},</if>
|
||||||
<if test="remark != null and remark != ''">#{remark},</if>
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
|
<if test="ext1 != null and ext1 != ''">#{ext1},</if>
|
||||||
|
<if test="ext2 != null and ext2 != ''">#{ext2},</if>
|
||||||
|
<if test="ext3 != null and ext3 != ''">#{ext3},</if>
|
||||||
<if test="deleteFlag != null and deleteFlag != ''">#{deleteFlag},</if>
|
<if test="deleteFlag != null and deleteFlag != ''">#{deleteFlag},</if>
|
||||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
<if test="createTime != null ">#{createTime},</if>
|
<if test="createTime != null ">#{createTime},</if>
|
||||||
@ -70,8 +82,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="addressId != null ">address_id = #{addressId},</if>
|
<if test="addressId != null ">address_id = #{addressId},</if>
|
||||||
<if test="name != null and name != ''">name = #{name},</if>
|
<if test="name != null and name != ''">name = #{name},</if>
|
||||||
|
<if test="bm != null and bm != ''">name = #{bm},</if>
|
||||||
<if test="adminId != null ">admin_Id = #{adminId},</if>
|
<if test="adminId != null ">admin_Id = #{adminId},</if>
|
||||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||||
|
<if test="ext1 != null and ext1 != ''">ext1 = #{ext1},</if>
|
||||||
|
<if test="ext2 != null and ext2 != ''">ext2 = #{ext2},</if>
|
||||||
|
<if test="ext3 != null and ext3 != ''">ext3 = #{ext3},</if>
|
||||||
<if test="deleteFlag != null and deleteFlag != ''">delete_flag = #{deleteFlag},</if>
|
<if test="deleteFlag != null and deleteFlag != ''">delete_flag = #{deleteFlag},</if>
|
||||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||||
|
@ -7,7 +7,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<resultMap type="com.ics.admin.domain.RepairDeviceType" id="RepairDeviceTypeResult">
|
<resultMap type="com.ics.admin.domain.RepairDeviceType" id="RepairDeviceTypeResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="name" column="name" />
|
<result property="name" column="name" />
|
||||||
|
<result property="days" column="days" />
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
|
<result property="ext1" column="ext1" />
|
||||||
|
<result property="ext2" column="ext2" />
|
||||||
|
<result property="ext3" column="ext3" />
|
||||||
<result property="deleteFlag" column="delete_flag" />
|
<result property="deleteFlag" column="delete_flag" />
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
@ -18,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectRepairDeviceTypeVo">
|
<sql id="selectRepairDeviceTypeVo">
|
||||||
SELECT id, name, remark, delete_flag, create_by, create_time, update_by, update_time, tenant_id, park_id FROM ics_repair_device_type
|
SELECT id, name, `days`, remark, ext1, ext2, ext3, delete_flag, create_by, create_time, update_by, update_time, tenant_id, park_id FROM ics_repair_device_type
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectRepairDeviceTypeList" parameterType="RepairDeviceType" resultMap="RepairDeviceTypeResult">
|
<select id="selectRepairDeviceTypeList" parameterType="RepairDeviceType" resultMap="RepairDeviceTypeResult">
|
||||||
@ -30,14 +34,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<select id="selectRepairDeviceTypeById" parameterType="Long" resultMap="RepairDeviceTypeResult">
|
<select id="selectRepairDeviceTypeById" parameterType="Long" resultMap="RepairDeviceTypeResult">
|
||||||
<include refid="selectRepairDeviceTypeVo"/>
|
<include refid="selectRepairDeviceTypeVo"/>
|
||||||
WHERE id = #{id}
|
WHERE id = #{id} and delete_flag=0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertRepairDeviceType" parameterType="RepairDeviceType" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertRepairDeviceType" parameterType="RepairDeviceType" useGeneratedKeys="true" keyProperty="id">
|
||||||
INSERT INTO ics_repair_device_type
|
INSERT INTO ics_repair_device_type
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="name != null and name != ''">name,</if>
|
<if test="name != null and name != ''">name,</if>
|
||||||
|
<if test="days != null ">`days`,</if>
|
||||||
<if test="remark != null and remark != ''">remark,</if>
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
|
<if test="ext1 != null and ext1 != ''">ext1,</if>
|
||||||
|
<if test="ext2 != null and ext2 != ''">ext2,</if>
|
||||||
|
<if test="ext3 != null and ext3 != ''">ext3,</if>
|
||||||
<if test="deleteFlag != null and deleteFlag != ''">delete_flag,</if>
|
<if test="deleteFlag != null and deleteFlag != ''">delete_flag,</if>
|
||||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
<if test="createTime != null ">create_time,</if>
|
<if test="createTime != null ">create_time,</if>
|
||||||
@ -49,6 +57,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="name != null and name != ''">#{name},</if>
|
<if test="name != null and name != ''">#{name},</if>
|
||||||
<if test="remark != null and remark != ''">#{remark},</if>
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
|
<if test="ext1 != null and ext1 != ''">#{ext1},</if>
|
||||||
|
<if test="ext2 != null and ext2 != ''">#{ext2},</if>
|
||||||
|
<if test="ext3 != null and ext3 != ''">#{ext3},</if>
|
||||||
<if test="deleteFlag != null and deleteFlag != ''">#{deleteFlag},</if>
|
<if test="deleteFlag != null and deleteFlag != ''">#{deleteFlag},</if>
|
||||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
<if test="createTime != null ">#{createTime},</if>
|
<if test="createTime != null ">#{createTime},</if>
|
||||||
@ -63,7 +74,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
UPDATE ics_repair_device_type
|
UPDATE ics_repair_device_type
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="name != null and name != ''">name = #{name},</if>
|
<if test="name != null and name != ''">name = #{name},</if>
|
||||||
|
<if test="days != null ">`days` = #{days},</if>
|
||||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||||
|
<if test="ext1 != null and ext1 != ''">ext1 = #{ext1},</if>
|
||||||
|
<if test="ext2 != null and ext2 != ''">ext2 = #{ext2},</if>
|
||||||
|
<if test="ext3 != null and ext3 != ''">ext3 = #{ext3},</if>
|
||||||
<if test="deleteFlag != null and deleteFlag != ''">delete_flag = #{deleteFlag},</if>
|
<if test="deleteFlag != null and deleteFlag != ''">delete_flag = #{deleteFlag},</if>
|
||||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||||
|
@ -201,50 +201,59 @@
|
|||||||
</trim>
|
</trim>
|
||||||
WHERE id = #{id}
|
WHERE id = #{id}
|
||||||
</update>
|
</update>
|
||||||
<!--普通用户-->
|
<!--普通用户 工单列表-->
|
||||||
<select id="normalRepairList" resultMap="RepairResult">
|
<select id="repairList" parameterType="Repair" resultMap="RepairResult">
|
||||||
<include refid="selectRepairVo"/>
|
<!--1.普通用户,3派单员,5维修人, 7管理员 ,9楼层管理员-->
|
||||||
where delete_flag = 0 and create_by = #{userId}
|
<if test="params.role == 1 or params.role == 3 or params.role == 5 or params.role == 7">
|
||||||
<if test="type == 'all'"></if>
|
SELECT * FROM ics_repair rep where delete_flag = 0
|
||||||
<if test="type == 'process'">and status <![CDATA[ < ]]> 9 </if>
|
</if>
|
||||||
<if test="type == 'evaling'">and status = 9</if>
|
<if test="params.role == 9">
|
||||||
<if test="type == 'evaled'">and status = 13</if>
|
select rep.* from ics_repair rep,ics_repair_address_floor floor where
|
||||||
<if test="type == 'invalid'">and status = 11</if>
|
rep.delete_flag=0 and floor.delete_flag=0 and floor.id=rep.floor_id and floor.admin_id= #{params.userId}
|
||||||
<if test="repairName != null and repairName != ''"> AND repair_name LIKE CONCAT('%', #{repairName}, '%')</if>
|
</if>
|
||||||
order by create_time desc
|
<if test="params.role == 1"> and create_by = #{params.userId}</if>
|
||||||
</select>
|
<if test="params.role == 3"> and per_userid = #{params.userId}</if>
|
||||||
|
<if test="params.role == 5"> and repair_user_id = #{params.userId}</if>
|
||||||
|
|
||||||
|
<!--普通用户、楼层管理员、管理员 都会用到以下分类-->
|
||||||
|
<if test="params.type == 'all'"></if>
|
||||||
|
<if test="params.type == 'process'"> and rep.status <=7 </if>
|
||||||
|
<if test="params.type == 'evaling'"> and rep.status = 9</if>
|
||||||
|
<if test="params.type == 'evaled'"> and rep.status = 13</if>
|
||||||
|
<if test="params.type == 'invalid'"> and rep.status = 11</if>
|
||||||
<!--派单员-->
|
<!--派单员-->
|
||||||
<select id="preRepairList" resultMap="RepairResult">
|
<if test="params.role == 3">
|
||||||
<include refid="selectRepairVo"/>
|
<if test="params.type == 'wait'"> and status = 1</if>
|
||||||
where delete_flag = 0 and per_userid = #{userId}
|
<if test="params.type == 'already'"><![CDATA[ and (status>=5 and status<=13 and status<> 11)]]></if>
|
||||||
<if test="type == 'anew'">and status = 3</if>
|
</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 == 'close'">and status = 11</if>
|
|
||||||
<if test="repairName != null and repairName != ''"> AND repair_name LIKE CONCAT('%', #{repairName}, '%')</if>
|
|
||||||
order by create_time desc
|
|
||||||
</select>
|
|
||||||
<!--维修人员-->
|
<!--维修人员-->
|
||||||
<select id="workRepairList" resultMap="RepairResult">
|
<if test="params.role == 5">
|
||||||
<include refid="selectRepairVo"/>
|
<if test="params.type == 'wait'"> and status = 5</if>
|
||||||
where delete_flag = 0 and repair_user_id = #{userId}
|
<if test="params.type == 'process'"> and status = 7</if>
|
||||||
<if test="type == 'wait'">and status = 5</if>
|
<if test="params.type == 'end'"> and (status = 9 or status = 13)</if>
|
||||||
<if test="type == 'working'">and status = 7</if>
|
</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
|
|
||||||
</select>
|
|
||||||
<!--管理员-->
|
<!--管理员-->
|
||||||
<select id="adminRepairList" resultMap="RepairResult">
|
<if test="params.role == 7">
|
||||||
<include refid="selectRepairVo"/>
|
<if test="params.type == 'wait'"> and status = 1</if>
|
||||||
where delete_flag = 0
|
<if test="params.type == 'anew'"> and status = 3</if>
|
||||||
<if test="type == 'anew'">and status = 3</if>
|
<if test="params.type == 'already'"><![CDATA[ and (status>=5 and status<=13 and status<> 11)]]></if>
|
||||||
<if test="type == 'invalid'">and status = 11</if>
|
</if>
|
||||||
<if test="type == 'all'"></if>
|
<if test="params.beginTime != null and params.endTime != null"> and rep.create_time between #{params.beginTime} and #{params.endTime}</if>
|
||||||
<if test="repairName != null and repairName != ''"> AND repair_name LIKE CONCAT('%', #{repairName}, '%')</if>
|
<if test="sn != null and sn != ''"> AND rep.sn LIKE CONCAT('%', #{sn}, '%')</if>
|
||||||
|
<if test="repairLevel != null and repairLevel != ''"> AND rep.repair_level LIKE CONCAT('%', #{repairLevel}, '%')</if>
|
||||||
|
<if test="typeId != null"> AND rep.type_id = #{typeId}</if>
|
||||||
|
<if test="deviceId != null"> AND rep.device_id = #{deviceId}</if>
|
||||||
|
<if test="name != null and name != ''"> AND rep.name LIKE CONCAT('%', #{name}, '%')</if>
|
||||||
|
<if test="phone != null and phone != ''"> AND rep.phone LIKE CONCAT('%', #{phone}, '%')</if>
|
||||||
|
<if test="addressId != null"> AND rep.address_id = #{addressId}</if>
|
||||||
|
<if test="floorId != null"> AND rep.floor_id = #{floorId}</if>
|
||||||
|
<if test="room != null and room != ''"> AND rep.room LIKE CONCAT('%', #{room}, '%')</if>
|
||||||
|
<if test="explain != null and explain != ''"> AND rep.`explain` LIKE CONCAT('%', #{explain}, '%')</if>
|
||||||
|
<if test="failureTypeId != null"> AND rep.failure_type_id = #{failureTypeId}</if>
|
||||||
order by create_time desc
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="workerRepairNumber" resultType="Integer">
|
<select id="workerRepairNumber" resultType="Integer">
|
||||||
select count(id) from ics_repair where delete_flag=0 and repair_user_id = #{userId}
|
select count(id) from ics_repair where delete_flag=0 and repair_user_id = #{userId}
|
||||||
<if test="type == 'wait'">and status = 5</if>
|
<if test="type == 'wait'">and status = 5</if>
|
||||||
@ -252,20 +261,6 @@
|
|||||||
<if test="type == 'close'">and (status = 9 or status = 13)</if>
|
<if test="type == 'close'">and (status = 9 or status = 13)</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 楼层管理员 工单列表 -->
|
|
||||||
<select id="floorRepairList" resultMap="RepairResult">
|
|
||||||
select
|
|
||||||
rep.*
|
|
||||||
from
|
|
||||||
ics_repair rep,ics_repair_address_floor floor
|
|
||||||
where
|
|
||||||
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
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<delete id="deleteRepairById" parameterType="Long">
|
<delete id="deleteRepairById" parameterType="Long">
|
||||||
DELETE FROM ics_repair WHERE id = #{id}
|
DELETE FROM ics_repair WHERE id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user