维护系统->检查方法、部位条件搜索前后端实现
This commit is contained in:
@@ -3,6 +3,7 @@ package com.openhis.web.check.appservice;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.check.domain.CheckMethod;
|
||||
import io.swagger.models.auth.In;
|
||||
|
||||
|
||||
/**
|
||||
@@ -21,5 +22,5 @@ public interface ICheckMethodAppService{
|
||||
|
||||
R<?> removeCheckMethod(Integer checkMethodId);
|
||||
|
||||
|
||||
R<?> searchCheckMethodList(Integer pageNo, Integer pageSize, String checkTpye, String name, String packageName);
|
||||
}
|
||||
|
||||
@@ -11,4 +11,6 @@ public interface ICheckPartAppService {
|
||||
R<?> removeCheckPart(Integer checkPartId);
|
||||
|
||||
R<?> updateCheckPart(CheckPart checkPart);
|
||||
|
||||
R<?> searchCheckPartList(Integer pageNo, Integer pageSize, String checkTpye, String name, String packageName);
|
||||
}
|
||||
|
||||
@@ -2,12 +2,10 @@ package com.openhis.web.check.appservice.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.check.domain.CheckMethod;
|
||||
import com.openhis.check.service.ICheckMethodService;
|
||||
import com.openhis.web.check.appservice.ICheckMethodAppService;
|
||||
import com.openhis.web.check.dto.CheckMethodDto;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -27,6 +25,22 @@ public class CheckMethodAppServiceImpl implements ICheckMethodAppService {
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchCheckMethodList(Integer pageNo, Integer pageSize, String checkTpye, String name, String packageName) {
|
||||
LambdaQueryWrapper<CheckMethod> wrapper = new LambdaQueryWrapper<>();
|
||||
if (checkTpye != null && ObjectUtil.isNotEmpty(checkTpye)) {
|
||||
wrapper.eq(CheckMethod::getCheckType, checkTpye);
|
||||
}
|
||||
if (name != null && ObjectUtil.isNotEmpty(name)) {
|
||||
wrapper.like(CheckMethod::getName, name);
|
||||
}
|
||||
if (packageName != null && ObjectUtil.isNotEmpty(packageName)) {
|
||||
wrapper.eq(CheckMethod::getPackageName, packageName);
|
||||
}
|
||||
List<CheckMethod> list = checkMethodService.list(wrapper);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> addCheckMethod(CheckMethod checkMethod) {
|
||||
//1.数据校验
|
||||
@@ -66,6 +80,4 @@ public class CheckMethodAppServiceImpl implements ICheckMethodAppService {
|
||||
boolean remove = checkMethodService.removeById(checkMethodId);
|
||||
return R.ok(remove);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@ package com.openhis.web.check.appservice.impl;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.check.domain.CheckMethod;
|
||||
import com.openhis.check.domain.CheckPart;
|
||||
import com.openhis.check.service.ICheckPartService;
|
||||
import com.openhis.web.check.appservice.ICheckPartAppService;
|
||||
import com.openhis.web.check.dto.CheckPartDto;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -23,6 +23,22 @@ public class CheckPartAppServiceImpl implements ICheckPartAppService {
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchCheckPartList(Integer pageNo, Integer pageSize, String checkTpye, String name, String packageName) {
|
||||
LambdaQueryWrapper<CheckPart> wrapper = new LambdaQueryWrapper<>();
|
||||
if (checkTpye != null && ObjectUtil.isNotEmpty(checkTpye)) {
|
||||
wrapper.eq(CheckPart::getCheckType, checkTpye);
|
||||
}
|
||||
if (name != null && ObjectUtil.isNotEmpty(name)) {
|
||||
wrapper.like(CheckPart::getName, name);
|
||||
}
|
||||
if (packageName != null && ObjectUtil.isNotEmpty(packageName)) {
|
||||
wrapper.eq(CheckPart::getPackageName, packageName);
|
||||
}
|
||||
List<CheckPart> list = checkPartService.list(wrapper);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> addCheckPart(CheckPart checkPart) {
|
||||
//数据检验
|
||||
|
||||
@@ -18,13 +18,27 @@ public class CheckMethodController {
|
||||
|
||||
/*
|
||||
* 获取检查方法
|
||||
* @Param检查方法 此处参数注释有问题,完全是按照需求给的图来注释的
|
||||
* @Param 此处参数注释有问题,完全是按照需求给的图来注释的
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public R<?> getCheckMethodList(){
|
||||
return R.ok(checkMethodAppService.getCheckMethodList());
|
||||
}
|
||||
|
||||
/*
|
||||
* 条件查询检查方法
|
||||
* @Para
|
||||
* */
|
||||
@GetMapping("/search")
|
||||
public R<?> searchCheckMethodList(
|
||||
@RequestParam(required = false) Integer pageNo,
|
||||
@RequestParam(required = false) Integer pageSize,
|
||||
@RequestParam(required = false) String checkTpye,
|
||||
@RequestParam(required = false) String name,
|
||||
@RequestParam(required = false) String packageName) {
|
||||
return R.ok(checkMethodAppService.searchCheckMethodList(pageNo,pageSize,checkTpye,name,packageName));
|
||||
}
|
||||
|
||||
/*
|
||||
* 新增检查方法
|
||||
* @Param
|
||||
|
||||
@@ -24,6 +24,19 @@ public class CheckPartController {
|
||||
return R.ok(checkPartAppService.getCheckPartList());
|
||||
}
|
||||
|
||||
/*
|
||||
* 条件搜索检查部位
|
||||
* @Param
|
||||
* */
|
||||
@GetMapping("/search")
|
||||
public R<?> searchCheckPartList(@RequestParam(required = false) Integer pageNo,
|
||||
@RequestParam(required = false) Integer pageSize,
|
||||
@RequestParam(required = false) String checkTpye,
|
||||
@RequestParam(required = false) String name,
|
||||
@RequestParam(required = false) String packageName){
|
||||
return R.ok(checkPartAppService.searchCheckPartList(pageNo,pageSize,checkTpye,name,packageName));
|
||||
}
|
||||
|
||||
/*
|
||||
* 新增检查部位
|
||||
* @Param
|
||||
|
||||
Reference in New Issue
Block a user