|
|
@@ -500,49 +500,7 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
if (answerVOS != null && !answerVOS.isEmpty()) {
|
|
|
map.setJsonInfo(JSON.toJSONString(answerVOS));
|
|
|
}
|
|
|
-// if (fsUserInformationCollection.getIsPackage() == 1) {
|
|
|
-// //插入生成处方签定时任务数据
|
|
|
-// if(fsUserInformationCollection.getPackageOrderCode() != null) {
|
|
|
-// //套餐包订单
|
|
|
-// 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 || fsPackage.getProductType() == 3)) {
|
|
|
-// 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);
|
|
|
-// prescribeService.collectionPrescribe(fsStoreOrder.getPrescribeId());
|
|
|
-// }
|
|
|
-// } else {
|
|
|
-// throw new CustomException("生成处方信息中......");
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// } else {
|
|
|
-// //没有关联套餐包医生确认清空所有状态
|
|
|
-// map.setUserConfirm2(1);
|
|
|
-// }
|
|
|
-
|
|
|
if (fsUserInformationCollectionMapper.updateFsUserInformationCollection(map) > 0) {
|
|
|
-
|
|
|
- //更新医生确认信息
|
|
|
-// FsDoctorConfirm doctorConfirm = redisCache.getCacheObject("doctorConfirm:" + collection.getId());
|
|
|
-// if(doctorConfirm == null) {
|
|
|
-// return R.error("没有医生确认信息");
|
|
|
-// }
|
|
|
-// doctorConfirm.setDoctorEndTime(DateUtils.getNowDate());
|
|
|
-// Long seconds = DateUtil.between(doctorConfirm.getStartTime(), doctorConfirm.getDoctorEndTime(), DateUnit.SECOND);
|
|
|
-// doctorConfirm.setConfirmSecond(seconds);
|
|
|
-// doctorConfirmService.updateFsDoctorConfirm(doctorConfirm);
|
|
|
-// redisCache.deleteObject("doctorConfirm:" + collection.getId());
|
|
|
-
|
|
|
openIMService.doctorSendMsgToUser(collection.getUserId(),collection.getDoctorId());
|
|
|
return R.ok();
|
|
|
}
|
|
|
@@ -1008,6 +966,22 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
return vo;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void autoInformationDoctorConfirm() {
|
|
|
+ //查询超过一个小时医生未处理订单
|
|
|
+ List<FsUserInformationCollection> list = fsUserInformationCollectionMapper.selectListByIsPayAndConfirmStatus();
|
|
|
+ list.forEach(informationCollection -> {
|
|
|
+ if (informationCollection.getDoctorConfirm() == 0){
|
|
|
+ //医生确认
|
|
|
+ doctorConfirm(informationCollection);
|
|
|
+ }
|
|
|
+ if (informationCollection.getDoctorType2Confirm() == 0){
|
|
|
+ //药师确认
|
|
|
+ doctorType2Confirm(informationCollection);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
private List<AnswerVO> getAnswerVOs(List<AnswerVO> target,List<AnswerVO> source) {
|
|
|
target.addAll(source);
|
|
|
return target.stream()
|