mirror of
https://gitee.com/elegant_wings/dbd-meeting.git
synced 2025-06-21 21:49:37 +08:00
新增了根据分类查询维修人接口
This commit is contained in:
parent
ef2fdb2e50
commit
c7265b67d7
@ -179,12 +179,21 @@ public class RepairDeviceTypeController extends BaseController {
|
||||
/**
|
||||
* 获取普通用户列表(新增为维修人或者派单员)
|
||||
*/
|
||||
/**
|
||||
* 根据设备类型id查询关联的派单员、维修人员
|
||||
*/
|
||||
@RequiresPermissions("RepairDeviceType:type:view")
|
||||
@GetMapping("selectUserListByType")
|
||||
public R selectUserListByType() {
|
||||
return R.data(customerStaffService.selectUserListByType());
|
||||
@GetMapping("selectWorkerIdByTypeId")
|
||||
public R selectWorkerIdByTypeId( Long typeId) {
|
||||
List<RepairRelational> repairRelationals = repairRelationalService.selectWorkerIdByTypeId(typeId);
|
||||
for (RepairRelational repairRelational : repairRelationals) {
|
||||
if (repairRelational.getUserId() != null && repairRelational.getUserId() > 0) {
|
||||
IcsCustomerStaff repairUser = customerStaffService.selectIcsCustomerStaffById(repairRelational.getUserId());
|
||||
repairRelational.setUserName(repairUser.getUsername());
|
||||
}
|
||||
}
|
||||
return R.data(repairRelationals);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.ics.admin.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ics.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
@ -35,6 +36,14 @@ public class RepairRelational extends BaseEntity<RepairRelational> {
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String userName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String userPhone;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -62,4 +62,7 @@ public interface IRepairRelationalService extends IService<RepairRelational> {
|
||||
List<RepairRelational> selectByTypeId(Long id);
|
||||
|
||||
int deleteByTypeId(Long id);
|
||||
|
||||
List<RepairRelational> selectWorkerIdByTypeId(Long typeId);
|
||||
|
||||
}
|
||||
|
@ -105,4 +105,13 @@ public class RepairRelationalServiceImpl extends ServiceImpl<RepairRelationalMap
|
||||
wrapper.eq("type_id",id);
|
||||
return repairRelationalMapper.delete(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RepairRelational> selectWorkerIdByTypeId(Long id) {
|
||||
|
||||
QueryWrapper<RepairRelational> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("type_id",id);
|
||||
wrapper.eq("kind",3);
|
||||
return repairRelationalMapper.selectList(wrapper);
|
||||
}
|
||||
}
|
||||
|
@ -1,15 +1,10 @@
|
||||
package com.ics.controller.mobile.member;
|
||||
|
||||
|
||||
import com.ics.admin.domain.RepairAddress;
|
||||
import com.ics.admin.domain.RepairAddressFloor;
|
||||
import com.ics.admin.domain.RepairDevice;
|
||||
import com.ics.admin.domain.RepairDeviceType;
|
||||
import com.ics.admin.service.IRepairAddressFloorService;
|
||||
import com.ics.admin.service.IRepairAddressService;
|
||||
import com.ics.admin.service.IRepairDeviceService;
|
||||
import com.ics.admin.service.IRepairDeviceTypeService;
|
||||
import com.ics.admin.domain.*;
|
||||
import com.ics.admin.service.*;
|
||||
import com.ics.common.core.controller.BaseController;
|
||||
import com.ics.common.core.domain.IcsCustomerStaff;
|
||||
import com.ics.common.core.domain.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -17,6 +12,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/repairDeviceApi")
|
||||
public class RepairDeviceAddressApiController extends BaseController {
|
||||
@ -34,6 +31,13 @@ public class RepairDeviceAddressApiController extends BaseController {
|
||||
@Autowired
|
||||
private IRepairDeviceTypeService repairDeviceTypeService;
|
||||
|
||||
@Autowired
|
||||
private IRepairRelationalService repairRelationalService;
|
||||
|
||||
@Autowired
|
||||
private IIcsCustomerStaffService customerStaffService;
|
||||
|
||||
|
||||
// 获取所有的地区接口
|
||||
@RequiresPermissions("member:center:view")
|
||||
@GetMapping("selectAddressList")
|
||||
@ -61,4 +65,21 @@ public class RepairDeviceAddressApiController extends BaseController {
|
||||
return result(repairDeviceTypeService.selectRepairDeviceTypeList(repairType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据设备类型查询维修人员
|
||||
*/
|
||||
@RequiresPermissions("member:center:view")
|
||||
@GetMapping("selectWorkerIdByTypeId")
|
||||
public R selectWorkerIdByTypeId( Long typeId) {
|
||||
List<RepairRelational> repairRelationals = repairRelationalService.selectWorkerIdByTypeId(typeId);
|
||||
for (RepairRelational repairRelational : repairRelationals) {
|
||||
if (repairRelational.getUserId() != null && repairRelational.getUserId() > 0) {
|
||||
IcsCustomerStaff repairUser = customerStaffService.selectIcsCustomerStaffById(repairRelational.getUserId());
|
||||
repairRelational.setUserName(repairUser.getUsername());
|
||||
repairRelational.setUserPhone(repairUser.getToPhone());
|
||||
}
|
||||
}
|
||||
return result(repairRelationals);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user