Procházet zdrojové kódy

慢病管理相关接口BUG修改

huangwenjie před 7 roky
rodič
revize
bcb874159c

+ 4 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionFollowupContentService.java

@ -299,7 +299,7 @@ public class PrescriptionFollowupContentService extends BaseService {
		Date imBloodSugarDate = new Date();
		
		int total = 0;
		String sql = "select sum(category_code) amount FROM wlyy_patient_device WHERE user='"+prescription.getPatient()+"'";
		String sql = "SELECT count(id) amount FROM wlyy_patient_device where  user='"+prescription.getPatient()+"' AND category_code = 2";
		List<Map<String,Object>> result =  jdbcTemplate.queryForList(sql);
		if (result != null && result.size() > 0) {
			if(result.get(0).get("amount") != null){
@ -307,7 +307,7 @@ public class PrescriptionFollowupContentService extends BaseService {
				total = (result.get(0).get("amount") != null ? amount.intValue() : 0);
			}
		}
		if(total != 1 && total !=3){
		if(total == 0){
			contentDoctor.put("deviceMsg","您未绑定血糖智能设备,请手动上传体征数据,绑定设备后系统将会自动将您的体征数据上报给医生");
		}
		
@ -489,7 +489,7 @@ public class PrescriptionFollowupContentService extends BaseService {
		org.json.JSONObject contentPatient = new org.json.JSONObject();
		
		int total = 0;
		String sql = "select sum(category_code) amount FROM wlyy_patient_device WHERE user='"+prescription.getPatient()+"'";
		String sql = "SELECT count(id) amount FROM wlyy_patient_device where  user='"+prescription.getPatient()+"' AND category_code = 1";
		List<Map<String,Object>> result =  jdbcTemplate.queryForList(sql);
		if (result != null && result.size() > 0) {
			if(result.get(0).get("amount") != null){
@ -497,7 +497,7 @@ public class PrescriptionFollowupContentService extends BaseService {
				total = (result.get(0).get("amount") != null ? amount.intValue() : 0);
			}
		}
		if(total != 2 && total !=3 ){
		if(total == 0){
			contentDoctor.put("deviceMsg","您未绑定血压智能设备,请手动上传体征数据,绑定设备后系统将会自动将您的体征数据上报给医生");
		}