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
310b4315
Commit
310b4315
authored
Mar 07, 2024
by
liulei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移动端接口优化
parent
d1cf7081
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
36 deletions
+57
-36
HPSqlConstant.java
...ain/java/com/baosight/hpjx/hp/constant/HPSqlConstant.java
+6
-1
ServiceHPMT002.java
.../java/com/baosight/hpjx/hp/mt/service/ServiceHPMT002.java
+40
-35
HPZL001.xml
src/main/java/com/baosight/hpjx/hp/zl/sql/HPZL001.xml
+11
-0
No files found.
src/main/java/com/baosight/hpjx/hp/constant/HPSqlConstant.java
View file @
310b4315
...
...
@@ -340,6 +340,11 @@ public class HPSqlConstant {
// 已处理
public
static
final
String
DO_PROCESS
=
"HPZL001.doProcess"
;
// 已处理
public
static
final
String
DO_PROCESS2
=
"HPZL001.doProcess2"
;
}
}
src/main/java/com/baosight/hpjx/hp/mt/service/ServiceHPMT002.java
View file @
310b4315
...
...
@@ -14,10 +14,7 @@ import com.baosight.hpjx.hp.pz.domain.HPPZ011;
import
com.baosight.hpjx.hp.sc.domain.HPSC002A
;
import
com.baosight.hpjx.hp.sc.domain.HPSC005
;
import
com.baosight.hpjx.hp.zl.domain.HPZL001
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.EiInfoUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.StringUtil
;
import
com.baosight.hpjx.util.*
;
import
com.baosight.iplat4j.config.AdminFactoryConfig
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
...
@@ -27,6 +24,7 @@ import com.baosight.iplat4j.ed.util.SequenceGenerator;
import
org.apache.commons.collections.MapUtils
;
import
org.springframework.web.multipart.commons.CommonsMultipartFile
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
/**
...
...
@@ -153,10 +151,12 @@ public class ServiceHPMT002 extends ServiceBase {
if
(
StrUtil
.
isEmpty
(
companyCode
))
{
inInfo
.
setMsg
(
"账号异常"
);
}
Map
sqlMap
=
new
HashMap
();
sqlMap
.
put
(
"companyCode"
,
companyCode
);
EiInfo
outInfo
=
new
EiInfo
();
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
ORG_PROD_BLOCK_ID
),
null
,
false
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROJ_RECORD_BLOCK_ID
),
null
,
false
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_RECORD_BLOCK_ID
),
null
,
false
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
ORG_PROD_BLOCK_ID
),
sqlMap
,
false
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROJ_RECORD_BLOCK_ID
),
sqlMap
,
false
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_RECORD_BLOCK_ID
),
sqlMap
,
false
);
return
outInfo
;
}
...
...
@@ -180,28 +180,31 @@ public class ServiceHPMT002 extends ServiceBase {
sqlMap
.
put
(
"companyCode"
,
companyCode
);
sqlMap
.
put
(
"projCode"
,
projCode
);
sqlMap
.
put
(
"prodOrderNo"
,
prodOrderNo
);
HPSC005
HPSC005
=(
HPSC005
)
dao
.
query
(
"HPSC005.query"
,
sqlMap
);
List
<
HPSC005
>
HPSC005
=
dao
.
query
(
"HPSC005.query"
,
sqlMap
);
HPZL001
fZl001
=
new
HPZL001
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
fZl001
.
fromMap
(
queryMap
);
fZl001
.
setProjName
(
HPSC005
.
getProjName
());
fZl001
.
setOrgName
(
HPSC005
.
getOrgName
());
fZl001
.
setInventName
(
HPSC005
.
getPrdtName
());
fZl001
.
setSubInventName
(
HPSC005
.
getPartName
());
// 去除日期字符串中的-
fZl001
.
setReceiptDate
(
StringUtil
.
removeHorizontalLine
(
fZl001
.
getReceiptDate
()
));
fZl001
.
setProjName
(
HPSC005
.
get
(
0
).
get
ProjName
());
fZl001
.
setOrgName
(
HPSC005
.
get
(
0
).
get
OrgName
());
fZl001
.
setInventName
(
HPSC005
.
get
(
0
).
get
PrdtName
());
fZl001
.
setSubInventName
(
HPSC005
.
get
(
0
).
get
PartName
());
fZl001
.
setCreatedTime
(
sdf
.
format
(
new
Date
()));
fZl001
.
setReceiptDate
(
DateUtils
.
shortDate
(
));
// 生成单据号
fZl001
.
setCheckNo
(
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
HPZL001_NUMBER
));
fZl001
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
fZl001
.
setStatus
(
CommonConstant
.
YesNo
.
NO_0
);
DaoUtils
.
insert
(
HPZL001
.
INSERT
,
fZl001
);
//处理文件
Map
fZl0012
=
new
HashMap
();
fZl0012
.
put
(
"checkNo"
,
fZl001
.
getCheckNo
());
HPZL001
HPZL001
=(
HPZL001
)
dao
.
query
(
"HPZL001.query"
,
fZl0012
);
//绑定文件
if
(!
fZl001
.
getCheckNo
().
equals
(
" "
))
{
Map
fZl0012
=
new
HashMap
();
fZl0012
.
put
(
"checkNo"
,
fZl001
.
getCheckNo
());
HPZL001
HPZL001
=
(
HPZL001
)
dao
.
query
(
"HPZL001.query"
,
fZl0012
);
//绑定文件
String
[]
docIds
=
docId
.
split
(
","
);
int
num
=
0
;
while
(
num
<=
docIds
.
length
)
{
int
num
=
0
;
while
(
num
<=
docIds
.
length
)
{
HPSC002A
HPSC002A
=
new
HPSC002A
();
HPSC002A
.
setBizType
(
CommonConstant
.
YesNo
.
NO_0
.
toString
());
HPSC002A
.
setDocId
(
docIds
[
num
]);
...
...
@@ -210,6 +213,7 @@ public class ServiceHPMT002 extends ServiceBase {
DaoUtils
.
insert
(
HPSC002A
.
INSERT
,
HPSC002A
);
num
++;
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"新增成功!"
);
}
catch
(
Exception
e
)
{
...
...
@@ -237,24 +241,25 @@ public class ServiceHPMT002 extends ServiceBase {
fZl001
.
fromMap
(
queryMap
);
// 去除日期字符串中的-
fZl001
.
setReceiptDate
(
StringUtil
.
removeHorizontalLine
(
fZl001
.
getReceiptDate
()));
fZl001
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
DaoUtils
.
update
(
HPSqlConstant
.
HPZL001
.
DO_PROCESS
,
fZl001
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
fZl001
.
setStatus
(
CommonConstant
.
YesNo
.
YES_1
);
DaoUtils
.
update
(
HPSqlConstant
.
HPZL001
.
DO_PROCESS2
,
fZl001
);
//绑定文件
String
[]
docIds
=
docId
.
split
(
","
);
int
num
=
0
;
while
(
num
<=
docIds
.
length
){
HPSC002A
HPSC002A
=
new
HPSC002A
();
HPSC002A
.
setBizType
(
CommonConstant
.
YesNo
.
NO_0
.
toString
());
HPSC002A
.
setDocId
(
docIds
[
num
]);
HPSC002A
.
setMatId
(
fZl001
.
getId
());
HPSC002A
.
setCompanyCode
(
companyCode
);
DaoUtils
.
insert
(
HPSC002A
.
INSERT
,
HPSC002A
);
num
++;
if
(!
docId
.
equals
(
" "
))
{
String
[]
docIds
=
docId
.
split
(
","
);
int
num
=
0
;
while
(
num
<=
docIds
.
length
)
{
HPSC002A
HPSC002A
=
new
HPSC002A
();
HPSC002A
.
setBizType
(
CommonConstant
.
YesNo
.
NO_0
.
toString
());
HPSC002A
.
setDocId
(
docIds
[
num
]);
HPSC002A
.
setMatId
(
fZl001
.
getId
());
HPSC002A
.
setCompanyCode
(
companyCode
);
DaoUtils
.
insert
(
HPSC002A
.
INSERT
,
HPSC002A
);
num
++;
}
}
inInfo
.
setMsg
(
"
新增
成功!"
);
inInfo
.
setMsg
(
"
处理
成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"
新增
失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"
处理
失败"
);
}
return
inInfo
;
}
...
...
src/main/java/com/baosight/hpjx/hp/zl/sql/HPZL001.xml
View file @
310b4315
...
...
@@ -188,6 +188,17 @@
WHERE ID = #id#
</update>
<!-- 移动端已处理 -->
<update
id=
"doProcess2"
>
UPDATE hpjx.t_hpzl001
SET
STATUS = #status#,
CHECK_USER = #checkUser#,
<!-- 检查人 -->
CHECK_USER_NAME = #checkUserName#,
<!-- 检查人名称 -->
<include
refid=
"updateRevise"
/>
WHERE CHECK_NO = #checkNo#
</update>
<!-- 更新附件信息 -->
<update
id=
"updateAffix"
>
UPDATE hpjx.t_hpzl001
...
...
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