Jelajahi Sumber

外网总库

Trick 5 tahun lalu
induk
melakukan
446e79a734

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

@ -4856,8 +4856,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    public List<Map<String,Object>> findDeptWithDoctorWorkTime(String hospital,String keyWord,Integer page,Integer pagesize ){
        String now = DateUtil.dateToStr(new Date(),"yyyy-MM-dd");
        Date startDate = DateUtil.stringToDate(now+" 00:00:00","yyyy-MM-dd HH:mm:ss");
        Date endDate = DateUtil.stringToDate(now+" 23:59:59","yyyy-MM-dd HH:mm:ss");
//        Date startDate = DateUtil.stringToDate(now+" 00:00:00","yyyy-MM-dd HH:mm:ss");
//        Date endDate = DateUtil.stringToDate(now+" 23:59:59","yyyy-MM-dd HH:mm:ss");
        String sql ="SELECT  " +
                " DISTINCT " +
@ -4867,22 +4867,23 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                " h.org_name AS \"orgName\"" +
                " FROM " +
                " base_doctor_hospital h " +
                " JOIN base_doctor d ON h.doctor_code = d.id" +
                " WHERE " +
                " EXISTS ( " +
                " ( EXISTS ( " +
                " SELECT " +
                "  w.doctor " +
                " FROM " +
                "  wlyy_doctor_work_time w " +
                " WHERE " +
                "  w.doctor = h.doctor_code " +
                " AND start_time >=:startTime " +
                " AND start_time <=:endDate " +
                " ) " +
                " AND start_time <=:startTime " +
                " AND end_time >=:endDate " +
                " ) OR d.consult_status ='1') " +
                " AND h.dept_code IS NOT NULL " +
                " AND h.dept_code !=''";
        Map<String,Object> params = new HashedMap();
        params.put("startTime",startDate);
        params.put("endDate",endDate);
        params.put("startTime",new Date());
        params.put("endDate",new Date());
        if(StringUtils.isNotBlank(hospital)){
            sql +=" AND h.org_code =:hospital";
            params.put("hospital",hospital);

+ 22 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java

@ -14,6 +14,7 @@ import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorRoleDO;
import com.yihu.jw.entity.base.wx.BasePatientWechatDo;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
import com.yihu.jw.entity.hospital.dict.WlyyChargeDictDO;
import com.yihu.jw.entity.hospital.mapping.DoctorMappingDO;
@ -24,6 +25,7 @@ import com.yihu.jw.rm.base.BaseRequestMapping;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.utils.StringUtil;
import com.yihu.jw.utils.WebserviceUtil;
import com.yihu.jw.wechat.dao.BasePatientWechatDao;
import com.yihu.utils.security.MD5;
import net.sf.json.xml.XMLSerializer;
import org.apache.commons.collections.map.HashedMap;
@ -52,7 +54,6 @@ public class XzzxEntranceService {
    @Autowired
    private WlyyHospitalSysDictDao wlyyHospitalSysDictDao;
    @Autowired
    private DictHospitalDeptDao dictHospitalDeptDao;
    @Autowired
@ -68,6 +69,12 @@ public class XzzxEntranceService {
    @Autowired
    private DoctorMappingDao doctorMappingDao;
    @Autowired
    private BasePatientWechatDao basePatientWechatDao;
    //发送微信模板消息
    public static String sendMessageUrl ="http://xzbh.xmheart.com:8090/hospitalPortal-sms/sms/sendMessage";
    public String getXzzxWebServiceInfo(String api, Map<String,String> params)throws Exception{
        List<WlyyHospitalSysDictDO> list =  wlyyHospitalSysDictDao.findByDictName("xzzxWebService");
@ -462,6 +469,19 @@ public class XzzxEntranceService {
        }
        return json;
    }
//=====================微信模板消息推送===================================
//    public String sendMes(String wxId,String patient,String first,String noticeContent,String remark){
//        JSONObject params = new JSONObject();
//        params.put("transType","sms.hospital.notice");
//        params.put("merchId","3501000014");
//        List<BasePatientWechatDo> BasePatientWechatDo = basePatientWechatDao.findByWechatIdAndPatientId(wxId,patient);
//        JSONObject p = new JSONObject();
//        p.put("openId",);
//        p.put("",);
//        params.put("param",p);
//    }
//=====================微信模板消息推送接口================================
}