Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-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
hg-smart
Commits
da8fe797
Commit
da8fe797
authored
Oct 08, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.文档库优化:产品仅同步设备数据、文档按类型排序,文档浏览页面去掉下载功能
parent
95939f1c
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
25 additions
and
12 deletions
+25
-12
DaoUtils.java
src/main/java/com/baosight/hggp/core/dao/DaoUtils.java
+2
-3
DcOpenApi.java
.../com/baosight/hggp/core/extapp/decheng/api/DcOpenApi.java
+2
-0
ServiceHGWD002.java
.../java/com/baosight/hggp/hg/wd/service/ServiceHGWD002.java
+5
-2
ServiceHGWD002A.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD002A.java
+6
-1
HGWD002.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD002.xml
+4
-1
HGWD005.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD005.xml
+1
-1
HGWD002A.js
src/main/webapp/HG/WD/HGWD002A.js
+3
-2
HGWD002A.jsp
src/main/webapp/HG/WD/HGWD002A.jsp
+2
-2
No files found.
src/main/java/com/baosight/hggp/core/dao/DaoUtils.java
View file @
da8fe797
...
...
@@ -12,7 +12,6 @@ import org.apache.commons.collections.CollectionUtils;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.lang.StringUtils
;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -320,7 +319,7 @@ public class DaoUtils {
userId
=
MapUtils
.
getString
(
map
,
"updatedBy"
);
if
(
StringUtils
.
isBlank
(
userId
))
{
userId
=
UserSession
.
getLoginName
();
userId
=
userId
==
null
||
userId
.
length
()
>
32
?
"System"
:
userId
;
userId
=
userId
==
null
?
"System"
:
userId
;
}
}
catch
(
Exception
e
)
{
userId
=
"System"
;
...
...
@@ -335,7 +334,7 @@ public class DaoUtils {
}
catch
(
Exception
e
)
{
userName
=
"System"
;
}
map
.
put
(
"updatedName"
,
userName
);
map
.
put
(
"updatedName"
,
StringUtils
.
isBlank
(
userName
)
?
"System"
:
userName
);
// 修改时间
map
.
put
(
"updatedTime"
,
DateUtils
.
shortDateTime
());
}
...
...
src/main/java/com/baosight/hggp/core/extapp/decheng/api/DcOpenApi.java
View file @
da8fe797
...
...
@@ -149,6 +149,8 @@ public class DcOpenApi {
JSONArray
dataJsons
=
new
JSONArray
();
dataJsons
.
add
(
DcApiUtils
.
buildValueJson
(
"pageindex"
,
pageIndex
));
dataJsons
.
add
(
DcApiUtils
.
buildValueJson
(
"pagesize"
,
100
));
// 仅同步设备数据,566:成品-设备的分类ID
dataJsons
.
add
(
DcApiUtils
.
buildValueJson
(
"idProductClass"
,
566
));
String
param
=
JSON
.
toJSONString
(
DcApiUtils
.
buildParamJson
(
dataJsons
));
String
result
=
HttpUtils
.
post
(
DeChengConst
.
PRODUCT_BILLLIST
,
param
,
HttpUtils
.
JSON_MEDIA_TYPE
);
if
(
StringUtils
.
isBlank
(
result
))
{
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD002.java
View file @
da8fe797
...
...
@@ -6,11 +6,11 @@ import com.baosight.hggp.core.security.UserSessionUtils;
import
com.baosight.hggp.hg.wd.constant.HgWdConstant
;
import
com.baosight.hggp.hg.wd.domain.HGWD001
;
import
com.baosight.hggp.hg.wd.domain.HGWD002
;
import
com.baosight.hggp.hg.wd.utils.HgWdUtils
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
...
...
@@ -55,7 +55,10 @@ public class ServiceHGWD002 extends ServiceBase {
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
// 仅查询已发布的文件
queryRow
.
put
(
HGWD001
.
FIELD_STATUS
,
HgWdConstant
.
FileStatus
.
S_1
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
User
.
FIELD_USER_ID
,
UserSessionUtils
.
getUserId
());
// 管理员不做权限验证
if
(!
HgWdUtils
.
HgWd009
.
isManager
())
{
queryRow
.
put
(
User
.
FIELD_USER_ID
,
UserSessionUtils
.
getUserId
());
}
builder
(
inInfo
);
inInfo
=
super
.
query
(
inInfo
,
HGWD002
.
QUERY
,
new
HGWD002
());
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD002A.java
View file @
da8fe797
...
...
@@ -6,6 +6,7 @@ import com.baosight.hggp.core.security.UserSessionUtils;
import
com.baosight.hggp.hg.wd.constant.HgWdConstant
;
import
com.baosight.hggp.hg.wd.domain.HGWD001
;
import
com.baosight.hggp.hg.wd.domain.HGWD002
;
import
com.baosight.hggp.hg.wd.utils.HgWdUtils
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.MapUtils
;
...
...
@@ -93,9 +94,13 @@ public class ServiceHGWD002A extends ServiceEPBase {
public
List
queryChildNode
(
String
parentId
)
{
List
<
Map
>
results
=
new
ArrayList
();
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"fileId"
,
parentId
);
queryMap
.
put
(
"parentId"
,
parentId
);
queryMap
.
put
(
"userId"
,
UserSessionUtils
.
getLoginName
());
if
(!
HgWdUtils
.
HgWd009
.
isManager
())
{
queryMap
.
put
(
"userId"
,
UserSessionUtils
.
getLoginName
());
}
queryMap
.
put
(
HGWD001
.
FIELD_STATUS
,
HgWdConstant
.
FileStatus
.
S_1
);
queryMap
.
put
(
"orderBy"
,
"B.DOC_TYPE ASC, B.DOC_NAME ASC"
);
List
<
HGWD002
>
dbWd002s
=
dao
.
query
(
HGWD002
.
QUERY
,
queryMap
);
if
(
CollectionUtils
.
isEmpty
(
dbWd002s
))
{
return
results
;
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD002.xml
View file @
da8fe797
...
...
@@ -61,7 +61,10 @@
B.DOC_NAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"parentId"
>
B.BIZ_ID IN (select FILE_ID from ${hggpSchema}.hgwd003 where USER_ID = #userId# and FILE_ID = #parentId# )
<isNotEmpty
prepend=
" AND "
property=
"userId"
>
B.BIZ_ID IN (select FILE_ID from ${hggpSchema}.hgwd003 where USER_ID = #userId#
AND FILE_ID = #parentId#)
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdTime"
>
LEFT(B.CREATED_TIME,8) = replace(#createdTime#,'-','')
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD005.xml
View file @
da8fe797
...
...
@@ -115,7 +115,7 @@
PRODUCT_NAME = #productName#,
<!-- 产品名称 -->
PRODUCT_MODEL = #productModel#,
<!-- 产品型号 -->
UNIT = #unit#,
<!-- 产品单位 -->
CLASSIFY = #classify#
,
<!-- 产品分类 -->
CLASSIFY = #classify#
<!-- 产品分类 -->
WHERE ID = #id#
</update>
...
...
src/main/webapp/HG/WD/HGWD002A.js
View file @
da8fe797
...
...
@@ -370,7 +370,8 @@ function otherDownload(isRoot, docId) {
if
(
isRoot
)
{
$
(
"#descSpan"
).
html
(
"文件预览区域..."
);
}
else
{
$
(
"#descSpan"
).
html
(
"该文件暂不支持预览,点击<a href='"
+
downloadHref
(
docId
,
false
)
+
"' target='_blank'>下载</a>"
);
$
(
"#descSpan"
).
html
(
"该文件暂不支持预览"
);
// $("#descSpan").html("该文件暂不支持预览,点击<a href='" + downloadHref(docId, false)
// + "' target='_blank'>下载</a>");
}
}
src/main/webapp/HG/WD/HGWD002A.jsp
View file @
da8fe797
...
...
@@ -14,7 +14,7 @@
/*align-items: flex-start;*/
height
:
100%
;
width
:
100%
;
overflow
:
scroll
;
overflow
:
auto
;
}
.center-flex
{
...
...
@@ -75,7 +75,7 @@
<span
id=
"descSpan"
style=
"font-weight: bold;font-size: 18px"
>
文件预览区域...
</span>
</div>
<
%
--
文本预览
--
%
>
<div
id=
"textContainer"
class=
"
center
-flex"
>
<div
id=
"textContainer"
class=
"
left
-flex"
>
<pre
id=
"textSpan"
class=
"textSpan"
></pre>
</div>
<
%
--
docx
文件预览
--
%
>
...
...
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