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
45ba1827
Commit
45ba1827
authored
Mar 23, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.pseer.com/platform/hp-smart
into dev
parents
a0f136fe
319bb65c
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
283 additions
and
205 deletions
+283
-205
HPKC010.xml
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC010.xml
+1
-1
ServiceHPMT001.java
.../java/com/baosight/hpjx/hp/mt/service/ServiceHPMT001.java
+38
-31
ServiceHPMT002.java
.../java/com/baosight/hpjx/hp/mt/service/ServiceHPMT002.java
+206
-121
HPMT002.xml
src/main/java/com/baosight/hpjx/hp/mt/sql/HPMT002.xml
+1
-1
UploadUtils.java
...main/java/com/baosight/hpjx/hp/mt/untils/UploadUtils.java
+7
-1
UploadUtils2.java
...ain/java/com/baosight/hpjx/hp/mt/untils/UploadUtils2.java
+26
-28
ServiceHPPZ015.java
.../java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ015.java
+1
-1
HPXSOrg.xml
src/main/java/com/baosight/hpjx/hp/xs/sql/HPXSOrg.xml
+1
-1
HPSC006.js
src/main/webapp/HP/SC/HPSC006.js
+2
-20
No files found.
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC010.xml
View file @
45ba1827
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
<select
id=
"query"
resultClass=
"com.baosight.hpjx.hp.kc.domain.HPKC010"
>
<select
id=
"query"
resultClass=
"com.baosight.hpjx.hp.kc.domain.HPKC010"
>
SELECT
<include
refid=
"column"
/>
SELECT
<include
refid=
"column"
/>
FROM hpjx.T_HPKC010
FROM hpjx.T_HPKC010
WHERE 1=1
WHERE 1=1
AND AMOUNT!=0
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<include
refid=
"customCondition"
/>
<include
refid=
"customCondition"
/>
<dynamic
prepend=
"ORDER BY"
>
<dynamic
prepend=
"ORDER BY"
>
...
...
src/main/java/com/baosight/hpjx/hp/mt/service/ServiceHPMT001.java
View file @
45ba1827
...
@@ -44,21 +44,23 @@ public class ServiceHPMT001 extends ServiceBase {
...
@@ -44,21 +44,23 @@ public class ServiceHPMT001 extends ServiceBase {
* @param inInfo
* @param inInfo
* @return
* @return
*/
*/
public
EiInfo
pmOverview
(
EiInfo
inInfo
)
{
public
Map
pmOverview
(
EiInfo
inInfo
)
{
String
queryMonth
=
inInfo
.
getString
(
"queryMonth"
);
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
inInfo
.
setMsg
(
"账号异常"
);
}
Map
sqlMap
=
new
HashMap
();
sqlMap
.
put
(
"queryMonth"
,
queryMonth
);
sqlMap
.
put
(
"companyCode"
,
companyCode
);
List
<
Map
>
row1
=
this
.
dao
.
query
(
"HPMT001.pmOverview1"
,
sqlMap
);
//目标
List
<
Map
>
row2
=
this
.
dao
.
query
(
"HPMT001.pmOverview2"
,
sqlMap
);
//实际
List
<
Map
>
rows
=
new
ArrayList
<>();
Map
resultMap
=
new
HashMap
();
Map
resultMap
=
new
HashMap
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyyMM"
);
try
{
try
{
String
queryMonth
=
inInfo
.
getString
(
"queryMonth"
);
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
resultMap
.
put
(
"status"
,
403
);
resultMap
.
put
(
"message"
,
"票据过期或请求不合法,请重新登录或获取合法权限!"
);
return
resultMap
;
}
Map
sqlMap
=
new
HashMap
();
sqlMap
.
put
(
"queryMonth"
,
queryMonth
);
sqlMap
.
put
(
"companyCode"
,
companyCode
);
List
<
Map
>
row1
=
this
.
dao
.
query
(
"HPMT001.pmOverview1"
,
sqlMap
);
//目标
List
<
Map
>
row2
=
this
.
dao
.
query
(
"HPMT001.pmOverview2"
,
sqlMap
);
//实际
List
<
Map
>
rows
=
new
ArrayList
<>();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyyMM"
);
Date
parse
=
sdf
.
parse
(
queryMonth
);
Date
parse
=
sdf
.
parse
(
queryMonth
);
Calendar
instance
=
Calendar
.
getInstance
();
Calendar
instance
=
Calendar
.
getInstance
();
instance
.
setTime
(
parse
);
instance
.
setTime
(
parse
);
...
@@ -132,15 +134,13 @@ public class ServiceHPMT001 extends ServiceBase {
...
@@ -132,15 +134,13 @@ public class ServiceHPMT001 extends ServiceBase {
resultMap
.
put
(
"actualWt_h_yoy"
,
actualWt
.
subtract
(
actualWt2
).
divide
(
actualWt2
,
BigDecimal
.
ROUND_UP
).
resultMap
.
put
(
"actualWt_h_yoy"
,
actualWt
.
subtract
(
actualWt2
).
divide
(
actualWt2
,
BigDecimal
.
ROUND_UP
).
multiply
(
new
BigDecimal
(
100
)).
doubleValue
());
multiply
(
new
BigDecimal
(
100
)).
doubleValue
());
}
}
rows
.
add
(
resultMap
);
resultMap
.
put
(
"status"
,
EiConstant
.
STATUS_SUCCESS
);
EiInfo
outInfo
=
new
EiInfo
();
resultMap
.
put
(
"message"
,
"SUCCESS"
);
EiBlock
eiBlock
=
new
EiBlock
(
EiConstant
.
resultBlock
);
return
resultMap
;
eiBlock
.
setRows
(
rows
);
}
catch
(
Exception
e
)
{
outInfo
.
setBlock
(
eiBlock
);
resultMap
.
put
(
"status"
,
500
);
return
outInfo
;
resultMap
.
put
(
"message"
,
LogUtils
.
getMsg
(
e
));
}
catch
(
ParseException
e
)
{
return
resultMap
;
e
.
printStackTrace
();
return
inInfo
;
}
}
}
}
...
@@ -151,24 +151,31 @@ public class ServiceHPMT001 extends ServiceBase {
...
@@ -151,24 +151,31 @@ public class ServiceHPMT001 extends ServiceBase {
* @param inInfo
* @param inInfo
* @return
* @return
*/
*/
public
EiInfo
pmBenchmarking
(
EiInfo
inInfo
)
{
public
Map
pmBenchmarking
(
EiInfo
inInfo
)
{
Map
resultMap
=
new
HashMap
();
try
{
String
queryMonth
=
inInfo
.
getString
(
"queryMonth"
);
String
queryMonth
=
inInfo
.
getString
(
"queryMonth"
);
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
inInfo
.
setMsg
(
"账号异常"
);
resultMap
.
put
(
"status"
,
403
);
resultMap
.
put
(
"message"
,
"票据过期或请求不合法,请重新登录或获取合法权限!"
);
return
resultMap
;
}
}
Map
sqlMap
=
new
HashMap
();
Map
sqlMap
=
new
HashMap
();
sqlMap
.
put
(
"queryMonth"
,
queryMonth
);
sqlMap
.
put
(
"queryMonth"
,
queryMonth
);
sqlMap
.
put
(
"companyCode"
,
companyCode
);
sqlMap
.
put
(
"companyCode"
,
companyCode
);
List
<
Map
>
rows
=
this
.
dao
.
query
(
"HPMT001.pmBenchmarking"
,
sqlMap
);
List
<
Map
>
rows
=
this
.
dao
.
query
(
"HPMT001.pmBenchmarking"
,
sqlMap
);
List
<
Map
>
rows2
=
this
.
dao
.
query
(
"HPMT001.pmBenchmarking2"
,
sqlMap
);
List
<
Map
>
rows2
=
this
.
dao
.
query
(
"HPMT001.pmBenchmarking2"
,
sqlMap
);
EiInfo
outInfo
=
new
EiInfo
();
resultMap
.
put
(
"result"
,
rows
);
EiBlock
eiBlock
=
new
EiBlock
(
EiConstant
.
resultBlock
);
resultMap
.
put
(
"result2"
,
rows2
);
eiBlock
.
setRows
(
rows
);
resultMap
.
put
(
"status"
,
EiConstant
.
STATUS_SUCCESS
);
outInfo
.
setBlock
(
eiBlock
);
resultMap
.
put
(
"message"
,
"SUCCESS"
);
outInfo
.
set
(
"cout"
,
rows2
);
return
resultMap
;
}
catch
(
Exception
e
)
{
return
outInfo
;
resultMap
.
put
(
"status"
,
500
);
resultMap
.
put
(
"message"
,
LogUtils
.
getMsg
(
e
));
return
resultMap
;
}
}
}
}
}
src/main/java/com/baosight/hpjx/hp/mt/service/ServiceHPMT002.java
View file @
45ba1827
...
@@ -4,6 +4,7 @@ import cn.hutool.core.util.PageUtil;
...
@@ -4,6 +4,7 @@ import cn.hutool.core.util.PageUtil;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoBase
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
...
@@ -64,14 +65,18 @@ public class ServiceHPMT002 extends ServiceBase {
...
@@ -64,14 +65,18 @@ public class ServiceHPMT002 extends ServiceBase {
* @param inInfo
* @param inInfo
* @return
* @return
*/
*/
public
EiInfo
pmProject
(
EiInfo
inInfo
)
{
public
Map
pmProject
(
EiInfo
inInfo
)
{
Map
resultMap
=
new
HashMap
();
try
{
String
projName
=
inInfo
.
getString
(
"projName"
);
String
projName
=
inInfo
.
getString
(
"projName"
);
int
offset
=
inInfo
.
getInt
(
"offset"
);
//当前页
int
offset
=
inInfo
.
getInt
(
"offset"
);
//当前页
int
pageSize
=
inInfo
.
getInt
(
"pageSize"
);
//每页条数
int
pageSize
=
inInfo
.
getInt
(
"pageSize"
);
//每页条数
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
inInfo
.
setMsg
(
"账号异常"
);
resultMap
.
put
(
"status"
,
403
);
}
resultMap
.
put
(
"message"
,
"票据过期或请求不合法,请重新登录或获取合法权限!"
);
return
resultMap
;
}
Map
sqlMap
=
new
HashMap
();
Map
sqlMap
=
new
HashMap
();
sqlMap
.
put
(
"companyCode"
,
companyCode
);
sqlMap
.
put
(
"companyCode"
,
companyCode
);
sqlMap
.
put
(
"projName"
,
projName
);
sqlMap
.
put
(
"projName"
,
projName
);
...
@@ -86,12 +91,16 @@ public class ServiceHPMT002 extends ServiceBase {
...
@@ -86,12 +91,16 @@ public class ServiceHPMT002 extends ServiceBase {
maps
.
add
(
row
);
maps
.
add
(
row
);
}
}
}
}
EiInfo
outInfo
=
new
EiInfo
();
resultMap
.
put
(
"result"
,
maps
);
EiBlock
eiBlock
=
new
EiBlock
(
EiConstant
.
resultBlock
);
resultMap
.
put
(
"count"
,
count
.
get
(
0
));
eiBlock
.
setRows
(
maps
);
resultMap
.
put
(
"status"
,
EiConstant
.
STATUS_SUCCESS
);
outInfo
.
setBlock
(
eiBlock
);
resultMap
.
put
(
"message"
,
"SUCCESS"
);
outInfo
.
set
(
"count"
,
count
.
get
(
0
));
return
resultMap
;
return
outInfo
;
}
catch
(
Exception
e
)
{
resultMap
.
put
(
"status"
,
500
);
resultMap
.
put
(
"message"
,
LogUtils
.
getMsg
(
e
));
return
resultMap
;
}
}
}
/**
/**
...
@@ -100,18 +109,29 @@ public class ServiceHPMT002 extends ServiceBase {
...
@@ -100,18 +109,29 @@ public class ServiceHPMT002 extends ServiceBase {
* @param inInfo
* @param inInfo
* @return
* @return
*/
*/
public
EiInfo
pmProjectCount
(
EiInfo
inInfo
)
{
public
Map
pmProjectCount
(
EiInfo
inInfo
)
{
Map
resultMap
=
new
HashMap
();
try
{
String
projName
=
inInfo
.
getString
(
"projName"
);
String
projName
=
inInfo
.
getString
(
"projName"
);
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
inInfo
.
setMsg
(
"账号异常"
);
resultMap
.
put
(
"status"
,
403
);
resultMap
.
put
(
"message"
,
"票据过期或请求不合法,请重新登录或获取合法权限!"
);
return
resultMap
;
}
}
Map
sqlMap
=
new
HashMap
();
Map
sqlMap
=
new
HashMap
();
sqlMap
.
put
(
"companyCode"
,
companyCode
);
sqlMap
.
put
(
"companyCode"
,
companyCode
);
sqlMap
.
put
(
"projName"
,
projName
);
sqlMap
.
put
(
"projName"
,
projName
);
int
count
=
this
.
dao
.
count
(
"HPMT002.pmProjectCount"
,
sqlMap
);
int
count
=
this
.
dao
.
count
(
"HPMT002.pmProjectCount"
,
sqlMap
);
inInfo
.
set
(
"count"
,
count
);
resultMap
.
put
(
"count"
,
count
);
return
inInfo
;
resultMap
.
put
(
"status"
,
EiConstant
.
STATUS_SUCCESS
);
resultMap
.
put
(
"message"
,
"SUCCESS"
);
return
resultMap
;
}
catch
(
Exception
e
)
{
resultMap
.
put
(
"status"
,
500
);
resultMap
.
put
(
"message"
,
LogUtils
.
getMsg
(
e
));
return
resultMap
;
}
}
}
/**
/**
...
@@ -120,20 +140,29 @@ public class ServiceHPMT002 extends ServiceBase {
...
@@ -120,20 +140,29 @@ public class ServiceHPMT002 extends ServiceBase {
* @param inInfo
* @param inInfo
* @return
* @return
*/
*/
public
EiInfo
pmQuality
(
EiInfo
inInfo
)
{
public
Map
pmQuality
(
EiInfo
inInfo
)
{
Map
resultMap
=
new
HashMap
();
try
{
String
queryMonth
=
inInfo
.
getString
(
"queryMonth"
);
String
queryMonth
=
inInfo
.
getString
(
"queryMonth"
);
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
inInfo
.
setMsg
(
"账号异常"
);
resultMap
.
put
(
"status"
,
403
);
resultMap
.
put
(
"message"
,
"票据过期或请求不合法,请重新登录或获取合法权限!"
);
return
resultMap
;
}
}
Map
sqlMap
=
new
HashMap
();
Map
sqlMap
=
new
HashMap
();
sqlMap
.
put
(
"companyCode"
,
companyCode
);
sqlMap
.
put
(
"companyCode"
,
companyCode
);
sqlMap
.
put
(
"queryMonth"
,
queryMonth
);
List
<
Map
>
rows
=
this
.
dao
.
query
(
"HPMT002.pmQuality"
,
sqlMap
);
List
<
Map
>
rows
=
this
.
dao
.
query
(
"HPMT002.pmQuality"
,
sqlMap
);
EiInfo
outInfo
=
new
EiInfo
();
resultMap
.
put
(
"result"
,
rows
);
EiBlock
eiBlock
=
new
EiBlock
(
EiConstant
.
resultBlock
);
resultMap
.
put
(
"status"
,
EiConstant
.
STATUS_SUCCESS
);
eiBlock
.
setRows
(
rows
);
resultMap
.
put
(
"message"
,
"SUCCESS"
);
outInfo
.
setBlock
(
eiBlock
);
return
resultMap
;
return
outInfo
;
}
catch
(
Exception
e
)
{
resultMap
.
put
(
"status"
,
500
);
resultMap
.
put
(
"message"
,
LogUtils
.
getMsg
(
e
));
return
resultMap
;
}
}
}
/**
/**
...
@@ -142,15 +171,19 @@ public class ServiceHPMT002 extends ServiceBase {
...
@@ -142,15 +171,19 @@ public class ServiceHPMT002 extends ServiceBase {
* @param inInfo
* @param inInfo
* @return
* @return
*/
*/
public
EiInfo
pmQualityList
(
EiInfo
inInfo
)
{
public
Map
pmQualityList
(
EiInfo
inInfo
)
{
Map
resultMap
=
new
HashMap
();
try
{
String
status
=
inInfo
.
getString
(
"status"
);
String
status
=
inInfo
.
getString
(
"status"
);
String
projName
=
inInfo
.
getString
(
"projName"
);
String
projName
=
inInfo
.
getString
(
"projName"
);
int
offset
=
inInfo
.
getInt
(
"offset"
);
//当前页
int
offset
=
inInfo
.
getInt
(
"offset"
);
//当前页
int
pageSize
=
inInfo
.
getInt
(
"pageSize"
);
//每页条数
int
pageSize
=
inInfo
.
getInt
(
"pageSize"
);
//每页条数
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
inInfo
.
setMsg
(
"账号异常"
);
resultMap
.
put
(
"status"
,
403
);
}
resultMap
.
put
(
"message"
,
"票据过期或请求不合法,请重新登录或获取合法权限!"
);
return
resultMap
;
}
Map
sqlMap
=
new
HashMap
();
Map
sqlMap
=
new
HashMap
();
sqlMap
.
put
(
"companyCode"
,
companyCode
);
sqlMap
.
put
(
"companyCode"
,
companyCode
);
sqlMap
.
put
(
"projName"
,
projName
);
sqlMap
.
put
(
"projName"
,
projName
);
...
@@ -160,12 +193,16 @@ public class ServiceHPMT002 extends ServiceBase {
...
@@ -160,12 +193,16 @@ public class ServiceHPMT002 extends ServiceBase {
sqlMap
.
put
(
"offset"
,
offset
);
sqlMap
.
put
(
"offset"
,
offset
);
sqlMap
.
put
(
"pageSize"
,
pageSize
);
sqlMap
.
put
(
"pageSize"
,
pageSize
);
List
<
Map
>
rows
=
this
.
dao
.
query
(
"HPMT002.pmQualityList"
,
sqlMap
);
List
<
Map
>
rows
=
this
.
dao
.
query
(
"HPMT002.pmQualityList"
,
sqlMap
);
EiInfo
outInfo
=
new
EiInfo
();
resultMap
.
put
(
"result"
,
rows
);
EiBlock
eiBlock
=
new
EiBlock
(
EiConstant
.
resultBlock
);
resultMap
.
put
(
"count"
,
count
.
get
(
0
));
eiBlock
.
setRows
(
rows
);
resultMap
.
put
(
"status"
,
EiConstant
.
STATUS_SUCCESS
);
outInfo
.
setBlock
(
eiBlock
);
resultMap
.
put
(
"message"
,
"SUCCESS"
);
outInfo
.
set
(
"count"
,
count
.
get
(
0
));
return
resultMap
;
return
outInfo
;
}
catch
(
Exception
e
)
{
resultMap
.
put
(
"status"
,
500
);
resultMap
.
put
(
"message"
,
LogUtils
.
getMsg
(
e
));
return
resultMap
;
}
}
}
...
@@ -175,13 +212,22 @@ public class ServiceHPMT002 extends ServiceBase {
...
@@ -175,13 +212,22 @@ public class ServiceHPMT002 extends ServiceBase {
* @param inInfo
* @param inInfo
* @return
* @return
*/
*/
public
EiInfo
pmQualityDetail
(
EiInfo
inInfo
)
{
public
Map
pmQualityDetail
(
EiInfo
inInfo
)
{
EiInfo
outInfo
=
new
EiInfo
();
Map
resultMap
=
new
HashMap
();
try
{
try
{
String
id
=
inInfo
.
getString
(
"id"
);
String
id
=
inInfo
.
getString
(
"id"
);
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
outInfo
.
setMsg
(
"账号异常"
);
resultMap
.
put
(
"status"
,
403
);
resultMap
.
put
(
"message"
,
"票据过期或请求不合法,请重新登录或获取合法权限!"
);
return
resultMap
;
}
String
ROOT_PATH
=
""
;
Map
hashMap
=
new
HashMap
();
hashMap
.
put
(
"fkey"
,
"docRootDir"
);
List
<
Map
>
queryPath
=
DaoBase
.
getInstance
().
query
(
"EDCC03.query"
,
hashMap
);
if
(
queryPath
.
get
(
0
).
get
(
"fvalue"
)!=
null
)
{
ROOT_PATH
=
(
String
)
queryPath
.
get
(
0
).
get
(
"fvalue"
);
}
}
Map
Map
=
new
HashMap
();
Map
Map
=
new
HashMap
();
Map
.
put
(
"checkId"
,
id
);
Map
.
put
(
"checkId"
,
id
);
...
@@ -194,7 +240,7 @@ public class ServiceHPMT002 extends ServiceBase {
...
@@ -194,7 +240,7 @@ public class ServiceHPMT002 extends ServiceBase {
String
docId
=
hpzl001A
.
getDocId
();
String
docId
=
hpzl001A
.
getDocId
();
dirId
.
put
(
"docId"
,
docId
);
dirId
.
put
(
"docId"
,
docId
);
List
<
Map
>
query
=
this
.
dao
.
query
(
"HPMT002.queryFile"
,
dirId
);
List
<
Map
>
query
=
this
.
dao
.
query
(
"HPMT002.queryFile"
,
dirId
);
File
file
=
new
File
(
UploadUtils
.
ROOT_PATH
+
"/A/"
+
query
.
get
(
0
).
get
(
"CHG_NAME"
));
File
file
=
new
File
(
ROOT_PATH
+
"/A/"
+
query
.
get
(
0
).
get
(
"CHG_NAME"
));
BufferedImage
bf
=
ImageIO
.
read
(
file
);
BufferedImage
bf
=
ImageIO
.
read
(
file
);
String
imgBase64
=
UploadUtils
.
imageToBase64
(
bf
);
String
imgBase64
=
UploadUtils
.
imageToBase64
(
bf
);
imgList
.
add
(
imgBase64
);
imgList
.
add
(
imgBase64
);
...
@@ -211,7 +257,7 @@ public class ServiceHPMT002 extends ServiceBase {
...
@@ -211,7 +257,7 @@ public class ServiceHPMT002 extends ServiceBase {
String
docId
=
hpzl001A
.
getDocId
();
String
docId
=
hpzl001A
.
getDocId
();
dirId
.
put
(
"docId"
,
docId
);
dirId
.
put
(
"docId"
,
docId
);
List
<
Map
>
query
=
this
.
dao
.
query
(
"HPMT002.queryFile"
,
dirId
);
List
<
Map
>
query
=
this
.
dao
.
query
(
"HPMT002.queryFile"
,
dirId
);
File
file
=
new
File
(
UploadUtils
.
ROOT_PATH
+
"/A/"
+
query
.
get
(
0
).
get
(
"CHG_NAME"
));
File
file
=
new
File
(
ROOT_PATH
+
"/A/"
+
query
.
get
(
0
).
get
(
"CHG_NAME"
));
BufferedImage
bf
=
ImageIO
.
read
(
file
);
BufferedImage
bf
=
ImageIO
.
read
(
file
);
String
imgBase64
=
UploadUtils
.
imageToBase64
(
bf
);
String
imgBase64
=
UploadUtils
.
imageToBase64
(
bf
);
imgList2
.
add
(
imgBase64
);
imgList2
.
add
(
imgBase64
);
...
@@ -222,13 +268,17 @@ public class ServiceHPMT002 extends ServiceBase {
...
@@ -222,13 +268,17 @@ public class ServiceHPMT002 extends ServiceBase {
List
<
Map
>
rows
=
this
.
dao
.
query
(
"HPMT002.pmQualityDetail"
,
sqlMap
);
List
<
Map
>
rows
=
this
.
dao
.
query
(
"HPMT002.pmQualityDetail"
,
sqlMap
);
EiBlock
eiBlock
=
new
EiBlock
(
EiConstant
.
resultBlock
);
EiBlock
eiBlock
=
new
EiBlock
(
EiConstant
.
resultBlock
);
eiBlock
.
setRows
(
rows
);
eiBlock
.
setRows
(
rows
);
outInfo
.
setBlock
(
eiBlock
);
resultMap
.
put
(
"result"
,
rows
);
outInfo
.
set
(
"img"
,
imgList
);
resultMap
.
put
(
"img"
,
imgList
);
outInfo
.
set
(
"img2"
,
imgList2
);
resultMap
.
put
(
"img2"
,
imgList2
);
}
catch
(
Exception
e
){
resultMap
.
put
(
"status"
,
EiConstant
.
STATUS_SUCCESS
);
outInfo
.
setMsg
(
"账号异常"
);
resultMap
.
put
(
"message"
,
"SUCCESS"
);
return
resultMap
;
}
catch
(
Exception
e
)
{
resultMap
.
put
(
"status"
,
500
);
resultMap
.
put
(
"message"
,
LogUtils
.
getMsg
(
e
));
return
resultMap
;
}
}
return
outInfo
;
}
}
/**
/**
...
@@ -237,16 +287,20 @@ public class ServiceHPMT002 extends ServiceBase {
...
@@ -237,16 +287,20 @@ public class ServiceHPMT002 extends ServiceBase {
* @param inInfo
* @param inInfo
* @return
* @return
*/
*/
public
EiInfo
pmQualityXl
(
EiInfo
inInfo
)
{
public
Map
pmQualityXl
(
EiInfo
inInfo
)
{
Map
resultMap
=
new
HashMap
();
try
{
String
factoryId
=
inInfo
.
getString
(
"factoryId"
);
//工厂id
String
factoryId
=
inInfo
.
getString
(
"factoryId"
);
//工厂id
String
prodCode
=
inInfo
.
getString
(
"projCode"
);
//项目id
String
prodCode
=
inInfo
.
getString
(
"projCode"
);
//项目id
String
orgNo
=
inInfo
.
getString
(
"orgNo"
);
//生产组id
String
orgNo
=
inInfo
.
getString
(
"orgNo"
);
//生产组id
String
inventCode
=
inInfo
.
getString
(
"inventCode"
);
//部件id
String
inventCode
=
inInfo
.
getString
(
"inventCode"
);
//部件id
String
subInventCode
=
inInfo
.
getString
(
"subInventCode"
);
//零件id
String
subInventCode
=
inInfo
.
getString
(
"subInventCode"
);
//零件id
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
inInfo
.
setMsg
(
"账号异常"
);
resultMap
.
put
(
"status"
,
403
);
}
resultMap
.
put
(
"message"
,
"票据过期或请求不合法,请重新登录或获取合法权限!"
);
return
resultMap
;
}
Map
sqlMap
=
new
HashMap
();
Map
sqlMap
=
new
HashMap
();
sqlMap
.
put
(
"companyCode"
,
companyCode
);
sqlMap
.
put
(
"companyCode"
,
companyCode
);
sqlMap
.
put
(
"factoryCode"
,
factoryId
);
sqlMap
.
put
(
"factoryCode"
,
factoryId
);
...
@@ -256,16 +310,30 @@ public class ServiceHPMT002 extends ServiceBase {
...
@@ -256,16 +310,30 @@ public class ServiceHPMT002 extends ServiceBase {
sqlMap
.
put
(
"subInventCode"
,
subInventCode
);
sqlMap
.
put
(
"subInventCode"
,
subInventCode
);
EiInfo
outInfo
=
new
EiInfo
();
EiInfo
outInfo
=
new
EiInfo
();
TEDCM01
tedcm01
=
new
TEDCM01
();
TEDCM01
tedcm01
=
new
TEDCM01
();
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
APP_MAP_BLOCK_FACTORY
),
null
,
false
);
List
<
Map
>
queryFactory
=
this
.
dao
.
query
(
"HPMT002.queryFactory"
,
sqlMap
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
APP_MAP_BLOCK_PROJCODE
),
sqlMap
,
false
);
List
<
Map
>
queryProjCode
=
this
.
dao
.
query
(
"HPMT002.queryProjCode"
,
sqlMap
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
APP_MAP_BLOCK_PRDTCODE
),
sqlMap
,
false
);
List
<
Map
>
queryPrdtCode
=
this
.
dao
.
query
(
"HPMT002.queryPrdtCode"
,
sqlMap
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
APP_MAP_BLOCK_ORG_NO
),
sqlMap
,
false
);
List
<
Map
>
queryOrgNo
=
this
.
dao
.
query
(
"HPMT002.queryOrgNo"
,
sqlMap
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
APP_MAP_BLOCK_PARTCODE
),
sqlMap
,
false
);
List
<
Map
>
queryPartCode
=
this
.
dao
.
query
(
"HPMT002.queryPartCode"
,
sqlMap
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
POOR_TYPE_BLOCK_ID
),
null
,
false
);
List
<
Map
>
queryTedcm01
=
this
.
dao
.
query
(
"HPXSOrg.queryTedcm01"
,
tedcm01
);
if
(
subInventCode
!=
null
&&!
subInventCode
.
equals
(
""
)){
if
(
subInventCode
!=
null
&&!
subInventCode
.
equals
(
""
)){
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
APP_MAP_BLOCK_PRODTASKNO
),
sqlMap
,
false
);
List
<
Map
>
queryProdTaskNo
=
this
.
dao
.
query
(
"HPMT002.queryProdTaskNo"
);
resultMap
.
put
(
"ProdTaskNo"
,
queryProdTaskNo
);
}
}
return
outInfo
;
resultMap
.
put
(
"Factory"
,
queryFactory
);
resultMap
.
put
(
"ProjCode"
,
queryProjCode
);
resultMap
.
put
(
"PrdtCode"
,
queryPrdtCode
);
resultMap
.
put
(
"OrgNo"
,
queryOrgNo
);
resultMap
.
put
(
"PartCode"
,
queryPartCode
);
resultMap
.
put
(
"Tedcm01"
,
queryTedcm01
);
resultMap
.
put
(
"status"
,
EiConstant
.
STATUS_SUCCESS
);
resultMap
.
put
(
"message"
,
"SUCCESS"
);
return
resultMap
;
}
catch
(
Exception
e
)
{
resultMap
.
put
(
"status"
,
500
);
resultMap
.
put
(
"message"
,
LogUtils
.
getMsg
(
e
));
return
resultMap
;
}
}
}
/**
/**
...
@@ -274,56 +342,62 @@ public class ServiceHPMT002 extends ServiceBase {
...
@@ -274,56 +342,62 @@ public class ServiceHPMT002 extends ServiceBase {
* @param inInfo
* @param inInfo
* @return
* @return
*/
*/
public
EiInfo
pmInsertQuality
(
EiInfo
inInfo
)
{
public
Map
pmInsertQuality
(
EiInfo
inInfo
)
{
String
docId
=
inInfo
.
getString
(
"docId"
);
Map
resultMap
=
new
HashMap
();
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
inInfo
.
setMsg
(
"账号异常"
);
}
try
{
try
{
HPZL001
fZl001
=
new
HPZL001
();
String
docId
=
inInfo
.
getString
(
"docId"
);
Map
attr
=
inInfo
.
getAttr
();
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
fZl001
.
fromMap
(
attr
);
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
resultMap
.
put
(
"status"
,
403
);
fZl001
.
setCreatedTime
(
sdf
.
format
(
new
Date
()));
resultMap
.
put
(
"message"
,
"票据过期或请求不合法,请重新登录或获取合法权限!"
);
fZl001
.
setReceiptDate
(
DateUtils
.
shortDate
());
return
resultMap
;
fZl001
.
setCompanyCode
(
companyCode
);
}
User
user
=
UserSessionUtils
.
getUser
();
HPZL001
fZl001
=
new
HPZL001
();
fZl001
.
setCheckUser
(
user
.
getUserName
());
Map
attr
=
inInfo
.
getAttr
();
fZl001
.
setCheckNo
(
user
.
getUserId
());
fZl001
.
fromMap
(
attr
);
// 生成单据号
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
fZl001
.
setCheckNo
(
SequenceGenerator
.
getNextSequence
(
fZl001
.
setCreatedTime
(
sdf
.
format
(
new
Date
()));
HPConstant
.
SequenceId
.
HPZL001_NUMBER
));
fZl001
.
setReceiptDate
(
DateUtils
.
shortDate
());
fZl001
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
fZl001
.
setCompanyCode
(
companyCode
);
fZl001
.
setStatus
(
CommonConstant
.
YesNo
.
NO_0
);
User
user
=
UserSessionUtils
.
getUser
();
DaoUtils
.
insert
(
HPZL001
.
INSERT
,
fZl001
);
fZl001
.
setCheckUser
(
user
.
getUserName
());
//处理文件
fZl001
.
setCheckNo
(
user
.
getUserId
());
if
(!
docId
.
equals
(
""
))
{
// 生成单据号
Map
fZl0012
=
new
HashMap
();
fZl001
.
setCheckNo
(
SequenceGenerator
.
getNextSequence
(
fZl0012
.
put
(
"checkNo"
,
fZl001
.
getCheckNo
());
HPConstant
.
SequenceId
.
HPZL001_NUMBER
));
List
<
HPZL001
>
HPZL001
=
dao
.
query
(
"HPZL001.query"
,
fZl0012
);
fZl001
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
//绑定文件
fZl001
.
setStatus
(
CommonConstant
.
YesNo
.
NO_0
);
String
[]
docIds
=
docId
.
split
(
","
);
DaoUtils
.
insert
(
HPZL001
.
INSERT
,
fZl001
);
int
num
=
0
;
//处理文件
while
(
num
<
docIds
.
length
)
{
if
(!
docId
.
equals
(
""
))
{
HPZL001A
HPZL001A
=
new
HPZL001A
();
Map
fZl0012
=
new
HashMap
();
HPZL001A
.
setDeptCode
(
CommonConstant
.
YesNo
.
YES
);
fZl0012
.
put
(
"checkNo"
,
fZl001
.
getCheckNo
());
HPZL001A
.
setDocType
(
CommonConstant
.
YesNo
.
YES_1
);
List
<
HPZL001
>
HPZL001
=
dao
.
query
(
"HPZL001.query"
,
fZl0012
);
HPZL001A
.
setBizType
(
"XJ_WC"
);
//绑定文件
HPZL001A
.
setDocId
(
docIds
[
num
]);
String
[]
docIds
=
docId
.
split
(
","
);
HPZL001A
.
setCheckId
(
HPZL001
.
get
(
0
).
getId
());
int
num
=
0
;
HPZL001A
.
setCompanyCode
(
companyCode
);
while
(
num
<
docIds
.
length
)
{
DaoUtils
.
insert
(
HPZL001A
.
INSERT
,
HPZL001A
);
HPZL001A
HPZL001A
=
new
HPZL001A
();
num
++;
HPZL001A
.
setDeptCode
(
CommonConstant
.
YesNo
.
YES
);
HPZL001A
.
setDocType
(
CommonConstant
.
YesNo
.
YES_1
);
HPZL001A
.
setBizType
(
"XJ_WC"
);
HPZL001A
.
setDocId
(
docIds
[
num
]);
HPZL001A
.
setCheckId
(
HPZL001
.
get
(
0
).
getId
());
HPZL001A
.
setCompanyCode
(
companyCode
);
DaoUtils
.
insert
(
HPZL001A
.
INSERT
,
HPZL001A
);
num
++;
}
}
resultMap
.
put
(
"status"
,
EiConstant
.
STATUS_SUCCESS
);
resultMap
.
put
(
"message"
,
"SUCCESS"
);
return
resultMap
;
}
catch
(
Exception
e
)
{
resultMap
.
put
(
"status"
,
500
);
resultMap
.
put
(
"message"
,
LogUtils
.
getMsg
(
e
));
return
resultMap
;
}
}
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"新增成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"新增失败"
);
}
return
inInfo
;
}
/**
/**
...
@@ -332,13 +406,16 @@ public class ServiceHPMT002 extends ServiceBase {
...
@@ -332,13 +406,16 @@ public class ServiceHPMT002 extends ServiceBase {
* @param inInfo
* @param inInfo
* @return
* @return
*/
*/
public
EiInfo
pmModifyQuality
(
EiInfo
inInfo
)
{
public
Map
pmModifyQuality
(
EiInfo
inInfo
)
{
Map
resultMap
=
new
HashMap
();
try
{
String
docId
=
inInfo
.
getString
(
"docId"
);
String
docId
=
inInfo
.
getString
(
"docId"
);
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
inInfo
.
setMsg
(
"账号异常"
);
resultMap
.
put
(
"status"
,
403
);
}
resultMap
.
put
(
"message"
,
"票据过期或请求不合法,请重新登录或获取合法权限!"
);
try
{
return
resultMap
;
}
HPZL001
fZl001
=
new
HPZL001
();
HPZL001
fZl001
=
new
HPZL001
();
Map
attr
=
inInfo
.
getAttr
();
Map
attr
=
inInfo
.
getAttr
();
fZl001
.
fromMap
(
attr
);
fZl001
.
fromMap
(
attr
);
...
@@ -366,11 +443,14 @@ public class ServiceHPMT002 extends ServiceBase {
...
@@ -366,11 +443,14 @@ public class ServiceHPMT002 extends ServiceBase {
num
++;
num
++;
}
}
}
}
inInfo
.
setMsg
(
"处理成功!"
);
resultMap
.
put
(
"status"
,
EiConstant
.
STATUS_SUCCESS
);
resultMap
.
put
(
"message"
,
"SUCCESS"
);
return
resultMap
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"处理失败"
);
resultMap
.
put
(
"status"
,
500
);
resultMap
.
put
(
"message"
,
LogUtils
.
getMsg
(
e
));
return
resultMap
;
}
}
return
inInfo
;
}
}
...
@@ -380,23 +460,28 @@ public class ServiceHPMT002 extends ServiceBase {
...
@@ -380,23 +460,28 @@ public class ServiceHPMT002 extends ServiceBase {
* @param inInfo
* @param inInfo
* @return
* @return
*/
*/
public
EiInfo
pmUploadFile
(
EiInfo
inInfo
)
{
public
Map
pmUploadFile
(
EiInfo
inInfo
)
{
Map
resultMap
=
new
HashMap
();
try
{
String
files
=
inInfo
.
getString
(
"files"
);
String
files
=
inInfo
.
getString
(
"files"
);
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
inInfo
.
setMsg
(
"账号异常"
);
resultMap
.
put
(
"status"
,
403
);
}
resultMap
.
put
(
"message"
,
"票据过期或请求不合法,请重新登录或获取合法权限!"
);
try
{
return
resultMap
;
}
CommonsMultipartFile
multipartFile
=
Base64ToMultipartFile
.
base64toMultipartFile
(
files
);
CommonsMultipartFile
multipartFile
=
Base64ToMultipartFile
.
base64toMultipartFile
(
files
);
System
.
out
.
println
(
"--------------------------------转换Base64成功"
);
JSONObject
upload
=
UploadUtils
.
upload
(
multipartFile
);
JSONObject
upload
=
UploadUtils
.
upload
(
multipartFile
);
inInfo
.
set
(
"id"
,
upload
.
getString
(
"docId"
));
resultMap
.
put
(
"id"
,
upload
.
getString
(
"docId"
));
inInfo
.
setMsg
(
"上传成功!"
);
resultMap
.
put
(
"status"
,
EiConstant
.
STATUS_SUCCESS
);
}
resultMap
.
put
(
"message"
,
"SUCCESS"
);
catch
(
Exception
e
)
{
return
resultMap
;
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"上传失败"
);
}
catch
(
Exception
e
)
{
resultMap
.
put
(
"status"
,
500
);
resultMap
.
put
(
"message"
,
LogUtils
.
getMsg
(
e
));
return
resultMap
;
}
}
return
inInfo
;
}
}
}
}
src/main/java/com/baosight/hpjx/hp/mt/sql/HPMT002.xml
View file @
45ba1827
...
@@ -312,7 +312,7 @@
...
@@ -312,7 +312,7 @@
<select
id=
"queryFvalue"
resultClass=
"java.util.HashMap"
>
<select
id=
"queryFvalue"
resultClass=
"java.util.HashMap"
>
SELECT FVALUE AS "fvalue" FROM iplat.TEDCC03 WHERE FKEY='docRootDir'
SELECT
DISTINCT
FVALUE AS "fvalue" FROM iplat.TEDCC03 WHERE FKEY='docRootDir'
</select>
</select>
...
...
src/main/java/com/baosight/hpjx/hp/mt/untils/UploadUtils.java
View file @
45ba1827
package
com
.
baosight
.
hpjx
.
hp
.
mt
.
untils
;
package
com
.
baosight
.
hpjx
.
hp
.
mt
.
untils
;
import
com.baosight.hpjx.core.dao.DaoBase
;
import
com.baosight.iplat4j.core.data.ibatis.dao.Dao
;
import
com.baosight.iplat4j.core.data.ibatis.dao.Dao
;
import
com.baosight.iplat4j.core.data.id.UUIDHexIdGenerator
;
import
com.baosight.iplat4j.core.data.id.UUIDHexIdGenerator
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.exception.PlatException
;
...
@@ -44,10 +45,12 @@ public class UploadUtils {
...
@@ -44,10 +45,12 @@ public class UploadUtils {
filePath
=
multipartFile
.
getOriginalFilename
();
filePath
=
multipartFile
.
getOriginalFilename
();
Long
docSize
=
multipartFile
.
getSize
();
Long
docSize
=
multipartFile
.
getSize
();
String
chgName
=
transformFileName
(
filePath
);
String
chgName
=
transformFileName
(
filePath
);
System
.
out
.
println
(
"----------------------------------解析Path"
);
String
attachmentName
;
String
attachmentName
;
Map
<
String
,
String
>
pathMap
=
getRealPath
(
"A"
);
Map
<
String
,
String
>
pathMap
=
getRealPath
(
"A"
);
msg
=
(
String
)
pathMap
.
get
(
"dirId"
);
msg
=
(
String
)
pathMap
.
get
(
"dirId"
);
category
=
(
String
)
pathMap
.
get
(
"path"
);
category
=
(
String
)
pathMap
.
get
(
"path"
);
System
.
out
.
println
(
"----------------------------------获取dirId成功"
);
checkInvalidPath
(
category
);
checkInvalidPath
(
category
);
File
dir
=
new
File
(
category
);
File
dir
=
new
File
(
category
);
if
(!
dir
.
exists
())
{
if
(!
dir
.
exists
())
{
...
@@ -116,7 +119,10 @@ public class UploadUtils {
...
@@ -116,7 +119,10 @@ public class UploadUtils {
public
static
Map
<
String
,
String
>
getRealPath
(
String
path
)
{
public
static
Map
<
String
,
String
>
getRealPath
(
String
path
)
{
String
postPath
=
preparePath
(
path
);
String
postPath
=
preparePath
(
path
);
String
dirId
=
initPath
(
postPath
);
String
dirId
=
initPath
(
postPath
);
List
<
Map
>
query
=
dao
.
query
(
"HPMT002.queryFvalue"
);
Map
hashMap
=
new
HashMap
();
hashMap
.
put
(
"fkey"
,
"docRootDir"
);
List
<
Map
>
query
=
DaoBase
.
getInstance
().
query
(
"EDCC03.query"
,
hashMap
);
System
.
out
.
println
(
"----------------------------------获取path地址"
);
if
(
query
.
get
(
0
).
get
(
"fvalue"
)!=
null
)
{
if
(
query
.
get
(
0
).
get
(
"fvalue"
)!=
null
)
{
ROOT_PATH
=
(
String
)
query
.
get
(
0
).
get
(
"fvalue"
);
ROOT_PATH
=
(
String
)
query
.
get
(
0
).
get
(
"fvalue"
);
}
}
...
...
src/main/java/com/baosight/hpjx/hp/mt/untils/UploadUtils2.java
View file @
45ba1827
package
com
.
baosight
.
hpjx
.
hp
.
mt
.
untils
;
package
com
.
baosight
.
hpjx
.
hp
.
mt
.
untils
;
import
com.baosight.hpjx.core.dao.DaoBase
;
import
com.baosight.iplat4j.core.data.ibatis.dao.Dao
;
import
com.baosight.iplat4j.core.data.ibatis.dao.Dao
;
import
com.baosight.iplat4j.core.data.id.UUIDHexIdGenerator
;
import
com.baosight.iplat4j.core.data.id.UUIDHexIdGenerator
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.exception.PlatException
;
...
@@ -13,47 +14,44 @@ import com.baosight.iplat4j.eu.dm.util.FileProcessUtils;
...
@@ -13,47 +14,44 @@ import com.baosight.iplat4j.eu.dm.util.FileProcessUtils;
import
com.baosight.iplat4j.eu.dm.util.IFileUploader
;
import
com.baosight.iplat4j.eu.dm.util.IFileUploader
;
import
net.sf.json.JSONObject
;
import
net.sf.json.JSONObject
;
import
org.apache.commons.codec.binary.Base64
;
import
org.apache.commons.codec.binary.Base64
;
import
org.springframework.web.multipart.MultipartHttpServletRequest
;
import
org.springframework.web.multipart.commons.CommonsMultipartFile
;
import
org.springframework.web.multipart.commons.CommonsMultipartFile
;
import
org.springframework.web.multipart.commons.CommonsMultipartResolver
;
import
javax.imageio.ImageIO
;
import
javax.imageio.ImageIO
;
import
javax.servlet.http.HttpServletRequest
;
import
java.awt.image.BufferedImage
;
import
java.awt.image.BufferedImage
;
import
java.io.ByteArrayOutputStream
;
import
java.io.ByteArrayOutputStream
;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.Date
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
public
class
UploadUtils2
{
public
class
UploadUtils2
{
private
static
Dao
dao
=
(
Dao
)
PlatApplicationContext
.
getApplicationContext
().
getBean
(
"dao"
);
private
static
Dao
dao
=
(
Dao
)
PlatApplicationContext
.
getApplicationContext
().
getBean
(
"dao"
);
public
static
JSONObject
upload
(
CommonsMultipartFile
multipartFile
)
throws
Exception
{
public
static
JSONObject
upload
(
CommonsMultipartFile
multipartFile
)
throws
Exception
{
JSONObject
documentJSON
=
new
JSONObject
();
JSONObject
documentJSON
=
new
JSONObject
();
String
docName
=
multipartFile
.
getOriginalFilename
();
String
docName
=
multipartFile
.
getOriginalFilename
();
Long
docSize
=
multipartFile
.
getSize
();
Long
docSize
=
multipartFile
.
getSize
();
HashMap
<
String
,
String
>
inMap
=
new
HashMap
();
HashMap
<
String
,
String
>
inMap
=
new
HashMap
();
inMap
.
put
(
"groupId"
,
"hk_file11"
);
Map
<
String
,
String
>
returnMap
=
null
;
inMap
.
put
(
"configPathDefine"
,
"A"
);
Map
<
String
,
String
>
returnMap
=
PlatFileUploadUtils
.
uploadFile
(
multipartFile
,
inMap
);
returnMap
=
PlatFileUploadUtils
.
uploadFile
(
multipartFile
,
inMap
);
String
docId
=
(
String
)
returnMap
.
get
(
"docId"
);
String
docId
=
(
String
)
returnMap
.
get
(
"docId"
);
String
docUrl
=
(
String
)
returnMap
.
get
(
"docUrl"
);
String
docUrl
=
(
String
)
returnMap
.
get
(
"docUrl"
);
docId
=
docId
==
null
?
""
:
docId
;
docId
=
docId
==
null
?
""
:
docId
;
documentJSON
.
put
(
"docId"
,
docId
);
documentJSON
.
put
(
"docId"
,
docId
);
if
(
StringUtils
.
isNotEmpty
(
docUrl
))
{
if
(
StringUtils
.
isNotEmpty
(
docUrl
))
{
documentJSON
.
put
(
"docUrl"
,
docUrl
);
documentJSON
.
put
(
"docUrl"
,
docUrl
);
}
else
{
}
else
{
documentJSON
.
remove
(
"docUrl"
);
documentJSON
.
remove
(
"docUrl"
);
}
}
documentJSON
.
put
(
"groupId"
,
returnMap
.
get
(
"groupId"
)
==
null
?
""
:
returnMap
.
get
(
"groupId"
));
documentJSON
.
put
(
"docName"
,
docName
);
documentJSON
.
put
(
"groupId"
,
returnMap
.
get
(
"groupId"
)
==
null
?
""
:
returnMap
.
get
(
"groupId"
));
documentJSON
.
put
(
"docSize"
,
docSize
);
documentJSON
.
put
(
"docName"
,
docName
);
documentJSON
.
put
(
"docType"
,
docName
.
substring
(
docName
.
lastIndexOf
(
46
)));
documentJSON
.
put
(
"docSize"
,
docSize
);
documentJSON
.
put
(
"docType"
,
docName
.
substring
(
docName
.
lastIndexOf
(
46
)));
return
documentJSON
;
return
documentJSON
;
}
}
}
}
src/main/java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ015.java
View file @
45ba1827
...
@@ -96,7 +96,7 @@ public class ServiceHPPZ015 extends ServiceBase {
...
@@ -96,7 +96,7 @@ public class ServiceHPPZ015 extends ServiceBase {
HPPZ015
.
setProjCode
(
hpsc001
.
getProjCode
());
HPPZ015
.
setProjCode
(
hpsc001
.
getProjCode
());
HPPZ015
.
setTemplateName
(
inInfo
.
getString
(
"templateName"
));
HPPZ015
.
setTemplateName
(
inInfo
.
getString
(
"templateName"
));
HPPZ015
.
setCreatedBy
(
UserSession
.
getUserId
());
HPPZ015
.
setCreatedBy
(
UserSession
.
getUserId
());
HPPZ015
.
setCompanyCode
(
UserSession
.
getUserId
());
HPPZ015
.
setCompanyCode
(
UserSession
Utils
.
getCompanyCode
());
HPPZ015
.
setCreatedName
(
UserSession
.
getUserId
()+
"-"
+
UserSession
.
getLoginCName
());
HPPZ015
.
setCreatedName
(
UserSession
.
getUserId
()+
"-"
+
UserSession
.
getLoginCName
());
HPPZ015
.
setCreatedTime
(
sdf
.
format
(
new
Date
()));
HPPZ015
.
setCreatedTime
(
sdf
.
format
(
new
Date
()));
HPPZ015
.
setUpdatedBy
(
null
);
HPPZ015
.
setUpdatedBy
(
null
);
...
...
src/main/java/com/baosight/hpjx/hp/xs/sql/HPXSOrg.xml
View file @
45ba1827
...
@@ -176,7 +176,7 @@
...
@@ -176,7 +176,7 @@
</select>
</select>
<!-- 查询组织信息 -->
<!-- 查询组织信息 -->
<select
id=
"queryTedcm01"
resultClass=
"
com.baosight.iplat4j.common.ed.domain.TEDCM01
"
>
<select
id=
"queryTedcm01"
resultClass=
"
java.util.HashMap
"
>
SELECT
SELECT
ITEM_CODE AS "itemCode",
ITEM_CODE AS "itemCode",
ITEM_CNAME AS "itemCname"
ITEM_CNAME AS "itemCname"
...
...
src/main/webapp/HP/SC/HPSC006.js
View file @
45ba1827
...
@@ -381,26 +381,8 @@ function checkIn(id) {
...
@@ -381,26 +381,8 @@ function checkIn(id) {
callbackName
:
checkInCallback
callbackName
:
checkInCallback
});
});
}
}
checkInCallback
=
function
()
{
checkInCallback
=
function
(
e
)
{
var
block
=
detailGrid
.
getEiBlock
();
detailGrid
.
setEiInfo
(
e
);
var
result
=
resultGrid
.
getCheckedRows
()
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
if
(
block
!=
null
)
{
block
.
setRows
([]);
detailGrid
.
setEiBlock
(
block
);
}
var
info
=
new
EiInfo
()
var
productionOrderNo
=
result
[
0
][
'prodOrderNo'
];
info
.
set
(
"productionOrderNo"
,
productionOrderNo
);
EiCommunicator
.
send
(
"HPSC006"
,
"queryDetail"
,
info
,{
onSuccess
:
function
(
ei
){
//返回结果集
detailGrid
.
setEiInfo
(
ei
);
},
onFail
:
function
(
ei
){}
},{
async
:
false
});
}
}
let
selectStock
=
function
(
id
)
{
let
selectStock
=
function
(
id
)
{
JSColorbox
.
open
({
JSColorbox
.
open
({
...
...
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