Commit da3b5b74 by 庄冰

bw

parent 3b4ecb26
...@@ -882,7 +882,7 @@ class OrderTmProductService extends ServiceBase { ...@@ -882,7 +882,7 @@ class OrderTmProductService extends ServiceBase {
async addAssistTm(params) { async addAssistTm(params) {
// return system.getResultSuccess(null, "接口开发中"); // return system.getResultSuccess(null, "接口开发中");
var self = this; var self = this;
var itemCode = params.itemCode;//产品编码 var itemCode = "";//产品编码
var tm = params.tm;//增加sourceType || "00";//来源类型:00订单,10需求,20服务商 var tm = params.tm;//增加sourceType || "00";//来源类型:00订单,10需求,20服务商
var apply = params.apply; var apply = params.apply;
var nclones = params.nclones || null; var nclones = params.nclones || null;
...@@ -899,6 +899,9 @@ class OrderTmProductService extends ServiceBase { ...@@ -899,6 +899,9 @@ class OrderTmProductService extends ServiceBase {
if (!order || !order.id) { if (!order || !order.id) {
return system.getResult(null, "未知订单"); return system.getResult(null, "未知订单");
} }
if(order.itemCode){
itemCode = order.itemCode;
}
//获取渠道用户数据 //获取渠道用户数据
var user = await this.userDao.model.findOne({ var user = await this.userDao.model.findOne({
where: { channelUserId: order.channelUserId, app_id: order.app_id }, where: { channelUserId: order.channelUserId, app_id: order.app_id },
...@@ -917,7 +920,9 @@ class OrderTmProductService extends ServiceBase { ...@@ -917,7 +920,9 @@ class OrderTmProductService extends ServiceBase {
return system.getResult(null, "itemCode参数错误"); return system.getResult(null, "itemCode参数错误");
} }
// itemCode="zzsbzc";//测试 // itemCode="zzsbzc";//测试
var productItem = await this.appproductDao.findOneByServiceItemCode(itemCode, user.app_id);//获取产品 var productItem = await this.appproductDao.model.findOne({
where:{itemCode:itemCode, app_id:user.app_id},raw:true
});//获取产品
if (!productItem) { if (!productItem) {
return system.getResult(null, "未知的产品"); return system.getResult(null, "未知的产品");
} }
...@@ -956,10 +961,10 @@ class OrderTmProductService extends ServiceBase { ...@@ -956,10 +961,10 @@ class OrderTmProductService extends ServiceBase {
var jfcode = await self.getBusUid("jf"); var jfcode = await self.getBusUid("jf");
var orderProductObj = { var orderProductObj = {
app_id: user.app_id,// app_id: user.app_id,//
productType_id: productItem.picUrl,//产品类型Id // productType_id: productItem.picUrl,//产品类型Id
productOneType_id: productItem.picUrl,//产品大类Id // productOneType_id: productItem.picUrl,//产品大类Id
itemCode: productItem.itemCode,// // itemCode: productItem.itemCode,//
itemName: productItem.itemName,// // itemName: productItem.itemName,//
tmName: tm.tmName,//商标名称 tmName: tm.tmName,//商标名称
tmType: "p",//"p": "普通商标", "j": "集体商标", "z": "证明商标", "t": "特殊商标" tmType: "p",//"p": "普通商标", "j": "集体商标", "z": "证明商标", "t": "特殊商标"
tmFormType: tm.tmFormType,//商标类型形式:"1": "立体", "3": "字", "4": "图", "5": "字图", "6": "颜色", "7": "彩色" tmFormType: tm.tmFormType,//商标类型形式:"1": "立体", "3": "字", "4": "图", "5": "字图", "6": "颜色", "7": "彩色"
......
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