Merge branch 'dev' of http://192.168.2.240:7070/r/kidgrow-microservices-platform into dev
| | |
| | | * 分页查询医生的模板列表 |
| | | * @param page |
| | | * @param params |
| | | * @return |
| | | * @returnfindDoctorList |
| | | */ |
| | | List<DoctorTemplete> findList(Page<DoctorTemplete> page, @Param("p") Map<String, Object> params); |
| | | /** |
| | | * 分页查询医生的模板列表 |
| | | * @param page |
| | | * @param params |
| | | * @returnfindDoctorList |
| | | */ |
| | | List<DoctorTemplete> findDoctorList(Page<DoctorTemplete> page, @Param("p") Map<String, Object> params); |
| | | |
| | | /** |
| | | * 根据DoctorTemplete对象当做查询条件进行查询 |
| | |
| | | * @return |
| | | */ |
| | | PageResult findList(Map<String, Object> params); |
| | | |
| | | /** |
| | | * 列表 |
| | | * @param params |
| | | * @return |
| | | */ |
| | | PageResult findDoctorList(Map<String, Object> params); |
| | | |
| | | /** |
| | | * 根据DoctorTemplete对象当做查询条件进行查询 |
| | |
| | | package com.kidgrow.oprationcenter.service.impl; |
| | | |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import org.springframework.stereotype.Service; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.common.service.impl.SuperServiceImpl; |
| | | import com.kidgrow.oprationcenter.mapper.DoctorTempleteMapper; |
| | | import com.kidgrow.oprationcenter.model.DoctorTemplete; |
| | | import com.kidgrow.oprationcenter.service.IDoctorTempleteService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import com.kidgrow.oprationcenter.model.DoctorTemplete; |
| | | import com.kidgrow.oprationcenter.mapper.DoctorTempleteMapper; |
| | | import com.kidgrow.oprationcenter.service.IDoctorTempleteService; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | |
| | | return PageResult.<DoctorTemplete>builder().data(list).code(0).count(page.getTotal()).build(); |
| | | } |
| | | |
| | | @Override |
| | | public PageResult findDoctorList(Map<String, Object> params) { |
| | | Page<DoctorTemplete> page = new Page<>(MapUtils.getInteger(params, "page"), MapUtils.getInteger(params, "limit")); |
| | | List<DoctorTemplete> list = baseMapper.findDoctorList(page, params); |
| | | return PageResult.<DoctorTemplete>builder().data(list).code(0).count(page.getTotal()).build(); |
| | | } |
| | | |
| | | /** |
| | | * 根据DoctorTemplete对象当做查询条件进行查询 |
| | | * @param doctorTemplete |
| | |
| | | <include refid="where"/> |
| | | order by id desc |
| | | </select> |
| | | <select id="findDoctorList" resultType="com.kidgrow.oprationcenter.model.DoctorTemplete"> |
| | | SELECT |
| | | id, |
| | | doctor_id, |
| | | doctor_name, |
| | | public_type, |
| | | templete_type, |
| | | templete_title, |
| | | templete_note, |
| | | create_time |
| | | FROM |
| | | doctor_templete |
| | | WHERE |
| | | is_del = 0 |
| | | AND enabled = 1 |
| | | AND templete_type = #{p.templeteType} |
| | | AND(( |
| | | hospital_id IS NULL |
| | | AND hospital_id IS NULL |
| | | AND doctor_id IS NULL |
| | | ) |
| | | OR ( |
| | | hospital_id =#{p.hospitalId} |
| | | AND department_id =#{p.departmentId} |
| | | AND ( |
| | | public_type = 0 |
| | | OR ( |
| | | doctor_id =#{p.doctorId} AND public_type = 1)))) |
| | | ORDER BY public_type DESC,id desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | } |
| | | return doctorTempleteService.findList(params); |
| | | } |
| | | /** |
| | | * 医生的模板列表 |
| | | */ |
| | | @ApiOperation(value = "查询列表") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "page", value = "分页起始位置", required = true, dataType = "Integer"), |
| | | @ApiImplicitParam(name = "limit", value = "分页结束位置", required = true, dataType = "Integer") |
| | | }) |
| | | @GetMapping("/doctorTempleteList") |
| | | public PageResult doctorList(@RequestParam Map<String, Object> params) { |
| | | if(params.size()==0){ |
| | | params.put("page",1); |
| | | params.put("limit",10); |
| | | } |
| | | return doctorTempleteService.findDoctorList(params); |
| | | } |
| | | |
| | | /** |
| | | * 查询 |
| | |
| | | import com.kidgrow.common.model.SysOrganization; |
| | | import com.kidgrow.common.model.SysUser; |
| | | import com.kidgrow.common.utils.StringUtils; |
| | | import com.kidgrow.oprationcenter.model.ProductOrderDetail; |
| | | import com.kidgrow.oprationcenter.model.ProductOrderRecord; |
| | | import com.kidgrow.oprationcenter.service.IBusinessRecordsService; |
| | | import com.kidgrow.oprationcenter.service.IProductOrderDetailService; |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.validation.Valid; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | * 删除 |
| | | */ |
| | | @ApiOperation(value = "删除") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @DeleteMapping("/{id}") |
| | | public ResultBody delete(@PathVariable Long id) { |
| | | boolean v = productOrderRecordService.removeById(id); |
| | | if (v) { |
| | | if (!businessRecordsService.recordBusinessData("删除订单明细:" + id, id.toString())) { |
| | | //log.error(String.format("删除订单明细id为:{1}",id)); |
| | | ProductOrderRecord productOrderRecord=productOrderRecordService.getById(id); |
| | | if (productOrderRecord != null) { |
| | | Map<String,Object> detailSelect=new HashMap<String,Object>(); |
| | | detailSelect.put("pro_id",productOrderRecord.getProId()); |
| | | detailSelect.put("order_id",productOrderRecord.getOrderId()); |
| | | List<ProductOrderDetail> productOrderDetailList=productOrderDetailService.listByMap(detailSelect); |
| | | if (productOrderDetailList != null&&productOrderDetailList.size()>0) { |
| | | ProductOrderDetail productOrderDetail=productOrderDetailList.get(0); |
| | | if (productOrderDetail.getAilightCount() == productOrderRecord.getAilightCount()&& |
| | | productOrderDetail.getRecordCount()==productOrderRecord.getRecordCount()) { |
| | | //读片量和报告量都没有改变 可以删除 |
| | | //删记录 |
| | | boolean isdel= productOrderRecordService.removeById(id); |
| | | //删套餐 |
| | | boolean isdelDetail=productOrderDetailService.removeById(productOrderDetail.getId()); |
| | | //写记录 |
| | | boolean record=businessRecordsService.recordBusinessData("删除订单明细:" + id, id.toString()); |
| | | log.info(String.format("删除订单明细id为:{1}",id)); |
| | | if (isdelDetail&&isdel) { |
| | | return ResultBody.ok().msg("套餐删除成功!"); |
| | | } |
| | | return ResultBody.ok().msg("删除成功"); |
| | | } else { |
| | | return ResultBody.failed().msg("删除失败"); |
| | | else |
| | | { |
| | | return ResultBody.failed().msg("当前套餐删除失败!"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | return ResultBody.failed().msg("当前套餐已经使用,无法删除!"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | return ResultBody.failed().msg("无相关套餐记录!"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | return ResultBody.failed().msg("不存在该条记录!"); |
| | | } |
| | | } |
| | | |
| | |
| | | sysDoctor.setServerUserId(isReg ? createUserId : sysUserd.getId()); |
| | | sysDoctor.setServerUserName(isReg ? createUserName : sysUserd.getUsername()); |
| | | sysDoctor.setIsAdminUser(false); |
| | | sysDoctor.setEnabled(false); |
| | | sysDoctor.setEnabled(!isReg); |
| | | if (sysDoctorMapper.insert(sysDoctor) == 1) { |
| | | //非自主注册的 返回信息带密码 |
| | | if (!isReg) { |
| | |
| | | /** |
| | | * 生成缩略图需要的图片暂存目录 |
| | | */ |
| | | public static final String TEMP_IMAGE_PATH="D:/resources/images/"; |
| | | // public static final String TEMP_IMAGE_PATH="/root/kidgrow"; |
| | | // public static final String TEMP_IMAGE_PATH="D:/resources/images/"; |
| | | public static final String TEMP_IMAGE_PATH="/root/kidgrow"; |
| | | /** |
| | | * 普通医生角色ID |
| | | */ |
| | |
| | | /** |
| | | * 一个科室能最大试用多少次 |
| | | */ |
| | | public static final Integer MAX_FREE_COUNT=0; |
| | | public static final Integer MAX_FREE_COUNT=5; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | |
| | | /** |
| | | * 医生姓名 |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long doctorId; |
| | | /** |
| | | * 医生姓名 |
| | |
| | | @Override |
| | | public Expression getTenantId(boolean where) { |
| | | String tenant = TenantContextHolder.getTenant(); |
| | | log.info("租户ID:"+tenant); |
| | | //log.info("租户ID:"+tenant); |
| | | if (tenant != null) { |
| | | return new StringValue(TenantContextHolder.getTenant()); |
| | | } |
| | |
| | | }; |
| | | //从当前页面的url地址中获取参数数据 |
| | | function getRequest() { |
| | | debugger |
| | | var url = location.search; //获取url中"?"符后的字串 |
| | | var theRequest = new Object(); |
| | | if (url.indexOf("?") != -1) { |
| | |
| | | function permissionsInput(res,config) { |
| | | if(!strUtil.isEmpty(res)&&res.code==401){ |
| | | config.removeToken(); |
| | | console.log(res); |
| | | debugger |
| | | if(res.msg.includes("Access token expired")){ |
| | | layer.msg('登录过期11', {icon: 2, time: 1500}, function () { |
| | | layer.msg('登录过期', {icon: 2, time: 1500}, function () { |
| | | location.replace('/login.html'); |
| | | }, 5000); |
| | | }else{ |
| | | }else if(msg.includes("Invalid access token")){ |
| | | layer.msg('您的账号在其他地方登陆,请重新登录或修改密码', {icon: 2, time: 1500}, function () { |
| | | location.replace('/login.html'); |
| | | }, 5000); |
| | |
| | | config.removeToken(); |
| | | // var json=JSON.stringify(jsonRs) |
| | | // console.log(json,"jsonjsonjsonjsonjsonjsonjson") |
| | | debugger |
| | | var msg=jsonRs.msg; |
| | | if(msg.includes("Access token expired")){ |
| | | layer.msg('登录过期', {icon: 2, time: 1500}, function () { |
| | |
| | | location.replace('/login.html'); |
| | | }, 5000); |
| | | } |
| | | |
| | | return; |
| | | } else if (jsonRs.code == 403) { |
| | | layer.msg('没有权限', {icon: 2}); |
| | |
| | | </div> |
| | | <div class="layui-card-body layuiadmin-card-list"> |
| | | <a href="/#!syshospital"> |
| | | <p class="big-font" id="h_hospital">无权查看</p> |
| | | <p class="big-font" id="h_hospital"></p> |
| | | </a> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="layui-card-body layuiadmin-card-list"> |
| | | <a href="/#!product"> |
| | | <p class="big-font" id="u_product">无权查看</p> |
| | | <p class="big-font" id="u_product"></p> |
| | | </a> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="layui-card-body layuiadmin-card-list"> |
| | | <a href="/#!verifyRecharge"> |
| | | <p class="big-font" id="t_product">无权查看</p> |
| | | <p class="big-font" id="t_product"></p> |
| | | </a> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="layui-card-body layuiadmin-card-list"> |
| | | <a href="/#!feedback"> |
| | | <p class="big-font" id="u_feedback">无权查看</p> |
| | | <p class="big-font" id="u_feedback"></p> |
| | | </a> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="layui-card-body layuiadmin-card-list"> |
| | | <a href="/#!dataneed"> |
| | | <p class="big-font" id="d_dataneed">无权查看</p> |
| | | <p class="big-font" id="d_dataneed"></p> |
| | | </a> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="layui-card-body layuiadmin-card-list"> |
| | | <a href="/#!doctor"> |
| | | <p class="big-font" id="h_doctor">无权查看</p> |
| | | <p class="big-font" id="h_doctor"></p> |
| | | </a> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="layui-card-body layuiadmin-card-list"> |
| | | <a href="/#!doctor"> |
| | | <p class="big-font" id="c_doctor">无权查看</p> |
| | | <p class="big-font" id="c_doctor"></p> |
| | | </a> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="layui-card-body layuiadmin-card-list"> |
| | | <a href="/#!doctor"> |
| | | <p class="big-font" id="ht_doctor">无权查看</p> |
| | | <p class="big-font" id="ht_doctor"></p> |
| | | </a> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="layui-card-body layuiadmin-card-list"> |
| | | <a href="/#!doctor"> |
| | | <p class="big-font" id="u_signing">无权查看</p> |
| | | <p class="big-font" id="u_signing"></p> |
| | | </a> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="layui-card-body layuiadmin-card-list"> |
| | | <a href="/#!doctor"> |
| | | <p class="big-font" id="d_isanswer">无权查看</p> |
| | | <p class="big-font" id="d_isanswer"></p> |
| | | </a> |
| | | </div> |
| | | </div> |
| | |
| | | let util = layui.util; |
| | | let $ = layui.jquery; |
| | | var counts = 0; |
| | | var noData="无权查看"; |
| | | // 加载医院统计数据 |
| | | var loadHospitalChart = function (datatype) { |
| | | admin.req("api-user/syshospital/chartHospital?datatype=" + datatype, {}, function (data) { |
| | |
| | | } |
| | | }, "get"); |
| | | } |
| | | |
| | | //加载读片图表 |
| | | var loadaiphotoChart = function (dataType) { |
| | | var nowYear = new Date().getFullYear(); |
| | |
| | | //数据需求 |
| | | loadOprationChart(2); |
| | | $("#d_dataneed").html(counts); |
| | | |
| | | //H端医生 |
| | | loadDoctorChart(4); |
| | | $("#h_doctor").html(counts); |
| | |
| | | loadDoctorChart(5); |
| | | $("#ht_doctor").html(counts); |
| | | loadProductChart(); |
| | | $("#u_product").html(noData); |
| | | $("#t_product").html(noData); |
| | | } else if (element.code == "sale") { |
| | | //正式医院 |
| | | loadHospitalChart(0); |
| | | $("#h_hospital").html(counts); |
| | | //正式医院 |
| | | loadHospitalChart(0); |
| | | $("#h_hospital").html(counts); |
| | |
| | | //签约医生 |
| | | loadDoctorChart(1); |
| | | $("#u_signing").html(counts); |
| | | |
| | | $("#u_product").html(noData); |
| | | $("#t_product").html(noData); |
| | | //医答医生 |
| | | loadDoctorChart(2); |
| | | $("#d_isanswer").html(counts); |
| | | |
| | | loadContractChart(); |
| | | loadProductChart(); |
| | | loadreportChart(0); |
| | |
| | | // 工具条点击事件 |
| | | table.on('tool(product-table)', function (obj) { |
| | | if (obj.event === 'del') { // 删除 |
| | | layer.confirm('确定要删除吗?', function (i) { |
| | | layer.confirm('您确定要删除这次充值吗?删除后不可恢复!', function (i) { |
| | | layer.close(i); |
| | | layer.load(2); |
| | | admin.req('api-opration/productorderrecord/' + obj.data.id, {}, function (data) { |
| | |
| | | if (data.code === 0) { |
| | | //现将临时数据清理 |
| | | admin.putTempData("t_tempProduct", ""); |
| | | layer.msg(data.msg, { icon: 1, time: 20000 }, function () { |
| | | layer.msg(data.msg, { icon: 1, time: 3000 }, function () { |
| | | admin.finishPopupCenter(); |
| | | }); |
| | | } |
| | |
| | | // 表单提交事件 |
| | | form.on('submit(user-form-submit)', function (data) { |
| | | layer.load(2); |
| | | var datadto= data.field |
| | | admin.req('api-user/users/saveOrUpdate', JSON.stringify(data.field), function (data) { |
| | | layer.closeAll('loading'); |
| | | if (data.code == 0) { |
| | | layer.alert("用户添加成功,默认密码为:"+data.data.password, {icon: 1}); |
| | | if(datadto.id==null||datadto.id==''){ |
| | | layer.alert("用户添加成功,默认密码为:"+data.data.password); |
| | | } |
| | | admin.finishPopupCenter(); |
| | | } else { |
| | | layer.msg(data.msg, {icon: 2, time: 2000}); |