|
@@ -85,16 +85,24 @@ class GoodCatCheck extends Command
|
|
|
}
|
|
|
|
|
|
protected function GetGoodBasicNum($companyNo){
|
|
|
- return GoodBasic::where([['companyNo',"=",$companyNo],["is_del","=",0],["status","=",9]])->count();
|
|
|
+ $where = [
|
|
|
+ ['is_del','=',0],['status','=',9]
|
|
|
+ ];
|
|
|
+ if($companyNo!=''){
|
|
|
+ $where[] = ['companyNo','=',$companyNo];
|
|
|
+ }
|
|
|
+ return GoodBasic::where( $where)->count();
|
|
|
}
|
|
|
protected function GetConsultBidsNum($companyNo){
|
|
|
- return ConsultBids::withJoin(["ConsultOrder"])
|
|
|
- ->where([
|
|
|
- ['ConsultOrder.companyNo',"=",$companyNo],
|
|
|
+ $where = [
|
|
|
["ConsultOrder.is_del","=",0],
|
|
|
["tax_status","=",0],
|
|
|
["consult_bids.is_del","=",0],
|
|
|
- ])
|
|
|
- ->count();
|
|
|
+ ];
|
|
|
+ if($companyNo!=''){
|
|
|
+ $where[] = ['ConsultOrder.companyNo','=',$companyNo];
|
|
|
+ }
|
|
|
+ return ConsultBids::withJoin(["ConsultOrder"])
|
|
|
+ ->where( $where ) ->count();
|
|
|
}
|
|
|
}
|