feat(parse-pqdif): 重构PQDIF文件存储及解析功能
- 引入PqdifFileStorageService组件实现PQDIF原始文件本地存储 - 修改application.yml添加parse-pqdif.storage.path配置项 - 更新CsPqdifPath相关实体类将pqdifContent改为filePath存储路径 - 重构CsPqdifPathController中的文件上传处理逻辑 - 新增PqdifRecognizeResultVO支持PQDIF二次解析结果结构 - 实现ParsePqdifService接口支持可识别数据解析功能 - 添加PqdifSecondParseComponent进行底层解析结果转换 - 新增桌面PQDIF文件测试程序便于调试验证 - 为CsIcdPath增加referenceIcdId字段及相应测试用例
This commit is contained in:
@@ -30,6 +30,9 @@ public class CsIcdPathParam {
|
||||
@ApiModelProperty("ICD类型,1-手动录入的标准ICD,2-手动录入的非标准ICD,3-上游解析传递的标准ICD,4-上游解析传递的非标准ICD")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("标准ICD引用ID")
|
||||
private String referenceIcdId;
|
||||
|
||||
/**
|
||||
* ICD 存储记录编辑参数。
|
||||
*/
|
||||
|
||||
@@ -189,6 +189,7 @@ public class CsIcdPathServiceImpl implements CsIcdPathService {
|
||||
icdPath.setAngle(param.getAngle());
|
||||
icdPath.setUsePhaseIndex(param.getUsePhaseIndex());
|
||||
icdPath.setType(useDefaultType ? resolveIcdType(param.getType()) : param.getType());
|
||||
icdPath.setReferenceIcdId(trimToNull(param.getReferenceIcdId()));
|
||||
return icdPath;
|
||||
}
|
||||
|
||||
|
||||
@@ -100,6 +100,20 @@ class CsIcdPathServiceImplTest {
|
||||
Assertions.assertArrayEquals(fileContent, captor.getValue().getIcdContent());
|
||||
}
|
||||
|
||||
@Test
|
||||
void addIcdPathShouldSaveReferenceIcdId() {
|
||||
CsIcdPathParam param = buildParam("非标准ICD");
|
||||
param.setReferenceIcdId(" reference-icd ");
|
||||
when(csIcdPathMapper.insert(any(CsIcdPathPO.class))).thenReturn(1);
|
||||
|
||||
boolean result = service.addIcdPath(param);
|
||||
|
||||
ArgumentCaptor<CsIcdPathPO> captor = ArgumentCaptor.forClass(CsIcdPathPO.class);
|
||||
verify(csIcdPathMapper).insert(captor.capture());
|
||||
Assertions.assertTrue(result);
|
||||
Assertions.assertEquals("reference-icd", captor.getValue().getReferenceIcdId());
|
||||
}
|
||||
|
||||
@Test
|
||||
void addIcdPathShouldDefaultTypeToManualNonStandard() {
|
||||
CsIcdPathParam param = buildParam("手动录入非标准ICD");
|
||||
|
||||
Reference in New Issue
Block a user