Browse Source

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

lyr 8 years ago
parent
commit
cf2c26da9f

+ 1 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/Patient.java

@ -174,6 +174,7 @@ public class Patient extends IdEntity implements Serializable {
		this.ssc = ssc;
	}
	@Column(name = "photo", insertable = false)
	public String getPhoto() {
		return photo;
	}

+ 0 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java

@ -843,7 +843,6 @@ public class FamilyContractService extends BaseService {
            patient.setPassword(MD5.GetMD5Code(password + salt));
            patient.setStatus(1);
            patient.setDisease(0);
            patient.setPhoto("");
        }
        // 保存用户信息

+ 1 - 3
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsAllService.java

@ -617,9 +617,7 @@ public class StatisticsAllService extends BaseService {
        resultList = jdbcTemplate.queryForList(sql, new Object[]{low_level, date, area});
        if (resultList != null && resultList.size() > 0) {
        } else {
        if (resultList == null || resultList.size() < 1) {
            resultList = getLowLevelMapKey(level, low_level, area);
        }

+ 0 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/account/WechatController.java

@ -296,7 +296,6 @@ public class WechatController extends WeixinBaseController {
            patient.setName(name);
            patient.setIdcard(idcard);
            patient.setMobile(mobile);
            patient.setPhoto("");
            //增加密码
            String salt= UUID.randomUUID().toString().replace("-","");
            patient.setSalt(salt);

+ 36 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/SignPatientLabelController.java

@ -1,7 +1,9 @@
package com.yihu.wlyy.web.doctor.patient;
import com.yihu.wlyy.entity.doctor.team.admin.AdminTeam;
import com.yihu.wlyy.entity.doctor.team.sign.SignPatientLabel;
import com.yihu.wlyy.service.app.label.SignPatientLabelService;
import com.yihu.wlyy.service.app.team.AdminTeamService;
import com.yihu.wlyy.web.BaseController;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
@ -9,8 +11,10 @@ import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
/**
@ -24,6 +28,8 @@ public class SignPatientLabelController extends BaseController {
    @Autowired
    SignPatientLabelService labelService;
    @Autowired
    AdminTeamService teamService;
    /**
     * 添加标签
@ -236,4 +242,34 @@ public class SignPatientLabelController extends BaseController {
            return error(-1, "查询失败");
        }
    }
    @RequestMapping(value = "/patient_teams")
    public String getTeamsLabelsByPatient(@RequestParam String patient) {
        try {
            if (StringUtils.isEmpty(patient)) {
                return error(-1, "居民不能为空");
            }
            JSONArray teams = teamService.findPatientDoctorTeam(patient, getUID());
            if(teams != null && teams.length() > 0){
                for(int i = 0; i < teams.length(); i++){
                    JSONObject team = teams.getJSONObject(i);
                    List<SignPatientLabel> labels = labelService.getLabelsByTypeAndTeam("4", String.valueOf(team.getLong("id")));
                    if(labels != null){
                        team.put("labels",new JSONArray(labels));
                    } else {
                        team.put("labels",new JSONArray());
                    }
                }
            }
            return write(200, "查询成功", "data", teams);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, "查询失败");
        }
    }
}