|
@@ -11,6 +11,7 @@ import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fs.common.BeanCopyUtils;
|
|
import com.fs.common.BeanCopyUtils;
|
|
|
import com.fs.common.core.domain.R;
|
|
import com.fs.common.core.domain.R;
|
|
|
import com.fs.common.core.redis.RedisCache;
|
|
import com.fs.common.core.redis.RedisCache;
|
|
@@ -340,15 +341,26 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
map.setDoctorConfirm(1);
|
|
map.setDoctorConfirm(1);
|
|
|
//插入生成处方签定时任务数据
|
|
//插入生成处方签定时任务数据
|
|
|
if(fsUserInformationCollection.getPackageOrderCode() != null) {
|
|
if(fsUserInformationCollection.getPackageOrderCode() != null) {
|
|
|
- FsStoreOrder fsStoreOrder = storeOrderService.selectFsStoreOrderByOrderCode(fsUserInformationCollection.getPackageOrderCode());
|
|
|
|
|
- if (fsStoreOrder != null && fsStoreOrder.getIsPay() == 1) {
|
|
|
|
|
- if (fsStoreOrder.getPrescribeId() != null) {
|
|
|
|
|
- FsPrescribeParam fsPrescribeParam = new FsPrescribeParam();
|
|
|
|
|
- fsPrescribeParam.setPrescribeId(fsStoreOrder.getPrescribeId());
|
|
|
|
|
- prescribeService.confirmPrescribe(fsPrescribeParam);
|
|
|
|
|
|
|
+ //套餐包订单
|
|
|
|
|
+ FsPackageOrder fsPackageOrder = packageOrderMapper.selectByOderCode(fsUserInformationCollection.getPackageOrderCode());
|
|
|
|
|
+ if (fsPackageOrder != null && fsPackageOrder.getIsPay() == 1) {
|
|
|
|
|
+ //套餐包信息
|
|
|
|
|
+ FsPackage fsPackage = JSON.parseObject(fsPackageOrder.getPackageJson(), FsPackage.class);
|
|
|
|
|
+
|
|
|
|
|
+ //套餐包为药品生成处方信息
|
|
|
|
|
+ if(fsPackage != null && (fsPackage.getProductType() == 1 || fsPackage.getProductType() == 2)) {
|
|
|
|
|
+ FsStoreOrder fsStoreOrder = storeOrderService.selectFsStoreOrderByOrderCode(fsUserInformationCollection.getPackageOrderCode());
|
|
|
|
|
+ if (fsStoreOrder != null && fsStoreOrder.getIsPay() == 1 ) {
|
|
|
|
|
+ if (fsStoreOrder.getPrescribeId() != null) {
|
|
|
|
|
+ FsPrescribeParam fsPrescribeParam = new FsPrescribeParam();
|
|
|
|
|
+ fsPrescribeParam.setPrescribeId(fsStoreOrder.getPrescribeId());
|
|
|
|
|
+ prescribeService.confirmPrescribe(fsPrescribeParam);
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ throw new CustomException("生成处方信息中......");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
//没有关联套餐包医生确认清空所有状态
|
|
//没有关联套餐包医生确认清空所有状态
|