kidgrow-business/kidgrow-opration-center/kidgrow-opration-center-biz/src/main/java/com/kidgrow/oprationcenter/service/impl/AdvisoryDoctorInfoServiceImpl.java
@@ -119,32 +119,28 @@ //最大人数 int maxPeople = MapUtils.getIntValue(map, "maxPeople"); //预约时间 String appointmments = JSONArray.toJSONString(map.get("appointments")); List<AppointmentTime> appointmments = JSONArray.parseArray(JSONArray.toJSONString(map.get("appointments")), AppointmentTime.class); AdvisoryDoctorInfo advisoryDoctorInfo = baseMapper.selectById(Long.parseLong(id)); if (advisoryDoctorInfo == null) { return ResultBody.failed().msg("查询医生信息失败"); } AdvisoryDoctorInfo adi = new AdvisoryDoctorInfo(); adi.setId(Long.parseLong(id)); adi.setPrice(price); adi.setMaxPeople(maxPeople); advisoryDoctorInfo.setPrice(price); advisoryDoctorInfo.setMaxPeople(maxPeople); int b = baseMapper.updateById(adi); int b = baseMapper.updateById(advisoryDoctorInfo); if (b == 0) { TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); return ResultBody.failed().msg("操作失败"); } if (StringUtils.isNotBlank(appointmments)) { if (appointmments != null && appointmments.size() > 0) { appointmentTimeService.delByAdvisoryId(Long.parseLong(id)); List<AppointmentTime> times = JSONArray.parseArray(appointmments, AppointmentTime.class); for (AppointmentTime time : times) { for (AppointmentTime time : appointmments) { time.setAdvisoryId(Long.parseLong(id)); appointmentTimeService.saveOrUpdate(time); } } return ResultBody.ok().msg("操作成功"); kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/keaigao/AdvisoryDoctor_form.html
@@ -42,8 +42,7 @@ <select id="service" name="service" lay-filter="service" placeholder="请选择服务" lay-verify="required" required> <option value="1">图文</option> <option value="2">电话</option> <option value="3">图文/电话</option> <option value="3" selected>图文/电话</option> </select> </div> </div> @@ -203,7 +202,7 @@ if($("#bindPhone").val() != "" && $("#bindPhone").val() != null){ admin.req('api-opration/advisorydoctor/querUserByPhone', JSON.stringify(data.field), function (data1) { layer.closeAll('loading'); if (data1.code == 0) { if (data1.code == 0 && data1.data != null) { layer.confirm('确定要将该医生绑定到昵称:' + data1.data.nickName + "吗?", function (i) { admin.req('api-opration/advisorydoctor', JSON.stringify(data.field), function (data) { layer.closeAll('loading'); @@ -219,7 +218,7 @@ }, "POST"); }); } else { layer.msg(data.msg, { layer.msg("未找到对应的用户信息,请确认后填写", { icon: 2, time: 3000 }); @@ -262,6 +261,15 @@ //将部门名称赋值 $('#departmentName').val($(this)[0].innerHTML); getDoctor( $("#hospitalId").val(), $("#departmentId").val()); }); form.on('select(service)', function () { var type = $("#service").val(); if(type == 1){ $("#price").attr("readonly","readonly"); }else{ $("#price").removeAttr("readonly"); } }); //获取科室 @@ -337,6 +345,11 @@ $("#price").val(adisoryDoctor.price / 100); $("#doctorName").val(adisoryDoctor.doctorName); $("#bindPhone").attr("Readonly",true); if(adisoryDoctor.service == 1){ $("#price").attr("readonly","readonly"); }else{ $("#price").removeAttr("readonly"); } form.render(); admin.req('api-opration/appointment/queryByAdvisoryId/'+$("#id").val(), { @@ -360,4 +373,5 @@ form.render(); } }); </script> kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/keaigao/AdvisoryManager.html
@@ -236,10 +236,10 @@ admin.req('api-opration/advisorydoctor/refund', JSON.stringify({'advisoryId':obj.advisoryId}), function (data) { layer.closeAll('loading'); if (data.code == 0) { layer.msg(data.msg, { icon: 1, time: 2000 }); layer.msg("申请成功,请等待微信退款!", { icon: 1, time: 2000 }); table.reload('app-table', {}); } else { layer.msg(data.msg, { icon: 2, time: 2000 }); layer.msg("操作失败", { icon: 2, time: 2000 }); } }, 'POST'); });