|
|
|
@ -426,8 +426,13 @@ public class UdiContrastService {
|
|
|
|
|
// udiProductService.insertUdiInfo(udiProductEntity);
|
|
|
|
|
}
|
|
|
|
|
if (thirdAliDrugList != null && thirdAliDrugList.size() > 0) {
|
|
|
|
|
int errCount = 0;
|
|
|
|
|
for (int i = 0; i < thirdAliDrugList.size(); i++) {
|
|
|
|
|
ThirdAliDrug thirdAliDrug = thirdAliDrugList.get(i);
|
|
|
|
|
if(!drugRulesVerify(ybDrug,thirdAliDrug)){
|
|
|
|
|
errCount++;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
udiProductEntity.setNameCode(thirdAliDrug.getNameCode());
|
|
|
|
@ -487,6 +492,9 @@ public class UdiContrastService {
|
|
|
|
|
udiProductEntity.setId(IdUtil.getSnowflakeNextId());
|
|
|
|
|
udiProductService.insertUdiInfo(udiProductEntity);
|
|
|
|
|
}
|
|
|
|
|
if(errCount == thirdAliDrugList.size()){
|
|
|
|
|
udiProductService.insertUdiInfo(udiProductEntity);
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
udiRelevanceEntity.setDetailSort(Integer.valueOf(thirdAliDrugList.get(0).getPhysicDetailType()));
|
|
|
|
|
|
|
|
|
@ -595,6 +603,33 @@ public class UdiContrastService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
public boolean drugRulesVerify(YbDrug ybDrug,ThirdAliDrug thirdAliDrug ){
|
|
|
|
|
try {
|
|
|
|
|
Integer bzggInt = DimaUtil.trMinCount(thirdAliDrug.getBzgg());
|
|
|
|
|
// 按照医保数量与阿里包装规格对比
|
|
|
|
|
if((bzggInt == ybDrug.getFactor())){
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
// 医保规格拆分与阿里规格拆分做匹配
|
|
|
|
|
List<String> list = DimaUtil.extractNumbers(ybDrug.getRealityOutlook());
|
|
|
|
|
if(list!=null && list.size() >0){
|
|
|
|
|
for (String str : list) {
|
|
|
|
|
if(str.equals(bzggInt+"")){
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 医保的规格与阿里制剂规格完全匹配
|
|
|
|
|
if(thirdAliDrug.getFormSpec().equals(ybDrug.getRealityOutlook())){
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
log.error("药品校验出现错误==="+e.getMessage());
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void createOnlyApply(ThrProductsAddDiEntity thrProductsAddDiEntity) {
|
|
|
|
|