|
@@ -3,7 +3,6 @@
|
|
|
namespace app\api\controller;
|
|
namespace app\api\controller;
|
|
|
|
|
|
|
|
use app\common\controller\Api;
|
|
use app\common\controller\Api;
|
|
|
-use app\api\controller\OrderSuperLoss;
|
|
|
|
|
use think\db\exception\DataNotFoundException;
|
|
use think\db\exception\DataNotFoundException;
|
|
|
use think\db\exception\ModelNotFoundException;
|
|
use think\db\exception\ModelNotFoundException;
|
|
|
use think\exception\DbException;
|
|
use think\exception\DbException;
|
|
@@ -518,24 +517,6 @@ class GluFinishedProductWarehousing extends Api
|
|
|
$this->error($e->getMessage());
|
|
$this->error($e->getMessage());
|
|
|
}
|
|
}
|
|
|
if($bool===false) $this->error('失败');
|
|
if($bool===false) $this->error('失败');
|
|
|
- //末版输入进入超节损
|
|
|
|
|
- $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('失败');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
$this->success('成功');
|
|
$this->success('成功');
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -606,23 +587,6 @@ class GluFinishedProductWarehousing extends Api
|
|
|
db()->rollback();
|
|
db()->rollback();
|
|
|
$this->error($e->getMessage());
|
|
$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('失败');
|
|
if($bool===false) $this->error('失败');
|
|
|
|
|
|
|
|
$this->success('成功');
|
|
$this->success('成功');
|