2 次代码提交 b35c69dcef ... 6bc54f0025

作者 SHA1 备注 提交日期
  suqinyi 6bc54f0025 Merge remote-tracking branch 'origin/2.0' into 2.0 3 月之前
  suqinyi 67d6470538 代码修改 3 月之前

+ 6 - 4
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/common/LabelController.java

@ -103,10 +103,11 @@ public class LabelController extends EnvelopRestEndpoint {
    @ApiOperation(value = "查询居民标签分组数量")
    public ListEnvelop findLabelPatientGroupCount(
            @ApiParam(name = "name", value = "姓名") @RequestParam(value = "name", required = false) String name,
            @ApiParam(name = "labelType", value = "1健康情况 2疾病类型 3专病类型 4自定义标签") @RequestParam(value = "labelType", required = false) String labelType
            @ApiParam(name = "labelType", value = "1健康情况 2疾病类型 3专病类型 4自定义标签") @RequestParam(value = "labelType", required = false) String labelType,
            @ApiParam(name = "doctorCode", value = "医生code") @RequestParam(value = "doctorCode", required = false) String doctorCode
    ) {
        try {
            return ListEnvelop.getSuccess("查询成功", labelService.findLabelPatientGroupCount(name,labelType));
            return ListEnvelop.getSuccess("查询成功", labelService.findLabelPatientGroupCount(name,labelType,doctorCode));
        } catch (Exception e) {
            e.printStackTrace();
            return ListEnvelop.getError("查询失败");
@ -118,10 +119,11 @@ public class LabelController extends EnvelopRestEndpoint {
    public ListEnvelop findLabelPatientList(
            @ApiParam(name = "name", value = "姓名") @RequestParam(value = "name", required = false) String name,
            @ApiParam(name = "labelType", value = "1健康情况 2疾病类型 3专病类型 4自定义标签") @RequestParam(value = "labelType", required = false) String labelType,
            @ApiParam(name = "labelCode", value = "类型") @RequestParam(value = "labelCode", required = false) String labelCode
            @ApiParam(name = "labelCode", value = "类型") @RequestParam(value = "labelCode", required = false) String labelCode,
            @ApiParam(name = "doctorCode", value = "医生code") @RequestParam(value = "doctorCode", required = false) String doctorCode
    ) {
        try {
            return ListEnvelop.getSuccess("查询成功", labelService.findLabelPatientList(name,labelType,labelCode));
            return ListEnvelop.getSuccess("查询成功", labelService.findLabelPatientList(name,labelType,labelCode,doctorCode));
        } catch (Exception e) {
            e.printStackTrace();
            return ListEnvelop.getError("查询失败");

+ 6 - 4
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/common/service/LabelService.java

@ -316,15 +316,16 @@ public class LabelService {
    /**
     * //三院 labelType 1健康情况 2疾病类型 3专病类型 4自定义标签
     */
    public List<Map<String, Object>> findLabelPatientGroupCount(String name, String labelType) {
    public List<Map<String, Object>> findLabelPatientGroupCount(String name, String labelType,String doctorCode) {
        String sql = "SELECT\n" +
                "	a.label_code,a.label_name,count(1) 'labelCount'\n" +
                "FROM\n" +
                "	wlyy_patient_label a\n" +
                "	INNER JOIN base_patient b ON a.patient=b.id\n" +
                "	INNER JOIN wlyy_outpatient c ON a.patient=c.patient \n" +
                "WHERE\n" +
                "	1 = 1 \n" +
                "  AND a.label_type='" + labelType + "'";
                "  AND a.label_type='" + labelType +"'  and c.doctor='"+doctorCode+"' ";
        if (StringUtils.isNotBlank(name)) {
            sql += " AND b.`name` LIKE '%" + name + "%'\n";
@ -336,16 +337,17 @@ public class LabelService {
    }
    public List findLabelPatientList(String name, String labelType, String labelCode) {
    public List findLabelPatientList(String name, String labelType, String labelCode,String doctorCode) {
        String sql = "SELECT\n" +
                "	 a.label_code 'labelCode',a.label_name 'labelName', TIMESTAMPDIFF(YEAR, b.birthday, CURDATE()) AS age," +
                "    b.* \n" +
                "FROM\n" +
                "	wlyy_patient_label a\n" +
                "	INNER JOIN base_patient b ON a.patient=b.id\n" +
                "	INNER JOIN wlyy_outpatient c ON a.patient=c.patient \n" +
                "WHERE\n" +
                "	1 = 1 \n" +
                "  AND a.label_type='" + labelType + "'";
                "  AND a.label_type='" + labelType + "'  and c.doctor='"+doctorCode+"' ";
        if (StringUtils.isNotBlank(name)) {
            sql += " AND b.`name` LIKE '%" + name + "%'\n";