Browse Source

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

yeshijie 3 years ago
parent
commit
5c9fce1e85

+ 5 - 5
svr/svr-base/src/main/java/com/yihu/jw/base/service/org/BaseOrgService.java

@ -208,7 +208,7 @@ public class BaseOrgService extends BaseJpaService<BaseOrgDO, BaseOrgDao> {
    public JSONObject queryOneById(String id) throws JsonProcessingException {
        JSONObject result = new JSONObject();
        if(StringUtils.isEmpty(id)){
            result.put("msg","org not exist for id:"+id);
            result.put("msg","该机构不存在 id:"+id);
            result.put("response",ConstantUtils.FAIL);
            return result;
        }
@ -236,7 +236,7 @@ public class BaseOrgService extends BaseJpaService<BaseOrgDO, BaseOrgDao> {
            String mobile = orgAdminJson.getString("mobile");
            String adminName = orgAdminJson.getString("orgAdmin");
            if(StringUtils.isEmpty(mobile)){
                return "paramter for admin is null";
                return "联系电话不能为空!";
            }
            baseOrgDO.setOrgAdmin(adminName);
            baseOrgDO.setAdminMobile(mobile);
@ -268,7 +268,7 @@ public class BaseOrgService extends BaseJpaService<BaseOrgDO, BaseOrgDao> {
        }else{
            BaseOrgDO oldBaseOrgDO = baseOrgDao.findOne(baseOrgDO.getId());
            if(null == oldBaseOrgDO){
                return "no exist this org";
                return "机构不存在";
            }
            if(!baseOrgDO.getCode().equalsIgnoreCase(oldBaseOrgDO.getCode()) || !baseOrgDO.getName().equalsIgnoreCase(oldBaseOrgDO.getName())){
                orgTreeService.updateOrgTreeNode(oldBaseOrgDO,baseOrgDO,OrgTree.Level.org.getLevelValue());
@ -309,13 +309,13 @@ public class BaseOrgService extends BaseJpaService<BaseOrgDO, BaseOrgDao> {
    public String enableOrDisableOrg(String id,String del){
        JSONObject result = new JSONObject();
        if(StringUtils.isEmpty(id) || StringUtils.isEmpty(del)){
            result.put("msg","parameter id or del is null");
            result.put("msg","参数id or del 为空");
            result.put("response",ConstantUtils.FAIL);
            return result.toJSONString();
        }
        BaseOrgDO baseOrgDO = baseOrgDao.findOne(id);
        if( null == baseOrgDO ){
            result.put("msg","org not exist for id:" + id);
            result.put("msg","该机构不存在 id:" + id);
            result.put("response",ConstantUtils.FAIL);
            return result.toJSONString();
        }

+ 3 - 3
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);
@ -1287,9 +1287,9 @@ public class PatientDoorCoachOrderService extends BaseJpaService<BaseDoorCoachOr
                }
            }
        }
        all = waitForAccept+waitForServe+served+cancel;
        all = waitForPay+waitForAccept+waitForServe+served+cancel;
        map.put("all",all);
        map.put("waitForPay",waitForAccept);
        map.put("waitForPay",waitForPay);
        map.put("waitForAccept",waitForAccept);
        map.put("waitForServe",waitForServe);
        map.put("served",served);

+ 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);