|
@@ -30,7 +30,9 @@ class WaterQueryController
|
|
|
['wide', ''],// 宽
|
|
|
['high', ''],// 高
|
|
|
['is_warm', ''], // 是否保温
|
|
|
+ ['warm', ''], // 是否保温
|
|
|
['is_channel', ''], // 是否需要槽钢
|
|
|
+ ['channel', ''], // 是否需要槽钢
|
|
|
['is_human_ladder', ''] ,// 是否需要人梯
|
|
|
['is_gc', ''] ,// 公差
|
|
|
['roof', ''], // 顶板厚度
|
|
@@ -117,7 +119,7 @@ class WaterQueryController
|
|
|
$table = [];
|
|
|
$zj = 0; //总价
|
|
|
$zzl = 0; // 总重量
|
|
|
- $where[] = [];
|
|
|
+ $where = [];
|
|
|
// if ($data['is_gc'] > 0){
|
|
|
// $where[] = ['is_gc', '=' ,1];
|
|
|
// }else{
|
|
@@ -225,17 +227,17 @@ class WaterQueryController
|
|
|
//保温
|
|
|
foreach ($calculation['warm'] as $k => $v){
|
|
|
if ($k == 'warm1' and $v > 0){
|
|
|
- $details = WaterMaterialScience::where('cate_id', $data['is_warm'])->where([['long', '=', 1], ['wide', '=', 1]])->where($where)->find();
|
|
|
+ $details = WaterMaterialScience::where('cate_id', $data['warm'])->where([['long', '=', 1], ['wide', '=', 1]])->where($where)->find();
|
|
|
$zj += $details['unit_price'] * $v;
|
|
|
$zzl += $details['weight'] * $v;
|
|
|
$table[] = ['title' => '保温板' , 'name' => $details['name'], 'specifications' => '1*1', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weight' => $details['weight'] * $v , 'type' => 7];
|
|
|
}elseif ($k == 'warm2' and $v > 0){
|
|
|
- $details = WaterMaterialScience::where('cate_id', $data['is_warm'])->where([['long', '=', 1], ['wide', '=', 0.5]])->where($where)->find();
|
|
|
+ $details = WaterMaterialScience::where('cate_id', $data['warm'])->where([['long', '=', 1], ['wide', '=', 0.5]])->where($where)->find();
|
|
|
$zj += $details['unit_price'] * $v;
|
|
|
$zzl += $details['weight'] * $v;
|
|
|
$table[] = ['title' => '保温板' , 'name' => $details['name'], 'specifications' => '1*0.5', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weight' => $details['weight'] * $v , 'type' => 7];
|
|
|
}elseif ($k == 'warm3' and $v > 0){
|
|
|
- $details = WaterMaterialScience::where('cate_id', $data['is_warm'])->where([['long', '=', 0.5], ['wide', '=', 0.5]])->where($where)->find();
|
|
|
+ $details = WaterMaterialScience::where('cate_id', $data['warm'])->where([['long', '=', 0.5], ['wide', '=', 0.5]])->where($where)->find();
|
|
|
$zj += $details['unit_price'] * $v;
|
|
|
$zzl += $details['weight'] * $v;
|
|
|
$table[] = ['title' => '保温板' , 'name' => $details['name'], 'specifications' => '0.5*0.5', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weight' => $details['weight'] * $v , 'type' => 7];
|
|
@@ -244,7 +246,7 @@ class WaterQueryController
|
|
|
}
|
|
|
//槽钢
|
|
|
if ($data['is_channel'] > 0){
|
|
|
- $details = WaterMaterialScience::where('cate_id', $data['is_channel'])->where($where)->find();
|
|
|
+ $details = WaterMaterialScience::where('cate_id', $data['channel'])->where($where)->find();
|
|
|
$zj += $details['unit_price'] * $calculation['channel_number'];
|
|
|
$zzl += $details['weight'] * $calculation['channel_number'];
|
|
|
$table[] = ['title' => '槽钢' , 'name' => $details['name'], 'specifications' => '1', 'number' => $calculation['channel_number'], 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $calculation['channel_number'], 'weight' => $details['weight'] * $calculation['channel_number'] , 'type' => 8];
|