wugg 2 years ago
parent
commit
ccb48b5e61
3 changed files with 123 additions and 277 deletions
  1. 86 230
      app/admin/controller/Consult.php
  2. 37 35
      app/admin/controller/Purch.php
  3. 0 12
      app/admin/controller/Specs.php

+ 86 - 230
app/admin/controller/Consult.php

@@ -2,6 +2,8 @@
 
 namespace app\admin\controller;
 
+use app\admin\model\ActionLog;
+use app\admin\model\ProcessOrder;
 use think\App;
 use think\facade\Db;
 use think\facade\Validate;
@@ -131,14 +133,7 @@ class Consult extends Base
         if($endtime===""){
             return error_show(1002,"参数endtime不能为空");
         }
-//        $saleid =  isset($this->post['saleid']) && $this->post['saleid'] !=="" ? intval($this->post['saleid']) : "";
-//        if($saleid===""){
-//            return error_show(1002,"参数saleid不能为空");
-//        }
-//        $depart =  isset($this->post['depart']) && $this->post['depart'] !=="" ? intval($this->post['depart']) : "";
-//        if($depart===""){
-//            return error_show(1002,"参数depart不能为空");
-//        }
+
         $platform_code =  isset($this->post['platform_code']) && $this->post['platform_code'] !=="" ? trim($this->post['platform_code']) :
             "";
         if($platform_code===""){
@@ -160,226 +155,94 @@ class Consult extends Base
         $creater= isset($user["data"]['nickname']) ?  $user["data"]['nickname'] : "";
         $depart= Db::name("depart_user")->where(["uid"=>$createrid,"status"=>1,"is_del"=>0])->find();
         $zxNo=makeNo("ZX");
-        $data=[
-            "zxNo"=>$zxNo,
-            "createrid"=>$createrid,
-            "creater"=>$creater,
-            "is_project"=>$is_project,
-            "projectNo"=>isset($projectNo) ? $projectNo:"",
-            "khNo"=>$khNo,
-            "companyNo"=>$companyNo,
-            "endtime"=>$endtime,
-            "salesman"=>$creater,
-            "platform_code"=>$platform_code,
-            "saleid"=>$createrid,
-            "depart"=>isset($depart['itemid'])?$depart['itemid']:0,
-            "status"=>0,
-            "is_del"=>0,
-            "addtime"=>date("Y-m-d H:i:s"),
-            "updatetime"=>date("Y-m-d H:i:s"),
-        ];
-        $zx = Db::name("consult_order")->insert($data);
-        if($zx){
-            foreach ($ladder as $value){
-                $infoNo=makeNo("INF");
-                $specinfo=[];
-                if(isset($value['specinfo']) &&!empty($value['specinfo'])){
-                    foreach ($value["specinfo"] as $v){
-                        $spec =Db::name("specs")->where(["id"=>$v['specid']])->find();
-                        $spec_value =Db::name("spec_value")->where(["id"=>$v['spec_value_id']])->find();
-                        $v['spec_name']=isset($spec['spec_name'])? $spec['spec_name']:"";
-                        $v['spec_value_name']=isset($spec_value['spec_value'])?$spec_value['spec_value']:"" ;
-                        $specinfo[]=$v;
+        Db::startTrans();
+        try{
+            $data=[
+                "zxNo"=>$zxNo,
+                "createrid"=>$createrid,
+                "creater"=>$creater,
+                "is_project"=>$is_project,
+                "projectNo"=>isset($projectNo) ? $projectNo:"",
+                "khNo"=>$khNo,
+                "companyNo"=>$companyNo,
+                "endtime"=>$endtime,
+                "salesman"=>$creater,
+                "platform_code"=>$platform_code,
+                "saleid"=>$createrid,
+                "depart"=>isset($depart['itemid'])?$depart['itemid']:0,
+                "status"=>0,
+                "is_del"=>0,
+                "addtime"=>date("Y-m-d H:i:s"),
+                "updatetime"=>date("Y-m-d H:i:s"),
+            ];
+            $zx = Db::name("consult_order")->insert($data);
+            if($zx){
+                foreach ($ladder as $value){
+                    $infoNo=makeNo("INF");
+                    $specinfo=[];
+                    if(isset($value['specinfo']) &&!empty($value['specinfo'])){
+                        foreach ($value["specinfo"] as $v){
+                            $spec =Db::name("specs")->where(["id"=>$v['specid']])->find();
+                            $spec_value =Db::name("spec_value")->where(["id"=>$v['spec_value_id']])->find();
+                            $v['spec_name']=isset($spec['spec_name'])? $spec['spec_name']:"";
+                            $v['spec_value_name']=isset($spec_value['spec_value'])?$spec_value['spec_value']:"" ;
+                            $specinfo[]=$v;
+                        }
+                    }
+                    $info=[
+                        "infoNo"=>$infoNo,
+                        "zxNo"=>$zxNo,
+                        "spuCode"=>"",
+                        "good_name"=>$value['good_name'],
+                        "good_img"=>$value['good_img'],
+                        "cat_id"=>$value['cat_id'],
+                        "unit"=>$value['unit'],
+                        "brand_id"=>$value['brand_id'],
+                        "arrival_time"=>$value['arrival_time'],
+                        "specinfo"=>empty($specinfo)?"" : json_encode($specinfo),
+                        "cost_desc"=>$value['cost_desc'],
+                        "is_addrs"=>$value['is_addrs'],
+                        "is_custom"=>$value['is_custom'],
+                        "metal_id"=>$value['metal_id'],
+                        "config"=>isset($value['config'])?$value['config']:"",
+                        "other_config"=>isset($value['other_config'])?$value['other_config']:"",
+                        "specs_weight"=>isset($value['specs_weight'])?$value['specs_weight']:"0",
+                        "gold_price"=>isset($value['gold_price'])?$value['gold_price']:"0",
+                        "is_gold_price"=>isset($value['is_gold_price'])?$value['is_gold_price']:"0",
+                        "total_weight"=>isset($value['total_weight'])?$value['total_weight']:"0",
+                        "budget_price"=>$value['budget_price'],
+                        "num"=>$value['num'],
+                        "pgNo"=>isset($value['pgNo'])&&$value['pgNo']!==""?trim($value['pgNo']):"",
+                        "use_desc"=>$value['use_desc'],
+                        "remark"=>$value['remark'],
+                        "status"=>1,
+                        "is_del"=>0,
+                        "addtime"=>date("Y-m-d H:i:s"),
+                        "updatetime"=>date("Y-m-d H:i:s")
+                    ];
+                    $up = Db::name("consult_info")->insert($info);
+                    if(!$up){
+                        Db::rollback();
+                        return error_show(1004,'添加失败');
                     }
                 }
-                $info=[
-                    "infoNo"=>$infoNo,
-                    "zxNo"=>$zxNo,
-                    "spuCode"=>"",
-                    "good_name"=>$value['good_name'],
-                    "good_img"=>$value['good_img'],
-                    "cat_id"=>$value['cat_id'],
-                    "unit"=>$value['unit'],
-                    "brand_id"=>$value['brand_id'],
-                    "arrival_time"=>$value['arrival_time'],
-                    "specinfo"=>empty($specinfo)?"" : json_encode($specinfo),
-                    "cost_desc"=>$value['cost_desc'],
-                    "is_addrs"=>$value['is_addrs'],
-                    "is_custom"=>$value['is_custom'],
-                    "metal_id"=>$value['metal_id'],
-                    "config"=>isset($value['config'])?$value['config']:"",
-                    "other_config"=>isset($value['other_config'])?$value['other_config']:"",
-                    "specs_weight"=>isset($value['specs_weight'])?$value['specs_weight']:"0",
-                    "gold_price"=>isset($value['gold_price'])?$value['gold_price']:"0",
-                    "is_gold_price"=>isset($value['is_gold_price'])?$value['is_gold_price']:"0",
-                    "total_weight"=>isset($value['total_weight'])?$value['total_weight']:"0",
-                    "budget_price"=>$value['budget_price'],
-                    "num"=>$value['num'],
-                    "pgNo"=>isset($value['pgNo'])&&$value['pgNo']!==""?trim($value['pgNo']):"",
-                    "use_desc"=>$value['use_desc'],
-                    "remark"=>$value['remark'],
-                    "status"=>1,
-                    "is_del"=>0,
-                    "addtime"=>date("Y-m-d H:i:s"),
-                    "updatetime"=>date("Y-m-d H:i:s")
-                ];
-                $up = Db::name("consult_info")->insert($info);
-                if(!$up){
-                    Db::rollback();
-                    return error_show(1004,'添加失败');
-                }
+                $stn = ["order_code"=>$zxNo,"status"=>1,"action_remark"=>'',"action_type"=>"create"];
+                ActionLog::logAdd($this->post['token'],$stn,"ZXD",2,$info);
+                $process=["order_code"=>$zxNo,"order_id"=>Db::name("consult_order")->getLastInsID(),"order_status"=>1,"order_type"=>'ZXD'];
+                ProcessOrder::AddProcess($this->post['token'],$process);
+                Db::commit();
+                return  app_show(0,"新建成功",["zxNo"=>$zxNo]);
+            }else{
+                Db::rollback();
+                return error_show(1004,"新建失败");
             }
-
-            return  app_show(0,"新建成功",["zxNo"=>$zxNo]);
-        }else{
-            return error_show(1004,"新建失败");
+        }catch (\Exception $e){
+            Db::rollback();
+            return error_show(1003,$e->getMessage());
         }
+
     }
 
-//    public function zxadd(){
-//        $good_name = isset($this->post['good_name'])&&$this->post['good_name']!==""?trim($this->post['good_name']):"";
-//        if($good_name===""){
-//            return error_show(1004,"参数good_name不能为空");
-//        }
-//        $zxNo = isset($this->post['zxNo'])&&$this->post['zxNo']!==""?trim($this->post['zxNo']):"";
-//        if($zxNo===""){
-//            return error_show(1004,"参数zxNo不能为空");
-//        }
-//
-//        $cat_id = isset($this->post['cat_id'])&&$this->post['cat_id']!==""?intval($this->post['cat_id']):"";
-//        if($cat_id===""){
-//            return error_show(1004,"参数cat_id不能为空");
-//        }
-//        $arrival_time = isset($this->post['arrival_time'])&&$this->post['arrival_time']!==""?$this->post['arrival_time']
-//            :"";
-//        if($arrival_time===""){
-//            return error_show(1004,"参数arrival_time不能为空");
-//        }
-//        $good_img = isset($this->post['good_img'])&&$this->post['good_img']!==""?trim($this->post['good_img']):"";
-//        if($good_img===""){
-//            return error_show(1004,"参数good_img不能为空");
-//        }
-//        $is_custom = isset($this->post['is_custom'])&&$this->post['is_custom']!==""?intval($this->post['is_custom']):"";
-//        if($is_custom===""){
-//            return error_show(1004,"参数is_custom不能为空");
-//        }
-//        $unit = isset($this->post['unit'])&&$this->post['unit']!==""?trim($this->post['unit']):"";
-//        if($unit===""){
-//            return error_show(1004,"参数unit不能为空");
-//        }
-//        $brand_id = isset($this->post['brand_id'])&&$this->post['brand_id']!==""?intval($this->post['brand_id']):"";
-//        if($brand_id===""){
-//            return error_show(1004,"参数brand_id不能为空");
-//        }
-//        $material = isset($this->post['material'])&&$this->post['material']!==""?trim($this->post['material']):"";
-//        if($material===""){
-//            return error_show(1004,"参数material不能为空");
-//        }
-//        $color = isset($this->post['color'])&&$this->post['color']!==""?trim($this->post['color']):"";
-//        if($color===""){
-//            return error_show(1004,"参数color不能为空");
-//        }
-//        $cost_desc = isset($this->post['cost_desc'])&&$this->post['cost_desc']!==""?trim($this->post['cost_desc']):"";
-//        if($cost_desc===""){
-//            return error_show(1004,"参数cost_desc不能为空");
-//        }
-//        $model = isset($this->post['model'])&&$this->post['model']!==""?trim($this->post['model']):"";
-//        if($model===""){
-//            return error_show(1004,"参数model不能为空");
-//        }
-//
-//        $is_addrs = isset($this->post['is_addrs'])&&$this->post['is_addrs']!==""?intval($this->post['is_addrs']):"";
-//        if($is_addrs===""){
-//            return error_show(1004,"参数is_addrs不能为空");
-//        }
-//
-//        $metal_id = isset($this->post['metal_id'])&&$this->post['metal_id']!==""?trim($this->post['metal_id']):"";
-//        if($metal_id===""){
-//            return error_show(1004,"参数metal_id不能为空");
-//        }
-//        if($metal_id==0){
-//            $config = isset($this->post['config'])&&!empty($this->post['config'])?$this->post['config']:"";
-//            if($config===""){
-//                return error_show(1004,"参数config不能为空");
-//            }
-//            $other_config = isset($this->post['other_config'])&&$this->post['other_config']!==""?trim($this->post['other_config'])
-//                :"";
-//            if($other_config===""){
-//                return error_show(1004,"参数other_config不能为空");
-//            }
-//            $specs_weight = isset($this->post['specs_weight'])&&$this->post['specs_weight']!==""?floatval($this->post['specs_weight']):"";
-//            if($specs_weight===""){
-//                return error_show(1004,"参数specs_weight不能为空");
-//            }
-//            $gold_price = isset($this->post['gold_price'])&&$this->post['gold_price']!==""?floatval($this->post['gold_price']):"";
-//            if($gold_price===""){
-//                return error_show(1004,"参数gold_price不能为空");
-//            }
-//
-//        }
-//        $budget_price = isset($this->post['budget_price'])&&$this->post['budget_price']!==""?floatval($this->post['budget_price']):"";
-//        if($budget_price===""){
-//            return error_show(1004,"参数budget_price不能为空");
-//        }
-//        $num = isset($this->post['num'])&&$this->post['num']!==""?intval($this->post['num']):"";
-//        if($num===""){
-//            return error_show(1004,"参数num不能为空");
-//        }
-//        $use_desc = isset($this->post['use_desc'])&&$this->post['use_desc']!==""?trim($this->post['use_desc']):"";
-//        if($use_desc===""){
-//            return error_show(1004,"参数use_desc不能为空");
-//        }
-//        $remark = isset($this->post['remark'])&&$this->post['remark']!==""?trim($this->post['remark']):"";
-//        if($remark===""){
-//            return error_show(1004,"参数remark不能为空");
-//        }
-//
-//        Db::startTrans();
-//        try{
-//                $infoNo=makeNo("INF");
-//                $info=[
-//                    "infoNo"=>$infoNo,
-//                    "zxNo"=>$zxNo,
-//                    "spuCode"=>"",
-//                    "good_name"=>$good_name,
-//                    "good_img"=>$good_img,
-//                    "cat_id"=>$cat_id,
-//                    "unit"=>$unit,
-//                    "brand_id"=>$brand_id,
-//                    "arrival_time"=>$arrival_time,
-//                    "model"=>$model,
-//                    "color"=>$color,
-//                    "material"=>$material,
-//                    "cost_desc"=>$cost_desc,
-//                    "is_addrs"=>$is_addrs,
-//                    "is_custom"=>$is_custom,
-//                    "metal_id"=>$metal_id,
-//                    "config"=>isset($config)?$config:"",
-//                    "other_config"=>isset($other_config)?$other_config:"",
-//                    "specs_weight"=>isset($specs_weight)?$specs_weight:0,
-//                    "gold_price"=>isset($gold_price)?$gold_price:0,
-//                    "budget_price"=>$budget_price,
-//                    "num"=>$num,
-//                    "use_desc"=>$use_desc,
-//                    "remark"=>$remark,
-//                    "status"=>0,
-//                    "is_del"=>0,
-//                    "addtime"=>date("Y-m-d H:i:s"),
-//                    "updatetime"=>date("Y-m-d H:i:s")
-//                ];
-//                $up = Db::name("consult_info")->insert($info);
-//                if($up){
-//                    Db::commit();
-//                    return app_show(0,"添加成功",["infoNo"=>$infoNo]);
-//                }else{
-//                    Db::rollback();
-//                    return error_show(1004,'添加失败');
-//                }
-//        }catch (\Exception $e){
-//            Db::rollback();
-//            return error_show(1004,$e->getMessage());
-//        }
-//    }
 
     public function zxinfo(){
         $infoNo= isset($this->post['infoNo'])&&$this->post['infoNo']!=""?trim($this->post['infoNo']):"";
@@ -492,14 +355,6 @@ class Consult extends Base
         if($specin==""){
             return error_show(1003,"参数specinfo不能为空");
         }
-//        $color= isset($this->post['color'])&&$this->post['color']!=""?trim($this->post['color']):"";
-//        if($color==""){
-//            return error_show(1003,"参数color不能为空");
-//        }
-//        $material= isset($this->post['material'])&&$this->post['material']!=""?trim($this->post['material']):"";
-//        if($material==""){
-//            return error_show(1003,"参数material不能为空");
-//        }
         $cost_desc= isset($this->post['cost_desc'])&&$this->post['cost_desc']!=""?trim($this->post['cost_desc']):"";
         if($cost_desc==""){
             return error_show(1003,"参数cost_desc不能为空");
@@ -662,6 +517,7 @@ class Consult extends Base
         $zxinfo['updatetime']=date("Y-m-d H:i:s");
         $up = Db::name("consult_info")->save($zxinfo);
         if($up){
+
             return app_show(0,"状态更新成功");
         }else{
             return error_show(1003,"状态更新失败");

+ 37 - 35
app/admin/controller/Purch.php

@@ -424,12 +424,12 @@ class Purch extends Base
         if($cg==""){
             return error_show(1002,"未找到采购单数据");
         }
-        $gd= Db::name('good')->where(['good_code'=>$cg['good_code']])->find();
+        $gd= Db::name('good')->where(['spuCode'=>$cg['spuCode']])->find();
         if($gd==""){
             return error_show(1002,"未找到商品数据");
         }
-        $diff_weight = isset($this->post['diff_weight']) && $this->post['diff_weight'] !=="" ? trim($this->post['diff_weight']) :"";
-        if($diff_weight==""){
+        $diff_weight = isset($this->post['diff_weight']) && $this->post['diff_weight'] !=="" ? floatval($this->post['diff_weight']) :"";
+        if($diff_weight===""){
             return error_show(1002,"参数diff_weight不能为空");
         }
         $apply_id =GetUserInfo($token);
@@ -439,11 +439,9 @@ class Purch extends Base
         $rid= isset($apply_id["data"]['id']) ?  $apply_id["data"]['id'] : "";
         $rname= isset($apply_id["data"]['nickname']) ?  $apply_id["data"]['nickname'] : "";
         $diff_price = $diff_weight*$cg['gold_price'];
-       // $status = isset($this->post['status']) && $this->post['status'] !=="" ? intval($this->post['status']) :"";
         $data=[
             "cgdNo"=>$cgdNo,
-            "good_code"=>$cg['good_type_code'],
-            "good_kode"=>$cg['good_code'],
+            "good_code"=>$cg['spuCode'],
             "good_name"=>$cg['good_name'],
             "sale_price"=>$cg['good_price'],
             "good_weight"=>$cg['weight'],
@@ -452,7 +450,7 @@ class Purch extends Base
             "apply_name"=>$rname,
             "diff_weight"=>$diff_weight,
             "diff_price"=>$diff_price,
-            "gold_price"=>$cg['gold_price'],
+            "gold_price"=>$cg['good_price'],
             "status"=>1,
             "is_del"=>0,
             "addtime"=>date("Y-m-d H:i:s"),
@@ -466,36 +464,40 @@ class Purch extends Base
                 ActionLog::logAdd($this->post['token'],$stm,"CGGCD",1,$stm);
                 $process=["order_code"=>$cgdNo,"order_id"=>$item,"order_status"=>1,"order_type"=>'CGGCD'];
                 ProcessOrder::AddProcess($this->post['token'],$process);
-                if($cg['order_type']==2){
-                    $order = Db::name("sale")->where(["orderCode"=>$cg['bkcode']])->find();
+                $orderCode = Db::name("order_num")->where([["cgdNo","=",$cg['cgdNo']],["status","=",1]])->column("orderCode");
+
+                if(!empty($orderCode)){
+                    $order = Db::name("sale")->where(["orderCode"=>$orderCode])->select()->toArray();
                     if(empty($order)){
                         Db::rollback();
                         return error_show(1002,"未找到确认单信息");
                     }
-                    $data=[
-                        "orderCode"=>$cg['bkcode'],
-                        "good_code"=>$cg['good_type_code'],
-                        "good_kode"=>$cg['good_code'],
-                        "good_name"=>$cg['good_name'],
-                        "diff_weight"=>$diff_weight,
-                        "diff_price"=>$diff_weight*$cg['gold_price'],
-                        "gold_price"=>$cg['gold_price'],
-                        "status"=>1,
-                        "addtime"=>date("Y-m-d H:i:s"),
-                        "updatetime"=>date("Y-m-d H:i:s")
-                    ];
-                    $cgd = Db::name('sale_diff')->insert($data,true);
-                    if($cgd>0){
-                        $sto = ["order_code"=>$cg['bkcode'],"status"=>1,"action_remark"=>'',"action_type"=>"create"];
-                        ActionLog::logAdd($this->post['token'],$sto,"ZXGCD",1,$sto);
-                        $process=["order_code"=>$cg['bkcode'],"order_id"=>$cgd,"order_status"=>1,"order_type"=>'ZXGCD'];
-                        ProcessOrder::AddProcess($this->post['token'],$process);
-                        Db::commit();
-                        return error_show(0,"新建成功");
-                    }else{
-                        Db::rollback();
-                        return error_show(1002,"新建失败");
+                    foreach ($orderCode as $value){
+                        $data=[
+                            "orderCode"=>$value['orderCode'],
+                            "good_code"=>$value['spuCode'],
+                            "good_name"=>$value['good_name'],
+                            "diff_weight"=>$diff_weight,
+                            "diff_price"=>$diff_weight*$value['good_price'],
+                            "gold_price"=>$value['good_price'],
+                            "status"=>1,
+                            "addtime"=>date("Y-m-d H:i:s"),
+                            "updatetime"=>date("Y-m-d H:i:s")
+                        ];
+                        $cgd = Db::name('sale_diff')->insert($data,true);
+                        if($cgd==0){
+//                            $sto = ["order_code"=>$cg['bkcode'],"status"=>1,"action_remark"=>'',"action_type"=>"create"];
+//                            ActionLog::logAdd($this->post['token'],$sto,"ZXGCD",1,$sto);
+//                            $process=["order_code"=>$cg['bkcode'],"order_id"=>$cgd,"order_status"=>1,"order_type"=>'ZXGCD'];
+//                            ProcessOrder::AddProcess($this->post['token'],$process);
+//                            Db::commit();
+//                            return error_show(0,"新建成功");
+//                        }else{
+                            Db::rollback();
+                            return error_show(1002,"新建失败");
+                        }
                     }
+
                 }
                 Db::commit();
                 return error_show(0,"新建成功");
@@ -532,11 +534,11 @@ class Purch extends Base
         if($apply_name!==""){
             $where[]=['a.apply_name',"like","%$apply_name%"];
         }
-        $count = Db::name('purchease_diff')->alias('a')->join("good b","b.good_code=a.good_kode","left")
+        $count = Db::name('purchease_diff')->alias('a')->join("good b","b.spuCode=a.good_code","left")
             ->where($where)->count();
         $total = ceil($count/$size);
         $page = $page >= $total ? $total : $page;
-        $list = Db::name('purchease_diff')->alias('a')->join("good b","b.good_code=a.good_kode","left")
+        $list = Db::name('purchease_diff')->alias('a')->join("good b","b.spuCode=a.good_code","left")
             ->where($where)->page($page,$size)->order("a.addtime desc")->field("a.*,b.cat_id")->select();
         $data=[];
         foreach ($list as $value){
@@ -555,7 +557,7 @@ class Purch extends Base
             return error_show(1002,"未找到采购工差单数据");
         }
         $dn = Db::name('purchease_order')->where(['cgdNo'=>$idinf['cgdNo'],'is_del'=>0])->field('order_type')->find();
-        $goon = Db::name('good')->where(['good_code'=>$idinf['good_kode']])->find();
+        $goon = Db::name('good')->where(['spuCode'=>$idinf['good_code']])->find();
         if(empty($goon)){
             return error_show(1002,"未找到商品数据");
         }

+ 0 - 12
app/admin/controller/Specs.php

@@ -143,23 +143,11 @@ class Specs extends BaseController
         if($spec_name==""){
             return error_show(1002,"参数spec_name不能为空");
         }
-//        $token = isset($this->post['token'])&&$this->post['token']!='' ? trim($this->post['token']):"";
-//        if($token==''){
-//            return error_show(105,"参数token不能为空");
-//        }
-//        $user =GetUserInfo($token);
-//        if(empty($user)||$user['code']!=0){
-//            return error_show(1002,"创建人数据不存在");
-//        }
-//        $createrid= isset($user["data"]['id']) ?  $user["data"]['id'] : "";
-//        $creater= isset($user["data"]['nickname']) ?  $user["data"]['nickname'] : "";
         $exam_status = isset($this->post['exam_status']) &&$this->post['exam_status'] !==""? intval($this->post['exam_status']):"0";
         $status = isset($this->post['status']) &&$this->post['status'] !==""? intval($this->post['status']):"0";
         $data = [
             "id"=>$id,
             "spec_name"=>$spec_name,
-//            "creater"=>$creater,
-//            "createrid"=>$createrid,
             "exam_status"=>$exam_status,
             "status"=>$status,
             "is_del"=>0,