Browse Source

冲突修改

wangjun 4 years ago
parent
commit
46803c1a77

+ 9 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/family/service/WlyyFamilyMemberService.java

@ -341,7 +341,15 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
                                }
                                patientDO.setIdcard(jsonObject1.getString("IDCARD"));
                                patientDO.setName(jsonObject1.getString("NAME"));
                                patientDO.setSex(jsonObject1.getInteger("SEX"));
                                if(jsonObject1.getInteger("SEX")!=null){
                                    if (1==jsonObject1.getInteger("SEX")){
                                        patientDO.setSex(1);
                                    }else if (0==jsonObject1.getInteger("SEX")){
                                        patientDO.setSex(2);
                                    }else {
                                        patientDO.setSex(0);
                                    }
                                }
                                patientDO.setDel("1");
                                patientDO.setEnabled(1);
                                patientDO.setLocked(0);

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

@ -80,6 +80,7 @@ import com.yihu.jw.util.wechat.WeixinMessagePushUtils;
import com.yihu.jw.utils.GenerateUserSig;
import com.yihu.jw.utils.Pkis.PKIService_PortType;
import com.yihu.jw.utils.Pkis.PKIService_ServiceLocator;
import com.yihu.jw.utils.StringUtil;
import com.yihu.jw.utils.WebserviceUtil;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.jw.wechat.dao.BasePatientWechatDao;
@ -909,6 +910,15 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            }else {
                price = Double.parseDouble(hospitalSysDictDO.getDictValue());
            }
        }else {
            if (StringUtils.isNoneBlank(chargeType)){
                WlyyChargeDictDO chargeDictDO = wlyyChargeDictDao.findByChargeType(chargeType);
                if (chargeDictDO!=null){
                    price = chargeDictDO.getReqFee();
                }else {
                    price = Double.parseDouble(hospitalSysDictDO.getDictValue());
                }
            }
        }
        /*if (doctorDO != null && StringUtils.isNoneBlank(doctorDO.getFee())) {
            price = Double.parseDouble(doctorDO.getFee());
@ -9404,9 +9414,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
         6、累计就诊:当前医院累计协同门诊的已接诊数量
         */
        Date startTime  = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" 00:00:00");
        Date endTime  = DateUtil.strToDateLong(DateUtil.getStringDateShort()+" 23:59:59");
        String nowDate = DateUtil.getStringDateShort();
        Date startTime  = DateUtil.strToDateLong(nowDate+" 00:00:00");
        Date endTime  = DateUtil.strToDateLong(nowDate+" 23:59:59");
        com.alibaba.fastjson.JSONObject jsonObject = new com.alibaba.fastjson.JSONObject();
        // 1、今日待就诊:今日当前家庭医生在当前医院的未完成的协同门诊书
        List<WlyyOutpatientDO> outpatientDOS =  outpatientDao.findByGeneralDoctorAndStatusAndDate(doctorId,startTime,endTime,"0,1,2");
@ -9423,8 +9434,18 @@ 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",startTime);
        params.put("endTime",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());

+ 30 - 18
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/YkyyPrescriptionService.java

@ -376,33 +376,45 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("WX_MONEY");
        Double price = 0.0;
        String chargeType1 = null;
        if (outpatient.getOutpatientType().equalsIgnoreCase("1")){
            if(outpatientDO.getType().equalsIgnoreCase("1")){
                chargeType1 = doctorDO.getTwfzChargeType();
            }else if(outpatientDO.getType().equalsIgnoreCase("2")){
                chargeType1 = doctorDO.getSpfzChargeType();
        if (doctorDO!=null){
            if (outpatient.getOutpatientType().equalsIgnoreCase("1")){
                if(outpatientDO.getType().equalsIgnoreCase("1")){
                    chargeType1 = doctorDO.getTwfzChargeType();
                }else if(outpatientDO.getType().equalsIgnoreCase("2")){
                    chargeType1 = doctorDO.getSpfzChargeType();
                }
            }else if (outpatient.getOutpatientType().equalsIgnoreCase("3")){
                if(outpatientDO.getType().equalsIgnoreCase("1")){
                    chargeType1 = doctorDO.getTwzxChargeType();
                }else if(outpatientDO.getType().equalsIgnoreCase("2")){
                    chargeType1 = doctorDO.getSpzxChargeType();
                }
            }else if (outpatient.getOutpatientType().equalsIgnoreCase("2")){
                chargeType1 = doctorDO.getXtfzChargeType();
            }
        }else if (outpatient.getOutpatientType().equalsIgnoreCase("3")){
            if(outpatientDO.getType().equalsIgnoreCase("1")){
                chargeType1 = doctorDO.getTwzxChargeType();
            }else if(outpatientDO.getType().equalsIgnoreCase("2")){
                chargeType1 = doctorDO.getSpzxChargeType();
            if(doctorDO!=null){
                if (StringUtils.isNoneBlank(chargeType1)){
                    WlyyChargeDictDO chargeDictDO = wlyyChargeDictDao.findByChargeType(chargeType1);
                    if (chargeDictDO!=null){
                        price = chargeDictDO.getReqFee();
                    }else {
                        price = Double.parseDouble(hospitalSysDictDO.getDictValue());
                    }
                }
            }else {
                price = Double.parseDouble(hospitalSysDictDO.getDictValue());
            }
        }else if (outpatient.getOutpatientType().equalsIgnoreCase("2")){
            chargeType1 = doctorDO.getXtfzChargeType();
        }
        if(doctorDO!=null){
            if (StringUtils.isNoneBlank(doctorDO.getChargeType())){
                WlyyChargeDictDO chargeDictDO = wlyyChargeDictDao.findByChargeType(chargeType1);
        }else {
            if (StringUtils.isNoneBlank(chargeType)){
                WlyyChargeDictDO chargeDictDO = wlyyChargeDictDao.findByChargeType(chargeType);
                if (chargeDictDO!=null){
                    price = chargeDictDO.getReqFee();
                }else {
                    price = Double.parseDouble(hospitalSysDictDO.getDictValue());
                }
            }
        }else {
            price = Double.parseDouble(hospitalSysDictDO.getDictValue());
        }
        /*if (doctorDO != null && StringUtils.isNoneBlank(doctorDO.getFee())) {
            price = Double.parseDouble(doctorDO.getFee());
        }else {