Browse Source

update + add 新增 药师以及医院 页面展示增删改查 先登记后销售 查询条件新增

bzd_lxf 3 months ago
parent
commit
1f05f70887

+ 145 - 0
health-admin/src/main/java/com/bzd/web/controller/gxhpz/HospitalController.java

@@ -0,0 +1,145 @@
+package com.bzd.web.controller.gxhpz;
+
+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.common.utils.DateUtils;
+import com.bzd.common.utils.StringUtils;
+import com.bzd.common.utils.uuid.IdUtils;
+import com.bzd.system.service.gxhpz.DvalueConfigService;
+import com.bzd.system.service.gxhpz.HospitalListService;
+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.Arrays;
+import java.util.List;
+
+/**
+ * D值配置管理
+ * creator wsp
+ */
+@Controller
+@RequestMapping("/gxhpz/hospital")
+public class HospitalController extends BaseController {
+    private String prefix = "gxhpz";
+    @Autowired
+    private HospitalListService hospitalListService;
+    @RequiresPermissions("gxhpz:hospital:view")
+    @GetMapping("/index")
+    public String recipe()
+    {
+        return prefix + "/hospitalList";
+    }
+    /**
+     *
+     * D值查询
+     */
+    @RequiresPermissions("gxhpz:hospital:list")
+    @PostMapping("/hospitalList")
+    @ResponseBody
+    public TableDataInfo list() throws Exception {
+        PageData pd = this.getPageData();
+        startPage();
+        List<PageData> pageData = hospitalListService.findForList(pd);
+        return  getDataTable(pageData);
+    }
+    /**
+     * 新增页面
+     */
+    @GetMapping("/add")
+    public String add(ModelMap mmap)
+    {
+        mmap.put("posts", 1);
+        return prefix + "/hospitalAdd";
+    }
+    /**
+     * D值详情
+     */
+    @RequiresPermissions("gxhpz:hospital:view")
+    @GetMapping("/hospitalDetail/{id}")
+    public String drugInfo(@PathVariable("id") Long id, ModelMap mmap) throws Exception {
+        PageData pd = this.getPageData();
+        pd.put("id",id);
+        PageData pageData = hospitalListService.findForList(pd).get(0);
+        mmap.putAll(pageData);
+        return prefix + "/hospitalDetail";
+    }
+    /**
+     * D值新增保存
+     */
+    //@RequiresPermissions("server:serv:add")
+    @Log(title = "新增医院", businessType = BusinessType.INSERT)
+    @PostMapping("/saveHospital")
+    @ResponseBody
+    public AjaxResult saveHospital() throws Exception {
+        PageData pd = this.getPageData();
+        int result = hospitalListService.save(pd);
+        if(result>0){
+            return AjaxResult.success("成功");
+        }if(result == -1){
+            return AjaxResult.warn("医院已存在");
+        }else {
+            return AjaxResult.error("失败");
+        }
+
+    }
+    @Log(title = "删除医院", businessType = BusinessType.DELETE)
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove() throws Exception
+    {
+        PageData pd = new PageData();
+        pd = this.getPageData();
+       Object id = pd.get("ids");
+       if(StringUtils.isNotNull(id)){
+           String[] split = id.toString().split(",");
+           List<String> ids = Arrays.asList(split);
+           Integer integer = hospitalListService.del(ids);
+           return toAjax(integer);
+
+       }
+        return AjaxResult.success("请选择要删除的医院");
+    }
+
+    /**
+     * 查询医院信息并跳转到修改界面
+     * @param id
+     * @param mmap
+     * @return
+     * @throws Exception
+     */
+    @RequiresPermissions("gxhpz:hospital:edit")
+    @GetMapping("/edit/{id}")
+    public String view(@PathVariable("id") String id, ModelMap mmap)throws Exception
+    {
+        PageData pd = this.getPageData();
+        pd.put("id",id);
+        PageData pageData = hospitalListService.findForList(pd).get(0);
+        mmap.putAll(pageData);
+        return prefix + "/hospitalEdit";
+    }
+
+    /**
+     * 修改医院信息
+     */
+    @RequiresPermissions("gxhpz:hospital:edit")
+    @Log(title = "医院修改", businessType = BusinessType.UPDATE)
+    @PostMapping("/hospitalEdit")
+    @ResponseBody
+    public AjaxResult editSave() throws Exception
+    {
+        PageData pd = this.getPageData();
+        Integer update = hospitalListService.update(pd);
+        if(update!=1){
+            return error("修改失败");
+        }
+        return toAjax(update);
+    }
+
+}

+ 133 - 0
health-admin/src/main/java/com/bzd/web/controller/gxhpz/PharmacistsController.java

