Sfoglia il codice sorgente

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

trick9191 7 anni fa
parent
commit
2ab63c6335

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

@ -3778,45 +3778,38 @@ public class FamilyContractService extends BaseService {
        // 先根据server_type分组查找wlyy_sign_family表中该医生的签约的患者,然后wlyy_sign_dict left join 得到全部的类型
        String sql=" select sd.code labelCode,sd.name labelName,IFNULL(t.count,0) amount from wlyy_sign_dict sd  " +
                " left join " +
                " ( " +
        String sql="SELECT " +
                " sd.CODE labelCode, " +
                " sd.NAME labelName, " +
                "  IFNULL(t.count,0) amount " +
                "FROM " +
                " wlyy_sign_dict sd " +
                "LEFT JOIN ( " +
                " SELECT " +
                "  sf.server_type type, " +
                "  sf.server_type_name name, " +
                "  count(id) count " +
                "  s.server_type, " +
                "  s.server_type_name, " +
                "  COUNT(1) count " +
                " FROM " +
                "  wlyy_sign_family sf " +
                "  wlyy_sign_family_server s, " +
                "  ( " +
                "   SELECT " +
                "    f. CODE " +
                "   FROM " +
                "    wlyy_sign_family f " +
                "   WHERE " +
                "    ( " +
                "     f.doctor = ? " +
                "     OR f.doctor_health = ?" +
                "    ) " +
                "   AND f.`status` > 0 " +
                "  ) f " +
                " WHERE " +
                "  sf. STATUS > 0 " +
                " AND ( " +
                "  sf.doctor =? " +
                "  or sf.doctor_health =? " +
                " ) " +
                " group by sf.server_type " +
                " ) t " +
                " on sd.`code`=t.type " +
                " where  sd.id in (4,5,6,7,8,9,10,11,12)";
                "  s.sign_code = f.`code` " +
                " GROUP BY " +
                "  s.server_type " +
                ") t ON sd.CODE = t.server_type " +
                "WHERE " +
                " sd.`year` = '"+DateUtil.getSignYear()+"'";
        List<Map<String,Object>> queryData=jdbcTemplate.queryForList(sql,doctor,doctor);