소스 검색

修改:使用 delStatus 做删除状态标识

shizhongqi 1 년 전
부모
커밋
aa6ee09023
2개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 3
      app-ghs/controllers/ExpendController.php
  2. 1 1
      biz-ghs/stat/classes/StatSaleClass.php

+ 4 - 3
app-ghs/controllers/ExpendController.php

@@ -38,7 +38,7 @@ class ExpendController extends BaseController
 
         $where = ['mainId' => $this->mainId];
         $where['payTime'] = ['between', [$currentStartTime, $currentEndTime]];
-        $where['delStaffId'] = 0; //过滤掉已删除的
+        $where['delStatus'] = 0; //过滤掉已删除的
         $list = ExpendClass::getAllByCondition($where, null, '*', null);
         $arr = [];
         $cat = [];
@@ -93,7 +93,7 @@ class ExpendController extends BaseController
     {
         ini_set('memory_limit', '2045M');
         set_time_limit(0);
-        $where = ['mainId' => $this->mainId, 'bx' => 0, 'delStaffId' => 0];
+        $where = ['mainId' => $this->mainId, 'bx' => 0, 'delStatus' => 0];
         $list = ExpendClass::getAllByCondition($where, null, '*', null);
         $arr = [];
         if (!empty($list)) {
@@ -207,7 +207,7 @@ class ExpendController extends BaseController
             $where['bx'] = $bx;
         }
         if (true) { //过滤掉已删除的
-            $where['delStaffId'] = 0;
+            $where['delStatus'] = 0;
         }
         $searchTime = isset($get['searchTime']) && !empty($get['searchTime']) ? $get['searchTime'] : 'thisYear';
         $startTime = $get['startTime'] ?? '';
@@ -392,6 +392,7 @@ class ExpendController extends BaseController
         }
         $expend->delStaffId = $staffId;
         $expend->delStaffName = $staff->name;
+        $expend->delStatus = 1;
         $rs = $expend->save();
         if ($rs) {
             util::complete();

+ 1 - 1
biz-ghs/stat/classes/StatSaleClass.php

@@ -337,7 +337,7 @@ class StatSaleClass extends BaseClass
         $condition = [
             'mainId' => $mainId,
             'payTime' => ['between', [$currentStartTime, $currentEndTime]],
-            'delStaffId' => 0,
+            'delStatus' => 0,
         ];
         $expendList = ExpendClass::getAllByCondition($condition, null, '*', null, true);
         $expendTypeMap = dict::getDict('expendTypeMap');