用医保编码用多码表获取阿里药品信息

v3
qiuyt 3 months ago
parent 67d174f381
commit d1751384b1

@ -67,7 +67,7 @@ public class CodeRelController {
}
@ApiOperation(value = "更新指定信息", response = CodeRel.class)
// @ApiOperation(value = "更新指定信息", response = List.class)
@PostMapping("/updateBatch")
public BaseResponse updateBatchByCodeRel(@RequestBody List<CodeRel> paramList) {
if (CollUtil.isEmpty(paramList)){
@ -82,14 +82,16 @@ public class CodeRelController {
@PostMapping("/listAndAliDrug")
public BaseResponse getListAndAliDrug(@RequestBody CodeRel param) {
if ( param == null ||
(StrUtil.isBlank(param.getDiNameCode()) && StrUtil.isBlank(param.getDrugCode()))
(StrUtil.isBlank(param.getYbbm()) && StrUtil.isBlank(param.getYbbm()))
){
return ResultVOUtils.error(ResultEnum.DATA_ERROR,"参数错误");
}
List<CodeRelVo> respList = new ArrayList<>();
// List<CodeRelVo> respList = new ArrayList<>();
List<ThirdAliDrug> thirdAliDrugList = new ArrayList<>();
List<CodeRel> list = codeRelService.list(new LambdaQueryWrapper<CodeRel>()
.eq(CodeRel::getDiNameCode,param.getDiNameCode()).or().eq(CodeRel::getDrugCode,param.getDrugCode()));
.eq(CodeRel::getYbbm,param.getYbbm()));
if (CollUtil.isNotEmpty(list)){
for (int i = 0; i < list.size(); i++) {
@ -101,13 +103,14 @@ public class CodeRelController {
if (StrUtil.isNotEmpty(drugCode)){
//本地查找 未找到再到阿里查找
ThirdAliDrug thirdAliDrug = thirdAliDrugService.getThirdAliDrug(drugCode);
codeRelVo.setThirdAliDrug(thirdAliDrug);
// codeRelVo.setThirdAliDrug(thirdAliDrug);
thirdAliDrugList.add(thirdAliDrug);
}
respList.add(codeRelVo);
// respList.add(codeRelVo);
}
}
return ResultVOUtils.success(respList);
return ResultVOUtils.success(thirdAliDrugList);
}
}

Loading…
Cancel
Save