浏览代码

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

lyr 8 年之前
父节点
当前提交
ba766dcfea

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

@ -561,7 +561,8 @@ public class SignPatientLabelInfoService extends BaseService {
     * @throws Exception
     */
    public JSONArray searchPatientByNameOrLabel(String doctor, String filter,
                                                String labelCode, String labelType, long teamCode) throws Exception {
                                                String labelCode, String labelType, long teamCode,
                                                int page, int pagesize) throws Exception {
        Doctor doc = doctorDao.findByCode(doctor);
        if (doc == null) {
@ -579,7 +580,7 @@ public class SignPatientLabelInfoService extends BaseService {
                "     (select * from wlyy_sign_patient_label_info where status = 1 " +
                (StringUtils.isNotEmpty(labelCode) ? " and label = ? " : "") +
                (StringUtils.isNotEmpty(labelType) ? " and label_type = ? " : "") + ") b" +
                " on a.patient = b.patient where a.name like ? or b.label_name like ?";
                " on a.patient = b.patient where a.name like ? or b.label_name like ? limit " + page + "," + pagesize;
        if (StringUtils.isNotEmpty(labelCode)) {
            args = new Object[]{doctor, labelCode, labelType, "%" + filter + "%", "%" + filter + "%"};

+ 4 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/SignPatientLabelController.java

@ -42,6 +42,10 @@ public class SignPatientLabelController extends BaseController {
                return error(-1, "所属团队不能为空");
            }
            if (labelName.equals("孕产妇") || labelName.equals("儿童")) {
                return error(-1, "该标签名称已存在");
            }
            SignPatientLabel labelEx = labelService.isLabelNameExist(labelName, teamCode);
            if (labelEx != null) {

+ 9 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/SignPatientLabelInfoController.java

@ -179,7 +179,8 @@ public class SignPatientLabelInfoController extends BaseController {
    @RequestMapping(value = "/patient_search")
    public String searchPatientByNameOrLabel(String filter, @RequestParam(required = false)String labelCode,
                                             @RequestParam(required = false)String labelType,
                                             @RequestParam(required = false) Long teamCode) {
                                             @RequestParam(required = false) Long teamCode,
                                             int page,int pagesize) {
        try {
            if (StringUtils.isEmpty(filter)) {
                return error(-1, "搜索字段不能为空");
@ -193,7 +194,9 @@ public class SignPatientLabelInfoController extends BaseController {
                teamCode = 0L;
            }
            JSONArray result = labelInfoService.searchPatientByNameOrLabel(getUID(), filter, labelCode, labelType,teamCode);
            page = page - 1;
            JSONArray result = labelInfoService.searchPatientByNameOrLabel(getUID(), filter, labelCode, labelType,teamCode,page,pagesize);
            return write(200, "查询成功", "data", result);
        } catch (Exception e) {
@ -260,6 +263,10 @@ public class SignPatientLabelInfoController extends BaseController {
                return error(-1, "团队code不能为空");
            }
            if (labelName.equals("孕产妇") || labelName.equals("儿童")) {
                return error(-1, "该标签名称已存在");
            }
            int result = labelInfoService.addLabelAndPatient(labelName, getUID(), teamCode, patients);
            if (result != 1) {