医案添加删除修改

This commit is contained in:
wuchunlei
2023-11-24 14:50:16 +08:00
parent eee5f460f2
commit d33f24113c
2 changed files with 3 additions and 15 deletions

View File

@@ -64,12 +64,6 @@ public class BookMedicalRecordsController {
@RequestMapping("/saveOrUpdate")
public R save(@RequestBody BookMedicalRecordsEntity entity){
try {
if (entity.getSort()==null){
entity.setSort(1);
}
if (entity.getDelFlag()==null){
entity.setDelFlag(0);
}
bookMedicalRecordsService.saveOrUpdate(entity);
return R.ok();
}catch (Exception e) {
@@ -82,11 +76,7 @@ public class BookMedicalRecordsController {
@RequestMapping("/del")
public R del(Integer medicalRecordsId){
try {
BookMedicalRecordsEntity entity = bookMedicalRecordsService.getOne(
new QueryWrapper<BookMedicalRecordsEntity>()
.eq("medical_records_id", medicalRecordsId));
entity.setDelFlag(1);
bookMedicalRecordsService.updateById(entity);
bookMedicalRecordsService.removeById(medicalRecordsId);
return R.ok();
}catch (Exception e) {
return R.error("删除失败:"+e.getMessage());