diff --git a/Laravel/app/Http/Controllers/API/Admin/YeWu/PingTaiPushController.php b/Laravel/app/Http/Controllers/API/Admin/YeWu/PingTaiPushController.php new file mode 100644 index 0000000..0488f52 --- /dev/null +++ b/Laravel/app/Http/Controllers/API/Admin/YeWu/PingTaiPushController.php @@ -0,0 +1,222 @@ +whereBetween('created_at', $searchInfo['dateRange']); + } else { + $list = $list->whereBetween('created_at', [date('Y-m-d'), date('Y-m-d')]); + } + if (isset($searchInfo['orgname'])) { + $list = $list->where('hospitalName', 'like', '%' . $searchInfo['orgname'] . '%'); + } + $count = $list->count(); + $list = $list->orderBy('created_at', 'desc')->skip(($page-1)*$pageSize)->take($pageSize)->get(); + return \Yz::Return(true, "查询完成", ['list' => $list,'count'=>$count]); + } + public function GetDetail() + { + $id = request('id'); + + // 获取原始信息 + $info = DB::table('health_certificate_push')->where('id', $id)->first(); + + if (!$info) { + return \Yz::Return(false, "未找到对应数据"); + } + + // 将对象转换为数组以便处理 + $infoArray = (array)$info; + + // 创建英文字段到中文字段的完整映射表 + $fieldMapping = [ + 'hospitalCode' => '医疗机构编码', + 'hospitalName' => '医疗机构名称', + 'postTime' => '数据上传时间', + 'usci' => '统一社会信用代码', + 'healthExaminationId' => '体检登记号', + 'examTypeCode' => '从业人员健康检查类别代码', + 'examTypeName' => '从业人员健康检查类别名称', + 'examTypeText' => '从业人员健康检查类别显示文本', + 'examDate' => '体检日期', + 'healthCertificateId' => '唯一标识', + 'billingStatus' => '收费状态;0 免费,1 自费', + 'name' => '姓名', + 'photo' => '照片', + 'tel' => '电话', + 'gender' => '性别代码', + 'genderName' => '性别名称', + 'identifierTypeCode' => '身份证件类别代码', + 'identifierTypeName' => '身份证件类别名称', + 'identifierValue' => '身份证件号码', + 'hasBacterialDysentery' => '细菌性痢疾(1有 2无)', + 'bacterialDysenteryNote' => '细菌性痢疾-备注', + 'bacterialDysenteryPractitionerNumber' => '细菌性痢疾-检查医师执业证书编号', + 'bacterialDysenteryPractitionerLocalId' => '细菌性痢疾-检查医师机构内编码', + 'bacterialDysenteryPractitionerName' => '细菌性痢疾-检查医师', + 'bacterialDysenteryDate' => '细菌性痢疾-检查日期', + 'hasTyphoid' => '伤寒和副伤寒(1有 2无)', + 'typhoidNote' => '伤寒和副伤寒-备注', + 'typhoidPractitionerNumber' => '伤寒和副伤寒-检查医师执业证书编号', + 'typhoidPractitionerLocalId' => '伤寒和副伤寒-检查医师机构内编码', + 'typhoidPractitionerName' => '伤寒和副伤寒-检查医师', + 'typhoidDate' => '伤寒和副伤寒-检查日期', + 'hasViralHepatitis' => '病毒性肝炎(甲型、戊型)(1有 2无)', + 'viralHepatitisNote' => '病毒性肝炎-备注', + 'viralHepatitisPractitionerNumber' => '病毒性肝炎-检查医师执业证书编号', + 'viralHepatitisPractitionerLocalId' => '病毒性肝炎-检查医师机构内编码', + 'viralHepatitisPractitionerName' => '病毒性肝炎-检查医师', + 'viralHepatitisDate' => '病毒性肝炎-检查日期', + 'hasActiveTB' => '活动性肺结核(1有 2无)', + 'activeTBNote' => '活动性肺结核-备注', + 'activeTBPractitionerNumber' => '活动性肺结核-检查医师执业证书编号', + 'activeTBPractitionerLocalId' => '活动性肺结核-检查医师机构内编码', + 'activeTBPractitionerName' => '活动性肺结核-检查医师', + 'activeTBDate' => '活动性肺结核-检查日期', + 'hasSkinDiseases' => '化脓性或渗出性皮肤病(1有 2无)', + 'skinDiseasesNote' => '化脓性或渗出性皮肤病-备注', + 'skinDiseasesPractitionerNumber' => '化脓性或渗出性皮肤病-检查医师执业证书编号', + 'skinDiseasesPractitionerLocalId' => '化脓性或渗出性皮肤病-检查医师机构内编码', + 'skinDiseasesPractitionerName' => '化脓性或渗出性皮肤病-检查医师', + 'skinDiseasesDate' => '化脓性或渗出性皮肤病-检查日期', + 'hasHandFungal' => '手部真菌感染性疾病(如手癣、指甲癣等)(1有 2无 -1未检查)', + 'handFungalNote' => '手部真菌感染性疾病-备注', + 'handFungalPractitionerNumber' => '手部真菌感染性疾病-检查医师执业证书编号', + 'handFungalPractitionerLocalId' => '手部真菌感染性疾病-检查医师机构内编码', + 'handFungalPractitionerName' => '手部真菌感染性疾病-检查医师', + 'handFungalDate' => '手部真菌感染性疾病-检查日期', + 'hasCholera' => '霍乱(1有 2无 -1未检查)', + 'choleraNote' => '霍乱-备注', + 'choleraPractitionerNumber' => '霍乱-检查医师执业证书编号', + 'choleraPractitionerLocalId' => '霍乱-检查医师机构内编码', + 'choleraPractitionerName' => '霍乱-检查医师', + 'choleraTestDate' => '霍乱-检查日期', + 'hasAmebicDysentery' => '阿米巴性痢疾(1有 2无 -1未检查)', + 'amebicDysenteryNote' => '阿米巴性痢疾-备注', + 'amebicDysenteryPractitionerNumber' => '阿米巴性痢疾-检查医师执业证书编号', + 'amebicDysenteryPractitionerLocalId' => '阿米巴性痢疾-检查医师机构内编码', + 'amebicDysenteryPractitionerName' => '阿米巴性痢疾-检查医师', + 'amebicDysenteryDate' => '阿米巴性痢疾-检查日期', + 'hasHandEczema' => '手部湿疹(1有 2无 -1未检查)', + 'handEczemaNote' => '手部湿疹-备注', + 'handEczemaPractitionerNumber' => '手部湿疹-检查医师执业证书编号', + 'handEczemaPractitionerLocalId' => '手部湿疹-检查医师机构内编码', + 'handEczemaPractitionerName' => '手部湿疹-检查医师', + 'handEczemaDate' => '手部湿疹-检查日期', + 'hasHandPsoriasis' => '手部的银屑病或者鳞屑(1有 2无 -1未检查)', + 'handPsoriasisNote' => '手部的银屑病或者鳞屑-备注', + 'handPsoriasisPractitionerNumber' => '手部的银屑病或者鳞屑-检查医师执业证书编号', + 'handPsoriasisPractitionerLocalId' => '手部的银屑病或者鳞屑-检查医师机构内编码', + 'handPsoriasisPractitionerName' => '手部的银屑病或者鳞屑-检查医师', + 'handPsoriasisDate' => '手部的银屑病或者鳞屑-检查日期', + 'validityDate' => '健康证明生效日期', + 'expiryDate' => '健康证明有效截止日期', + 'effectiveTime' => '健康证明出具时间', + 'updateTime' => '健康证明更新时间', + 'healthCertificateUrl' => '从业人员健康证明非结构化文档地址(北京市地址)', + 'healthCertificateUrlPt' => '从业人员健康证明非结构化文档地址(区平台地址)', + 'isEffective' => '是否有效' + ]; + + // 构建中文键值对 + $translatedInfo = []; + foreach ($fieldMapping as $key => $chineseKey) { + if (isset($infoArray[$key])) { + if($key=='photo' and !empty($infoArray[$key])) { + $relativePath = substr($infoArray[$key], strlen('/storage')); + $infoArray[$key]=Storage::disk('public')->url($relativePath); + } + $translatedInfo[$chineseKey] = $infoArray[$key]; + } + } + + // 返回结果 + return \Yz::Return(true, "查询完成", ['info' => $translatedInfo]); + } + + + //按机构统计 + public function CountByOrg(Request $request) + { + $s_group = [1, 8]; + $userid = $request->get('userid');//中间件产生的参数 + $group = $request->get('role');//中间件产生的参数 + $searchInfo = request('searchInfo'); + if (!in_array($group, $s_group)) { + return \Yz::echoError1("无权限查看此数据"); + } + if(empty($searchInfo['dateRange'])){ + $searchInfo['dateRange']=[ + date('Y-m-d')." 00:00:00", + date('Y-m-d')." 23:59:59" + ]; + } + $list = DB::table('health_certificate_push') + ->select( + 'hospitalCode as org_code', + 'hospitalName as org_name', + DB::raw('COUNT(DISTINCT healthCertificateId) as count') + ); + if (isset($searchInfo['dateRange'])) { + $list = $list->whereBetween('created_at', $searchInfo['dateRange']); + } else { + $list = $list->whereBetween('created_at', [date('Y-m-d'), date('Y-m-d')]); + } + $list = $list->groupBy('hospitalCode', 'hospitalName') + ->get(); + return \Yz::Return(true,'查询成功',['list'=>$list,'dateRange'=>$searchInfo['dateRange']]); + } + + //按月统计 + public function CountByMonth(Request $request) + { + $s_group = [1, 8]; + $userid = $request->get('userid');//中间件产生的参数 + $group = $request->get('role');//中间件产生的参数 + $searchInfo = request('searchInfo'); + if (!in_array($group, $s_group)) { + return \Yz::echoError1("无权限查看此数据"); + } + if(empty($searchInfo['dateRange'])){ + $searchInfo['dateRange']=[ + date('Y-m-d')." 00:00:00", + date('Y-m-d')." 23:59:59" + ]; + } + $list = DB::table('health_certificate_push') + ->select( + DB::raw("DATE_FORMAT(created_at, '%Y-%m') as month"), + DB::raw('COUNT(DISTINCT healthCertificateId) as count') + ); + if (isset($searchInfo['dateRange'])) { + $list = $list->whereBetween('created_at', $searchInfo['dateRange']); + } else { + $list = $list->whereBetween('created_at', [date('Y-m-d'), date('Y-m-d')]); + }; + + $list = $list->groupBy(DB::raw("DATE_FORMAT(created_at, '%Y-%m')")) + ->orderBy(DB::raw("DATE_FORMAT(created_at, '%Y-%m')"), 'asc') + ->get(); + + return \Yz::Return(true,'查询成功',['list'=>$list,'dateRange'=>$searchInfo['dateRange']]); + } +} diff --git a/Laravel/routes/api.php b/Laravel/routes/api.php index cf3ff48..0c5e732 100644 --- a/Laravel/routes/api.php +++ b/Laravel/routes/api.php @@ -61,8 +61,14 @@ Route::group(['middleware'=>['checktoken','log'],'prefix'=>'v1'],function () { Route::post('admin/SaveConfig','App\Http\Controllers\API\Admin\YeWu\ConfigsController@SaveConfig');//保存设置 Route::post('admin/AppointmentGetPicList','App\Http\Controllers\API\Admin\YeWu\AppointmentController@GetPicList'); //获取预约记录图片 - Route::post('admin/CheckUpCount','App\Http\Controllers\API\Admin\YeWu\HealthCheckupController@CheckUpCount');//体检统计 + + //平台推送相关 + Route::post('admin/PingTaiPushGetList','App\Http\Controllers\API\Admin\YeWu\PingTaiPushController@GetList'); + Route::post('admin/PingTaiPushCountByOrg','App\Http\Controllers\API\Admin\YeWu\PingTaiPushController@CountByOrg'); + Route::post('admin/PingTaiPushCountByMonth','App\Http\Controllers\API\Admin\YeWu\PingTaiPushController@CountByMonth'); + Route::post('admin/PingTaiPushGetDetail','App\Http\Controllers\API\Admin\YeWu\PingTaiPushController@GetDetail'); + }); diff --git a/el-admin/.env.production b/el-admin/.env.production index 3e024d3..2205e17 100644 --- a/el-admin/.env.production +++ b/el-admin/.env.production @@ -1,6 +1,6 @@ ENV = 'production' -VITE_APP_API_66666666 = 'http://192.168.50.123:33583/common/la/public/api/' -VITE_APP_FILE_66666666 = 'http://192.168.50.123:33583/common/la/public' +VITE_APP_API = 'http://192.168.50.123:33583/common/la/public/api/' +VITE_APP_FILE = 'http://192.168.50.123:33583/common/la/public' -VITE_APP_API = 'http://172.31.68.39:33583/common/la/public/api/' -VITE_APP_FILE = 'http://172.31.68.39:33583/common/la/public' \ No newline at end of file +VITE_APP_API_66666666 = 'http://172.31.68.39:33583/common/la/public/api/' +VITE_APP_FILE_66666666 = 'http://172.31.68.39:33583/common/la/public' \ No newline at end of file diff --git a/el-admin/src/api/api.js b/el-admin/src/api/api.js index f5eb89d..477e15e 100644 --- a/el-admin/src/api/api.js +++ b/el-admin/src/api/api.js @@ -172,4 +172,18 @@ export const CheckUpCount = (data={}) => { //获取预约记录图片 export const AppointmentGetPicList = (data={}) => { return axios({url:import.meta.env.VITE_APP_API+'v1/admin/AppointmentGetPicList',data:data}) +} + +//平台推送相关 +export const PingTaiPushGetList = (data={}) => { + return axios({url:import.meta.env.VITE_APP_API+'v1/admin/PingTaiPushGetList',data:data}) +} +export const PingTaiPushCountByOrg = (data={}) => { + return axios({url:import.meta.env.VITE_APP_API+'v1/admin/PingTaiPushCountByOrg',data:data}) +} +export const PingTaiPushCountByMonth = (data={}) => { + return axios({url:import.meta.env.VITE_APP_API+'v1/admin/PingTaiPushCountByMonth',data:data}) +} +export const PingTaiPushGetDetail = (data={}) => { + return axios({url:import.meta.env.VITE_APP_API+'v1/admin/PingTaiPushGetDetail',data:data}) } \ No newline at end of file diff --git a/el-admin/src/router/index.js b/el-admin/src/router/index.js index dcc1624..d416fc0 100644 --- a/el-admin/src/router/index.js +++ b/el-admin/src/router/index.js @@ -103,6 +103,11 @@ const router = createRouter({ meta: { title: '系统参数设置' } + }, { + path: '/pushilist', + name: 'pingTaiPushList', + component: () => import('../views/PingTai/PushList.vue'), + meta: { title: '平台推送列表' } }] }, diff --git a/el-admin/src/views/MedicalCenter/Dashboard.vue b/el-admin/src/views/MedicalCenter/Dashboard.vue index 3b9ef65..e7049d7 100644 --- a/el-admin/src/views/MedicalCenter/Dashboard.vue +++ b/el-admin/src/views/MedicalCenter/Dashboard.vue @@ -51,7 +51,10 @@ onMounted } from 'vue' import { - AppointmentCount,AppointmentCountByMonth,GetHealthOrganizationEnableList + AppointmentCount,AppointmentCountByMonth,GetHealthOrganizationEnableList, + PingTaiPushGetList, + PingTaiPushCountByOrg, + PingTaiPushCountByMonth } from '@/api/api.js' import * as echarts from 'echarts'; let loading = ref(false) @@ -74,7 +77,7 @@ //获取体检机构预约登记数量 const GetJiGouAppointmentCount=()=>{ loading.value=true - AppointmentCount({searchInfo:searchInfo.value}).then(res => { + PingTaiPushCountByOrg({searchInfo:searchInfo.value}).then(res => { loading.value=false if (res.status) { AppointmentZhuZhuangTu(res.data) @@ -88,7 +91,7 @@ } //获取体检机构预约登记数量(按月) const GetJiGouAppointmentCountByMonth=()=>{ - AppointmentCountByMonth({searchInfo:searchInfo.value}).then(res => { + PingTaiPushCountByMonth({searchInfo:searchInfo.value}).then(res => { if (res.status) { AppointmentZheXianTu(res.data) } else { diff --git a/el-admin/src/views/PingTai/PushList.vue b/el-admin/src/views/PingTai/PushList.vue new file mode 100644 index 0000000..81c7ada --- /dev/null +++ b/el-admin/src/views/PingTai/PushList.vue @@ -0,0 +1,175 @@ + + + + + + 机构名称 + + + + + + 时间段 + + + + + + + 搜索 + + + + + + + + + + + + + + + + + 查看详情 + + + + + + + + + + + + + + {{ value || '——' }} + + + + + + + + + + + + \ No newline at end of file