|
|
@@ -333,8 +333,8 @@ class PackagingCountDocument extends Api
|
|
|
//开启事务
|
|
|
db()->startTrans();
|
|
|
try{
|
|
|
- $bool = db()->table('db_包装计件')->insert($data);
|
|
|
-
|
|
|
+ $sql = db()->table('db_包装计件')->fetchSql(true)->insert($data);
|
|
|
+ $bool = db()->query($sql);
|
|
|
// 提交事务
|
|
|
db()->commit();
|
|
|
} catch (\Exception $e) {
|
|
|
@@ -365,8 +365,6 @@ class PackagingCountDocument extends Api
|
|
|
if(!$this->request->isPost()){
|
|
|
$this->error('请求方式错误');
|
|
|
}
|
|
|
- $bool = db()->table('db_包装计件')->where('UniqId',0)->update(['sczl_冲定额'=>1]);
|
|
|
- halt($bool);
|
|
|
$req = $this->request->param();
|
|
|
$arr = [
|
|
|
'sys_id','sczl_rq', 'sczl_bh', 'sczl_jsss', 'sczl_冲定额', 'sczl_bzdh',
|
|
|
@@ -396,8 +394,8 @@ class PackagingCountDocument extends Api
|
|
|
//开启事务
|
|
|
db()->startTrans();
|
|
|
try{
|
|
|
- $bool = db()->table('db_包装计件')->where('UniqId',$req['UniqId'])->update($data);
|
|
|
-
|
|
|
+ $sql = db()->table('db_包装计件')->where('UniqId',$req['UniqId'])->fetchSql(true)->update($data);
|
|
|
+ $bool = db()->query($sql);
|
|
|
// 提交事务
|
|
|
db()->commit();
|
|
|
} catch (\Exception $e) {
|
|
|
@@ -432,7 +430,6 @@ class PackagingCountDocument extends Api
|
|
|
db()->startTrans();
|
|
|
try{
|
|
|
$bool = db()->table('db_包装计件')->where('UniqId',$req['UniqId'])->delete();
|
|
|
-
|
|
|
// 提交事务
|
|
|
db()->commit();
|
|
|
} catch (\Exception $e) {
|