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
96c8bb80
Commit
96c8bb80
authored
Aug 20, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.pseer.com:8800/platform/hg-smart
into dev-ly
parents
33727bbc
ac429dca
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
43 additions
and
55 deletions
+43
-55
FileUploadController.java
...va/com/baosight/hggp/controller/FileUploadController.java
+7
-1
UserSessionUtils.java
...ava/com/baosight/hggp/core/security/UserSessionUtils.java
+21
-0
ServiceHGSC007.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC007.java
+0
-0
HGSC007.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC007.xml
+8
-46
HGWD001.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001.xml
+1
-1
HGWDTools.java
src/main/java/com/baosight/hggp/hg/wd/tools/HGWDTools.java
+3
-6
HGWD002.js
src/main/webapp/HG/WD/HGWD002.js
+1
-1
HGWD002.jsp
src/main/webapp/HG/WD/HGWD002.jsp
+2
-0
No files found.
src/main/java/com/baosight/hggp/controller/FileUploadController.java
View file @
96c8bb80
...
@@ -16,9 +16,11 @@ import org.springframework.web.multipart.commons.CommonsMultipartFile;
...
@@ -16,9 +16,11 @@ import org.springframework.web.multipart.commons.CommonsMultipartFile;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Iterator
;
import
java.util.Map
;
import
java.util.Map
;
import
net.sf.json.JSONObject
;
import
net.sf.json.JSONObject
;
import
org.springframework.web.multipart.support.DefaultMultipartHttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
...
@@ -44,7 +46,11 @@ public class FileUploadController {
...
@@ -44,7 +46,11 @@ public class FileUploadController {
JSONObject
upload
=
new
JSONObject
();
JSONObject
upload
=
new
JSONObject
();
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
CommonConstant
.
projectEnv
.
RUN
.
equalsIgnoreCase
(
projectEnv
))
{
if
(
CommonConstant
.
projectEnv
.
RUN
.
equalsIgnoreCase
(
projectEnv
))
{
upload
=
UploadUtils
.
upload
((
CommonsMultipartFile
)
file
);
Iterator
multiFileIterator
=
((
DefaultMultipartHttpServletRequest
)
request
).
getMultiFileMap
().
get
(
"uploadFile"
).
iterator
();
while
(
multiFileIterator
.
hasNext
())
{
CommonsMultipartFile
multipartFile
=
(
CommonsMultipartFile
)
multiFileIterator
.
next
();
upload
=
UploadUtils
.
upload
(
multipartFile
);
}
}
else
{
}
else
{
upload
=
UploadUtils
.
uploadFile
(
request
);
upload
=
UploadUtils
.
uploadFile
(
request
);
}
}
...
...
src/main/java/com/baosight/hggp/core/security/UserSessionUtils.java
View file @
96c8bb80
...
@@ -133,6 +133,27 @@ public class UserSessionUtils extends UserSession {
...
@@ -133,6 +133,27 @@ public class UserSessionUtils extends UserSession {
}
}
/**
/**
* 获取登录用户的所有组
*
* @return
*/
public
static
List
<
String
>
getAllGroupCode
()
{
List
<
Org
>
orgs
=
HGXSTools
.
XsOrg
.
queryByUser
();
if
(
CollectionUtils
.
isEmpty
(
orgs
))
{
return
new
ArrayList
<>();
}
List
<
String
>
prodGroupCodes
=
new
ArrayList
<>();
for
(
Org
org
:
orgs
)
{
if
(
OrgTypeEnum
.
PROD_GROUP
.
getCode
().
equals
(
org
.
getOrgType
())
||
OrgTypeEnum
.
CUT_GROUP
.
getCode
().
equals
(
org
.
getOrgType
())
||
OrgTypeEnum
.
SYN_GROUP
.
getCode
().
equals
(
org
.
getOrgType
()))
{
prodGroupCodes
.
add
(
org
.
getOrgId
());
}
}
return
prodGroupCodes
;
}
/**
* 获取登录用户所有角色
* 获取登录用户所有角色
*
*
* @return
* @return
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC007.java
View file @
96c8bb80
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC007.xml
View file @
96c8bb80
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<!-- table information
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
Generate time : 2024-05-23 17:55:59
Version : 1.0
schema : hggp
tableName : HGSC007
id BIGINT NOT NULL primarykey,
order_id BIGINT NOT NULL,
order_detail_id BIGINT NOT NULL,
tech_flow_id BIGINT,
tech_flow_name BIGINT,
invent_process_id BIGINT,
process_code VARCHAR,
process_name VARCHAR,
process_order BIGINT,
company_code VARCHAR NOT NULL,
company_name VARCHAR NOT NULL,
dep_code VARCHAR,
dep_name VARCHAR,
proj_code VARCHAR,
proj_name VARCHAR,
task_code VARCHAR,
product_type TINYINT,
product_code VARCHAR,
product_name VARCHAR,
plan_start_date VARCHAR,
plan_end_date VARCHAR,
factory_code VARCHAR,
factory_name VARCHAR,
group_code VARCHAR,
group_name VARCHAR,
complete_date VARCHAR,
quantity TINYINT,
finish_quantity TINYINT,
unfinish_quantity TINYINT,
single_weight DECIMAL,
total_weight DECIMAL,
finish_weight DECIMAL,
unfinish_weight DECIMAL,
account_code VARCHAR NOT NULL,
created_by VARCHAR,
created_name VARCHAR,
created_time VARCHAR,
updated_by VARCHAR,
updated_name VARCHAR,
updated_time VARCHAR
-->
<sqlMap
namespace=
"HGSC007"
>
<sqlMap
namespace=
"HGSC007"
>
<sql
id=
"condition"
>
<sql
id=
"condition"
>
...
@@ -184,6 +139,13 @@
...
@@ -184,6 +139,13 @@
ifnull(complete_date,'') != ''
ifnull(complete_date,'') != ''
</isEqual>
</isEqual>
</sql>
</sql>
<sql
id=
"customCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"groupCodes"
>
GROUP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"groupCodes"
>
#groupCodes[]#
</iterate>
</isNotEmpty>
</sql>
<sql
id=
"appCondition"
>
<sql
id=
"appCondition"
>
<!-- 无权限时使用 -->
<!-- 无权限时使用 -->
<isNotEmpty
prepend=
" AND "
property=
"authDepCode"
>
<isNotEmpty
prepend=
" AND "
property=
"authDepCode"
>
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001.xml
View file @
96c8bb80
...
@@ -108,7 +108,7 @@
...
@@ -108,7 +108,7 @@
$orderBy$
$orderBy$
</isNotEmpty>
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
<isEmpty
property=
"orderBy"
>
ID
desc
ID
DESC
</isEmpty>
</isEmpty>
</dynamic>
</dynamic>
</sql>
</sql>
...
...
src/main/java/com/baosight/hggp/hg/wd/tools/HGWDTools.java
View file @
96c8bb80
package
com
.
baosight
.
hggp
.
hg
.
wd
.
tools
;
package
com
.
baosight
.
hggp
.
hg
.
wd
.
tools
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.sb.domain.HGSB002
;
import
com.baosight.hggp.hg.wd.constant.HgWdSqlConstant
;
import
com.baosight.hggp.hg.wd.constant.HgWdSqlConstant
;
import
com.baosight.hggp.hg.wd.domain.HGWD001
;
import
com.baosight.hggp.hg.wd.domain.HGWD001
;
import
com.baosight.hggp.hg.wd.domain.HGWD001A
;
import
com.baosight.hggp.hg.wd.domain.HGWD001A
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.AssertUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -32,7 +29,7 @@ public class HGWDTools {
...
@@ -32,7 +29,7 @@ public class HGWDTools {
* @return
* @return
*/
*/
public
static
HGWD001
get
(
String
fileId
)
{
public
static
HGWD001
get
(
String
fileId
)
{
AssertUtils
.
is
Null
(
fileId
,
"文件ID不能为空"
);
AssertUtils
.
is
Empty
(
fileId
,
"文件ID不能为空"
);
Map
queryMap
=
new
HashMap
();
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
HGWD001
.
FIELD_FILE_ID
,
fileId
);
queryMap
.
put
(
HGWD001
.
FIELD_FILE_ID
,
fileId
);
List
<
HGWD001
>
results
=
DaoBase
.
getInstance
().
query
(
HGWD001
.
QUERY
,
queryMap
);
List
<
HGWD001
>
results
=
DaoBase
.
getInstance
().
query
(
HGWD001
.
QUERY
,
queryMap
);
...
@@ -57,7 +54,7 @@ public class HGWDTools {
...
@@ -57,7 +54,7 @@ public class HGWDTools {
* @param fileId
* @param fileId
*/
*/
public
static
void
previewIncr
(
String
fileId
)
{
public
static
void
previewIncr
(
String
fileId
)
{
AssertUtils
.
is
Null
(
fileId
,
"文件ID不能为空"
);
AssertUtils
.
is
Empty
(
fileId
,
"文件ID不能为空"
);
Map
queryMap
=
new
HashMap
();
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
HGWD001
.
FIELD_FILE_ID
,
fileId
);
queryMap
.
put
(
HGWD001
.
FIELD_FILE_ID
,
fileId
);
DaoUtils
.
update
(
HgWdSqlConstant
.
HgWd001
.
PREVIEW_INCR
,
queryMap
);
DaoUtils
.
update
(
HgWdSqlConstant
.
HgWd001
.
PREVIEW_INCR
,
queryMap
);
...
@@ -69,7 +66,7 @@ public class HGWDTools {
...
@@ -69,7 +66,7 @@ public class HGWDTools {
* @param fileId
* @param fileId
*/
*/
public
static
void
downloadIncr
(
String
fileId
)
{
public
static
void
downloadIncr
(
String
fileId
)
{
AssertUtils
.
is
Null
(
fileId
,
"文件ID不能为空"
);
AssertUtils
.
is
Empty
(
fileId
,
"文件ID不能为空"
);
Map
queryMap
=
new
HashMap
();
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
HGWD001
.
FIELD_FILE_ID
,
fileId
);
queryMap
.
put
(
HGWD001
.
FIELD_FILE_ID
,
fileId
);
DaoUtils
.
update
(
HgWdSqlConstant
.
HgWd001
.
DOWNLOAD_INCR
,
queryMap
);
DaoUtils
.
update
(
HgWdSqlConstant
.
HgWd001
.
DOWNLOAD_INCR
,
queryMap
);
...
...
src/main/webapp/HG/WD/HGWD002.js
View file @
96c8bb80
...
@@ -21,7 +21,7 @@ $(function () {
...
@@ -21,7 +21,7 @@ $(function () {
},
{
},
{
field
:
"docVersion"
,
field
:
"docVersion"
,
template
:
function
(
model
)
{
template
:
function
(
model
)
{
return
"
V
"
+
model
.
docVersion
;
return
"
v
"
+
model
.
docVersion
;
}
}
}],
}],
loadComplete
:
function
(
grid
)
{
loadComplete
:
function
(
grid
)
{
...
...
src/main/webapp/HG/WD/HGWD002.jsp
View file @
96c8bb80
...
@@ -34,6 +34,8 @@
...
@@ -34,6 +34,8 @@
<EF:EFColumn
ename=
"docVersion"
cname=
"版本号"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"docVersion"
cname=
"版本号"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"docId"
cname=
"文件号"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"docId"
cname=
"文件号"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"docName"
cname=
"文件附件名称"
enable=
"false"
width=
"100"
align=
"left"
/>
<EF:EFColumn
ename=
"docName"
cname=
"文件附件名称"
enable=
"false"
width=
"100"
align=
"left"
/>
<EF:EFColumn
ename=
"previewNum"
cname=
"预览次数"
enable=
"false"
width=
"100"
align=
"right"
/>
<EF:EFColumn
ename=
"downloadNum"
cname=
"下载次数"
enable=
"false"
width=
"100"
align=
"right"
/>
</EF:EFGrid>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFRegion>
...
...
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