Procházet zdrojové kódy

改造随访接口

chenweida před 7 roky
rodič
revize
aeda6e417d

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/consult/ConsultDao.java

@ -31,8 +31,8 @@ public interface ConsultDao extends PagingAndSortingRepository<Consult, Long>, J
    @Query("select count(a) from Consult a,ConsultTeamDoctor b  where a.code = b.consult and a.patient=?1 and b.to=?2 and b.from is null")
    Integer findByPatient(String patientCode, String doctorCode);
    @Query("select a.id,a.type,a.code,a.title,a.symptoms,a.czrq,b.status,b.adminTeamId,b.team from Consult a,ConsultTeam b where a.code = b.consult and a.patient = ?1 and b.adminTeamId = ?2 and a.del = '1' order by a.czrq desc")
    Page<Object> findByPatientAndTeam(String patient, Long team, Pageable pageRequest);
    @Query("select a.id,a.type,a.code,a.title,a.symptoms,a.czrq,b.status,b.adminTeamId,b.team from Consult a,ConsultTeam b where a.code = b.consult and a.patient = ?1  and a.del = '1' order by a.czrq desc")
    Page<Object> findByPatientAndTeam(String patient, Pageable pageRequest);
    //获取咨询的状态
    @Query("select a from Consult a,ConsultTeam b where a.code = b.consult and a.code = ?1 ")

+ 6 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/followup/FollowUpDao.java

