|
|
|
@ -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);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|