|
@@ -14,7 +14,6 @@ import com.diagbot.dto.QuestionDTO;
|
|
|
import com.diagbot.entity.DeptInfo;
|
|
|
import com.diagbot.entity.DeptVital;
|
|
|
import com.diagbot.entity.QuestionInfo;
|
|
|
-import com.diagbot.entity.VitalOrder;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.enums.LisSourceEnum;
|
|
|
import com.diagbot.enums.QuantitativeTypeEnum;
|
|
@@ -408,7 +407,14 @@ public class PushFacade {
|
|
|
eq("name", deptName);
|
|
|
DeptInfo deptInfo = deptInfoFacade.getOne(deptInfoQueryWrapper);
|
|
|
if (deptInfo == null) {
|
|
|
- throw new CommonException(CommonErrorCode.NOT_EXISTS, "科室信息不存在");
|
|
|
+ //科室信息不存在时推全科模板
|
|
|
+ deptName = "全科";
|
|
|
+ deptInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
|
|
|
+ eq("name", deptName);
|
|
|
+ deptInfo = deptInfoFacade.getOne(deptInfoQueryWrapper);
|
|
|
+ if (deptInfo == null) {
|
|
|
+ throw new CommonException(CommonErrorCode.NOT_EXISTS, "全科信息未维护");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
QueryWrapper<DeptVital> deptVitalQueryWrapper = new QueryWrapper<>();
|
|
@@ -417,7 +423,7 @@ public class PushFacade {
|
|
|
orderByAsc("order_no");
|
|
|
List<DeptVital> deptVitalList = deptVitalFacade.list(deptVitalQueryWrapper);
|
|
|
//标签列表
|
|
|
- for (DeptVital deptVital:deptVitalList) {
|
|
|
+ for (DeptVital deptVital : deptVitalList) {
|
|
|
QuestionVO questionVO = new QuestionVO();
|
|
|
questionVO.setAge(pushVO.getAge());
|
|
|
questionVO.setSexType(pushVO.getSex());
|