lgy 4 nedēļas atpakaļ
vecāks
revīzija
46265ad54f

+ 9 - 1
server/application/api/dao/butt/ButtDao.php

@@ -4,6 +4,7 @@ namespace app\api\dao\butt;
 
 use app\api\actions\ZskkCache;
 use app\api\dao\ZskkDefaultDao;
+use app\api\model\dmlog\DmlogModel;
 use app\api\model\hr\HrModel;
 use app\api\model\institution\InstitutionModel;
 use app\api\model\monitor\MonitorexamModel;
@@ -24,13 +25,15 @@ class ButtDao extends ZskkDefaultDao {
     protected  $hrModel = null;
     protected  $monitorreportModel = null;
     protected  $institutionModel = null;
-    public function __construct(ReportModel $reportModel,HrModel $hrModel,MonitorreportModel $monitorreportModel,InstitutionModel $institutionModel)
+    protected  $dmlog = null;
+    public function __construct(ReportModel $reportModel,HrModel $hrModel,MonitorreportModel $monitorreportModel,InstitutionModel $institutionModel,DmlogModel $dmlog)
     {
         parent::__construct();
         $this->report = $reportModel;
         $this->hrModel = $hrModel;
         $this->monitorreportModel = $monitorreportModel;
         $this->institutionModel = $institutionModel;
+        $this->dmlog = $dmlog;
 
     }
 
@@ -368,6 +371,11 @@ class ButtDao extends ZskkDefaultDao {
         return $this->report->where($where)->field($field)->find();
     }
 
+    public function insertDmLog($insert)
+    {
+        return $this->dmlog->insert($insert);
+    }
+
     public function insertReport($data)
     {
         return $this->report->insert($data);

+ 12 - 0
server/application/api/model/dmlog/DmlogModel.php

@@ -0,0 +1,12 @@
+<?php
+namespace app\api\model\dmlog;
+
+use app\api\model\ZskkDefaultModel;
+
+class DmlogModel extends ZskkDefaultModel {
+    protected $table= 'dm_log';
+    protected $logName = "DmlogModel";
+
+
+
+}

+ 2 - 0
server/application/api/servies/butt/ButtService.php

@@ -2228,6 +2228,7 @@ class ButtService extends ZskkDefaultService {
 
     public function saveDmExam($data)
     {
+        $this->butt->insertDmLog(['data'=>json_encode($data),'type'=>1]);
         $arr = $this->makeDmExamDatas($data);
         $where = ['studyuid'=>$arr['studyuid'],'institution_id'=>$arr['institution_id']];
         $exam = $this->butt->getExam($where,'*');
@@ -2284,6 +2285,7 @@ class ButtService extends ZskkDefaultService {
 
     public function saveDmReport($data)
     {
+        $this->butt->insertDmLog(['data'=>json_encode($data),'type'=>1]);
         $where = ['imagenumber'=>$data['B']['BD'],'institution_id'=>$data['B']['BJ']];
         $exam = $this->butt->getExam($where,'*');
         $report = $this->makeReportData($data);