Browse Source

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

huangwenjie 7 years ago
parent
commit
9ec13de2fb

+ 3 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionInfoService.java

@ -406,8 +406,6 @@ public class PrescriptionInfoService extends BaseService {
                p.setPrescribeReason(byRefParaData.getJSONObject(0).getString("errorMsg"));
                p.setPrescribeTime(new Date());
                prescriptionDao.save(p);
                //审核不通过模板消息
                sendRMess(p.getCode(), 0);
                return 0;
            }
        }
@ -541,7 +539,6 @@ public class PrescriptionInfoService extends BaseService {
                //修改系统的续方消息的审核状态
                messageDao.updatePreScriptionMessage(p.getConsult(), "2", 6);
                //审核不用过发送消息
                //发送Im消息
                JSONObject content = new JSONObject();
@ -550,6 +547,9 @@ public class PrescriptionInfoService extends BaseService {
                content.put("reason", reason);
                content.put("url", "");
                imUtill.sendTopicIM(p.getDoctor(), p.getDoctorName(), p.getConsult(), "15", content.toString(), null);
                //审核不通过模板消息
                sendRMess(p.getCode(), 0);
            }
            prescriptionReviewedDao.save(reviewed);
            prescriptionDao.save(p);

+ 17 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsService.java

@ -1758,11 +1758,23 @@ public class StatisticsService extends BaseService {
            throw new Exception("时间区间错误");
        }
        String sql = "SELECT DATE_FORMAT(t.czrq,'%Y-%m') mt,ifnull(ROUND(AVG(s.score),1),0)  as avgCount " +
                " FROM  wlyy_consult_team t " +
                "  LEFT JOIN wlyy_doctor d ON d.code = t.doctor " +
                "  LEFT JOIN wlyy_evaluate_score s ON s.consult = t.consult " +
                " WHERE t.czrq >=? AND t.czrq <=?";
        String sql = "SELECT " +
                " DATE_FORMAT(t.czrq, '%Y-%m') mt, " +
                " ifnull(ROUND(AVG(s.score), 1), 0) AS avgCount " +
                " FROM " +
                " ( " +
                "  SELECT " +
                "   m.doctor, " +
                "   m.consult, " +
                "   m.czrq " +
                "  FROM " +
                "   wlyy_consult_team m " +
                "  WHERE " +
                "   m.czrq >= ? " +
                "  AND m.czrq <= ? " +
                "  ) t " +
                " LEFT JOIN wlyy_doctor d ON d. CODE = t.doctor " +
                " JOIN wlyy_evaluate_score s ON s.consult = t.consult";
        //市级
        if ("4".equals(level)) {
            sql += " AND d.city = ? ";