|
|
@@ -1498,6 +1498,15 @@ class OrderSuperLoss extends Api
|
|
|
->where('印件及工序', $yjno)
|
|
|
->delete();
|
|
|
|
|
|
+ foreach ($rows as $idx => $row) {
|
|
|
+ for ($r = 1; $r <= 8; $r++) {
|
|
|
+ $key = 'sczl_rate' . $r;
|
|
|
+ if (!isset($row[$key]) || $row[$key] === '' || $row[$key] === null) {
|
|
|
+ $rows[$idx][$key] = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
$sql = db('工单_质量考核汇总')->fetchSql(true)->insertAll($rows);
|
|
|
$res = db()->query($sql);
|
|
|
|
|
|
@@ -2384,7 +2393,7 @@ class OrderSuperLoss extends Api
|
|
|
$item['sczl_bzdh'] = '';
|
|
|
for ($j = 1; $j <= 10; $j++) {
|
|
|
$item['sczl_bh' . $j] = '';
|
|
|
- $item['sczl_rate' . $j] = '';
|
|
|
+ $item['sczl_rate' . $j] = 0;
|
|
|
}
|
|
|
$item['Gd_客户代号'] = $item['Gd_客户代号'] ?? '';
|
|
|
$item['Gd_客户名称'] = $item['Gd_客户名称'] ?? '';
|