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
8b2f0047
Commit
8b2f0047
authored
Jan 03, 2020
by
王栋源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wdy
parent
cbf9e2ab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
5 deletions
+61
-5
igirl-web/app/base/api/impl/tmtransactionApi.js
+18
-0
igirl-web/app/base/db/models/trademarktransaction.js
+2
-0
igirl-web/app/base/service/impl/utilstmtasktradeSve.js
+41
-5
No files found.
igirl-web/app/base/api/impl/tmtransactionApi.js
View file @
8b2f0047
...
...
@@ -7,6 +7,7 @@ class TmtransactionApi extends ApiBase {
super
();
this
.
trademarktransactionSve
=
System
.
getObject
(
"service.trademarktransactionSve"
);
this
.
companyS
=
System
.
getObject
(
"service.companySve"
);
this
.
utilstmtasktradeSve
=
System
.
getObject
(
"service.utilstmtasktradeSve"
);
};
//获取某类型的交易商标 post
async
findByTmType
(
obj
){
...
...
@@ -26,5 +27,22 @@ class TmtransactionApi extends ApiBase {
return
{
code
:
-
200
,
msg
:
"操作失败"
};
}
}
async
tmAuditData
()
{
//商标交易录入es
try
{
var
kk
=
await
this
.
utilstmtasktradeSve
.
opAuditData
();
console
.
log
(
kk
,
"kk..................."
);
return
kk
;
}
catch
(
e
)
{
//日志记录
logCtl
.
error
({
optitle
:
"test_tmAuditData错误"
,
op
:
"/igirl-web/app/base/api/impl/testApi.js"
,
content
:
"error:"
+
JSON
.
stringify
(
e
.
stack
),
clientIp
:
""
});
console
.
log
(
e
.
stack
,
"ttttttttt..............."
);
}
}
}
module
.
exports
=
TmtransactionApi
;
igirl-web/app/base/db/models/trademarktransaction.js
View file @
8b2f0047
...
...
@@ -63,6 +63,8 @@ module.exports = (db, DataTypes) => {
this
.
setDataValue
(
"trademark_type_name"
,
uiconfig
.
config
.
pdict
.
tm_transaction_type
[
val
]);
}
},
tm_regist_day
:
DataTypes
.
STRING
(
200
),
tm_ncl_third
:
DataTypes
.
STRING
(
200
),
},
{
paranoid
:
true
,
//假的删除
underscored
:
true
,
...
...
igirl-web/app/base/service/impl/utilstmtasktradeSve.js
View file @
8b2f0047
...
...
@@ -12,6 +12,7 @@ class UtilsTmTaskTradeService {
this
.
tmTransactionUrl
=
settings
.
apiconfig
.
tmTransactionUrl
();
this
.
trademarktransactionDao
=
System
.
getObject
(
"db.trademarktransactionDao"
);
this
.
orderSve
=
System
.
getObject
(
"service.orderSve"
);
this
.
tmNclUrl
=
settings
.
apiconfig
.
tmNclUrl
();
}
async
getAuditList
(
pageIndex
,
pageSize
)
{
//publish_status===:tm_transaction_publish_status": { "audit": "审核中", "fail": "审核不通过", "success": "审核通过", "uppershelf": "上架", "lowershelf": "下架" }
...
...
@@ -37,7 +38,7 @@ class UtilsTmTaskTradeService {
async
opAuditData
()
{
var
self
=
this
;
var
rc
=
System
.
getObject
(
"util.execClient"
);
var
list
=
await
self
.
getAuditList
(
1
,
10
00
);
var
list
=
await
self
.
getAuditList
(
1
,
10
1
);
if
(
!
list
||
list
.
rows
.
length
==
0
)
{
return
"no"
;
}
...
...
@@ -81,7 +82,8 @@ class UtilsTmTaskTradeService {
"tm_end_day"
,
"ncl_two_codes"
,
"cn_count"
,
"en_name_count"
"en_name_count"
,
"regist_notice_day"
]
};
logCtl
.
info
({
...
...
@@ -169,8 +171,40 @@ class UtilsTmTaskTradeService {
if
(
putIndex
<
0
)
{
return
;
}
//商标小项查询
var
params2
=
{
"query"
:
{
"term"
:
{
"reg_num"
:
esItem
.
tm_regist_num
}
},
"from"
:
0
,
"size"
:
500
,
"_source"
:
[
"ncl_last"
]
};
var
nclthird
=
[];
var
esData2
=
await
self
.
returnResult
(
params2
,
this
.
tmNclUrl
,
"UtilsTmTaskTradeService"
,
"opEsQuery"
);
if
(
esData2
.
status
==
0
&&
esData2
.
data
.
length
>
0
)
{
for
(
let
l
=
0
;
l
<
esData2
.
data
.
length
;
l
++
)
{
if
(
esData2
.
data
[
l
].
ncl_last
.
indexOf
(
":"
)
!=
-
1
)
{
var
sptirdncl
=
esData2
.
data
[
l
].
ncl_last
.
split
(
":"
)[
1
];
if
(
nclthird
.
indexOf
(
sptirdncl
)
<
0
)
{
nclthird
.
push
(
sptirdncl
);
}
}
else
{
if
(
nclthird
.
indexOf
(
esData2
.
data
[
l
].
ncl_last
)
<
0
)
{
nclthird
.
push
(
esData2
.
data
[
l
].
ncl_last
);
}
}
}
}
var
filterTmListr
=
auditData
.
filter
(
f
=>
f
.
code
===
esItem
.
tm_regist_num
);
var
filterTmList
=
auditData
.
filter
(
f
=>
f
.
code
===
esItem
.
tm_regist_num
&&
f
.
ncl_one_code
===
esItem
.
ncl_one_codes
);
if
(
filterTmList
&&
filterTmList
.
length
>
0
)
{
if
(
(
!
filterTmListr
||
filterTmListr
.
length
==
0
)
&&
(
!
filterTmList
||
filterTmList
.
length
==
0
)
)
{
var
addParams
=
{
code
:
esItem
.
tm_regist_num
,
ncl_one_code
:
esItem
.
ncl_one_codes
,
...
...
@@ -184,9 +218,11 @@ class UtilsTmTaskTradeService {
tm_structure_name
:
auditData
[
putIndex
].
tm_structure_name
,
tm_introduction
:
auditData
[
putIndex
].
tm_introduction
,
publish_status
:
"uppershelf"
,
createcompany_id
:
audit
List
[
0
].
createcompany_id
,
createuser_id
:
audit
List
[
0
].
createuser_id
,
createcompany_id
:
audit
Data
[
0
].
createcompany_id
,
createuser_id
:
audit
Data
[
0
].
createuser_id
,
notes
:
"add_new"
,
tm_regist_day
:
esItem
.
regist_notice_day
,
tm_ncl_third
:
JSON
.
stringify
(
nclthird
)
};
if
(
esItem
.
original_regist_notice_day
&&
esItem
.
original_regist_notice_day
!=
null
)
{
addParams
.
tm_start_day
=
self
.
convertDate
(
esItem
.
original_regist_notice_day
);
...
...
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