|
|
@@ -500,6 +500,10 @@ class FinishedProductWarehousing extends Api
|
|
|
} catch (ModelNotFoundException $e) {
|
|
|
} catch (DbException $e) {
|
|
|
}
|
|
|
+ db('工单_质量考核汇总')
|
|
|
+ ->where('Gy0_gdbh',$data['jjcp_gdbh'])
|
|
|
+ ->where('印件及工序',$data['jjcp_yjno'])
|
|
|
+ ->delete();
|
|
|
$sql = db('工单_质量考核汇总')->fetchSql(true)->insertAll($result);
|
|
|
$res = db()->query($sql);
|
|
|
if($res===false) $this->error('失败');
|
|
|
@@ -570,6 +574,22 @@ class FinishedProductWarehousing extends Api
|
|
|
db()->rollback();
|
|
|
$this->error($e->getMessage());
|
|
|
}
|
|
|
+ $oederLoss = new \app\api\controller\OrderSuperLoss();
|
|
|
+ if (strpos($data['jjcp_smb'],'末') !== false){
|
|
|
+ try {
|
|
|
+ $result = $oederLoss->OneOrderSuperLoss($data['jjcp_gdbh'], $data['jjcp_yjno']);
|
|
|
+ } catch (DataNotFoundException $e) {
|
|
|
+ } catch (ModelNotFoundException $e) {
|
|
|
+ } catch (DbException $e) {
|
|
|
+ }
|
|
|
+ db('工单_质量考核汇总')
|
|
|
+ ->where('Gy0_gdbh',$data['jjcp_gdbh'])
|
|
|
+ ->where('印件及工序',$data['jjcp_yjno'])
|
|
|
+ ->delete();
|
|
|
+ $sql = db('工单_质量考核汇总')->fetchSql(true)->insertAll($result);
|
|
|
+ $res = db()->query($sql);
|
|
|
+ if($res===false) $this->error('失败');
|
|
|
+ }
|
|
|
|
|
|
if($bool===false) $this->error('失败');
|
|
|
|