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
63f083cb
Commit
63f083cb
authored
May 19, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
5355c4a2
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
115 additions
and
108 deletions
+115
-108
fqboss/app/base/db/models/trademark.js
+3
-2
fqboss/app/base/service/impl/orderSve.js
+39
-50
fqboss/app/base/service/impl/trademarkSve.js
+39
-25
fqboss/app/config/localsettings.js
+32
-31
fqboss/app/config/routes/web.js
+2
-0
No files found.
fqboss/app/base/db/models/trademark.js
View file @
63f083cb
...
@@ -116,8 +116,9 @@ module.exports = (db, DataTypes) => {
...
@@ -116,8 +116,9 @@ module.exports = (db, DataTypes) => {
businessId
:
DataTypes
.
STRING
(
50
),
//业务ID
businessId
:
DataTypes
.
STRING
(
50
),
//业务ID
channelOrderListInfo
:
DataTypes
.
STRING
(
500
),
//渠道服务单号对应的订单列表信息
channelOrderListInfo
:
DataTypes
.
STRING
(
500
),
//渠道服务单号对应的订单列表信息
channelPric
:
DataTypes
.
DECIMAL
(
12
,
2
),
//渠道商标单个大类的价格
channelPric
:
DataTypes
.
DECIMAL
(
12
,
2
),
//渠道商标单个大类的价格
nclCount
:
DataTypes
.
INTEGER
,
nclCount
:
DataTypes
.
INTEGER
,
nclPublicExpense
:
DataTypes
.
DECIMAL
(
12
,
2
),
nclPublicExpense
:
DataTypes
.
DECIMAL
(
12
,
2
),
principal
:
DataTypes
.
STRING
(
100
),
//提报主体
},
{
},
{
paranoid
:
true
,
//假的删除
paranoid
:
true
,
//假的删除
underscored
:
true
,
underscored
:
true
,
...
...
fqboss/app/base/service/impl/orderSve.js
View file @
63f083cb
...
@@ -1053,7 +1053,7 @@ class OrderService extends ServiceBase {
...
@@ -1053,7 +1053,7 @@ class OrderService extends ServiceBase {
"needId"
:
tm
.
needId
||
""
,
"needId"
:
tm
.
needId
||
""
,
"channelOrderListInfo"
:
nclone
.
channelOrderListInfo
||
tm
.
channelOrderListInfo
||
""
,
"channelOrderListInfo"
:
nclone
.
channelOrderListInfo
||
tm
.
channelOrderListInfo
||
""
,
"nclCount"
:
nclthreeobjCount
,
"nclCount"
:
nclthreeobjCount
,
"principal"
:
apply
.
principal
||
""
,
};
};
var
trademark
=
await
self
.
trademarkDao
.
create
(
tmobj
,
t
);
var
trademark
=
await
self
.
trademarkDao
.
create
(
tmobj
,
t
);
}
}
...
@@ -1512,8 +1512,19 @@ class OrderService extends ServiceBase {
...
@@ -1512,8 +1512,19 @@ class OrderService extends ServiceBase {
var
channelorder
=
obj
.
channelorder
;
var
channelorder
=
obj
.
channelorder
;
var
self
=
this
;
var
self
=
this
;
var
tm
=
obj
.
tm
;
var
tm
=
obj
.
tm
;
var
apply
=
obj
.
apply
;
tm
[
"tmSourceType"
]
=
"16"
;
tm
[
"tmSourceType"
]
=
"16"
;
if
(
obj
.
channelCode
==
"ali_zcsubmit"
)
{
if
(
obj
.
channelCode
==
"ali_zcsubmit"
)
{
if
(
!
apply
.
principal
)
{
result
.
code
=
"-95"
;
result
.
msg
=
"提报主体不能为空"
;
return
result
;
}
if
([
"知域互联科技有限公司"
,
"阿里巴巴科技(北京)有限公司"
].
indexOf
(
apply
.
principal
)
<
0
)
{
result
.
code
=
"-97"
;
result
.
msg
=
"提报主体不正确,请选择正确的提报主体"
;
return
result
;
}
tm
[
"tmSourceType"
]
=
"32"
;
tm
[
"tmSourceType"
]
=
"32"
;
if
(
!
obj
.
needId
)
{
if
(
!
obj
.
needId
)
{
result
.
code
=
"-100"
;
result
.
code
=
"-100"
;
...
@@ -1522,24 +1533,7 @@ class OrderService extends ServiceBase {
...
@@ -1522,24 +1533,7 @@ class OrderService extends ServiceBase {
}
}
tm
[
"needId"
]
=
obj
.
needId
;
tm
[
"needId"
]
=
obj
.
needId
;
}
}
// else if (obj.channelCode == "1688") {
var
judgeRes
=
self
.
trademarkDao
.
judgeChannelCode
(
obj
.
channelCode
);
//判断其他渠道码
// tm["tmSourceType"] = "64";
// if (!obj.needId) {
// result.code = "-110";
// result.msg = "1688需求ID不能为空";
// return result;
// }
// tm["needId"] = obj.needId;
// }else if (obj.channelCode == "jd") {
// tm["tmSourceType"] = "128";
// if (!obj.needId) {
// result.code = "-110";
// result.msg = "jd需求ID不能为空";
// return result;
// }
// tm["needId"] = obj.needId;
// }
var
judgeRes
=
self
.
trademarkDao
.
judgeChannelCode
(
obj
.
channelCode
);
//判断渠道码
if
(
judgeRes
)
{
if
(
judgeRes
)
{
tm
[
"tmSourceType"
]
=
judgeRes
;
tm
[
"tmSourceType"
]
=
judgeRes
;
if
(
!
obj
.
needId
)
{
if
(
!
obj
.
needId
)
{
...
@@ -1550,7 +1544,7 @@ class OrderService extends ServiceBase {
...
@@ -1550,7 +1544,7 @@ class OrderService extends ServiceBase {
tm
[
"needId"
]
=
obj
.
needId
;
tm
[
"needId"
]
=
obj
.
needId
;
}
}
tm
[
"channelOrderListInfo"
]
=
channelorder
.
order_nos
&&
channelorder
.
order_nos
.
length
>
0
?
channelorder
.
order_nos
.
join
(
','
)
:
""
;
tm
[
"channelOrderListInfo"
]
=
channelorder
.
order_nos
&&
channelorder
.
order_nos
.
length
>
0
?
channelorder
.
order_nos
.
join
(
','
)
:
""
;
var
apply
=
obj
.
apply
;
var
user
=
obj
.
user
;
var
user
=
obj
.
user
;
var
app
=
obj
.
app
;
var
app
=
obj
.
app
;
var
nclones
=
obj
.
nclones
||
null
;
var
nclones
=
obj
.
nclones
||
null
;
...
@@ -1594,12 +1588,12 @@ class OrderService extends ServiceBase {
...
@@ -1594,12 +1588,12 @@ class OrderService extends ServiceBase {
}
}
//获取已提交的商标信息 用作校验重复提交
//获取已提交的商标信息 用作校验重复提交
var
oldtms
=
await
this
.
trademarkDao
.
model
.
findAll
({
var
oldtms
=
await
this
.
trademarkDao
.
model
.
findAll
({
where
:
{
channelOrderNum
:
obj
.
channelOrderNum
,
applyName
:
apply
.
applyName
,
tmName
:
tm
.
tmName
},
where
:
{
channelOrderNum
:
obj
.
channelOrderNum
,
applyName
:
apply
.
applyName
,
tmName
:
tm
.
tmName
},
raw
:
true
raw
:
true
});
});
var
oldNclOneCodes
=
[];
//已提交商标尼斯集合
var
oldNclOneCodes
=
[];
//已提交商标尼斯集合
if
(
oldtms
&&
oldtms
.
length
>
0
)
{
if
(
oldtms
&&
oldtms
.
length
>
0
)
{
for
(
var
a
=
0
;
a
<
oldtms
.
length
;
a
++
)
{
for
(
var
a
=
0
;
a
<
oldtms
.
length
;
a
++
)
{
var
oldtm
=
oldtms
[
a
];
var
oldtm
=
oldtms
[
a
];
oldNclOneCodes
.
push
(
oldtm
.
nclOneCodes
);
oldNclOneCodes
.
push
(
oldtm
.
nclOneCodes
);
}
}
...
@@ -1608,8 +1602,8 @@ class OrderService extends ServiceBase {
...
@@ -1608,8 +1602,8 @@ class OrderService extends ServiceBase {
var
selectNclThreeCount
=
0
;
var
selectNclThreeCount
=
0
;
for
(
let
index
=
0
;
index
<
nclones
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
nclones
.
length
;
index
++
)
{
const
element
=
nclones
[
index
];
const
element
=
nclones
[
index
];
if
(
element
.
code
&&
oldNclOneCodes
.
length
>
0
)
{
if
(
element
.
code
&&
oldNclOneCodes
.
length
>
0
)
{
if
(
oldNclOneCodes
.
indexOf
(
element
.
code
)
>=
0
)
{
if
(
oldNclOneCodes
.
indexOf
(
element
.
code
)
>=
0
)
{
return
{
code
:
"-260"
,
msg
:
"已存在第"
+
element
.
code
+
"类的商标,不能重复提交"
};
return
{
code
:
"-260"
,
msg
:
"已存在第"
+
element
.
code
+
"类的商标,不能重复提交"
};
}
}
}
}
...
@@ -1788,12 +1782,12 @@ class OrderService extends ServiceBase {
...
@@ -1788,12 +1782,12 @@ class OrderService extends ServiceBase {
// return checkRes;
// return checkRes;
// }
// }
// }
// }
if
(
orderItem
.
created_at
&&
orderItem
.
orderSourceType
!=
"8"
)
{
if
(
orderItem
.
created_at
&&
orderItem
.
orderSourceType
!=
"8"
)
{
var
time
=
new
Date
(
orderItem
.
created_at
).
getTime
();
var
time
=
new
Date
(
orderItem
.
created_at
).
getTime
();
if
(
time
>
1576339199000
)
{
//2019-12-14 23:59:59
if
(
time
>
1576339199000
)
{
//2019-12-14 23:59:59
var
usable_order_no_class_count
=
channelorder
.
usable_order_no_class_count
;
//有效渠道订单列表
var
usable_order_no_class_count
=
channelorder
.
usable_order_no_class_count
;
//有效渠道订单列表
var
checkRes
=
await
this
.
checkChannelUsableOrder
(
usable_order_no_class_count
,
nclones
);
//校验有效订单
var
checkRes
=
await
this
.
checkChannelUsableOrder
(
usable_order_no_class_count
,
nclones
);
//校验有效订单
if
(
checkRes
.
code
!=
1
)
{
if
(
checkRes
.
code
!=
1
)
{
return
checkRes
;
return
checkRes
;
}
}
}
}
...
@@ -1861,7 +1855,7 @@ class OrderService extends ServiceBase {
...
@@ -1861,7 +1855,7 @@ class OrderService extends ServiceBase {
// if (orderItem.channelCode == "1688" || orderItem.channelCode == "jd") {
// if (orderItem.channelCode == "1688" || orderItem.channelCode == "jd") {
// tm["tmStatus"] = "WAITCONFIRM";
// tm["tmStatus"] = "WAITCONFIRM";
// }
// }
var
judgeRes
=
self
.
trademarkDao
.
judgeChannelCode
(
orderItem
.
channelCode
);
//判断渠道码
var
judgeRes
=
self
.
trademarkDao
.
judgeChannelCode
(
orderItem
.
channelCode
);
//判断
其他
渠道码
if
(
judgeRes
)
{
if
(
judgeRes
)
{
tm
[
"tmStatus"
]
=
"WAITCONFIRM"
;
tm
[
"tmStatus"
]
=
"WAITCONFIRM"
;
}
}
...
@@ -1880,6 +1874,16 @@ class OrderService extends ServiceBase {
...
@@ -1880,6 +1874,16 @@ class OrderService extends ServiceBase {
}
}
tm
[
"tmSourceType"
]
=
"16"
;
tm
[
"tmSourceType"
]
=
"16"
;
if
(
orderItem
.
channelCode
==
"ali_zcsubmit"
)
{
if
(
orderItem
.
channelCode
==
"ali_zcsubmit"
)
{
if
(
!
apply
.
principal
)
{
result
.
code
=
"-95"
;
result
.
msg
=
"提报主体不能为空"
;
return
result
;
}
if
([
"知域互联科技有限公司"
,
"阿里巴巴科技(北京)有限公司"
].
indexOf
(
apply
.
principal
)
<
0
)
{
result
.
code
=
"-97"
;
result
.
msg
=
"提报主体不正确,请选择正确的提报主体"
;
return
result
;
}
tm
[
"tmSourceType"
]
=
"32"
;
tm
[
"tmSourceType"
]
=
"32"
;
if
(
!
channelorder
.
needId
)
{
if
(
!
channelorder
.
needId
)
{
result
.
code
=
"-150"
;
result
.
code
=
"-150"
;
...
@@ -1888,23 +1892,7 @@ class OrderService extends ServiceBase {
...
@@ -1888,23 +1892,7 @@ class OrderService extends ServiceBase {
}
}
tm
[
"needId"
]
=
channelorder
.
needId
;
tm
[
"needId"
]
=
channelorder
.
needId
;
}
}
// else if (orderItem.channelCode == "1688") {
// tm["tmSourceType"] = "64";
// if (!channelorder.needId) {
// result.code = "-160";
// result.msg = "1688需求ID不能为空!";
// return result;
// }
// tm["needId"] = channelorder.needId;
// }else if (orderItem.channelCode == "jd") {
// tm["tmSourceType"] = "128";
// if (!channelorder.needId) {
// result.code = "-160";
// result.msg = "jd需求ID不能为空!";
// return result;
// }
// tm["needId"] = channelorder.needId;
// }
if
(
judgeRes
)
{
if
(
judgeRes
)
{
tm
[
"tmSourceType"
]
=
judgeRes
;
tm
[
"tmSourceType"
]
=
judgeRes
;
if
(
!
channelorder
.
needId
)
{
if
(
!
channelorder
.
needId
)
{
...
@@ -1955,6 +1943,7 @@ class OrderService extends ServiceBase {
...
@@ -1955,6 +1943,7 @@ class OrderService extends ServiceBase {
"businessId"
:
oldTmList
&&
oldTmList
.
length
>
0
?
oldTmList
[
0
].
businessId
:
""
,
"businessId"
:
oldTmList
&&
oldTmList
.
length
>
0
?
oldTmList
[
0
].
businessId
:
""
,
"channelOrderListInfo"
:
nclone
.
channelOrderListInfo
||
tm
.
channelOrderListInfo
||
""
,
"channelOrderListInfo"
:
nclone
.
channelOrderListInfo
||
tm
.
channelOrderListInfo
||
""
,
"nclCount"
:
nclthreeobjCount
,
"nclCount"
:
nclthreeobjCount
,
"principal"
:
apply
.
principal
,
};
};
// console.log(tmobj);
// console.log(tmobj);
var
trademark
=
await
self
.
trademarkDao
.
create
(
tmobj
,
t
);
var
trademark
=
await
self
.
trademarkDao
.
create
(
tmobj
,
t
);
...
@@ -1998,9 +1987,9 @@ class OrderService extends ServiceBase {
...
@@ -1998,9 +1987,9 @@ class OrderService extends ServiceBase {
var
tms
=
await
self
.
trademarkDao
.
model
.
findAll
({
where
:
{
orderNum
:
order
.
orderNum
},
raw
:
true
});
var
tms
=
await
self
.
trademarkDao
.
model
.
findAll
({
where
:
{
orderNum
:
order
.
orderNum
},
raw
:
true
});
var
tmE
=
tms
[
0
];
var
tmE
=
tms
[
0
];
var
remainder
=
channelorder
.
remainder
;
var
remainder
=
channelorder
.
remainder
;
if
(
tmE
&&
tmE
.
tmSourceType
&&
tmE
.
tmSourceType
==
'64'
)
{
//1688渠道不需要判断渠道订单
if
(
tmE
&&
tmE
.
tmSourceType
&&
tmE
.
tmSourceType
==
'64'
)
{
//1688渠道不需要判断渠道订单
tm
[
"channelPayStatus"
]
=
tmE
.
channelPayStatus
;
tm
[
"channelPayStatus"
]
=
tmE
.
channelPayStatus
;
}
else
{
}
else
{
if
(
!
remainder
)
{
if
(
!
remainder
)
{
return
{
code
:
"-203"
,
msg
:
"渠道订单产品数量有误"
};
return
{
code
:
"-203"
,
msg
:
"渠道订单产品数量有误"
};
}
else
if
(
nclones
.
length
>
Number
(
remainder
))
{
}
else
if
(
nclones
.
length
>
Number
(
remainder
))
{
...
...
fqboss/app/base/service/impl/trademarkSve.js
View file @
63f083cb
...
@@ -68,8 +68,8 @@ class TrademarkService extends ServiceBase {
...
@@ -68,8 +68,8 @@ class TrademarkService extends ServiceBase {
"ALIPAPERS5"
:
"超时未补正(阿里)"
,
"ALIPAPERS5"
:
"超时未补正(阿里)"
,
"ALIPAPERS6"
:
"补正已递交(阿里)"
,
"ALIPAPERS6"
:
"补正已递交(阿里)"
,
//1688
//1688
"WAITCONFIRM"
:
"等待客户确认"
,
"WAITCONFIRM"
:
"等待客户确认"
,
"CONFIRMFAIL"
:
"方案不通过"
"CONFIRMFAIL"
:
"方案不通过"
};
};
}
}
...
@@ -523,18 +523,18 @@ class TrademarkService extends ServiceBase {
...
@@ -523,18 +523,18 @@ class TrademarkService extends ServiceBase {
}
else
{
}
else
{
pushObj
[
"opNotes"
]
=
"已提交"
;
pushObj
[
"opNotes"
]
=
"已提交"
;
}
}
if
(
tm
.
tmSourceType
==
"1024"
)
{
//center-channel
if
(
tm
.
tmSourceType
==
"1024"
)
{
//center-channel
var
channelPushObj
=
{
var
channelPushObj
=
{
orderNo
:
tm
.
channelOrderNum
,
orderNo
:
tm
.
channelOrderNum
,
tbCode
:
keyCode
,
tbCode
:
keyCode
,
tmStatus
:
param
.
tmStatus
,
tmStatus
:
param
.
tmStatus
,
tmStatusName
:
this
.
tm_submit_status
[
param
.
tmStatus
]
tmStatusName
:
this
.
tm_submit_status
[
param
.
tmStatus
]
}
}
if
(
param
.
submitTime
)
{
if
(
param
.
submitTime
)
{
channelPushObj
[
"submitTime"
]
=
param
.
submitTime
;
channelPushObj
[
"submitTime"
]
=
param
.
submitTime
;
}
}
self
.
channelreceiveDao
.
updateChannelTmStatus
(
channelPushObj
);
self
.
channelreceiveDao
.
updateChannelTmStatus
(
channelPushObj
);
}
else
{
}
else
{
self
.
updateChannelTmStatus
(
pushObj
);
self
.
updateChannelTmStatus
(
pushObj
);
}
}
// self.updateChannelTmStatus(pushObj);
// self.updateChannelTmStatus(pushObj);
...
@@ -618,19 +618,19 @@ class TrademarkService extends ServiceBase {
...
@@ -618,19 +618,19 @@ class TrademarkService extends ServiceBase {
channelOrderNum
:
tm
.
channelOrderNum
,
channelOrderNum
:
tm
.
channelOrderNum
,
tmRegistNum
:
code
tmRegistNum
:
code
}
}
if
(
tm
.
tmSourceType
==
"1024"
)
{
//center-channel
if
(
tm
.
tmSourceType
==
"1024"
)
{
//center-channel
var
channelPushObj
=
{
var
channelPushObj
=
{
orderNo
:
tm
.
channelOrderNum
,
orderNo
:
tm
.
channelOrderNum
,
tbCode
:
proxyCode
,
tbCode
:
proxyCode
,
tmStatus
:
stateCode
,
tmStatus
:
stateCode
,
tmStatusName
:
this
.
tm_submit_status
[
stateCode
],
tmStatusName
:
this
.
tm_submit_status
[
stateCode
],
registNumInfo
:{
registNumInfo
:
{
tmRegistNum
:
code
,
//商标申请号
tmRegistNum
:
code
,
//商标申请号
}
}
}
}
self
.
channelreceiveDao
.
updateChannelTmStatus
(
channelPushObj
);
self
.
channelreceiveDao
.
updateChannelTmStatus
(
channelPushObj
);
// self.channelreceiveDao.updateChannelTmStatus(pushObj);
// self.channelreceiveDao.updateChannelTmStatus(pushObj);
}
else
{
}
else
{
self
.
updateChannelTmStatus
(
pushObj
);
self
.
updateChannelTmStatus
(
pushObj
);
}
}
...
@@ -848,7 +848,7 @@ class TrademarkService extends ServiceBase {
...
@@ -848,7 +848,7 @@ class TrademarkService extends ServiceBase {
"proxyCode"
,
"tmRegistNum"
,
"creatAuthorizeStuff"
,
"sealAuthorizeStuff"
,
"voiceUrl"
,
"tmStatus"
,
"user_id"
,
"proxyCode"
,
"tmRegistNum"
,
"creatAuthorizeStuff"
,
"sealAuthorizeStuff"
,
"voiceUrl"
,
"tmStatus"
,
"user_id"
,
"colorizedPicUrl"
,
"descUrl"
,
"partnerMobile"
,
"userName"
,
"applyName"
,
"parentProxyCode"
,
"parentTmRegistNum"
,
"colorizedPicUrl"
,
"descUrl"
,
"partnerMobile"
,
"userName"
,
"applyName"
,
"parentProxyCode"
,
"parentTmRegistNum"
,
"newProxyCode"
,
"newTmRegistNum"
,
"remarkInfo"
,
"opRemarkInfo"
,
"channelOrderNum"
,
"app_code"
,
"tmSourceType"
,
"newProxyCode"
,
"newTmRegistNum"
,
"remarkInfo"
,
"opRemarkInfo"
,
"channelOrderNum"
,
"app_code"
,
"tmSourceType"
,
"channelUserId"
,
"mobile"
,
"channelPayStatus"
,
"businessId"
,
"needId"
,
"channelOrderListInfo"
];
"channelUserId"
,
"mobile"
,
"channelPayStatus"
,
"businessId"
,
"needId"
,
"channelOrderListInfo"
,
"principal"
];
var
sqlWhere
=
null
;
var
sqlWhere
=
null
;
if
(
id
)
{
if
(
id
)
{
sqlWhere
=
{
where
:
{
id
:
id
},
attributes
:
paramAttributes
,
raw
:
true
};
sqlWhere
=
{
where
:
{
id
:
id
},
attributes
:
paramAttributes
,
raw
:
true
};
...
@@ -864,7 +864,7 @@ class TrademarkService extends ServiceBase {
...
@@ -864,7 +864,7 @@ class TrademarkService extends ServiceBase {
"proxyCode"
,
"tmRegistNum"
,
"creatAuthorizeStuff"
,
"sealAuthorizeStuff"
,
"voiceUrl"
,
"tmStatus"
,
"user_id"
,
"proxyCode"
,
"tmRegistNum"
,
"creatAuthorizeStuff"
,
"sealAuthorizeStuff"
,
"voiceUrl"
,
"tmStatus"
,
"user_id"
,
"colorizedPicUrl"
,
"descUrl"
,
"partnerMobile"
,
"userName"
,
"applyName"
,
"parentProxyCode"
,
"parentTmRegistNum"
,
"colorizedPicUrl"
,
"descUrl"
,
"partnerMobile"
,
"userName"
,
"applyName"
,
"parentProxyCode"
,
"parentTmRegistNum"
,
"newProxyCode"
,
"newTmRegistNum"
,
"remarkInfo"
,
"opRemarkInfo"
,
"channelOrderNum"
,
"app_code"
,
"tmSourceType"
,
"newProxyCode"
,
"newTmRegistNum"
,
"remarkInfo"
,
"opRemarkInfo"
,
"channelOrderNum"
,
"app_code"
,
"tmSourceType"
,
"channelUserId"
,
"mobile"
,
"channelPayStatus"
,
"businessId"
,
"needId"
,
"channelOrderListInfo"
];
"channelUserId"
,
"mobile"
,
"channelPayStatus"
,
"businessId"
,
"needId"
,
"channelOrderListInfo"
,
"principal"
];
var
sqlWhere
=
{
where
:
{
id
:
{
[
this
.
db
.
Op
.
in
]:
ids
}
},
paramAttributes
,
raw
:
true
};
var
sqlWhere
=
{
where
:
{
id
:
{
[
this
.
db
.
Op
.
in
]:
ids
}
},
paramAttributes
,
raw
:
true
};
return
await
this
.
dao
.
model
.
findAll
(
sqlWhere
);
return
await
this
.
dao
.
model
.
findAll
(
sqlWhere
);
}
}
...
@@ -879,7 +879,7 @@ class TrademarkService extends ServiceBase {
...
@@ -879,7 +879,7 @@ class TrademarkService extends ServiceBase {
"proxyCode"
,
"tmRegistNum"
,
"creatAuthorizeStuff"
,
"sealAuthorizeStuff"
,
"voiceUrl"
,
"tmStatus"
,
"user_id"
,
"proxyCode"
,
"tmRegistNum"
,
"creatAuthorizeStuff"
,
"sealAuthorizeStuff"
,
"voiceUrl"
,
"tmStatus"
,
"user_id"
,
"colorizedPicUrl"
,
"descUrl"
,
"partnerMobile"
,
"userName"
,
"applyName"
,
"parentProxyCode"
,
"parentTmRegistNum"
,
"colorizedPicUrl"
,
"descUrl"
,
"partnerMobile"
,
"userName"
,
"applyName"
,
"parentProxyCode"
,
"parentTmRegistNum"
,
"newProxyCode"
,
"newTmRegistNum"
,
"remarkInfo"
,
"opRemarkInfo"
,
"channelOrderNum"
,
"app_code"
,
"tmSourceType"
,
"newProxyCode"
,
"newTmRegistNum"
,
"remarkInfo"
,
"opRemarkInfo"
,
"channelOrderNum"
,
"app_code"
,
"tmSourceType"
,
"channelUserId"
,
"mobile"
,
"channelPayStatus"
,
"businessId"
,
"needId"
,
"channelOrderListInfo"
];
"channelUserId"
,
"mobile"
,
"channelPayStatus"
,
"businessId"
,
"needId"
,
"channelOrderListInfo"
,
"principal"
];
if
(
type
==
"1"
)
{
if
(
type
==
"1"
)
{
return
this
.
dao
.
model
.
findAll
({
where
:
{
channelOrderNum
:
channelOrderNum
},
paramAttributes
,
raw
:
true
});
return
this
.
dao
.
model
.
findAll
({
where
:
{
channelOrderNum
:
channelOrderNum
},
paramAttributes
,
raw
:
true
});
}
}
...
@@ -1130,6 +1130,17 @@ class TrademarkService extends ServiceBase {
...
@@ -1130,6 +1130,17 @@ class TrademarkService extends ServiceBase {
}
}
}
}
}
}
var
principalName
=
1
;
var
tmNameType
=
1
;
//1:⽂字 2:图⽚ 3:图⽂
if
(
element
.
principal
&&
element
.
principal
==
"知域互联科技有限公司"
)
{
principalName
=
2
;
}
if
(
element
.
tmFormType
==
"4"
)
{
tmNameType
=
2
;
}
else
if
(
element
.
tmFormType
==
"5"
)
{
tmNameType
=
3
;
}
var
subParam
=
{
var
subParam
=
{
BizId
:
item
.
businessId
||
""
,
BizId
:
item
.
businessId
||
""
,
IntentionBizId
:
item
.
needId
,
IntentionBizId
:
item
.
needId
,
...
@@ -1141,6 +1152,8 @@ class TrademarkService extends ServiceBase {
...
@@ -1141,6 +1152,8 @@ class TrademarkService extends ServiceBase {
TmComment
:
item
.
tmName
,
//商标说明
TmComment
:
item
.
tmName
,
//商标说明
serviceOrderNo
:
item
.
channelOrderNum
,
serviceOrderNo
:
item
.
channelOrderNum
,
reqOnlyCode
:
item
.
reqOnlyCode
,
reqOnlyCode
:
item
.
reqOnlyCode
,
PrincipalName
:
principalName
,
TmNameType
:
tmNameType
,
};
};
var
submitTm
=
await
rc
.
post
(
"SaveTradeMarkProductSolution"
,
subParam
);
var
submitTm
=
await
rc
.
post
(
"SaveTradeMarkProductSolution"
,
subParam
);
//返回值
//返回值
...
@@ -1156,7 +1169,7 @@ class TrademarkService extends ServiceBase {
...
@@ -1156,7 +1169,7 @@ class TrademarkService extends ServiceBase {
if
(
submitTm
.
Code
==
"200"
)
{
if
(
submitTm
.
Code
==
"200"
)
{
// "SUBALITM": "已提交阿里(待补全信息)",
// "SUBALITM": "已提交阿里(待补全信息)",
await
this
.
dao
.
updateByWhere
({
businessId
:
submitTm
.
data
.
BizId
,
tmStatus
:
"SUBALITM"
,
channelPric
:
submitTm
.
OrderPrice
||
0
},
{
where
:
{
id
:
item
.
id
}
});
await
this
.
dao
.
updateByWhere
({
businessId
:
submitTm
.
data
.
BizId
,
tmStatus
:
"SUBALITM"
,
channelPric
:
submitTm
.
OrderPrice
||
0
},
{
where
:
{
id
:
item
.
id
}
});
var
tmApplyInfo
=
await
this
.
opAliTmApplyInfo
(
submitTm
,
item
,
applier
,
customer
,
rc
);
var
tmApplyInfo
=
await
this
.
opAliTmApplyInfo
(
submitTm
,
item
,
applier
,
customer
,
rc
,
principalName
);
if
(
tmApplyInfo
.
Code
==
"200"
)
{
if
(
tmApplyInfo
.
Code
==
"200"
)
{
// "SUBALITMOK": "已补全信息(待确认商标)",
// "SUBALITMOK": "已补全信息(待确认商标)",
await
this
.
dao
.
updateByWhere
({
tmStatus
:
"SUBALITMOK"
},
{
where
:
{
id
:
item
.
id
}
});
await
this
.
dao
.
updateByWhere
({
tmStatus
:
"SUBALITMOK"
},
{
where
:
{
id
:
item
.
id
}
});
...
@@ -1170,7 +1183,7 @@ class TrademarkService extends ServiceBase {
...
@@ -1170,7 +1183,7 @@ class TrademarkService extends ServiceBase {
if
(
item
.
businessId
&&
submitTm
.
errorCode
==
"TRADEMARK.PRODUCT.DUPLICATE"
)
{
if
(
item
.
businessId
&&
submitTm
.
errorCode
==
"TRADEMARK.PRODUCT.DUPLICATE"
)
{
submitTm
.
data
[
"BizId"
]
=
item
.
businessId
;
submitTm
.
data
[
"BizId"
]
=
item
.
businessId
;
if
(
item
.
tmStatus
==
"SUBALITM"
)
{
if
(
item
.
tmStatus
==
"SUBALITM"
)
{
var
tmApplyInfo
=
await
this
.
opAliTmApplyInfo
(
submitTm
,
item
,
applier
,
customer
,
rc
);
var
tmApplyInfo
=
await
this
.
opAliTmApplyInfo
(
submitTm
,
item
,
applier
,
customer
,
rc
,
principalName
);
if
(
tmApplyInfo
.
Code
==
"200"
)
{
if
(
tmApplyInfo
.
Code
==
"200"
)
{
// "SUBALITMOK": "已补全信息(待确认商标)",
// "SUBALITMOK": "已补全信息(待确认商标)",
await
this
.
dao
.
updateByWhere
({
tmStatus
:
"SUBALITMOK"
},
{
where
:
{
id
:
item
.
id
}
});
await
this
.
dao
.
updateByWhere
({
tmStatus
:
"SUBALITMOK"
},
{
where
:
{
id
:
item
.
id
}
});
...
@@ -1213,7 +1226,7 @@ class TrademarkService extends ServiceBase {
...
@@ -1213,7 +1226,7 @@ class TrademarkService extends ServiceBase {
await
this
.
dao
.
updateByWhere
({
opRemarkInfo
:
"阿里返回:errorCode="
+
returnResult
.
errorCode
+
"errorMsg="
+
returnResult
.
errorMsg
},
{
where
:
{
id
:
item
.
id
}
});
await
this
.
dao
.
updateByWhere
({
opRemarkInfo
:
"阿里返回:errorCode="
+
returnResult
.
errorCode
+
"errorMsg="
+
returnResult
.
errorMsg
},
{
where
:
{
id
:
item
.
id
}
});
}
}
}
}
async
opAliTmApplyInfo
(
submitTm
,
item
,
applier
,
customer
,
rc
)
{
//阿里补全注册⽅案-申请⼈信息---本类用
async
opAliTmApplyInfo
(
submitTm
,
item
,
applier
,
customer
,
rc
,
principalName
)
{
//阿里补全注册⽅案-申请⼈信息---本类用
var
bizIDList
=
[
submitTm
.
data
.
BizId
];
var
bizIDList
=
[
submitTm
.
data
.
BizId
];
var
reqParam
=
{
var
reqParam
=
{
BizIds
:
JSON
.
stringify
(
bizIDList
),
BizIds
:
JSON
.
stringify
(
bizIDList
),
...
@@ -1238,6 +1251,7 @@ class TrademarkService extends ServiceBase {
...
@@ -1238,6 +1251,7 @@ class TrademarkService extends ServiceBase {
PassportOssKey
:
""
,
PassportOssKey
:
""
,
LegalNoticeOssKey
:
item
.
descUrl
||
""
,
//法律声明
LegalNoticeOssKey
:
item
.
descUrl
||
""
,
//法律声明
serviceOrderNo
:
item
.
channelOrderNum
,
serviceOrderNo
:
item
.
channelOrderNum
,
PrincipalName
:
principalName
,
};
};
var
tmDetailResult
=
await
rc
.
post
(
"SaveTradeMarkMaterialDetail"
,
reqParam
);
var
tmDetailResult
=
await
rc
.
post
(
"SaveTradeMarkMaterialDetail"
,
reqParam
);
this
.
opSaveLog
(
"请求阿里补全商标接信息接口返回错误----error"
,
reqParam
,
item
,
tmDetailResult
);
this
.
opSaveLog
(
"请求阿里补全商标接信息接口返回错误----error"
,
reqParam
,
item
,
tmDetailResult
);
...
@@ -1444,18 +1458,18 @@ class TrademarkService extends ServiceBase {
...
@@ -1444,18 +1458,18 @@ class TrademarkService extends ServiceBase {
try
{
try
{
var
reqParam
=
{};
var
reqParam
=
{};
reqParam
=
{
reqParam
=
{
"appkey"
:
"201911131657"
,
"appkey"
:
"201911131657"
,
"secret"
:
"eeb18393aade40149287b024d8ba0850"
"secret"
:
"eeb18393aade40149287b024d8ba0850"
};
};
if
(
channelCode
==
"jd"
)
{
if
(
channelCode
==
"jd"
)
{
reqParam
=
{
reqParam
=
{
"appkey"
:
"201911251551"
,
"appkey"
:
"201911251551"
,
"secret"
:
"56006077354d48858026c80c0e10bef6"
"secret"
:
"56006077354d48858026c80c0e10bef6"
};
};
}
}
var
rtn
=
await
this
.
execClient
.
execPost
(
reqParam
,
reqTokenUrl
);
var
rtn
=
await
this
.
execClient
.
execPost
(
reqParam
,
reqTokenUrl
);
if
(
!
rtn
.
stdout
)
{
if
(
!
rtn
.
stdout
)
{
return
{
status
:
-
1
,
msg
:
"获取token失败"
};
return
{
status
:
-
1
,
msg
:
"获取token失败"
};
}
}
var
tokenResult
=
JSON
.
parse
(
rtn
.
stdout
);
var
tokenResult
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
tokenResult
.
status
==
0
)
{
if
(
tokenResult
.
status
==
0
)
{
...
@@ -1464,13 +1478,13 @@ class TrademarkService extends ServiceBase {
...
@@ -1464,13 +1478,13 @@ class TrademarkService extends ServiceBase {
return
tokenResult
;
return
tokenResult
;
}
catch
(
e
)
{
}
catch
(
e
)
{
await
this
.
oplogSve
.
createDb
({
await
this
.
oplogSve
.
createDb
({
logLevel
:
"error"
,
logLevel
:
"error"
,
optitle
:
"获取token---异常"
,
optitle
:
"获取token---异常"
,
op
:
reqTokenUrl
,
op
:
reqTokenUrl
,
content
:
JSON
.
stringify
(
e
.
stack
),
content
:
JSON
.
stringify
(
e
.
stack
),
clientIp
:
""
clientIp
:
""
});
});
return
{
status
:
-
1
,
msg
:
"获取token失败"
};
return
{
status
:
-
1
,
msg
:
"获取token失败"
};
}
}
}
}
...
...
fqboss/app/config/localsettings.js
View file @
63f083cb
var
settings
=
{
var
settings
=
{
redis
:{
redis
:
{
host
:
"43.247.184.32"
,
host
:
"43.247.184.32"
,
port
:
8967
,
port
:
8967
,
password
:
"Gongsibao2018"
,
password
:
"Gongsibao2018"
,
db
:
11
,
db
:
11
,
},
},
database
:{
database
:
{
dbname
:
"fqboss"
,
dbname
:
"fqboss"
,
user
:
"write"
,
user
:
"write"
,
password
:
"write"
,
password
:
"write"
,
// user: "root",
// user: "root",
...
@@ -24,36 +24,36 @@ var settings={
...
@@ -24,36 +24,36 @@ var settings={
acquire
:
90000000
,
acquire
:
90000000
,
idle
:
1000000
idle
:
1000000
},
},
debug
:
false
,
debug
:
false
,
dialectOptions
:
{
dialectOptions
:
{
requestTimeout
:
999999
,
requestTimeout
:
999999
,
// instanceName:'DEV'
// instanceName:'DEV'
}
//设置MSSQL超时时间
}
//设置MSSQL超时时间
}
}
},
},
// database:{
// database:{
// dbname : "fqboss",
// dbname : "fqboss",
// user: "write",
// user: "write",
// password: "write",
// password: "write",
// config: {
// config: {
// host: '43.247.184.35',
// host: '43.247.184.35',
// port: 8899,
// port: 8899,
// dialect: 'mysql',
// dialect: 'mysql',
// operatorsAliases: false,
// operatorsAliases: false,
// pool: {
// pool: {
// max: 5,
// max: 5,
// min: 0,
// min: 0,
// acquire: 90000000,
// acquire: 90000000,
// idle: 1000000
// idle: 1000000
// },
// },
// debug:false,
// debug:false,
// dialectOptions:{
// dialectOptions:{
// requestTimeout: 999999,
// requestTimeout: 999999,
// // instanceName:'DEV'
// // instanceName:'DEV'
// } //设置MSSQL超时时间
// } //设置MSSQL超时时间
// }
// }
// },
// },
reqEsDevUrl
:
"http://43.247.184.94:7200/"
,
reqEsDevUrl
:
"http://43.247.184.94:7200/"
,
reqHomePageDevUrl
:
"http://192.168.18.232:3000/"
reqHomePageDevUrl
:
"http://192.168.18.232:3000/"
};
};
module
.
exports
=
settings
;
module
.
exports
=
settings
;
\ No newline at end of file
fqboss/app/config/routes/web.js
View file @
63f083cb
...
@@ -256,6 +256,8 @@ module.exports = function (app) {
...
@@ -256,6 +256,8 @@ module.exports = function (app) {
req
.
url
.
indexOf
(
"userCtl/loginByMobile"
)
>
0
||
req
.
url
.
indexOf
(
"userCtl/loginByMobile"
)
>
0
||
req
.
url
.
indexOf
(
"userCtl/checkUserInfo"
)
>
0
||
req
.
url
.
indexOf
(
"userCtl/checkUserInfo"
)
>
0
||
req
.
url
.
indexOf
(
"metaCtl/getUiConfig"
)
>
0
||
req
.
url
.
indexOf
(
"metaCtl/getUiConfig"
)
>
0
||
req
.
url
.
indexOf
(
"ncloneCtl/getNcl"
)
>
0
||
req
.
url
.
indexOf
(
"orderCtl/getChannelOrderByOrderNum"
)
>
0
||
(
(
req
.
headers
.
access_source
==
"zqq1571212637509"
&&
req
.
headers
.
access_source
==
"zqq1571212637509"
&&
(
(
...
...
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