trick9191 7 tahun lalu
induk
melakukan
a7732bfe36

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

@ -3839,11 +3839,11 @@ public class FamilyContractService extends BaseService {
        //找出患者的三师签约信息
        Patient patient = patientDao.findByCode(patientCode);
        Calendar cal = Calendar.getInstance();
        int year = cal.get(Calendar.YEAR);
//        Calendar cal = Calendar.getInstance();
//        int year = cal.get(Calendar.YEAR);
        //得到家庭签约
        SignFamily jtSignFamily = signFamilyDao.findFamilySignByPatientOverDue(patientCode, (year - 1) + "");
        SignFamily jtSignFamily = signFamilyDao.findFamilySignByPatientOverDue(patientCode, (DateUtil.getSignYear() - 1) + "");
        if (jtSignFamily != null) {
            //家庭签约只找全科医生

+ 7 - 7
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/SignWebService.java

@ -1968,7 +1968,7 @@ public class SignWebService extends BaseService {
        JSONObject rs = new JSONObject();
        List<SignFamily> signFamilys = signFamilyDao.findByPatientsLastYear(patient, (DateUtil.getNowYear() - 1) + "");
        List<SignFamily> signFamilys = signFamilyDao.findByPatientsLastYear(patient, (DateUtil.getSignYear() - 1) + "");
        if (signFamilys == null || signFamilys.size() == 0) {
            throw new RuntimeException("找不到签约关系!");
        }
@ -1991,22 +1991,22 @@ public class SignWebService extends BaseService {
                }
            }
        }
        Calendar cal = Calendar.getInstance();
        int year = cal.get(Calendar.YEAR);
//        Calendar cal = Calendar.getInstance();
//        int year = cal.get(Calendar.YEAR);
        //咨询量
        String consult_sql = "SELECT COUNT(1) AS consultCount,d.name doctorName FROM wlyy_consult_team t,wlyy_doctor d WHERE t.doctor = d.code AND t.patient ='" + patient + "' " +
                "AND t.czrq <='" + year + "-07-01' AND t.czrq >='" + (year - 1) + "-07-01' GROUP BY t.doctor DESC ";
                "AND t.czrq <='" + DateUtil.getSignYear() + "-07-01' AND t.czrq >='" + (DateUtil.getSignYear() - 1) + "-07-01' GROUP BY t.doctor DESC ";
        //获取待预约
        String reservation_sql = "SELECT COUNT(1) AS reservationCount FROM wlyy_patient_reservation  w " +
                " WHERE w.doctor in(" + doctorCodeSql + ") AND w.patient ='" + patient + "'" +
                " AND w.czrq <='" + year + "-07-01' AND w.czrq >='" + (year - 1) + "-07-01'  ";
                " AND w.czrq <='" + DateUtil.getSignYear() + "-07-01' AND w.czrq >='" + (DateUtil.getSignYear() - 1) + "-07-01'  ";
        //获取健康教育
        String article_sql = "SELECT COUNT(1) AS articleCount FROM wlyy_health_edu_article_patient  w,wlyy_health_edu_article w2 WHERE w.article = w2.code " +
                "AND  w.doctor IN(" + doctorCodeSql + ") AND w.patient ='" + patient + "' " +
                "AND w.czrq <='" + year + "-07-01' AND w.czrq >='" + (year - 1) + "-07-01'  ";
                "AND w.czrq <='" + DateUtil.getSignYear() + "-07-01' AND w.czrq >='" + (DateUtil.getSignYear() - 1) + "-07-01'  ";
        //获取健康指导
        String guidance_sql = "SELECT COUNT(1) AS guidanceCount  FROM wlyy_patient_health_guidance  w " +
                "WHERE w.doctor IN(" + doctorCodeSql + ") and w.patient ='" + patient + "' AND w.czrq <='" + year + "-07-01' AND w.czrq >='" + (year - 1) + "-07-01'  ";
                "WHERE w.doctor IN(" + doctorCodeSql + ") and w.patient ='" + patient + "' AND w.czrq <='" + DateUtil.getSignYear() + "-07-01' AND w.czrq >='" + (DateUtil.getSignYear() - 1) + "-07-01'  ";
        //咨询量
        List<Map<String, Object>> consultResult = jdbcTemplate.queryForList(consult_sql);