@@ -0,0 +1,133 @@
+package com.bzd.web.controller.gxhpz;
+
+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.common.utils.DateUtils;
+import com.bzd.common.utils.StringUtils;
+import com.bzd.common.utils.uuid.IdUtils;
+import com.bzd.system.service.gxhpz.HospitalListService;
+import com.bzd.system.service.gxhpz.PharmacistsService;
+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.Arrays;
+import java.util.List;
+
+/**
+ * D值配置管理
+ * creator wsp
+ */
+@Controller
+@RequestMapping("/gxhpz/pharmacists")
+public class PharmacistsController extends BaseController {
+    private String prefix = "gxhpz";
+    @Autowired
+    private PharmacistsService pharmacistsService;
+    @RequiresPermissions("gxhpz:pharmacists:view")
+    @GetMapping("/index")
+    public String recipe()
+    {
+        return prefix + "/pharmacistsList";
+    }
+    /**
+     *
+     * D值查询
+     */
+    @RequiresPermissions("gxhpz:pharmacists:list")
+    @PostMapping("/pharmacistsList")
+    @ResponseBody
+    public TableDataInfo list() throws Exception {
+        PageData pd = this.getPageData();
+        startPage();
+        List<PageData> pageData = pharmacistsService.findForList(pd);
+        return  getDataTable(pageData);
+    }
+    /**
+     * 新增页面
+     */
+    @GetMapping("/add")
+    public String add(ModelMap mmap)
+    {
+        mmap.put("posts", 1);
+        return prefix + "/pharmacistsAdd";
+    }
+    /**
+     * 审核药师新增
+     */
+    //@RequiresPermissions("server:serv:add")
+    @Log(title = "审核药师新增", businessType = BusinessType.INSERT)
+    @PostMapping("/savePharmacists")
+    @ResponseBody
+    public AjaxResult saveDpharmacists() throws Exception {
+        PageData pd = this.getPageData();
+        int result = pharmacistsService.save(pd);
+        if(result>0){
+            return AjaxResult.success("成功");
+        }if(result == -1){
+            return AjaxResult.warn("D值编码已存在");
+        }else {
+            return AjaxResult.error("失败");
+        }
+
+    }
+    @Log(title = "审核药师删除", businessType = BusinessType.DELETE)
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove() throws Exception
+    {
+        PageData pd = new PageData();
+        pd = this.getPageData();
+       Object id = pd.get("ids");
+       if(StringUtils.isNotNull(id)){
+           String[] split = id.toString().split(",");
+           List<String> ids = Arrays.asList(split);
+           Integer integer = pharmacistsService.del(ids);
+           return toAjax(integer);
+
+       }
+        return AjaxResult.success("请选择要删除的数据");
+    }
+
+    /**
+     * 跳转到修改界面
+     * @param id
+     * @param mmap
+     * @return
+     * @throws Exception
+     */
+    @RequiresPermissions("gxhpz:pharmacists:edit")
+    @GetMapping("/edit/{id}")
+    public String view(@PathVariable("id") String id, ModelMap mmap)throws Exception
+    {
+        PageData pd = this.getPageData();
+        pd.put("id",id);
+        PageData pageData = pharmacistsService.findForList(pd).get(0);
+        mmap.putAll(pageData);
+        return prefix + "/pharmacistsEdit";
+    }
+
+    /**
+     * 审核药师修改
+     */
+    @RequiresPermissions("gxhpz:pharmacists:edit")
+    @Log(title = "审核药师修改", businessType = BusinessType.UPDATE)
+    @PostMapping("/pharmacistsEdit")
+    @ResponseBody
+    public AjaxResult editSave() throws Exception
+    {
+        PageData pd = this.getPageData();
+        Integer update = pharmacistsService.update(pd);
+        if(update!=1){
+            return error("修改失败");
+        }
+        return toAjax(update);
+    }
+
+}

+ 1 - 1
health-admin/src/main/resources/templates/dtp/recipe/edit.html

@@ -144,7 +144,7 @@
             </tbody>
         </table>
     </div>
-    <div class="center-block ibox-title" >
+    <div class="center-block ibox-title"  style="width: 100%;">
         <label class="is-required">是否开启药师审核:</label>
         <button type="button" class="btn btn-primary"  onclick="onclickshow()">是</button>
         <button type="button" class="btn btn-info"     onclick="onclickhide()">否</button>

+ 1 - 1
health-admin/src/main/resources/templates/dtp/recipe/newRecipe.html

@@ -158,7 +158,7 @@
                 </tbody>
             </table>
         </div>
-            <div class="center-block ibox-title" >
+            <div class="center-block ibox-title" style="width: 100%;">
                 <label class="is-required">是否开启药师审核:</label>
                     <button type="button" class="btn btn-primary"  onclick="onclickshow()">是</button>
                     <button type="button" class="btn btn-info"     onclick="onclickhide()">否</button>

+ 9 - 0
health-admin/src/main/resources/templates/dtp/recipe/recipe.html

@@ -49,6 +49,14 @@
 							<span>-</span>
 							<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"/>
 						</div>
+
+						<div class="customize-form-group select-time">
+							<label>处方销售日期:</label>
+							<input type="text" class="time-input" id="startTime2" placeholder="开始时间" name="sdbeginTime"/>
+							<span>-</span>
+							<input type="text" class="time-input" id="endTime2" placeholder="结束时间" name="sdendTime"/>
+						</div>
+
 						<div class="customize-form-group">
 							<label>订单状态</label>
 							<select name="status" th:with="type=${@dict.getType('sys_select_order_status')}" class="styled-input">
@@ -137,6 +145,7 @@
 				{ field: "dvalueDays", title: "剂量天数" },
 				{ field: "prescriptionNumber", title: "处方单号" },
 				{ field: "salesOrderNumber", title: "销售单号" },
