Преглед на файлове

续方咨询导入血糖血压接口 BUG 修复

huangwenjie преди 7 години
родител
ревизия
5b662bdd27

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

@ -300,7 +300,8 @@ public class PrescriptionFollowupContentService extends BaseService {
		String sql = "select sum(category_code) amount FROM wlyy_patient_device WHERE user='"+prescription.getPatient()+"'";
		List<Map<String,Object>> result =  jdbcTemplate.queryForList(sql);
		if (result != null && result.size() > 0) {
			total = (result.get(0).get("amount") != null ? Integer.parseInt(result.get(0).get("amount").toString()) : 0);
			Double amount = new Double(result.get(0).get("amount").toString());
			total = (result.get(0).get("amount") != null ? amount.intValue() : 0);
		}
		if(total != 1 || total != 3){
			contentDoctor.put("deviceMsg","您未绑定血糖智能设备,请手动上传体征数据,绑定设备后系统将会自动将您的体征数据上报给医生");
@ -364,7 +365,7 @@ public class PrescriptionFollowupContentService extends BaseService {
			
			FollowupContentESDO followupContentESDO = followUpService.esGetFollowupProjectData(followup_id,"3");
			
			if(followupContentESDO != null){
			if(followupContentESDO == null){
				followUpService.esSaveFollowupProjectData(followup_id, "3", followupProjectData);
			}else{
				FollowupContentESDO newfollowupContentESDO = JSON.parseObject(followupProjectData, FollowupContentESDO.class);
@ -501,7 +502,8 @@ public class PrescriptionFollowupContentService extends BaseService {
		String sql = "select sum(category_code) amount FROM wlyy_patient_device WHERE user='"+prescription.getPatient()+"'";
		List<Map<String,Object>> result =  jdbcTemplate.queryForList(sql);
		if (result != null && result.size() > 0) {
			total = (result.get(0).get("amount") != null ? Integer.parseInt(result.get(0).get("amount").toString()) : 0);
			Double amount = new Double(result.get(0).get("amount").toString());
			total = (result.get(0).get("amount") != null ? amount.intValue() : 0);
		}
		if(total != 2 || total != 3){
			contentDoctor.put("deviceMsg","您未绑定血压智能设备,请手动上传体征数据,绑定设备后系统将会自动将您的体征数据上报给医生");
@ -516,7 +518,7 @@ public class PrescriptionFollowupContentService extends BaseService {
			
			FollowupContentESDO followupContentESDO = followUpService.esGetFollowupProjectData(followup_id,"2");
			
			if(followupContentESDO != null){
			if(followupContentESDO == null){
				followUpService.esSaveFollowupProjectData(followup_id, "2", followupProjectData);
			}else{
				followupContentESDO.setBP_D(jsonObject.getString("value1"));