表结构更新

This commit is contained in:
lujiang 2024-08-13 15:42:30 +08:00
parent e503155804
commit 47d1add919
4 changed files with 19 additions and 23 deletions

View File

@ -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对应值allprocessevalingevaled
* <p> * 派单入口重新派单待派单已派单已关闭 type对应值anewwaitalreadyclose
* 普通用户全部处理中待评价已评价 type对应值allprocessevalingevaled * 维修入口待完成进行中已完成 type对应值waitworkingclose
* 派单员重新派单待派单已派单已关闭 type对应值anewwaitalreadyclose * 管理员重派单全部 type对应值anewall 小程序暂时用不到
* 维修工待完成进行中已完成 type对应值waitworkingclose * </p>
* 管理员重派单全部 type对应值anewall
*
* @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));
} }
/** /**

View File

@ -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;
//工单状态流程相关 //工单状态流程相关
/** /**

View File

@ -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);
/** /**
* 新增工单 * 新增工单

View File

@ -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);//普通用户或者没有角色时都使用普通用户列表
} }