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
8d26570c
Commit
8d26570c
authored
Mar 25, 2024
by
liulei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
APP文件上传
parent
252f053c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
58 deletions
+3
-58
ServiceHPMT001.java
.../java/com/baosight/hpjx/hp/mt/service/ServiceHPMT001.java
+0
-10
ServiceHPMT002.java
.../java/com/baosight/hpjx/hp/mt/service/ServiceHPMT002.java
+3
-48
No files found.
src/main/java/com/baosight/hpjx/hp/mt/service/ServiceHPMT001.java
View file @
8d26570c
...
...
@@ -49,11 +49,6 @@ public class ServiceHPMT001 extends ServiceBase {
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
);
...
...
@@ -156,11 +151,6 @@ public class ServiceHPMT001 extends ServiceBase {
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
);
...
...
src/main/java/com/baosight/hpjx/hp/mt/service/ServiceHPMT002.java
View file @
8d26570c
...
...
@@ -13,6 +13,7 @@ import com.baosight.hpjx.hp.constant.HPSqlConstant;
import
com.baosight.hpjx.hp.mt.untils.Base64ToMultipartFile
;
import
com.baosight.hpjx.hp.mt.untils.Base64Utils
;
import
com.baosight.hpjx.hp.mt.untils.UploadUtils
;
import
com.baosight.hpjx.hp.mt.untils.UploadUtils2
;
import
com.baosight.hpjx.hp.sc.domain.HPSC002A
;
import
com.baosight.hpjx.hp.sc.domain.HPSC005
;
import
com.baosight.hpjx.hp.xs.domain.User
;
...
...
@@ -72,11 +73,6 @@ public class ServiceHPMT002 extends ServiceBase {
int
offset
=
inInfo
.
getInt
(
"offset"
);
//当前页
int
pageSize
=
inInfo
.
getInt
(
"pageSize"
);
//每页条数
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
resultMap
.
put
(
"status"
,
403
);
resultMap
.
put
(
"message"
,
"票据过期或请求不合法,请重新登录或获取合法权限!"
);
return
resultMap
;
}
Map
sqlMap
=
new
HashMap
();
sqlMap
.
put
(
"companyCode"
,
companyCode
);
sqlMap
.
put
(
"projName"
,
projName
);
...
...
@@ -114,11 +110,6 @@ public class ServiceHPMT002 extends ServiceBase {
try
{
String
projName
=
inInfo
.
getString
(
"projName"
);
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
resultMap
.
put
(
"status"
,
403
);
resultMap
.
put
(
"message"
,
"票据过期或请求不合法,请重新登录或获取合法权限!"
);
return
resultMap
;
}
Map
sqlMap
=
new
HashMap
();
sqlMap
.
put
(
"companyCode"
,
companyCode
);
sqlMap
.
put
(
"projName"
,
projName
);
...
...
@@ -145,11 +136,6 @@ public class ServiceHPMT002 extends ServiceBase {
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
(
"companyCode"
,
companyCode
);
sqlMap
.
put
(
"queryMonth"
,
queryMonth
);
...
...
@@ -179,11 +165,6 @@ public class ServiceHPMT002 extends ServiceBase {
int
offset
=
inInfo
.
getInt
(
"offset"
);
//当前页
int
pageSize
=
inInfo
.
getInt
(
"pageSize"
);
//每页条数
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
resultMap
.
put
(
"status"
,
403
);
resultMap
.
put
(
"message"
,
"票据过期或请求不合法,请重新登录或获取合法权限!"
);
return
resultMap
;
}
Map
sqlMap
=
new
HashMap
();
sqlMap
.
put
(
"companyCode"
,
companyCode
);
sqlMap
.
put
(
"projName"
,
projName
);
...
...
@@ -217,11 +198,6 @@ public class ServiceHPMT002 extends ServiceBase {
try
{
String
id
=
inInfo
.
getString
(
"id"
);
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
resultMap
.
put
(
"status"
,
403
);
resultMap
.
put
(
"message"
,
"票据过期或请求不合法,请重新登录或获取合法权限!"
);
return
resultMap
;
}
String
ROOT_PATH
=
""
;
Map
hashMap
=
new
HashMap
();
hashMap
.
put
(
"fkey"
,
"docRootDir"
);
...
...
@@ -296,11 +272,6 @@ public class ServiceHPMT002 extends ServiceBase {
String
inventCode
=
inInfo
.
getString
(
"inventCode"
);
//部件id
String
subInventCode
=
inInfo
.
getString
(
"subInventCode"
);
//零件id
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
resultMap
.
put
(
"status"
,
403
);
resultMap
.
put
(
"message"
,
"票据过期或请求不合法,请重新登录或获取合法权限!"
);
return
resultMap
;
}
Map
sqlMap
=
new
HashMap
();
sqlMap
.
put
(
"companyCode"
,
companyCode
);
sqlMap
.
put
(
"factoryCode"
,
factoryId
);
...
...
@@ -317,7 +288,7 @@ public class ServiceHPMT002 extends ServiceBase {
List
<
Map
>
queryPartCode
=
this
.
dao
.
query
(
"HPMT002.queryPartCode"
,
sqlMap
);
List
<
Map
>
queryTedcm01
=
this
.
dao
.
query
(
"HPXSOrg.queryTedcm01"
,
tedcm01
);
if
(
subInventCode
!=
null
&&!
subInventCode
.
equals
(
""
)){
List
<
Map
>
queryProdTaskNo
=
this
.
dao
.
query
(
"HPMT002.queryProdTaskNo"
);
List
<
Map
>
queryProdTaskNo
=
this
.
dao
.
query
(
"HPMT002.queryProdTaskNo"
,
sqlMap
);
resultMap
.
put
(
"ProdTaskNo"
,
queryProdTaskNo
);
}
resultMap
.
put
(
"Factory"
,
queryFactory
);
...
...
@@ -347,11 +318,6 @@ public class ServiceHPMT002 extends ServiceBase {
try
{
String
docId
=
inInfo
.
getString
(
"docId"
);
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
resultMap
.
put
(
"status"
,
403
);
resultMap
.
put
(
"message"
,
"票据过期或请求不合法,请重新登录或获取合法权限!"
);
return
resultMap
;
}
HPZL001
fZl001
=
new
HPZL001
();
Map
attr
=
inInfo
.
getAttr
();
fZl001
.
fromMap
(
attr
);
...
...
@@ -411,11 +377,6 @@ public class ServiceHPMT002 extends ServiceBase {
try
{
String
docId
=
inInfo
.
getString
(
"docId"
);
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
resultMap
.
put
(
"status"
,
403
);
resultMap
.
put
(
"message"
,
"票据过期或请求不合法,请重新登录或获取合法权限!"
);
return
resultMap
;
}
HPZL001
fZl001
=
new
HPZL001
();
Map
attr
=
inInfo
.
getAttr
();
fZl001
.
fromMap
(
attr
);
...
...
@@ -464,15 +425,9 @@ public class ServiceHPMT002 extends ServiceBase {
Map
resultMap
=
new
HashMap
();
try
{
String
files
=
inInfo
.
getString
(
"files"
);
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
resultMap
.
put
(
"status"
,
403
);
resultMap
.
put
(
"message"
,
"票据过期或请求不合法,请重新登录或获取合法权限!"
);
return
resultMap
;
}
CommonsMultipartFile
multipartFile
=
Base64ToMultipartFile
.
base64toMultipartFile
(
files
);
System
.
out
.
println
(
"--------------------------------转换Base64成功"
);
JSONObject
upload
=
UploadUtils
.
upload
(
multipartFile
);
JSONObject
upload
=
UploadUtils
2
.
upload
(
multipartFile
);
resultMap
.
put
(
"id"
,
upload
.
getString
(
"docId"
));
resultMap
.
put
(
"status"
,
EiConstant
.
STATUS_SUCCESS
);
resultMap
.
put
(
"message"
,
"SUCCESS"
);
...
...
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