|
|
@@ -1175,7 +1175,11 @@ class OrderSuperLoss extends Api
|
|
|
->alias('a')
|
|
|
->join('工单_印件资料 b', 'a.Gy0_gdbh = b.Yj_Gdbh AND a.印件及工序 = b.yj_Yjno')
|
|
|
->where('a.sys_ny', $date)
|
|
|
- ->where('b.质量考核', 0)
|
|
|
+ // 修改质量考核条件为 0 或者 NULL
|
|
|
+ ->where(function ($query) {
|
|
|
+ $query->where('b.质量考核', 0)
|
|
|
+ ->whereOr('b.质量考核',null); // 检查为空
|
|
|
+ })
|
|
|
->select();
|
|
|
$data = [];
|
|
|
foreach ($list as $item) {
|
|
|
@@ -1770,7 +1774,8 @@ class OrderSuperLoss extends Api
|
|
|
b.`零头处理`,
|
|
|
b.`外发废`,
|
|
|
SUM(b.`班组制程废品`) AS zcfp,
|
|
|
- `工单质检废` AS 工单质检废
|
|
|
+ `工单质检废` AS 工单质检废,
|
|
|
+ c.质量考核
|
|
|
';
|
|
|
$list = \db('成品入仓')
|
|
|
->alias('a')
|
|
|
@@ -1804,7 +1809,6 @@ class OrderSuperLoss extends Api
|
|
|
}
|
|
|
$list[$key]['reward_rate'] = '1'; // or some logic if needed
|
|
|
}
|
|
|
-
|
|
|
if (!empty($list)) {
|
|
|
$this->success('成功', $list);
|
|
|
} else {
|