From 7ea2a2cfe922c9b2d5c09c737d10a7f1ab5b50d1 Mon Sep 17 00:00:00 2001 From: zhaoxiaohao <279049017@qq.com> Date: Mon, 01 Mar 2021 14:14:35 +0800 Subject: [PATCH] Merge branch 'dev1.1' into dev --- kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/resources/mapper/SysUserMapper.xml | 4 + kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/hospital_form_base.html | 53 +++++++++++++++++++++----- kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/system/user_form.html | 8 ++-- kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/java/com/kidgrow/usercenter/service/impl/SysUserServiceImpl.java | 28 +++++++++++++ kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-api/src/main/java/com/kidgrow/usercenter/model/SysDepartment.java | 11 +++++ kidgrow-commons/kidgrow-common-spring-boot-starter/src/main/java/com/kidgrow/common/model/DoctorUserAll.java | 12 ++++++ kidgrow-web/kidgrow-web-manager/src/main/resources/static/module/apiUrl.js | 4 +- 7 files changed, 100 insertions(+), 20 deletions(-) diff --git a/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-api/src/main/java/com/kidgrow/usercenter/model/SysDepartment.java b/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-api/src/main/java/com/kidgrow/usercenter/model/SysDepartment.java index 5480135..7233ebe 100644 --- a/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-api/src/main/java/com/kidgrow/usercenter/model/SysDepartment.java +++ b/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-api/src/main/java/com/kidgrow/usercenter/model/SysDepartment.java @@ -109,8 +109,17 @@ private String departmentLink; /** - * 部门联系人 + * 部门联系人电话 */ private String departmentTel; + /** + * 是否筛查科室 0为否 1 为是 + */ + private Byte isScreen; + /** + * 是否新筛查端 0为否 1 为是 + */ + private Byte isNewScreenclient; + } diff --git a/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/java/com/kidgrow/usercenter/service/impl/SysUserServiceImpl.java b/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/java/com/kidgrow/usercenter/service/impl/SysUserServiceImpl.java index 744856f..273c0e8 100644 --- a/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/java/com/kidgrow/usercenter/service/impl/SysUserServiceImpl.java +++ b/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/java/com/kidgrow/usercenter/service/impl/SysUserServiceImpl.java @@ -156,9 +156,35 @@ //医院信息 DoctorUserAll doctorUserAllVo = baseMapper.findDoctorUserAllData(sysUser.getId()); if (doctorUserAllVo != null) { - loginAppUser.setDoctorUserAllVO(doctorUserAllVo); + //是否医院管理员 loginAppUser.setHAdminUser(doctorUserAllVo.getIsAdminUser()); + //1表示调用老系统接口,2表示调用新系统接口,3表示不执行接口调用 + byte state=0; + if(doctorUserAllVo.getDepScreen()==null&&doctorUserAllVo.getDepNewScreenclient()==null){ + state=1; + } + if(doctorUserAllVo.getDepScreen().equals(0)){ + state=3; + } + if(doctorUserAllVo.getDepScreen().equals(1)){ + if(doctorUserAllVo.getDepNewScreenclient().equals(1)){ + state=2; + } + if(doctorUserAllVo.getDepNewScreenclient().equals(0)){ + state=1; + } + } + doctorUserAllVo.setInterfaceState(state); + loginAppUser.setDoctorUserAllVO(doctorUserAllVo); +// 1、is_screen为空时,is_new_screenclient必须为空; +// 2、is_screen不为空时,is_new_screenclient可为空,可不为空; +// 3、当两个都为空时,默认调用老系统的接口; +// 4、当is_screen为false时,不论is_new_screenclient是什么不需要调用任何接口; +// 5、当is_screen为true时,is_new_screenclient为false或空时,调用老系统的接口; +// 6、当is_screen为true时,is_new_screenclient为true时,调用新系统的接口; + + } } return loginAppUser; diff --git a/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/resources/mapper/SysUserMapper.xml b/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/resources/mapper/SysUserMapper.xml index f565c82..1333df5 100644 --- a/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/resources/mapper/SysUserMapper.xml +++ b/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/resources/mapper/SysUserMapper.xml @@ -145,7 +145,9 @@ sysdep.sale_user_tel, sysdep.enabled depenabled, sysdep.accounts_count, - sysdep.is_del depdel + sysdep.is_del depdel, + sysdep.is_screen depScreen, + sysdep.is_new_screenclient depNewScreenclient, FROM sys_user sysuser left JOIN sys_doctor sysdoctor on sysuser.id=sysdoctor.user_id left JOIN sys_hospital syshos on sysdoctor.hospital_id=syshos.id diff --git a/kidgrow-commons/kidgrow-common-spring-boot-starter/src/main/java/com/kidgrow/common/model/DoctorUserAll.java b/kidgrow-commons/kidgrow-common-spring-boot-starter/src/main/java/com/kidgrow/common/model/DoctorUserAll.java index f9a1fe3..b7fca81 100644 --- a/kidgrow-commons/kidgrow-common-spring-boot-starter/src/main/java/com/kidgrow/common/model/DoctorUserAll.java +++ b/kidgrow-commons/kidgrow-common-spring-boot-starter/src/main/java/com/kidgrow/common/model/DoctorUserAll.java @@ -188,4 +188,16 @@ * 销售代表电话 */ private String saleUserTel; + /** + * 是否筛查科室 0为否 1 为是 + */ + private Byte depScreen; + /** + * 是否新筛查端 0为否 1 为是 + */ + private Byte depNewScreenclient; + /** + * 1表示调用老系统接口,2表示调用新系统接口,3表示不执行接口调用 + */ + private Byte interfaceState; } diff --git a/kidgrow-web/kidgrow-web-manager/src/main/resources/static/module/apiUrl.js b/kidgrow-web/kidgrow-web-manager/src/main/resources/static/module/apiUrl.js index 3c0c6dc..c15d5b8 100644 --- a/kidgrow-web/kidgrow-web-manager/src/main/resources/static/module/apiUrl.js +++ b/kidgrow-web/kidgrow-web-manager/src/main/resources/static/module/apiUrl.js @@ -1,8 +1,8 @@ - var my_api_server_url = 'http://127.0.0.1:8888/'; +// var my_api_server_url = 'http://127.0.0.1:8888/'; // var my_api_server_url = 'http://192.168.2.240:8888/'; // var my_api_server_url = 'http://open.zuul.kidgrow.cloud/'; // var my_api_server_url = 'https://zuul.kidgrow.cloud/'; -//var my_api_server_url = 'https://zuul.kidgrow.cloud/'; +var my_api_server_url = 'https://zuul.kidgrow.cloud/'; if(my_api_server_url.indexOf("http")<0) { diff --git a/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/hospital_form_base.html b/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/hospital_form_base.html index 43247df..be432ce 100644 --- a/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/hospital_form_base.html +++ b/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/hospital_form_base.html @@ -40,7 +40,8 @@ <div class="layui-input-block"> <input name="departmentName" id="departmentName" placeholder="科室名称" type="text" class="layui-input" maxlength="20" lay-verify="required" required style="width: 175px;" /> -  </div> +   + </div> </div> <div class="layui-col-sm3"> <label class="layui-form-label">科室电话</label> @@ -51,7 +52,27 @@ <div class="layui-col-sm3"> <label class="layui-form-label">科室联系人</label> <div class="layui-input-block"> - <input name="departmentLink" id="departmentLink" type="text" class="layui-input" maxlength="20" style="width: 200px;" /> + <input name="departmentLink" id="departmentLink" type="text" class="layui-input" maxlength="20" + style="width: 200px;" /> + </div> + </div> + </div> + </div> + <div class="layui-form-item"> + <div class="layui-row"> + <div class="layui-col-sm6"> + <label class="layui-form-label">是否筛查科室</label> + <div class="layui-input-block"> + <input type="radio" name="isScreen" value="1" title="是"> + <input type="radio" name="isScreen" value="0" title="否" > +   + </div> + </div> + <div class="layui-col-sm6"> + <label class="layui-form-label">是否新筛查</label> + <div class="layui-input-block"> + <input type="radio" name="isNewScreenclient" value="1" title="是"> + <input type="radio" name="isNewScreenclient" value="0" title="否" > </div> </div> </div> @@ -94,12 +115,14 @@ <div class="layui-col-sm4"> <select lay-verify="required" required id="hospitalProvince" placeholder="省份" lay-filter="hospitalProvince" style="width: 400px;"> - </select></div> + </select> + </div> <div class="layui-col-sm4"> <select id="hospitalCity" lay-verify="required" required placeholder="市" lay-filter="hospitalCity" style="width: 350px;"> <option value="">选择市</option> - </select></div> + </select> + </div> <div class="layui-col-sm4"> <select id="hospitalArea" lay-verify="required" required placeholder="区县" lay-filter="hospitalArea" style="width: 350px;"> @@ -249,8 +272,8 @@ if (data.data.length > 0) { $.each(data.data, function (index, item) { //往下拉菜单里添加元素 - $('#saleUserName').append(new Option(item.nickname, item.id, - false, (!strUtil.isEmpty(selectVal) && selectVal == item.id))); + $('#saleUserName').append(new Option(item.nickname, item.id, + false, (!strUtil.isEmpty(selectVal) && selectVal == item.id))); }); if (hosIdForEdit == "") { @@ -278,12 +301,12 @@ var hosIdForEdit = ""; var departmentId = ""; //当前登录人员的id - var selectVal=""; + var selectVal = ""; if (edithospitalData != null) { hosIdForEdit = edithospitalData.hospitalId; departmentId = edithospitalData.departmentId; } - else{ + else { //先拿到当前登录用户的信息 var nowUser = config.getUser(); if (!strUtil.isEmpty(nowUser)) { @@ -343,7 +366,10 @@ "#hospitalCity option:selected").text() : ""; data.field.hospitalArea = $("#hospitalArea option:selected").text() != "选择区县" ? $( "#hospitalArea option:selected").text() : ""; - + let isScreen = data.field.isScreen + let isNewScreenclient = data.field.isNewScreenclient + delete data.field.isScreen + delete data.field.isNewScreenclient admin.req('api-user/syshospital', JSON.stringify(data.field), function (data) { if (data.code === 0) { //存储科室数据 @@ -362,8 +388,10 @@ accountsCount: $("#accountsCount").val(), departmentTel: $("#departmentTel").val(), departmentLink: $("#departmentLink").val(), + isScreen, + isNewScreenclient, }; - admin.req('api-user/sysdepartment/'+data.data.id, JSON.stringify(departmentData), + admin.req('api-user/sysdepartment/' + data.data.id, JSON.stringify(departmentData), function (data) { layer.closeAll('loading'); if (data.code == 0) { @@ -489,7 +517,10 @@ $('#saleUserName').val(departData[0].saleUserId); $('#departmentLink').val(departData[0].departmentLink); $('#departmentTel').val(departData[0].departmentTel); - + $("input[name=isScreen][value=1]").attr("checked", departData[0].isScreen == 1 ? true : false); + $("input[name=isScreen][value=0]").attr("checked", departData[0].isScreen == null || departData[0].isScreen==0 ? true : false); + $("input[name=isNewScreenclient][value=1]").attr("checked", departData[0].isNewScreenclient == 1 ? true : false); + $("input[name=isNewScreenclient][value=0]").attr("checked", departData[0].isNewScreenclient == null || departData[0].isNewScreenclient==0? true : false); if (hosIdForEdit != "") { $("#serverUserTel").val(departData[0] .serverUserTel); diff --git a/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/system/user_form.html b/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/system/user_form.html index e91250f..bb687c1 100644 --- a/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/system/user_form.html +++ b/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/system/user_form.html @@ -70,10 +70,10 @@ if (user) { form.val('user-form', user); $('#user-form').attr('method', 'POST'); - if(!(user.mobile==null || user.mobile.trim()=="")){ - $("#mobile").prop("disabled",true) - } - $("#username").prop("disabled",true) + // if(!(user.mobile==null || user.mobile.trim()=="")){ + // $("#mobile").prop("disabled",true) + // } + // $("#username").prop("disabled",true) var rds = new Array(); for (var i = 0; i < user.roles.length; i++) { rds.push(user.roles[i].id); -- Gitblit v1.8.0