Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
platform
hp-smart
Commits
a3daa8c8
Commit
a3daa8c8
authored
Nov 01, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修复企业log显示
parent
c21d7724
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
45 additions
and
16 deletions
+45
-16
ServiceHPPZ009.java
.../java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ009.java
+3
-2
ServiceHPSB002.java
.../java/com/baosight/hpjx/hp/sb/service/ServiceHPSB002.java
+1
-0
HPSB002.xml
src/main/java/com/baosight/hpjx/hp/sb/sql/HPSB002.xml
+1
-1
HPWD003.java
src/main/java/com/baosight/hpjx/hp/wd/domain/HPWD003.java
+15
-0
HPWD003.xml
src/main/java/com/baosight/hpjx/hp/wd/sql/HPWD003.xml
+2
-1
iPlatV7-index.js
src/main/resources/META-INF/resources/iPlatV7-index.js
+18
-11
iPlatV7-index.jsp
src/main/resources/META-INF/resources/iPlatV7-index.jsp
+4
-0
HPPZ009.js
src/main/webapp/HP/PZ/HPPZ009.js
+1
-1
No files found.
src/main/java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ009.java
View file @
a3daa8c8
...
...
@@ -9,6 +9,7 @@ import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import
com.baosight.hpjx.hp.xs.tools.HPXSTools
;
import
com.baosight.hpjx.util.AssertUtils
;
import
com.baosight.hpjx.util.DateUtils
;
import
com.baosight.hpjx.util.EiInfoUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ProjectInfo
;
...
...
@@ -60,8 +61,8 @@ public class ServiceHPPZ009 extends ServiceBase {
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
inInfo
=
super
.
query
(
inInfo
,
"HPPZ009.query"
,
new
HPPZ009
());
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
inInfo
.
setCell
(
EiConstant
.
resultBlock
,
ACConstants
.
ROW_CODE_0
,
"projectEnv"
,
projectEnv
);
//
String projectEnv = ProjectInfo.getProjectEnv();
//
inInfo.setCell(EiConstant.resultBlock,ACConstants.ROW_CODE_0,"projectEnv",projectEnv);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
...
...
src/main/java/com/baosight/hpjx/hp/sb/service/ServiceHPSB002.java
View file @
a3daa8c8
...
...
@@ -172,6 +172,7 @@ public class ServiceHPSB002 extends ServiceBase {
List
<
HPSB002
>
hpsb002s
=
DaoBase
.
getInstance
().
query
(
"HPSB002.queryMaxDate"
,
map
);
if
(
CollectionUtils
.
isNotEmpty
(
hpsb002s
))
{
for
(
HPSB002
hpsb002:
hpsb002s
)
{
hpsb002
.
setCompanyCode
(
"Q24072514"
);
DaoUtils
.
insert
(
"HPSB002.insertHgSb010"
,
hpsb002
);
}
}
...
...
src/main/java/com/baosight/hpjx/hp/sb/sql/HPSB002.xml
View file @
a3daa8c8
...
...
@@ -221,7 +221,7 @@
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_TIME
<!-- 创建时间 -->
)
VALUES (#
account
Code#, #fileName#, #equipmentType#, #equipmentCode#, #logInivalue#, #logValue#
VALUES (#
company
Code#, #fileName#, #equipmentType#, #equipmentCode#, #logInivalue#, #logValue#
, #createdBy#, #createdName#, #createdTime#)
</insert>
...
...
src/main/java/com/baosight/hpjx/hp/wd/domain/HPWD003.java
View file @
a3daa8c8
...
...
@@ -41,6 +41,7 @@ public class HPWD003 extends DaoEPBase {
public
static
final
String
FIELD_ORG_ID
=
"orgId"
;
/* 部门编码*/
public
static
final
String
FIELD_ORG_CNAME
=
"orgCname"
;
/* 部门名称*/
public
static
final
String
FIELD_FACTORY_CODE
=
"factoryCode"
;
/* 工厂代码*/
public
static
final
String
FIELD_DOWNLOAD_FLAG
=
"downloadFlag"
;
/* 是否可以下载,0=否,1=是*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 企业编码 预留*/
...
...
@@ -87,6 +88,7 @@ public class HPWD003 extends DaoEPBase {
private
String
orgId
=
" "
;
/* 部门编码*/
private
String
orgCname
=
" "
;
/* 部门名称*/
private
String
factoryCode
=
" "
;
/* 工厂代码*/
private
Integer
downloadFlag
=
0
;
/* 是否可以下载,0=否,1=是*/
/**
* initialize the metadata.
...
...
@@ -171,6 +173,9 @@ public class HPWD003 extends DaoEPBase {
eiColumn
.
setDescName
(
"工厂代码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DOWNLOAD_FLAG
);
eiColumn
.
setDescName
(
"是否可以下载"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
...
...
@@ -437,6 +442,14 @@ public class HPWD003 extends DaoEPBase {
public
void
setFactoryCode
(
String
factoryCode
)
{
this
.
factoryCode
=
factoryCode
;
}
public
Integer
getDownloadFlag
()
{
return
downloadFlag
;
}
public
void
setDownloadFlag
(
Integer
downloadFlag
)
{
this
.
downloadFlag
=
downloadFlag
;
}
/**
* get the value from Map.
...
...
@@ -465,6 +478,7 @@ public class HPWD003 extends DaoEPBase {
setOrgId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ORG_ID
)),
orgId
));
setOrgCname
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ORG_CNAME
)),
orgCname
));
setFactoryCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FACTORY_CODE
)),
factoryCode
));
setDownloadFlag
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOWNLOAD_FLAG
)),
downloadFlag
));
}
/**
...
...
@@ -493,6 +507,7 @@ public class HPWD003 extends DaoEPBase {
map
.
put
(
FIELD_ORG_ID
,
StringUtils
.
toString
(
orgId
,
eiMetadata
.
getMeta
(
FIELD_ORG_ID
)));
map
.
put
(
FIELD_ORG_CNAME
,
StringUtils
.
toString
(
orgCname
,
eiMetadata
.
getMeta
(
FIELD_ORG_CNAME
)));
map
.
put
(
FIELD_FACTORY_CODE
,
StringUtils
.
toString
(
factoryCode
,
eiMetadata
.
getMeta
(
FIELD_FACTORY_CODE
)));
map
.
put
(
FIELD_DOWNLOAD_FLAG
,
StringUtils
.
toString
(
downloadFlag
,
eiMetadata
.
getMeta
(
FIELD_DOWNLOAD_FLAG
)));
return
map
;
}
...
...
src/main/java/com/baosight/hpjx/hp/wd/sql/HPWD003.xml
View file @
a3daa8c8
...
...
@@ -17,7 +17,8 @@
A.USER_ID as "userId",
<!-- 用户ID -->
A.REMARK as "remark",
<!-- 备注 -->
A.IS_PROJECT_MANAGER as "isProjectManager",
<!-- 是否项目经理,0=否,1=是 -->
A.FACTORY_CODE as "factoryCode"
A.FACTORY_CODE as "factoryCode",
A.DOWNLOAD_FLAG as "downloadFlag"
<!-- 是否可以下载,0=否,1=是 -->
<!--A.EXT_ID as "extId" 外部系统ID -->
</sql>
...
...
src/main/resources/META-INF/resources/iPlatV7-index.js
View file @
a3daa8c8
...
...
@@ -2101,14 +2101,14 @@ $(function () {
try
{
if
(
loginName
!==
"admin"
){
var
info
=
new
EiInfo
()
info
.
set
(
"inqu_status-0-
accountCode"
,
loginNam
e
)
EiCommunicator
.
send
(
"H
G
PZ009"
,
"query"
,
info
,
{
info
.
set
(
"inqu_status-0-
companyCode"
,
companyCod
e
)
EiCommunicator
.
send
(
"H
P
PZ009"
,
"query"
,
info
,
{
onSuccess
:
function
(
ei
)
{
//返回结果集
if
(
ei
.
blocks
.
result
!==
undefined
){
let
results
=
ei
.
getBlock
(
"result"
).
getMappedRows
();
if
(
results
.
length
>
0
&&
results
[
0
].
docIdPc
.
trim
().
length
>
0
){
let
src
=
downloadHref
(
results
[
0
].
docIdPc
.
trim
(),
results
[
0
].
projectEnv
)
let
img
=
`<img src="
${
src
}
" style='width:200px;height:55px;background-image: none;'/>`
;
//let src = downloadHref(results[0].docIdPc.trim(),true
)
let
img
=
`<img src="
${
downloadHref
(
results
[
0
].
docIdPc
.
trim
(),
true
)
}
" style='width:200px;height:55px;background-image: none;'/>`
;
$
(
"#sidebar .sidebar-content .side-header"
).
html
(
img
);
//$("#sidebar .sidebar-content .side-header").attr("src",downloadHref(results[0].docIdPc,results[0].projectEnv));
}
else
{
...
...
@@ -2201,13 +2201,20 @@ function changepassword(formEname,formCname){
});
}
function
downloadHref
(
docId
,
projectEnv
)
{
// S3地址有外网
// return IPLATUI.CONTEXT_PATH + ("run" == projectEnv ? ('/docFileDownload/' + docId)
// : ('/EU/DM/EUDM06.jsp?docId=' + docId));
// S3地址无外网
return
IPLATUI
.
CONTEXT_PATH
+
(
"run"
==
projectEnv
?
(
'/file/download/'
+
docId
)
:
(
'/EU/DM/EUDM06.jsp?docId='
+
docId
));
/**
* 文件下载路径
*
* @param docId
* @param isPreview 是否预览,true:预览
* @returns {string}
*/
function
downloadHref
(
docId
,
isPreview
)
{
if
(
isPreview
)
{
return
IPLATUI
.
CONTEXT_PATH
+
'/file/download/preview/'
+
docId
;
}
else
{
// S3地址必须支持公网
return
IPLATUI
.
CONTEXT_PATH
+
'/file/download/'
+
docId
;
}
}
/**
...
...
src/main/resources/META-INF/resources/iPlatV7-index.jsp
View file @
a3daa8c8
...
...
@@ -12,6 +12,7 @@
<
%@
page
import=
"com.baosight.iplat4j.core.web.threadlocal.UserSession"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.service.soa.XLocalManager"
%
>
<
%@
page
import=
"com.baosight.iplat4j.ed.service.PlatApplicationDynamicContext"
%
>
<
%@
page
import=
"com.baosight.hpjx.core.security.UserSessionUtils"
%
>
<
%@
taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%
>
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
...
...
@@ -21,6 +22,7 @@
UserSession
.
web2Service
(
request
);
String
userName =
UserSession.getLoginCName();
String
loginName =
UserSession.getLoginName();
String
companyCode =
UserSessionUtils.getCompanyCode();
request
.
setAttribute
("
userName
",
userName
);
request
.
setAttribute
("
loginName
",
loginName
);
String
efSecurityToken =
null;
...
...
@@ -118,6 +120,7 @@
<c:set
var=
"loadingIcon"
value=
"<%=loadingIcon%>"
scope=
"session"
/>
<c:set
var=
"SideBarIsMini"
value=
"<%=SideBarIsMini%>"
/>
<c:set
var=
"loginName"
value=
"<%=loginName%>"
/>
<c:set
var=
"companyCode"
value=
"<%=companyCode%>"
/>
<!--[if IE 9]>
<html class="ie9 no-focus" xmlns="http://www.w3.org/1999/xhtml">
<![endif]-->
...
...
@@ -555,6 +558,7 @@
var
ctx
=
"${ctx}"
;
var
loginName
=
"${loginName}"
;
var
SideBarIsMini
=
$
{
SideBarIsMini
};
var
companyCode
=
"${companyCode}"
;
var
theme
=
"${theme}"
;
</script>
...
...
src/main/webapp/HP/PZ/HPPZ009.js
View file @
a3daa8c8
...
...
@@ -48,7 +48,7 @@ $(function () {
let
src
=
downloadHref
(
docId
);
template
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;background-color: #e7e7e7" '
+
'href="'
+
src
+
'" target="_blank">'
+
'<img src="'
+
src
+
'" style="width:200px;height:50px;background-image: none;" alt="APP端log"/></a>'
;
'<img src="'
+
downloadHref
(
docId
,
true
)
+
'" style="width:200px;height:50px;background-image: none;" alt="APP端log"/></a>'
;
}
return
template
;
}
...
...
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