Bläddra i källkod

工序大废品

qiuenguang 1 år sedan
förälder
incheckning
df8312bb20
1 ändrade filer med 8 tillägg och 2 borttagningar
  1. 8 2
      application/api/controller/LargeWasteRewardPunish.php

+ 8 - 2
application/api/controller/LargeWasteRewardPunish.php

@@ -5,6 +5,7 @@ namespace app\api\controller;
 use app\common\controller\Api;
 use think\db;
 use think\Request;
+use function fast\e;
 
 /**
  * 工序大废品惩奖记录接口
@@ -97,13 +98,18 @@ class LargeWasteRewardPunish extends Api
         $req['date'] = str_replace('.','-',$date);
         $where = [];
         if (isset($req['date']) && !empty($req['date'])){
-            $where['sczl_rq'] = ['LIKE',$req['date'].'%'];
+            if (preg_match('/[\x{4e00}-\x{9fa5}]/u', $req['date']) > 0){
+                $where['sys_rq'] = ['LIKE',$req['date'].'%'];
+            }else{
+                $where['sczl_rq'] = ['LIKE',$req['date'].'%'];
+            }
+
         }else{
             $this->error('参数错误');
         }
         $res = db()->table('db_大废品')
         ->field('sczl_gdbh, LEFT(sczl_rq, 10) as sczl_rq, rtrim(sczl_numDesc) as sczl_numDesc, sczl_ls, sczl_yjno, 
-        rtrim(责任部门) as 责任部门, CAST(sczl_cl AS SIGNED) as sczl_cl, 
+        rtrim(责任部门) as 责任部门,sczl_cl, 
         rtrim(sczl_fplxA) as sczl_fplxA, sczl_fplxB, Jl_bzdh, JL_bh1, 
         sczl_bzdh, sczl_bh1, sczl_je1, sczl_bh2, sczl_je2, rtrim(sys_id) as sys_id, sys_rq, UniqId')
         ->where('sczl_gdbh',$req['date'])