|
|
@@ -19,6 +19,7 @@ import com.fs.his.domain.*;
|
|
|
import com.fs.his.dto.FsPackagePatientDTO;
|
|
|
import com.fs.his.dto.FsPackagePruductDTO;
|
|
|
import com.fs.his.dto.FsPrescribeUsageDTO;
|
|
|
+import com.fs.his.dto.PrescribeRejectDTO;
|
|
|
import com.fs.his.enums.PrescriptionTaskStepEnum;
|
|
|
import com.fs.his.mapper.*;
|
|
|
import com.fs.his.param.*;
|
|
|
@@ -28,10 +29,7 @@ import com.fs.his.utils.qrcode.QRCodeUtils;
|
|
|
import com.fs.his.vo.*;
|
|
|
import com.fs.hisStore.domain.FsUserInformationCollection;
|
|
|
import com.fs.hisStore.mapper.FsUserInformationCollectionMapper;
|
|
|
-import com.fs.im.dto.MsgCustomDTO;
|
|
|
-import com.fs.im.dto.MsgDTO;
|
|
|
-import com.fs.im.dto.MsgDataDTO;
|
|
|
-import com.fs.im.dto.MsgDataFormatDTO;
|
|
|
+import com.fs.hisStore.service.IFsUserInformationCollectionService;
|
|
|
import com.fs.im.service.IImService;
|
|
|
import com.fs.qw.mapper.FsUserInformationCollectionScheduleMapper;
|
|
|
import com.fs.system.oss.CloudStorageService;
|
|
|
@@ -126,6 +124,10 @@ public class FsPrescribeServiceImpl implements IFsPrescribeService
|
|
|
@Autowired
|
|
|
private FsStoreOrderMapper storeOrderMapper;
|
|
|
|
|
|
+ @Lazy
|
|
|
+ @Autowired
|
|
|
+ private IFsUserInformationCollectionService fsUserInformationCollectionService;
|
|
|
+
|
|
|
/**
|
|
|
* 查询处方
|
|
|
*
|
|
|
@@ -567,7 +569,7 @@ public class FsPrescribeServiceImpl implements IFsPrescribeService
|
|
|
//医生签名
|
|
|
o.setUrl(f.getUrl());
|
|
|
}else if (signFlag!=null&&signFlag==2){
|
|
|
- //医生签名
|
|
|
+ //医生签名+药师签名
|
|
|
o.setUrl(f.getUrl());
|
|
|
//药师签名
|
|
|
o.setDrugDoctorUrl(f.getDrugDoctorSignUrl());
|
|
|
@@ -1405,4 +1407,34 @@ public class FsPrescribeServiceImpl implements IFsPrescribeService
|
|
|
return new PageInfo<>(operateStatVOList);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public void handleReject(PrescribeRejectDTO rejectDTO) {
|
|
|
+ //根据处方id查询订单号,根据订单号查询信息采集表id,根据信息采集表id 查询 信息采集进度
|
|
|
+ FsStoreOrder fsStoreOrder =new FsStoreOrder();
|
|
|
+ fsStoreOrder.setPrescribeId(rejectDTO.getPrescribeId());
|
|
|
+ List<FsStoreOrder> fsStoreOrders = storeOrderMapper.selectFsStoreOrderList(fsStoreOrder);
|
|
|
+ if (CollectionUtils.isEmpty(fsStoreOrders)&& fsStoreOrders.isEmpty()){
|
|
|
+ log.error("处方订单不存在,处方id:{}",rejectDTO.getPrescribeId());
|
|
|
+ throw new CustomException("订单不存在");
|
|
|
+ }else {
|
|
|
+ String orderCode = fsStoreOrders.get(0).getOrderCode();
|
|
|
+ FsUserInformationCollection fsUserInformationCollection = new FsUserInformationCollection();
|
|
|
+ fsUserInformationCollection.setPackageOrderCode(orderCode);
|
|
|
+ List<FsUserInformationCollection> fsUserInformationCollections = fsUserInformationCollectionService.selectFsUserInformationCollectionList(fsUserInformationCollection);
|
|
|
+ if (CollectionUtils.isEmpty(fsUserInformationCollections)){
|
|
|
+ log.error("用户采集信息不存在,处方id:{}",rejectDTO.getPrescribeId());
|
|
|
+ throw new CustomException("用户采集信息不存在");
|
|
|
+ }
|
|
|
+ Long collectionId=fsUserInformationCollections.get(0).getId();
|
|
|
+ // 1. 停止采集(状态变更)
|
|
|
+ FsUserInformationCollectionSchedule paramCondition=new FsUserInformationCollectionSchedule();
|
|
|
+ paramCondition.setRemark("医生拒访:"+rejectDTO.getRemark());
|
|
|
+ paramCondition.setCollectionId(collectionId);
|
|
|
+ paramCondition.setOrderCode(orderCode);
|
|
|
+ fsUserInformationCollectionService.stopCollection(paramCondition,rejectDTO.getTerminatedBy());//包含退款操作
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|