|
@@ -454,7 +454,13 @@ class WasteRecord extends Base {
|
|
->sum('weight');
|
|
->sum('weight');
|
|
// $info['weight'] = $weight?round($weight/1000,2):0;
|
|
// $info['weight'] = $weight?round($weight/1000,2):0;
|
|
$info['kg'] = $weight?round($weight/1000,2):0;
|
|
$info['kg'] = $weight?round($weight/1000,2):0;
|
|
- $info['weight'] = $weight;
|
|
|
|
|
|
+
|
|
|
|
+ if($platform == 'iOS'){
|
|
|
|
+ $info['weight'] = $weight;
|
|
|
|
+ }else{
|
|
|
|
+ $info['weight'] = $weight?round($weight/1000,2):0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
$count = $this->where('package_id',$info['id'])
|
|
$count = $this->where('package_id',$info['id'])
|
|
@@ -479,12 +485,7 @@ class WasteRecord extends Base {
|
|
$record[$k]['cate_name'] =Db::name('waste_type')
|
|
$record[$k]['cate_name'] =Db::name('waste_type')
|
|
->where('id',$v['cateid'])->value('title');
|
|
->where('id',$v['cateid'])->value('title');
|
|
// $record[$k]['weight'] = $v['weight']?round($v['weight']/1000,2):0;
|
|
// $record[$k]['weight'] = $v['weight']?round($v['weight']/1000,2):0;
|
|
-
|
|
|
|
- if($platform == 'iOS'){
|
|
|
|
- $record[$k]['weight'] = $v['weight']?$v['weight']:0;
|
|
|
|
- }else{
|
|
|
|
- $record[$k]['weight'] = $v['weight']?round($v['weight']/1000,2):0;
|
|
|
|
- }
|
|
|
|
|
|
+ $record[$k]['weight'] = $v['weight']?$v['weight']:0;
|
|
|
|
|
|
$record[$k]['kg'] = $v['weight']?round($v['weight']/1000,2):0;
|
|
$record[$k]['kg'] = $v['weight']?round($v['weight']/1000,2):0;
|
|
|
|
|