diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f45219c --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/vendor/ +/.idea \ No newline at end of file diff --git a/module/Application/Controller/IndexController.php b/module/Application/Controller/IndexController.php new file mode 100644 index 0000000..128eced --- /dev/null +++ b/module/Application/Controller/IndexController.php @@ -0,0 +1,369 @@ + 1, + 'event_from' => array_rand($formData), + 'event_id' => $i, + 'create_time' => time(), + 'log_ip' => '127.0.0.1', + 'oper_type' => array_rand($oper_type), + 'log_type' => array_rand($log_type), + 'change_data' => '测试' + ]; + + yield $logData; + } + } + + public function indexAction() + { + die('123'); + set_time_limit(0); + $datas = self::yieldFuc(10000); + foreach($datas as $data){ + $this->LocalService()->adminLog->save($data); + } + exit('finish'); + + echo "
";print_r($this->LocalService()->identity->getIdentityData());exit;
+        for($i = 19728; $i <= 19830; $i++){
+            echo $i.' ';
+        }
+        exit;
+        $formFieldData = $this->Introduce(self::Genercsetinfotype);
+        $formFieldData = empty($formFieldData) ? [] : array_values($formFieldData);
+        $formValData = 1 ? $this->LocalService()->dictionaryGenercsetinfotype->fetchOne(['where' => 'id = 1']) : [];
+
+        return $this->RenderApiJson()->Success($formValData, '', ['formFieldData' => $formFieldData]);
+
+
+
+        $maxId = $this->LocalService()->adminUser->getOneFieldVal('id', 'status = 1', 'id desc');
+        $maxOrder = $this->LocalService()->adminUser->getMaxOrder('id', 'status = 1');
+        echo 'maxId:'.$maxId.'   
'; + echo 'maxOrder:'.$maxOrder.'
';exit; + $this->LocalService()->adminUser->check_field_repeat('mobile', '15001062410', ['field' => 'is_del', 'value' => 1]); + + + // 操作前数据 + $oprt_pre = [ + 'id' => 1, + 'name' => '张三', + 'status' => 0, + 'mobile' => '12345678901', + 'role_id' => 1 + ]; + + // 操作后数据 + $oprt_last = [ + 'id' => 1, + 'name' => '张山', + 'status' => 0, + 'mobile' => '01234567890', + 'role_id' => '1,2,3,4,5' + ]; + + //日志文件数据 + $logData = [ + 'event' => 'AdminUser', + 'ip' => '127.0.0.1', + 'user_id' => 1, + 'user_name' => '超级管理员', + 'time' => time(), + 'oprt_pre' => $oprt_pre, + 'oprt_last' => $oprt_last + ]; + // 获取修改的字段 + $changeData = array_diff_assoc($logData['oprt_last'], $logData['oprt_pre']); + if(!empty($changeData)){ + $formMapData = include $_SERVER['DOCUMENT_ROOT'].'/../data/FormData/formMap.php'; + $form_col_desc_data = include $_SERVER['DOCUMENT_ROOT'].'/../data/FormData/'.$logData['event'].'Data.php'; + $event_name = $formMapData[$logData['event']]; + foreach($changeData as $changeKey => &$changeVal){ + if(isset($form_col_desc_data[$changeKey]['val_source']) and is_callable($form_col_desc_data[$changeKey]['val_source'])){ + $changeVal = $form_col_desc_data[$changeKey]['val_source']($this->LocalService(), $changeVal); + } + $desc_data[] = $form_col_desc_data[$changeKey]['title'].':'.$changeVal; + } + } + echo "
";print_r($changeData);
+        echo $logData['user_name'].' 修改了:

'.implode('
', $desc_data); + echo "
";print_r($logData);exit;
+        if (class_exists(AdminModule::class, false)) {
+            return $this->redirect()->toRoute('api-tools/ui');
+        }
+        return new ViewModel();
+    }
+
+    protected int $contentId = 0;
+    protected string $prop = '';
+    public function testAction()
+    {
+        $model = new ExportModel();
+//        $model->exportLogicError();
+        //2267; // pumch - 1101
+        ExcelHelper::exportExcel($model->exportLogicError(1101), [
+            [
+                ['项目ID', 'item_id', 'text'],
+                ['中心编号', 'sign_id', 'text'],
+                ['筛选号', 'patient_id', 'text'],
+                ['访视名称', 'checktime_id', 'text'],
+                ['表单名称', 'form_id', 'text'],
+                ['字段名称', 'prop', 'text'],
+                ['原来值', 'origin_value', 'text'],
+                ['更正值', 'value', 'text'],
+//                ['更正原因', 'note', 'text'],
+                ['质疑内容', 'expression_note', 'text'],
+                ['质疑时间', 'create_time', 'text'],
+                ['质疑发出人员/角色', 'create_user_id', 'text'],
+                ['质疑回复内容', 'reply_content', 'text'],
+                ['质疑回复时间', 'replay_time', 'text'],
+                ['质疑回复人员/角色', 'replay_user_id', 'text'],
+                ['质疑关闭时间', 'is_closed', 'text'],
+                ['质疑关闭人员/角色', 'closed_user_id', 'text'],
+            ]
+            ], time(), 'xlsx', '', ['质疑数据']);
+        die;
+//        $a = new App();
+//        $a->itemId = 1084;
+//        $a->signId = 1248;
+//        $a->menuId = App::MODULE_CS;
+//        $a->push([37]);
+//        die('123123');
+//        var_dump(Laminas::$serviceManager->itemForm->getPreviewConfig(518, true));die;
+//        $model = new SyncPatientFormJob();
+//            $model = new FormContentXmlGenerator();
+//        $model->patientId = 4134;
+//        $model->itemSignId = 272;
+//        $model->itemId = 101;
+//        $model->formId = 947; // 3917 //747 717;
+//        $model->checkTimeId = 566; //747 717;
+//            $xmlModel = new XmlBuilder();
+//                $data = $xmlModel->build($model->generate());
+//                echo $data;die;
+////                echo json_encode($data, JSON_UNESCAPED_SLASHES);die;
+//////            $model->run();
+//        echo QueueApplication::push($model);die;
+//        die;
+
+        $model = new LaboratoryXmlGenerator();
+//        $model->setHeader([
+//            [
+//                'key' => 'TEST',
+//                'value' => '是',
+//                'transactionType' => 'Insert',
+//            ],
+//            [
+//                'key' => 'DATE',
+//                'value' => '2022-1-1',
+//                'transactionType' => 'Update',
+//            ]
+//        ]);
+//        $model->setContent(
+//            [
+//               [
+//                   ['itemOID' => 'INDICATORS', 'transactionType' => 'Insert', 'value' => '白细胞'], // 指标
+//                   ['itemOID' => 'UNIT', 'transactionType' => 'Insert', 'value' => '10^9/L'], // 单位
+//               ],
+//               [
+//                   ['itemOID' => 'INDICATORS', 'transactionType' => 'Insert', 'value' => '中性粒细胞绝对值'], // 指标
+//                   ['itemOID' => 'UNIT', 'transactionType' => 'Insert', 'value' => '10^9/L'], // 单位
+////                   ['itemOID' => 'RESULT', 'transactionType' => 'Insert', 'value' => '4.05'], // 结果
+////                   ['itemOID' => 'RANGE', 'transactionType' => 'Insert', 'value' => '1.8-6.3'], // 范围
+////                   ['itemOID' => 'NORMAL', 'transactionType' => 'Insert', 'value' => 'true'], // 正常
+//               ]
+//            ]
+//        );
+//        $model->setFormId(3946);
+//        $model->setPatientId(1992);
+//        $model->generate();
+//        $builder = new XmlBuilder();
+//
+//        echo $builder->build($model->generate());die;
+        $query = Laminas::$serviceManager->patient->fetchAll([
+//            'where' => ['item_id' => 1084, 'itemsig_id' => 1344, 'is_del' => 0]
+            'where' =>
+                [
+//                'id' => [2032, 2069, 2640, 4134, 4557, 5015, 5358, 5488, 5531, 5599, 5659, 5769, 6083]
+//                'id' => [4814, 4813, 2032, 2069, 2640, 4134, 4557, 5015, 5358, 5488, 5531, 5599, 5659, 5769, 6083]//[2032, 2069, 2640, 4134, 4557, 5015, 5358, 5488, 5531, 5599, 5659, 5769, 6083],
+//                'id' => [2069, 2640, 4134, 4557, 5015, 5358, 5488, 5531, 5599, 5659, 5769, 6083],
+                'id' => [5651, 5652, 5878, 6127, 6146],
+//                'id' => [2367, 2368, 2369, 2370, 2539, 2540, 2541, 4813, 2863, 2864, 2865, 2866, 4814, 4584, 4585, 5651, 5652, 5669, 5670, 5878, 5879, 5941, 6127, 6146]
+            ] // 1043
+//            'where' => ['id' => [2367, 2368, 2369, 2370, 2539, 2540, 2541, 2863, 2864, 2865, 2866, 4584, 4585]]  // 2368, 2369, 2370, 2539, 2540, 2541, 2863, 2864, 2865, 2866, 4584, 4585
+//            'where' => ['id' => 2069] // 1043
+        ]);
+//
+//        $model = new SyncPatientFormJob();
+////                    $model = new FormContentXmlGenerator();
+//            $model->patientId = intval($query[0]['id']);
+//            $model->itemSignId = $query[0]['itemsig_id'];
+//            $model->itemId = intval($query[0]['item_id']);
+//            $model->formId = 3921; //747 717;
+//            $model->checkTimeId = intval(563); //747 717;
+////            $xmlModel = new XmlBuilder();
+////            $data = $xmlModel->build($model->generate());
+////                echo $data;die;
+//        $model->run();
+//        die;
+//////         新增 一个受试者
+
+//        die;
+
+//        var_dump($query);die;
+        // 处理 ae
+        foreach ($query as $item) {
+//            $model = new SyncPatientJob();
+//////            $model = new PatientXmlGenerator();
+//            $model->patientId = intval($item['id']); // 受试者id
+//            $model->itemSignId = $item['itemsig_id']; // 中心id
+////            $xmlModel = new XmlBuilder();
+////            $data = $xmlModel->build($model->generate());
+////            echo $data;die;
+////            $model->run();
+//            echo QueueApplication::push($model);
+//            // 1406, 1407, 1409, 1410, 1411, 1412, 1408, 1413, 1414, 99
+//
+////            foreach ([560, 561, 562, 575, 563, 564, 565, 566, 570, 567, 571, 569, 572, 573, 99] as $v) {
+//            foreach ([1409] as $v) {
+//                $model = new SyncPatientFormJob();
+////                $model = new FormContentXmlGenerator();
+//                $model->patientId = intval($item['id']);
+//                $model->itemSignId = 1344; //$item['itemsig_id'];
+//                $model->itemId = 1084; // intval($item['item_id']);
+//                $model->formId = 4602; //82841, 2841;
+//                $model->checkTimeId = intval($v); //747 717;
+////                $model->isSync = true;
+////                $xmlModel = new XmlBuilder();
+////                $data = $xmlModel->build($model->generate());
+////                echo json_encode($data, JSON_UNESCAPED_SLASHES);die;
+//                echo QueueApplication::push($model);
+////                $model->isSync = false;
+////                echo QueueApplication::push($model);
+//            }
+//die;
+//            $model = new SyncPatientFormJob();
+//            $model = new FormContentXmlGenerator();
+//            $model->patientId = intval($item['id']);
+//            $model->itemSignId = 272; //$item['itemsig_id'];
+//            $model->itemId = 101; // intval($item['item_id']);
+//            $model->formId = 3918; //747 717;
+//            $model->checkTimeId = intval(1412); //747 717;
+////            $model->isDeleteItemData = true;
+////            echo QueueApplication::push($model);die;
+//            $xmlModel = new XmlBuilder();
+//            $data = $xmlModel->build($model->generate());
+//            echo json_encode($data, JSON_UNESCAPED_SLASHES);die;
+            $this->syncPatientForm($item);
+        }
+        die;
+    }
+
+    private function syncPatientForm(array $query)
+    {
+        $allCheckTime = Laminas::$serviceManager->itemPatientchecktime->fetchAll([
+            'columns' => ['checktime_id'],
+            'where' => [
+                'patient_id' => $query['id']
+            ]
+        ]);
+
+        $allCheckTime[] = [
+            'checktime_id' => 99
+        ];
+
+        foreach ($allCheckTime as $checkTime) {
+            if ($checkTime['checktime_id'] == 99) {
+                $allFormId = Laminas::$serviceManager->itemForm->fetchCol('id', [
+                    'item_id' => $query['item_id'],
+                    'group_id' => [FormGroup::SAE, FormGroup::AE, FormGroup::THROUGH_PROCESS, FormGroup::TEST_SUMMARY],
+                    'is_del' => 0
+                ]);
+            } else {
+                $allFormId = Laminas::$serviceManager->patientForm->fetchCol('form_id', ['patient_id' => $query['id'], 'is_del' => 0, 'checktime_id' => $checkTime['checktime_id']]);
+            }
+
+            $allFormId = array_unique(array_values($allFormId));
+
+            foreach ($allFormId as $formId) {
+//                var_dump($formId);
+//                $formId = intval($formId['form_id']);
+
+                $form = Laminas::$serviceManager->itemForm->fetchOne([
+                    'where' => ['id' => $formId]
+                ]);
+
+                if ($form['group_id'] != FormGroup::CHECK_OCR) {
+                    continue;
+                }
+
+                if ($checkTime['checktime_id'] != 99) {
+                    if (in_array($form['group_id'], [FormGroup::SAE, FormGroup::AE, FormGroup::THROUGH_PROCESS, FormGroup::TEST_SUMMARY])) {
+                        continue;
+                    }
+                }
+                $model = new SyncPatientFormJob();
+//            $model = new FormContentXmlGenerator();
+                $model->patientId = intval($query['id']);
+                $model->itemSignId = $query['itemsig_id'];
+                $model->itemId = intval($query['item_id']);
+                $model->formId = $formId; //747 717;
+                $model->checkTimeId = intval($checkTime['checktime_id']); //747 717;
+                // 有数据说明写了
+//                if ($model->isSync() === false || $model->getFormContent('fetchOne', false) === false || $model->getIsProcessSync() === true) {
+//                    continue;
+//                }
+//                $model->formContent = [];
+//            $xmlModel = new XmlBuilder();
+//                $data = $xmlModel->build($model->generate());
+//                echo $data;
+//            $model->run();
+                echo "受试者: [{$query['id']}]. 检查点: [{$checkTime['checktime_id']}]. 表单 [{$formId}]. " . PHP_EOL;
+                QueueApplication::push($model);
+            }
+        }
+    }
+}
diff --git a/module/Application/config/cli/laminasCli.config.php b/module/Application/config/cli/laminasCli.config.php
new file mode 100644
index 0000000..175e8b0
--- /dev/null
+++ b/module/Application/config/cli/laminasCli.config.php
@@ -0,0 +1,30 @@
+ [
+        'test' => TestCommand::class,                // 测试
+        'oprtlog' => SwLogCommand::class,            // 系统操作日志
+        'switemtip' => SwItemTipCommand::class,      // webSocket 
+        'sw:timer' => SwTimerCommand::class,          // 定时任务
+        'swTaskSv' => SwTaskCommand::class,          // 异步任务服务
+        'ws:start' => WebSocketCommand::class,
+        'unitTest:start' => UnitTestCommand::class,
+        'run:server' => RunCommand::class,
+    ],
+]; 
\ No newline at end of file
diff --git a/module/Application/config/command.service.config.php b/module/Application/config/command.service.config.php
new file mode 100644
index 0000000..0bbf61c
--- /dev/null
+++ b/module/Application/config/command.service.config.php
@@ -0,0 +1,40 @@
+ [
+        'swLogClient' => Swoole\Client\SwLogClient::class,
+        'swTaskClient' => Swoole\Client\SwTaskClient::class,
+    ],
+    'factories' => [
+        Command\TestCommand::class => ServiceFactory::class,
+        Swoole\Server\SwLogCommand::class => ServiceFactory::class,
+        Swoole\Client\SwLogClient::class => ServiceFactory::class,
+        Swoole\Server\SwItemTipCommand::class => ServiceFactory::class,
+        Swoole\Server\SwTimerCommand::class => ServiceFactory::class,
+        Swoole\Server\SwTaskCommand::class => ServiceFactory::class,
+        Swoole\Client\SwTaskClient::class => ServiceFactory::class,
+        Swoole\Server\WebSocketCommand::class => ServiceFactory::class,
+        UnitTestCommand::class => ServiceFactory::class,
+        RunCommand::class => ServiceFactory::class,
+    ]
+];
\ No newline at end of file
diff --git a/module/Application/config/db.server.config.php b/module/Application/config/db.server.config.php
new file mode 100644
index 0000000..331cec4
--- /dev/null
+++ b/module/Application/config/db.server.config.php
@@ -0,0 +1,798 @@
+ [
+        'itemInfo' => DB\Item\Info::class,
+        'itemCenterdata' => DB\Item\Centerdata::class,
+        'itemDrugbatch' => DB\Item\ItemDrugbatch::class,
+        'itemSigdrugbatch' => DB\Item\ItemSigdrugbatch::class,
+        'itemSigdrugset' => DB\Item\ItemSigdrugset::class,
+        'itemPatientdrugbatch' => DB\Item\ItemPatientdrugbatch::class,
+        'itemPatientdrugset' => DB\Item\ItemPatientdrugset::class,
+        'itemSignatory' => DB\Item\Signatory::class,
+        'itemResearchstage' => DB\Item\Researchstage::class,
+        'itemRandom' => DB\Item\Random::class,
+        'itemJobstaff' => DB\Item\Jobstaff::class,
+        'itemResearchflowcat' => DB\Item\Researchflowcat::class,
+        'itemChecktime' => DB\Item\Checktime::class,
+        'itemCheckname' => DB\Item\Checknames::class,
+        'itemItemdocument' => DB\Item\Itemdocument::class,
+        'itemDocumentcontent' => DB\Item\Documentcontent::class,
+        'itemResearchremark' => DB\Item\Researchremark::class,
+        'itemSuperrole' => DB\Item\Superrole::class,
+        'itemCheckcontent' => DB\Item\Checkcontent::class,
+        'itemPatientcheckcontent' => DB\Item\Patientcheckcontent::class,
+        'DictionaryCheckcategory' => DB\Dictionary\Checkcategory::class,
+        'DictionaryCheckname' => DB\Dictionary\Checkname::class,
+        'DictionaryCsset' => DB\Dictionary\Csset::class,
+        'DictionaryDocument' => DB\Dictionary\Document::class,
+        'Jobstaff' => DB\Item\Jobstaff::class,
+        'Researchflowcat' => DB\Item\Researchflowcat::class,
+        'DictionaryGenercsetinfo' => DB\Dictionary\Genercsetinfo::class,
+        'DictionaryGenercsetinfotype' => DB\Dictionary\Genercsetinfotype::class,
+        'DictionaryPatientattrselect' => DB\Dictionary\Patientattrselect::class,
+        'dictionaryCheckcategory' => DB\Dictionary\Checkcategory::class,
+        'dictionaryCheckname' => DB\Dictionary\Checkname::class,
+        'dictionaryCsset' => DB\Dictionary\Csset::class,
+        'dictionaryDocument' => DB\Dictionary\Document::class,
+        'dictionaryGenercsetinfo' => DB\Dictionary\Genercsetinfo::class,
+        'dictionaryGenercsetinfotype' => DB\Dictionary\Genercsetinfotype::class,
+        'dictionaryItemjob' => DB\Dictionary\Itemjob::class,
+        'dictionaryPatientattr' => DB\Dictionary\Patientattr::class,
+        'dictionaryPatientattrselect' => DB\Dictionary\Patientattrselect::class,
+        'dictionaryChecknameattr' => DB\Dictionary\Checknameattr::class,
+        'dictionaryUnblinding' => DB\Dictionary\Unblinding::class,
+        'dictionaryOcr' => DB\Dictionary\Ocr::class,
+        'dictionaryUnit' => DB\Dictionary\Unit::class,
+        'adminMenu' => DB\Admin\Menu::class,
+        'adminUser' => DB\Admin\User::class,
+        'adminRole' => DB\Admin\Role::class,
+        'adminAppletsrolemenurelation' => DB\Admin\Appletsrolemenurelation::class,
+        'adminAppletsmenu' => DB\Admin\Appletsmenu::class,
+        'roleMenuRelation' => DB\Admin\Rolemenurelation::class,
+        'roleSignatoryRelation' => DB\Admin\Realrolesignatoryrelation::class,
+        'userRoleRelation' => DB\Admin\Userrolerelation::class,
+        'realRole' => DB\Admin\Realrole::class,
+        'adminLog' => DB\Admin\Log::class,
+        'signatoryInfo' => DB\Signatory\Info::class,
+        'signatoryUser' => DB\Signatory\User::class,
+        'signatoryDepartment' => DB\Signatory\Department::class,
+        'patient' => DB\Item\Patient::class,
+        'patientForm' => DB\Item\PatientForm::class,
+        'patientFormContent' => DB\Item\PatientFormContent::class,
+        'patientFormContentImg' => DB\Item\PatientFormContentImg::class,
+        'patientattrs' => DB\Item\Patientattrs::class,
+        'dictionaryForm' => DB\Dictionary\Form::class,
+        'dictionaryFormVersion' => DB\Dictionary\FormVersion::class,
+        'patientCard' => DB\Item\PatientCard::class,
+        'itemRandblock' => DB\Item\Randblock::class,
+        'itemRandgroup' => DB\Item\Randgroup::class,
+        'itemRandnumber' => DB\Item\Randnumber::class,
+        'itemRandomdetails' => DB\Item\Randomdetails::class,
+        'itemBlockgroup' => DB\Item\Blockgroup::class,
+        'dictionaryFormField' => DB\Dictionary\FormField::class,
+        'dictionaryFormFieldText' => DB\Dictionary\ItemFormFieldText::class,
+        'dictionaryFormFieldRadio' => DB\Dictionary\ItemFormFieldRadio::class,
+        'itemFormFieldText' => DB\Item\FormFieldText::class,
+        'itemFormFieldRadio' => DB\Item\FormFieldRadio::class,
+        'dictionaryFormGroup' => DB\Dictionary\FormGroup::class,
+        'itemForm' => DB\Dictionary\ItemForm::class,
+        'itemFormVersion' => DB\Item\ItemFormVersion::class,
+        'itemFormField' => DB\Dictionary\ItemFormField::class,
+        'itemFormGroup' => DB\Dictionary\ItemFormGroup::class,
+        'realRolemodulerelation' => DB\Item\Rolemodulerelation::class,
+        'itemPatientchecktime' => DB\Item\Patientchecktime::class,
+        'itemInformedconsent' => DB\Item\Informedconsent::class,
+        'itemImgtxtdiscern' => DB\Item\Imgtxtdiscern::class,
+        'itemPatientworkannex' => DB\Project\Patientworkannex::class,
+        'itemIdentificationresult' => DB\Project\Identificationresult::class,
+        'itemUnblinding' => DB\Item\Unblindings::class,
+        'itemIdentificationresultchange' => DB\Project\Identificationresultchange::class,
+        'itemUrgentunblind' => DB\Item\Urgentunblind::class,
+        'itemFile' => DB\Item\File::class,
+        'dictionarySetocrfield' => DB\Project\Setocrfield::class,
+        'itemQuestion' => DB\Item\Question::class,
+        'itemReply' => DB\Item\Reply::class,
+        'dictionaryFormRelation' => DB\Dictionary\FormRelation::class,
+        'itemFormRelation' => DB\Item\FormRelation::class,
+        'itemExport' => DB\Item\Export::class,
+        'itemPatientFormContentFieldLock' => DB\Item\PatientFormContentFieldLock::class,
+        'itemPatientbooked' => DB\Item\Patientbooked::class,
+        'itemCsae' => DB\Project\Csae::class,
+        'itemPatientChecktimeForm' => DB\Item\PatientChecktimeForm::class,
+        'itemPatientAeContent' => DB\Item\PatientAeContent::class,
+        'itemCsaeRelation' => DB\Project\CsaeRelation::class,
+        'itemMedication' => DB\Item\Medication::class,
+        'itemAppletsdata' => DB\Item\Appletsdata::class,
+        'itemVicecopy' => DB\Item\Vicecopy::class,
+        'itemInformedconsentsign' => DB\Item\Informedconsentsign::class,
+        'workShow' => DB\Work\Show::class,
+        'workSchedule' => DB\Work\Schedule::class,
+        'workApproval' => DB\Work\Approval::class,
+        'itemDownpicture' => DB\Item\Downpicture::class,
+        'itemCsaeChecked' => DB\Item\ItemCsaeChecked::class,
+        'itemQuestionanswer' => DB\Item\Answer::class,
+        'signatoryPatient' => DB\Item\Signatorypatient::class,
+        'itemAgecountset' => DB\Item\Agecountset::class,
+        'dictionaryRule' => DB\Dictionary\Rule::class,
+        'dictionaryFormtype' => DB\Dictionary\Formtype::class,
+        'dictionaryFormtyperule' => DB\Dictionary\Formtyperule::class,
+        'dictionaryWorkset' => DB\Dictionary\Workset::class,
+        'worklistItemworklist' => DB\Worklist\Itemworklist::class,
+        'worklistItemcustomname' => DB\Worklist\Itemcustomname::class,
+        'worklistItemworklistset' => DB\Worklist\Itemworklistset::class,
+        'worklistSigworklist' => DB\Worklist\Sigworklist::class,
+        'worklistSigcustomname' => DB\Worklist\Sigcustomname::class,
+        'worklistSigworklistset' => DB\Worklist\Sigworklistset::class,
+        'worklistPatientinfo' => DB\Worklist\Patientinfo::class,
+        'worklistPatientconnect' => DB\Worklist\Patientconnect::class,
+        'worklistPatientworklist' => DB\Worklist\Patientworklist::class,
+        'itemFormpatientsign' => DB\Item\Formpatientsign::class,
+        'dictionaryListset' => DB\Dictionary\Listset::class,
+        'listsetItemlist' => DB\Listset\Itemlist::class,
+        'listsetSiglist' => DB\Listset\Siglist::class,
+        'listsetOperate' => DB\Listset\Operate::class,
+        'listsetAnnex' => DB\Listset\Annex::class,
+        'listsetAnnexcat' => DB\Listset\Annexcat::class,
+        'listsetFlow' => DB\Listset\Flow::class,
+        'businessCategory' => DB\Business\Category::class,
+        'businessRecord' => DB\Business\Record::class,
+        'businessRecordannex' => DB\Business\Recordannex::class,
+        'arkQuery' => DB\Ark\ArkQuery::class,
+        'itemBackupschange' => DB\Project\Backupschange::class,
+        'dictionaryQuestionanswer' => DB\Dictionary\Questionanswer::class,
+        'odmSyncRecord' => DB\Odm\OdmSyncRecord::class,
+        'itemInfosign' => DB\Item\ItemInfosign::class,
+        'itemLogtype' => DB\Item\Logtype::class,
+        'itemExportpdf' => DB\Item\Exportpdf::class,
+        'itemIdentificationresultdestroy' => DB\Project\Identificationresultdestroy::class,
+        'patientFormUnlock' => DB\Item\PatientFormUnlock::class, // 受试者表单申请解锁表
+        'patientWorkCount' => DB\Item\PatientWorkCount::class,
+        'itemChangesendlog' => DB\Project\Changesendlog::class,
+        'itemLock' => DB\Item\Lock::class,
+        'adminWebsitefiling' => DB\Admin\Websitefiling::class,
+        'itemDoctoridea' => DB\Project\Doctoridea::class,
+        'itemQuestionconfig' => DB\Dictionary\Questionconfig::class,
+        'Configtable' => DB\Admin\Configtable::class,
+        'patientChecktimeList' => DB\Item\PatientChecktimeList::class,
+        'Send' => DB\Admin\Send::class,
+        'ocrKeyword' => DB\Ocr\Keyword::class,
+        'ocrRawdata' => DB\Ocr\Rawdata::class,
+        'ocrMatedata' => DB\Ocr\Matedata::class,
+        'ocrMedicalword' => DB\Ocr\Medicalword::class,
+        'ocrMatewhite' => DB\Ocr\Matewhite::class,
+        'ocrMateblack' => DB\Ocr\Mateblack::class,
+        'ocrSigpatient' => DB\Ocr\Medicalmate::class,
+        'ocrSigpatient' => DB\Ocr\Sigpatient::class,
+        'ocrMedical' => DB\Ocr\Medical::class,
+        'ocrOcrannex' => DB\Ocr\Ocrannex::class,
+        'ocrRawword' => DB\Ocr\Rawword::class,
+        'ocrRawblack' => DB\Ocr\Rawblack::class,
+        'itemFormmodel' => DB\Item\Formmodel::class,
+        'ocrRawlock' => DB\Ocr\Rawlock::class,
+        'ocrMedicallock' => DB\Ocr\Medicallock::class,
+        'ocrChangetype' => DB\Ocr\Changetype::class,
+        'ocrDeletename' => DB\Ocr\Deletename::class,
+        'ocrReplace' => DB\Ocr\Replace::class,
+        'ocrAnnextype' => DB\Ocr\Annextype::class,
+        'ocrSigkeyword' => DB\Ocr\Sigkeyword::class,
+        'ocrCt' => DB\Ocr\Ct::class,
+        'blindMethodLog' => DB\Item\Blindmethodlog::class,
+        'ocrLoseannex' => DB\Ocr\Loseannex::class,
+        'dictionaryChecknameweight' => DB\Dictionary\Checknameweight::class,
+        'ocrMatesearch' => DB\Ocr\Matesearch::class,
+        'itemChecknameweight' => DB\Item\Checknameweight::class,
+        'itemSign' => DB\Item\Sign::class,
+        'itemOcrCsae' => DB\Project\OcrCsae::class,
+        'itemOcrTitleKeys' => DB\Project\OcrTitleKeys::class,
+        'itemOcrCsaePaitent' => DB\Project\OcrCsaePaitent::class,
+        'itemOcrCsaePaitentDetail' => DB\Project\OcrCsaePatientDetail::class,
+        'itemOcrCasePatientSpecialdetail' => DB\Project\OcrCasePatientSpecialdetail::class,
+        'itemRemarks' => DB\Item\ItemRemarks::class,
+        'ocrCtcase' => DB\Ocr\Ctcase::class,
+        'ocrCaseremark' => DB\Ocr\Caseremark::class,
+        'itemOcrCsaeNew' => DB\Project\OcrCsaeNew::class,
+        'itemOcrCsaePaitentDetailNew' => DB\Project\OcrCsaePatientDetailNew::class,
+        'itemOcrCasePatientSpecialdetailNew' => DB\Project\OcrCasePatientSpecialdetailNew::class,
+        'ocrOcrannexnew' => DB\Ocr\Ocrannexnew::class,
+        'ocrDrug' => DB\Ocr\Drug::class,
+        'ocrTake' => DB\Ocr\Take::class,
+        'ocrCtreplace' => DB\Ocr\Ctreplace::class,
+        'ocrMatedrug' => DB\Ocr\Matedrug::class,
+        'ocrDrugcategory' => DB\Ocr\Drugcategory::class,
+        'dictionaryMedicaltake' => DB\Dictionary\Medicaltake::class,
+        'dictionaryMedicalword' => DB\Dictionary\Medicalword::class,
+        'dictionaryDrugcategory' => DB\Dictionary\Drugcategory::class,
+        'dictionaryDrug' => DB\Dictionary\Drug::class,
+        'itemConfirm' => DB\Item\Confirm::class,
+        'itemLock' => DB\Item\Lock::class,
+        'medicalMatewhite' => DB\Medical\Matewhite::class,
+        'medicalMateblack' => DB\Medical\Mateblack::class,
+        'medicalMatedrug' => DB\Medical\Matedrug::class,
+        'medicalOcrdata' => DB\Medical\Ocrdata::class,
+        'medicalLock' => DB\Medical\Lock::class,
+        'Allowpatientwrite' => DB\Item\Allowpatientwrite::class,
+        'changeUpdateLog' => DB\Project\Changeupdatelog::class,
+        'Recharge' => DB\Pay\Recharge::class,
+        'Transfer' => DB\Pay\Transfer::class,
+        'tmpDeletename' => DB\Tmp\Deletename::class,
+        'tmpDrug' => DB\Tmp\Drug::class,
+        'tmpDrugcategory' => DB\Tmp\Drugcategory::class,
+        'tmpKeyword' => DB\Tmp\Keyword::class,
+        'tmpMedical' => DB\Tmp\Medical::class,
+        'tmpMedicalblack' => DB\Tmp\Medicalblack::class,
+        'tmpMedicaldrug' => DB\Tmp\Medicaldrug::class,
+        'tmpMedicallock' => DB\Tmp\Medicallock::class,
+        'tmpMedicaltake' => DB\Tmp\Medicaltake::class,
+        'tmpMedicalwhite' => DB\Tmp\Medicalwhite::class,
+        'tmpMedicalword' => DB\Tmp\Medicalword::class,
+        'tmpRawblack' => DB\Tmp\Rawblack::class,
+        'tmpRawdata' => DB\Tmp\Rawdata::class,
+        'tmpRawlock' => DB\Tmp\Rawlock::class,
+        'tmpRawmate' => DB\Tmp\Rawmate::class,
+        'tmpRawword' => DB\Tmp\Rawword::class,
+        'tmpReplace' => DB\Tmp\Replace::class,
+        'tmpSigkeyword' => DB\Tmp\Sigkeyword::class,
+        'tmpHospital' => DB\Tmp\Hospital::class,
+        'tmpInspect' => DB\Tmp\Inspect::class,
+        'tmpPatienthospital' => DB\Tmp\Patienthospital::class,
+        'tmpReport' => DB\Tmp\Report::class,
+        'dictionaryDiseasecategory' => DB\Dictionary\Diseasecategory::class,
+        'dictionaryDisease' => DB\Dictionary\Disease::class,
+        'tmpAnnex' => DB\Tmp\Annex::class,
+        'tmpPatient' => DB\Tmp\Patient::class,
+        'tmpPatientct' => DB\Tmp\Patientct::class,
+        'tmpCustom' => DB\Tmp\Custom::class,
+        'tmpTable' => DB\Tmp\Table::class,
+        'tmpText' => DB\Tmp\Text::class,
+        'tmpOutmedical' => DB\Tmp\Outmedical::class,
+        'tmpIntervene' => DB\Tmp\Intervene::class,
+        'tmpIntervene0' => DB\Tmp\Intervene0::class,
+        'tmpIntervene1' => DB\Tmp\Intervene1::class,
+        'tmpIntervene2' => DB\Tmp\Intervene2::class,
+        'ocrRawlockunique' => DB\Ocr\Rawlockunique::class,
+        'tmpCtreplace' => DB\Tmp\Ctreplace::class,
+        'TmpDoctoradviceoriginal' => DB\Tmp\Doctoradviceoriginal::class,
+        'tmpDoctoradvicelock' => DB\Tmp\Doctoradvicelock::class,
+        'tmpDoctoradviceannex' => DB\Tmp\Doctoradviceannex::class,
+        'tmpDoctoradvicereplace' => DB\Tmp\Doctoradvicereplace::class,
+        'tmpDoctoradvicematewhite' => DB\Tmp\Doctoradvicematewhite::class,
+        'tmpDoctoradvicemateblack' => DB\Tmp\Doctoradvicemateblack::class,
+        'tmpDoctoradvicematedrug' => DB\Tmp\Doctoradvicematedrug::class,
+        'tmpDoctoradvicetable' => DB\Tmp\Doctoradvicetable::class,
+        'tmpDoctoradvicepatient' => DB\Tmp\Doctoradvicepatient::class,
+        'tmpDoctoradviceformal' => DB\Tmp\Doctoradviceformal::class,
+        'itemMessageField' => DB\Item\MessageField::class,
+        'itemMessageSend' => DB\Item\MessageSend::class,
+        'itemMessageSendPatient' => DB\Item\MessageSendPatient::class,
+        'itemMessageSendLog' => DB\Item\MessageSendLog::class,
+        'collectCategory' => DB\Collect\Category::class,
+        'collectInspect' => DB\Collect\Inspect::class,
+        'collectHospital' => DB\Collect\Hospital::class,
+        'collectItemhospital' => DB\Collect\Itemhospital::class,
+        'collectOut' => DB\Collect\Out::class,
+        'collectItemout' => DB\Collect\Itemout::class,
+        'collectDrugcategory' => DB\Collect\Drugcategory::class,
+        'collectDrug' => DB\Collect\Drug::class,
+        'collectMedicaltake' => DB\Collect\Medicaltake::class,
+        'collectMedicalword' => DB\Collect\Medicalword::class,
+        'collectItemdrug' => DB\Collect\Itemdrug::class,
+        'collectEcg' => DB\Collect\Ecg::class,
+        'collectItemecg' => DB\Collect\Itemecg::class,
+        'collectCt' => DB\Collect\Ct::class,
+        'collectItemct' => DB\Collect\Itemct::class,
+        'collectReport' => DB\Collect\Report::class,
+        'collectItemreport' => DB\Collect\Itemreport::class,
+        'collectKeywordcat' => DB\Collect\Keywordcat::class,
+        'collectKeyword' => DB\Collect\Keyword::class,
+        'collectRawword' => DB\Collect\Rawword::class,
+        'collectItemkeyword' => DB\Collect\Itemkeyword::class,
+        'collectCost' => DB\Collect\Cost::class,
+        'collectItemcost' => DB\Collect\Itemcost::class,
+        'itemMessagePatientChase' => DB\Item\MessageSendPatientChase::class,
+        'collectPatienthospital' => DB\Collect\Patienthospital::class,
+        'itemChangeReference' => DB\Project\ChangeReference::class,
+        'collectPatientecg' => DB\Collect\Patientecg::class,
+        'collectPatientct' => DB\Collect\Patientct::class,
+        'collectPatientreport' => DB\Collect\Patientreport::class,
+        'collectPatientraw' => DB\Collect\Patientraw::class,
+        'collectPatientrawmate' => DB\Collect\Patientrawmate::class,
+        'collectPatientrawblack' => DB\Collect\Patientrawblack::class,
+        'collectPatientrawlock' => DB\Collect\Patientrawlock::class,
+        'collectPatientmedical' => DB\Collect\Patientmedical::class,
+        'collectPatientmedicalwhite' => DB\Collect\Patientmedicalwhite::class,
+        'collectPatientmedicalblack' => DB\Collect\Patientmedicalblack::class,
+        'collectPatientmedicaldrug' => DB\Collect\Patientmedicaldrug::class,
+        'collectPatientmedicallock' => DB\Collect\Patientmedicallock::class,
+        'collectPatientout' => DB\Collect\Patientout::class,
+        'ocrSpecialmedical' => DB\Ocr\Specialmedical::class,
+        'collectPatient' => DB\Collect\Patient::class,
+        'collectAnnex' => DB\Collect\Annex::class,
+        'exportSas' => DB\Export\Sas::class,
+        'collectSighospital' => DB\Collect\Sighospital::class,
+        'collectSigout' => DB\Collect\Sigout::class,
+        'collectSigkeyword' => DB\Collect\Sigkeyword::class,
+        'itemFormrecognition' => DB\Project\Itemformrecognition::class,
+        'itemPatientFormContentRecognition' => DB\Project\PatientFormContentRecognition::class,
+        'itemPatientformimgcontent' => DB\Item\Patientformimgcontent::class,
+        'dictionaryDetectname' => DB\Dictionary\Detectname::class,
+        'dictionaryDetectkeyword' => DB\Dictionary\Detectkeyword::class,
+        'collectTable' => DB\Collect\Table::class,
+        'collectText' => DB\Collect\Text::class,
+        'collectCustom' => DB\Collect\Custom::class,
+        'dictionaryDetectblackword' => DB\Dictionary\Detectblackword::class,
+        'itemIdentificationexport' => DB\Project\Identificationexport::class,
+        'itemResultidentify' => DB\Item\ItemResultidentify::class,
+        'itemEventwatchdog' => DB\Item\itemEventwatchdog::class,
+        'templeAnnex' => DB\Temple\Annex::class,
+        'templeChecklist' => DB\Temple\checklist::class,
+        'itemMedicaltake' => DB\Item\ItemMedicaltake::class,
+        'doctoradviceOriginal' => DB\Doctoradvice\DoctoradviceOriginal::class,
+        'itemPatientinfo' => DB\Item\Patientinfo::class,
+        'dictionaryLeverform' => DB\Dictionary\Leverform::class,
+        'dictionaryLevervalue' => DB\Dictionary\Levervalue::class,
+        'itemSignaturebatch' => DB\Item\Signaturebatch::class,
+        'itemSignaturedetail' => DB\Item\Signaturedetail::class,
+        'itemSignatoryCollecttypeocr'  => DB\Item\SignatoryCollecttypeocr::class,
+        'itemDetectpatient' => DB\Item\Detectpatient::class,
+        'dictionaryOcrreplace' => DB\Dictionary\Ocrreplace::class,
+        'itemCissclass' => DB\Item\Cissclass::class,
+        'itemCissoption' => DB\Item\Cissoption::class,
+        'itemPatientciss' => DB\Item\Patientciss::class,
+        'fixednametype' => DB\Dictionary\Fixednametype::class,
+        'fixedname' => DB\Dictionary\Fixedname::class,
+        'projectMsgset' => DB\Project\Msgset::class,
+        'projectMsginfo' => DB\Project\Msginfo::class,
+        'projectMsgsend' => DB\Project\Msgsend::class,
+        'itemPlanviolate' => DB\Item\Planviolate::class,
+        'adminWeblink' => DB\Admin\Weblink::class,
+        'adminWorkbatch' => DB\Admin\Workbatch::class,
+        'adminWorkinfo' => DB\Admin\Workinfo::class,
+        'dictionaryEventset' => DB\Dictionary\Eventset::class,
+        'dictionaryEventattr' => DB\Dictionary\Eventattr::class,
+        'adminMedicallock' => DB\Admin\Medicallock::class,
+        'itemPatientevent' => DB\Item\Patientevent::class,
+        'itemPatienteventannex' => DB\Item\Patienteventannex::class,
+        'itemPatienteventset' => DB\Item\Patienteventset::class,
+        'projectPatientwork' => DB\Project\Patientwork::class,
+        'itemRandomsecondary' => DB\Item\Randomsecondary::class,
+        'projectMedicalquestion' => DB\Project\Medicalquestion::class,
+        'projectMedicalquestioninfo' => DB\Project\Medicalquestioninfo::class,
+        'projectMedicalconfirm' => DB\Project\Medicalconfirm::class,
+        'projectMedicalconfirminfo' => DB\Project\Medicalconfirminfo::class,
+        'projectMedicalset' => DB\Project\Medicalset::class,
+        'itemCheckdate' => DB\Item\Checkdate::class,
+        'dictionaryRegion' => DB\Dictionary\Region::class,
+        'projectExceedswindow' => DB\Project\Exceedswindow::class,
+        'projectCmdrugset' => DB\Project\Cmdrugset::class,
+        'collectPatientdrug' => DB\Collect\Patientdrug::class,
+        'dictionaryItemcategory' => DB\Dictionary\Itemcategory::class,
+        'itemPackage' => DB\Item\Package::class,
+    ],
+    'factories' => [
+        DB\Item\Info::class => DbFactory::class,
+        DB\Item\Centerdata::class => DbFactory::class,
+        DB\Item\ItemDrugbatch::class => DbFactory::class,
+        DB\Item\ItemSigdrugbatch::class => DbFactory::class,
+        DB\Item\ItemSigdrugset::class => DbFactory::class,
+        DB\Item\ItemPatientdrugbatch::class => DbFactory::class,
+        DB\Item\ItemPatientdrugset::class => DbFactory::class,
+        DB\Item\Signatory::class => DbFactory::class,
+        DB\Item\Jobstaff::class => DbFactory::class,
+        DB\Item\Researchflowcat::class => DbFactory::class,
+        DB\Item\Researchstage::class => DbFactory::class,
+        DB\Item\Random::class => DbFactory::class,
+        DB\Item\Checktime::class => DbFactory::class,
+        DB\Item\Checknames::class => DbFactory::class,
+        DB\Item\Itemdocument::class => DbFactory::class,
+        DB\Item\Documentcontent::class => DbFactory::class,
+        DB\Item\Researchremark::class => DbFactory::class,
+        DB\Item\PatientChecktimeForm::class => DbFactory::class,
+        DB\Item\Superrole::class => DbFactory::class,
+        DB\Item\Checkcontent::class => DbFactory::class,
+        DB\Item\Patientcheckcontent::class => DbFactory::class,
+        DB\Dictionary\Checkcategory::class => ShareDbFactory::class,
+        DB\Dictionary\Checkname::class => ShareDbFactory::class,
+        DB\Dictionary\Csset::class => ShareDbFactory::class,
+        DB\Dictionary\Document::class => ShareDbFactory::class,
+        DB\Dictionary\Genercsetinfo::class => ShareDbFactory::class,
+        DB\Dictionary\Genercsetinfotype::class => ShareDbFactory::class,
+        DB\Dictionary\Itemjob::class => ShareDbFactory::class,
+        DB\Dictionary\Patientattr::class => ShareDbFactory::class,
+        DB\Dictionary\Patientattrselect::class => ShareDbFactory::class,
+        DB\Dictionary\Checknameattr::class => ShareDbFactory::class,
+        DB\Dictionary\Unblinding::class => ShareDbFactory::class,
+        DB\Dictionary\Ocr::class => ShareDbFactory::class,
+        DB\Dictionary\Unit::class => ShareDbFactory::class,
+        DB\Admin\Menu::class => DbFactory::class,
+        DB\Admin\User::class => DbFactory::class,
+        DB\Admin\Role::class => DbFactory::class,
+        DB\Admin\Rolemenurelation::class => DbFactory::class,
+        DB\Admin\Userrolerelation::class => DbFactory::class,
+        DB\Admin\Realrole::class => DbFactory::class,
+        DB\Admin\Realrolesignatoryrelation::class => DbFactory::class,
+        DB\Admin\Log::class => DbFactory::class,
+        DB\Admin\Appletsrolemenurelation::class => DbFactory::class,
+        DB\Admin\Appletsmenu::class => DbFactory::class,
+        DB\Signatory\Info::class => DbFactory::class,
+        DB\Signatory\User::class => DbFactory::class,
+        DB\Signatory\Department::class => DbFactory::class,
+        DB\Item\Patient::class => DbFactory::class,
+        DB\Item\Patientattrs::class => DbFactory::class,
+        DB\Dictionary\Form::class => DbFactory::class,
+        DB\Item\PatientCard::class => DbFactory::class,
+        DB\Item\Randblock::class => DbFactory::class,
+        DB\Item\Randgroup::class => DbFactory::class,
+        DB\Item\Randnumber::class => DbFactory::class,
+        DB\Item\Randomdetails::class => DbFactory::class,
+        DB\Item\Blockgroup::class => DbFactory::class,
+        DB\Dictionary\FormField::class => DbFactory::class,
+        DB\Dictionary\FormVersion::class => DbFactory::class,
+        DB\Dictionary\FormGroup::class => DbFactory::class,
+        DB\Dictionary\ItemForm::class => DbFactory::class,
+        DB\Dictionary\ItemFormField::class => DbFactory::class,
+        DB\Item\ItemFormVersion::class => DbFactory::class,
+        DB\Dictionary\ItemFormGroup::class => DbFactory::class,
+        DB\Item\Rolemodulerelation::class => DbFactory::class,
+        DB\Dictionary\ItemFormFieldText::class => DbFactory::class,
+        DB\Dictionary\ItemFormFieldRadio::class => DbFactory::class,
+        DB\Item\FormFieldText::class => DbFactory::class,
+        DB\Item\FormFieldRadio::class => DbFactory::class,
+        DB\Item\Patientchecktime::class => DbFactory::class,
+        DB\Item\PatientForm::class => DbFactory::class,
+        DB\Item\Informedconsent::class => DbFactory::class,
+        DB\Item\Imgtxtdiscern::class => DbFactory::class,
+        DB\Project\Patientworkannex::class => DbFactory::class,
+        DB\Project\Identificationresult::class => DbFactory::class,
+        DB\Item\Unblindings::class => DbFactory::class,
+        DB\Item\PatientFormContent::class => DbFactory::class,
+        DB\Item\PatientFormContentImg::class => DbFactory::class,
+        DB\Project\Identificationresultchange::class => DbFactory::class,
+        DB\Item\Urgentunblind::class => DbFactory::class,
+        DB\Item\File::class => DbFactory::class,
+        DB\Project\Setocrfield::class => DbFactory::class,
+        DB\Item\Question::class => DbFactory::class,
+        DB\Item\Reply::class => DbFactory::class,
+        DB\Dictionary\FormRelation::class => DbFactory::class,
+        DB\Item\FormRelation::class => DbFactory::class,
+        DB\Item\Export::class => DbFactory::class,
+        DB\Item\PatientFormContentFieldLock::class => DbFactory::class,
+        DB\Item\Patientbooked::class => DbFactory::class,
+        DB\Project\Csae::class => DbFactory::class,
+        DB\Item\PatientAeContent::class => DbFactory::class,
+        DB\Project\CsaeRelation::class => DbFactory::class,
+        DB\Item\Medication::class => DbFactory::class,
+        DB\Item\Appletsdata::class => DbFactory::class,
+        DB\Item\Vicecopy::class => DbFactory::class,
+        DB\Item\Informedconsentsign::class => DbFactory::class,
+        DB\Work\Show::class => DbFactory::class,
+        DB\Work\Schedule::class => DbFactory::class,
+        DB\Work\Approval::class => DbFactory::class,
+        DB\Item\Downpicture::class => DbFactory::class,
+        DB\Item\ItemCsaeChecked::class => DbFactory::class,
+        DB\Item\Answer::class => DbFactory::class,
+        DB\Item\Signatorypatient::class => DbFactory::class,
+        DB\Item\Agecountset::class => DbFactory::class,
+        DB\Dictionary\Rule::class => ShareDbFactory::class,
+        DB\Dictionary\Formtype::class => ShareDbFactory::class,
+        DB\Dictionary\Formtyperule::class => ShareDbFactory::class,
+        DB\Dictionary\Workset::class => ShareDbFactory::class,
+        DB\Worklist\Itemworklist::class => ShareDbFactory::class,
+        DB\Worklist\Itemcustomname::class => ShareDbFactory::class,
+        DB\Worklist\Itemworklistset::class => ShareDbFactory::class,
+        DB\Worklist\Sigworklist::class => ShareDbFactory::class,
+        DB\Worklist\Sigcustomname::class => ShareDbFactory::class,
+        DB\Worklist\Sigworklistset::class => ShareDbFactory::class,
+        DB\Worklist\Patientinfo::class => ShareDbFactory::class,
+        DB\Worklist\Patientconnect::class => ShareDbFactory::class,
+        DB\Worklist\Patientworklist::class => ShareDbFactory::class,
+        DB\Item\Formpatientsign::class => ShareDbFactory::class,
+        DB\Dictionary\Listset::class => ShareDbFactory::class,
+        DB\Listset\Itemlist::class => ShareDbFactory::class,
+        DB\Listset\Siglist::class => ShareDbFactory::class,
+        DB\Listset\Operate::class => ShareDbFactory::class,
+        DB\Listset\Annex::class => ShareDbFactory::class,
+        DB\Listset\Annexcat::class => ShareDbFactory::class,
+        DB\Listset\Flow::class => ShareDbFactory::class,
+        DB\Business\Category::class => ShareDbFactory::class,
+        DB\Business\Record::class => ShareDbFactory::class,
+        DB\Business\Recordannex::class => ShareDbFactory::class,
+        DB\Ark\ArkQuery::class => ArkDbFactory::class,
+        DB\Project\Backupschange::class => ShareDbFactory::class,
+        DB\Dictionary\Questionanswer::class => ShareDbFactory::class,
+        DB\Project\Changesendlog::class => ShareDbFactory::class,
+        DB\Odm\OdmSyncRecord::class => DbFactory::class,
+        DB\Item\ItemInfosign::class => DbFactory::class,
+        DB\Item\Logtype::class => DbFactory::class,
+        DB\Item\Exportpdf::class => DbFactory::class,
+        DB\Project\Identificationresultdestroy::class => DbFactory::class,
+        DB\Item\PatientFormUnlock::class => DbFactory::class,
+        DB\Item\PatientWorkCount::class => DbFactory::class,
+        DB\Admin\Websitefiling::class => DbFactory::class,
+        DB\Project\Doctoridea::class => DbFactory::class,
+        DB\Item\PatientFormLogic::class => DbFactory::class,
+        DB\Item\PatientFormLogicError::class => DbFactory::class,
+        DB\Dictionary\Questionconfig::class => EdcDbFactory::class,
+        DB\Admin\Configtable::class => DbFactory::class,
+        DB\Admin\Send::class => DbFactory::class,
+        DB\Item\PatientChecktimeList::class => DbFactory::class,
+        DB\Item\Formmodel::class => DbFactory::class,
+        DB\Ocr\Keyword::class => ShareDbFactory::class,
+        DB\Ocr\Rawdata::class => ShareDbFactory::class,
+        DB\Ocr\Matedata::class => ShareDbFactory::class,
+        DB\Ocr\Medicalword::class => ShareDbFactory::class,
+        DB\Ocr\Matewhite::class => ShareDbFactory::class,
+        DB\Ocr\Mateblack::class => ShareDbFactory::class,
+        DB\Ocr\Sigpatient::class => ShareDbFactory::class,
+        DB\Ocr\Medical::class => ShareDbFactory::class,
+        DB\Ocr\Ocrannex::class => ShareDbFactory::class,
+        DB\Ocr\Rawword::class => ShareDbFactory::class,
+        DB\Ocr\Rawblack::class => ShareDbFactory::class,
+        DB\Ocr\Rawlock::class => ShareDbFactory::class,
+        DB\Ocr\Medicallock::class => ShareDbFactory::class,
+        DB\Ocr\Changetype::class => ShareDbFactory::class,
+        DB\Ocr\Deletename::class => ShareDbFactory::class,
+        DB\Ocr\Replace::class => ShareDbFactory::class,
+        DB\Ocr\Annextype::class => ShareDbFactory::class,
+        DB\Ocr\Sigkeyword::class => ShareDbFactory::class,
+        DB\Ocr\Ct::class => ShareDbFactory::class,
+        DB\Item\Blindmethodlog::class => DbFactory::class,
+        DB\Ocr\Loseannex::class => DbFactory::class,
+        DB\Dictionary\Checknameweight::class => ShareDbFactory::class,
+        DB\Ocr\Matesearch::class => DbFactory::class,
+        DB\Item\Checknameweight::class => DbFactory::class,
+        DB\Item\Sign::class => DbFactory::class,
+        DB\Item\Checknameweight::class => ShareDbFactory::class,
+        DB\Project\OcrCsae::class => DbFactory::class,
+        DB\Project\OcrTitleKeys::class => DbFactory::class,
+        DB\Project\OcrCsaePaitent::class => DbFactory::class,
+        DB\Project\OcrCsaePatientDetail::class => DbFactory::class,
+        DB\Project\OcrCasePatientSpecialdetail::class => DbFactory::class,
+        DB\Item\ItemRemarks::class => DbFactory::class,
+        DB\Ocr\Ctcase::class => ShareDbFactory::class,
+        DB\Ocr\Caseremark::class => ShareDbFactory::class,
+        DB\Project\OcrCsaeNew::class => DbFactory::class,
+        DB\Project\OcrCsaePatientDetailNew::class => DbFactory::class,
+        DB\Project\OcrCasePatientSpecialdetailNew::class => DbFactory::class,
+        DB\Ocr\Ocrannexnew::class => ShareDbFactory::class,
+        DB\Ocr\Drug::class => ShareDbFactory::class,
+        DB\Ocr\Take::class => ShareDbFactory::class,
+        DB\Ocr\Ctreplace::class => ShareDbFactory::class,
+        DB\Ocr\Matedrug::class => ShareDbFactory::class,
+        DB\Ocr\Drugcategory::class => ShareDbFactory::class,
+        DB\Dictionary\Medicaltake::class => ShareDbFactory::class,
+        DB\Dictionary\Medicalword::class => ShareDbFactory::class,
+        DB\Dictionary\Drugcategory::class => ShareDbFactory::class,
+        DB\Dictionary\Drug::class => ShareDbFactory::class,
+        DB\Medical\Matewhite::class => ShareDbFactory::class,
+        DB\Medical\Mateblack::class => ShareDbFactory::class,
+        DB\Medical\Matedrug::class => ShareDbFactory::class,
+        DB\Medical\Ocrdata::class => ShareDbFactory::class,
+        DB\Medical\Lock::class => ShareDbFactory::class,
+        DB\Item\Allowpatientwrite::class => DbFactory::class,
+        DB\Project\Changeupdatelog::class => DbFactory::class,
+        DB\Pay\Recharge::class => DbFactory::class,
+        DB\Pay\Transfer::class => DbFactory::class,
+        DB\Tmp\Deletename::class => ShareDbFactory::class,
+        DB\Tmp\Drug::class => ShareDbFactory::class,
+        DB\Tmp\Drugcategory::class => ShareDbFactory::class,
+        DB\Tmp\Keyword::class => ShareDbFactory::class,
+        DB\Tmp\Medical::class => ShareDbFactory::class,
+        DB\Tmp\Medicalblack::class => ShareDbFactory::class,
+        DB\Tmp\Medicaldrug::class => ShareDbFactory::class,
+        DB\Tmp\Medicallock::class => ShareDbFactory::class,
+        DB\Tmp\Medicaltake::class => ShareDbFactory::class,
+        DB\Tmp\Medicalwhite::class => ShareDbFactory::class,
+        DB\Tmp\Medicalword::class => ShareDbFactory::class,
+        DB\Tmp\Rawblack::class => ShareDbFactory::class,
+        DB\Tmp\Rawdata::class => ShareDbFactory::class,
+        DB\Tmp\Rawlock::class => ShareDbFactory::class,
+        DB\Tmp\Rawmate::class => ShareDbFactory::class,
+        DB\Tmp\Rawword::class => ShareDbFactory::class,
+        DB\Tmp\Replace::class => ShareDbFactory::class,
+        DB\Tmp\Sigkeyword::class => ShareDbFactory::class,
+        DB\Tmp\Hospital::class => ShareDbFactory::class,
+        DB\Tmp\Inspect::class => ShareDbFactory::class,
+        DB\Tmp\Patienthospital::class => ShareDbFactory::class,
+        DB\Tmp\Report::class => ShareDbFactory::class,
+        DB\Dictionary\Disease::class => ShareDbFactory::class,
+        DB\Dictionary\Diseasecategory::class => ShareDbFactory::class,
+        DB\Tmp\Annex::class => ShareDbFactory::class,
+        DB\Tmp\Patient::class => ShareDbFactory::class,
+        DB\Tmp\Patientct::class => ShareDbFactory::class,
+        DB\Tmp\Custom::class => ShareDbFactory::class,
+        DB\Tmp\Table::class => ShareDbFactory::class,
+        DB\Tmp\Text::class => ShareDbFactory::class,
+        DB\Tmp\Outmedical::class => ShareDbFactory::class,
+        DB\Tmp\Intervene::class => ShareDbFactory::class,
+        DB\Tmp\Intervene0::class => ShareDbFactory::class,
+        DB\Tmp\Intervene1::class => ShareDbFactory::class,
+        DB\Tmp\Intervene2::class => ShareDbFactory::class,
+        DB\Ocr\Rawlockunique::class => ShareDbFactory::class,
+        DB\Tmp\Ctreplace::class => ShareDbFactory::class,
+        DB\Tmp\Doctoradviceoriginal::class => ShareDbFactory::class,
+        DB\Tmp\Doctoradvicelock::class => ShareDbFactory::class,
+        DB\Tmp\Doctoradvicematewhite::class => ShareDbFactory::class,
+        DB\Tmp\Doctoradvicemateblack::class => ShareDbFactory::class,
+        DB\Tmp\Doctoradvicematedrug::class => ShareDbFactory::class,
+        DB\Tmp\Doctoradvicetable::class => ShareDbFactory::class,
+        DB\Tmp\Doctoradviceannex::class => ShareDbFactory::class,
+        DB\Tmp\Doctoradvicepatient::class => ShareDbFactory::class,
+        DB\Tmp\Doctoradviceformal::class => ShareDbFactory::class,
+        DB\Item\MessageField::class => DbFactory::class,
+        DB\Item\MessageSend::class => DbFactory::class,
+        DB\Item\MessageSendPatient::class => DbFactory::class,
+        DB\Item\MessageSendLog::class => DbFactory::class,
+        DB\Collect\Category::class => ShareDbFactory::class,
+        DB\Collect\Inspect::class => ShareDbFactory::class,
+        DB\Collect\Hospital::class => ShareDbFactory::class,
+        DB\Collect\Itemhospital::class => ShareDbFactory::class,
+        DB\Collect\Out::class => ShareDbFactory::class,
+        DB\Collect\Itemout::class => ShareDbFactory::class,
+        DB\Collect\Drugcategory::class => ShareDbFactory::class,
+        DB\Collect\Drug::class => ShareDbFactory::class,
+        DB\Collect\Medicaltake::class => ShareDbFactory::class,
+        DB\Collect\Medicalword::class => ShareDbFactory::class,
+        DB\Collect\Itemdrug::class => ShareDbFactory::class,
+        DB\Collect\Ecg::class => ShareDbFactory::class,
+        DB\Collect\Itemecg::class => ShareDbFactory::class,
+        DB\Collect\Ct::class => ShareDbFactory::class,
+        DB\Collect\Itemct::class => ShareDbFactory::class,
+        DB\Collect\Report::class => ShareDbFactory::class,
+        DB\Collect\Itemreport::class => ShareDbFactory::class,
+        DB\Collect\Keywordcat::class => ShareDbFactory::class,
+        DB\Collect\Keyword::class => ShareDbFactory::class,
+        DB\Collect\Rawword::class => ShareDbFactory::class,
+        DB\Collect\Itemkeyword::class => ShareDbFactory::class,
+        DB\Collect\Cost::class => ShareDbFactory::class,
+        DB\Collect\Itemcost::class => ShareDbFactory::class,
+        DB\Item\MessageSendPatientChase::class => DbFactory::class,
+        DB\Collect\Patienthospital::class => ShareDbFactory::class,
+        DB\Project\ChangeReference::class => DbFactory::class,
+        DB\Collect\Patientecg::class => ShareDbFactory::class,
+        DB\Collect\Patientct::class => ShareDbFactory::class,
+        DB\Collect\Patientreport::class => ShareDbFactory::class,
+        DB\Collect\Patientraw::class => ShareDbFactory::class,
+        DB\Collect\Patientrawmate::class => ShareDbFactory::class,
+        DB\Collect\Patientrawblack::class => ShareDbFactory::class,
+        DB\Collect\Patientrawlock::class => ShareDbFactory::class,
+        DB\Collect\Patientmedical::class => ShareDbFactory::class,
+        DB\Collect\Patientmedicalwhite::class => ShareDbFactory::class,
+        DB\Collect\Patientmedicalblack::class => ShareDbFactory::class,
+        DB\Collect\Patientmedicaldrug::class => ShareDbFactory::class,
+        DB\Collect\Patientmedicallock::class => ShareDbFactory::class,
+        DB\Collect\Patientout::class => ShareDbFactory::class,
+        DB\Ocr\Specialmedical::class => ShareDbFactory::class,
+        DB\Collect\Patient::class => ShareDbFactory::class,
+        DB\Collect\Annex::class => ShareDbFactory::class,
+        DB\Export\Sas::class    => DbFactory::class,
+        DB\Collect\Sighospital::class    => ShareDbFactory::class,
+        DB\Collect\Sigout::class    => ShareDbFactory::class,
+        DB\Collect\Sigkeyword::class    => ShareDbFactory::class,
+        DB\Project\Itemformrecognition::class  => DbFactory::class,
+        DB\Project\PatientFormContentRecognition::class  => DbFactory::class,
+        DB\Item\Patientformimgcontent::class  => DbFactory::class,
+        DB\Dictionary\Detectname::class => ShareDbFactory::class,
+        DB\Dictionary\Detectkeyword::class => ShareDbFactory::class,
+        DB\Dictionary\Detectblackword::class => ShareDbFactory::class,
+        DB\Collect\Table::class => ShareDbFactory::class,
+        DB\Collect\Text::class => ShareDbFactory::class,
+        DB\Collect\Custom::class => ShareDbFactory::class,
+        DB\Project\Identificationexport::class => DbFactory::class,
+        DB\Item\ItemResultidentify::class => DbFactory::class,
+        DB\Item\itemEventwatchdog::class => DbFactory::class,
+        DB\Temple\Annex::class => DbFactory::class,
+        DB\Temple\checklist::class => DbFactory::class,
+        DB\Item\ItemMedicaltake::class => DbFactory::class,
+        DB\Doctoradvice\DoctoradviceOriginal::class => DbFactory::class,
+        DB\Item\Patientinfo::class => DbFactory::class,
+        DB\Dictionary\Leverform::class => ShareDbFactory::class,
+        DB\Dictionary\Levervalue::class => ShareDbFactory::class,
+        DB\Item\SignatoryCollecttypeocr::class => DbFactory::class,
+        DB\Item\Detectpatient::class => ShareDbFactory::class,
+        DB\Dictionary\Ocrreplace::class => ShareDbFactory::class,
+        DB\Item\Cissclass::class => ShareDbFactory::class,
+        DB\Item\Cissoption::class => ShareDbFactory::class,
+        DB\Item\Patientciss::class => ShareDbFactory::class,
+        DB\Dictionary\Fixednametype::class => ShareDbFactory::class,
+        DB\Dictionary\Fixedname::class => ShareDbFactory::class,
+        DB\Project\Msgset::class => ShareDbFactory::class,
+        DB\Project\Msginfo::class => ShareDbFactory::class,
+        DB\Project\Msgsend::class => ShareDbFactory::class,
+        DB\Item\Planviolate::class => ShareDbFactory::class,
+        DB\Admin\Weblink::class => DbFactory::class,
+        DB\Admin\Workbatch::class => ShareDbFactory::class,
+        DB\Admin\Workinfo::class => ShareDbFactory::class,
+        DB\Dictionary\Eventset::class => ShareDbFactory::class,
+        DB\Dictionary\Eventattr::class => ShareDbFactory::class,
+        DB\Admin\Medicallock::class => ShareDbFactory::class,
+        DB\Item\Patientevent::class => ShareDbFactory::class,
+        DB\Item\Patienteventannex::class => ShareDbFactory::class,
+        DB\Item\Patienteventset::class => ShareDbFactory::class,
+        DB\Project\Patientwork::class => ShareDbFactory::class,
+        DB\Item\Randomsecondary::class => ShareDbFactory::class,
+        DB\Project\Medicalquestion::class => ShareDbFactory::class,
+        DB\Project\Medicalquestioninfo::class => ShareDbFactory::class,
+        DB\Project\Medicalconfirm::class => ShareDbFactory::class,
+        DB\Project\Medicalconfirminfo::class => ShareDbFactory::class,
+        DB\Project\Medicalset::class => ShareDbFactory::class,
+        DB\Item\Checkdate::class => ShareDbFactory::class,
+        DB\Dictionary\Region::class => ShareDbFactory::class,
+        DB\Project\Exceedswindow::class => ShareDbFactory::class,
+        DB\Project\Cmdrugset::class => ShareDbFactory::class,
+        DB\Collect\Patientdrug::class => ShareDbFactory::class,
+        DB\Dictionary\Itemcategory::class => ShareDbFactory::class,
+        DB\Item\Package::class => ShareDbFactory::class,
+    ]
+];
+
+
+$appendMap = [
+    'itemPatientFormLogicErrorQuery' => [DB\Item\PatientFormLogicErrorQuery::class, EdcDbFactory::class],
+    'itemPatientFormLogicErrorPointer' => [DB\Item\PatientFormLogicErrorPointer::class, EdcDbFactory::class], // 逻辑核查错误表
+    'itemPatientFormLogic' => [DB\Item\PatientFormLogic::class, EdcDbFactory::class], // 逻辑核查公式表
+    'itemPatientFormLogicError' => [DB\Item\PatientFormLogicError::class, EdcDbFactory::class], // 逻辑核查错误表
+    'itemPatientFormLogicErrorLog' => [DB\Item\PatientFormLogicErrorLog::class, EdcDbFactory::class],
+    'patientChecktimeListEdc' => [DB\Item\PatientChecktimeListEdc::class, EdcDbFactory::class],
+    'patientWorkCountEdc' => [DB\Item\PatientWorkCountEdc::class, EdcDbFactory::class],
+    'realRolemodulerelationEdc' => [DB\Item\RolemodulerelationEdc::class, EdcDbFactory::class],
+    'adminMenuEdc' => [DB\Admin\MenuEdc::class, EdcDbFactory::class],
+    'itemLock' => [DB\Item\Lock::class, EdcDbFactory::class],
+    'itemConfirm' => [DB\Item\Confirm::class, EdcDbFactory::class],
+    'patientFormLock' => DB\Item\PatientFormLock::class,
+    'itemFormEdc' => [DB\Item\ItemFormEdc::class, EdcDbFactory::class],
+    'itemCheckcontentEdc' => [DB\Item\ItemCheckcontentEdc::class, EdcDbFactory::class],
+    'patientFormContentUpdated' => DB\Item\PatientFormContentUpdated::class,
+    'patientFormContentUpdatedLog' => [DB\Item\PatientFormContentUpdatedLog::class, ChainFactory::class],
+    'patientFormContentCm' => DB\Item\PatientFormContentCm::class,
+    'itemSignaturebatch' => [DB\Item\Signaturebatch::class, EdcDbFactory::class],
+    'itemSignaturedetail' => [DB\Item\Signaturedetail::class, EdcDbFactory::class],
+    'itemLogicErrorReportBlack' => [DB\Item\ItemLogicErrorReportBlack::class, EdcDbFactory::class],
+    'patientFormResultchangeUpdated' => DB\Item\PatientFormResultchangeUpdated::class,
+    'itemPatientFormContentDelete' => DB\Item\PatientFormContentDelete::class,
+    'projectPatientworkbatch' => [DB\Project\Patientworkbatch::class, EdcDbFactory::class],
+    'projectPatientworkinfo' => [DB\Project\Patientworkinfo::class, EdcDbFactory::class],
+    'logLogin' => [DB\Log\LogLogin::class, DbFactory::class],
+];
+
+//function generate123 ($appendMap): array {
+//    $r = [];
+//    foreach ($appendMap as $name => $db) {
+//        if (is_array($db)) {
+//            list($class, $factory) = $db;
+//            $r['aliases'][$name] = $class;
+//            $r['factories'][$class] = $factory;
+//        } else {
+//            $r['aliases'][$name] = $db;
+//            $r['factories'][$db] = DbFactory::class;
+//        }
+//    }
+//
+//    return $r;
+//}
+
+return ArrayHelper::merge($dbServerMap, call_user_func(function () use ($appendMap) {
+    $r = [];
+    foreach ($appendMap as $name => $db) {
+        if (is_array($db)) {
+            list($class, $factory) = $db;
+            $r['aliases'][$name] = $class;
+            $r['factories'][$class] = $factory;
+        } else {
+            $r['aliases'][$name] = $db;
+            $r['factories'][$db] = DbFactory::class;
+        }
+    }
+
+    return $r;
+}));
\ No newline at end of file
diff --git a/module/Application/config/module.config.php b/module/Application/config/module.config.php
new file mode 100644
index 0000000..0f8ca45
--- /dev/null
+++ b/module/Application/config/module.config.php
@@ -0,0 +1,107 @@
+getRoutes()] as $route) {
+    $allRoutes = ArrayHelper::merge($allRoutes, $route);
+}
+
+return [
+    'router' => [
+        'routes' => $allRoutes
+    ],
+    'controllers'  => [
+        'factories' => ArrayHelper::merge([
+            Controller\IndexController::class => InvokableFactory::class,
+            Controller\LoginController::class => InvokableFactory::class,
+            Controller\CommonController::class => InvokableFactory::class,
+            FormController::class => InvokableFactory::class,
+            FieldController::class => InvokableFactory::class,
+            \Application\Controller\item\FormController::class => InvokableFactory::class,
+            \Application\Controller\item\FieldController::class => InvokableFactory::class,
+            FormgroupController::class => InvokableFactory::class,
+            \Application\Controller\item\patient\FormController::class => InvokableFactory::class,
+            ItemPhotoController::class => InvokableFactory::class,
+            \Project\Controller\ItemphotoController::class => InvokableFactory::class,
+            AeController::class => InvokableFactory::class,
+            AeresultController::class => InvokableFactory::class,
+            \Application\Controller\item\QuestionController::class => InvokableFactory::class,
+            \Application\Controller\CrontabController::class => InvokableFactory::class,
+            SaeController::class => InvokableFactory::class,
+            WechatController::class => InvokableFactory::class,
+            LogicController::class => InvokableFactory::class,
+            ExposeController::class => InvokableFactory::class,
+            SasController::class => InvokableFactory::class,
+            DashboardController::class => InvokableFactory::class,
+            CmController::class => InvokableFactory::class,
+            ChecklistController::class => InvokableFactory::class,
+            PatientH5Controller::class => InvokableFactory::class,
+            LogController::class => InvokableFactory::class,
+            ItemFieldController::class => InvokableFactory::class,
+            ThirdController::class => InvokableFactory::class,
+        ], $mainRoutes->getControllers()),
+    ],
+    'controller_plugins' => [
+        'aliases' => [
+            'LocalService' => LocalService::class,
+            'RenderApiJson' => RenderApiJson::class,
+        ],
+        'factories' => [
+            LocalService::class => ServiceFactory::class,
+            RenderApiJson::class => InvokableFactory::class,
+        ],
+    ],
+    'service_manager' => include __DIR__."/service.config.php",
+    'laminas-cli' => include __DIR__.'/cli/laminasCli.config.php',
+    'view_manager' => [
+        'display_not_found_reason' => true,
+        'display_exceptions'       => true,
+        'doctype'                  => 'HTML5',
+        'not_found_template'       => 'error/404',
+        'exception_template'       => 'error/index',
+        'template_map'             => [
+            'layout/layout'           => __DIR__ . '/../view/layout/layout.phtml',
+            'layout/dashboardLayout'           => __DIR__ . '/../view/layout/dashboardLayout.phtml',
+            'application/index/index' => __DIR__ . '/../view/application/index/index.phtml',
+            'error/404'               => __DIR__ . '/../view/error/404.phtml',
+            'error/index'             => __DIR__ . '/../view/error/index.phtml',
+        ],
+        'template_path_stack'      => [
+            __DIR__ . '/../view',
+        ],
+    ],
+];
diff --git a/module/Application/config/routes/dashboard.php b/module/Application/config/routes/dashboard.php
new file mode 100644
index 0000000..d6f2fe9
--- /dev/null
+++ b/module/Application/config/routes/dashboard.php
@@ -0,0 +1,20 @@
+ [
+        ['/dashboard' => 'index'],
+        ['/dashboard/file-timestamp' => 'fileTimestamp'],
+        ['/dashboard/exception' => 'exception'],
+        ['/api/dashboard/file-timestamp' => 'apiFileTimestamp'],
+        ['/api/dashboard/exception' => 'apiException'],
+        ['/api/dashboard/exception/detail' => 'apiExceptionDetail'],
+        ['/dashboard/unit-test' => 'unitTest'],
+        ['/api/dashboard/unitTest' => 'apiUnitTest'],
+        ['/dashboard/redis' => 'redis'],
+        ['/api/dashboard/redis' => 'apiRedis'],
+        ['/dashboard/form-log' => 'formLog'],
+        ['/api/dashboard/form-log' => 'apiFormLog'],
+        ['/dashboard/analysis' => 'analysis'],
+        ['/dashboard/analysis-response-time' => 'analysisResponseTime'],
+        ['/api/dashboard/analysisResponseTime' => 'apiAnalysisResponseTime'],
+    ]
+]);
\ No newline at end of file
diff --git a/module/Application/config/routes/main.php b/module/Application/config/routes/main.php
new file mode 100644
index 0000000..12cb989
--- /dev/null
+++ b/module/Application/config/routes/main.php
@@ -0,0 +1,71 @@
+ [控制器类, 方法名]
+ * '/item/field/view' => ['ItemFieldControllerV2', 'view'],
+ *
+ * ItemFieldControllerV2 相当于是 \Application\Controller\v2\ItemFieldController::class
+ * 因为在下面的 CONTROLLER_ALIAS 定义了别名
+ *
+ * 你也可以这么写
+ * '/item/field/view' => [\Application\Controller\v2\ItemFieldController::class, 'view'],
+ */
+
+$mainRoutes = [
+//    '/item/field/view' => ['ItemFieldControllerV2', 'view'],
+
+    '/patient/form/inactive' => ['PatientFormControllerV2', 'inactive'], // 受试者表单失活
+
+    '/patient/form/compare' => [\Application\Controller\item\patient\FormController::class, 'compare'], // 受试者表单失活
+];
+
+
+return new class ($mainRoutes) {
+
+    private array $_routes = [];
+
+    private array $_controllers = [];
+
+    const CONTROLLER_ALIAS = [
+        'ItemFieldControllerV2' => \Application\Controller\v2\ItemFieldController::class,
+        'PatientFormControllerV2' => \Application\Controller\v2\PatientFormController::class,
+    ];
+
+    public function __construct($routes)
+    {
+        $this->_routes = $routes;
+    }
+
+    private function _getControllerClass(string $controllerClass)
+    {
+        $class = self::CONTROLLER_ALIAS[$controllerClass] ?? $controllerClass;
+
+        if (!isset($this->_controllers[$class])) {
+            $this->_controllers[$class] = InvokableFactory::class;
+        }
+
+        return $class;
+    }
+
+    public function getRoutes(): array
+    {
+        $res = [];
+        foreach ($this->_routes as $url => $params) {
+            $res[$url] = RouterHelper::literalRoute($url, $this->_getControllerClass($params[0]), $params[1]);
+        }
+
+        return $res;
+    }
+
+    public function getControllers(): array
+    {
+        return $this->_controllers;
+    }
+};
\ No newline at end of file
diff --git a/module/Application/config/routes/v1.php b/module/Application/config/routes/v1.php
new file mode 100644
index 0000000..6882ee3
--- /dev/null
+++ b/module/Application/config/routes/v1.php
@@ -0,0 +1,306 @@
+ [
+        ['/login-code' => 'loginCode'],
+        ['/v2/login-code' => 'loginCodeV2'],
+        ['/is-scan' => 'isScan'],
+        ['/forward' => 'forward'],
+        ['/upload' => 'upload'],
+        ['/callback' => 'callback'],
+        ['/send-sms' => 'sendSms'],
+        ['/h5/send-sms' => 'h5SendSms'],
+        ['/bind' => 'bind'],
+        ['/h5/bind' => 'h5Bind'],
+        ['/logout' => 'logout'],
+        ['/mini-login' => 'miniLogin'],
+        ['/' => 'index'],
+        ['/wechatuser' => 'wechatuser'],
+        ['/oauth' => 'oauth'],
+        ['/getwebsitefiling' => 'getwebsitefiling'],
+        ['/patientH5/oauth' => 'patientH5Oauth'],
+        ['/patientH5' => 'patientH5'],
+        ['/webH5' => 'webH5'],
+        ['/webH5/oauth' => 'webH5Oauth'],
+        ['/webH5Forward' => 'webH5Forward'],
+        ['/webH5Callback' => 'webH5Callback'],
+        ['/login/accountPwd' => 'accountPwd'],
+        ['/login/send-sms' => 'sendLoginSms'],
+    ],
+    \Application\Controller\WechatController::class => [
+        ['/wechat/entry' => 'entry'],
+        ['/wechat/bind' => 'bind'],
+        ['/wechat/bind-captcha' => 'bindCaptcha'],
+        ['/wechat/bind-submit' => 'bindSubmit'],
+    ],
+    FormController::class => [
+        ['/dictionary/form' => 'index'],
+        ['/dictionary/form/del' => 'del'],
+        ['/dictionary/form/view' => 'view'],
+        ['/dictionary/form/getField' => 'getField'],
+        ['/dictionary/form/create' => 'create'],
+        ['/dictionary/form/preview' => 'preview'],
+        ['/dictionary/form/copyTo' => 'copyTo'],
+        ['/dictionary/form/copy' => 'copy'],
+    ],
+    FieldController::class => [
+        ['/dictionary/field' => 'index'],
+        ['/dictionary/field/view' => 'view'],
+        ['/dictionary/field/version' => 'version'],
+        ['/dictionary/field/create' => 'create'],
+        ['/dictionary/field/del' => 'del'],
+        ['/dictionary/field/addVersion' => 'addVersion'],
+        ['/dictionary/field/getRelationInformation' => 'getRelationInformation'],
+    ],
+    \Application\Controller\item\FieldController::class => [
+        ['/item/field' => 'index'],
+        ['/item/field/view' => 'view'],
+        ['/item/field/version' => 'version'],
+        ['/item/field/create' => 'create'],
+        ['/item/field/del' => 'del'],
+        ['/item/field/addVersion' => 'addVersion'],
+        ['/item/field/getRelationInformation' => 'getRelationInformation'],
+        ['/item/field/selectcheck' => 'selectcheck'],
+        ['/item/field/selectform' => 'selectform'],
+        ['/item/field/selectchecktime' => 'selectchecktime'],
+        ['/item/field/selectformchecktime' => 'selectformchecktime'],
+        ['/item/field/setolddata' => 'setolddata'],
+        ['/item/field/formFieldSelect' => 'formFieldSelect'],
+        ['/item/field/formChecktimeSelect' => 'formChecktimeSelect'],
+        ['/item/field/checktimeFormRealtion' => 'checktimeFormRealtion']
+    ],
+    \Application\Controller\item\FormController::class => [
+        ['/item/form' => 'index'],
+        ['/item/form/del' => 'del'],
+        ['/item/form/view' => 'view'],
+        ['/v1/item/form/lock' => 'lock'], // 锁定表单
+        ['/item/form/create' => 'create'],
+
+        /** @see \Application\Controller\item\FormController::previewAction() */
+        ['/item/form/getdrugcm' => 'getdrugcm'], //获取合并用药表单-药物-默认用药原因
+        ['/item/form/preview' => 'preview'], // 表单结构预览
+        ['/v1/item/form/unlock' => 'unlock'], // 解锁表单
+        ['/v1/item/form/detail' => 'detail'], // 查看表单详情
+        ['/v1/item/form/getannexdata' => 'getannexdata'], // 获取化验单锁定数据
+        ['/v1/item/form/getanneximg' => 'getanneximg'], // 获取一对多化验单图片
+        ['/item/form/getField' => 'getField'],
+        ['/v1/item/form/outPreview' => 'outPreview'], // 预览脱落表单
+        ['/v2/item/form/outPreview' => 'outPreviewV2'], // 预览脱落表单V2
+        ['/v1/item/form/createOutForm' => 'createOutForm'], // 创建/编辑 脱落表单
+        ['/v1/item/form/viewOutForm' => 'viewOutForm'], // 查看脱离表单详情,
+        ['/item/form/processed' => 'processed'], //一对多表单删除后对应的质疑历史数据的处理
+
+        /** @see \Application\Controller\item\FormController::scoreFormPreviewAction() */
+        ['/v1/item/form/scoreFormPreview' => 'scoreFormPreview'], // 预览评分功能表单
+
+        /** @see \Application\Controller\item\FormController::scoreFormListAction() */
+        ['/v1/item/form/scoreFormList' => 'scoreFormList'], // 获取所有评分功能表单列表
+
+        /** @see \Application\Controller\item\FormController::scoreFormViewAction() */
+        ['/v1/item/form/scoreFormView' => 'scoreFormView'], // 获取所有评分功能表单列表
+        ['/item/form/itemFormSource' => 'itemFormSource'], // 获取项目表单数据源数据
+
+    ],
+    FormgroupController::class => [
+        ['/dictionary/formgroup/treelist' => 'treelist'],
+        ['/dictionary/formgroup/list' => 'list'],
+        ['/dictionary/formgroup/edit' => 'edit'],
+        ['/dictionary/formgroup/save' => 'save'],
+        ['/dictionary/formgroup/delete' => 'delete'],
+    ],
+    \Application\Controller\item\patient\FormController::class => [
+        ['/patient/form' => 'index'],
+        ['/patient/form/del' => 'del'],
+        /** @see  \Application\Controller\item\patient\FormController::viewAction() */
+        ['/patient/form/view' => 'view'],
+        ['/patient/form/flush' => 'flush'], // 清空表单数据
+        ['/patient/form/recovery' => 'recovery'], // 恢复删除的表单
+        ['/patient/form/unlock' => 'unlock'], // 申请表单解锁
+        ['/patient/form/create' => 'create'],
+        ['/patient/form/cover-by-question-reply' => 'coverByQuestionReply'],
+        ['/patient/form/applyunlock' => 'applyunlock'],
+        ['/patient/form/saveApplyunlock' => 'saveApplyunlock'],
+        ['/patient/form/confirmApplyunlock' => 'confirmApplyunlock'],
+
+        /** @see \Application\Controller\item\patient\FormController::scoreFormCreateAction() */
+        ['/v1/item/form/scoreFormCreate' => 'scoreFormCreate'], // 获取所有评分功能表单列表
+
+        /** @see  \Application\Controller\item\patient\FormController::importAction() */
+        ['/patient/form/import' => 'import'], // 导入受试者表单数据
+        ['/patient/form/importCheckForm' => 'importCheckForm'], // 导入受试者表单数据
+        ['/patient/form/getImportErrorData' => 'getImportErrorData'], // 获取错误数据
+        ['/patient/form/getImportErrorInfo' => 'getImportErrorInfo'], // 获取错误数据
+        ['/patient/form/importDataSave' => 'importDataSave'], // 数据录入
+        ['/patient/form/importDataExecute' => 'importDataExecute'], // 数据验证
+        ['/patient/form/delErrorInfo' => 'delErrorInfo'], // 删除某一条数据
+        ['/patient/form/delCache' => 'delCache'], // 删除缓存
+
+        /** @see \Application\Controller\item\patient\FormController::tempStorageAction() */
+        ['/patient/form/tempStorage' => 'tempStorage'], // 暂存表单数据
+
+        /** @see \Application\Controller\item\patient\FormController::lockShareForm() */
+        ['/patient/form/lockShareForm' => 'lockShareForm'], // 锁定常规识别类表单
+
+        ['/patient/form/unlockShareForm' => 'unlockShareForm'], // 解锁常规识别类表单
+
+        ['/patient/form/uploadMultiShareFormImage' => 'uploadMultiShareFormImage'],
+
+        ['/patient/form/deleteShareFormMulti' => 'deleteShareFormMulti']
+
+
+
+
+    ],
+    CommonController::class => [
+        ['/common/upload' => 'upload'],
+        ['/common/uploadImg' => 'uploadImg'],
+        ['/common/renderFormComponent' => 'renderFormComponent'],
+        ['/common/formatExpression' => 'formatExpression'],
+        ['/common/calculate' => 'calculateExpression'],
+        ['/common/v2/calculate' => 'calculateExpressionV2'], // 表单公式计算v2
+        ['/common/showPic' => 'showPic'],
+        ['/common/errormsg' => 'errormsg'],
+        ['/common/miniVersion' => 'miniVersion'], // 获取最新小程序版本
+        ['/common/patient-mobile' => 'patientMobile'], // 受试者手机号码是否存在
+        //['/com/editSend'=>'editSend'],
+        //['/com/savePatientSend' => 'savePatientSend'],
+        ['/common/download' => 'download'],    // 在线下载文件
+        ['/common/signFileUrl' => 'signFileUrl'],    // 在线下载文件签名
+        ['/common/qrcode' => 'qrcode'],    // 企业微信图片
+    ],
+    SaeController::class => [
+        ['/v1/item/sae' => 'index'],
+        ['/v1/item/sae/patient' => 'patient'],
+        ['/v1/item/sae/saecount' => 'saecount'],
+        ['/v1/item/sae/form' => 'form'],
+        ['/v1/item/sae/create' => 'create'],
+        ['/v1/item/sae/view' => 'view'],
+    ],
+    \Application\Controller\item\QuestionController::class => [
+        ['/v1/item/question/preview' => 'preview'],
+        ['/v1/item/question/updateQuestion' => 'updateQuestion'],
+        ['/v1/item/question/replyQuestion' => 'replyQuestion'],
+        ['/v1/item/question/historyReply' => 'historyReply'],
+        ['/question/view' => 'questionView'],
+    ],
+    CrontabController::class => [
+        ['/crontab/manyReidentification' => 'manyReidentification'],
+    ],
+    \Application\Controller\IndexController::class => [
+        ['/test' => 'test'],
+    ],
+    \Application\Controller\EdcController::class => [
+        ['/v1/edc/importQuery' => 'importQuery']
+    ],
+    \Application\Controller\QAController::class => [
+        ['/qa' => 'form'],
+        ['/qa/submit' => 'submit'],
+    ],
+    \Application\Controller\LogicController::class => [
+        /** @see LogicController::indexAction */
+        ['/logic' => 'index'],
+
+
+        ['/logic/view' => 'view'],
+        ['/logic/delete' => 'delete'],
+        ['/logic/create' => 'create'],
+        ['/logic/config' => 'config'],
+        ['/logic/formList' => 'formList'],
+        ['/logic/varList' => 'varList'],
+        ['/logic/varListV2' => 'varListV2'],
+        ['/logic/errorList' => 'errorList'],
+        ['/logic/execute' => 'execute'],
+        ['/logic/formList' => 'formList'],
+
+        /** @see LogicController::formViewAction() */
+        ['/logic/form/view' => 'formView'],
+
+        /** @see LogicController::formDetailAction() */
+        ['/logic/form/detail' => 'formDetail'],
+
+        /** @see LogicController::errorClosedAction() */
+        ['/logic/error/closed' => 'errorClosed'], // 关闭质疑
+
+        /** @see LogicController::queriedErrorListAction() */
+        ['/logic/error/queried' => 'queriedErrorList'], // sdm质疑列表
+
+        /** @see LogicController::errorQueriedCreateAction() */
+        ['/logic/error/queried/create' => 'errorQueriedCreate'], // 发送质疑
+
+        /** @see LogicController::errorReplyAction() */
+        ['/logic/error/reply' => 'errorReply'],
+
+        /** @see LogicController::setQueriedAction() */
+        ['/logic/error/setQueried' => 'setQueried'],
+
+        /** @see LogicController::geterrorpatientListAction() */
+        ['/logic/error/geterrorpatientList' => 'geterrorpatientList'], // 逻辑核查-受试者列表
+
+        /** @see LogicController::geterrorpatientListAction() */
+        ['/logic/error/geterrorchecktimeList' => 'geterrorchecktimeList'], // 逻辑核查-受试者检查点列表
+
+        /** @see LogicController::geterrorpatientListAction() */
+        ['/logic/error/getlasterror' => 'getlasterror'], // 逻辑核查-受试者检查点列表
+
+    ],
+    \Application\Controller\ExposeController::class => [
+        /** @see \Application\Controller\ExposeController::reportAction() */
+        ['/expose/report' => 'report'], // edc 化验单质疑推送
+
+        ['/expose/fileTimestamp' => 'fileTimestamp']
+    ],
+    \Application\Controller\Drug\DrugController::class => [
+        ['/app/drug/patientDrug' => 'patientDrug'],
+        ['/app/drug/drugLock' => 'drugLock'],
+        ['/app/drug/drugDaySave' => 'drugDaySave'],
+        ['/app/drug/drugDay' => 'drugDay'],
+        ['/app/drug/arrangeDrugSave' => 'arrangeDrugSave'],
+    ],
+    \Application\Controller\SasController::class => [
+        ['/sas/export' => 'export'],
+        ['/sas/edit' => 'edit'],
+        ['/sas/list' => 'list'],
+        ['/sas/delete' => 'delete'],
+    ],
+    \Application\Controller\CmController::class => [
+        ['/cm' => 'index'],
+        ['/cm/preview' => 'preview'],
+        ['/cm/view' => 'view'],
+        ['/cm/create' => 'create'],
+        ['/cm/ae/index' => 'aeList'],
+        ['/cm/ae/view' => 'aeListView'],
+        ['/cm/ae/viewRow' => 'aeViewRow'],
+        ['/cm/ae/edit' => 'aeEdit'],
+        ['/cm/ae/delete' => 'aeDelete'],
+    ],
+    \Application\Controller\Temple\ChecklistController::class => [
+        ['/temple/checklist/siglist' => 'siglist'],
+        ['/temple/checklist/patientlist' => 'patientlist'],
+        ['/temple/checklist/list' => 'list'],
+        ['/temple/checklist/edit' => 'edit'],
+        ['/temple/checklist/save' => 'save'],
+        ['/temple/checklist/delete' => 'delete'],
+        ['/temple/checklist/lock' => 'lock'],
+        ['/temple/checklist/annexlist' => 'annexlist'],
+    ],
+    \Application\Controller\PatientH5Controller::class => [
+        ['/com/editSend'=>'editSend'],
+        ['/com/savePatientSend' => 'savePatientSend'],
+    ],
+    \Application\Controller\ThirdController::class => [
+        ['/third/source' => 'source']
+    ]
+]);
diff --git a/module/Application/config/routes/v2.php b/module/Application/config/routes/v2.php
new file mode 100644
index 0000000..57f4730
--- /dev/null
+++ b/module/Application/config/routes/v2.php
@@ -0,0 +1,10 @@
+ [
+        ['/v2/project/aeresult/save' => 'v2Save'],
+        ['/v2/project/aeresult/del' => 'v2Del'],
+    ]
+]);
\ No newline at end of file
diff --git a/module/Application/config/service.config.php b/module/Application/config/service.config.php
new file mode 100644
index 0000000..0b6d966
--- /dev/null
+++ b/module/Application/config/service.config.php
@@ -0,0 +1,79 @@
+ [
+        'redisExtend' => Service\Redis\RedisExtend::class,
+        'imageUploader' => ImageUploader::class,
+        'wechat' => Wechat::class,
+        'sms' => SmsApplication::class,
+        'identity' => Identity::class,
+        'formatter' => Formatter::class,
+        'log' => Logs::class,
+        'httpSv' => HttpSv::class,
+        'wechatWork' => WechatWork::class,
+        'workUser' => WorkUser::class,
+        'ocr' => Ocr::class,
+        'toolSys' => ToolSys::class,
+        'syncOcrAnnex' => SyncOcrAnnex::class,
+        'SDMHelper' => SDMHelper::class,
+        'OAClient' => OaClient::class,
+        'CheckFormLogic' => CheckFormLogic::class,
+        'loginClient' => LoginClient::class,
+    ],
+    'factories' => [
+        // 全局的异常处理
+        'HttpExceptionStrategy'=> HttpException::class,
+        Wechat::class => CommonServiceFactory::class,
+        SmsApplication::class => CommonServiceFactory::class,
+        Service\Redis\RedisExtend::class => RedisExtendFactory::class,
+        ImageUploader::class => CommonServiceFactory::class,
+        Identity::class => CommonServiceFactory::class,
+        Logs::class => ServiceFactory::class,
+        Formatter::class => CommonServiceFactory::class,
+        HttpSv::class => ServiceFactory::class,
+        WechatWork::class => ServiceFactory::class,
+        WorkUser::class => ServiceFactory::class,
+        Ocr::class => ServiceFactory::class,
+        ToolSys::class =>ServiceFactory::class,
+        SyncOcrAnnex::class => ServiceFactory::class,
+        SDMHelper::class => ServiceFactory::class,
+        OaClient::class => ServiceFactory::class,
+        CheckFormLogic::class => ServiceFactory::class,
+        LoginClient::class => ServiceFactory::class,
+    ]
+];
+
+$serverConfig = ArrayUtils::merge($serverConfig, $dbServerConfig);
+return ArrayUtils::merge($serverConfig, $CommandServiceConfig);
diff --git a/public/index.php b/public/index.php
index 61ace19..73cdb8b 100644
--- a/public/index.php
+++ b/public/index.php
@@ -1,2 +1,64 @@
  2
