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
c3d6743a
Commit
c3d6743a
authored
May 14, 2020
by
王栋源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wdy
parent
5e5dee1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
56 deletions
+66
-56
igirl-web/app/base/controller/impl/toolCtl.js
+66
-56
No files found.
igirl-web/app/base/controller/impl/toolCtl.js
View file @
c3d6743a
...
@@ -496,67 +496,77 @@ class ToolCtl {
...
@@ -496,67 +496,77 @@ class ToolCtl {
//生成企业监控报告-h5 post
//生成企业监控报告-h5 post
async
createMonitoringReportH5p
(
pobj
,
obj
,
r
)
{
async
createMonitoringReportH5p
(
pobj
,
obj
,
r
)
{
var
key
=
"create_repotCache"
try
{
if
(
!
obj
.
companyname
)
{
var
key
=
"create_repotCache"
return
{
code
:
-
1
,
msg
:
"企业名称参数错误"
};
if
(
!
obj
.
companyname
)
{
}
return
{
code
:
-
1
,
msg
:
"企业名称参数错误"
};
obj
.
companyname
=
await
this
.
getConvertSemiangleStr
(
obj
.
companyname
);
}
var
source
=
{
obj
.
companyname
=
await
this
.
getConvertSemiangleStr
(
obj
.
companyname
);
wxuser_id
:
obj
.
wxuser_id
,
var
source
=
{
companyname
:
obj
.
companyname
,
wxuser_id
:
obj
.
wxuser_id
,
phonenum
:
obj
.
phonenum
,
companyname
:
obj
.
companyname
,
email
:
obj
.
email
,
phonenum
:
obj
.
phonenum
,
notifyUrl
:
obj
.
notifyUrl
,
email
:
obj
.
email
,
source
:
obj
.
appid
,
notifyUrl
:
obj
.
notifyUrl
,
push_type
:
obj
.
push_type
,
source
:
obj
.
appid
,
type
:
obj
.
type
push_type
:
obj
.
push_type
,
}
type
:
obj
.
type
logCtl
.
info
({
}
optitle
:
"生成企业监控报告-h5"
,
logCtl
.
info
({
op
:
"tooCtl/createMonitoringReportH5"
,
optitle
:
"生成企业监控报告-h5"
,
content
:
JSON
.
stringify
(
obj
)
+
"---------------"
+
JSON
.
stringify
(
source
),
op
:
"tooCtl/createMonitoringReportH5"
,
clientIp
:
""
content
:
JSON
.
stringify
(
obj
)
+
"---------------"
+
JSON
.
stringify
(
source
),
});
clientIp
:
""
var
search
=
{
companyname
:
obj
.
companyname
,
status
:
1
,
type
:
obj
.
type
};
});
var
info
=
await
this
.
pytmreportSve
.
findOne
(
search
);
var
search
=
{
companyname
:
obj
.
companyname
,
status
:
1
,
type
:
obj
.
type
};
if
(
info
)
{
var
info
=
await
this
.
pytmreportSve
.
findOne
(
search
);
if
(
obj
.
push_type
==
1
)
{
if
(
info
)
{
if
(
obj
.
type
==
1
)
{
if
(
obj
.
push_type
==
1
)
{
var
html
=
'<a href="'
+
info
.
filepath
+
'">企业商标监控报告</a>'
if
(
obj
.
type
==
1
)
{
this
.
mailClient
.
sendMsg
(
info
.
email
,
"企业商标监控报告"
,
null
,
html
,
null
,
null
,
[]);
//发送成功后result的值:250 Data Ok: queued as freedom
var
html
=
'<a href="'
+
info
.
filepath
+
'">企业商标监控报告</a>'
this
.
mailClient
.
sendMsg
(
info
.
email
,
"企业商标监控报告"
,
null
,
html
,
null
,
null
,
[]);
//发送成功后result的值:250 Data Ok: queued as freedom
}
if
(
obj
.
type
==
2
)
{
var
html
=
'<a href="'
+
info
.
filepath
+
'">企业专利监控报告</a>'
this
.
mailClient
.
sendMsg
(
info
.
email
,
"企业专利监控报告"
,
null
,
html
,
null
,
null
,
[]);
//发送成功后result的值:250 Data Ok: queued as freedom
}
}
}
if
(
obj
.
type
==
2
)
{
if
(
obj
.
push_type
==
2
)
{
var
html
=
'<a href="'
+
info
.
filepath
+
'">企业专利监控报告</a>'
var
pobj
=
{
this
.
mailClient
.
sendMsg
(
info
.
email
,
"企业专利监控报告"
,
null
,
html
,
null
,
null
,
[]);
//发送成功后result的值:250 Data Ok: queued as freedom
receiverId
:
obj
.
wxuser_id
,
title
:
obj
.
companyname
,
linkUrl
:
info
.
filepath
}
var
rtn
=
await
this
.
execClient
.
execPost
(
pobj
,
obj
.
notifyUrl
);
console
.
log
(
"report------------------------------------------------------------------"
);
logCtl
.
info
({
optitle
:
"icompany---------log"
,
op
:
"tooCtl/createMonitoringReportH5p"
,
content
:
rtn
,
clientIp
:
""
});
console
.
log
(
rtn
)
}
}
}
source
.
filepath
=
info
.
filepath
;
if
(
obj
.
push_type
==
2
)
{
source
.
status
=
1
;
var
pobj
=
{
await
this
.
pytmreportSve
.
create
(
source
);
receiverId
:
obj
.
wxuser_id
,
return
{
code
:
1
};
title
:
obj
.
companyname
,
}
else
{
linkUrl
:
info
.
filepath
var
result
=
await
this
.
pytmreportSve
.
create
(
source
);
if
(
result
)
{
this
.
redisClient
.
rpush
(
key
,
result
.
id
);
}
}
var
rtn
=
await
this
.
execClient
.
execPost
(
pobj
,
obj
.
notifyUrl
);
return
{
code
:
1
};
console
.
log
(
"report------------------------------------------------------------------"
);
logCtl
.
info
({
optitle
:
"icompany---------log"
,
op
:
"tooCtl/createMonitoringReportH5p"
,
content
:
rtn
,
clientIp
:
""
});
console
.
log
(
rtn
)
}
}
source
.
filepath
=
info
.
filepath
;
}
catch
(
e
){
source
.
status
=
1
;
logCtl
.
info
({
await
this
.
pytmreportSve
.
create
(
source
);
optitle
:
"icompany---------log"
,
return
{
code
:
1
};
op
:
"tooCtl/createMonitoringReportH5p--error"
,
}
else
{
content
:
rtn
,
var
result
=
await
this
.
pytmreportSve
.
create
(
source
);
clientIp
:
""
if
(
result
)
{
});
this
.
redisClient
.
rpush
(
key
,
result
.
id
);
}
return
{
code
:
1
};
}
}
}
}
//生成企业专利监控报告-h5
//生成企业专利监控报告-h5
...
...
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