Selaa lähdekoodia

Merge branch 'dev' of trick9191/wlyy2.0 into dev

trick9191 5 vuotta sitten
vanhempi
commit
fb7321077f

+ 2 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/doctor/dao/DoctorWorkTimeDao.java

@ -19,4 +19,6 @@ public interface DoctorWorkTimeDao extends PagingAndSortingRepository<WlyyDoctor
    @Query("from WlyyDoctorWorkTimeDO a where a.doctor = ?1 and a.date like ?2 order by a.startTime asc")
    List<WlyyDoctorWorkTimeDO> findDoctorWorkTimeByMonth(String doctor, String date);
    @Query("from WlyyDoctorWorkTimeDO a where a.doctor = ?1 and a.startTime >= ?2 and a.startTime <= ?3 order by a.startTime asc")
    List<WlyyDoctorWorkTimeDO> findDoctorWorkTimeByTime(String doctor, Date startDate,Date endDate);
}

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

@ -2224,10 +2224,17 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @param date
     * @return
     */
    public List<WlyyDoctorWorkTimeVO> findDoctorWorkTimeByMonth(String doctor,String date){
        List<WlyyDoctorWorkTimeDO> times = doctorWorkTimeDao.findDoctorWorkTimeByMonth(doctor,"%"+date+"%");
        List<WlyyDoctorWorkTimeVO> timeVOs = new ArrayList<>();
        return convertToModels(times,timeVOs,WlyyDoctorWorkTimeVO.class);
    public List<WlyyDoctorWorkTimeVO> findDoctorWorkTimeByMonth(String doctor,String date,String startDate,String endDate){
        if(StringUtils.isNotBlank(date)){
            List<WlyyDoctorWorkTimeDO> times = doctorWorkTimeDao.findDoctorWorkTimeByMonth(doctor,"%"+date+"%");
            List<WlyyDoctorWorkTimeVO> timeVOs = new ArrayList<>();
            return convertToModels(times,timeVOs,WlyyDoctorWorkTimeVO.class);
        }else{
            List<WlyyDoctorWorkTimeDO> times = doctorWorkTimeDao.findDoctorWorkTimeByTime(doctor,DateUtil.stringToDate(startDate+" 00:00:00","yyyy-MM-dd HH:mm:ss"),DateUtil.stringToDate(endDate+" 23:59:59","yyyy-MM-dd HH:mm:ss"));
            List<WlyyDoctorWorkTimeVO> timeVOs = new ArrayList<>();
            return convertToModels(times,timeVOs,WlyyDoctorWorkTimeVO.class);
        }
    }
    public Map<String,Object> findPatientInfo(String patient){
@ -2252,22 +2259,27 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    private HttpClientUtil httpClientUtil;
    public String test() {
        List<NameValuePair> params = new ArrayList<>();
//        params.add(new BasicNameValuePair("clientId", "ihealth_pa8DIRJasL"));
//        params.add(new BasicNameValuePair("clientSecret", "jkzl1h7aj39dnasyi23fnkv92"));
//        params.add(new BasicNameValuePair("code", "b60bab0617c04b23b7fa0a059cc83eb6"));
//        params.add(new BasicNameValuePair("openid","o0hubt3byGmNYLyC-UvmSVyUuZkI"));
//        //String res = httpClientUtil.post("http://www.xmtyw.cn/wlyy/iHealth/userInfo", params, "UTF-8");
//        //https://wx.xmzsh.com
//        String res = httpClientUtil.post("https://wx.xmzsh.com/interface/getUserInfoByOpenId.htm", params, "UTF-8");
//        return res;
        com.alibaba.fastjson.JSONObject jsonObject=new com.alibaba.fastjson.JSONObject();
        jsonObject.put("openId","o0hubt3byGmNYLyC-UvmSVyUuZkI");
        String responseMsg =httpClientUtil.sendPost("https://wx.xmzsh.com/interface/getUserInfoByOpenId.htm",jsonObject.toString());
        com.alibaba.fastjson.JSONObject object1 = com.alibaba.fastjson.JSONObject.parseObject(responseMsg);
        return object1.toString();
//        return null;
        params.add(new BasicNameValuePair("method", "ehc.ehealthcard.authurl"));
        params.add(new BasicNameValuePair("app_id", "1BQA48ETK000A718A8C000001FFAA482"));
        params.add(new BasicNameValuePair("term_id", "b60bab0617c04b23b7fa0a059cc83eb6"));
        params.add(new BasicNameValuePair("version","o0hubt3byGmNYLyC-UvmSVyUuZkI"));
        params.add(new BasicNameValuePair("timestamp", "ihealth_pa8DIRJasL"));
        params.add(new BasicNameValuePair("sign_type", "jkzl1h7aj39dnasyi23fnkv92"));
        params.add(new BasicNameValuePair("sign", "b60bab0617c04b23b7fa0a059cc83eb6"));
        params.add(new BasicNameValuePair("enc_type","o0hubt3byGmNYLyC-UvmSVyUuZkI"));
        params.add(new BasicNameValuePair("biz_content", "ihealth_pa8DIRJasL"));
        String res = httpClientUtil.post("http://172.16.1.21:6601/ehcService/gateway.do", params, "UTF-8");
        return res;
//        com.alibaba.fastjson.JSONObject jsonObject=new com.alibaba.fastjson.JSONObject();
//        jsonObject.put("openId","o0hubt3byGmNYLyC-UvmSVyUuZkI");
//        String responseMsg =httpClientUtil.sendPost("https://wx.xmzsh.com/interface/getUserInfoByOpenId.htm",jsonObject.toString());
//        com.alibaba.fastjson.JSONObject object1 = com.alibaba.fastjson.JSONObject.parseObject(responseMsg);
//        return object1.toString();
    }
    
    

+ 6 - 3
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -439,9 +439,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    public ListEnvelop findDoctorWorkTimeByMonth(@ApiParam(name = "doctor", value = "医生code")
                                                 @RequestParam(value = "doctor", required = true)String doctor,
                                                 @ApiParam(name = "date", value = "年份和月份,yyyy-MM")
                                                 @RequestParam(value = "date", required = true)String date) {
        return success(prescriptionService.findDoctorWorkTimeByMonth(doctor,date));
                                                 @RequestParam(value = "date", required = false)String date,
                                                 @ApiParam(name = "startDate", value = "yyyy-MM-dd")
                                                 @RequestParam(value = "startDate", required = false)String startDate,
                                                 @ApiParam(name = "endDate", value = "yyyy-MM-dd")
                                                 @RequestParam(value = "endDate", required = false)String endDate) {
        return success(prescriptionService.findDoctorWorkTimeByMonth(doctor,date,startDate,endDate));
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findWorkRule)