Merge branch 'dev' of http://192.168.2.240:7070/r/kidgrow-microservices-platform into dev
Conflicts:
kidgrow-commons/kidgrow-common-spring-boot-starter/src/main/java/com/kidgrow/common/constant/ServiceNameConstants.java
4 files added
9 files modified
New file |
| | |
| | | package com.kidgrow.oprationcenter.feign; |
| | | |
| | | import com.kidgrow.common.constant.ServiceNameConstants; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.oprationcenter.feign.fallback.DiagnosticServiceFallbackFactory; |
| | | import com.kidgrow.ribbon.config.FeignHttpInterceptorConfig; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.util.Map; |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * @Description: 孩子的每次诊断数据 |
| | | * @Project: 用户中心 |
| | | * @CreateDate: Created in 2020-04-07 15:26:33 <br> |
| | | * @Author: <a href="2396341626@kidgrow.com">zhaobingliang</a> |
| | | * @version: 1.0 |
| | | */ |
| | | @FeignClient(value = ServiceNameConstants.RECORD_CENTER_SERVICE,configuration= FeignHttpInterceptorConfig.class, |
| | | fallbackFactory = DiagnosticServiceFallbackFactory.class, decode404 = true) |
| | | public interface DiagnosticService { |
| | | /** |
| | | * feign rpc访问远程 接口 |
| | | */ |
| | | @GetMapping(value = "/diagnostic/diagnosticitem") |
| | | ResultBody<PageResult> getDiagnosticItemList(@RequestParam Map<String, Object> params); |
| | | } |
New file |
| | |
| | | package com.kidgrow.oprationcenter.feign.fallback; |
| | | |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.oprationcenter.feign.DiagnosticService; |
| | | import feign.hystrix.FallbackFactory; |
| | | |
| | | import java.util.Map; |
| | | |
| | | public class DiagnosticServiceFallbackFactory implements FallbackFactory<DiagnosticService> { |
| | | @Override |
| | | public DiagnosticService create(Throwable throwable) { |
| | | return new DiagnosticService() { |
| | | @Override |
| | | public ResultBody<PageResult> getDiagnosticItemList(Map<String, Object> params) { |
| | | return ResultBody.failed().msg("getDiagnosticItemList的FeignClient调用参数传递测试失败"); |
| | | } |
| | | }; |
| | | } |
| | | } |
| | |
| | | import lombok.NoArgsConstructor; |
| | | import org.hibernate.validator.constraints.NotEmpty; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | @NotEmpty(message = "产品/明细名称不能为空") |
| | | private String proName; |
| | | /** |
| | | * 产品类型 0试用 1正式 |
| | | */ |
| | | @NotNull(message = "产品类型不能为空") |
| | | private Integer proType; |
| | | /** |
| | | * 是否共享 0否 1是 |
| | | */ |
| | | @NotEmpty(message = "是否共享 0否 1是不能为空") |
| | | @NotEmpty(message = "是否共享不能为空") |
| | | private Boolean isShare; |
| | | /** |
| | | * 是否删除,1删除,0未删除 |
| | |
| | | */ |
| | | private Long proId; |
| | | /** |
| | | * 产品类型 |
| | | */ |
| | | private Integer proType; |
| | | /** |
| | | * 产品/明细名称 |
| | | */ |
| | | private String proName; |
| | |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.common.service.impl.SuperServiceImpl; |
| | | import com.kidgrow.oprationcenter.feign.DiagnosticService; |
| | | import com.kidgrow.oprationcenter.mapper.ProductOrderDetailMapper; |
| | | import com.kidgrow.oprationcenter.model.ProductOrderDetail; |
| | | import com.kidgrow.oprationcenter.service.IProductOrderDetailService; |
| | |
| | | import com.kidgrow.oprationcenter.vo.ProductOrderJoinDetail; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | |
| | | @Slf4j |
| | | @Service |
| | | public class ProductOrderDetailServiceImpl extends SuperServiceImpl<ProductOrderDetailMapper, ProductOrderDetail> implements IProductOrderDetailService { |
| | | @Autowired |
| | | DiagnosticService diagnosticService; |
| | | /** |
| | | * 列表 |
| | | * @param params |
| | |
| | | <if test="p.id != null and p.id !=''"> |
| | | and id = #{p.id} |
| | | </if> |
| | | <if test="p.proType != null and p.proType !=''"> |
| | | and pro_type = #{p.proType} |
| | | </if> |
| | | <if test="p.hospitalName != null and p.hospitalName !=''"> |
| | | and PRO.hospital_name like concat ('%',#{p.hospitalName},'%') |
| | | </if> |
| | |
| | | DE.is_del, |
| | | DE.enabled, |
| | | PRO.hospital_name, |
| | | PRO.department_name |
| | | PRO.department_name, |
| | | DE.pro_type |
| | | FROM |
| | | product_order_detail DE |
| | | LEFT JOIN product_order PRO ON DE.order_id = PRO.id |
| | |
| | | package com.kidgrow; |
| | | |
| | | import com.kidgrow.ribbon.annotation.EnableFeignInterceptor; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; |
| | | import org.springframework.cloud.openfeign.EnableFeignClients; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | |
| | | * @Author: <a href="4345453@kidgrow.com">liuke</a> |
| | | */ |
| | | @SpringBootApplication |
| | | @EnableFeignClients |
| | | @EnableDiscoveryClient |
| | | @EnableFeignInterceptor |
| | | public class OprationCenterApplication { |
| | | public static void main(String[] args) { |
| | | SpringApplication.run(OprationCenterApplication.class,args); |
| | |
| | | @Autowired |
| | | private ISysMenuService menuService; |
| | | |
| | | /** |
| | | /**current |
| | | * 两层循环实现建树 |
| | | * |
| | | * @param sysMenus |
| | |
| | | if (CollectionUtil.isEmpty(roles)) { |
| | | return ResultBody.ok().data(Collections.emptyList()); |
| | | } |
| | | List<SysMenu> menus = menuService.findByRoleCodes(roles.parallelStream().map(SysRole::getCode).collect(Collectors.toSet()), CommonConstant.MENU); |
| | | Set<String> collect = roles.stream().map(e -> e.getCode()).collect(Collectors.toSet()); |
| | | List<SysMenu> menus = menuService.findByRoleCodes(collect, CommonConstant.MENU); |
| | | return ResultBody.ok().data(treeBuilder(menus)); |
| | | } |
| | | } |
| | |
| | | * oprationcenter-server服务 |
| | | */ |
| | | String OPRATIONCENTER_SERVER = "oprationcenter-server"; |
| | | |
| | | /** |
| | | * 诊断数据服务 |
| | | */ |
| | | String RECORD_CENTER_SERVICE="recordcenter-server"; |
| | | } |
New file |
| | |
| | | <div class="layui-card"> |
| | | <div class="layui-card-header"> |
| | | <h2 class="header-title">诊断记录</h2> |
| | | <span class="layui-breadcrumb pull-right"> |
| | | <a href="#!console">首页</a> |
| | | <a><cite>诊断记录</cite></a> |
| | | </span> |
| | | </div> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form toolbar"> |
| | | <input id="childName" class="layui-input" type="text" placeholder="按患者名" />  |
| | | <input id="diagnosticDoctorName" class="layui-input " type="text" placeholder="按诊断医生名"/>  |
| | | <input id="hospitalId" type="hidden" /> |
| | | <input id="hospitalName" class="layui-input " type="text" placeholder="按医院名" autocomplete="off"/>  |
| | | <input type="text" name="date" id="datebegin" lay-verify="date" autocomplete="off" |
| | | class="layui-input search-input"/>至 |
| | | <input type="text" name="date" id="dateend" lay-verify="date" autocomplete="off" |
| | | class="layui-input search-input"/> |
| | | <button id="diagnostic-btn-search" class="layui-btn icon-btn"><i class="layui-icon"></i>搜索</button> |
| | | </div> |
| | | <table class="layui-table" id="diagnostic-table" lay-filter="diagnostic-table"></table> |
| | | </div> |
| | | </div> |
| | | <!-- 表格操作列 --> |
| | | <script type="text/html" id="diagnostic-table-bar"> |
| | | <a class="layui-btn layui-btn-xs" lay-event="select"">查看报告</a> |
| | | </script> |
| | | |
| | | <script> |
| | | layui.use(['table', 'util', 'admin', 'config', 'laydate', 'form', 'autocomplete'], function () { |
| | | let table = layui.table; |
| | | let util = layui.util; |
| | | let admin = layui.admin; |
| | | let form = layui.form; |
| | | let config = layui.config; |
| | | let laydate=layui.laydate; |
| | | var autocomplete = layui.autocomplete; |
| | | var $ = layui.jquery; |
| | | |
| | | //执行一个laydate实例 |
| | | laydate.render({ |
| | | elem: '#datebegin'//指定元素 |
| | | }); |
| | | laydate.render({ |
| | | elem: '#dateend' //指定元素 |
| | | }); |
| | | //自动完成-医院名称 |
| | | autocomplete.render({ |
| | | elem: $('#hospitalName')[0], |
| | | keywordsName: 'hospitalName',//查询关键字名称 |
| | | url: config.base_server + 'api-user/syshospital/findByName', |
| | | template_val: '{{d.hospitalName}}',//选择后文本框显示的数据字段 |
| | | template_txt: "<div class='layui-table-cell'>{{d.hospitalName}}</div>",//下拉列表模板 |
| | | onselect: function (resp) { |
| | | $("#hospitalId").val(resp.id); |
| | | } |
| | | }); |
| | | // 渲染表格 |
| | | var renderTable = function () { |
| | | table.render({ |
| | | elem: '#diagnostic-table', |
| | | url: config.base_server + 'api-opration/productorderdetail/all', |
| | | method: 'GET', |
| | | where: { enabled: 2}, |
| | | headers: { 'Authorization': 'Bearer ' + config.getToken().access_token }, |
| | | page: true, |
| | | cols: [[ |
| | | { field: 'hospitalName', width: 300, title: '医院名称' }, |
| | | { field: 'departmentName', width: 100, title: '科室名称' }, |
| | | { field: 'diagnosticDoctorName', width: 100, title: '医生姓名' }, |
| | | { field: 'childName', width: 100, title: '患者姓名' }, |
| | | { field: 'childSex', width: 80, title: '性别' }, |
| | | { field: 'childBirthday', width: 100, title: '出生日期' }, |
| | | { field: 'childPhone', width: 150, title: '联系电话' }, |
| | | { |
| | | field: 'isDelete', sort: true, align: 'center', width: 80, templet: function (d) { |
| | | if (d.proType === 0) |
| | | return "正常" |
| | | else |
| | | return "已删除" |
| | | }, title: '状态' |
| | | }, |
| | | { |
| | | field: 'createTime', width: 160, sort: true, title: '创建时间', templet: function (d) { |
| | | return new Date(d.createTime).dateFormat("yyyy/MM/dd hh:mm:ss"); |
| | | } |
| | | }, |
| | | { |
| | | field: 'updateTime', width: 160, sort: true, title: '修改时间', templet: function (d) { |
| | | return new Date(d.createTime).dateFormat("yyyy/MM/dd hh:mm:ss"); |
| | | } |
| | | }, |
| | | { field: 'enabled', width: 100, templet: '#diagnostic-table-bar', title: '查看' } |
| | | ]] |
| | | }); |
| | | } |
| | | // 搜索按钮点击事件 |
| | | $('#diagnostic-btn-search').click(function () { |
| | | var childName = $('#childName').val(); |
| | | var hospitalId = $('#hospitalId').val(); |
| | | var diagnosticDoctorName = $("#diagnosticDoctorName").val(); |
| | | var datebegin = $('#datebegin').val(); |
| | | var dateend = $('#dateend').val(); |
| | | if (strUtil.isEmpty(datebegin) && !strUtil.isEmpty(dateend)) { |
| | | datebegin = dateUtil.getNowDate(); |
| | | $('#datebegin').val(datebegin); |
| | | } |
| | | if (!strUtil.isEmpty(datebegin) && strUtil.isEmpty(dateend)) { |
| | | dateend = dateUtil.getNowDate(); |
| | | $('#dateend').val(dateend); |
| | | } |
| | | // table.reload('diagnostic-table', { where: { childName: childName, hospitalId: hospitalId, diagnosticDoctorName: diagnosticDoctorName, datebegin: datebegin, dateend: dateend } }); |
| | | }); |
| | | }); |
| | | </script> |
| | |
| | | cols: [[ |
| | | { field: 'hospitalName', width: 300, title: '医院名称' }, |
| | | { field: 'departmentName', width: 100, title: '科室名称' }, |
| | | { field: 'proName', width: 200, title: '产品名称' }, |
| | | { field: 'ailightCount', width: 150, title: '读片量' }, |
| | | { field: 'proName', width: 250, title: '产品名称' }, |
| | | { |
| | | field: 'proType', sort: true, align: 'center', width: 80, templet: function (d) { |
| | | if (d.proType === 0) |
| | | return "试用" |
| | | else |
| | | return "正式" |
| | | }, title: '类型' |
| | | }, |
| | | { field: 'ailightCount', width: 100, title: '读片量' }, |
| | | { field: 'recordCount', width: 100, title: '报告量' }, |
| | | { field: 'isShare', width: 150, title: '是否共享',templet:function(d) |
| | | { field: 'isShare', width: 100, title: '是否共享',templet:function(d) |
| | | { |
| | | if(d.isShare) |
| | | return '共享' |
| | |
| | | { field: 'createTime', width: 160, sort: true, title: '创建时间',templet:function(d){ |
| | | return new Date(d.createTime).dateFormat("yyyy/MM/dd hh:mm:ss"); |
| | | } }, |
| | | { field: 'enabled', width: 100, templet: '#product-tpl-state', sort: true, title: '状态' }, |
| | | { align: 'center', width: 100, toolbar: '#product-table-bar', title: '操作' } |
| | | ]] |
| | | }); |
| | | } |
| | | renderTable(); |
| | | |
| | | // 修改状态 |
| | | form.on('switch(product-tpl-state)', function (obj) { |
| | | layer.load(2); |
| | | admin.req('api-opration/productorderdetail/updateEnabled', { |
| | | id: obj.elem.value, |
| | | enabled: obj.elem.checked ? true : false |
| | | }, function (data) { |
| | | layer.closeAll('loading'); |
| | | if (data.code == 0) { |
| | | layer.msg(data.msg, { icon: 1, time: 500 }); |
| | | } else { |
| | | layer.msg(data.msg, { icon: 2, time: 500 }); |
| | | $(obj.elem).prop('checked', !obj.elem.checked); |
| | | form.render('checkbox'); |
| | | } |
| | | }, 'GET'); |
| | | }); |
| | | |
| | | // 工具条点击事件 |
| | | table.on('tool(product-table)', function (obj) { |
| | | if (obj.event === 'del') { // 删除 |
| | |
| | | admin.req('api-opration/productorderdetail/' + obj.data.id, {}, function (data) { |
| | | layer.closeAll('loading'); |
| | | layer.msg(data.msg, { icon: 1, time: 500 }, function () { |
| | | |
| | | renderTable(); |
| | | }); |
| | | obj.del(); |
| | |
| | | <div class="layui-row"> |
| | | <div class="layui-col-sm4"> |
| | | <label class="layui-form-label" style="padding: 10px 30px 0 0px;">开始日期</label> |
| | | <input autocomplete="off" name="contractBeginTime" id="contractBeginTime" type="text" class="layui-input" |
| | | style="width: 182px;" maxlength="50" lay-verify="required" required /> |
| | | <input autocomplete="off" name="contractBeginTime" id="contractBeginTime" type="text" |
| | | class="layui-input" style="width: 182px;" maxlength="50" lay-verify="required" |
| | | required /> |
| | | </div> |
| | | <div class="layui-col-sm4"> |
| | | <label class="layui-form-label">截止日期</label> |
| | | <div class="layui-input-block"> |
| | | <input autocomplete="off" name="contractEndTime" id="contractEndTime" type="text" class="layui-input" |
| | | maxlength="50" lay-verify="required" required /> |
| | | <input autocomplete="off" name="contractEndTime" id="contractEndTime" type="text" |
| | | class="layui-input" maxlength="50" lay-verify="required" required /> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm4"> |
| | | <label class="layui-form-label">签订日期</label> |
| | | <div class="layui-input-block"> |
| | | <input autocomplete="off" name="contractTime" id="contractTime" type="text" class="layui-input" |
| | | maxlength="50" lay-verify="required" required /> |
| | | <input autocomplete="off" name="contractTime" id="contractTime" type="text" |
| | | class="layui-input" maxlength="50" lay-verify="required" required /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | var listData = admin.getTempData("t_tempProduct"); |
| | | if (listData != null) { |
| | | if (data.field != null) { |
| | | layer.confirm("确定要将待充值列表中的" + listData.length + "个产品充值给当前医院吗?", { btn: ["确定", "返回"] }, function () { |
| | | admin.req('api-opration/contract', JSON.stringify(data.field), function (data) { |
| | | layer.closeAll('loading'); |
| | | if (data.code === 0) { |
| | |
| | | layer.msg(data.msg, { icon: 2, time: 1000 }); |
| | | } |
| | | }, 'POST'); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg("数据异常!", { icon: 2, time: 1000 }); |
New file |
| | |
| | | <div class="layui-card"> |
| | | <div class="layui-card-header"> |
| | | <h2 class="header-title">试用审核</h2> |
| | | <span class="layui-breadcrumb pull-right"> |
| | | <a href="#!console">首页</a> |
| | | <a><cite>试用审核</cite></a> |
| | | </span> |
| | | </div> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form toolbar">  |
| | | <input id="product-search-value" class="layui-input search-input" type="text" placeholder="按产品名" />  |
| | | <input id="hospital-search-value" class="layui-input search-input" type="text" placeholder="按医院名" />  |
| | | <button id="product-btn-search" class="layui-btn icon-btn"><i class="layui-icon"></i>搜索</button> |
| | | </div> |
| | | <table class="layui-table" id="product-table" lay-filter="product-table"></table> |
| | | </div> |
| | | </div> |
| | | <!-- 表格状态列 --> |
| | | <script type="text/html" id="product-tpl-state"> |
| | | <input type="checkbox" lay-filter="product-tpl-state" value="{{d.id}}" lay-skin="switch" lay-text="生效|待审核" |
| | | {{d.enabled!=true?'checked':''}}/> |
| | | </script> |
| | | |
| | | <script> |
| | | layui.use(['table', 'util', 'admin', 'config', 'form'], function () { |
| | | let table = layui.table; |
| | | let util = layui.util; |
| | | let admin = layui.admin; |
| | | let form = layui.form; |
| | | let config = layui.config; |
| | | |
| | | // 渲染表格 |
| | | var renderTable = function () { |
| | | table.render({ |
| | | elem: '#product-table', |
| | | url: config.base_server + 'api-opration/productorderdetail/all', |
| | | method: 'GET', |
| | | where:{enabled:0,proType:0}, |
| | | headers: { 'Authorization': 'Bearer ' + config.getToken().access_token }, |
| | | page: true, |
| | | cols: [[ |
| | | { field: 'hospitalName', width: 300, title: '医院名称' }, |
| | | { field: 'departmentName', width: 100, title: '科室名称' }, |
| | | { field: 'proName', width: 250, title: '产品名称' }, |
| | | { |
| | | field: 'proType', sort: true, align: 'center', width: 80, templet: function (d) { |
| | | if (d.proType === 0) |
| | | return "试用" |
| | | else |
| | | return "正式" |
| | | }, title: '类型' |
| | | }, |
| | | { field: 'ailightCount', width: 150, title: '读片量' }, |
| | | { field: 'recordCount', width: 100, title: '报告量' }, |
| | | { field: 'isShare', width: 100, title: '是否共享',templet:function(d) |
| | | { |
| | | if(d.isShare) |
| | | return '共享' |
| | | else |
| | | return '私有' |
| | | } |
| | | }, |
| | | { field: 'proBegintime', width: 120, title: '开始时间',templet:function(d){ |
| | | return new Date(d.proBegintime).dateFormat("yyyy/MM/dd"); |
| | | } }, |
| | | { field: 'proEndtime', width: 120, title: '结束时间',templet:function(d){ |
| | | return new Date(d.proEndtime).dateFormat("yyyy/MM/dd"); |
| | | } }, |
| | | { field: 'createTime', width: 160, sort: true, title: '创建时间',templet:function(d){ |
| | | return new Date(d.createTime).dateFormat("yyyy/MM/dd hh:mm:ss"); |
| | | } }, |
| | | { field: 'enabled', width: 100, templet: '#product-tpl-state', sort: true, title: '审核' } |
| | | ]] |
| | | }); |
| | | } |
| | | renderTable(); |
| | | |
| | | // 修改状态 |
| | | form.on('switch(product-tpl-state)', function (obj) { |
| | | layer.load(2); |
| | | admin.req('api-opration/productorderdetail/updateEnabled', { |
| | | id: obj.elem.value, |
| | | enabled: obj.elem.checked ? true : false |
| | | }, function (data) { |
| | | layer.closeAll('loading'); |
| | | if (data.code == 0) { |
| | | layer.msg(data.msg, { icon: 1, time: 500 }); |
| | | } else { |
| | | layer.msg(data.msg, { icon: 2, time: 500 }); |
| | | $(obj.elem).prop('checked', !obj.elem.checked); |
| | | form.render('checkbox'); |
| | | } |
| | | }, 'GET'); |
| | | }); |
| | | // 搜索按钮点击事件 |
| | | $('#product-btn-search').click(function () { |
| | | var proName = $('#product-search-value').val(); |
| | | var hospitalName = $('#hospital-search-value').val(); |
| | | table.reload('product-table', { where: { proName: proName,hospitalName: hospitalName } }); |
| | | }); |
| | | }); |
| | | </script> |