Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
3b4431e3
Commit
3b4431e3
authored
Dec 24, 2020
by
兰国旗
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
laolan
parent
2182080a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
center-app/app/base/service/impl/dbproduct/productSve.js
+14
-8
No files found.
center-app/app/base/service/impl/dbproduct/productSve.js
View file @
3b4431e3
...
...
@@ -242,20 +242,26 @@ class ProductService extends ServiceBase {
//2020-12-21 baidu reg copy todo
async
getRegProducePrice
(
actionBody
){
console
.
log
(
'actionBody---'
,
actionBody
)
var
itemCode
=
{
item_code
:
actionBody
.
typeCode
}
var
pathSql
=
"SELECT path_code,channel_item_code FROM p_product WHERE item_code = :item_code"
;
var
pathCodeData
=
await
this
.
customQuery
(
pathSql
,
itemCode
);
if
(
actionBody
.
pathCode
){
var
pathCode
=
actionBody
.
pathCode
;
}
else
{
var
itemCode
=
{
item_code
:
actionBody
.
typeCode
}
var
pathSql
=
"SELECT path_code FROM p_product WHERE item_code = :item_code"
;
var
pathCodeData
=
await
this
.
customQuery
(
pathSql
,
itemCode
);
if
(
pathCodeData
){
var
pathCode
=
pathCodeData
[
0
].
path_code
;
}
}
console
.
log
(
'pathCode---'
,
pathCode
)
let
channelItemCode
=
actionBody
.
channelItemCode
;
if
(
actionBody
.
channelItemCode
){
var
channelItemCode
=
actionBody
.
channelItemCode
;
}
else
{
if
(
pathCodeData
){
var
channelItemCode
=
pathCodeData
[
0
].
channel_item_code
;
}
}
const
code1
=
pathCode
.
split
(
'/'
)[
1
];
//一级产品码
const
code2
=
pathCode
.
split
(
'/'
)[
2
];
//二级产品码
let
channel_item_code
=
code2
;
...
...
@@ -338,10 +344,10 @@ class ProductService extends ServiceBase {
if
(
code2
==
"GSREG"
){
if
(
actionBody
.
city
&&
actionBody
.
taxpayerType
){
let
str
=
actionBody
.
city
+
actionBody
.
taxpayerType
;
producesql
+=
` AND pc.price_desc
LIKE '%
${
str
}
%
'`
;
producesql
+=
` AND pc.price_desc
= '
${
str
}
'`
;
}
if
(
actionBody
.
companyProperties
){
producesql
+=
` AND pc.additions_desc
LIKE '%
${
actionBody
.
companyProperties
}
%
'`
;
producesql
+=
` AND pc.additions_desc
= '
${
actionBody
.
companyProperties
}
'`
;
}
else
{
return
system
.
getResultFail
(
null
,
'actionBody.companyProperties and actionBody.companyProperties can not be empty!'
)
}
...
...
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