+    && 'development' == $argv[1]
+    && in_array($argv[2], ['disable', 'enable'])
+) {
+    // Windows needs to execute the batch scripts that Composer generates,
+    // and not the Unix shell version.
+    $script = defined('PHP_WINDOWS_VERSION_BUILD') && constant('PHP_WINDOWS_VERSION_BUILD')
+        ? '.\\vendor\\bin\\laminas-development-mode.bat'
+        : './vendor/bin/laminas-development-mode';
+    system(sprintf('%s %s', $script, $argv[2]), $return);
+    exit($return);
+}
+
+// Decline static file requests back to the PHP built-in webserver
+if (php_sapi_name() === 'cli-server' && is_file(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))) {
+    return false;
+}
+
+if (! file_exists('vendor/autoload.php')) {
+    throw new RuntimeException(
+        'Unable to load application.' . PHP_EOL
+        . '- Type `composer install` if you are developing locally.' . PHP_EOL
+        . '- Type `vagrant ssh -c \'composer install\'` if you are using Vagrant.' . PHP_EOL
+        . '- Type `docker-compose run api-tools composer install` if you are using Docker.'
+    );
+}
+
+// Setup autoloading
+include 'vendor/autoload.php';
+
+$appConfig = include 'config/application.config.php';
+
+if (file_exists('config/development.config.php')) {
+    $appConfig = ArrayUtils::merge(
+        $appConfig,
+        include 'config/development.config.php'
+    );
+}
+
+// Run the application!
+Application::init($appConfig)->run();