Merge remote-tracking branch 'origin/dev' into dev
4 files added
15 files modified
| | |
| | | public FileInfo feignUploadHosIdAndDepId(MultipartFile file, String imgType, String hospitalId, String departmentId) throws Exception { |
| | | List<String> lassStr= Arrays.asList("png","bmp","dib","gif","jfif","jpe","jpeg","jpg","tif","tiff","ico"); |
| | | String suffix=file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1); |
| | | if(!lassStr.contains(suffix)){ |
| | | if(!lassStr.contains(suffix.toLowerCase())){ |
| | | return null; |
| | | } |
| | | String name = file.getOriginalFilename(); |
New file |
| | |
| | | package com.kidgrow.oprationcenter.feign; |
| | | |
| | | import com.kidgrow.common.constant.ServiceNameConstants; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.oprationcenter.feign.fallback.PayManagerFallbackFactory; |
| | | import com.kidgrow.ribbon.config.FeignHttpInterceptorConfig; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * |
| | | * @Description: <br> |
| | | * @Project: <br> |
| | | * @CreateDate: Created in 2020/11/16 15:54 <br> |
| | | * @Author: <a href="78125310@kidgrow.com">dougang</a> |
| | | */ |
| | | @FeignClient(value = ServiceNameConstants.OPRATION_SERVER,configuration= FeignHttpInterceptorConfig.class, |
| | | fallbackFactory = PayManagerFallbackFactory.class, decode404 = true) |
| | | public interface PayManagerService { |
| | | |
| | | @PostMapping("/paymanager/departmentIsPayFegin") |
| | | ResultBody departmentIsPayFegin(@RequestBody Map<String,Long> map); |
| | | } |
New file |
| | |
| | | package com.kidgrow.oprationcenter.feign; |
| | | |
| | | import com.kidgrow.common.constant.ServiceNameConstants; |
| | | import com.kidgrow.oprationcenter.feign.fallback.SaasClientPayFallbackFactory; |
| | | import com.kidgrow.ribbon.config.FeignHttpInterceptorConfig; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * |
| | | * @Description: <br> |
| | | * @Project: <br> |
| | | * @CreateDate: Created in 2020/11/16 15:54 <br> |
| | | * @Author: <a href="78125310@kidgrow.com">dougang</a> |
| | | */ |
| | | @FeignClient(value = ServiceNameConstants.OPRATION_SERVER,configuration= FeignHttpInterceptorConfig.class, |
| | | fallbackFactory = SaasClientPayFallbackFactory.class, decode404 = true) |
| | | public interface SaasClientPayFeignService { |
| | | /** |
| | | * feign rpc访问远程 接口 |
| | | */ |
| | | @PostMapping(value = "/saasclientpay/getDepartmentPayStateList") |
| | | List<Map<String,Object>> getDepartmentPayStateList(@RequestBody Map<String,Object> map); |
| | | |
| | | } |
New file |
| | |
| | | package com.kidgrow.oprationcenter.feign.fallback; |
| | | |
| | | |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.oprationcenter.feign.PayManagerService; |
| | | import feign.hystrix.FallbackFactory; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * |
| | | * @Description: <br> |
| | | * @Project: <br> |
| | | * @CreateDate: Created in 2020/11/16 15:58 <br> |
| | | * @Author: <a href="78125310@kidgrow.com">dougang</a> |
| | | */ |
| | | @Component |
| | | public class PayManagerFallbackFactory implements FallbackFactory<PayManagerService> { |
| | | |
| | | |
| | | @Override |
| | | public PayManagerService create(Throwable throwable) { |
| | | return new PayManagerService() { |
| | | @Override |
| | | public ResultBody departmentIsPayFegin(Map<String,Long> map) { |
| | | return null; |
| | | } |
| | | }; |
| | | } |
| | | } |
New file |
| | |
| | | package com.kidgrow.oprationcenter.feign.fallback; |
| | | |
| | | |
| | | import com.kidgrow.oprationcenter.feign.SaasClientPayFeignService; |
| | | import feign.hystrix.FallbackFactory; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * |
| | | * @Description: <br> |
| | | * @Project: <br> |
| | | * @CreateDate: Created in 2020/11/16 15:58 <br> |
| | | * @Author: <a href="78125310@kidgrow.com">dougang</a> |
| | | */ |
| | | @Component |
| | | public class SaasClientPayFallbackFactory implements FallbackFactory<SaasClientPayFeignService> { |
| | | |
| | | |
| | | @Override |
| | | public SaasClientPayFeignService create(Throwable throwable) { |
| | | return new SaasClientPayFeignService() { |
| | | @Override |
| | | public List<Map<String, Object>> getDepartmentPayStateList(Map<String, Object> map) { |
| | | return null; |
| | | } |
| | | }; |
| | | } |
| | | } |
| | |
| | | * 联系地址 |
| | | */ |
| | | private String contactAddress; |
| | | |
| | | /** |
| | | * 科室ID |
| | | */ |
| | | private String departmentId; |
| | | |
| | | /** |
| | | * 科室名称 |
| | | */ |
| | | private String departmentName; |
| | | } |
| | |
| | | <if test="p.keyWord != null and p.keyWord !=''"> |
| | | and hospital_name like concat('%', #{p.keyWord}, '%') |
| | | </if> |
| | | <if test="p.departmentId != null and p.departmentId !=''"> |
| | | and department_id = #{p.departmentId} |
| | | </if> |
| | | </where> |
| | | </sql> |
| | | |
| | |
| | | if (hospitalScreening.getId() == null) { |
| | | HospitalScreening hs = new HospitalScreening(); |
| | | hs.setHospitalId(hospitalScreening.getHospitalId()); |
| | | hs.setDepartmentId(hospitalScreening.getDepartmentId()); |
| | | HospitalScreening byObject = hospitalScreeningService.findByObject(hs); |
| | | if (byObject != null) { |
| | | return ResultBody.failed().msg("该医院已添加"); |
| | |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.BindingResult; |
| | |
| | | return ResultBody.ok().data(true).msg("已开通单次支付功能"); |
| | | } |
| | | } |
| | | /** |
| | | * 查询一个科室是否有支付功能 |
| | | */ |
| | | @ApiOperation(value = "查询一个科室是否有支付功能") |
| | | @PostMapping("/departmentIsPayFegin") |
| | | public ResultBody departmentIsPayFegin(@RequestBody Map<String,Long> map) { |
| | | Long hospitalId = MapUtils.getLong(map, "hospitalId"); |
| | | if(hospitalId==null){ |
| | | return ResultBody.failed("请输入医院id"); |
| | | } |
| | | Long departmentId = MapUtils.getLong(map, "departmentId"); |
| | | if(departmentId==null){ |
| | | return ResultBody.failed("请输入部门id"); |
| | | } |
| | | PayManager payManager=payManagerService.findByObject(hospitalId,departmentId); |
| | | if (payManager.getId() == null) { |
| | | return ResultBody.ok().data(false).msg("未开通单次支付功能"); |
| | | } |
| | | else |
| | | { |
| | | return ResultBody.ok().data(true).msg("已开通单次支付功能"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 新增or更新 |
| | |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections.MapUtils; |
| | | import org.apache.commons.collections.map.HashedMap; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.BindingResult; |
| | | import org.springframework.validation.ObjectError; |
| | |
| | | return ResultBody.failed().data(false).msg("没有相关数据"); |
| | | } |
| | | /** |
| | | * 查询 支付状态是否为成功 |
| | | */ |
| | | @ApiOperation(value = "查询多个诊断的支付状态") |
| | | @PostMapping("/getDepartmentPayStateList") |
| | | public List<Map<String,Object>> getDepartmentPayStateList(@RequestBody Map<String,Object> map) { |
| | | List<Map<String,Object>> list=new ArrayList<>(); |
| | | Long hospitalId = MapUtils.getLong(map, "hospitalId"); |
| | | Long departmentId = MapUtils.getLong(map, "departmentId"); |
| | | List<String> diaIds = (List<String>) map.get("diaIds"); |
| | | if(hospitalId==null||departmentId==null||diaIds==null||diaIds.size()<=0){ |
| | | return list; |
| | | } |
| | | if (diaIds!=null&&diaIds.size()>0) { |
| | | for (String diaId : diaIds) { |
| | | SaasClientPay model = saasClientPayService.findModelByObject(hospitalId,departmentId,diaId); |
| | | Map<String,Object> objectMap=new HashedMap(); |
| | | objectMap.put("id",diaId); |
| | | if(model!=null){ |
| | | objectMap.put("flag",model.getPayStatus().equals(PayConstants.ORDER_PAY_SUCEESS)); |
| | | }else { |
| | | objectMap.put("flag",false); |
| | | } |
| | | list.add(objectMap); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @ApiOperation(value = "删除") |
| | |
| | | } |
| | | |
| | | private String createQr(String id) { |
| | | log.info("***************创建筛查机构二维码开始*******************"); |
| | | String url = ""; |
| | | String str = "{\"action_name\": \"QR_LIMIT_STR_SCENE\", \"action_info\": {\"scene\": {\"scene_str\": \"kagscreening_" + id + "\"}}}"; |
| | | |
| | | log.info("***************创建筛查机构二维码参数" + str + "*******************"); |
| | | String token = redisUtils.get("Wechat:Token:KagReceiveToken").toString(); |
| | | String result = HttpRequest.post("https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=" + token) |
| | | .header("Content-Type", "application/json") |
| | | .body(str).execute().body(); |
| | | |
| | | |
| | | log.info("***************创建筛查机构二维码结果=>" + result); |
| | | if (StringUtils.isBlank(result)) { |
| | | return url; |
| | | } |
| | |
| | | */ |
| | | @PutMapping(value = "/users/password") |
| | | public ResultBody resetPassword(@RequestBody SysUser sysUser) throws Exception { |
| | | if (checkAdmin(sysUser.getId())) { |
| | | return ResultBody.failed().msg(ADMIN_CHANGE_MSG); |
| | | } |
| | | // if (checkAdmin(sysUser.getId())) { |
| | | // return ResultBody.failed().msg(ADMIN_CHANGE_MSG); |
| | | // } |
| | | ResultBody resultBody = appUserService.updatePassword(sysUser.getId(), sysUser.getOldPassword(), sysUser.getNewPassword(), false); |
| | | return resultBody; |
| | | } |
| | |
| | | <title>用户登录</title> |
| | | <link rel="stylesheet" href="assets/libs/layui/css/layui.css"/> |
| | | <link rel="stylesheet" href="assets/css/login.css" media="all"> |
| | | <style> |
| | | |
| | | </style> |
| | | </head> |
| | | |
| | | <body> |
| | |
| | | |
| | | <div class="login-footer"> |
| | | <p>© 2020 <a href="javascript:;" target="_blank">喜高科技版权所有</a></p> |
| | | <p>备案号 <a href="https://beian.miit.gov.cn" target="_blank" >冀ICP备19021021号-2</a></p> |
| | | </div> |
| | | </div> |
| | | <script type="text/javascript" src="module/apiUrl.js"></script> |
| | |
| | | |
| | | var hospital = admin.getTempData('t_hospital'); |
| | | if(hospital){ |
| | | $("#hospitalIds").val(hospital.hospitalId) |
| | | $("#hospitalIds").val(hospital.id); |
| | | $("#hospitalNames").val(hospital.hospitalName); |
| | | } |
| | | form.render(); |
| | |
| | | }); |
| | | |
| | | $('#downLoadTemplate').click(function () { |
| | | var url = config.base_server + "api-opration/screeningorganizationinfo/export"; |
| | | var url = "http://zuul.kidgrow.cloud/api-opration/screeningorganizationinfo/export"; |
| | | // 获取XMLHttpRequest |
| | | var xmlResquest = new XMLHttpRequest(); |
| | | // 发起请求 |
| | |
| | | width: "200", |
| | | title: '医院名称', |
| | | fixed: 'left' |
| | | }, { |
| | | field: 'departmentName', |
| | | width: "120", |
| | | title: '科室', |
| | | align: 'center', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | field: 'isScreeningPush', |
| | | width: "120", |
| | | width: "100", |
| | | title: '推送状态', |
| | | align: 'center', |
| | | fixed: 'left', |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 67px;">推送筛查</label> |
| | | <label class="layui-form-label">科室</label> |
| | | <div class="layui-input-block" style="width: 150px;"> |
| | | <input name="departmentName" id="departmentName" placeholder="请选择科室" type="hidden" |
| | | class="layui-input" maxlength="20" /> |
| | | <select id="departmentId" name="departmentId" lay-filter="departmentId" placeholder="请选择科室" |
| | | lay-verify="required" required> |
| | | <option value="">-请选择科室-</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div style="display:flex"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 75px;">推送筛查</label> |
| | | <div class="layui-input-block" style="width: 150px;"> |
| | | <input name="isScreeningPush" id="isScreeningPush_yes" type="radio" value="1" title="是" |
| | | class="layui-input"/> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="display:flex"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | |
| | | data.field.enabled = "1"; |
| | | data.field.contactNumber = $("#contactNumber").val(); |
| | | data.field.contactAddress = $("#contactAddress").val(); |
| | | data.field.departmentId = $("#departmentId").val(); |
| | | data.field.departmentName = $("#departmentName").val(); |
| | | |
| | | layer.load(2); |
| | | admin.req('api-opration/hospitalscreening', JSON.stringify(data.field), function (data) { |
| | |
| | | template_txt: "<div class='layui-table-cell'>{{d.hospitalName}}</div>", //下拉列表模板 |
| | | onselect: function (resp) { |
| | | $("#hospitalId").val(resp.id); |
| | | //重新装载科室 |
| | | getdepartment(resp.id); |
| | | } |
| | | }); |
| | | //上传二维码 |
| | |
| | | } |
| | | }); |
| | | |
| | | //新增 和 更新 科室触发的事件 |
| | | form.on('select(departmentId)', function () { |
| | | //将部门名称赋值 |
| | | $('#departmentName').val($(this)[0].innerHTML); |
| | | }); |
| | | //获取科室 |
| | | var getdepartment = function (data) { |
| | | admin.req('api-user/sysdepartment/findListByHospitalId', { |
| | | id: data |
| | | }, function (data) { |
| | | layer.closeAll('loading'); |
| | | if (0 === data.code) { |
| | | department = data.data; |
| | | $('#departmentId').empty(); |
| | | if (data.data.length > 0) { |
| | | $('#departmentName').val(data.data[0].departmentName); |
| | | } |
| | | $.each(data.data, function (index, item) { |
| | | //往下拉菜单里添加元素 |
| | | $('#departmentId').append(new Option(item.departmentName, item.id, |
| | | false, false)); |
| | | form.render('select', 'app-form'); |
| | | }) |
| | | form.render(); |
| | | } else { |
| | | layer.msg(data.msg, { |
| | | icon: 2, |
| | | time: 2000 |
| | | }); |
| | | } |
| | | }, 'get'); |
| | | } |
| | | |
| | | var screeningHospital = admin.getTempData('t_screeningHospital'); |
| | | if(screeningHospital){ |
| | | $("#hospitalName").val(screeningHospital.hospitalName); |
| | |
| | | $('#indexImage').append('<img src="' + screeningHospital.homePage + |
| | | '" width="50px" height="50px" class="layui-upload-img">'); |
| | | |
| | | getdepartment(screeningHospital.hospitalId); |
| | | form.render(); |
| | | } |
| | | }); |
| | |
| | | var hospitalName = $("#hospitalName-seach").val(); |
| | | var doctorTel = $('#doctorTel').val(); |
| | | var doctorName = $('#doctorName').val(); |
| | | var hospitalId=$("#hospitalId").val(); |
| | | table.reload('app-table', { |
| | | where: { |
| | | doctorState: doctorState, |
| | | hospitalName: hospitalName, |
| | | hospitalId, |
| | | doctorTel: doctorTel, |
| | | doctorName: doctorName |
| | | }, |
| | |
| | | if (user) { |
| | | form.val('user-form', user); |
| | | $('#user-form').attr('method', 'POST'); |
| | | $("#mobile").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++) { |