修改系统管理模块查询条件
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
This commit is contained in:
parent
d0f8b86d40
commit
eb3cdfab56
@ -1,5 +1,7 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.apiconfig;
|
||||
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
||||
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
|
||||
import com.mzt.logapi.starter.annotation.LogRecord;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -22,6 +24,7 @@ import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
|
||||
import cn.iocoder.yudao.module.system.controller.admin.apiconfig.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.apiconfig.ApiconfigDO;
|
||||
@ -39,7 +42,8 @@ public class ApiconfigController {
|
||||
|
||||
@Resource
|
||||
private ApiconfigService apiconfigService;
|
||||
|
||||
@Resource
|
||||
private AdminUserService userService;
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建接口配置")
|
||||
@PreAuthorize("@ss.hasPermission('system:apiconfig:create')")
|
||||
@ -118,6 +122,13 @@ public class ApiconfigController {
|
||||
@Operation(summary = "获得接口配置分页")
|
||||
@PreAuthorize("@ss.hasPermission('system:apiconfig:query')")
|
||||
public CommonResult<PageResult<ApiconfigRespVO>> getApiconfigPage(@Valid ApiconfigPageReqVO pageReqVO) {
|
||||
//获取当前登陆用户
|
||||
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||
String creator=user.getCreator();
|
||||
if(!creator.equals("admin"))
|
||||
{
|
||||
pageReqVO.setOrgId(user.getOrgId());
|
||||
}
|
||||
PageResult<ApiconfigDO> pageResult = apiconfigService.getApiconfigPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ApiconfigRespVO.class));
|
||||
}
|
||||
|
@ -114,6 +114,13 @@ public class DepartmentController {
|
||||
@Operation(summary = "获得科室管理分页")
|
||||
@PreAuthorize("@ss.hasPermission('system:department:query')")
|
||||
public CommonResult<PageResult<DepartmentRespVO>> getDepartmentPage(@Valid DepartmentPageReqVO pageReqVO) {
|
||||
//获取当前登陆用户
|
||||
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||
String creator=user.getCreator();
|
||||
if(!creator.equals("admin"))
|
||||
{
|
||||
pageReqVO.setOrgId(user.getOrgId());
|
||||
}
|
||||
PageResult<DepartmentDO> pageResult = departmentService.getDepartmentPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, DepartmentRespVO.class));
|
||||
}
|
||||
|
@ -100,6 +100,13 @@ public class DoctorController {
|
||||
@Operation(summary = "获得医生管理分页")
|
||||
@PreAuthorize("@ss.hasPermission('doctor::query')")
|
||||
public CommonResult<PageResult<DoctorRespVO>> getPage(@Valid DoctorPageReqVO pageReqVO) {
|
||||
//获取当前登陆用户
|
||||
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||
String creator=user.getCreator();
|
||||
if(!creator.equals("admin"))
|
||||
{
|
||||
pageReqVO.setOrgId(user.getOrgId());
|
||||
}
|
||||
PageResult<DoctorDO> pageResult = Service.getPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, DoctorRespVO.class));
|
||||
}
|
||||
@ -131,6 +138,7 @@ public class DoctorController {
|
||||
@Operation(summary = "获得医生全部list")
|
||||
@PreAuthorize("@ss.hasPermission('doctor::query')")
|
||||
public CommonResult<List<DoctorDO>> getAlllist() {
|
||||
|
||||
List<DoctorDO> doctorDOs= Service.getDoctorList(null);
|
||||
return success(doctorDOs);
|
||||
}
|
||||
|
@ -21,4 +21,6 @@ public class DoctorPageReqVO extends PageParam {
|
||||
@Schema(description = "科室名称", example = "王五")
|
||||
private String departmentName;
|
||||
|
||||
private String orgId;
|
||||
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.exampart;
|
||||
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
||||
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@ -12,6 +14,7 @@ import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import cn.iocoder.yudao.module.system.controller.admin.exampart.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.exampart.*;
|
||||
@ -24,6 +27,7 @@ import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
|
||||
@Tag(name = "管理后台 - 检查部位")
|
||||
@RestController
|
||||
@ -33,6 +37,8 @@ public class ExampartController {
|
||||
|
||||
@Resource
|
||||
private ExampartService exampartService;
|
||||
@Resource
|
||||
private AdminUserService userService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建检查部位")
|
||||
@ -71,8 +77,17 @@ public class ExampartController {
|
||||
@Operation(summary = "获得检查部位")
|
||||
@PreAuthorize("@ss.hasPermission('test:exampart:query')")
|
||||
public CommonResult<List<ExampartDO>> getExampartlist() {
|
||||
//获取当前登陆用户
|
||||
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||
String creator=user.getCreator();
|
||||
|
||||
List<ExampartDO> examparts = exampartService.getExampartlist();
|
||||
return success(examparts);
|
||||
// 筛选
|
||||
List<ExampartDO> filteredList = examparts.stream()
|
||||
.filter(ep -> user.getOrgId().equals(ep.getOrgId()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
return success(filteredList);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
|
@ -1,6 +1,8 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.org;
|
||||
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
||||
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
|
||||
import com.mzt.logapi.context.LogRecordContext;
|
||||
import com.mzt.logapi.starter.annotation.LogRecord;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -25,6 +27,7 @@ import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
import static cn.iocoder.yudao.module.system.enums.LogRecordConstants.*;
|
||||
|
||||
import cn.iocoder.yudao.module.system.controller.admin.org.vo.*;
|
||||
@ -43,7 +46,8 @@ public class OrgUnitController {
|
||||
|
||||
@Resource
|
||||
private OrgUnitService Service;
|
||||
|
||||
@Resource
|
||||
private AdminUserService userService;
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建机构管理")
|
||||
@PreAuthorize("@ss.hasPermission('org::create')")
|
||||
@ -111,6 +115,13 @@ public class OrgUnitController {
|
||||
@Operation(summary = "获得机构管理分页")
|
||||
@PreAuthorize("@ss.hasPermission('org::query')")
|
||||
public CommonResult<PageResult<OrgUnitRespVO>> getPage(@Valid OrgUnitPageReqVO pageReqVO) {
|
||||
//获取当前登陆用户
|
||||
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||
String creator=user.getCreator();
|
||||
if(!creator.equals("admin"))
|
||||
{
|
||||
pageReqVO.setOrgID(user.getOrgId());
|
||||
}
|
||||
PageResult<OrgUnitDO> pageResult = Service.getPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, OrgUnitRespVO.class));
|
||||
}
|
||||
|
@ -14,6 +14,9 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||
@ToString(callSuper = true)
|
||||
public class OrgUnitPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "机构ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7824")
|
||||
private String orgID;
|
||||
|
||||
@Schema(description = "机构名称", example = "王五")
|
||||
private String orgName;
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.wx;
|
||||
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
||||
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -22,6 +24,7 @@ import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
|
||||
import cn.iocoder.yudao.module.system.controller.admin.wx.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.wx.WxDO;
|
||||
@ -39,6 +42,8 @@ public class WxController {
|
||||
|
||||
@Resource
|
||||
private WxService wxService;
|
||||
@Resource
|
||||
private AdminUserService userService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建微信通知管理")
|
||||
@ -83,6 +88,13 @@ public class WxController {
|
||||
@Operation(summary = "获得微信通知管理分页")
|
||||
@PreAuthorize("@ss.hasPermission('system:wx:query')")
|
||||
public CommonResult<PageResult<WxRespVO>> getWxPage(@Valid WxPageReqVO pageReqVO) {
|
||||
//获取当前登陆用户
|
||||
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||
String creator=user.getCreator();
|
||||
if(!creator.equals("admin"))
|
||||
{
|
||||
pageReqVO.setOrgId(user.getOrgId());
|
||||
}
|
||||
PageResult<WxDO> pageResult = wxService.getWxPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, WxRespVO.class));
|
||||
}
|
||||
|
@ -26,4 +26,6 @@ public class WxPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "是否删除")
|
||||
private String isdelete;
|
||||
@Schema(description = "机构ID")
|
||||
private String orgId;
|
||||
}
|
@ -23,18 +23,9 @@ public interface ApiconfigMapper extends BaseMapperX<ApiconfigDO> {
|
||||
|
||||
default PageResult<ApiconfigDO> selectPage(ApiconfigPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ApiconfigDO>()
|
||||
//.eqIfPresent(ApiconfigDO::getOrgId, reqVO.getOrgId())
|
||||
.eqIfPresent(ApiconfigDO::getOrgId, reqVO.getOrgId())
|
||||
.eqIfPresent(ApiconfigDO::getApiType, reqVO.getApiType())
|
||||
.likeIfPresent(ApiconfigDO::getApiName, reqVO.getApiName())
|
||||
// .eqIfPresent(ApiconfigDO::getApiUrl, reqVO.getApiUrl())
|
||||
// .eqIfPresent(ApiconfigDO::getDatabaseType, reqVO.getDatabaseType())
|
||||
// .eqIfPresent(ApiconfigDO::getDatabaseIP, reqVO.getDatabaseIP())
|
||||
// .eqIfPresent(ApiconfigDO::getDatabasePort, reqVO.getDatabasePort())
|
||||
// .likeIfPresent(ApiconfigDO::getDatabaseUserName, reqVO.getDatabaseUserName())
|
||||
// .eqIfPresent(ApiconfigDO::getDatabasePwd, reqVO.getDatabasePwd())
|
||||
// .eqIfPresent(ApiconfigDO::getSoftwareManufacturer, reqVO.getSoftwareManufacturer())
|
||||
// .eqIfPresent(ApiconfigDO::getIsdelete, reqVO.getIsdelete())
|
||||
// .eqIfPresent(ApiconfigDO::getRemark, reqVO.getRemark())
|
||||
.likeIfPresent(ApiconfigDO::getApiCode, reqVO.getApiCode())
|
||||
.eq(ApiconfigDO::getIsdelete, '0')
|
||||
.orderByDesc(ApiconfigDO::getId));
|
||||
|
@ -33,6 +33,7 @@ public interface DoctorMapper extends BaseMapperX<DoctorDO> {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<DoctorDO>()
|
||||
.likeIfPresent(DoctorDO::getDoctorName, reqVO.getDoctorName())
|
||||
.likeIfPresent(DoctorDO::getDepartmentName, reqVO.getDepartmentName())
|
||||
.eqIfPresent(DoctorDO::getOrgId,reqVO.getOrgId())
|
||||
.eq(DoctorDO::getIsdelete, '0')
|
||||
.orderByAsc(DoctorDO::getDoctorName));
|
||||
}
|
||||
|
@ -31,11 +31,9 @@ public interface OrgUnitMapper extends BaseMapperX<OrgUnitDO> {
|
||||
.eqIfPresent(OrgUnitDO::getContactPerson, reqVO.getContactPerson())
|
||||
.likeIfPresent(OrgUnitDO::getReportName, reqVO.getReportName())
|
||||
.eqIfPresent(OrgUnitDO::getHighLevelOrgID, reqVO.getHighLevelOrgID())
|
||||
.eqIfPresent(OrgUnitDO::getWxOpenidlist, reqVO.getWxOpenidlist())
|
||||
.eqIfPresent(OrgUnitDO::getOrgSN, reqVO.getOrgSN())
|
||||
.betweenIfPresent(OrgUnitDO::getCreateDate, reqVO.getCreateDate())
|
||||
.likeIfPresent(OrgUnitDO::getHighLevelOrgName, reqVO.getHighLevelOrgName())
|
||||
.eqIfPresent(OrgUnitDO::getOrgLogoUrl, reqVO.getOrgLogoUrl())
|
||||
.eqIfPresent(OrgUnitDO::getOrgID, reqVO.getOrgID())
|
||||
.eq(OrgUnitDO::getIsdelete, '0')
|
||||
.orderByDesc(OrgUnitDO::getOrgID));
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ public interface WxMapper extends BaseMapperX<WxDO> {
|
||||
.likeIfPresent(WxDO::getWxUserid, reqVO.getWxUserid())
|
||||
.likeIfPresent(WxDO::getBindTel, reqVO.getBindTel())
|
||||
.likeIfPresent(WxDO::getPersonName, reqVO.getPersonName())
|
||||
.eqIfPresent(WxDO::getOrgId,reqVO.getOrgId())
|
||||
.eq(WxDO::getIsdelete, '0')
|
||||
.orderByDesc(WxDO::getId));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user