@ -45,8 +45,8 @@ public interface FollowUpDao extends PagingAndSortingRepository<Followup, Long>,
     * @param pageable
     * @return
     */
    @Query("select d.code,d.name,d.photo,a.followupType,a.followupClass,a.status,a.createTime,a.updateTime,a.followupManagerStatus,c.code,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo,a.prescriptionCode from Followup a, Doctor d, Doctor c where a.doctorCode = d.code and a.creater = c.code and a.patientCode = ?1 and a.adminTeamCode = ?2 and a.status > 0")
    Page<Object> findByPatientAndTeam(String patient, Long teamCode, Pageable pageable);
    @Query("select d.code,d.name,d.photo,a.followupType,a.followupClass,a.status,a.createTime,a.updateTime,a.followupManagerStatus,c.code,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo,a.prescriptionCode from Followup a, Doctor d, Doctor c where a.doctorCode = d.code and a.creater = c.code and a.patientCode = ?1  and a.status > 0")
    Page<Object> findByPatientAndTeam(String patient,Pageable pageable);
    
    /**
     * 查找所有的随访计划(未开始的归类为计划)
@ -55,8 +55,8 @@ public interface FollowUpDao extends PagingAndSortingRepository<Followup, Long>,
     * @param pageable
     * @return
     */
    @Query("select d.code,d.name,d.photo,a.followupType,a.followupClass,a.status,a.createTime,a.updateTime,a.followupManagerStatus,c.code,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo,a.prescriptionCode from Followup a, Doctor d, Doctor c where a.doctorCode = d.code and a.creater = c.code and a.patientCode = ?1 and a.adminTeamCode = ?2 and a.status = '2'")
    Page<Object> findPlanByPatientAndTeam(String patient, Long teamCode, Pageable pageable);
    @Query("select d.code,d.name,d.photo,a.followupType,a.followupClass,a.status,a.createTime,a.updateTime,a.followupManagerStatus,c.code,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo,a.prescriptionCode from Followup a, Doctor d, Doctor c where a.doctorCode = d.code and a.creater = c.code and a.patientCode = ?1 and a.status = '2'")
    Page<Object> findPlanByPatientAndTeam(String patient, Pageable pageable);
    /**
@ -66,8 +66,8 @@ public interface FollowUpDao extends PagingAndSortingRepository<Followup, Long>,
     * @param pageable
     * @return
     */
    @Query("select d.code,d.name,d.photo,a.followupType,a.followupClass,a.status,a.createTime,a.updateTime,a.followupManagerStatus,c.code,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo,a.prescriptionCode from Followup a, Doctor d, Doctor c where a.doctorCode = d.code and a.creater = c.code and a.patientCode = ?1 and a.adminTeamCode = ?2 and (a.status = '1' or a.status = '3')")
    Page<Object> findRecordByPatientAndTeam(String patient, Long teamCode, Pageable pageable);
    @Query("select d.code,d.name,d.photo,a.followupType,a.followupClass,a.status,a.createTime,a.updateTime,a.followupManagerStatus,c.code,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo,a.prescriptionCode from Followup a, Doctor d, Doctor c where a.doctorCode = d.code and a.creater = c.code and a.patientCode = ?1  and (a.status = '1' or a.status = '3')")
    Page<Object> findRecordByPatientAndTeam(String patient, Pageable pageable);
    
    /**
     * 根据续方CODE获取随访记录

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/patient/PatientHealthGuidanceDao.java

@ -55,6 +55,6 @@ public interface PatientHealthGuidanceDao extends PagingAndSortingRepository<Pat
    @Query("SELECT count(a) from PatientHealthGuidance a WHERE  a.patient=?2 and a.doctor=?1 ")
    Integer findbydoctorAndPatient(String doctor, String patientCode);
    @Query("select b.name, b.photo, a.id, substring(a.content, 1, 50) as content, a.createTime,b.level,b.code,a.adminTeamCode,a.readStatus from PatientHealthGuidance a, Doctor b where a.doctor = b.code and a.patient = ?1 and a.adminTeamCode = ?2 and a.del = '1'")
    Page<Object> findByPatientAndTeamCode(String patient, Long teamCode, Pageable pageable);
    @Query("select b.name, b.photo, a.id, substring(a.content, 1, 50) as content, a.createTime,b.level,b.code,a.adminTeamCode,a.readStatus from PatientHealthGuidance a, Doctor b where a.doctor = b.code and a.patient = ?1 and a.del = '1'")
    Page<Object> findByPatientAndTeamCode(String patient, Pageable pageable);
}

+ 2 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java

@ -736,15 +736,14 @@ public class ConsultTeamService extends ConsultService {
     * 查询居民咨询记录
     *
     * @param patient
     * @param teamCode
     * @param page
     * @param pageSize
     * @return
     */
    public JSONArray findByPatientAndTeam(String patient, Long teamCode, int page, int pageSize) {
    public JSONArray findByPatientAndTeam(String patient, int page, int pageSize) {
        PageRequest pageRequest = new PageRequest(page, pageSize);
        Patient p = patientDao.findByCode(patient);
        Page<Object> result = consultDao.findByPatientAndTeam(patient, teamCode, pageRequest);
        Page<Object> result = consultDao.findByPatientAndTeam(patient, pageRequest);
        JSONArray array = new JSONArray();
        for (Object obj : result) {

+ 4 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/followup/FollowUpService.java

@ -254,13 +254,13 @@ public class FollowUpService extends BaseService {
        Page<Object> result = null;
        if (StringUtils.isBlank(type)) {
            result = followupDao.findByPatientAndTeam(patient, teamCode, pageRequest);
            result = followupDao.findByPatientAndTeam(patient, pageRequest);
        } else if ("1".equals(type)) {
            //已经开始的就是记录
            result = followupDao.findPlanByPatientAndTeam(patient, teamCode, pageRequest);
            result = followupDao.findPlanByPatientAndTeam(patient, pageRequest);
        } else if ("2".equals(type)) {
            //未开始的就是计划
            result = followupDao.findRecordByPatientAndTeam(patient, teamCode, pageRequest);
            result = followupDao.findRecordByPatientAndTeam(patient, pageRequest);
        } else {
        }
@ -393,7 +393,7 @@ public class FollowUpService extends BaseService {
                }
                Followup followup = new Followup();
                followup.setFollowupType(map.get("type"));
                followup.setFollowupType(map.get("type").toString());
                Date date = DateUtil.strToDate(map.get("date"));
                followup.setFollowupDate(date);
                followup.setFollowupPlanDate(date);

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

@ -245,15 +245,14 @@ public class PatientHealthGuidanceService extends BaseService {
	 * 健康指导查询
	 *
	 * @param patient
	 * @param teamCode
	 * @param page
	 * @param pageSize
	 * @return
	 */
	public JSONArray findByPatientAndGuidanceAndTeam(String patient,long teamCode,int page,int pageSize){
	public JSONArray findByPatientAndGuidanceAndTeam(String patient,int page,int pageSize){
		Sort sort = new Sort(Sort.Direction.DESC,"createTime");
		PageRequest pageRequest = new PageRequest(page, pageSize, sort);
		Page<Object> result = patientHealthGuidanceDao.findByPatientAndTeamCode(patient,teamCode,pageRequest);
		Page<Object> result = patientHealthGuidanceDao.findByPatientAndTeamCode(patient,pageRequest);
		JSONArray array = new JSONArray();
		if (result != null) {
			for (Object obj : result) {

+ 40 - 76
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/ServiceStatisticsService.java

@ -16,6 +16,7 @@ import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -42,64 +43,28 @@ public class ServiceStatisticsService extends BaseService {
    @Autowired
    private ElasticsearchUtil elasticsearchUtil;
    public JSONObject getServiceStatistics(String patient, long teamCode, String doctor) throws Exception {
    public JSONObject getServiceStatistics(String patient, String doctor) throws Exception {
        JSONObject result = new JSONObject();
        AdminTeam team = teamService.getTeam(teamCode);
        SignFamily signFamily = signFamilyDao.findByPatientAndAdminTeamId(patient, teamCode, 2);
        if (signFamily == null) {
            signFamily = signFamilyDao.findByPatientAndAdminTeamId(patient, teamCode, 1);
            if (signFamily == null) {
                throw new Exception("patient and doctor no sign relation");
            } else {
                if((!doctor.equals(team.getLeaderCode()) && !doctor.equals(signFamily.getDoctor())
                        && !doctor.equals(signFamily.getDoctorHealth()))) {
                    throw new Exception("patient and doctor no sign relation");
                }
            }
        } else {
            if((!doctor.equals(team.getLeaderCode()) && !doctor.equals(signFamily.getDoctor())
                    && !doctor.equals(signFamily.getDoctorHealth()))) {
                signFamily = signFamilyDao.findByPatientAndAdminTeamId(patient, teamCode, 1);
                if (signFamily == null) {
                    throw new Exception("patient and doctor no sign relation");
                } else {
                    if((!doctor.equals(team.getLeaderCode()) && !doctor.equals(signFamily.getDoctor())
                            && !doctor.equals(signFamily.getDoctorHealth()))) {
                        throw new Exception("patient and doctor no sign relation");
                    }
                }
            }
        }
        if (signFamily == null) {
            signFamily = signFamilyDao.findByPatientAndAdminTeamId(patient, teamCode, 1);
            if (signFamily == null) {
                throw new Exception("sign info can not find");
            }
        }
        Calendar today = Calendar.getInstance();
        today.set(Calendar.DATE, 1);
        String monthBegin = DateUtil.dateToStrShort(today.getTime()) + " 00:00:00";
        String yearBegin = DateUtil.dateToStrShort(signFamily.getBegin()) + " 00:00:00";
        String yearEnd = DateUtil.dateToStrShort(signFamily.getEnd()) + " 23:59:59";
        JSONObject consult = getConsultStatistics(patient, teamCode, yearBegin, yearEnd, monthBegin);
        String yearBegin = "2018-01-01 00:00:00";
        String yearEnd = DateUtil.dateToStrShort(new Date()) + " 23:59:59";
        JSONObject consult = getConsultStatistics(patient, doctor, yearBegin, yearEnd, monthBegin);
        result.put("consult", consult);
        JSONObject followup = getFollowupStatistics(patient, teamCode, yearBegin, yearEnd, monthBegin);
        JSONObject followup = getFollowupStatistics(patient, doctor, yearBegin, yearEnd, monthBegin);
        result.put("followup", followup);
        JSONObject reservation = getReservationStatistics(patient, teamCode, yearBegin, yearEnd, monthBegin);
        JSONObject reservation = getReservationStatistics(patient, doctor, yearBegin, yearEnd, monthBegin);
        result.put("reservation", reservation);
        JSONObject guidance = getGuidanceStatistics(patient, teamCode, yearBegin, yearEnd, monthBegin);
        JSONObject guidance = getGuidanceStatistics(patient, doctor, yearBegin, yearEnd, monthBegin);
        result.put("guidance", guidance);
        JSONObject article = getArticleStatistics(patient, teamCode, DateUtil.dateToStrShort(signFamily.getBegin()), DateUtil.dateToStrShort(signFamily.getEnd()), DateUtil.dateToStrShort(today.getTime()));
        JSONObject article = getArticleStatistics(patient, doctor, "2018-01-01", DateUtil.dateToStrShort(new Date()), DateUtil.dateToStrShort(today.getTime()));
        result.put("article", article);
        return result;
@ -115,21 +80,21 @@ public class ServiceStatisticsService extends BaseService {
     * @param monthBegin
     * @return
     */
    public JSONObject getConsultStatistics(String patient, long teamCode, String yearBegin, String yearEnd, String monthBegin) {
    public JSONObject getConsultStatistics(String patient, String doctor, String yearBegin, String yearEnd, String monthBegin) {
        JSONObject result = new JSONObject();
        result.put("history", 0);
        result.put("history", 0);
        result.put("history", 0);
        String sqlHistory = "select count(1) h from wlyy_consult_team where patient = ? and admin_team_code = ?";
        String sqlYear = "select count(1) y from wlyy_consult_team where patient = ? and admin_team_code = ? and czrq >= ? and czrq <= ?";
        String sqlMonth = "select count(1) m from wlyy_consult_team where patient = ? and admin_team_code = ? and czrq >= ?";
        String sqlHistory = "select count(1) h from wlyy_consult_team where patient = ? and doctor = ?";
        String sqlYear = "select count(1) y from wlyy_consult_team where patient = ? and doctor = ? and czrq >= ? and czrq <= ?";
        String sqlMonth = "select count(1) m from wlyy_consult_team where patient = ? and doctor = ? and czrq >= ?";
        String sql = "select * from " +
                "(" + sqlHistory + ") a" +
                ",(" + sqlYear + ") b" +
                ",(" + sqlMonth + ") c";
        List<Map<String, Object>> counts = jdbcTemplate.queryForList(sql, new Object[]{patient, teamCode,
                patient, teamCode, yearBegin, yearEnd, patient, teamCode, monthBegin
        List<Map<String, Object>> counts = jdbcTemplate.queryForList(sql, new Object[]{patient, doctor,
                patient, doctor, yearBegin, yearEnd, patient, doctor, monthBegin
        });
        if (counts != null && counts.size() > 0) {
@ -145,13 +110,13 @@ public class ServiceStatisticsService extends BaseService {
     * 健康教育统计
     *
     * @param patient
     * @param teamCode
     * @param doctor
     * @param yearBegin
     * @param yearEnd
     * @param monthBegin
     * @return
     */
    public JSONObject getArticleStatistics(String patient, long teamCode, String yearBegin, String yearEnd, String monthBegin) {
    public JSONObject getArticleStatistics(String patient, String doctor, String yearBegin, String yearEnd, String monthBegin) {
               JSONObject result = new JSONObject();
        result.put("history", 0);
        result.put("year", 0);
@ -175,9 +140,9 @@ public class ServiceStatisticsService extends BaseService {
        }*/
        //数据转移至Es
        String sqlHistory="select count(*) AS h from " + esType + " where patientCode='" + patient + "' and adminTeamCode = '"+teamCode+"'";
        String sqlYear = "select count(*) AS y from "+esType+" where patientCode='" + patient + "' and adminTeamCode = '"+teamCode+"' and createTime >= '"+changeDate(yearBegin)+"' and createTime <= '"+changeDate(yearEnd)+"'";
        String sqlMonth = "select count(*) AS m from "+esType+" where patientCode='" + patient + "' and adminTeamCode = '"+teamCode+"' and createTime >= '"+changeDate(monthBegin)+"'";
        String sqlHistory="select count(*) AS h from " + esType + " where patientCode='" + patient + "' and doctorCode = '"+doctor+"'";
        String sqlYear = "select count(*) AS y from "+esType+" where patientCode='" + patient + "' and doctorCode = '"+doctor+"' and createTime >= '"+changeDate(yearBegin)+"' and createTime <= '"+changeDate(yearEnd)+"'";
        String sqlMonth = "select count(*) AS m from "+esType+" where patientCode='" + patient + "' and doctorCode = '"+doctor+"' and createTime >= '"+changeDate(monthBegin)+"'";
        result.put("history", elasticsearchUtil.excuteForLong(sqlHistory,esType,esIndex));
        result.put("year", elasticsearchUtil.excuteForLong(sqlYear,esType,esIndex));
@ -195,27 +160,27 @@ public class ServiceStatisticsService extends BaseService {
     * 健康指导统计
     *
     * @param patient
     * @param teamCode
     * @param doctor
     * @param yearBegin
     * @param yearEnd
     * @param monthBegin
     * @return
     */
    public JSONObject getGuidanceStatistics(String patient, long teamCode, String yearBegin, String yearEnd, String monthBegin) {
    public JSONObject getGuidanceStatistics(String patient, String doctor, String yearBegin, String yearEnd, String monthBegin) {
        JSONObject result = new JSONObject();
        result.put("history", 0);
        result.put("year", 0);
        result.put("month", 0);
        String sqlHistory = "select count(1) h from wlyy_patient_health_guidance where patient = ? and admin_team_code = ?";
        String sqlYear = "select count(1) y from wlyy_patient_health_guidance where patient = ? and admin_team_code = ? and czrq >= ? and czrq <= ?";
        String sqlMonth = "select count(1) m from wlyy_patient_health_guidance where patient = ? and admin_team_code = ? and czrq >= ?";
        String sqlHistory = "select count(1) h from wlyy_patient_health_guidance where patient = ? and doctor = ?";
        String sqlYear = "select count(1) y from wlyy_patient_health_guidance where patient = ? and doctor = ? and czrq >= ? and czrq <= ?";
        String sqlMonth = "select count(1) m from wlyy_patient_health_guidance where patient = ? and doctor = ? and czrq >= ?";
        String sql = "select * from " +
                "(" + sqlHistory + ") a" +
                ",(" + sqlYear + ") b" +
                ",(" + sqlMonth + ") c";
        List<Map<String, Object>> counts = jdbcTemplate.queryForList(sql, new Object[]{patient, teamCode,
                patient, teamCode, yearBegin, yearEnd, patient, teamCode, monthBegin
        List<Map<String, Object>> counts = jdbcTemplate.queryForList(sql, new Object[]{patient, doctor,
                patient, doctor, yearBegin, yearEnd, patient, doctor, monthBegin
        });
        if (counts != null && counts.size() > 0) {
@ -231,20 +196,19 @@ public class ServiceStatisticsService extends BaseService {
     * 随访计划统计
     *
     * @param patient
     * @param teamCode
     * @param yearBegin
     * @param yearEnd
     * @param monthBegin
     * @return
     */
    public JSONObject getFollowupStatistics(String patient, long teamCode, String yearBegin, String yearEnd, String monthBegin) {
    public JSONObject getFollowupStatistics(String patient, String doctor, String yearBegin, String yearEnd, String monthBegin) {
        JSONObject result = new JSONObject();
        result.put("history", 0);
        result.put("year", 0);
        result.put("month", 0);
        String sqlHistory = "select count(1) h from wlyy_followup where patient_code = ? and admin_team_code = ?";
        String sqlYear = "select count(1) y from wlyy_followup where patient_code = ? and admin_team_code = ? and create_time >= ? and create_time <= ?";
        String sqlMonth = "select count(1) m from wlyy_followup where patient_code = ? and admin_team_code = ? and create_time >= ?";
        String sqlHistory = "select count(1) h from wlyy_followup where patient_code = ? and doctor_code = ?";
        String sqlYear = "select count(1) y from wlyy_followup where patient_code = ? and doctor_code = ? and create_time >= ? and create_time <= ?";
        String sqlMonth = "select count(1) m from wlyy_followup where patient_code = ? and doctor_code = ? and create_time >= ?";
        String sql = "select * from " +
                "(" + sqlHistory + " and status > 0" + ") a" +
                ",(" + sqlYear + " and status > 0" + ") b" +
@ -253,9 +217,9 @@ public class ServiceStatisticsService extends BaseService {
                ",(" + sqlYear.replace(" y ", " yy ") + " and status = 1" + ") e" +
                ",(" + sqlMonth.replace(" m ", " mm ") + " and status = 1" + ") f";
        List<Map<String, Object>> counts = jdbcTemplate.queryForList(sql, new Object[]{patient, teamCode,
                patient, teamCode, yearBegin, yearEnd, patient, teamCode, monthBegin, patient, teamCode,
                patient, teamCode, yearBegin, yearEnd, patient, teamCode, monthBegin
        List<Map<String, Object>> counts = jdbcTemplate.queryForList(sql, new Object[]{patient, doctor,
                patient, doctor, yearBegin, yearEnd, patient, doctor, monthBegin, patient, doctor,
                patient, doctor, yearBegin, yearEnd, patient, doctor, monthBegin
        });
        if (counts != null && counts.size() > 0) {
@ -278,21 +242,21 @@ public class ServiceStatisticsService extends BaseService {
     * @param monthBegin
     * @return
     */
    public JSONObject getReservationStatistics(String patient, long teamCode, String yearBegin, String yearEnd, String monthBegin) {
    public JSONObject getReservationStatistics(String patient, String doctor, String yearBegin, String yearEnd, String monthBegin) {
        JSONObject result = new JSONObject();
        result.put("history", 0);
        result.put("year", 0);
        result.put("month", 0);
        String sqlHistory = "select count(1) h from wlyy_patient_reservation where patient = ? and admin_team_code = ?";
        String sqlYear = "select count(1) y from wlyy_patient_reservation where patient = ? and admin_team_code = ? and czrq >= ? and czrq <= ?";
        String sqlMonth = "select count(1) m from wlyy_patient_reservation where patient = ? and admin_team_code = ? and czrq >= ?";
        String sqlHistory = "select count(1) h from wlyy_patient_reservation where patient = ? and doctor = ?";
        String sqlYear = "select count(1) y from wlyy_patient_reservation where patient = ? and doctor = ? and czrq >= ? and czrq <= ?";
        String sqlMonth = "select count(1) m from wlyy_patient_reservation where patient = ? and doctor = ? and czrq >= ?";
        String sql = "select * from " +
                "(" + sqlHistory + ") a" +
                ",(" + sqlYear + ") b" +
                ",(" + sqlMonth + ") c";
        List<Map<String, Object>> counts = jdbcTemplate.queryForList(sql, new Object[]{patient, teamCode,
                patient, teamCode, yearBegin, yearEnd, patient, teamCode, monthBegin
        List<Map<String, Object>> counts = jdbcTemplate.queryForList(sql, new Object[]{patient, doctor,
                patient, doctor, yearBegin, yearEnd, patient, doctor, monthBegin
        });
        if (counts != null && counts.size() > 0) {

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/concern/DoctorConcernController.java

@ -49,6 +49,7 @@ public class DoctorConcernController extends BaseController {
                jsonObject.put("name", patient.getName());
                jsonObject.put("photo", patient.getPhoto());
                jsonObject.put("sex", patient.getSex());
                jsonObject.put("phone", patient.getPhone());
                jsonObject.put("age", IdCardUtil.getAgeForIdcard(patient.getIdcard()));
                jsonObject.put("isWX", StringUtils.isEmpty(patient.getOpenid()) ? false : true);
                jsonObject.put("concernTime", DateUtil.dateToStr(patient.getConcernCreateTime(), "yyyy-MM-dd HH:mm:ss"));

+ 1 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/consult/DoctorConsultController.java

@ -187,18 +187,14 @@ public class DoctorConsultController extends WeixinBaseController {
    @ResponseBody
    @ApiOperation(value = "居民咨询列表查询")
    public String listByTeam(@RequestParam @ApiParam(value = "居民Code") String patient,
                             @RequestParam @ApiParam(value = "团队Code") Long teamCode,
                             @RequestParam @ApiParam(value = "第几页") int page,
                             @RequestParam @ApiParam(value = "页大小") int pagesize) {
        try {
            if (StringUtils.isEmpty(patient)) {
                return error(-1, "请输入需查询的居民");
            }
            if (teamCode == null || teamCode < 1) {
                return error(-1, "请输入需查询的居民的团队");
            }
            page = page > 0 ? page - 1 : 0;
            JSONArray jsonArray = consultTeamService.findByPatientAndTeam(patient, teamCode, page, pagesize);
            JSONArray jsonArray = consultTeamService.findByPatientAndTeam(patient, page, pagesize);
            return write(200, "查询成功", "data", jsonArray);
        } catch (Exception e) {
            error(e);

+ 1 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/health/DoctorHealthGuidanceController.java

@ -306,18 +306,14 @@ public class DoctorHealthGuidanceController extends WeixinBaseController {
    @ResponseBody
    @ApiOperation(value = "查询居民健康指导记录")
    public String list(@RequestParam @ApiParam(value = "居民code") String patient,
                       @RequestParam @ApiParam(value = "团队Code") Long teamCode,
                       @RequestParam @ApiParam(value = "第几页") int page,
                       @RequestParam @ApiParam(value = "页大小") int pagesize) {
        try {
            if (StringUtils.isEmpty(patient)) {
                return error(-1, "请输入需查询的居民");
            }
            if (teamCode == null || teamCode < 1) {
                return error(-1, "请输入需查询的居民的团队");
            }
            page = page > 0 ? page - 1 : 0;
            JSONArray result = patientHealthGuidanceService.findByPatientAndGuidanceAndTeam(patient, teamCode, page, pagesize);
            JSONArray result = patientHealthGuidanceService.findByPatientAndGuidanceAndTeam(patient, page, pagesize);
            return write(200, "查询成功!", "data", result);
        } catch (Exception e) {
            error(e);

+ 2 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/ServiceStatisticsController.java

@ -31,10 +31,9 @@ public class ServiceStatisticsController extends BaseController {
     */
    @RequestMapping(value = "/statistics", method = {RequestMethod.GET, RequestMethod.POST})
    @ApiOperation(value = "居民服务统计查询")
    public String statistics(@RequestParam @ApiParam(value = "居民code") String patient,
                             @RequestParam @ApiParam(value = "团队Code") Long teamCode) {
    public String statistics(@RequestParam @ApiParam(value = "居民code") String patient) {
        try {
            JSONObject result = serviceStatistics.getServiceStatistics(patient, teamCode, getUID());
            JSONObject result = serviceStatistics.getServiceStatistics(patient, getUID());
            return write(200, "查询成功", "data", result);
        } catch (Exception e) {
            e.printStackTrace();