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
2d80c229
Commit
2d80c229
authored
May 20, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
90143273
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
44 deletions
+66
-44
fqboss/app/base/service/impl/trademarkSve.js
+66
-44
No files found.
fqboss/app/base/service/impl/trademarkSve.js
View file @
2d80c229
...
...
@@ -1357,53 +1357,75 @@ class TrademarkService extends ServiceBase {
var
official_type
=
uiconfig
.
config
.
pdict
.
tm_submit_status
;
var
official_type_name
=
official_type
[
tmStatus
];
//默认失败
var
opResult
=
{
code
:
-
110
,
msg
:
"failure no update"
};
await
this
.
db
.
transaction
(
async
function
(
t
)
{
if
(
item
.
tmStatus
!=
tmStatus
)
{
await
self
.
dao
.
updateByWhere
(
setParam
,
{
where
:
{
proxyCode
:
item
.
proxyCode
}
},
t
);
opResult
.
msg
=
"succeed"
;
opResult
.
code
=
1
;
}
if
(
pObj
.
applyNo
||
[
"ALIPAPERS2"
,
"RECVCOMMIT"
,
"3"
,
"4"
,
"7"
,
"8"
,
"9"
,
"13"
].
indexOf
(
tmStatus
)
>=
0
)
{
//操作回执
var
fileName
=
official_type_name
+
"_"
+
item
.
tmName
+
"_"
+
item
.
nclOneCodes
;
var
flowWhere
=
{
where
:
{
tmRegistNum
:
pObj
.
applyNo
,
tmStatus
:
tmStatus
}
};
var
flowCount
=
await
self
.
tmflowDao
.
findCount
(
flowWhere
);
var
params
=
{
tmStatus
:
tmStatus
,
uploadFileName
:
fileName
,
// returnReceiptUrl: pObj.fileUrl,//TODO:需要下载下来重新保存
tmRegistNum
:
pObj
.
applyNo
,
};
if
(
pObj
.
fileUrl
)
{
// var opUrlResult = {
// code: 1,
// message: "success",
// data: {}
// };
// var opDownFileResult = await self.opDownFileInfo(pObj.fileUrl, opUrlResult);
// //日志记录
// logCtl.info({
// optitle: "阿里云返回的通知url操作文件url下载返回结果",
// op: "/usr/node-dev/OMC/fqboss/app/base/service/impl/trademarkSve.js/opAliNotify",
// content: "请求参数:" + JSON.stringify(pObj) + ",结果信息:" + JSON.stringify(opDownFileResult),
// clientIp: ""
// });
params
[
"returnReceiptUrl"
]
=
opDownFileResult
.
code
==
1
?
opDownFileResult
.
data
.
url
:
pObj
.
fileUrl
;
var
opResult
=
{
code
:
1
,
msg
:
"succeed"
};
var
updateTmStatus
=
0
;
try
{
await
this
.
db
.
transaction
(
async
function
(
t
)
{
if
(
item
.
tmStatus
!=
tmStatus
)
{
await
self
.
dao
.
updateByWhere
(
setParam
,
{
where
:
{
proxyCode
:
item
.
proxyCode
}
},
t
);
opResult
.
msg
=
"succeed"
;
opResult
.
code
=
1
;
updateTmStatus
=
1
;
}
if
(
pObj
.
applyNo
||
[
"ALIPAPERS2"
,
"RECVCOMMIT"
,
"3"
,
"4"
,
"7"
,
"8"
,
"9"
,
"13"
].
indexOf
(
tmStatus
)
>=
0
)
{
//操作回执
var
fileName
=
official_type_name
+
"_"
+
item
.
tmName
+
"_"
+
item
.
nclOneCodes
;
var
flowWhere
=
{
where
:
{
tmRegistNum
:
pObj
.
applyNo
,
tmStatus
:
tmStatus
}
};
var
flowCount
=
await
self
.
tmflowDao
.
findCount
(
flowWhere
);
if
(
flowCount
>
0
)
{
await
self
.
tmflowDao
.
updateByWhere
(
params
,
flowWhere
,
t
);
}
else
{
await
self
.
tmflowDao
.
create
(
params
,
t
);
var
params
=
{
tmStatus
:
tmStatus
,
uploadFileName
:
fileName
,
// returnReceiptUrl: pObj.fileUrl,//TODO:需要下载下来重新保存
tmRegistNum
:
pObj
.
applyNo
,
};
if
(
pObj
.
fileUrl
)
{
// var opUrlResult = {
// code: 1,
// message: "success",
// data: {}
// };
// var opDownFileResult = await self.opDownFileInfo(pObj.fileUrl, opUrlResult);
// //日志记录
// logCtl.info({
// optitle: "阿里云返回的通知url操作文件url下载返回结果",
// op: "/usr/node-dev/OMC/fqboss/app/base/service/impl/trademarkSve.js/opAliNotify",
// content: "请求参数:" + JSON.stringify(pObj) + ",结果信息:" + JSON.stringify(opDownFileResult),
// clientIp: ""
// });
params
[
"returnReceiptUrl"
]
=
opDownFileResult
.
code
==
1
?
opDownFileResult
.
data
.
url
:
pObj
.
fileUrl
;
}
if
(
flowCount
>
0
)
{
await
self
.
tmflowDao
.
updateByWhere
(
params
,
flowWhere
,
t
);
}
else
{
await
self
.
tmflowDao
.
create
(
params
,
t
);
}
opResult
.
msg
=
"succeed"
;
opResult
.
code
=
1
;
}
opResult
.
msg
=
"succeed"
;
opResult
.
code
=
1
;
}
});
// if (opResult.code == 1) {
// self.pushReceiptDingTalkMsg(item.proxyCode, tmStatus, "阿里云商标信息提醒");
// }//发送钉钉消息
});
}
catch
(
error
)
{
//日志记录
logCtl
.
error
({
optitle
:
"阿里通知更新状态异常"
,
op
:
"/usr/node-dev/OMC/fqboss/app/base/service/impl/trademarkSve.js/opAliNotify"
,
content
:
"请求参数:"
+
JSON
.
stringify
(
pObj
)
+
",error信息:"
+
e
.
stack
,
clientIp
:
""
});
opResult
.
msg
=
"failure error"
;
opResult
.
code
=
-
110
;
}
if
(
updateTmStatus
==
1
)
{
var
msg
=
"阿里商标申请,阿里业务ID:"
+
item
.
businessId
+
"
\
n申请人:"
+
item
.
applyName
+
"
\
n商标名称:"
+
item
.
tmName
+
"
\
n申请状态变更为:"
+
official_type_name
;
var
obj
=
{
content
:
msg
,
send_msg
:
""
,
is_send
:
-
1
,
order_no
:
item
.
channelOrderNum
};
self
.
notifyDingTalkMsg
(
obj
);
}
//发送钉钉消息
return
opResult
;
}
...
...
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