Commit 2182080a by 兰国旗

laolan

parent 2f4558e9
...@@ -61,7 +61,7 @@ class OpProductAPI extends APIBase { ...@@ -61,7 +61,7 @@ class OpProductAPI extends APIBase {
break; break;
//2020-12-17 baidu reg start ----------------- //2020-12-17 baidu reg start -----------------
case "getRegProducePrice"://获取reg产品price case "getRegProducePrice"://获取reg产品price
opResult = await this.productSve.getRegProducePrice(pobj.actionBody,pobj.appInfo); opResult = await this.productSve.getRegProducePrice(pobj.actionBody);
break; break;
//2020-12-17 baidu reg end ----------------- //2020-12-17 baidu reg end -----------------
......
...@@ -241,7 +241,20 @@ class ProductService extends ServiceBase { ...@@ -241,7 +241,20 @@ class ProductService extends ServiceBase {
//2020-12-21 baidu reg copy todo //2020-12-21 baidu reg copy todo
async getRegProducePrice(actionBody){ async getRegProducePrice(actionBody){
let pathCode = actionBody.pathCode; console.log('actionBody---',actionBody)
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; let channelItemCode = actionBody.channelItemCode;
const code1 = pathCode.split('/')[1];//一级产品码 const code1 = pathCode.split('/')[1];//一级产品码
const code2 = pathCode.split('/')[2];//二级产品码 const code2 = pathCode.split('/')[2];//二级产品码
...@@ -322,6 +335,7 @@ class ProductService extends ServiceBase { ...@@ -322,6 +335,7 @@ class ProductService extends ServiceBase {
break; break;
// 2020-12-21新增 /REG/GSREG/ 询价方法 // 2020-12-21新增 /REG/GSREG/ 询价方法
case 'REG': case 'REG':
if(code2 == "GSREG"){
if(actionBody.city && actionBody.taxpayerType ){ if(actionBody.city && actionBody.taxpayerType ){
let str = actionBody.city + actionBody.taxpayerType; let str = actionBody.city + actionBody.taxpayerType;
producesql += ` AND pc.price_desc LIKE '%${str}%'`; producesql += ` AND pc.price_desc LIKE '%${str}%'`;
...@@ -331,6 +345,7 @@ class ProductService extends ServiceBase { ...@@ -331,6 +345,7 @@ class ProductService extends ServiceBase {
}else{ }else{
return system.getResultFail(null,'actionBody.companyProperties and actionBody.companyProperties can not be empty!') return system.getResultFail(null,'actionBody.companyProperties and actionBody.companyProperties can not be empty!')
} }
}
break; break;
default: default:
producesql += ` AND pt.channel_item_code = '${code2}'`; producesql += ` AND pt.channel_item_code = '${code2}'`;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment