Bladeren bron

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

linzhuo 8 jaren geleden
bovenliggende
commit
525c326b81

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/job/SignEndJob.java

@ -29,7 +29,7 @@ public class SignEndJob implements Job {
            String date = DateUtil.dateToStrShort(today.getTime());
            String start = date + " 00:00:00";
            String end = date + " 23:59:59";
            String sql = "update wlyy_sign_family set status = -4 where end >= ? and end <= ? and status > 0";
            String sql = "update wlyy_sign_family set status = -4,apply_unsign_date =SYSDATE() where end >= ? and end <= ? and status > 0";
            int sucess = jdbcTemplate.update(sql, start, end);
            String sqlT = "update wlyy_doctor_team set del = '0' where del = '1' and code in (select team_code from wlyy_sign_family where end >= ? and end <= ? and status > 0)";
            String sqlTm = "update wlyy_doctor_team_member set del = '0' where del = '1' and team in (select team_code from wlyy_sign_family where end >= ? and end <= ? and status > 0)";

+ 7 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/PatientHealthGuidanceService.java

@ -92,12 +92,17 @@ public class PatientHealthGuidanceService extends BaseService {
	public PatientHealthGuidance add(PatientHealthGuidance guidance, String accessToken) throws Exception {
		Doctor doctor = doctorDao.findByCode(guidance.getDoctor());
		Patient patient = patientDao.findByCode(guidance.getPatient());
		//家庭医生
		SignFamily signFamily = signFamilyDao.findByjiatingPatient(guidance.getPatient());
		//家庭医生不存在
		if(signFamily == null){
			throw new Exception("can not find patient's family sign info");
			 signFamily = signFamilyDao.findBySanshiPatient(guidance.getPatient());
			 if(signFamily==null){
			 	throw new RuntimeException("患者未签约!");
			 }
		}
		guidance.setCzrq(new Date());
		guidance.setCreateTime(new Date());
		guidance.setDel("1");

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

@ -1498,11 +1498,11 @@ public class FamilyContractService extends BaseService {
        Patient p = patientDao.findByIdcard(idCard);
        if (p == null) {
            result.put("signStatus", "0");
            result.put("msg", "病人未注册");
            return result;
        }
        //if (p == null) {
        //    result.put("signStatus", "0");
        //    result.put("msg", "病人未注册");
        //    return result;
        //}
        if (signFamily != null) {
            result.put("signStatus", "2");
            result.put("msg", "病人已申请过家庭签约!");