|
@@ -722,7 +722,6 @@ public class FsPrescribeServiceImpl implements IFsPrescribeService
|
|
|
if (!productIds.isEmpty()) { // 只有当有 productIds 时才查询
|
|
if (!productIds.isEmpty()) { // 只有当有 productIds 时才查询
|
|
|
storeProductIns = fsStoreProductMapper.getStoreProductInProductIds(new ArrayList<>(productIds));
|
|
storeProductIns = fsStoreProductMapper.getStoreProductInProductIds(new ArrayList<>(productIds));
|
|
|
if (storeProductIns.isEmpty()) {
|
|
if (storeProductIns.isEmpty()) {
|
|
|
- // log.info("根据产品id:{}查询产品信息为空!",storeProductIns); // 修改日志内容
|
|
|
|
|
log.info("根据产品id列表:{}查询产品信息为空!", productIds);
|
|
log.info("根据产品id列表:{}查询产品信息为空!", productIds);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -824,10 +823,18 @@ public class FsPrescribeServiceImpl implements IFsPrescribeService
|
|
|
fsPrescribe.setPrescribeDoctorId(fsDoctor.getDoctorId());
|
|
fsPrescribe.setPrescribeDoctorId(fsDoctor.getDoctorId());
|
|
|
fsPrescribe.setPrescribeDoctorSignUrl(fsDoctor.getSignUrl());
|
|
fsPrescribe.setPrescribeDoctorSignUrl(fsDoctor.getSignUrl());
|
|
|
|
|
|
|
|
- FsDoctor drug =doctorMapper.selectPackageFsDoctorType2Ids(fsPackage.getProductType());
|
|
|
|
|
-
|
|
|
|
|
- fsPrescribe.setDrugDoctorId(drug.getDoctorId());
|
|
|
|
|
- fsPrescribe.setDrugDoctorSignUrl(drug.getSignUrl());
|
|
|
|
|
|
|
+ //分配在线的随机药师
|
|
|
|
|
+ FsDoctor fsDrugDoctor = doctorMapper.selectRandomOnlineDoctorForPackage(fsPackage.getProductType());
|
|
|
|
|
+ if (fsDrugDoctor==null){
|
|
|
|
|
+ //兜底情况,如果没有在线的药师就无论在线随机分配
|
|
|
|
|
+ fsDrugDoctor=doctorMapper.selectPackageFsDoctorType2Ids(fsPackage.getProductType());
|
|
|
|
|
+ if (fsDrugDoctor == null) {
|
|
|
|
|
+ log.error("无法分配药师:productType={}, 无可用在线或离线药师", fsPackage.getProductType());
|
|
|
|
|
+ throw new CustomException("当前无可用药师,请稍后再试");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ fsPrescribe.setDrugDoctorId(fsDrugDoctor.getDoctorId());
|
|
|
|
|
+ fsPrescribe.setDrugDoctorSignUrl(fsDrugDoctor.getSignUrl());
|
|
|
|
|
|
|
|
int i = fsPrescribeMapper.insertFsPrescribe(fsPrescribe);
|
|
int i = fsPrescribeMapper.insertFsPrescribe(fsPrescribe);
|
|
|
if(i>0){
|
|
if(i>0){
|