|
|
@@ -25,6 +25,7 @@ import com.fs.core.utils.OrderCodeUtils;
|
|
|
import com.fs.his.config.FsSysConfig;
|
|
|
import com.fs.his.domain.*;
|
|
|
import com.fs.his.dto.FsUserInformationCollectionDTO;
|
|
|
+import com.fs.his.enums.FsPackageOrderStatusEnum;
|
|
|
import com.fs.his.enums.FsStoreOrderStatusEnum;
|
|
|
import com.fs.his.mapper.*;
|
|
|
import com.fs.his.param.*;
|
|
|
@@ -59,6 +60,7 @@ import com.google.gson.Gson;
|
|
|
import me.chanjar.weixin.common.error.WxErrorException;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
@@ -131,6 +133,8 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
|
|
|
@Autowired
|
|
|
private FsPackageOrderMapper packageOrderMapper;
|
|
|
+ @Autowired
|
|
|
+ private FsPatientMapper fsPatientMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private FsPrescribeMapper fsPrescribeMapper;
|
|
|
@@ -971,6 +975,38 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
return fsUserInformationCollectionMapper.updateFsUserInformationCollection(fsUserInformationCollection);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public FsUserInformationCollectionAndPatientVO selectFsUserInformationCollectionVoById(Long id) {
|
|
|
+ FsUserInformationCollection info = baseMapper.selectFsUserInformationCollectionById(id);
|
|
|
+ FsUserInformationCollectionAndPatientVO vo = new FsUserInformationCollectionAndPatientVO();
|
|
|
+ BeanUtils.copyProperties(info, vo);
|
|
|
+ Long patientId = info.getPatientId();
|
|
|
+ if(patientId != null){
|
|
|
+ FsPatient fsPatient = fsPatientMapper.selectFsPatientByPatientId(patientId);
|
|
|
+ if (fsPatient != null){
|
|
|
+
|
|
|
+ vo.setPatientInfo(fsPatient);
|
|
|
+ //查询是否支付
|
|
|
+ Integer isPay = 0;
|
|
|
+ Long packageOrderId = info.getPackageOrderId();
|
|
|
+ if (packageOrderId != null){
|
|
|
+ FsPackageOrder order = packageOrderMapper.selectFsPackageOrderByOrderId(packageOrderId);
|
|
|
+ if (order != null && order.getStatus() > 1){
|
|
|
+ isPay = 1;
|
|
|
+ vo.setStoreOrderId(order.getStoreOrderId());
|
|
|
+ Integer status = order.getStatus();
|
|
|
+ vo.setOrderStatus(FsPackageOrderStatusEnum.toType(status).getDesc()); //订单状态
|
|
|
+ vo.setPackageJson(order.getPackageJson());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ vo.setIsPay(isPay);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ CompanyUser companyUser = companyUserMapper.selectCompanyUserById(info.getCompanyUserId());
|
|
|
+ info.setCompanyId(companyUser.getCompanyId());
|
|
|
+ return vo;
|
|
|
+ }
|
|
|
+
|
|
|
private List<AnswerVO> getAnswerVOs(List<AnswerVO> target,List<AnswerVO> source) {
|
|
|
target.addAll(source);
|
|
|
return target.stream()
|