Pārlūkot izejas kodu

周统计修改

wangjun 4 gadi atpakaļ
vecāks
revīzija
570aa608fa

+ 14 - 4
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -9390,8 +9390,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        return null;
    }
    public com.alibaba.fastjson.JSONObject selectHospitalInfo(String doctorId,String orgCode){
        /**
         * 1、今日待就诊:今日当前家庭医生在当前医院的未完成的协同门诊书
@ -9408,6 +9406,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
         */
        Date startTime  = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" 00:00:00");
        Date endTime  = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" 23:59:59");
        String nowDate = DateUtil.getStringDateShort();
        com.alibaba.fastjson.JSONObject jsonObject = new com.alibaba.fastjson.JSONObject();
        // 1、今日待就诊:今日当前家庭医生在当前医院的未完成的协同门诊书
        List<WlyyOutpatientDO> outpatientDOS =  outpatientDao.findByGeneralDoctorAndStatusAndDate(doctorId,startTime,endTime,"0,1,2");
@ -9424,8 +9423,19 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        //在线医生:当前医院在班的专科医生数
        String sql ="SELECT d.id as \"id\",d.name as \"name\" FROM base_doctor d WHERE (EXISTS (SELECT 1 FROM wlyy_doctor_work_time t WHERE t.doctor = d.id AND t.start_time >=:startTime AND t.end_time <=:endTime ) OR  d.consult_status = '1')";
        Map<String, Object> params = new HashedMap();
        params.put("startTime",DateUtil.dateToStrLong(startTime));
        params.put("endTime",DateUtil.dateToStrLong(endTime));
        if("xm_ykyy_wx".equals(wechatId)){
            if (flag){
                params.put("startTime",DateUtil.dateToStrLong(startTime));
                params.put("endTime",DateUtil.dateToStrLong(endTime));
            }else {
                params.put("startTime","to_date('"+nowDate+" 00:00:00','yyyy-mm-dd hh24:mi:ss')");
                params.put("endTime","to_date('"+nowDate+" 23:59:59','yyyy-mm-dd hh24:mi:ss')");
            }
        }else{
            params.put("startTime",DateUtil.dateToStrLong(startTime));
            params.put("endTime",DateUtil.dateToStrLong(endTime));
        }
        List<Map<String, Object>> list = hibenateUtils.createSQLQuery(sql, params);
        jsonObject.put("onlineDoctors",list.size());

+ 15 - 3
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -1104,10 +1104,22 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        if (businessOrderDO==null){
            throw new Exception("查不到订单!");
        }
        String newPayFlag = "0";
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("consultPay");
        if (null!=wlyyHospitalSysDictDO){
            newPayFlag = wlyyHospitalSysDictDO.getDictValue();
        }
        if (businessOrderDO.getOrderCategory().equalsIgnoreCase("1")){
            ConsultDo consultDo = consultOrderDao.findOne(businessOrderDO.getRelationCode());
            consultDo.setPayStatus(2);
            consultOrderDao.save(consultDo);
            if ("0".equalsIgnoreCase(newPayFlag)){
                ConsultDo consultDo = consultOrderDao.findOne(businessOrderDO.getRelationCode());
                consultDo.setPayStatus(2);
                consultOrderDao.save(consultDo);
            }else {
                WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode());
                wlyyOutpatientDO.setPayStatus(2);
                outpatientDao.save(wlyyOutpatientDO);
            }
        }else if (businessOrderDO.getOrderCategory().equalsIgnoreCase("2")||businessOrderDO.getOrderCategory().equalsIgnoreCase("3")){
            WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode());
            wlyyOutpatientDO.setPayStatus(2);