|
@@ -21,9 +21,11 @@ import com.fs.core.config.WxPayProperties;
|
|
|
import com.fs.core.utils.OrderCodeUtils;
|
|
import com.fs.core.utils.OrderCodeUtils;
|
|
|
import com.fs.his.config.FsSysConfig;
|
|
import com.fs.his.config.FsSysConfig;
|
|
|
import com.fs.his.domain.*;
|
|
import com.fs.his.domain.*;
|
|
|
|
|
+import com.fs.his.dto.FsUserInformationCollectionDTO;
|
|
|
import com.fs.his.enums.FsStoreOrderStatusEnum;
|
|
import com.fs.his.enums.FsStoreOrderStatusEnum;
|
|
|
import com.fs.his.mapper.*;
|
|
import com.fs.his.mapper.*;
|
|
|
import com.fs.his.param.CollectionInfoConfirmParam;
|
|
import com.fs.his.param.CollectionInfoConfirmParam;
|
|
|
|
|
+import com.fs.his.param.FsInquiryOrderCreateParam;
|
|
|
import com.fs.his.param.FsUserInformationCollectionListDParam;
|
|
import com.fs.his.param.FsUserInformationCollectionListDParam;
|
|
|
import com.fs.his.param.FsUserInformationCollectionParam;
|
|
import com.fs.his.param.FsUserInformationCollectionParam;
|
|
|
import com.fs.his.service.*;
|
|
import com.fs.his.service.*;
|
|
@@ -33,6 +35,7 @@ import com.fs.huifuPay.domain.HuiFuRefundResult;
|
|
|
import com.fs.huifuPay.sdk.opps.core.request.V2TradePaymentDelaytransConfirmrefundRequest;
|
|
import com.fs.huifuPay.sdk.opps.core.request.V2TradePaymentDelaytransConfirmrefundRequest;
|
|
|
import com.fs.huifuPay.sdk.opps.core.request.V2TradePaymentScanpayRefundRequest;
|
|
import com.fs.huifuPay.sdk.opps.core.request.V2TradePaymentScanpayRefundRequest;
|
|
|
import com.fs.huifuPay.service.HuiFuService;
|
|
import com.fs.huifuPay.service.HuiFuService;
|
|
|
|
|
+import com.fs.im.service.OpenIMService;
|
|
|
import com.fs.system.domain.SysConfig;
|
|
import com.fs.system.domain.SysConfig;
|
|
|
import com.fs.system.mapper.SysConfigMapper;
|
|
import com.fs.system.mapper.SysConfigMapper;
|
|
|
import com.fs.system.oss.CloudStorageService;
|
|
import com.fs.system.oss.CloudStorageService;
|
|
@@ -145,6 +148,10 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
private FsStoreOrderLogsMapper fsStoreOrderLogsMapper;
|
|
private FsStoreOrderLogsMapper fsStoreOrderLogsMapper;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private DoctorMsgMapper doctorMsgMapper;
|
|
private DoctorMsgMapper doctorMsgMapper;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IFsInquiryOrderService fsInquiryOrderService;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private OpenIMService openIMService;
|
|
|
/**
|
|
/**
|
|
|
* 查询用户信息采集
|
|
* 查询用户信息采集
|
|
|
*
|
|
*
|
|
@@ -578,34 +585,47 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
map.setUserConfirm(1);
|
|
map.setUserConfirm(1);
|
|
|
map.setUserAdvice(param.getUserAdvice());
|
|
map.setUserAdvice(param.getUserAdvice());
|
|
|
if (collection.getStatus() == 1) {
|
|
if (collection.getStatus() == 1) {
|
|
|
- //用户第一次确认添加医生消息
|
|
|
|
|
- DoctorMsg msg = new DoctorMsg();
|
|
|
|
|
- String name = collection.getUserName() != null ? collection.getUserName() : "-";
|
|
|
|
|
- //没套餐包的添加医生信息采集建议消息
|
|
|
|
|
- msg.setTitle("用户采集信息建议");
|
|
|
|
|
- msg.setType(3);
|
|
|
|
|
- msg.setContent("患者:" + name + "的信息采集,前往建议");
|
|
|
|
|
- msg.setDoctorId(collection.getDoctorId());
|
|
|
|
|
- msg.setCreateTime(DateUtils.getNowDate());
|
|
|
|
|
- //插入医生消息
|
|
|
|
|
- doctorMsgMapper.insertDoctorMsg(msg);
|
|
|
|
|
- //第一次确认
|
|
|
|
|
- map.setStatus(2);
|
|
|
|
|
- } else if (collection.getStatus() == 2) {
|
|
|
|
|
- //第二次确认
|
|
|
|
|
- map.setUserConfirm2(1);
|
|
|
|
|
- if (collection.getUserConfirm2() == 0 && collection.getIsPackage() == 1) {
|
|
|
|
|
- FsStoreOrder fsStoreOrder = storeOrderService.selectFsStoreOrderByOrderCode(collection.getPackageOrderCode());
|
|
|
|
|
- if (fsStoreOrder != null) {
|
|
|
|
|
- FsStoreOrder editOrder = new FsStoreOrder();
|
|
|
|
|
- editOrder.setOrderId(fsStoreOrder.getOrderId());
|
|
|
|
|
-// editOrder.setIsConfirm(1); todo
|
|
|
|
|
- storeOrderService.updateFsStoreOrder(editOrder);
|
|
|
|
|
- } else {
|
|
|
|
|
- return R.error("没有找到订单");
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ openIMService.sendUserInformation(collection.getUserId(),collection.getDoctorId(),collection.getId());
|
|
|
|
|
+ //用户确认后创建一个问诊订单,待医生接单
|
|
|
|
|
+// FsInquiryOrderCreateParam fsInquiryOrderCreateParam = new FsInquiryOrderCreateParam();
|
|
|
|
|
+// fsInquiryOrderCreateParam.setIsUserInformation(1);
|
|
|
|
|
+// fsInquiryOrderCreateParam.setUserId(collection.getUserId());
|
|
|
|
|
+// fsInquiryOrderCreateParam.setPatientId(collection.getPatientId());
|
|
|
|
|
+// fsInquiryOrderCreateParam.setOrderType(1);
|
|
|
|
|
+// fsInquiryOrderCreateParam.setInquiryType(1);
|
|
|
|
|
+// fsInquiryOrderCreateParam.setIsVisit("1");
|
|
|
|
|
+// fsInquiryOrderCreateParam.setInquirySubType(3);
|
|
|
|
|
+// fsInquiryOrderService.createOrder(fsInquiryOrderCreateParam);
|
|
|
|
|
+// //用户第一次确认添加医生消息
|
|
|
|
|
+// DoctorMsg msg = new DoctorMsg();
|
|
|
|
|
+// String name = collection.getUserName() != null ? collection.getUserName() : "-";
|
|
|
|
|
+// //没套餐包的添加医生信息采集建议消息
|
|
|
|
|
+// msg.setTitle("用户采集信息建议");
|
|
|
|
|
+// msg.setType(3);
|
|
|
|
|
+// msg.setContent("患者:" + name + "的信息采集,前往建议");
|
|
|
|
|
+// msg.setDoctorId(collection.getDoctorId());
|
|
|
|
|
+// msg.setCreateTime(DateUtils.getNowDate());
|
|
|
|
|
+// //插入医生消息
|
|
|
|
|
+// doctorMsgMapper.insertDoctorMsg(msg);
|
|
|
|
|
+// //第一次确认
|
|
|
|
|
+// map.setStatus(2);
|
|
|
|
|
+ }
|
|
|
|
|
+// else if (collection.getStatus() == 2) {
|
|
|
|
|
+// //第二次确认
|
|
|
|
|
+// map.setUserConfirm2(1);
|
|
|
|
|
+// if (collection.getUserConfirm2() == 0 && collection.getIsPackage() == 1) {
|
|
|
|
|
+// FsStoreOrder fsStoreOrder = storeOrderService.selectFsStoreOrderByOrderCode(collection.getPackageOrderCode());
|
|
|
|
|
+// if (fsStoreOrder != null) {
|
|
|
|
|
+// FsStoreOrder editOrder = new FsStoreOrder();
|
|
|
|
|
+// editOrder.setOrderId(fsStoreOrder.getOrderId());
|
|
|
|
|
+//// editOrder.setIsConfirm(1); todo
|
|
|
|
|
+// storeOrderService.updateFsStoreOrder(editOrder);
|
|
|
|
|
+// } else {
|
|
|
|
|
+// return R.error("没有找到订单");
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
if (fsUserInformationCollectionMapper.updateFsUserInformationCollection(map) > 0) {
|
|
if (fsUserInformationCollectionMapper.updateFsUserInformationCollection(map) > 0) {
|
|
|
//存入医生确认统计时间数据
|
|
//存入医生确认统计时间数据
|
|
|
FsDoctorConfirm doctorConfirm = new FsDoctorConfirm();
|
|
FsDoctorConfirm doctorConfirm = new FsDoctorConfirm();
|
|
@@ -829,6 +849,11 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
return vo;
|
|
return vo;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public FsUserInformationCollectionDTO selectFsUserInformationCollectionDTOById(Long id) {
|
|
|
|
|
+ return fsUserInformationCollectionMapper.selectFsUserInformationCollectionDTOById(id);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private List<AnswerVO> getAnswerVOs(List<AnswerVO> target,List<AnswerVO> source) {
|
|
private List<AnswerVO> getAnswerVOs(List<AnswerVO> target,List<AnswerVO> source) {
|
|
|
target.addAll(source);
|
|
target.addAll(source);
|
|
|
return target.stream()
|
|
return target.stream()
|
|
@@ -899,4 +924,5 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
// System.out.println(JSON.toJSONString(collect1));
|
|
// System.out.println(JSON.toJSONString(collect1));
|
|
|
boolean contains = "是否有糖尿病相关疾病?".contains("糖尿病");
|
|
boolean contains = "是否有糖尿病相关疾病?".contains("糖尿病");
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
}
|
|
}
|