Bladeren bron

Merge branch 'dev' of wangzhinan/wlyy2.0 into dev

huangwenjie 6 jaren geleden
bovenliggende
commit
4a9fe3b4cb

+ 1 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/specialist/SpecialistMapping.java

@ -41,6 +41,7 @@ public class SpecialistMapping {
        public static final String searchPatientInSpeciaInfo ="/searchPatientInSpeciaInfo";
        public static final String createPatientInSpeciaRelation ="/createPatientInSpeciaRelation";
        public static final String updateRedisFindPatientTeamList ="/updateRedisFindPatientTeamList";
        public static final String selectByAssistant="/selectByAssistant";

+ 1 - 1
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/SpecialistController.java

@ -473,7 +473,7 @@ public class SpecialistController extends EnvelopRestEndpoint {
     * @param doctor
     * @return
     */
    @GetMapping(value = "/selectByAssistant")
    @GetMapping(value =SpecialistMapping.specialist.selectByAssistant)
    @ApiOperation(value = "根据共管医生和居民code查询专科签约信息")
    public MixEnvelop<SpecialistPatientRelationDO,SpecialistPatientRelationDO> selectByAssistant(
            @ApiParam(name = "patient", value = "居民code") @RequestParam(required = true)String patient,

+ 8 - 18
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistService.java

@ -203,8 +203,8 @@ public class SpecialistService{
                " lb.labelType, " +
                " lb.label, " +
                " p.photo, " +
                " h.label_name as health, " +
                " h.label AS healthcode ," +
                " lb.labelName as health, " +
                " lb.label AS healthcode ," +
                " s.health_assistant AS healthAssistant," +
                " s.health_assistant_name AS healthAssistantName" +
                " FROM " +
@ -223,17 +223,6 @@ public class SpecialistService{
                " ) lb " +
                " JOIN "+basedb+".wlyy_patient p ON p. CODE = lb.patient " +
                " JOIN wlyy_specialist_patient_relation s ON s.patient = lb.patient " +
                " LEFT JOIN ( " +
                " SELECT " +
                "  t.label, " +
                "  t.label_name, " +
                "  t.patient " +
                " FROM " +
                "  "+basedb+".wlyy_sign_patient_label_info t " +
                " WHERE " +
                "  t.label_type = '8' " +
                " AND t.`status` = '1' " +
                " ) h ON h.patient = lb.patient " +
                " WHERE ( s.doctor ='"+doctor+"' OR s.health_doctor='"+doctor+"' OR s.health_assistant='"+doctor+ "') AND s.status >=0  AND s.sign_status >0"+
                " LIMIT "+(page-1)*size+","+size;
        
@ -263,7 +252,7 @@ public class SpecialistService{
        return MixEnvelop.getSuccess(SpecialistMapping.api_success,PatientLabelVOs);
    }
    public MixEnvelop<Long, Long> getLabelpatientCount(String doctor, String label, String labelType){
    public MixEnvelop<Long, Long> getLabelpatientCount(String doctor, String labelType, String label){
        String sql = "SELECT " +
                " COUNT(1) as total " +
                " FROM " +
@ -279,9 +268,10 @@ public class SpecialistService{
                "   i.label = '"+label+"' "+
                "  AND i.label_type = '"+labelType+"' " +
                "  AND i.`status` = '1' " +
                " ) lb " +
                " JOIN wlyy_specialist_patient_relation s ON s.patient = lb.patient " +
                " WHERE ( s.doctor ='"+doctor+"' OR s.health_doctor='"+doctor+"' OR s.health_assistant='"+doctor+ "')  AND s.status >=0  AND s.sign_status >0";
                " AND i.patient in ( " +
                " select patient from  wlyy_specialist_patient_relation  WHERE " +
                "( doctor = '"+doctor+"' OR health_doctor = '"+doctor+"' OR health_assistant='"+doctor+ "' ) AND STATUS >= 0 AND sign_status > 0 )"+
                " ) lb ";
        List<Map<String,Object>> rstotal = jdbcTemplate.queryForList(sql);
        Long count = 0L;
        if(rstotal!=null&&rstotal.size()>0){
@ -957,7 +947,7 @@ public class SpecialistService{
     * @return
     */
    public List<SpecialistPatientRelationDO> selectByAssistant(String patient,String doctor){
        String sql = "select * from wlyy_specialist_patient_relation r where r.health_assistant = '"+doctor+"' and r.patient = '"+patient+"' and status = 1 and sign_status = 1";
        String sql = "select * from wlyy_specialist_patient_relation r where r.health_assistant = '"+doctor+"' and r.patient = '"+patient+"' ";
        List<SpecialistPatientRelationDO> relationDOS = jdbcTemplate.query(sql,new BeanPropertyRowMapper(SpecialistPatientRelationDO.class));
        return relationDOS;
    }