+				{ field: "saleDate", title: "销售日期" },
 				{ field: "standardName", title: "医院" },
 				{ field: "department", title: "科室" },
 				{ field: "prescribingDoctor", title: "处方医生" },

+ 58 - 0
health-admin/src/main/resources/templates/gxhpz/hospitalAdd.html

@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('医院信息新增')" />
+    <th:block th:include="include :: ztree-css" />
+</head>
+<body class="white-bg">
+<div class="wrapper wrapper-content animated fadeInRight ibox-content">
+    <form id="form-SSpglJfspProductinfo-add" class="customize-search-form">
+        <div class="customize-form-group-container">
+            <div class="customize-form-group">
+                <label>医院名称:</label>
+                <input name="standardName" placeholder="请输入医院名称" id="standardName" class="styled-input" type="text">
+            </div>
+            <div class="customize-form-group">
+                <label>医院地址:</label>
+                <input name="address" placeholder="请输入医院地址" id="address" class="styled-input" type="text">
+            </div>
+            <div class="customize-form-group">
+                <label>医院电话:</label>
+                <input name="phone" placeholder="请输入医院电话" id="phone" class="styled-input" type="text">
+            </div>
+            <div class="customize-form-group">
+                <label>所属门店:</label>
+                <input name="storeName" placeholder="请输入所属门店" id="storeName" class="styled-input" type="text">
+            </div>
+        </div>
+    </form>
+</div>
+<th:block th:include="include :: footer" />
+<th:block th:include="include :: ztree-js" />
+<script type="text/javascript">
+
+    function submitHandler() {
+        if ($.validate.form()) {
+            add();
+        }
+    }
+
+    function add() {
+        var data = $("#form-SSpglJfspProductinfo-add").serializeArray();
+        $.ajax({
+            cache : true,
+            type : "POST",
+            url : ctx + "gxhpz/hospital/saveHospital",
+            data : data,
+            async : false,
+            error : function(request) {
+                $.modal.alertError("系统错误");
+            },
+            success : function(data) {
+                $.operate.successCallback(data);
+            }
+        });
+    }
+</script>
+</body>
+</html>

+ 66 - 0
health-admin/src/main/resources/templates/gxhpz/hospitalEdit.html

@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('门店积分商品列表修改')" />
+</head>
+<body>
+<div class="ui-layout-center">
+    <form id="form-SSpglJfspProductinfo-edit" class="customize-search-form">
+
+        <div class="customize-form-group-container">
+            <input type="hidden" id="id" name="id" th:value="${id}">
+            <div class="customize-form-group-container">
+                <div class="customize-form-group">
+                    <label>医院名称:</label>
+                    <input name="standardName" placeholder="请输入医院名称" id="standardName"  th:value="${standardName}" class="styled-input" type="text">
+                </div>
+
+                <div class="customize-form-group">
+                    <label>医院地址:</label>
+                    <input name="address" placeholder="请输入医院地址" id="address" th:value="${address}" class="styled-input" type="text">
+                </div>
+
+                <div class="customize-form-group">
+                    <label>医院电话:</label>
+                    <input name="phone" placeholder="请输入医院电话" id="phone" th:value="${phone}" class="styled-input" type="text">
+                </div>
+                <div class="customize-form-group">
+                    <label>所属门店:</label>
+                    <input name="storeName" placeholder="请输入所属门店" id="storeName" th:value="${storeName}" class="styled-input" type="text">
+                </div>
+            </div>
+        </div>
+
+    </form>
+</div>
+<div class="main-content">
+    <div class="col-sm-offset-5 col-sm-10">
+    </div>
+</div>
+<th:block th:include="include :: footer" />
+</body>
+</html>
+<script>
+    function edit() {
+        var data = $("#form-SSpglJfspProductinfo-edit").serializeArray();
+        $.ajax({
+            cache : true,
+            type : "POST",
+            url : ctx + "gxhpz/hospital/hospitalEdit",
+            data : data,
+            async : false,
+            error : function(request) {
+                $.modal.alertError("系统错误");
+            },
+            success : function(data) {
+                $.operate.successCallback(data);
+            }
+        });
+    }
+
+    function submitHandler() {
+        if ($.validate.form()) {
+            edit();
+        }
+    }
+</script>

