Browse Source

修改服务动态和健康监测列表

xiaoyunquan 2 years ago
parent
commit
eb864fdf34

+ 16 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/third/platForm/PatientInfoPlatFormEndpoint.java

@ -13,6 +13,7 @@ import com.yihu.jw.care.service.security.SecurityMonitoringOrderService;
import com.yihu.jw.care.service.third.PatientInfoPlatFormService;
import com.yihu.jw.entity.care.doorCoach.BaseDoorCoachOrderDO;
import com.yihu.jw.entity.care.lifeCare.LifeCareOrderDO;
import com.yihu.jw.entity.care.message.BaseServiceNews;
import com.yihu.jw.restmodel.ResponseContant;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
@ -26,6 +27,8 @@ import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * Created by Bing on 2021/6/16.
 * 管理端pc端 居民详情大屏
@ -121,6 +124,19 @@ public class PatientInfoPlatFormEndpoint extends EnvelopRestEndpoint {
        }
    }
    @GetMapping(value = "findNewsByPage")
    @ApiOperation("服务动态分页")
    public PageEnvelop findNewsByPage(@ApiParam(name="page",value = "页面大小",required = false) @RequestParam(value = "page",required = false,defaultValue = "0")Integer page,
                                      @ApiParam(name="pageSize",value = "页面大小",required = true) @RequestParam(value = "pageSize",required = false,defaultValue = "9")Integer pageSize){
        try {
            List<BaseServiceNews> news = baseServiceNewsService.findNews(page, pageSize);
            Long count = baseServiceNewsService.findNewsCount();
            return PageEnvelop.getSuccessListWithPage("获取成功",news,page,pageSize,count);
        }catch (Exception e){
            return failedPageEnvelopException2(e);
        }
    }
    @GetMapping(value = "getPatientInfo")
    @ApiOperation("获取居民详情页--弃用")
    public ObjEnvelop getPatientInfo(@ApiParam(name="patient",value = "居民id",required = true)

+ 11 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/message/BaseServiceNewsService.java

@ -324,6 +324,17 @@ public class BaseServiceNewsService {
        return result;
    }
    /**
     * 获取综合服务的总数
     * @return
     */
    public Long findNewsCount(){
        String sql = "SELECT COUNT(*) FROM base_service_news\n" +
                "WHERE code NOT IN \n" +
                "(SELECT dict_code from wlyy_hospital_sys_dict WHERE dict_name = 'jkzl_child' or dict_name = 'jkzl_older')";
        return jdbcTemplate.queryForObject(sql, Long.class);
    }
    /**
     * 添加服务动态信息-大屏展示用
     * @param name

+ 10 - 3
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/third/PatientInfoPlatFormService.java

@ -684,7 +684,7 @@ public class PatientInfoPlatFormService {
        }
        String sql = " SELECT idx.id,idx.user,idx.`name`,p.archive_type archiveType,p.residential_area residentialArea,'健康监测' as serve_desc, " +
                "idx.czrq,value1,value2,value3,value4,value5,value6,value7,type FROM wlyy_patient_health_index idx " +
                "idx.czrq,value1,value2,value3,value4,value5,value6,value7,type,DATE_FORMAT(idx.czrq,'%Y-%m-%d %H:%i:%S') createTime FROM wlyy_patient_health_index idx " +
                " INNER JOIN base_patient p on idx.user = p.id and p.del=1\n" +
                " WHERE idx.del = 1 AND idx.type < 3 "+filter+" ORDER BY idx.czrq desc ";
        String countSql = "select count(id) from ("+sql+")A ";
@ -1167,7 +1167,7 @@ public class PatientInfoPlatFormService {
        }
        String sql = "SELECT\n" +
                "\t\tidx.id,\n" +
                "\t\tidx.USER,\n" +
                "\t\tidx.user,\n" +
                "\t\tidx.`name`,idx.type,\n" +
                "\t\tp.archive_type archiveType,\n" +
                "\t\tp.residential_area residentialArea,\n" +
@ -1181,7 +1181,14 @@ public class PatientInfoPlatFormService {
                "\t\tvalue5,\n" +
                "\t\tvalue6,\n" +
                "\t\tvalue7,\n" +
                "\t\ttype,DATE_FORMAT( idx.czrq, '%Y-%m-%d %H:%i:%S' ) createTime \n" +
                "\t\ttype,DATE_FORMAT( idx.czrq, '%Y-%m-%d %H:%i:%S' ) createTime, \n" +
                "\tCASE\n" +
                "\t\t\tp.sex \n" +
                "\t\t\tWHEN 1 THEN\n" +
                "\t\t\t'男' \n" +
                "\t\t\tWHEN 2 THEN\n" +
                "\t\t\t'女' ELSE p.sex \n" +
                "\t\tEND AS sex\n" +
                "\tFROM\n" +
                "\t\twlyy_patient_health_index idx\n" +
                "\t\tINNER JOIN base_patient p ON idx.USER = p.id AND p.del = 1 \n" +