Browse Source

new dtp管理 新增

wangshuangpan 5 months ago
parent
commit
9ade8f01a7

+ 57 - 0
health-admin/src/main/java/com/bzd/web/controller/DTP/RecipeRegisterController.java

@@ -0,0 +1,57 @@
+package com.bzd.web.controller.DTP;
+
+import com.bzd.common.annotation.Log;
+import com.bzd.common.config.dao.PageData;
+import com.bzd.common.core.controller.BaseController;
+import com.bzd.common.core.domain.AjaxResult;
+import com.bzd.common.core.page.TableDataInfo;
+import com.bzd.common.enums.BusinessType;
+import com.bzd.system.service.DTPService;
+import com.bzd.system.service.IServerGService;
+import com.bzd.system.service.ServerService;
+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.*;
+
+import java.util.List;
+
+
+
+/**
+ * 处方登记管理
+ * creator wsp
+ */
+@Controller
+@RequestMapping("/dtp/RecipeRegister")
+public class RecipeRegisterController extends BaseController {
+
+    private String prefix = "dtp/RecipeRegister";
+
+    @Autowired
+    private DTPService dtpService;
+
+
+    @RequiresPermissions("dtp:RecipeRegister:view")
+    @GetMapping()
+    public String user()
+    {
+        return prefix + "/RecipeRegister";
+    }
+/**
+ *
+ * 处方登记查询
+ */
+    @RequiresPermissions("dtp:RecipeRegister:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list() throws Exception {
+        PageData pd = this.getPageData();
+
+        startPage();
+        return  null;
+    }
+
+
+}

+ 104 - 0
health-admin/src/main/resources/templates/DTP/add.html

