Просмотр исходного кода

Merge branch 'dev' of huangwenjie/patient-co-management into dev

chenweida 7 лет назад
Родитель
Сommit
a94d14afbf

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/patient/PatientDao.java

@ -66,7 +66,7 @@ public interface PatientDao extends PagingAndSortingRepository<Patient, Long> {
    @Query("select distinct p.openid from Patient p where p.openid is not null and p.openid <> '' ")
    List<String> findOpenids();
    @Query(value=" select p.* from wlyy_patient p  LEFT JOIN wlyy_sign_family s on s.patient = p.code  RIGHT JOIN wlyy_sign_patient_label_info sp on sp.patient = p.code WHERE sp.status = 1 and s.status > 0 and sp.label_type = 3 and (sp.label = 1 or sp.label = 2)  and s.admin_team_code = ?1 and (s.doctor = ?2 or s.doctor_health =?2))",nativeQuery = true)
    @Query(value=" select DISTINCT p.* from wlyy_patient p  LEFT JOIN wlyy_sign_family s on s.patient = p.code  RIGHT JOIN wlyy_sign_patient_label_info sp on sp.patient = p.code WHERE sp.status = 1 and s.status > 0 and sp.label_type = 3 and (sp.label = 1 or sp.label = 2)  and s.admin_team_code = ?1 and (s.doctor = ?2 or s.doctor_health =?2)",nativeQuery = true)
    List<Patient> findAllSignPatientTeamcode(String teamcode, String  doctorcode);
    @Query(value="SELECT DISTINCT t.* FROM wlyy_sign_family t1,wlyy_patient t WHERE t.`code`=t1.patient AND t1.STATUS>0 AND " +

+ 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","您未绑定血压智能设备,请手动上传体征数据,绑定设备后系统将会自动将您的体征数据上报给医生");
		}