病案申请小程序后台
parent
4a58de4841
commit
29014d0891
Binary file not shown.
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 88 KiB |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,336 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>统计</title>
|
||||
<link rel="shortcut icon" href="favicon.ico">
|
||||
<link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/main/animate.min.css" th:href="@{/css/main/animate.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/main/style.min862f.css" th:href="@{/css/main/style.min862f.css}" rel="stylesheet"/>
|
||||
</head>
|
||||
|
||||
<body class="gray-bg">
|
||||
<div class="wrapper wrapper-content">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<span class="label label-success pull-right">月</span>
|
||||
<h5>收入</h5>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<h1 class="no-margins">40 886,200</h1>
|
||||
<div class="stat-percent font-bold text-success">98% <i class="fa fa-bolt"></i>
|
||||
</div>
|
||||
<small>总收入</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<span class="label label-info pull-right">全年</span>
|
||||
<h5>订单</h5>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<h1 class="no-margins">275,800</h1>
|
||||
<div class="stat-percent font-bold text-info">20% <i class="fa fa-level-up"></i>
|
||||
</div>
|
||||
<small>新订单</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<span class="label label-primary pull-right">今天</span>
|
||||
<h5>访客</h5>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<h1 class="no-margins">106,120</h1>
|
||||
<div class="stat-percent font-bold text-navy">44% <i class="fa fa-level-up"></i>
|
||||
</div>
|
||||
<small>新访客</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<span class="label label-danger pull-right">最近一个月</span>
|
||||
<h5>活跃用户</h5>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<h1 class="no-margins">80,600</h1>
|
||||
<div class="stat-percent font-bold text-danger">38% <i class="fa fa-level-down"></i>
|
||||
</div>
|
||||
<small>12月</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>订单</h5>
|
||||
<div class="pull-right">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-xs btn-white active">天</button>
|
||||
<button type="button" class="btn btn-xs btn-white">月</button>
|
||||
<button type="button" class="btn btn-xs btn-white">年</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-9">
|
||||
<div class="flot-chart">
|
||||
<div class="flot-chart-content" id="flot-dashboard-chart"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<ul class="stat-list">
|
||||
<li>
|
||||
<h2 class="no-margins">2,346</h2>
|
||||
<small>订单总数</small>
|
||||
<div class="stat-percent">48% <i class="fa fa-level-up text-navy"></i>
|
||||
</div>
|
||||
<div class="progress progress-mini">
|
||||
<div style="width: 48%;" class="progress-bar"></div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h2 class="no-margins ">4,422</h2>
|
||||
<small>最近一个月订单</small>
|
||||
<div class="stat-percent">60% <i class="fa fa-level-down text-navy"></i>
|
||||
</div>
|
||||
<div class="progress progress-mini">
|
||||
<div style="width: 60%;" class="progress-bar"></div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h2 class="no-margins ">9,180</h2>
|
||||
<small>最近一个月销售额</small>
|
||||
<div class="stat-percent">22% <i class="fa fa-bolt text-navy"></i>
|
||||
</div>
|
||||
<div class="progress progress-mini">
|
||||
<div style="width: 22%;" class="progress-bar"></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>用户项目列表</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<table class="table table-hover no-margins">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>状态</th>
|
||||
<th>日期</th>
|
||||
<th>用户</th>
|
||||
<th>值</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><small>进行中...</small>
|
||||
</td>
|
||||
<td><i class="fa fa-clock-o"></i> 11:20</td>
|
||||
<td>青衣5858</td>
|
||||
<td class="text-navy"> <i class="fa fa-level-up"></i> 24%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="label label-warning">已取消</span>
|
||||
</td>
|
||||
<td><i class="fa fa-clock-o"></i> 10:40</td>
|
||||
<td>徐子崴</td>
|
||||
<td class="text-navy"> <i class="fa fa-level-up"></i> 66%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><small>进行中...</small>
|
||||
</td>
|
||||
<td><i class="fa fa-clock-o"></i> 01:30</td>
|
||||
<td>姜岚昕</td>
|
||||
<td class="text-navy"> <i class="fa fa-level-up"></i> 54%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><small>进行中...</small>
|
||||
</td>
|
||||
<td><i class="fa fa-clock-o"></i> 02:20</td>
|
||||
<td>武汉大兵哥</td>
|
||||
<td class="text-navy"> <i class="fa fa-level-up"></i> 12%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><small>进行中...</small>
|
||||
</td>
|
||||
<td><i class="fa fa-clock-o"></i> 09:40</td>
|
||||
<td>荆莹儿</td>
|
||||
<td class="text-navy"> <i class="fa fa-level-up"></i> 22%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="label label-primary">已完成</span>
|
||||
</td>
|
||||
<td><i class="fa fa-clock-o"></i> 04:10</td>
|
||||
<td>栾某某</td>
|
||||
<td class="text-navy"> <i class="fa fa-level-up"></i> 66%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><small>进行中...</small>
|
||||
</td>
|
||||
<td><i class="fa fa-clock-o"></i> 12:08</td>
|
||||
<td>范范范二妮</td>
|
||||
<td class="text-navy"> <i class="fa fa-level-up"></i> 23%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script th:src="@{/js/jquery.min.js}"></script>
|
||||
<script th:src="@{/js/bootstrap.min.js}"></script>
|
||||
<script th:src="@{/ajax/libs/flot/jquery.flot.js}"></script>
|
||||
|
||||
<th:block th:include="include :: sparkline-js" />
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
var data2 = [
|
||||
[gd(2012, 1, 1), 7], [gd(2012, 1, 2), 6], [gd(2012, 1, 3), 4], [gd(2012, 1, 4), 8],
|
||||
[gd(2012, 1, 5), 9], [gd(2012, 1, 6), 7], [gd(2012, 1, 7), 5], [gd(2012, 1, 8), 4],
|
||||
[gd(2012, 1, 9), 7], [gd(2012, 1, 10), 8], [gd(2012, 1, 11), 9], [gd(2012, 1, 12), 6],
|
||||
[gd(2012, 1, 13), 4], [gd(2012, 1, 14), 5], [gd(2012, 1, 15), 11], [gd(2012, 1, 16), 8],
|
||||
[gd(2012, 1, 17), 8], [gd(2012, 1, 18), 11], [gd(2012, 1, 19), 11], [gd(2012, 1, 20), 6],
|
||||
[gd(2012, 1, 21), 6], [gd(2012, 1, 22), 8], [gd(2012, 1, 23), 11], [gd(2012, 1, 24), 13],
|
||||
[gd(2012, 1, 25), 7], [gd(2012, 1, 26), 9], [gd(2012, 1, 27), 9], [gd(2012, 1, 28), 8],
|
||||
[gd(2012, 1, 29), 5], [gd(2012, 1, 30), 8], [gd(2012, 1, 31), 25]
|
||||
];
|
||||
|
||||
var data3 = [
|
||||
[gd(2012, 1, 1), 800], [gd(2012, 1, 2), 500], [gd(2012, 1, 3), 600], [gd(2012, 1, 4), 700],
|
||||
[gd(2012, 1, 5), 500], [gd(2012, 1, 6), 456], [gd(2012, 1, 7), 800], [gd(2012, 1, 8), 589],
|
||||
[gd(2012, 1, 9), 467], [gd(2012, 1, 10), 876], [gd(2012, 1, 11), 689], [gd(2012, 1, 12), 700],
|
||||
[gd(2012, 1, 13), 500], [gd(2012, 1, 14), 600], [gd(2012, 1, 15), 700], [gd(2012, 1, 16), 786],
|
||||
[gd(2012, 1, 17), 345], [gd(2012, 1, 18), 888], [gd(2012, 1, 19), 888], [gd(2012, 1, 20), 888],
|
||||
[gd(2012, 1, 21), 987], [gd(2012, 1, 22), 444], [gd(2012, 1, 23), 999], [gd(2012, 1, 24), 567],
|
||||
[gd(2012, 1, 25), 786], [gd(2012, 1, 26), 666], [gd(2012, 1, 27), 888], [gd(2012, 1, 28), 900],
|
||||
[gd(2012, 1, 29), 178], [gd(2012, 1, 30), 555], [gd(2012, 1, 31), 993]
|
||||
];
|
||||
|
||||
|
||||
var dataset = [
|
||||
{
|
||||
label: "订单数",
|
||||
data: data3,
|
||||
color: "#1ab394",
|
||||
bars: {
|
||||
show: true,
|
||||
align: "center",
|
||||
barWidth: 24 * 60 * 60 * 600,
|
||||
lineWidth: 0
|
||||
}
|
||||
|
||||
}, {
|
||||
label: "付款数",
|
||||
data: data2,
|
||||
yaxis: 2,
|
||||
color: "#464f88",
|
||||
lines: {
|
||||
lineWidth: 1,
|
||||
show: true,
|
||||
fill: true,
|
||||
fillColor: {
|
||||
colors: [{
|
||||
opacity: 0.2
|
||||
}, {
|
||||
opacity: 0.2
|
||||
}]
|
||||
}
|
||||
},
|
||||
splines: {
|
||||
show: false,
|
||||
tension: 0.6,
|
||||
lineWidth: 1,
|
||||
fill: 0.1
|
||||
},
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
var options = {
|
||||
xaxis: {
|
||||
mode: "time",
|
||||
tickSize: [3, "day"],
|
||||
tickLength: 0,
|
||||
axisLabel: "Date",
|
||||
axisLabelUseCanvas: true,
|
||||
axisLabelFontSizePixels: 12,
|
||||
axisLabelFontFamily: 'Arial',
|
||||
axisLabelPadding: 10,
|
||||
color: "#838383"
|
||||
},
|
||||
yaxes: [{
|
||||
position: "left",
|
||||
max: 1070,
|
||||
color: "#838383",
|
||||
axisLabelUseCanvas: true,
|
||||
axisLabelFontSizePixels: 12,
|
||||
axisLabelFontFamily: 'Arial',
|
||||
axisLabelPadding: 3
|
||||
}, {
|
||||
position: "right",
|
||||
clolor: "#838383",
|
||||
axisLabelUseCanvas: true,
|
||||
axisLabelFontSizePixels: 12,
|
||||
axisLabelFontFamily: ' Arial',
|
||||
axisLabelPadding: 67
|
||||
}
|
||||
],
|
||||
legend: {
|
||||
noColumns: 1,
|
||||
labelBoxBorderColor: "#000000",
|
||||
position: "nw"
|
||||
},
|
||||
grid: {
|
||||
hoverable: false,
|
||||
borderWidth: 0,
|
||||
color: '#838383'
|
||||
}
|
||||
};
|
||||
|
||||
function gd(year, month, day) {
|
||||
return new Date(year, month - 1, day).getTime();
|
||||
}
|
||||
|
||||
var previousPoint = null,
|
||||
previousLabel = null;
|
||||
|
||||
$.plot($("#flot-dashboard-chart"), dataset, options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,8 @@
|
||||
package com.ruoyi.common.exception.wx;
|
||||
|
||||
/**
|
||||
* 未登录异常
|
||||
*/
|
||||
public class NotLoginException extends RuntimeException{
|
||||
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.ruoyi.common.exception.wx;
|
||||
|
||||
import com.ruoyi.common.exception.base.BaseException;
|
||||
|
||||
public class WxBusinessException extends BaseException {
|
||||
public WxBusinessException(String defaultMessage) {
|
||||
super(defaultMessage);
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
SMS_212471722
|
||||
老师您好,您需要的电子扫描资料已上传,小程序中可查看下载地址,解压密码${pwd}。请您及时查收,如有问题,随时联系。
|
||||
|
||||
|
||||
SMS_212476711
|
||||
老师您好,您需要的原件资料已顺丰帮您发出,顺丰单号${nu},请您及时关注物流信息。
|
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.6.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>wx-record-order</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 小程序sdk -->
|
||||
<dependency>
|
||||
<groupId>com.github.binarywang</groupId>
|
||||
<artifactId>weixin-java-miniapp</artifactId>
|
||||
<version>4.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>dysmsapi20170525</artifactId>
|
||||
<version>2.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>tea</artifactId>
|
||||
<version>1.1.8</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
@ -0,0 +1,151 @@
|
||||
package com.ruoyi.wx.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.wx.domain.MrRecordOrder;
|
||||
import com.ruoyi.wx.service.IMrRecordOrderService;
|
||||
import com.ruoyi.wx.util.ShortUrlUtils;
|
||||
import org.apache.commons.lang3.RandomStringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 病案申请Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-02-24
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/wx/order")
|
||||
public class MrRecordOrderController extends BaseController {
|
||||
private String prefix = "wx/order";
|
||||
|
||||
@Value("${server.servlet.domain}")
|
||||
private String domain;
|
||||
|
||||
@Autowired
|
||||
private IMrRecordOrderService mrRecordOrderService;
|
||||
|
||||
@RequiresPermissions("wx:order:view")
|
||||
@GetMapping()
|
||||
public String order() {
|
||||
return prefix + "/order";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询病案申请列表
|
||||
*/
|
||||
@RequiresPermissions("wx:order:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(MrRecordOrder mrRecordOrder) {
|
||||
startPage();
|
||||
List<MrRecordOrder> list = mrRecordOrderService.selectMrRecordOrderList(mrRecordOrder);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出病案申请列表
|
||||
*/
|
||||
@RequiresPermissions("wx:order:export")
|
||||
@Log(title = "病案申请", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(MrRecordOrder mrRecordOrder) {
|
||||
List<MrRecordOrder> list = mrRecordOrderService.selectMrRecordOrderList(mrRecordOrder);
|
||||
ExcelUtil<MrRecordOrder> util = new ExcelUtil<MrRecordOrder>(MrRecordOrder.class);
|
||||
return util.exportExcel(list, "order");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增病案申请
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add() {
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存病案申请
|
||||
*/
|
||||
@RequiresPermissions("wx:order:add")
|
||||
@Log(title = "病案申请", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(MrRecordOrder mrRecordOrder) {
|
||||
return toAjax(mrRecordOrderService.insertMrRecordOrder(mrRecordOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改病案申请
|
||||
*/
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap) {
|
||||
MrRecordOrder mrRecordOrder = mrRecordOrderService.selectMrRecordOrderById(id);
|
||||
mmap.put("mrRecordOrder", mrRecordOrder);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存病案申请
|
||||
*/
|
||||
@RequiresPermissions("wx:order:edit")
|
||||
@Log(title = "病案申请", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(MrRecordOrder mrRecordOrder) {
|
||||
return toAjax(mrRecordOrderService.updateMrRecordOrder(mrRecordOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除病案申请
|
||||
*/
|
||||
@RequiresPermissions("wx:order:remove")
|
||||
@Log(title = "病案申请", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids) {
|
||||
return toAjax(mrRecordOrderService.deleteMrRecordOrderByIds(ids));
|
||||
}
|
||||
|
||||
@GetMapping("/sendView/{id}")
|
||||
public String sendView(@PathVariable("id") Long id, ModelMap mmap) {
|
||||
MrRecordOrder mrRecordOrder = mrRecordOrderService.selectMrRecordOrderById(id);
|
||||
mmap.put("mrRecordOrder", mrRecordOrder);
|
||||
mmap.put("randomCode", RandomStringUtils.random(8,true,true));
|
||||
return prefix + "/sendView";
|
||||
}
|
||||
|
||||
@Log(title = "发送病案处理短信", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/sendSms")
|
||||
@ResponseBody
|
||||
public AjaxResult sendSms(MrRecordOrder mrRecordOrder) {
|
||||
return toAjax(mrRecordOrderService.sendSms(mrRecordOrder));
|
||||
}
|
||||
|
||||
@PostMapping("/upload")
|
||||
@ResponseBody
|
||||
public AjaxResult upload(@RequestParam("file_data") MultipartFile file) throws IOException {
|
||||
// 上传文件路径
|
||||
String filePath = RuoYiConfig.getUploadPath();
|
||||
// 上传并返回新文件名称
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
// 保存短网址对应关系
|
||||
String code=mrRecordOrderService.randomCode(fileName,file.getOriginalFilename());
|
||||
return AjaxResult.success("上传成功", domain+"/s/"+code);
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.ruoyi.wx.controller;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.ruoyi.wx.service.IMrRecordOrderService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("s")
|
||||
public class ShortUrlController {
|
||||
@Autowired
|
||||
private IMrRecordOrderService mrRecordOrderService;
|
||||
|
||||
@RequestMapping("{code}")
|
||||
public String redirectTo(@PathVariable String code, HttpServletResponse response) {
|
||||
Map<String, String> urlHeaders = mrRecordOrderService.getUrlHeaders(code);
|
||||
String headers = urlHeaders.get("headers");
|
||||
JSONObject jsonObject = JSONUtil.parseObj(headers);
|
||||
jsonObject.forEach((k, v) -> {
|
||||
response.setHeader(k, (String) v);
|
||||
});
|
||||
return "forward:" + urlHeaders.get("url");
|
||||
}
|
||||
}
|
@ -0,0 +1,141 @@
|
||||
package com.ruoyi.wx.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.wx.domain.WxUser;
|
||||
import com.ruoyi.wx.service.IWxUserService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 微信小程序用户Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-02-24
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/wx/user")
|
||||
public class WxUserController extends BaseController
|
||||
{
|
||||
private String prefix = "wx/user";
|
||||
|
||||
@Autowired
|
||||
private IWxUserService wxUserService;
|
||||
|
||||
@RequiresPermissions("wx:user:view")
|
||||
@GetMapping()
|
||||
public String user()
|
||||
{
|
||||
return prefix + "/user";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询微信小程序用户列表
|
||||
*/
|
||||
@RequiresPermissions("wx:user:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(WxUser wxUser)
|
||||
{
|
||||
startPage();
|
||||
List<WxUser> list = wxUserService.selectWxUserList(wxUser);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出微信小程序用户列表
|
||||
*/
|
||||
@RequiresPermissions("wx:user:export")
|
||||
@Log(title = "微信小程序用户", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(WxUser wxUser)
|
||||
{
|
||||
List<WxUser> list = wxUserService.selectWxUserList(wxUser);
|
||||
ExcelUtil<WxUser> util = new ExcelUtil<WxUser>(WxUser.class);
|
||||
return util.exportExcel(list, "user");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增微信小程序用户
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存微信小程序用户
|
||||
*/
|
||||
@RequiresPermissions("wx:user:add")
|
||||
@Log(title = "微信小程序用户", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(WxUser wxUser)
|
||||
{
|
||||
return toAjax(wxUserService.insertWxUser(wxUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改微信小程序用户
|
||||
*/
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
WxUser wxUser = wxUserService.selectWxUserById(id);
|
||||
mmap.put("wxUser", wxUser);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存微信小程序用户
|
||||
*/
|
||||
@RequiresPermissions("wx:user:edit")
|
||||
@Log(title = "微信小程序用户", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(WxUser wxUser)
|
||||
{
|
||||
return toAjax(wxUserService.updateWxUser(wxUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除微信小程序用户
|
||||
*/
|
||||
@RequiresPermissions("wx:user:remove")
|
||||
@Log(title = "微信小程序用户", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(wxUserService.deleteWxUserByIds(ids));
|
||||
}
|
||||
|
||||
@Log(title = "审核微信小程序用户", businessType = BusinessType.UPDATE)
|
||||
@PostMapping( "/checkUser")
|
||||
@ResponseBody
|
||||
public AjaxResult checkUser(Long id){
|
||||
return toAjax(wxUserService.checkUser(id));
|
||||
}
|
||||
|
||||
@Log(title = "修改微信小程序用户状态", businessType = BusinessType.UPDATE)
|
||||
@PostMapping( "/triggerStatus")
|
||||
@ResponseBody
|
||||
public AjaxResult triggerStatus(Long id){
|
||||
return toAjax(wxUserService.triggerStatus(id));
|
||||
}
|
||||
}
|
@ -0,0 +1,196 @@
|
||||
package com.ruoyi.wx.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 微信小程序用户对象 wx_user
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-02-24
|
||||
*/
|
||||
public class WxUser extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户姓名
|
||||
*/
|
||||
@Excel(name = "用户姓名")
|
||||
private String name;
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@Excel(name = "手机号码")
|
||||
private String phone;
|
||||
|
||||
private String openid;
|
||||
|
||||
/**
|
||||
* 用户状态 0正常 1停用
|
||||
*/
|
||||
@Excel(name = "用户状态")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 审核状态 0审核中 1审核成功
|
||||
*/
|
||||
@Excel(name = "审核状态")
|
||||
private Integer flag;
|
||||
|
||||
/**
|
||||
* 医院名称
|
||||
*/
|
||||
@Excel(name = "医院名称")
|
||||
private String hospital;
|
||||
|
||||
/**
|
||||
* 收货地址
|
||||
*/
|
||||
@Excel(name = "收货地址")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 微信昵称
|
||||
*/
|
||||
@Excel(name = "微信昵称")
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 微信头像
|
||||
*/
|
||||
@Excel(name = "微信头像")
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
private String gender;
|
||||
|
||||
/**
|
||||
* 登录token
|
||||
*/
|
||||
private String token;
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getToken() {
|
||||
return token;
|
||||
}
|
||||
|
||||
public void setToken(String token) {
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setOpenid(String openid) {
|
||||
this.openid = openid;
|
||||
}
|
||||
|
||||
public String getOpenid() {
|
||||
return openid;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setFlag(Integer flag) {
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
public Integer getFlag() {
|
||||
return flag;
|
||||
}
|
||||
|
||||
public void setHospital(String hospital) {
|
||||
this.hospital = hospital;
|
||||
}
|
||||
|
||||
public String getHospital() {
|
||||
return hospital;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getGender() {
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setGender(String gender) {
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("openid", getOpenid())
|
||||
.append("status", getStatus())
|
||||
.append("flag", getFlag())
|
||||
.append("hospital", getHospital())
|
||||
.append("address", getAddress())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("nickname", getNickname())
|
||||
.append("avatar", getAvatar())
|
||||
.append("phone", getPhone())
|
||||
.append("token", getToken())
|
||||
.append("gender", getGender())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,129 @@
|
||||
package com.ruoyi.wx.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class RecordOrderDTO {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 病案号
|
||||
*/
|
||||
private String mrNumber;
|
||||
|
||||
/**
|
||||
* 患者姓名
|
||||
*/
|
||||
private String patientName;
|
||||
|
||||
/**
|
||||
* 出院日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date dischargeDate;
|
||||
|
||||
/**
|
||||
* 住院次数
|
||||
*/
|
||||
private Long times;
|
||||
|
||||
/**
|
||||
* 医院名称
|
||||
*/
|
||||
private String hospital;
|
||||
|
||||
/**
|
||||
* 寄送地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
private String status;
|
||||
|
||||
private String downUrl;
|
||||
|
||||
public String getDownUrl() {
|
||||
return downUrl;
|
||||
}
|
||||
|
||||
public void setDownUrl(String downUrl) {
|
||||
this.downUrl = downUrl;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getMrNumber() {
|
||||
return mrNumber;
|
||||
}
|
||||
|
||||
public void setMrNumber(String mrNumber) {
|
||||
this.mrNumber = mrNumber;
|
||||
}
|
||||
|
||||
public String getPatientName() {
|
||||
return patientName;
|
||||
}
|
||||
|
||||
public void setPatientName(String patientName) {
|
||||
this.patientName = patientName;
|
||||
}
|
||||
|
||||
public Date getDischargeDate() {
|
||||
return dischargeDate;
|
||||
}
|
||||
|
||||
public void setDischargeDate(Date dischargeDate) {
|
||||
this.dischargeDate = dischargeDate;
|
||||
}
|
||||
|
||||
public Long getTimes() {
|
||||
return times;
|
||||
}
|
||||
|
||||
public void setTimes(Long times) {
|
||||
this.times = times;
|
||||
}
|
||||
|
||||
public String getHospital() {
|
||||
return hospital;
|
||||
}
|
||||
|
||||
public void setHospital(String hospital) {
|
||||
this.hospital = hospital;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
@ -0,0 +1,112 @@
|
||||
package com.ruoyi.wx.dto;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
|
||||
/**
|
||||
* 用户登录对象
|
||||
*/
|
||||
public class WxUserDTO {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户姓名
|
||||
*/
|
||||
@Excel(name = "用户姓名")
|
||||
private String name;
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@Excel(name = "手机号码")
|
||||
private String phone;
|
||||
/**
|
||||
* 用户状态 0正常 1停用
|
||||
*/
|
||||
@Excel(name = "用户状态")
|
||||
private Integer status;
|
||||
/**
|
||||
* 审核状态 0审核中 1审核成功
|
||||
*/
|
||||
@Excel(name = "审核状态")
|
||||
private Integer flag;
|
||||
|
||||
/**
|
||||
* 医院名称
|
||||
*/
|
||||
@Excel(name = "医院名称")
|
||||
private String hospital;
|
||||
|
||||
/**
|
||||
* 收货地址
|
||||
*/
|
||||
@Excel(name = "收货地址")
|
||||
private String address;
|
||||
|
||||
private String token;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getFlag() {
|
||||
return flag;
|
||||
}
|
||||
|
||||
public void setFlag(Integer flag) {
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
public String getHospital() {
|
||||
return hospital;
|
||||
}
|
||||
|
||||
public void setHospital(String hospital) {
|
||||
this.hospital = hospital;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getToken() {
|
||||
return token;
|
||||
}
|
||||
|
||||
public void setToken(String token) {
|
||||
this.token = token;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.ruoyi.wx.dto.req;
|
||||
|
||||
public class OrderListReqDTO {
|
||||
private String keyword;
|
||||
private Integer page;
|
||||
private Integer status;
|
||||
|
||||
public String getKeyword() {
|
||||
return keyword;
|
||||
}
|
||||
|
||||
public void setKeyword(String keyword) {
|
||||
this.keyword = keyword;
|
||||
}
|
||||
|
||||
public Integer getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(Integer page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.ruoyi.wx.dto.req;
|
||||
|
||||
public class UserSignInfo {
|
||||
private String nickName;
|
||||
private String gender;
|
||||
private String avatar;
|
||||
private String name;
|
||||
private String phone;
|
||||
private String hospital;
|
||||
|
||||
public String getNickName() {
|
||||
return nickName;
|
||||
}
|
||||
|
||||
public void setNickName(String nickName) {
|
||||
this.nickName = nickName;
|
||||
}
|
||||
|
||||
public String getGender() {
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setGender(String gender) {
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getHospital() {
|
||||
return hospital;
|
||||
}
|
||||
|
||||
public void setHospital(String hospital) {
|
||||
this.hospital = hospital;
|
||||
}
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package com.ruoyi.wx.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ruoyi.wx.domain.MrRecordOrder;
|
||||
import com.ruoyi.wx.dto.RecordOrderDTO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 病案申请Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-02-24
|
||||
*/
|
||||
public interface MrRecordOrderMapper
|
||||
{
|
||||
/**
|
||||
* 查询病案申请
|
||||
*
|
||||
* @param id 病案申请ID
|
||||
* @return 病案申请
|
||||
*/
|
||||
public MrRecordOrder selectMrRecordOrderById(Long id);
|
||||
|
||||
/**
|
||||
* 查询病案申请列表
|
||||
*
|
||||
* @param mrRecordOrder 病案申请
|
||||
* @return 病案申请集合
|
||||
*/
|
||||
public List<MrRecordOrder> selectMrRecordOrderList(MrRecordOrder mrRecordOrder);
|
||||
|
||||
/**
|
||||
* 新增病案申请
|
||||
*
|
||||
* @param mrRecordOrder 病案申请
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMrRecordOrder(MrRecordOrder mrRecordOrder);
|
||||
|
||||
/**
|
||||
* 修改病案申请
|
||||
*
|
||||
* @param mrRecordOrder 病案申请
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMrRecordOrder(MrRecordOrder mrRecordOrder);
|
||||
|
||||
/**
|
||||
* 删除病案申请
|
||||
*
|
||||
* @param id 病案申请ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMrRecordOrderById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除病案申请
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMrRecordOrderByIds(String[] ids);
|
||||
|
||||
List<RecordOrderDTO> searchList(@Param("userId")Long userId,@Param("keyword") String keyword,@Param("status") Integer status,@Param("startRow") Integer startRow,@Param("endRow") Integer endRow);
|
||||
|
||||
Map<String,String> getUrlHeaders(String code);
|
||||
|
||||
boolean saveCodeUrl(@Param("code") String code, @Param("url") String url, @Param("headers") String headers);
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.ruoyi.wx.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.wx.domain.WxUser;
|
||||
|
||||
/**
|
||||
* 微信小程序用户Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-02-24
|
||||
*/
|
||||
public interface WxUserMapper
|
||||
{
|
||||
/**
|
||||
* 查询微信小程序用户
|
||||
*
|
||||
* @param id 微信小程序用户ID
|
||||
* @return 微信小程序用户
|
||||
*/
|
||||
public WxUser selectWxUserById(Long id);
|
||||
|
||||
/**
|
||||
* 查询微信小程序用户列表
|
||||
*
|
||||
* @param wxUser 微信小程序用户
|
||||
* @return 微信小程序用户集合
|
||||
*/
|
||||
public List<WxUser> selectWxUserList(WxUser wxUser);
|
||||
|
||||
/**
|
||||
* 新增微信小程序用户
|
||||
*
|
||||
* @param wxUser 微信小程序用户
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWxUser(WxUser wxUser);
|
||||
|
||||
/**
|
||||
* 修改微信小程序用户
|
||||
*
|
||||
* @param wxUser 微信小程序用户
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWxUser(WxUser wxUser);
|
||||
|
||||
/**
|
||||
* 删除微信小程序用户
|
||||
*
|
||||
* @param id 微信小程序用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxUserById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除微信小程序用户
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxUserByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 根据token获取用户信息
|
||||
* @param token
|
||||
* @return
|
||||
*/
|
||||
WxUser selectWxUserByToken(String token);
|
||||
|
||||
WxUser selectWxUserByOpenid(String openid);
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
package com.ruoyi.wx.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ruoyi.wx.domain.MrRecordOrder;
|
||||
import com.ruoyi.wx.dto.RecordOrderDTO;
|
||||
import com.ruoyi.wx.dto.req.OrderListReqDTO;
|
||||
|
||||
/**
|
||||
* 病案申请Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-02-24
|
||||
*/
|
||||
public interface IMrRecordOrderService
|
||||
{
|
||||
/**
|
||||
* 查询病案申请
|
||||
*
|
||||
* @param id 病案申请ID
|
||||
* @return 病案申请
|
||||
*/
|
||||
public MrRecordOrder selectMrRecordOrderById(Long id);
|
||||
|
||||
/**
|
||||
* 查询病案申请列表
|
||||
*
|
||||
* @param mrRecordOrder 病案申请
|
||||
* @return 病案申请集合
|
||||
*/
|
||||
public List<MrRecordOrder> selectMrRecordOrderList(MrRecordOrder mrRecordOrder);
|
||||
|
||||
/**
|
||||
* 新增病案申请
|
||||
*
|
||||
* @param mrRecordOrder 病案申请
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMrRecordOrder(MrRecordOrder mrRecordOrder);
|
||||
|
||||
/**
|
||||
* 修改病案申请
|
||||
*
|
||||
* @param mrRecordOrder 病案申请
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMrRecordOrder(MrRecordOrder mrRecordOrder);
|
||||
|
||||
/**
|
||||
* 批量删除病案申请
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMrRecordOrderByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除病案申请信息
|
||||
*
|
||||
* @param id 病案申请ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMrRecordOrderById(Long id);
|
||||
|
||||
void createOrder(MrRecordOrder order);
|
||||
|
||||
List<RecordOrderDTO> list(OrderListReqDTO orderListReqDTO);
|
||||
|
||||
boolean sendSms(MrRecordOrder mrRecordOrder);
|
||||
|
||||
Map<String,String> getUrlHeaders(String code);
|
||||
|
||||
String randomCode(String url, String filename);
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
package com.ruoyi.wx.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
|
||||
import com.ruoyi.wx.domain.WxUser;
|
||||
import com.ruoyi.wx.dto.WxUserDTO;
|
||||
import com.ruoyi.wx.dto.req.UserSignInfo;
|
||||
|
||||
/**
|
||||
* 微信小程序用户Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-02-24
|
||||
*/
|
||||
public interface IWxUserService
|
||||
{
|
||||
/**
|
||||
* 查询微信小程序用户
|
||||
*
|
||||
* @param id 微信小程序用户ID
|
||||
* @return 微信小程序用户
|
||||
*/
|
||||
public WxUser selectWxUserById(Long id);
|
||||
|
||||
/**
|
||||
* 查询微信小程序用户列表
|
||||
*
|
||||
* @param wxUser 微信小程序用户
|
||||
* @return 微信小程序用户集合
|
||||
*/
|
||||
public List<WxUser> selectWxUserList(WxUser wxUser);
|
||||
|
||||
/**
|
||||
* 新增微信小程序用户
|
||||
*
|
||||
* @param wxUser 微信小程序用户
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWxUser(WxUser wxUser);
|
||||
|
||||
/**
|
||||
* 修改微信小程序用户
|
||||
*
|
||||
* @param wxUser 微信小程序用户
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWxUser(WxUser wxUser);
|
||||
|
||||
/**
|
||||
* 批量删除微信小程序用户
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxUserByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除微信小程序用户信息
|
||||
*
|
||||
* @param id 微信小程序用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxUserById(Long id);
|
||||
|
||||
/**
|
||||
* 根据token获取用户资料
|
||||
* @param token
|
||||
* @return
|
||||
*/
|
||||
WxUser selectWxUserByToken(String token);
|
||||
|
||||
WxUserDTO login(String wxCode);
|
||||
|
||||
void signIn(UserSignInfo userSignInfo);
|
||||
|
||||
WxUserDTO info(UserSignInfo userSignInfo);
|
||||
|
||||
boolean checkUser(Long id);
|
||||
|
||||
boolean triggerStatus(Long id);
|
||||
}
|
@ -0,0 +1,207 @@
|
||||
package com.ruoyi.wx.service.impl;
|
||||
|
||||
import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
|
||||
import cn.binarywang.wx.miniapp.bean.WxMaUserInfo;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.exception.BusinessException;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.bean.BeanUtils;
|
||||
import com.ruoyi.wx.domain.WxUser;
|
||||
import com.ruoyi.wx.dto.WxUserDTO;
|
||||
import com.ruoyi.wx.dto.req.UserSignInfo;
|
||||
import com.ruoyi.wx.mapper.WxUserMapper;
|
||||
import com.ruoyi.wx.service.IWxUserService;
|
||||
import com.ruoyi.wx.util.WxServiceUtils;
|
||||
import com.ruoyi.wx.util.WxUserUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 微信小程序用户Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-02-24
|
||||
*/
|
||||
@Service
|
||||
public class WxUserServiceImpl implements IWxUserService {
|
||||
@Autowired
|
||||
private WxUserMapper wxUserMapper;
|
||||
@Autowired
|
||||
private WxServiceUtils wxServiceUtils;
|
||||
@Autowired
|
||||
private WxUserUtils wxUserUtils;
|
||||
|
||||
/**
|
||||
* 查询微信小程序用户
|
||||
*
|
||||
* @param id 微信小程序用户ID
|
||||
* @return 微信小程序用户
|
||||
*/
|
||||
@Override
|
||||
public WxUser selectWxUserById(Long id) {
|
||||
return wxUserMapper.selectWxUserById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询微信小程序用户列表
|
||||
*
|
||||
* @param wxUser 微信小程序用户
|
||||
* @return 微信小程序用户
|
||||
*/
|
||||
@Override
|
||||
public List<WxUser> selectWxUserList(WxUser wxUser) {
|
||||
return wxUserMapper.selectWxUserList(wxUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增微信小程序用户
|
||||
*
|
||||
* @param wxUser 微信小程序用户
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWxUser(WxUser wxUser) {
|
||||
wxUser.setCreateTime(DateUtils.getNowDate());
|
||||
return wxUserMapper.insertWxUser(wxUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改微信小程序用户
|
||||
*
|
||||
* @param wxUser 微信小程序用户
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWxUser(WxUser wxUser) {
|
||||
wxUser.setUpdateTime(DateUtils.getNowDate());
|
||||
return wxUserMapper.updateWxUser(wxUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除微信小程序用户对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWxUserByIds(String ids) {
|
||||
return wxUserMapper.deleteWxUserByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除微信小程序用户信息
|
||||
*
|
||||
* @param id 微信小程序用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWxUserById(Long id) {
|
||||
return wxUserMapper.deleteWxUserById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxUser selectWxUserByToken(String token) {
|
||||
return wxUserMapper.selectWxUserByToken(token);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxUserDTO login(String wxCode) {
|
||||
WxUserDTO wxUserDTO = new WxUserDTO();
|
||||
WxMaJscode2SessionResult login = wxServiceUtils.login(wxCode);
|
||||
// 根据openid查询用户
|
||||
WxUser wxUser = wxUserMapper.selectWxUserByOpenid(login.getOpenid());
|
||||
|
||||
if (Objects.nonNull(wxUser)) {
|
||||
wxUser.setToken(login.getSessionKey());
|
||||
wxUser.setUpdateTime(new Date());
|
||||
wxUserMapper.updateWxUser(wxUser);
|
||||
} else {
|
||||
wxUser = new WxUser();
|
||||
wxUser.setToken(login.getSessionKey());
|
||||
wxUser.setOpenid(login.getOpenid());
|
||||
wxUser.setStatus(2);
|
||||
wxUser.setFlag(0);
|
||||
wxUser.setCreateTime(new Date());
|
||||
wxUserMapper.insertWxUser(wxUser);
|
||||
}
|
||||
BeanUtils.copyProperties(wxUser, wxUserDTO);
|
||||
return wxUserDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void signIn(UserSignInfo userSignInfo) {
|
||||
WxUserDTO userInfo = wxUserUtils.getUserInfo();
|
||||
|
||||
WxUser wxUser = wxUserMapper.selectWxUserById(userInfo.getId());
|
||||
wxUser.setUpdateTime(new Date());
|
||||
wxUser.setAvatar(userSignInfo.getAvatar());
|
||||
wxUser.setNickname(userSignInfo.getNickName());
|
||||
String gender = "未知";
|
||||
if (StringUtils.equals("1", userSignInfo.getGender())) {
|
||||
gender = "男";
|
||||
} else if (StringUtils.equals("2", userSignInfo.getGender())) {
|
||||
gender = "女";
|
||||
}
|
||||
wxUser.setGender(gender);
|
||||
wxUser.setHospital(userSignInfo.getHospital());
|
||||
wxUser.setName(userSignInfo.getName());
|
||||
wxUser.setPhone(userSignInfo.getPhone());
|
||||
|
||||
wxUser.setStatus(0);
|
||||
|
||||
wxUserMapper.updateWxUser(wxUser);
|
||||
wxUserUtils.clearCache();
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxUserDTO info(UserSignInfo userSignInfo) {
|
||||
WxUserDTO userInfo = wxUserUtils.getUserInfo();
|
||||
|
||||
WxUser wxUser = wxUserMapper.selectWxUserById(userInfo.getId());
|
||||
if (!wxUser.getStatus().equals(userInfo.getStatus()) || !wxUser.getFlag().equals(userInfo.getFlag())) {// 状态变更时更新用户信息
|
||||
wxUser.setUpdateTime(new Date());
|
||||
wxUser.setAvatar(userSignInfo.getAvatar());
|
||||
wxUser.setNickname(userSignInfo.getNickName());
|
||||
String gender = "未知";
|
||||
if (StringUtils.equals("1", userSignInfo.getGender())) {
|
||||
gender = "男";
|
||||
} else if (StringUtils.equals("2", userSignInfo.getGender())) {
|
||||
gender = "女";
|
||||
}
|
||||
wxUser.setGender(gender);
|
||||
|
||||
wxUserMapper.updateWxUser(wxUser);
|
||||
wxUserUtils.clearCache();
|
||||
BeanUtils.copyProperties(wxUser, userInfo);
|
||||
}
|
||||
|
||||
return userInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkUser(Long id) {
|
||||
WxUser wxUser=new WxUser();
|
||||
wxUser.setId(id);
|
||||
wxUser.setFlag(1);
|
||||
updateWxUser(wxUser);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean triggerStatus(Long id) {
|
||||
WxUser wxUser=selectWxUserById(id);
|
||||
if(wxUser.getStatus()==1){
|
||||
wxUser.setStatus(0);
|
||||
updateWxUser(wxUser);
|
||||
}else if(wxUser.getStatus()==0){
|
||||
wxUser.setStatus(1);
|
||||
updateWxUser(wxUser);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.ruoyi.wx.util;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.utils.http.HttpUtils;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
public class ShortUrlUtils {
|
||||
private static final String API_PATH = "http://www.uc4.cn/ajax.php";
|
||||
|
||||
public static String getShortUrl(String url) throws UnsupportedEncodingException {
|
||||
String resp = HttpUtils.sendGet(API_PATH, "act=creat1&url=" + URLEncoder.encode(url, Charset.defaultCharset().displayName()) + "&pattern=1&type=c4icn");
|
||||
JSONObject obj = JSONObject.parseObject(resp);
|
||||
return obj.getString("dwz");
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws UnsupportedEncodingException {
|
||||
System.out.println(getShortUrl("https://wx.docus.cn/profile/upload/2021/03/01/dad2a531-b3bf-4ede-8f41-26d611053c73.zip"));
|
||||
}
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
package com.ruoyi.wx.util;
|
||||
|
||||
import cn.binarywang.wx.miniapp.api.WxMaService;
|
||||
import cn.binarywang.wx.miniapp.api.WxMaUserService;
|
||||
import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl;
|
||||
import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
|
||||
import cn.binarywang.wx.miniapp.bean.WxMaKefuMessage;
|
||||
import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl;
|
||||
import com.ruoyi.common.exception.base.BaseException;
|
||||
import com.ruoyi.common.utils.CacheUtils;
|
||||
import me.chanjar.weixin.common.error.WxErrorException;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.util.Objects;
|
||||
|
||||
@Component
|
||||
public class WxServiceUtils {
|
||||
@Value("${wx.appid}")
|
||||
private String appid;
|
||||
@Value("${wx.appsecret}")
|
||||
private String appsecret;
|
||||
|
||||
private static WxMaService wxMaService;
|
||||
|
||||
private static final String CACHE_NAME ="wx-accessCache";
|
||||
|
||||
@PostConstruct
|
||||
private void init() {
|
||||
WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl();
|
||||
config.setAppid(appid);
|
||||
config.setSecret(appsecret);
|
||||
wxMaService = new WxMaServiceImpl();
|
||||
wxMaService.setWxMaConfig(config);
|
||||
// config.setAccessToken(getAccessToken());
|
||||
}
|
||||
|
||||
// private String getAccessToken(){
|
||||
// Object accessToken = CacheUtils.get(CACHE_NAME, "access_token");
|
||||
// if(Objects.isNull(accessToken)){
|
||||
// try {
|
||||
// accessToken=wxMaService.getAccessToken();
|
||||
// } catch (WxErrorException e) {
|
||||
// return null;
|
||||
// }
|
||||
// CacheUtils.put(CACHE_NAME,"access_token",accessToken);
|
||||
// }
|
||||
// return (String)accessToken;
|
||||
// }
|
||||
|
||||
public WxMaJscode2SessionResult login(String code) {
|
||||
try {
|
||||
return wxMaService.getUserService().getSessionInfo(code);
|
||||
} catch (WxErrorException e) {
|
||||
throw new BaseException("小程序登录失败!" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public WxMaUserService getUserService() {
|
||||
return wxMaService.getUserService();
|
||||
}
|
||||
|
||||
// public static void sendKefuMsg(String content,String openid){
|
||||
// WxMaKefuMessage wxMaKefuMessage=new WxMaKefuMessage();
|
||||
// wxMaKefuMessage.setToUser(openid);
|
||||
// wxMaKefuMessage.setMsgType("text");
|
||||
// WxMaKefuMessage.KfText text=new WxMaKefuMessage.KfText(content);
|
||||
// wxMaKefuMessage.setText(text);
|
||||
// try {
|
||||
// wxMaService.getMsgService().sendKefuMsg(wxMaKefuMessage);
|
||||
// } catch (WxErrorException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.ruoyi.wx.util;
|
||||
|
||||
import com.ruoyi.common.exception.wx.NotLoginException;
|
||||
import com.ruoyi.common.utils.CacheUtils;
|
||||
import com.ruoyi.common.utils.bean.BeanUtils;
|
||||
import com.ruoyi.wx.domain.WxUser;
|
||||
import com.ruoyi.wx.dto.WxUserDTO;
|
||||
import com.ruoyi.wx.service.IWxUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Objects;
|
||||
|
||||
@Component
|
||||
public class WxUserUtils {
|
||||
@Autowired
|
||||
private HttpServletRequest request;
|
||||
@Autowired
|
||||
private IWxUserService wxUserService;
|
||||
private final String cacheName = "wx-userCache";
|
||||
|
||||
private String getToken() {
|
||||
return request.getHeader("token");
|
||||
}
|
||||
|
||||
public WxUserDTO getUserInfo() {
|
||||
String token = getToken();
|
||||
Object userCache = CacheUtils.get(cacheName, "wx-token:" + token);
|
||||
if (Objects.nonNull(userCache)) {
|
||||
return (WxUserDTO) userCache;
|
||||
} else {
|
||||
WxUser wxUser = wxUserService.selectWxUserByToken(getToken());
|
||||
if (Objects.nonNull(wxUser)) {
|
||||
WxUserDTO wxUserDTO = new WxUserDTO();
|
||||
BeanUtils.copyProperties(wxUser, wxUserDTO);
|
||||
CacheUtils.put(cacheName, "wx-token:" + token, wxUserDTO);
|
||||
return wxUserDTO;
|
||||
} else {
|
||||
throw new NotLoginException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void clearCache() {
|
||||
CacheUtils.remove(cacheName, "wx-token:" + getToken());
|
||||
}
|
||||
}
|
@ -0,0 +1,149 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.wx.mapper.MrRecordOrderMapper">
|
||||
|
||||
<resultMap type="MrRecordOrder" id="MrRecordOrderResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="type" column="type" />
|
||||
<result property="mrNumber" column="mr_number" />
|
||||
<result property="patientName" column="patient_name" />
|
||||
<result property="dischargeDate" column="discharge_date" />
|
||||
<result property="times" column="times" />
|
||||
<result property="applicantId" column="applicant_id" />
|
||||
<result property="hospital" column="hospital" />
|
||||
<result property="address" column="address" />
|
||||
<result property="downloadUrl" column="download_url" />
|
||||
<result property="unzipPwd" column="unzip_pwd" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delivery" column="delivery"/>
|
||||
<result property="trackingNumber" column="tracking_number"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMrRecordOrderVo">
|
||||
select id, type, mr_number, patient_name, delivery, tracking_number, discharge_date, times, applicant_id, hospital, address, download_url, unzip_pwd, status, create_time, update_time from mr_record_order
|
||||
</sql>
|
||||
|
||||
<select id="selectMrRecordOrderList" parameterType="MrRecordOrder" resultMap="MrRecordOrderResult">
|
||||
<include refid="selectMrRecordOrderVo"/>
|
||||
<where>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
<if test="mrNumber != null and mrNumber != ''"> and mr_number = #{mrNumber}</if>
|
||||
<if test="patientName != null and patientName != ''"> and patient_name like concat('%', #{patientName}, '%')</if>
|
||||
<if test="dischargeDate != null "> and discharge_date = #{dischargeDate}</if>
|
||||
<if test="times != null "> and times = #{times}</if>
|
||||
<if test="applicantId != null "> and applicant_id = #{applicantId}</if>
|
||||
<if test="hospital != null and hospital != ''"> and hospital = #{hospital}</if>
|
||||
<if test="address != null and address != ''"> and address = #{address}</if>
|
||||
<if test="downloadUrl != null and downloadUrl != ''"> and download_url = #{downloadUrl}</if>
|
||||
<if test="unzipPwd != null and unzipPwd != ''"> and unzip_pwd = #{unzipPwd}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="delivery!=null and delivery != ''">and delivery like concat('%',#{delivery},'%')</if>
|
||||
<if test="trackingNumber!=null and trackingNumber != ''">and tracking_number like concat('%',#{trackingNumber},'%')</if>
|
||||
</where>
|
||||
order by `status`,create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="searchList" resultType="com.ruoyi.wx.dto.RecordOrderDTO">
|
||||
select o.id,if(o.type=0,'原件寄回','电子扫描件') type,o.mr_number mrNumber,o.patient_name patientName,o.discharge_date dischargeDate,o.times,o.hospital,o.address,if(o.`status`=0,'申请中','已完成') status,o.download_url downUrl
|
||||
from mr_record_order o
|
||||
where o.applicant_id = #{userId}
|
||||
<if test="keyword!=null and keyword!=''">
|
||||
and (o.mr_number like CONCAT('%',#{keyword},'%') or o.patient_name like CONCAT('%',#{keyword},'%'))
|
||||
</if>
|
||||
<if test="status !=null">
|
||||
and o.status = #{status}
|
||||
</if>
|
||||
order by o.`status`,o.create_time DESC
|
||||
limit ${startRow},${endRow}
|
||||
</select>
|
||||
|
||||
<select id="selectMrRecordOrderById" parameterType="Long" resultMap="MrRecordOrderResult">
|
||||
<include refid="selectMrRecordOrderVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertMrRecordOrder" parameterType="MrRecordOrder" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into mr_record_order
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="type != null">type,</if>
|
||||
<if test="mrNumber != null and mrNumber != ''">mr_number,</if>
|
||||
<if test="patientName != null and patientName != ''">patient_name,</if>
|
||||
<if test="dischargeDate != null">discharge_date,</if>
|
||||
<if test="times != null">times,</if>
|
||||
<if test="applicantId != null">applicant_id,</if>
|
||||
<if test="hospital != null and hospital != ''">hospital,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="downloadUrl != null">download_url,</if>
|
||||
<if test="unzipPwd != null">unzip_pwd,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delivery!=null and delivery != ''">delivery,</if>
|
||||
<if test="trackingNumber!=null and trackingNumber != ''">tracking_number,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="mrNumber != null and mrNumber != ''">#{mrNumber},</if>
|
||||
<if test="patientName != null and patientName != ''">#{patientName},</if>
|
||||
<if test="dischargeDate != null">#{dischargeDate},</if>
|
||||
<if test="times != null">#{times},</if>
|
||||
<if test="applicantId != null">#{applicantId},</if>
|
||||
<if test="hospital != null and hospital != ''">#{hospital},</if>
|
||||
<if test="address != null">#{address},</if>
|
||||
<if test="downloadUrl != null">#{downloadUrl},</if>
|
||||
<if test="unzipPwd != null">#{unzipPwd},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delivery!=null and delivery != ''">#{delivery},</if>
|
||||
<if test="trackingNumber!=null and trackingNumber != ''">#{trackingNumber}</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMrRecordOrder" parameterType="MrRecordOrder">
|
||||
update mr_record_order
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="mrNumber != null and mrNumber != ''">mr_number = #{mrNumber},</if>
|
||||
<if test="patientName != null and patientName != ''">patient_name = #{patientName},</if>
|
||||
<if test="dischargeDate != null">discharge_date = #{dischargeDate},</if>
|
||||
<if test="times != null">times = #{times},</if>
|
||||
<if test="applicantId != null">applicant_id = #{applicantId},</if>
|
||||
<if test="hospital != null and hospital != ''">hospital = #{hospital},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="downloadUrl != null">download_url = #{downloadUrl},</if>
|
||||
<if test="unzipPwd != null">unzip_pwd = #{unzipPwd},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delivery!=null and delivery != ''">delivery = #{delivery},</if>
|
||||
<if test="trackingNumber!=null and trackingNumber != ''">tracking_number = #{trackingNumber},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMrRecordOrderById" parameterType="Long">
|
||||
delete from mr_record_order where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMrRecordOrderByIds" parameterType="String">
|
||||
delete from mr_record_order where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
|
||||
<select id="getUrlHeaders" resultType="map">
|
||||
select url,headers from code_url where code=#{code}
|
||||
</select>
|
||||
<insert id="saveCodeUrl">
|
||||
insert into code_url (code,url,headers)values(#{code},#{url},#{headers})
|
||||
</insert>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.wx.mapper.WxUserMapper">
|
||||
|
||||
<resultMap type="WxUser" id="WxUserResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="openid" column="openid" />
|
||||
<result property="status" column="status" />
|
||||
<result property="flag" column="flag" />
|
||||
<result property="hospital" column="hospital" />
|
||||
<result property="address" column="address" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="nickname" column="nickname" />
|
||||
<result property="avatar" column="avatar" />
|
||||
<result property="token" column="token" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWxUserVo">
|
||||
select id, name, phone, openid, status, flag, hospital, address, create_time, update_time, nickname, avatar, token from wx_user
|
||||
</sql>
|
||||
|
||||
<select id="selectWxUserList" parameterType="WxUser" resultMap="WxUserResult">
|
||||
<include refid="selectWxUserVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="phone != null and phone != ''"> and phone like concat(#{phone}, '%')</if>
|
||||
<if test="openid != null "> and openid = #{openid}</if>
|
||||
<if test="status != null"> and status = #{status}</if>
|
||||
<if test="flag != null"> and flag = #{flag}</if>
|
||||
<if test="hospital != null and hospital != ''"> and hospital = #{hospital}</if>
|
||||
<if test="address != null and address != ''"> and address = #{address}</if>
|
||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||
<if test="nickname != null and nickname != ''"> and nickname like concat('%', #{nickname}, '%')</if>
|
||||
<if test="avatar != null and avatar != ''"> and avatar = #{avatar}</if>
|
||||
<if test="token != null and token != ''"> and token = #{token}</if>
|
||||
</where>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
<select id="selectWxUserById" parameterType="Long" resultMap="WxUserResult">
|
||||
<include refid="selectWxUserVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectWxUserByToken" parameterType="String" resultMap="WxUserResult">
|
||||
<include refid="selectWxUserVo"/>
|
||||
where token = #{token}
|
||||
</select>
|
||||
|
||||
<select id="selectWxUserByOpenid" parameterType="String" resultMap="WxUserResult">
|
||||
<include refid="selectWxUserVo"/>
|
||||
where openid = #{openid}
|
||||
</select>
|
||||
|
||||
<insert id="insertWxUser" parameterType="WxUser" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into wx_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="openid != null">openid,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="flag != null">flag,</if>
|
||||
<if test="hospital != null">hospital,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="nickname != null">nickname,</if>
|
||||
<if test="avatar != null">avatar,</if>
|
||||
<if test="token != null">token,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="openid != null">#{openid},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="flag != null">#{flag},</if>
|
||||
<if test="hospital != null">#{hospital},</if>
|
||||
<if test="address != null">#{address},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="nickname != null">#{nickname},</if>
|
||||
<if test="avatar != null">#{avatar},</if>
|
||||
<if test="token != null">#{token},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWxUser" parameterType="WxUser">
|
||||
update wx_user
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="openid != null">openid = #{openid},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="flag != null">flag = #{flag},</if>
|
||||
<if test="hospital != null">hospital = #{hospital},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="nickname != null">nickname = #{nickname},</if>
|
||||
<if test="avatar != null">avatar = #{avatar},</if>
|
||||
<if test="token != null">token = #{token},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWxUserById" parameterType="Long">
|
||||
delete from wx_user where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWxUserByIds" parameterType="String">
|
||||
delete from wx_user where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,135 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增病案申请')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-order-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">申请类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="type" class="form-control m-b" th:with="type=${@dict.getType('mr_record_order_type')}" required>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">病案号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="mrNumber" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">患者姓名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="patientName" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">出院日期:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="dischargeDate" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">住院次数:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="times" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">申请人:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="applicantId" id="baidu">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
||||
</ul>
|
||||
</div>
|
||||
<!-- /btn-group -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">医院名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="hospital" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group order-type1">
|
||||
<label class="col-sm-3 control-label">寄送地址:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="address" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group order-type2">
|
||||
<label class="col-sm-3 control-label">下载地址:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="downloadUrl" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group order-type2">
|
||||
<label class="col-sm-3 control-label">解压密码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="unzipPwd" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">申请状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('mr_record_order_status')}">
|
||||
<input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
|
||||
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<th:block th:include="include :: bootstrap-suggest-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "wx/order"
|
||||
$("#form-order-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-order-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='dischargeDate']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
//百度搜索测试
|
||||
var testBsSuggest = $("#baidu").bsSuggest({
|
||||
url: ctx + "demo/form/userModel?t="+(new Date()).getTime()+"&keyword=",
|
||||
allowNoKeyword: false, //是否允许无关键字时请求数据
|
||||
getDataMethod: "url", //获取数据的方式,总是从 URL 获取
|
||||
showBtn: false,
|
||||
idField: "userId",
|
||||
keyField: "userName"
|
||||
}).on('onDataRequestSuccess', function (e, result) {
|
||||
console.log('onDataRequestSuccess: ', result);
|
||||
}).on('onSetSelectValue', function (e, keyword) {
|
||||
console.log('onSetSelectValue: ', keyword);
|
||||
}).on('onUnsetSelectValue', function (e) {
|
||||
console.log("onUnsetSelectValue");
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,81 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改病案申请')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-order-edit" th:object="${mrRecordOrder}">
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">申请类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="type" class="form-control m-b" th:with="type=${@dict.getType('mr_record_order_type')}" required>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{type}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">病案号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="mrNumber" th:field="*{mrNumber}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">患者姓名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="patientName" th:field="*{patientName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">出院日期:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="dischargeDate" th:value="${#dates.format(mrRecordOrder.dischargeDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">住院次数:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="times" th:field="*{times}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">医院名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="hospital" th:field="*{hospital}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">寄送地址:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="address" th:field="*{address}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "wx/order";
|
||||
$("#form-order-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-order-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='dischargeDate']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,171 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('病案申请列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>医院名称:</label>
|
||||
<input type="text" name="hospital"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>病案号:</label>
|
||||
<input type="text" name="mrNumber"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>患者姓名:</label>
|
||||
<input type="text" name="patientName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>出院日期:</label>
|
||||
<input type="text" class="time-input" placeholder="请选择出院日期" name="dischargeDate"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>申请类型:</label>
|
||||
<select name="type" th:with="type=${@dict.getType('mr_record_order_type')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>申请状态:</label>
|
||||
<select name="status" th:with="type=${@dict.getType('mr_record_order_status')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="wx:order:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="wx:order:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="wx:order:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('wx:order:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('wx:order:remove')}]];
|
||||
var typeDatas = [[${@dict.getType('mr_record_order_type')}]];
|
||||
var statusDatas = [[${@dict.getType('mr_record_order_status')}]];
|
||||
var prefix = ctx + "wx/order";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "病案申请",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
title: '主键',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'mrNumber',
|
||||
title: '病案号'
|
||||
},
|
||||
{
|
||||
field: 'patientName',
|
||||
title: '患者姓名'
|
||||
},
|
||||
{
|
||||
field: 'dischargeDate',
|
||||
title: '出院日期'
|
||||
},
|
||||
{
|
||||
field: 'times',
|
||||
title: '住院次数'
|
||||
},
|
||||
{
|
||||
field: 'applicantId',
|
||||
title: '申请人'
|
||||
},
|
||||
{
|
||||
field: 'hospital',
|
||||
title: '医院名称'
|
||||
},
|
||||
{
|
||||
field: 'type',
|
||||
title: '申请类型',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(typeDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'address',
|
||||
title: '寄送地址'
|
||||
},
|
||||
{
|
||||
field: 'delivery',
|
||||
title: '快递公司'
|
||||
},
|
||||
{
|
||||
field: 'trackingNumber',
|
||||
title: '运单号'
|
||||
},
|
||||
{
|
||||
field: 'downloadUrl',
|
||||
title: '下载地址'
|
||||
},
|
||||
{
|
||||
field: 'unzipPwd',
|
||||
title: '解压密码'
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '申请状态',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(statusDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
if(row.status===0){
|
||||
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="sendView(\'' + row.id + '\',\'' + row.mrNumber + '\')"><i class="fa fa-paper-plane"></i>处理</a> ');
|
||||
}
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
function sendView(id,mrNumber){
|
||||
$.modal.open("处理病案【" + mrNumber+"】", prefix+"/sendView/"+id);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('处理申请')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-order-edit" th:object="${mrRecordOrder}">
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<input name="type" th:field="*{type}" type="hidden">
|
||||
<div class="form-group" th:if="*{type} eq 1">
|
||||
<label class="col-sm-3 control-label is-required">下载地址:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="downloadUrl" th:field="*{downloadUrl}" class="form-control" type="text" readonly id="downloadUrl">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" th:if="*{type} eq 1">
|
||||
<label class="col-sm-3 font-noraml control-label is-required">上传文件:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="file col-sm-8" type="file" id="fileinput" accept=".rar,.zip">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" th:if="*{type} eq 1">
|
||||
<label class="col-sm-3 control-label">解压密码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="unzipPwd" class="form-control" type="text" th:value="${randomCode}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" th:if="*{type} eq 0">
|
||||
<label class="col-sm-3 control-label is-required">快递公司:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="delivery" th:field="*{delivery}" class="form-control" type="text" required value="顺丰">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" th:if="*{type} eq 0">
|
||||
<label class="col-sm-3 control-label is-required">运单号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="trackingNumber" th:field="*{trackingNumber}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "wx/order";
|
||||
$("#form-order-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/sendSms", $('#form-order-edit').serialize());
|
||||
}
|
||||
}
|
||||
$("#fileinput").fileinput({
|
||||
'theme': 'explorer-fas',
|
||||
'uploadUrl': prefix+'/upload',
|
||||
'showPreview': false
|
||||
});
|
||||
$("#fileinput").on("fileuploaded", function(event, data, proviewId, index) {
|
||||
$("#downloadUrl").val(data.response.data)
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改微信小程序用户')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-user-edit" th:object="${wxUser}">
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">用户姓名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="name" th:field="*{name}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">手机号码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="phone" th:field="*{phone}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">医院名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="hospital" th:field="*{hospital}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "wx/user";
|
||||
$("#form-user-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-user-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,159 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('微信小程序用户列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>医院名称:</label>
|
||||
<input type="text" name="hospital"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>用户姓名:</label>
|
||||
<input type="text" name="name"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>手机号码:</label>
|
||||
<input type="text" name="phone"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>用户状态:</label>
|
||||
<select name="status" th:with="type=${@dict.getType('wx_user_status')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>审核状态:</label>
|
||||
<select name="flag" th:with="type=${@dict.getType('wx_user_flag')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="wx:user:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('wx:user:edit')}]];
|
||||
var statusDatas = [[${@dict.getType('wx_user_status')}]];
|
||||
var flagDatas = [[${@dict.getType('wx_user_flag')}]];
|
||||
var prefix = ctx + "wx/user";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "微信小程序用户",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
title: '主键',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'name',
|
||||
title: '用户姓名'
|
||||
},
|
||||
{
|
||||
field: 'phone',
|
||||
title: '手机号码'
|
||||
},
|
||||
{
|
||||
field: 'nickname',
|
||||
title: '微信昵称'
|
||||
},
|
||||
{
|
||||
field: 'avatar',
|
||||
title: '微信头像',
|
||||
formatter: function(value, row, index) {
|
||||
return value?'<img src='+value+' style="max-width:25px">':'-';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'hospital',
|
||||
title: '医院名称'
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '用户状态',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(statusDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'flag',
|
||||
title: '审核状态',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(flagDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
if(row.status===0&&row.flag===0){
|
||||
actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="singIn(\'' + row.id + '\')"><i class="fa fa-check-square-o"></i>审核</a> ');
|
||||
}
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
let disBtn='停用',disCls='btn-danger';
|
||||
if(row.status===1){
|
||||
disBtn='启用';
|
||||
disCls='btn-primary';
|
||||
}
|
||||
actions.push('<a class="btn '+disCls+' btn-xs" href="javascript:void(0)" onclick="triggerDis(\'' + row.id + '\','+row.status+')"><i class="fa fa-smile-o"></i>'+disBtn+'</a> ');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
function singIn(userId){
|
||||
$.modal.confirm('是否审核通过',function(){
|
||||
$.operate.post(prefix+'/checkUser',{id:userId},function(){
|
||||
$.table.refresh();
|
||||
});
|
||||
})
|
||||
}
|
||||
function triggerDis(userId,userStatus){
|
||||
let tips='确认停用用户吗';
|
||||
if(userStatus === 1){
|
||||
tips='确认启用用户吗';
|
||||
}
|
||||
$.modal.confirm(tips,function(){
|
||||
$.operate.post(prefix+'/triggerStatus',{id:userId},function(){
|
||||
$.table.refresh();
|
||||
});
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue