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
98607d04
Commit
98607d04
authored
Nov 19, 2019
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
channel
parent
d3561766
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
99 additions
and
26 deletions
+99
-26
igirl-channel/app/base/api/impl/action/receiveData.js
+5
-2
igirl-channel/app/base/service/impl/dbtrademark/trademarkSve.js
+94
-24
No files found.
igirl-channel/app/base/api/impl/action/receiveData.js
View file @
98607d04
...
...
@@ -54,8 +54,11 @@ class ReceiveDataAPI extends APIBase {
case
"test"
:
//测试
opResult
=
system
.
getResultSuccess
(
null
,
"测试成功"
);
break
;
case
"receiveTmData"
:
//接收商标状态信息
opResult
=
await
this
.
trademarkSve
.
receiveTmData
(
action_body
);
case
"receiveTmOfficialData"
:
//接收回执文件
opResult
=
await
this
.
trademarkSve
.
receiveTmOfficialData
(
action_body
);
break
;
case
"updateAssistTmStatus"
:
//接收商标状态信息
opResult
=
await
this
.
trademarkSve
.
updateAssistTmStatus
(
action_body
);
break
;
case
"assistRegTmData"
:
//接收辅助注册商标数据
opResult
=
await
this
.
ordertmproductSve
.
addAssistTm
(
action_body
);
...
...
igirl-channel/app/base/service/impl/dbtrademark/trademarkSve.js
View file @
98607d04
...
...
@@ -7,6 +7,34 @@ class TradeMarkService extends ServiceBase {
super
(
"dbtrademark"
,
ServiceBase
.
getDaoName
(
TradeMarkService
));
this
.
ordertmproductSve
=
system
.
getObject
(
"service.dborder.ordertmproductSve"
);
this
.
tmofficialDao
=
system
.
getObject
(
"db.dbtrademark.tmofficialDao"
);
this
.
statusConvertJSON
=
{
"WAITARTIFICIALEXAMINE"
:
"dsh"
,
"1"
:
"1"
,
"2"
:
"2"
,
"3"
:
"3"
,
"4"
:
"4"
,
"5"
:
"5"
,
"6"
:
"6"
,
"7"
:
"7"
,
"8"
:
"8"
,
"9"
:
"9"
,
"10"
:
"10"
,
"11"
:
"11"
,
"12"
:
"12"
,
"13"
:
"13"
,
"READY"
:
"dsccl"
,
"DOCFINISH"
:
"dsh"
,
"AWAITCHECK"
:
"dsh"
,
"WAITCOMMIT"
:
"ddj"
,
"COMMITED"
:
"ydj"
,
"ROBOT"
:
"ydj"
,
"ROBOTPAY"
:
"ydj"
,
"RECVCOMMIT"
:
"ydj"
,
"FILLEXCEPTION"
:
"shbtg"
,
//1688
"WAITCONFIRM"
:
"dqrfa"
,
"CONFIRMFAIL"
:
"dqrfa"
}
}
/**
...
...
@@ -167,7 +195,7 @@ class TradeMarkService extends ServiceBase {
})
}
/**
* 接收商标
状态
数据
* 接收商标
回执
数据
* @param {*} obj
* obj.tbCode 商标提报号,
* obj.deliveryOrderNo 交付订单号,
...
...
@@ -180,18 +208,16 @@ class TradeMarkService extends ServiceBase {
"ydj": "已递交", "djyc": "递交异常" ,
* obj.tmRegistNum 商标注册号,
* obj.officialFileName 官文文件名称 ,
* obj.officialFileUrl 官文文件地址 ,
* obj.submitTime 提报时间,
* obj.user 用户数据
* obj.officialFileUrl 官文文件地址 ,
*/
async
receiveTmData
(
obj
){
return
system
.
getResultFail
(
-
100
,
"接口开发中"
);
var
user
=
obj
.
user
;
var
app
=
obj
.
app
;
async
receiveTm
Official
Data
(
obj
){
//
return system.getResultFail(-100, "接口开发中");
//
var user = obj.user;
//
var app = obj.app;
var
self
=
this
;
if
(
!
user
||
!
user
.
id
){
return
system
.
getResultFail
(
-
100
,
"未知用户"
);
}
//
if(!user || !user.id){
//
return system.getResultFail(-100, "未知用户");
//
}
var
deliveryOrderNo
=
obj
.
deliveryOrderNo
;
if
(
!
deliveryOrderNo
){
return
system
.
getResultFail
(
-
101
,
"deliveryOrderNo参数错误"
);
...
...
@@ -204,9 +230,9 @@ class TradeMarkService extends ServiceBase {
if
(
!
ordertmproduct
||
!
ordertmproduct
.
id
){
return
system
.
getResultFail
(
-
102
,
"商标交付单不存在"
);
}
if
(
!
app
){
return
system
.
getResultFail
(
-
103
,
"未知应用"
);
}
//
if(!app){
//
return system.getResultFail(-103, "未知应用");
//
}
var
tbCode
=
obj
.
tbCode
;
if
(
!
tbCode
){
return
system
.
getResultFail
(
-
104
,
"tbCode参数错误"
);
...
...
@@ -221,19 +247,16 @@ class TradeMarkService extends ServiceBase {
}
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
var
tmObj
=
{
id
:
tm
.
id
,
updateuser_id
:
user
.
id
,
updateuser
:
user
.
nickname
id
:
tm
.
id
};
var
officialObj
=
{
app_id
:
applicationCache
.
id
,
createuser_id
:
user
.
id
app_id
:
ordertmproduct
.
app_id
};
if
(
obj
.
officialType
){
tmObj
[
"officialType"
]
=
obj
.
officialType
;
officialObj
[
"officialObj"
]
=
obj
.
officialType
;
}
if
(
obj
.
submitTime
){
tmObj
[
"submitTime"
]
=
obj
.
submitTime
;
if
(
self
.
statusConvertJSON
[
obj
.
officialType
]){
tmObj
[
"officialType"
]
=
self
.
statusConvertJSON
[
obj
.
officialType
];
officialObj
[
"officialType"
]
=
self
.
statusConvertJSON
[
obj
.
officialType
];
}
}
if
(
obj
.
tmRegistNum
){
officialObj
[
"tmRegistNum"
]
=
obj
.
tmRegistNum
;
...
...
@@ -249,8 +272,55 @@ class TradeMarkService extends ServiceBase {
}
var
code
=
await
self
.
getBusUid
(
"tmoff"
);
officialObj
[
"code"
]
=
code
;
await
this
.
tmofficialDao
.
create
(
officialObj
,
t
);
await
self
.
tmofficialDao
.
create
(
officialObj
,
t
);
}
return
system
.
getResultSuccess
();
})
}
/**
* 辅助商标状态修改
* @param {*} obj
*/
async
updateAssistTmStatus
(
obj
){
var
self
=
this
;
var
deliveryOrderNo
=
obj
.
channelOrderNum
;
if
(
!
deliveryOrderNo
){
return
system
.
getResultFail
(
-
101
,
"deliveryOrderNo参数错误"
);
}
// 1.获取交付单信息
var
ordertmproduct
=
await
this
.
ordertmproductSve
.
dao
.
model
.
findOne
({
where
:{
deliveryOrderNo
:
deliveryOrderNo
},
raw
:
true
});
if
(
!
ordertmproduct
||
!
ordertmproduct
.
id
){
return
system
.
getResultFail
(
-
102
,
"商标交付单不存在"
);
}
var
tbCode
=
obj
.
proxyCode
;
if
(
!
tbCode
){
return
system
.
getResultFail
(
-
104
,
"tbCode参数错误"
);
}
//获取商标尼斯信息
var
tm
=
await
this
.
dao
.
model
.
findOne
({
where
:{
tbCode
:
tbCode
,
deliveryOrderNo
:
deliveryOrderNo
},
raw
:
true
});
if
(
!
tm
||
!
tm
.
id
){
return
system
.
getResultFail
(
-
105
,
"商标信息不存在"
);
}
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
var
tmObj
=
{
id
:
tm
.
id
};
if
(
obj
.
tmStatus
){
if
(
self
.
statusConvertJSON
[
obj
.
tmStatus
]){
tmObj
[
"officialType"
]
=
self
.
statusConvertJSON
[
obj
.
tmStatus
];
}
}
if
(
obj
.
opNotes
){
tmObj
[
"opNotes"
]
=
obj
.
opNotes
;
}
if
(
obj
.
submitTime
){
tmObj
[
"submitTime"
]
=
obj
.
submitTime
;
}
await
self
.
dao
.
update
(
tmObj
,
t
);
//修改商标状态信息
return
system
.
getResultSuccess
();
})
}
...
...
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