Fix Bug #550: AI修复
This commit is contained in:
@@ -28,7 +28,7 @@ public class CheckRequestController {
|
||||
|
||||
@PostMapping("/submit")
|
||||
public void submit(@RequestBody List<Map<String, Object>> selected) {
|
||||
// 校验:同一检查项目只能提交一次
|
||||
// 校验:同一检查项目只能提交一次,且项目与方法解耦
|
||||
checkRequestService.validateAndSubmit(selected);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.openhis.web.outpatient.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface CheckRequestService {
|
||||
List<Map<String, Object>> listPendingRequests();
|
||||
void validateAndSubmit(List<Map<String, Object>> selected);
|
||||
}
|
||||
@@ -59,10 +59,10 @@ public class CheckRequestServiceImpl implements CheckRequestService {
|
||||
|
||||
List<String> existing = checkRequestMapper.selectExistingItemCodes(itemCodes);
|
||||
if (!existing.isEmpty()) {
|
||||
throw new IllegalArgumentException("以下检查项目已存在未完成的申请,请先处理:" + existing);
|
||||
throw new IllegalArgumentException("以下项目已存在待处理申请,请勿重复提交:" + existing);
|
||||
}
|
||||
|
||||
// 3. 批量插入新申请记录
|
||||
// 3. 批量插入(项目与方法解耦,仅保存主项,方法明细按需扩展)
|
||||
checkRequestMapper.batchInsertRequests(selected);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user