@@ -0,0 +1,104 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+	<th:block th:include="include :: header('新增')" />
+	<th:block th:include="include :: select2-css" />
+</head>
+<body>
+    <div class="main-content">
+        <form id="form-user-add" class="form-horizontal">
+            <input name="deptId" type="hidden" id="treeId"/>
+            <h4 class="form-header h4">基本信息</h4>
+            <div class="row">
+            	<div class="col-sm-12">
+                    <div class="form-group">
+                        <!--is-required 增加星号 显示为必填-->
+                        <!--<label class="col-sm-4 control-label is-required">服务类型编号:</label>-->
+                        <label class="col-sm-4 control-label">服务类型编号:</label>
+                        <div class="col-sm-6">
+                            <div class="input-group">
+                                <input name="serviceTypeNumber" placeholder="请输入服务类型编号" class="form-control" type="text" required maxlength="11">
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="col-sm-12">
+                    <div class="form-group">
+                        <label class="col-sm-4 control-label">服务类型名称:</label>
+                        <div class="col-sm-6">
+                            <div class="input-group">
+                                <input name="serviceTypeName" id="serviceTypeName" type="text" placeholder="请输入服务类型名称" class="form-control" maxlength="11">
+                            </div>
+                                <!--<div class="input-group">
+
+                            	<input name="deptName" onclick="selectDeptTree()" id="treeName" type="text" placeholder="请输入服务类型名称" class="form-control" maxlength="11">
+                                &lt;!&ndash;<span class="input-group-addon"><i class="fa fa-search"></i></span>&ndash;&gt;
+                            </div>-->
+                        </div>
+                    </div>
+                </div>
+                <div class="col-sm-12">
+                    <div class="form-group">
+                        <label class="col-sm-4 control-label">服务类型描述:</label>
+                        <div class="col-sm-6">
+                            <div class="input-group">
+                                <input id="serviceTypeDescription" name="serviceTypeDescription" placeholder="请输入服务类型描述" class="form-control" type="text" maxlength="11">
+                                <!--<span class="input-group-addon"><i class="fa fa-mobile"></i></span>-->
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="col-sm-12">
+                    <div class="form-group">
+                        <label class="col-sm-4 control-label">履约方:</label>
+                        <div class="col-sm-6">
+                            <div class="input-group">
+                                <input id="fulfillmentParty" name="fulfillmentParty" class="form-control " type="text" maxlength="50" placeholder="请输入履约方">
+                                <!--<span class="input-group-addon"><i class="fa fa-envelope"></i></span>-->
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+
+        </form>
+    </div>
+
+    <div class="row">
+        <div class="col-sm-offset-5 col-sm-10">
+            <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
+            <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
+        </div>
+    </div>
+	<th:block th:include="include :: footer" />
+	<th:block th:include="include :: select2-js" />
+	<script>
+	    var prefix = ctx + "server/serv";
+
+
+        function submitHandler() {
+        	var chrtype = [[${#strings.defaultString(@config.getKey('sys.account.chrtype'), 0)}]];
+			var password = $("#password").val();
+	        if ($.validate.form() && checkpwd(chrtype, password)) {
+	        	var data = $("#form-user-add").serializeArray();
+	        	/*var status = $("input[id='status']").is(':checked') == true ? 0 : 1;
+	        	var roleIds = $.form.selectCheckeds("role");
+	        	var postIds = $.form.selectSelects("post");
+	        	data.push({"name": "status", "value": status});
+	        	data.push({"name": "roleIds", "value": roleIds});
+	        	data.push({"name": "postIds", "value": postIds});*/
+	        	$.operate.saveTab(prefix + "/add", data);
+	        }
+	    }
+
+        /*
+		function doSubmit(index, layero){
+			var body = $.modal.getChildFrame(index);
+   			$("#treeId").val(body.find('#treeId').val());
+   			$("#treeName").val(body.find('#treeName').val());
+   			$.modal.close(index);
+		}*/
+
+    </script>
+</body>
+</html>

+ 80 - 0
health-admin/src/main/resources/templates/DTP/edit.html

@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('服务详细')" />
+</head>
+<body>
+    <div class="main-content">
+        <form class="form-horizontal" id="form-server-edit" th:object="${server}">
+            <h4 class="form-header h4">基本信息</h4>
+            <input type="hidden" id="serviceId" name="serviceId" th:value="${serviceId}">
+            <div class="row">
+                <div class="col-sm-12">
+                    <div class="form-group">
+                        <!--is-required 增加星号 显示为必填-->
+                        <label class="col-sm-5 control-label">服务类型编号:</label>
+                        <div class="col-sm-4" >
+                            <div class="input-group">
+                                <input name="serviceTypeNumber" placeholder="请输入服务类型编号" class="form-control" type="text" maxlength="30" th:value="${serviceTypeNumber}" required>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="col-sm-12">
+                    <div class="form-group">
+                        <label class="col-sm-5 control-label">服务类型名称:</label>
+                        <div class="col-sm-4">
+                            <div class="input-group">
+                                <input name="serviceTypeName" placeholder="请输入服务类型名称" class="form-control" type="text" maxlength="30" th:value="${serviceTypeName}" required>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="col-sm-12">
+                    <div class="form-group">
+                        <label class="col-sm-5 control-label">服务类型描述:</label>
+                        <div class="col-sm-4">
+                            <div class="input-group">
+                                <input name="serviceTypeDescription" placeholder="请输入服务类型描述" class="form-control" type="text" maxlength="30" th:value="${serviceTypeDescription}" required>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="col-sm-12">
+                    <div class="form-group">
+                        <label class="col-sm-5 control-label">履约方:</label>
+                        <div class="col-sm-4">
+                            <div class="input-group">
+                                <input name="fulfillmentParty" placeholder="履约方" class="form-control" type="text" maxlength="30" th:value="${fulfillmentParty}" required>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+    <div class="main-content">
+        <div class="col-sm-offset-5 col-sm-10">
+            <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
+            <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
+        </div>
+    </div>
+	<th:block th:include="include :: footer" />
+</body>
+</html>
+
+<script>
+    function submitHandler() {
+        var prefix = ctx + "server/serv";
+        if ($.validate.form()) {
+            var data = $("#form-server-edit").serializeArray();
+            /*var status = $("input[id='status']").is(':checked') == true ? 0 : 1;
+            var roleIds = $.form.selectCheckeds("role");
+            var postIds = $.form.selectSelects("post");
+            data.push({"name": "status", "value": status});
+            data.push({"name": "roleIds", "value": roleIds});
+            data.push({"name": "postIds", "value": postIds});*/
+            $.operate.saveTab(prefix + "/edit", data);
+        }
+    }
+</script>

+ 260 - 0
health-admin/src/main/resources/templates/DTP/serv.html

@@ -0,0 +1,260 @@
+<!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('服务列表')" />
+	<th:block th:include="include :: layout-latest-css" />
+	<th:block th:include="include :: ztree-css" />
+</head>
+<body class="gray-bg">
+
+	<div class="ui-layout-center">
+		<div class="container-div">
+			<div class="row">
+				<div class="col-sm-12 search-collapse">
+					<form id="user-form">
+						<input type="hidden" id="deptId" name="deptId">
+		                <input type="hidden" id="parentId" name="parentId">
+						<div class="select-list">
+							<ul>
+								<li>
+									服务编号:<input type="text" name="serviceTypeNumber"/>
+								</li>
+								<li>
+									服务名称:<input type="text" name="serviceTypeName"/>
+								</li>
+								<!--li>
+									用户状态:<select name="status" th:with="type=${@dict.getType('sys_normal_disable')}">
+										<option value="">所有</option>
+										<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+									</select>
+								</li>
+								<li class="select-time">
+									<label>创建时间: </label>
+									<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
+									<span>-</span>
+									<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
+								</li>-->
+								<li>
+									<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+								    <a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+								</li>
+							</ul>
+						</div>
+					</form>
+				</div>
+
+		        <div class="btn-group-sm" id="toolbar" role="group">
+		        	<a class="btn btn-success" onclick="$.operate.addTab()" shiro:hasPermission="system:user:add">
+		                <i class="fa fa-plus"></i> 新增
+		            </a>
+		             <a class="btn btn-primary single disabled" onclick="$.operate.editTab()" shiro:hasPermission="system:user:edit">
+			            <i class="fa fa-edit"></i> 修改
+			        </a>
+		            <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:user:remove">
+		                <i class="fa fa-remove"></i> 删除
+		            </a>
+		            <a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="system:user:import">
+			            <i class="fa fa-upload"></i> 导入
+			        </a>
+		            <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system: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>
+	</div>
+
+	<th:block th:include="include :: footer" />
+	<th:block th:include="include :: layout-latest-js" />
+	<th:block th:include="include :: ztree-js" />
+	<script th:inline="javascript">
+		var editFlag = [[${@permission.hasPermi('system:user:edit')}]];
+		var removeFlag = [[${@permission.hasPermi('system:user:remove')}]];
+		var resetPwdFlag = [[${@permission.hasPermi('system:user:resetPwd')}]];
+		var prefix = ctx + "server/serv";
+
+		$(function() {
+		    var panehHidden = false;
+		    if ($(this).width() < 1590) {
+		        panehHidden = true;
+		    }
+		    $('body').layout({ initClosed: panehHidden, west__size: 185, resizeWithWindow: false });
+	     	// 回到顶部绑定
+	    	if ($.fn.toTop !== undefined) {
+	    		var opt = {
+	    			win:$('.ui-layout-center'),
+	    			doc:$('.ui-layout-center')
+	    		};
+	    		$('#scroll-up').toTop(opt);
+	    	}
+		    queryUserList();
+		    queryDeptTree();
+		});
+
+		function queryUserList() {
+		    var options = {
+		        url: prefix + "/list",
+		        viewUrl: prefix + "/view/{id}",
+		        createUrl: prefix + "/add",
+		        updateUrl: prefix + "/edit/{id}",
+		        removeUrl: prefix + "/remove",
+		        exportUrl: prefix + "/export",
+		        importUrl: prefix + "/importData",
+		        importTemplateUrl: prefix + "/importTemplate",
+		        sortName: "createTime",
+		        sortOrder: "desc",
+		        modalName: "服务",
+		        columns: [{
+		            checkbox: true
+		        },
+		        {
+		            field: 'serviceTypeNumber',
+		            title: '服务类型编号'
+		        },
+		        {
+		            field: 'serviceTypeName',
+		            title: '服务类型名称'
+		        },
+		        {
+		            field: 'serviceTypeDescription',
+		            title: '服务类型描述'
+		        },
+		        {
+		            field: 'fulfillmentParty',
+		            title: '履约方'
+		        },
+		        /*{
+		        	visible: editFlag == 'hidden' ? false : true,
+		        	title: '用户状态',
+		        	align: 'center',
+		        	formatter: function (value, row, index) {
+		        		return statusTools(row);
+		        	}
+		        },*/
+
+		        {
+		            title: '操作',
+		            align: 'center',
+		            formatter: function(value, row, index) {
+		                if (row.serviceId != 1) {
+		                	var actions = [];
+			                actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.editTab(\'' + row.serviceId + '\')"><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.serviceId + '\')"><i class="fa fa-remove"></i>删除</a> ');
+			                var more = [];
+			                /*more.push("<a class='btn btn-default btn-xs " + resetPwdFlag + "' href='javascript:void(0)' onclick='resetPwd(" + row.userId + ")'><i class='fa fa-key'></i>重置密码</a> ");
+			                more.push("<a class='btn btn-default btn-xs " + editFlag + "' href='javascript:void(0)' onclick='authRole(" + row.userId + ")'><i class='fa fa-check-square-o'></i>分配角色</a>");
+			                actions.push('<a tabindex="0" class="btn btn-info btn-xs" role="button" data-container="body" data-placement="left" data-toggle="popover" data-html="true" data-trigger="hover" data-content="' + more.join('') + '"><i class="fa fa-chevron-circle-right"></i>更多操作</a>');*/
+			                return actions.join('');
+		            	} else {
+		                    return "";
+		                }
+		            }
+		        }]
+		    };
+		    $.table.init(options);
+		}
+
+		function queryDeptTree()
+		{
+			var url = ctx + "system/user/deptTreeData";
+			var options = {
+		        url: url,
+		        expandLevel: 2,
+		        onClick : zOnClick
+		    };
+			$.tree.init(options);
+
+			function zOnClick(event, treeId, treeNode) {
+				$("#deptId").val(treeNode.id);
+				$("#parentId").val(treeNode.pId);
+				$.table.search();
+			}
+		}
+
+		$('#btnExpand').click(function() {
+			$._tree.expandAll(true);
+		    $(this).hide();
+		    $('#btnCollapse').show();
+		});
+
+		$('#btnCollapse').click(function() {
+			$._tree.expandAll(false);
+		    $(this).hide();
+		    $('#btnExpand').show();
+		});
+
+		$('#btnRefresh').click(function() {
+			queryDeptTree();
+		});
+		/* 自定义重置-表单重置/隐藏框/树节点选择色/搜索 */
+		function resetPre() {
+			resetDate();
+			$("#user-form")[0].reset();
+			$("#deptId").val("");
+			$("#parentId").val("");
+			$(".curSelectedNode").removeClass("curSelectedNode");
+			$.table.search();
+		}
+
+		/* 用户管理-部门 */
+		function dept() {
+			var url = ctx + "system/dept";
+			$.modal.openTab("部门管理", url);
+		}
+
+		/* 用户管理-重置密码 */
+		function resetPwd(userId) {
+		    var url = prefix + '/resetPwd/' + userId;
+		    $.modal.open("重置密码", url, '800', '300');
+		}
+
+		/* 用户管理-分配角色 */
+		function authRole(userId) {
+		    var url = prefix + '/authRole/' + userId;
+		    $.modal.openTab("用户分配角色", url);
+		}
+
+		/* 用户状态显示 */
+		function statusTools(row) {
+		    if (row.status == 1) {
+    			return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enable(\'' + row.userId + '\')"></i> ';
+    		} else {
+    			return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.userId + '\')"></i> ';
+    		}
+		}
+
+		/* 用户管理-停用 */
+		function disable(userId) {
+			$.modal.confirm("确认要停用用户吗?", function() {
+				$.operate.post(prefix + "/changeStatus", { "userId": userId, "status": 1 });
+		    })
+		}
+
+		/* 用户管理启用 */
+		function enable(userId) {
+			$.modal.confirm("确认要启用用户吗?", function() {
+				$.operate.post(prefix + "/changeStatus", { "userId": userId, "status": 0 });
+		    })
+		}
+	</script>
+</body>
+<!-- 导入区域 -->
+<!--<script id="importTpl" type="text/template">
+<form enctype="multipart/form-data" class="mt20 mb10">
+	<div class="col-xs-offset-1">
+		<input type="file" id="file" name="file"/>
+		<div class="mt10 pt5">
+			<input type="checkbox" id="updateSupport" name="updateSupport" title="如果登录账户已经存在,更新这条数据。"> 是否更新已经存在的用户数据
+			 &nbsp;	<a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
+		</div>
+		<font color="red" class="pull-left mt10">
+			提示:仅允许导入“xls”或“xlsx”格式文件!
+		</font>
+	</div>
+</form>
+</script>-->
+</html>

+ 11 - 0
health-system/src/main/java/com/bzd/system/mapper/DTPMapper.java

@@ -0,0 +1,11 @@
+package com.bzd.system.mapper;
+/**
+ * 处方登记 数据层
+ *
+ * @author LiXiagnFei
+ */
+public interface DTPMapper {
+
+
+
+}

+ 18 - 0
health-system/src/main/java/com/bzd/system/service/DTPService.java

@@ -0,0 +1,18 @@
+package com.bzd.system.service;
+
+import com.bzd.common.config.dao.DaoBase;
+import com.bzd.common.config.dao.DaoSupport;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+@Service
+public class DTPService {
+    @Autowired
+    private DaoBase dao;
+
+    @Resource(name = "daoSupport")
+    private DaoSupport daoSupport;
+
+}