+ 171 - 0
health-admin/src/main/resources/templates/gxhpz/hospitalList.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>
+    <meta charset="UTF-8">
+    <meta name="format-detection" content="telephone=no">
+    <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" >
+                <div class="query-condition-container">
+                    <h4 class="query-condition-title">查询条件</h4>
+                    <div class="query-buttons">
+                        <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>
+                    </div>
+                </div>
+                <form id="SSpglJfspProductinfo-form" class="customize-search-form">
+                <div class="customize-form-group-container">
+
+                <div class="customize-form-group">
+                    <label>医院名称:</label>
+                    <input type="text" class="styled-input" placeholder="请输入医院名称" name="standardName"/>
+                </div>
+             </div>
+             </form>
+            </div>
+
+            <div class="btn-group-sm" id="toolbar" role="group">
+                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:user:add">
+                    <i class="fa fa-plus"></i> 新增
+                </a>
+            </div>
+
+            <div class="col-sm-12 select-table table-striped" style="width: 100%; overflow-x: hidden;">
+                <table id="bootstrap-table" class="fixed-layout-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 :: bootstrap-table-fixed-columns-js" />
+<th:block th:include="include :: ztree-js" />
+<script th:inline="javascript">
+    var editFlag = [[${@permission.hasPermi('gxhpz:hospital:edit')}]];
+    var removeFlag = [[${@permission.hasPermi('gxhpz:hospital:remove')}]];
+    var prefix = ctx + "gxhpz/hospital";
+    $(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);
+        }
+        queryArchivesList();
+    });
+
+    function queryArchivesList() {
+        var options = {
+            url: prefix + "/hospitalList",
+            viewUrl: prefix + "/hospitalDetail/{id}",
+            createUrl: prefix + "/add",
+            updateUrl: prefix + "/edit/{id}",
+            removeUrl: prefix + "/remove",
+            /*exportUrl: prefix + "/export",
+            importUrl: prefix + "/importData",
+            importTemplateUrl: prefix + "/importTemplate",*/
+            sortName: "id",
+            sortOrder: "asc",
+            modalName: "药品",
+            fitColumns: true,
+            striped: true,
+            autoRowHeight: true,
+            rowNumbers: true,
+            showFooter:true,  //是否显示表格底部区域。
+            clickToSelect: true, //是否启用点击行时选中整行的功能。
+            singleSelect: false, //是否仅允许选择一行
+            fixedColumns: true,
+            //fixedNumber: 3,
+            fixedRightNumber: 1,
+            columns: [
+                { field: 'id', title: '主键', align: 'center', visible: false },
+                { field: 'standardName', title: '医院名称', align: 'center' },
+                { field: 'address', title: '医院地址', align: 'center' },
+                { field: 'phone', title: '医院电话', align: 'center' },
+                { field: 'storeName', title: '所属门店', align: 'center' },
+                { field: 'createBy', title: '创建人', align: 'center' },
+                { field: 'createTime', title: '创建时间', align: 'center' },
+                { field: 'updateBy', title: '更新人', align: 'center' },
+                { field: 'updateTime', title: '更新时间', align: 'center' },
+                {
+                    title: '操作',
+                    align: 'center',
+                    formatter: function(value, row, index) {
+                        if (row.id) {
+                            var actions = [];
+                            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('');
+                        } else {
+                            return "";
+                        }
+                    }
+                }]
+        };
+        $.table.init(options);
+    }
+
+    /* 自定义重置-表单重置/隐藏框/树节点选择色/搜索 */
+    function resetPre() {
+        resetDate();
+        $("#SSpglJfspProductinfo-form")[0].reset();
+        $.table.search();
+        _refresh();
+    }
+    function edit_page(id){
+        table.set();
+        var url = "/404.html";
+        if ($.common.isNotEmpty(id)) {
+            url = table.options.updateUrl.replace("{id}", id);
+        } else {
+            var id = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
+            if (id.length == 0) {
+                $.modal.alertWarning("请至少选择一条记录");
+                return;
+            }
+            url = table.options.updateUrl.replace("{id}", id);
+        }
+        $.modal.openTab("修改" + table.options.modalName, url + "?editTage=1" );
+    }
+
+    /* 用户状态显示 */
+    function statusTools(row) {
+        if (row.status == 0) {
+            return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enable(\'' + row.id +'\')" style="color: red;"></i> ';
+        } else {
+            return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.id+'\')" style="color: green;"></i>  ';
+        }
+    }
+
+    /* 用户管理-停用 */
+    function disable(id) {
+        $.modal.confirm("确认要停用配置吗?", function() {
+            $.operate.post(prefix + "/changeStatus", { "id": id,"status": 0 });
+        })
+    }
+
+    /* 用户管理启用 */
+    function enable(id) {
+        $.modal.confirm("确认要启用配置吗?", function() {
+            $.operate.post(prefix + "/changeStatus", { "id": id, "status": 1 });
+        })
+    }
+</script>
+</body>
+
+</html>

+ 59 - 0
health-admin/src/main/resources/templates/gxhpz/pharmacistsAdd.html

@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('药师信息新增')" />
+    <th:block th:include="include :: ztree-css" />
+</head>
+<body class="white-bg">
+<div class="wrapper wrapper-content animated fadeInRight ibox-content">
+    <form id="form-SSpglJfspProductinfo-add" class="customize-search-form">
+
+            <div class="customize-form-group-container"> <div class="customize-form-group">
+                <label>审核药师:</label>
+                <input name="pharmacistName" placeholder="请输入审核药师" id="pharmacistName" class="styled-input" type="text">
+            </div>
+
+            <div class="customize-form-group">
+                <label>审核密码:</label>
+                <input name="reviewPassword" placeholder="请输入审核密码" id="reviewPassword" class="styled-input" type="text">
+            </div>
+            <div class="customize-form-group">
+                <label>职位:</label>
+                <input name="position" placeholder="请输入职位" id="position" class="styled-input" type="text">
+            </div>
+            <div class="customize-form-group">
+                <label>所属门店:</label>
+                <input name="storeName" placeholder="请输入所属门店" id="storeName" class="styled-input" type="text">
+            </div>
+        </div>
+    </form>
+</div>
+<th:block th:include="include :: footer" />
+<th:block th:include="include :: ztree-js" />
+<script type="text/javascript">
+
+    function submitHandler() {
+        if ($.validate.form()) {
+            add();
+        }
+    }
+
+    function add() {
+        var data = $("#form-SSpglJfspProductinfo-add").serializeArray();
+        $.ajax({
+            cache : true,
+            type : "POST",
+            url : ctx + "gxhpz/pharmacists/savePharmacists",
+            data : data,
+            async : false,
+            error : function(request) {
+                $.modal.alertError("系统错误");
+            },
+            success : function(data) {
+                $.operate.successCallback(data);
+            }
+        });
+    }
+</script>
+</body>
+</html>

+ 66 - 0
health-admin/src/main/resources/templates/gxhpz/pharmacistsEdit.html

@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('门店积分商品列表修改')" />
+</head>
+<body>
+<div class="ui-layout-center">
+    <form id="form-SSpglJfspProductinfo-edit" class="customize-search-form">
+
+        <div class="customize-form-group-container">
+            <input type="hidden" id="id" name="id" th:value="${id}">
+            <div class="customize-form-group-container">
+                <div class="customize-form-group-container">
+                    <div class="customize-form-group">
+                        <label>审核药师:</label>
+                        <input name="pharmacistName" placeholder="请输入审核药师" id="pharmacistName" th:value="${pharmacistName}" class="styled-input" type="text">
+                    </div>
+
+                    <div class="customize-form-group">
+                        <label>审核密码:</label>
+                        <input name="reviewPassword" placeholder="请输入审核密码" id="reviewPassword" th:value="${reviewPassword}" class="styled-input" type="text">
+                    </div>
+                    <div class="customize-form-group">
+                        <label>职位:</label>
+                        <input name="position" placeholder="请输入职位" id="position" th:value="${position}" class="styled-input" type="text">
+                    </div>
+                    <div class="customize-form-group">
+                        <label>所属门店:</label>
+                        <input name="storeName" placeholder="请输入所属门店" id="storeName" th:value="${storeName}" class="styled-input" type="text">
+                    </div>
+            </div>
+        </div>
+
+    </form>
+</div>
+<div class="main-content">
+    <div class="col-sm-offset-5 col-sm-10">
+    </div>
+</div>
+<th:block th:include="include :: footer" />
+</body>
+</html>
+<script>
+    function edit() {
+        var data = $("#form-SSpglJfspProductinfo-edit").serializeArray();
+        $.ajax({
+            cache : true,
+            type : "POST",
+            url : ctx + "gxhpz/pharmacists/pharmacistsEdit",
+            data : data,
+            async : false,
+            error : function(request) {
+                $.modal.alertError("系统错误");
+            },
+            success : function(data) {
+                $.operate.successCallback(data);
+            }
+        });
+    }
+
+    function submitHandler() {
+        if ($.validate.form()) {
+            edit();
+        }
+    }
+</script>

+ 171 - 0
health-admin/src/main/resources/templates/gxhpz/pharmacistsList.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>
+    <meta charset="UTF-8">
+    <meta name="format-detection" content="telephone=no">
+    <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" >
+                <div class="query-condition-container">
+                    <h4 class="query-condition-title">查询条件</h4>
+                    <div class="query-buttons">
+                        <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>
+                    </div>
+                </div>
+                <form id="SSpglJfspProductinfo-form" class="customize-search-form">
+                <div class="customize-form-group-container">
+
+                <div class="customize-form-group">
+                    <label>药师姓名:</label>
+                    <input type="text" class="styled-input" placeholder="请输入药师姓名" name="pharmacistName"/>
+                </div>
+             </div>
+             </form>
+            </div>
+
+            <div class="btn-group-sm" id="toolbar" role="group">
+                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:user:add">
+                    <i class="fa fa-plus"></i> 新增
+                </a>
+            </div>
+
+            <div class="col-sm-12 select-table table-striped" style="width: 100%; overflow-x: hidden;">
+                <table id="bootstrap-table" class="fixed-layout-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 :: bootstrap-table-fixed-columns-js" />
+<th:block th:include="include :: ztree-js" />
+<script th:inline="javascript">
+    var editFlag = [[${@permission.hasPermi('gxhpz:hospital:edit')}]];
+    var removeFlag = [[${@permission.hasPermi('gxhpz:hospital:remove')}]];
+    var prefix = ctx + "gxhpz/pharmacists";
+    $(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);
+        }
+        queryArchivesList();
+    });
+
+    function queryArchivesList() {
+        var options = {
+            url: prefix + "/pharmacistsList",
+            viewUrl: prefix + "/pharmacistsDetail/{id}",
+            createUrl: prefix + "/add",
+            updateUrl: prefix + "/edit/{id}",
+            removeUrl: prefix + "/remove",
+            /*exportUrl: prefix + "/export",
+            importUrl: prefix + "/importData",
+            importTemplateUrl: prefix + "/importTemplate",*/
+            sortName: "id",
+            sortOrder: "asc",
+            modalName: "药品",
+            fitColumns: true,
+            striped: true,
+            autoRowHeight: true,
+            rowNumbers: true,
+            showFooter:true,  //是否显示表格底部区域。
+            clickToSelect: true, //是否启用点击行时选中整行的功能。
+            singleSelect: false, //是否仅允许选择一行
+            fixedColumns: true,
+            //fixedNumber: 3,
+            fixedRightNumber: 1,
+            columns: [
+                { field: 'id', title: '主键', align: 'center', visible: false },
+                { field: 'pharmacistName', title: '药师姓名', align: 'center' },
+                { field: 'position', title: '职位', align: 'center' },
+                { field: 'reviewPassword', title: '审核密码', align: 'center' },
+                { field: 'storeName', title: '所属门店', align: 'center' },
+                { field: 'createBy', title: '创建人', align: 'center' },
+                { field: 'createTime', title: '创建时间', align: 'center' },
+                { field: 'updateBy', title: '更新人', align: 'center' },
+                { field: 'updateTime', title: '更新时间', align: 'center' },
+                {
+                    title: '操作',
+                    align: 'center',
+                    formatter: function(value, row, index) {
+                        if (row.id) {
+                            var actions = [];
+                            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('');
+                        } else {
+                            return "";
+                        }
+                    }
+                }]
+        };
+        $.table.init(options);
+    }
+
+    /* 自定义重置-表单重置/隐藏框/树节点选择色/搜索 */
+    function resetPre() {
+        resetDate();
+        $("#SSpglJfspProductinfo-form")[0].reset();
+        $.table.search();
+        _refresh();
+    }
+    function edit_page(id){
+        table.set();
+        var url = "/404.html";
+        if ($.common.isNotEmpty(id)) {
+            url = table.options.updateUrl.replace("{id}", id);
+        } else {
+            var id = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
+            if (id.length == 0) {
+                $.modal.alertWarning("请至少选择一条记录");
+                return;
+            }
+            url = table.options.updateUrl.replace("{id}", id);
+        }
+        $.modal.openTab("修改" + table.options.modalName, url + "?editTage=1" );
+    }
+
+    /* 用户状态显示 */
+    function statusTools(row) {
+        if (row.status == 0) {
+            return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enable(\'' + row.id +'\')" style="color: red;"></i> ';
+        } else {
+            return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.id+'\')" style="color: green;"></i>  ';
+        }
+    }
+
+    /* 用户管理-停用 */
+    function disable(id) {
+        $.modal.confirm("确认要停用配置吗?", function() {
+            $.operate.post(prefix + "/changeStatus", { "id": id,"status": 0 });
+        })
+    }
+
+    /* 用户管理启用 */
+    function enable(id) {
+        $.modal.confirm("确认要启用配置吗?", function() {
+            $.operate.post(prefix + "/changeStatus", { "id": id, "status": 1 });
+        })
+    }
+</script>
+</body>
+
+</html>

+ 68 - 0
health-system/src/main/java/com/bzd/system/service/gxhpz/HospitalListService.java

@@ -0,0 +1,68 @@
+package com.bzd.system.service.gxhpz;
+
+import com.bzd.common.config.dao.DaoBase;
+import com.bzd.common.config.dao.DaoSupport;
+import com.bzd.common.config.dao.PageData;
+import com.bzd.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+import static com.bzd.common.utils.ShiroUtils.getSysUser;
+
+@Service
+public class HospitalListService {
+    @Autowired
+    private DaoBase dao;
+    @Resource(name = "daoSupport")
+    private DaoSupport daoSupport;
+
+    /**
+     * 查询列表
+     * @param pd
+     * @return
+     * @throws Exception
+     */
+    public List<PageData> findForList(final PageData pd) throws Exception {
+        return (List<PageData>) daoSupport.findForList("hospitalMapper.selectHospital", pd);
+    }
+
+    /**
+     * 添加
+     * @param pd
+     * @return
+     * @throws Exception
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public int save(final PageData pd) throws Exception {
+        pd.put("createTime", DateUtils.getTime());
+        pd.put("createBy", getSysUser().getUserName());
+        return  daoSupport.save("hospitalMapper.insertHospital", pd);
+    }
+
+    /**
+     * 删除
+     * @param ids
+     * @return
+     * @throws Exception
+     */
+    public Integer del(List<String> ids) throws Exception {
+        return daoSupport.delete("hospitalMapper.deleteHospital", ids);
+    }
+
+    /**
+     * 修改配置
+     * @param pd
+     * @return
+     * @throws Exception
+     */
+    public Integer update(PageData pd) throws Exception {
+        pd.put("updateTime", DateUtils.getTime());
+        pd.put("updateBy", getSysUser().getUserName());
+        return daoSupport.update("hospitalMapper.updateHospital", pd);
+    }
+
+}

+ 67 - 0
health-system/src/main/java/com/bzd/system/service/gxhpz/PharmacistsService.java

@@ -0,0 +1,67 @@
+package com.bzd.system.service.gxhpz;
+
+import com.bzd.common.config.dao.DaoBase;
+import com.bzd.common.config.dao.DaoSupport;
+import com.bzd.common.config.dao.PageData;
+import com.bzd.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+import static com.bzd.common.utils.ShiroUtils.getSysUser;
+
+@Service
+public class PharmacistsService {
+    @Autowired
+    private DaoBase dao;
+    @Resource(name = "daoSupport")
+    private DaoSupport daoSupport;
+
+    /**
+     * 查询列表
+     * @param pd
+     * @return
+     * @throws Exception
+     */
+    public List<PageData> findForList(final PageData pd) throws Exception {
+        return (List<PageData>) daoSupport.findForList("pharmacistsMapper.selectPharmacists", pd);
+    }
+
+    /**
+     * 添加
+     * @param pd
+     * @return
+     * @throws Exception
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public int save(final PageData pd) throws Exception {
+        pd.put("createTime", DateUtils.getTime());
+        pd.put("createBy", getSysUser().getUserName());
+        return  daoSupport.save("pharmacistsMapper.insertPharmacists", pd);
+    }
+
+    /**
+     * 删除
+     * @param ids
+     * @return
+     * @throws Exception
+     */
+    public Integer del(List<String> ids) throws Exception {
+        return daoSupport.delete("pharmacistsMapper.deletePharmacists", ids);
+    }
+
+    /**
+     * 修改配置
+     * @param pd
+     * @return
+     * @throws Exception
+     */
+    public Integer update(PageData pd) throws Exception {
+        pd.put("updateTime", DateUtils.getTime());
+        pd.put("updateBy", getSysUser().getUserName());
+        return daoSupport.update("pharmacistsMapper.updatePharmacists", pd);
+    }
+}

+ 121 - 0
health-system/src/main/resources/mapper/gxhpz/hospitalMapper.xml

@@ -0,0 +1,121 @@
+<?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="hospitalMapper">
+
+    <select id="selectHospital" parameterType="pd" resultType="pd">
+        select * from s_dtp_pzxx_hospital_list where 1=1
+        <if test="standardName != null and standardName != ''">
+            and standardName like concat('%', #{standardName}, '%')
+        </if>
+        <if test="id != null">
+            and id = #{id}
+        </if>
+    </select>
+
+    <select id="selectOneById" parameterType="pd" resultType="pd">
+        select * from s_dtp_pzxx_hospital_list   where 1=1 and id=#{id}
+    </select>
+
+    <update id="updateHospital" parameterType="pd">
+        update s_dtp_pzxx_hospital_list
+        <trim prefix="SET " suffix="" prefixOverrides="," suffixOverrides=",">
+            <if test="storeName != null and storeName != ''">
+                storeName = #{storeName},
+            </if>
+            <if test="createBy != null and createBy != ''">
+                createBy = #{createBy},
+            </if>
+            <if test="createTime != null">
+                createTime = #{createTime},
+            </if>
+            <if test="updateBy != null and updateBy != ''">
+                updateBy = #{updateBy},
+            </if>
+            <if test="updateTime != null">
+                updateTime = #{updateTime},
+            </if>
+            <if test="standardName != null and standardName !=''">
+                standardName = #{standardName},
+            </if>
+            <if test="address != null and address != ''">
+                address = #{address},
+            </if>
+            <if test="phone != null and phone != ''">
+                phone = #{phone},
+            </if>
+        </trim>
+        <if test="id != null">
+            where id = #{id}
+        </if>
+    </update>
+
+    <delete id="deleteHospital" parameterType="java.util.List">
+        <if test="list != null and list.size() > 0">
+            delete from s_dtp_pzxx_hospital_list
+            where id in
+            <foreach item="id" index="index" collection="list" open="(" separator="," close=")">
+                #{id}
+            </foreach>
+        </if>
+    </delete>
+
+
+    <insert id="insertHospital" parameterType="pd">
+        insert into s_dtp_pzxx_hospital_list
+        <trim prefix="(" suffix=")" prefixOverrides="," suffixOverrides=",">
+
+            <if test="storeName != null and storeName != ''">
+                storeName,
+            </if>
+            <if test="createBy != null and createBy != ''">
+                createBy,
+            </if>
+            <if test="createTime != null">
+                createTime,
+            </if>
+            <if test="updateBy != null and updateBy != ''">
+                updateBy,
+            </if>
+            <if test="updateTime != null">
+                updateTime,
+            </if>
+            <if test="standardName != null and standardName !=''">
+                standardName,
+            </if>
+            <if test="address != null and address != ''">
+                address,
+            </if>
+            <if test="phone != null and phone != ''">
+                phone,
+            </if>
+        </trim>
+        <trim prefix="VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
+            <if test="storeName != null and storeName != ''">
+                #{storeName},
+            </if>
+            <if test="createBy != null and createBy != ''">
+                #{createBy},
+            </if>
+            <if test="createTime != null">
+                #{createTime},
+            </if>
+            <if test="updateBy != null and updateBy != ''">
+                #{updateBy},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime},
+            </if>
+            <if test="standardName != null and standardName !=''">
+                #{standardName},
+            </if>
+            <if test="address != null and address != ''">
+                #{address},
+            </if>
+            <if test="phone != null and phone != ''">
+                #{phone},
+            </if>
+        </trim>
+    </insert>
+</mapper>

+ 119 - 0
health-system/src/main/resources/mapper/gxhpz/pharmacistsMapper.xml

@@ -0,0 +1,119 @@
+<?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="pharmacistsMapper">
+
+    <select id="selectPharmacists" parameterType="pd" resultType="pd">
+        select * from s_dtp_review_pharmacists where 1=1
+        <if test="pharmacistName != null and pharmacistName != ''">
+            and pharmacistName like concat('%', #{pharmacistName}, '%')
+        </if>
+        <if test="id != null">
+            and id = #{id}
+        </if>
+    </select>
+    <select id="selectOneById" parameterType="pd" resultType="pd">
+        select * from s_dtp_review_pharmacists   where 1=1 and id=#{id}
+    </select>
+    <update id="updatePharmacists" parameterType="pd">
+        update s_dtp_review_pharmacists
+        <trim prefix="SET " suffix="" prefixOverrides="," suffixOverrides=",">
+            <if test="pharmacistName != null and pharmacistName != ''">
+                pharmacistName = #{pharmacistName},
+            </if>
+            <if test="createBy != null and createBy != ''">
+                createBy = #{createBy},
+            </if>
+            <if test="createTime != null">
+                createTime = #{createTime},
+            </if>
+            <if test="updateBy != null and updateBy != ''">
+                updateBy = #{updateBy},
+            </if>
+            <if test="updateTime != null">
+                updateTime = #{updateTime},
+            </if>
+            <if test="position != null and position !=''">
+                position = #{position},
+            </if>
+            <if test="storeName != null and storeName != ''">
+                storeName = #{storeName},
+            </if>
+            <if test="reviewPassword != null and reviewPassword != ''">
+                reviewPassword = #{reviewPassword},
+            </if>
+        </trim>
+        <if test="id != null">
+            where id = #{id}
+        </if>
+    </update>
+    <delete id="deletePharmacists" parameterType="java.util.List">
+        <if test="list != null and list.size() > 0">
+            delete from s_dtp_review_pharmacists
+            where id in
+            <foreach item="id" index="index" collection="list" open="(" separator="," close=")">
+                #{id}
+            </foreach>
+        </if>
+    </delete>
+
+
+    <insert id="insertPharmacists" parameterType="pd">
+        insert into s_dtp_review_pharmacists
+        <trim prefix="(" suffix=")" prefixOverrides="," suffixOverrides=",">
+            <if test="pharmacistName != null and pharmacistName != ''">
+                pharmacistName,
+            </if>
+            <if test="createBy != null and createBy != ''">
+                createBy,
+            </if>
+            <if test="createTime != null">
+                createTime,
+            </if>
+            <if test="updateBy != null and updateBy != ''">
+                updateBy,
+            </if>
+            <if test="updateTime != null">
+                updateTime,
+            </if>
+            <if test="position != null and position !=''">
+                position,
+            </if>
+            <if test="storeName != null and storeName != ''">
+                storeName,
+            </if>
+            <if test="reviewPassword != null and reviewPassword != ''">
+                reviewPassword,
+            </if>
+        </trim>
+        <trim prefix="VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
+
+            <if test="pharmacistName != null and pharmacistName != ''">
+                #{pharmacistName},
+            </if>
+            <if test="createBy != null and createBy != ''">
+                #{createBy},
+            </if>
+            <if test="createTime != null">
+                #{createTime},
+            </if>
+            <if test="updateBy != null and updateBy != ''">
+                #{updateBy},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime},
+            </if>
+            <if test="position != null and position !=''">
+                #{position},
+            </if>
+            <if test="storeName != null and storeName != ''">
+                #{storeName},
+            </if>
+            <if test="reviewPassword != null and reviewPassword != ''">
+                #{reviewPassword},
+            </if>
+        </trim>
+    </insert>
+
+</mapper>

+ 7 - 3
health-system/src/main/resources/mapper/mdyy/DTPCFDJMapper.xml

@@ -12,6 +12,7 @@
     <!-- 查询 先登记后销售的处方信息-->
     <select id="selectPrescriptionRegistration" parameterType="pd" resultType="pd">
         SELECT
+        sdpr.saleDate,
         sddpr.mdmCode,
         sddpr.administrationMethod,
         sddpr.productName,
@@ -74,9 +75,6 @@
         <if test="prescriptionIssueDate != null">
             and sdpr.prescriptionIssueDate = #{prescriptionIssueDate}
         </if>
-        <if test="saleDate != null">
-            and sdpr.saleDate = #{saleDate}
-        </if>
         <if test="registrationDate != null">
             and sdpr.registrationDate = #{registrationDate}
         </if>
@@ -176,6 +174,12 @@
         <if test="sbeginTime != null and sbeginTime != '' and sendTime != null and sendTime != ''">
             and sdpr.saleDate between #{sbeginTime} and #{sendTime}
         </if>
+        <if test="sdbeginTime != null and sdbeginTime != ''">
+            and sdpr.saleDate &gt; #{sdbeginTime}
+        </if>
+        <if test="sdendTime != null and sdendTime != ''">
+            and sdpr.saleDate &lt; #{sdendTime}
+        </if>
         <if test="sales_is != null and sales_is != ''">
             and sdpr.status   &lt;&gt;  #{sales_is}
         </if>