web:修改vp_config_drug计量数据类型

dev_2.1.0
xueqingkun 1 year ago
parent 439c8e72d7
commit 898fb90407

@ -97,7 +97,7 @@ public class MedicalRecAnswerExcelDTO {
this.matchQuestion(questionLibraryList);
this.matchAskPatientAnswer(askPatientAnswerList);
this.matchAnswerResource(materialLibraryList);
//this.matchQuestionDicId(questionTypeDicList);
this.matchQuestionDicId(questionTypeDicList);
}
public AskPatientAnswer toAskPatientAnswer(){
@ -210,23 +210,28 @@ public class MedicalRecAnswerExcelDTO {
errorCodeEnums.add(ErrorCodeEnum.ANSWER_VIDEO_NAME_NOT_FIND);
}
public void matchQuestionDicId(List<CommonDic> questionTypeDicList){
if (StrUtil.isEmpty(this.questionTypeTwo)){
public void matchQuestionDicId(List<CommonDic> questionTypeDicList) {
if (StrUtil.isEmpty(this.questionTypeTwo) || StrUtil.isEmpty(questionTypeOne)) {
return;
}
if(CollUtil.isEmpty(questionTypeDicList)){
errorCodeEnums.add(ErrorCodeEnum.DICE_NOT_FIND);
}
for (CommonDic questionTypeDic : questionTypeDicList) {
if (this.questionTypeTwo.equals(questionTypeDic.getNameZh())){
// todo:再次校验questionTypeOne是否正确
if (this.questionTypeTwo.equals(questionTypeDic.getNameZh())) {
String nameZhPath = questionTypeDic.getNameZhPath();
if (StrUtil.isEmpty(nameZhPath)) {
continue;
}
// 一共两个级别
List<String> split = StrUtil.split(nameZhPath, "/");
if (!this.questionTypeOne.equals(CollUtil.getFirst(split))) {
// 如果类目一匹配不正确,也不进行处理
continue;
}
this.dictId = String.valueOf(questionTypeDic.getId());
this.dictNamePath = questionTypeDic.getNameZhPath();
return;
}
}
errorCodeEnums.add(ErrorCodeEnum.DICE_NOT_FIND);
}

@ -58,7 +58,7 @@ public class UploadQuestionLibraryDTO {
public void doAction(List<AskTemplateQuestionLibrary> questionLibraryList, List<CommonDic> questionTypeDicList){
this.absentCheck();
this.matchQuestion(questionLibraryList);
//this.matchQuestionDicId(questionTypeDicList);
this.matchQuestionDicId(questionTypeDicList);
}
@ -115,9 +115,6 @@ public class UploadQuestionLibraryDTO {
if (StrUtil.isEmpty(this.questionTypeTwo)){
return;
}
if(CollUtil.isEmpty(questionTypeDicList)){
errorCodeEnums.add(UploadQuestionLibraryDTO.ErrorCodeEnum.DICE_NOT_FIND);
}
for (CommonDic questionTypeDic : questionTypeDicList) {
if (this.questionTypeTwo.equals(questionTypeDic.getNameZh())){
@ -125,6 +122,22 @@ public class UploadQuestionLibraryDTO {
return;
}
}
for (CommonDic questionTypeDic : questionTypeDicList) {
if (this.questionTypeTwo.equals(questionTypeDic.getNameZh())) {
String nameZhPath = questionTypeDic.getNameZhPath();
if (StrUtil.isEmpty(nameZhPath)) {
continue;
}
// 一共两个级别
List<String> split = StrUtil.split(nameZhPath, "/");
if (!this.questionTypeOne.equals(CollUtil.getFirst(split))) {
// 如果类目一匹配不正确,也不进行处理
continue;
}
this.dictId = String.valueOf(questionTypeDic.getId());
return;
}
}
}

@ -94,10 +94,10 @@ public class OfflineAnswerVideoResource implements AnswerVideoResourceService {
// 查询资源库资源
List<MaterialLibrary> materialLibraryList = materialLibraryService.list();
// 查询类目字段
//List<CommonDic> questionTypeDicList = commonDicService.lambdaQuery().eq(CommonDic::getGroupCode, "AQT").list();
List<CommonDic> questionTypeDicList = commonDicService.lambdaQuery().eq(CommonDic::getGroupCode, "AQT").list();
medicalRecAnswerExcelDTOS.forEach(dto->dto.doAction(
questionLibraryList,askPatientAnswerList,materialLibraryList,CollUtil.newArrayList()));
questionLibraryList,askPatientAnswerList,materialLibraryList,questionTypeDicList));
}
public void updateAskPatientAnswer(List<MedicalRecAnswerExcelDTO> medicalRecAnswerExcelDTOS,String medicalId){

Loading…
Cancel
Save