lgy il y a 6 ans
Parent
commit
9de8b1daeb

+ 1 - 1
application/common/controller/Version.php

@@ -9,7 +9,7 @@ use think\Controller;
  */
 class Version extends Controller{
     static function getVersion(){
-        $version = '6';
+        $version = '7';
         return $version;
     }
 }

+ 1 - 1
application/inter/controller/Application.php

@@ -431,7 +431,7 @@ class Application extends Base
         $institution = DB::table('institution')->where('id',$doctor['institution_id'])->field('name')->find();
         // 驳回添加messages消息
         $t = '您的远程诊断申请被驳回';
-        $c = '您的远程诊断申请,被'.$institution['name'].$doctor['realname'].'xx(下级机构)xx(医生)医师驳回。驳回理由:'.$param['description'];
+        $c = '您的远程诊断申请,被'.$institution['name'].$doctor['realname'].'医师驳回。驳回理由:'.$param['description'];
         $d = $application['req_doctor_id'];
         $type = '2';
         $exam_class = DB::table('exams')->where('id',$re['exam_id'])->field('exam_class')->find();

+ 58 - 0
application/manage/controller/Studiesnums.php

@@ -0,0 +1,58 @@
+<?php
+
+namespace app\manage\controller;
+
+use think\Controller;
+use think\Db;
+use think\Session;
+use think\Config;
+use think\Cookie;
+use think\Request;
+use app\common\library\SysLogs;
+use app\common\library\UUIDs;
+
+/**
+ *
+ */
+class Studiesnums extends Base {
+    public function index(){
+        return $this->fetch();
+    }
+
+    public function datas(){
+        $request = Request::instance();
+        $params = $request->param();
+        if(isset($params['search']) && !empty($params['search'])){
+            $search = str_replace('-', '', $params['search']);
+            $where = $search;
+        }else{
+            $where = date('Ymd',strtotime('-1 day'));
+        }
+        $date = array();
+        $date['studydate'] = $where;
+        $time['date'] = $where;
+        $info = DB::table('every_studies')->where($time)->select();
+        if($info){
+            $count = DB::table('every_studies')->where($time)->count();
+            $data["total"] = $count;
+            $data["rows"] = $info;
+            echo json_encode($data);
+        }else{
+            $institution = DB::table('institution')->where('is_test',0)->field('id,name as institution_name')->select();
+            $count = DB::table('institution')->count();
+            $every = array();
+            foreach ($institution as $k => $v) {
+                $institution[$k]['count'] = DB::table('studies')->where($date)->where('institution_id',$v['id'])->group('institution_id')->count();
+                $every[$k]['id'] = UUIDs::uuid16();
+                $every[$k]['date'] = $where;
+                $every[$k]['institution_id'] = $v['id'];
+                $every[$k]['institution_name'] = $v['institution_name'];
+                $every[$k]['count'] = $institution[$k]['count'];
+            }
+            DB::table('every_studies')->insertAll($every);
+            $data["total"] = $count;
+            $data["rows"] = $institution;
+            echo json_encode($data);
+        }
+    }
+}

+ 108 - 0
application/manage/view/studiesnums/index.html

@@ -0,0 +1,108 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>TODO supply a title</title>
+        {include file="../application/manage/view/commons/headers.html" }
+        <script >
+            
+            // 编辑窗口
+            var $editWin;
+            var editWinHeight=$(window).height()-35;
+            var editWinWidth=$(window).width()*0.98;
+            
+            $(function(){
+                    $editWin = $('#edit-window').window({
+                        title: '每日医院上传统计信息',
+                        width: editWinWidth,height: editWinHeight,
+                        top: ($(window).height() -editWinHeight ) /2 ,
+                        left: ($(window).width() -editWinWidth ) /2 ,
+                        shadow: true,modal: true,
+                        iconCls: 'icon-edit',closed: true,resizable:true,
+                        minimizable: false,maximizable: true,collapsible: false
+                    });
+
+            });
+
+            $(window).resize(function() {
+                editWinWidth=$(window).width()*0.98;
+                $('#edit-window').window('resize',{
+                    width: editWinWidth,height: editWinHeight
+                });
+            });
+
+            
+            
+            
+            function statusFormatter(status){
+                if(status=="0"){
+                    return "屏蔽";
+                }else if(status=="1"){
+                    return "正常";
+                }else{
+                    return status;
+                }
+            }
+
+
+            function pfromFormatter(source){
+                if(source){
+                    return "绑定";
+                }else if(source==null){
+                    return "未绑定";
+                }else{
+                    return source;
+                }
+            }
+
+            function sfromFormatter(source){
+                if(source=="M"){
+                    return "男";
+                }else if(source=="F"){
+                    return "女";
+                }else{
+                    return source;
+                }
+            }
+
+            $(function(){
+                
+                var height=$(document).height();
+                $("#dg").height(height);
+                                
+                $('#dg').datagrid({
+                    url:'/manage/studiesnums/datas',
+                    idField:'id',method: 'get',rownumbers: true,showFooter: true,singleSelect:true,selectOnCheck:false,
+                    toolbar: '#tb',pageList: [dgRowSize,dgRowSize*2,50,100],pagination:false,pageSize:dgRowSize,
+                    columns:[[
+                            {field:'institution_name',title:'医院名称',width:"120",align:'left'},
+                            {field:'count',title:'当日检查数量',width:100 },
+                    ]],
+                    onDblClickRow :function(rowIndex,rowData){
+                        showEditWin(rowData.id);
+                    },
+                });
+
+
+            });
+            
+            function reload(){
+                var search = $("#exam1").val();
+                var url="/manage/studiesnums/datas?search="+(search==null?"":search);
+                $('#dg').datagrid("reload",url);
+            }
+            
+        </script>
+        
+    </head>
+    <body>
+        <div id="dg" class="easyui-datagrid" style="width:100%;height:auto;" ></div>
+        <div id="tb" class="editform" style="display: none; padding-top: 1px;">&nbsp;
+            <form id="form">
+                检查时间:<input type="text" id="exam1"  name="upload_datetime[]" class="easyui-datebox" style="width: 120px;" />
+                <a id="submit" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'" style="width: 80px" onclick="reload()" >查询</a>
+            </form>
+        </div>
+        <div id="edit-window" class="easyui-window" style="overflow: hidden" ><iframe src="about:blank" id="editFrame" style="width:100%;height:100%" frameborder="0" scrolling="yes" ></iframe></div>
+        
+    </body>
+</html>