|
|
@@ -2145,6 +2145,17 @@ class WorkOrder extends Api
|
|
|
//循环删除工艺资料
|
|
|
$deletedGxh = [];
|
|
|
foreach ($printId as $value){
|
|
|
+ $process = \db('工单_工艺资料')
|
|
|
+ ->where('UniqId',$value)
|
|
|
+ ->find();
|
|
|
+ $processCount = \db('设备_产量计酬')
|
|
|
+ ->where('sczl_gdbh',$process['Gy0_gdbh'])
|
|
|
+ ->where('sczl_yjno',$process['Gy0_yjno'])
|
|
|
+ ->where('sczl_gxh',$process['Gy0_gxh'])
|
|
|
+ ->count();
|
|
|
+ if ($processCount > 0){
|
|
|
+ $this->error('工序'.$process['Gy0_gxh'].'已上报数据,无法删除,请核对');
|
|
|
+ }
|
|
|
$res = \db('工单_工艺资料')
|
|
|
->where('UniqId',$value)
|
|
|
->delete();
|