Browse Source

生活代预约模板

liubing 3 years ago
parent
commit
2d7c0c5328

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/doorCoach/PatientDoorCoachOrderService.java

@ -174,7 +174,7 @@ public class PatientDoorCoachOrderService extends BaseJpaService<BaseDoorCoachOr
                });
        if(bool){
            String failMsg = "当前服务对象存在未完成的上门预约,请先完成该服务!";
            String failMsg = "当前服务对象存在未支付或未完成的上门预约,无法再次申请!";
            result.put(ResponseContant.resultFlag, ResponseContant.fail);
            result.put(ResponseContant.resultMsg, failMsg);
            logger.error(failMsg);

+ 20 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/lifeCare/LifeCareOrderService.java

@ -16,6 +16,7 @@ import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.jw.entity.base.org.BaseOrgDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.wx.BasePatientWechatDo;
import com.yihu.jw.entity.care.doorCoach.BaseDoorCoachOrderDO;
import com.yihu.jw.entity.care.lifeCare.LifeCareCancelLogDO;
import com.yihu.jw.entity.care.lifeCare.LifeCareFeeDetailDO;
@ -475,6 +476,18 @@ public class LifeCareOrderService extends BaseJpaService<LifeCareOrderDO, LifeCa
            orderDO = EntityUtils.jsonToEntity(jsonObjectParam.get("order").toString(), LifeCareOrderDO.class);
            //存在未支付的订单不能发起
            boolean bool = lifeCareOrderDao.existsByPatientAndStatusIn(orderDO.getPatient(),
                    new Integer[]{
                            BaseDoorCoachOrderDO.Status.waitForPay.getType()
                    });
            if(bool){
                String failMsg = "当前服务对象存在未支付或未完成,无法再次申请!";
                result.put(ResponseContant.resultFlag, ResponseContant.fail);
                result.put(ResponseContant.resultMsg, failMsg);
                logger.error(failMsg);
                return result;
            }
            Integer type = orderDO.getType();
            if (type==1||type==2){
                //本人或家人代发起
@ -488,8 +501,14 @@ public class LifeCareOrderService extends BaseJpaService<LifeCareOrderDO, LifeCa
                orderDO.setProxyPatient(proxyPatient);
                orderDO.setProxyPatientName(doctorDO.getName());
                orderDO.setProxyPatientPhone(doctorDO.getMobile());
                List<BasePatientWechatDo> basePatientWechatDos = basePatientWechatDao.findByWechatIdAndPatientId(wxId,orderDO.getPatient());
                if (basePatientWechatDos.size()>0){
                    JSONObject json = new JSONObject();
                    String openId = basePatientWechatDos.get(0).getOpenid();
                    messageUtil.putTemplateWxMessage(wxId,"template_process_feedback","shzldzf",openId,null,null,"请在30分钟内完成支付",3,json,
                            DateUtil.dateToChineseDate(new Date()),"助老员已为您代预约生活照料","待支付");
                }
            }
            //todo 代发起时推送待支付模板给患者
        } catch (Exception e) {
            e.printStackTrace();

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/pay/PayService.java

@ -700,7 +700,7 @@ public class PayService {
                break;
        }
        Date date = new Date();
        Long lastPayTime = date.getTime()+60*30;
        Long lastPayTime = date.getTime()+1000*60*30;//订单截至支付日期
        businessOrderDO.setDescription(desc);
        businessOrderDO.setRelationCode(relationCode);