mirror of
https://gitee.com/elegant_wings/dbd-meeting.git
synced 2025-06-22 01:19:37 +08:00
表结构更新
This commit is contained in:
parent
e503155804
commit
47d1add919
@ -10,8 +10,8 @@ import com.ics.admin.service.IRepairService;
|
|||||||
import com.ics.admin.utils.RepairDTO;
|
import com.ics.admin.utils.RepairDTO;
|
||||||
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.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;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
@ -44,9 +44,6 @@ public class RepairController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IRepairAttachService repairAttachService;
|
private IRepairAttachService repairAttachService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IIcsCustomerStaffService customerStaffService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报修
|
* 报修
|
||||||
*/
|
*/
|
||||||
@ -81,25 +78,23 @@ public class RepairController extends BaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 工单列表
|
* 工单列表
|
||||||
|
* menu:1.保修查询,3派单入口,5维修入口, 7 管理员
|
||||||
* <p>
|
* <p>
|
||||||
* 1.普通用户,3派单员,5维修工, 7管理员
|
* 报修查询:全部、处理中、待评价、已评价 type对应值:all、process、evaling、evaled
|
||||||
* <p>
|
* 派单入口:重新派单、待派单、已派单、已关闭 type对应值:anew、wait、already、close
|
||||||
* 普通用户:全部、处理中、待评价、已评价 type对应值:all、process、evaling、evaled
|
* 维修入口:待完成、进行中、已完成 type对应值:wait、working、close
|
||||||
* 派单员:重新派单、待派单、已派单、已关闭 type对应值:anew、wait、already、close
|
* 管理员:重派单,全部 type对应值:anew、all 【小程序暂时用不到】
|
||||||
* 维修工:待完成、进行中、已完成 type对应值:wait、working、close
|
* </p>
|
||||||
* 管理员:重派单,全部 type对应值:anew、all
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions(value = {"repair:attach:operator", "member:center:view"}, logical = Logical.OR)
|
@RequiresPermissions(value = {"repair:attach:operator", "member:center:view"}, logical = Logical.OR)
|
||||||
@RequestMapping("list")
|
@RequestMapping("list")
|
||||||
public R list(@RequestBody String type) {
|
public R list(@RequestBody Map<String, String> map) {
|
||||||
|
String type = map.get("type");
|
||||||
|
String menu = map.get("menu");
|
||||||
|
if (StringUtils.isBlank(type) || StringUtils.isBlank(menu)) return R.error();
|
||||||
startPage();
|
startPage();
|
||||||
Long userId = getLoginStaffId();
|
Long userId = getLoginStaffId();
|
||||||
IcsCustomerStaff loginUser = customerStaffService.selectIcsCustomerStaffById(userId);
|
return result(repairService.repairList(menu, userId.toString(), type));
|
||||||
//1.普通用户,3派单员,5维修人, 7管理员
|
|
||||||
String role = loginUser.getDataType();
|
|
||||||
return result(repairService.repairList(role, userId.toString(), type));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -172,7 +172,7 @@ public class Repair extends BaseEntity<Repair> {
|
|||||||
private Date timeout;
|
private Date timeout;
|
||||||
|
|
||||||
/** 预警状态, 默认0 没有预警;设置时间后 1 绿色 3橙色 5红色 */
|
/** 预警状态, 默认0 没有预警;设置时间后 1 绿色 3橙色 5红色 */
|
||||||
private Integer warn;
|
private Integer warn = 0;
|
||||||
|
|
||||||
//工单状态,流程相关
|
//工单状态,流程相关
|
||||||
/**
|
/**
|
||||||
|
@ -37,9 +37,10 @@ public interface IRepairService extends IService<Repair> {
|
|||||||
Repair selectRepairById(Long id);
|
Repair selectRepairById(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param menu 1.普通用户,3派单员,5维修人, 7管理员
|
||||||
* 查询工单列表
|
* 查询工单列表
|
||||||
*/
|
*/
|
||||||
List<Repair> repairList(String role, String userId, String type);
|
List<Repair> repairList(String menu, String userId, String type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增工单
|
* 新增工单
|
||||||
|
@ -221,11 +221,11 @@ public class RepairServiceImpl extends ServiceImpl<RepairMapper, Repair> impleme
|
|||||||
* 查询工单列表
|
* 查询工单列表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Repair> repairList(String role, String userId, String type) {
|
public List<Repair> repairList(String menu, String userId, String type) {
|
||||||
//1.普通用户,3派单员,5维修人, 7管理员
|
//1.普通用户,3派单员,5维修人, 7管理员
|
||||||
if ("7".equals(role)) return repairMapper.adminRepairList(userId, type);
|
if ("7".equals(menu)) return repairMapper.adminRepairList(userId, type);
|
||||||
if ("5".equals(role)) return repairMapper.workRepairList(userId, type);
|
if ("5".equals(menu)) return repairMapper.workRepairList(userId, type);
|
||||||
if ("3".equals(role)) return repairMapper.preRepairList(userId, type);
|
if ("3".equals(menu)) return repairMapper.preRepairList(userId, type);
|
||||||
return repairMapper.normalRepairList(userId, type);//普通用户或者没有角色时都使用普通用户列表
|
return repairMapper.normalRepairList(userId, type);//普通用户或者没有角色时都使用普通用户列表
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user