Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
php_frq_api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1e5c688c
authored
May 14, 2021
by
hcy001
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
更新自动报价
parent
4d21634c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
app/Model/QuoteModel.php
app/Model/QuoteModel.php
View file @
1e5c688c
...
...
@@ -461,7 +461,7 @@ class QuoteModel extends Model
}
/*
* 批量新增报价
* 批量新增报价
(自动报价用)
*
*/
public
function
addBatch
(
$indata
)
...
...
@@ -494,6 +494,7 @@ class QuoteModel extends Model
#拼接批量插入明细
foreach
(
$input
as
$k
=>
&
$v
)
{
$v
[
"is_auto"
]
=
1
;
#todo 2021.5.4 增加自动报价标识
if
(
$classArr
!==
false
)
{
$classInfo
=
@
$classArr
[
strtoupper
(
$v
[
"goods_name"
])
.
"#"
.
strtoupper
(
$v
[
"brand_name"
])];
...
...
@@ -544,22 +545,22 @@ class QuoteModel extends Model
}
}
if
(
$inquiry_items_status
==
1
)
{
// 询价明细为待报价时,更新为已报价
InquiryItemsModel
::
where
(
'id'
,
$inquiry_items_id
)
->
update
([
'status'
=>
2
]);
}
//
if ($inquiry_items_status == 1) { // 询价明细为待报价时,更新为已报价
//
InquiryItemsModel::where('id', $inquiry_items_id)->update(['status' => 2]);
//
}
// 通知询价人,放入redis
RedisDB
::
sadd
(
'frq_quote_urge'
,
$inquiry_items_id
);
$con
->
commit
();
// 推送消息
$inquiry_id
=
InquiryItemsModel
::
where
(
'id'
,
$inquiry_items_id
)
->
value
(
'inquiry_id'
);
$InquiryModel
=
new
InquiryModel
;
$inquiry_uid
=
$InquiryModel
->
where
(
'id'
,
$inquiry_id
)
->
value
(
'create_uid'
);
// 询价人
$contents
=
'您有新报价,请及时查看!'
;
$CommonModel
->
send_msg
(
$inquiry_uid
,
$contents
);
//
$inquiry_id = InquiryItemsModel::where('id', $inquiry_items_id)->value('inquiry_id');
//
//
$InquiryModel = new InquiryModel;
//
$inquiry_uid = $InquiryModel->where('id', $inquiry_id)->value('create_uid'); // 询价人
//
//
$contents = '您有新报价,请及时查看!';
//
$CommonModel->send_msg($inquiry_uid, $contents);
return
[
0
,
"新增成功"
];
}
catch
(
\Exception
$e
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment