|
@@ -489,7 +489,7 @@ class Decision extends Api
|
|
|
(1 - ((SUM(a.班组制程废品) + SUM(a.班组质检废品)) / SUM(a.班组产量))) * 100 as 合格率')
|
|
(1 - ((SUM(a.班组制程废品) + SUM(a.班组质检废品)) / SUM(a.班组产量))) * 100 as 合格率')
|
|
|
->where(function ($query) use ($process) {
|
|
->where(function ($query) use ($process) {
|
|
|
foreach ($process['keys'] as $key) {
|
|
foreach ($process['keys'] as $key) {
|
|
|
- $query->whereOr('a.工序名称', 'like', "%{$key}%");
|
|
|
|
|
|
|
+ $query->whereOr('b.Gy0_gxmc', 'like', "%{$key}%");
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
->where('d.jjcp_smb', 'like', '末%')
|
|
->where('d.jjcp_smb', 'like', '末%')
|
|
@@ -504,7 +504,6 @@ class Decision extends Api
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
// 计算年度平均值
|
|
// 计算年度平均值
|
|
|
foreach ($result as $processName => &$processData) {
|
|
foreach ($result as $processName => &$processData) {
|
|
|
$totalAnnual = 0;
|
|
$totalAnnual = 0;
|
|
@@ -588,6 +587,7 @@ class Decision extends Api
|
|
|
a.产品名称 AS 印件名称,
|
|
a.产品名称 AS 印件名称,
|
|
|
a.工序 AS 工序,
|
|
a.工序 AS 工序,
|
|
|
a.工序名称,
|
|
a.工序名称,
|
|
|
|
|
+ b.Gy0_gxmc,
|
|
|
a.联数,
|
|
a.联数,
|
|
|
a.班组产量,
|
|
a.班组产量,
|
|
|
a.班组制程废品,
|
|
a.班组制程废品,
|
|
@@ -619,7 +619,7 @@ class Decision extends Api
|
|
|
// 顺序匹配分类规则
|
|
// 顺序匹配分类规则
|
|
|
foreach ($processOrder as $typeId => $rule) {
|
|
foreach ($processOrder as $typeId => $rule) {
|
|
|
foreach ($rule['keys'] as $keyword) {
|
|
foreach ($rule['keys'] as $keyword) {
|
|
|
- if (strpos($item['工序名称'], $keyword) !== false) {
|
|
|
|
|
|
|
+ if (strpos($item['Gy0_gxmc'], $keyword) !== false) {
|
|
|
// 添加分类标记
|
|
// 添加分类标记
|
|
|
$item['type_id'] = $typeId;
|
|
$item['type_id'] = $typeId;
|
|
|
$item['type_name'] = $rule['name'];
|
|
$item['type_name'] = $rule['name'];
|