新增方法 根据体检编号删除患者体检项目
This commit is contained in:
parent
2daf02b9e6
commit
eee98f24ce
@ -69,6 +69,13 @@ public class InspectPatientitemsController {
|
||||
patientitemsService.deletePatientitems(id);
|
||||
return success(true);
|
||||
}
|
||||
@DeleteMapping("/deletemedicalSn")
|
||||
@Operation(summary = "根据体检编号删除患者体检项目")
|
||||
public CommonResult<Boolean> deletePatientmedicalSn(@RequestParam("medicalSn") String medicalSn)
|
||||
{
|
||||
patientitemsService.deletePatientitemcode(medicalSn);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得患者体检项目")
|
||||
|
@ -44,6 +44,10 @@ public interface InspectPatientitemsService {
|
||||
* @param id 编号
|
||||
*/
|
||||
void deletePatientitems(Integer id);
|
||||
/*
|
||||
* 根据条件编号删除对应的数据
|
||||
* */
|
||||
void deletePatientitemcode(String medicalSn);
|
||||
|
||||
/**
|
||||
* 获得患者体检项目
|
||||
|
@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.inspect.service.inspectpatientitems;
|
||||
import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectpatient.InspectPatientDO;
|
||||
import cn.iocoder.yudao.module.inspect.dal.mysql.inspectpatient.InspectPatientMapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -73,6 +74,15 @@ public class InspectPatientitemsServiceImpl implements InspectPatientitemsServic
|
||||
// 删除
|
||||
patientitemsMapper.deleteById(id);
|
||||
}
|
||||
@Override
|
||||
public void deletePatientitemcode(String medicalSn)
|
||||
{
|
||||
QueryWrapper<InspectPatientitemsDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("medicalSn", medicalSn);
|
||||
patientitemsMapper.delete(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void validatePatientitemsExists(Integer id) {
|
||||
if (patientitemsMapper.selectById(id) == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user