fix(blood-transfusion): 修复P0/P1问题 - 字段映射/参数清理/tenant_id/Flyway版本
This commit is contained in:
@@ -5,8 +5,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import java.util.Map;
|
||||
public interface IBloodTransfusionAppService {
|
||||
void apply(BloodTransfusionRecord record);
|
||||
IPage<BloodTransfusionRecord> page(String patientName, String approvalStatus, String bloodComponent, Integer pageNum, Integer pageSize);
|
||||
void approve(Long id, String approvalStatus, String approverName, String remark);
|
||||
IPage<BloodTransfusionRecord> page(String approvalStatus, String bloodComponent, Integer pageNum, Integer pageSize);
|
||||
void approve(Long id, String approvalStatus, String approverName);
|
||||
void observe(BloodTransfusionObservation observation);
|
||||
Map<String, Object> getRecordDetail(Long id);
|
||||
}
|
||||
|
||||
@@ -23,11 +23,8 @@ public class BloodTransfusionAppServiceImpl implements IBloodTransfusionAppServi
|
||||
recordService.save(record);
|
||||
}
|
||||
@Override
|
||||
public IPage<BloodTransfusionRecord> page(String patientName, String approvalStatus, String bloodComponent, Integer pageNum, Integer pageSize) {
|
||||
public IPage<BloodTransfusionRecord> page(String approvalStatus, String bloodComponent, Integer pageNum, Integer pageSize) {
|
||||
LambdaQueryWrapper<BloodTransfusionRecord> w = new LambdaQueryWrapper<>();
|
||||
if (patientName != null && !patientName.isEmpty()) {
|
||||
w.like(BloodTransfusionRecord::getDoctorName, patientName);
|
||||
}
|
||||
if (approvalStatus != null && !approvalStatus.isEmpty()) {
|
||||
w.eq(BloodTransfusionRecord::getApprovalStatus, approvalStatus);
|
||||
}
|
||||
@@ -38,7 +35,7 @@ public class BloodTransfusionAppServiceImpl implements IBloodTransfusionAppServi
|
||||
return recordService.page(new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(pageNum, pageSize), w);
|
||||
}
|
||||
@Override
|
||||
public void approve(Long id, String approvalStatus, String approverName, String remark) {
|
||||
public void approve(Long id, String approvalStatus, String approverName) {
|
||||
BloodTransfusionRecord record = recordService.getById(id);
|
||||
if (record == null) {
|
||||
throw new RuntimeException("输血记录不存在");
|
||||
@@ -63,8 +60,7 @@ public class BloodTransfusionAppServiceImpl implements IBloodTransfusionAppServi
|
||||
Map<String, Object> result = new LinkedHashMap<>();
|
||||
BloodTransfusionRecord record = recordService.getById(id);
|
||||
if (record == null) {
|
||||
result.put("error", "记录不存在");
|
||||
return result;
|
||||
throw new RuntimeException("输血记录不存在");
|
||||
}
|
||||
result.put("record", record);
|
||||
List<BloodTransfusionObservation> observations = observationService.list(
|
||||
|
||||
@@ -22,21 +22,19 @@ public class BloodTransfusionController {
|
||||
@Operation(summary = "输血申请分页")
|
||||
@PreAuthorize("@ss.hasPermi('inpatient:bloodtransfusion:list')")
|
||||
@GetMapping("/page")
|
||||
public AjaxResult page(@RequestParam(required = false) String patientName,
|
||||
@RequestParam(required = false) String approvalStatus,
|
||||
public AjaxResult page(@RequestParam(required = false) String approvalStatus,
|
||||
@RequestParam(required = false) String bloodComponent,
|
||||
@RequestParam(defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(defaultValue = "10") Integer pageSize) {
|
||||
return AjaxResult.success(appService.page(patientName, approvalStatus, bloodComponent, pageNum, pageSize));
|
||||
return AjaxResult.success(appService.page(approvalStatus, bloodComponent, pageNum, pageSize));
|
||||
}
|
||||
@Operation(summary = "审批输血")
|
||||
@PreAuthorize("@ss.hasPermi('inpatient:bloodtransfusion:edit')")
|
||||
@PutMapping("/approve/{id}")
|
||||
public AjaxResult approve(@PathVariable Long id,
|
||||
@RequestParam String approvalStatus,
|
||||
@RequestParam(required = false) String approverName,
|
||||
@RequestParam(required = false) String remark) {
|
||||
appService.approve(id, approvalStatus, approverName, remark);
|
||||
@RequestParam(required = false) String approverName) {
|
||||
appService.approve(id, approvalStatus, approverName);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
@Operation(summary = "输血观察记录")
|
||||
|
||||
@@ -25,6 +25,7 @@ CREATE TABLE blood_transfusion_record (
|
||||
adverse_reaction TEXT,
|
||||
adverse_reaction_type VARCHAR(50),
|
||||
status VARCHAR(20) DEFAULT 'DRAFT',
|
||||
tenant_id INTEGER DEFAULT 0,
|
||||
del_flag CHAR(1) DEFAULT '0',
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
create_by VARCHAR(64),
|
||||
@@ -45,6 +46,7 @@ CREATE TABLE blood_transfusion_observation (
|
||||
symptoms TEXT,
|
||||
nurse_id BIGINT,
|
||||
nurse_name VARCHAR(50),
|
||||
tenant_id INTEGER DEFAULT 0,
|
||||
del_flag CHAR(1) DEFAULT '0',
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
create_by VARCHAR(64)
|
||||
Reference in New Issue
Block a user