Browse Source

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev-1.3.6.1

trick9191 7 năm trước cách đây
mục cha
commit
8a25dce173

+ 4 - 1
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/common/account/CustomerController.java

@ -188,7 +188,10 @@ public class CustomerController extends BaseController {
            type="3";
        }
        Map<String, Object> resp = customerService.sendMsg(doctor,msg,type);
        return write(200,"","data",resp);
        if(resp.size()==0){
            return write(200,"发送成功");
        }
        return write(-1,"发送失败","data",resp);
    }
}

+ 14 - 16
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/account/CustomerService.java

@ -113,22 +113,6 @@ public class CustomerService{
	public Map<String, Object> sendMsg(Doctor doctor,String msg,String type) {
		Map<String, Object> resp = new HashMap<String, Object>();
		//发送短信消息啦
		String mobile = doctor.getMobile();
		//
		if(!StringUtils.isBlank(mobile)&&!"2".equals(type)){
			List<NameValuePair> par = new ArrayList<NameValuePair>();
			par.add(new BasicNameValuePair("mobiles", mobile));
			par.add(new BasicNameValuePair("content", msg));
			String result = HttpClientUtil.post(messageApi+"/sendMobileMessage",par,"UTF-8");
			JSONObject resultJson = new JSONObject(result);
			if(1!=resultJson.getInt("successNum")){
				resp.put("mobile","-1");//-1代表发送失败
			}
		}
		//发送微信消息啦
		String openId = doctor.getOpenid();
		if(!StringUtils.isBlank(openId)&&!"1".equals(type)){
@ -142,6 +126,20 @@ public class CustomerService{
				resp.put("wechat","-1");//-1代表发送失败
			}
		}
		//发送短信消息啦
		String mobile = doctor.getMobile();
		if(!StringUtils.isBlank(mobile)&&!"2".equals(type)){
			msg+="\n您可通过微信关注\"i健康智能助手\"公众号(微信号:厦门i健康)更快更便捷的获取服务信息。";
			List<NameValuePair> par = new ArrayList<NameValuePair>();
			par.add(new BasicNameValuePair("mobiles", mobile));
			par.add(new BasicNameValuePair("content", msg));
			String result = HttpClientUtil.post(messageApi+"/sendMobileMessage",par,"UTF-8");
			JSONObject resultJson = new JSONObject(result);
			if(1!=resultJson.getInt("successNum")){
				resp.put("mobile","-1");//-1代表发送失败
			}
		}
		return resp;
	}
}

+ 3 - 2
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/job/PatientDiseaseConditionSynJob.java

@ -26,8 +26,9 @@ public class PatientDiseaseConditionSynJob implements Job {
        logger.info("START=====开始更新慢病患者定标情况的JOB");
        try {
            String startdate = DateUtil.getStringDateShort() + " 00:00:00";
            String enddate = DateUtil.getStringDateShort() + " 23:59:59";
            //获取前一天的时间范围
            String startdate = DateUtil.getNextDay(DateUtil.getStringDateShort(),-1) + " 00:00:00";
            String enddate = DateUtil.getNextDay(DateUtil.getStringDateShort(),-1) + " 23:59:59";
            //根据起止时间查询家签慢病患者定标情况,并同步到本地数据库
            jwPrescriptionService.getPatientDiseaseContentMapByTime(startdate,enddate);

+ 2 - 2
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/web/quota/JobController.java

@ -472,12 +472,12 @@ public class JobController extends BaseController {
    /**
     *立即执行当天的慢病患者定标情况同步
     *立即执行前一天的慢病患者定标情况同步
     *@author huangwenjie
     *@date 2017/9/17 14:16
     */
    @RequestMapping(value = "/executePatientDiseaseConditionSynJob", method = RequestMethod.POST)
    @ApiOperation("立即执行当天的慢病患者定标情况同步")
    @ApiOperation("立即执行前一天的慢病患者定标情况同步")
    public String executePatientDiseaseConditionSynJob() {
        try {
            quartzHelper.startNow(PatientDiseaseConditionSynJob.class, "PATIENT-DISEASE-CONDITION-SYN", null);

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/CommonUtil.java

@ -368,7 +368,7 @@ public class CommonUtil {
        heightStr = df2.format(heightCM/100d);
        double height = Double.parseDouble(heightStr);
        double bmi = weight / height * 2;
        double bmi = weight / (height * height);
        return bmi;
    }