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
46077ddc
Commit
46077ddc
authored
Aug 14, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料数据库新增、修改增加类型大类
parent
283c28b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
ServiceHGPZ005.java
.../java/com/baosight/hggp/hg/pz/service/ServiceHGPZ005.java
+4
-0
HGPZTools.java
src/main/java/com/baosight/hggp/hg/pz/tools/HGPZTools.java
+6
-6
No files found.
src/main/java/com/baosight/hggp/hg/pz/service/ServiceHGPZ005.java
View file @
46077ddc
...
...
@@ -146,6 +146,8 @@ public class ServiceHGPZ005 extends ServiceBase {
params
.
put
(
HGPZ005
.
FIELD_INVENT_CODE
,
hgpz005
.
getInventCode
());
List
list
=
DaoBase
.
getInstance
().
query
(
HGPZ005
.
QUERY
,
params
);
AssertUtils
.
isNotEmpty
(
list
,
String
.
format
(
"存货编码[%s]已存在"
,
hgpz005
.
getInventCode
()));
HGPZ004
hgpz004
=
HGPZTools
.
hgpz004
.
getByCode
(
hgpz005
.
getInventType
());
hgpz005
.
setInventTypeDetail
(
Integer
.
valueOf
(
hgpz004
.
getInventTypeDetail
()));
DaoUtils
.
insert
(
HGPZ005
.
INSERT
,
hgpz005
);
}
...
...
@@ -155,6 +157,8 @@ public class ServiceHGPZ005 extends ServiceBase {
* @param hgpz005
*/
private
void
modify
(
HGPZ005
hgpz005
)
{
HGPZ004
hgpz004
=
HGPZTools
.
hgpz004
.
getByCode
(
hgpz005
.
getInventType
());
hgpz005
.
setInventTypeDetail
(
Integer
.
valueOf
(
hgpz004
.
getInventTypeDetail
()));
DaoUtils
.
update
(
HGPZ005
.
UPDATE
,
hgpz005
);
}
...
...
src/main/java/com/baosight/hggp/hg/pz/tools/HGPZTools.java
View file @
46077ddc
...
...
@@ -89,20 +89,20 @@ public class HGPZTools {
public
static
class
hgpz004
{
/**
* 查询存货
* 查询存货
类型
*
* @param invent
Cod
e
* @param invent
Typ
e
* @return
*/
public
static
HGPZ004
getByCode
(
String
invent
Cod
e
)
{
AssertUtils
.
isEmpty
(
invent
Code
,
"存货
编码不能为空"
);
public
static
HGPZ004
getByCode
(
String
invent
Typ
e
)
{
AssertUtils
.
isEmpty
(
invent
Type
,
"存货类型
编码不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"invent
Code"
,
inventCod
e
);
queryMap
.
put
(
"invent
Type"
,
inventTyp
e
);
List
<
HGPZ004
>
pz004s
=
DaoBase
.
getInstance
().
query
(
HGPZ004
.
QUERY
,
queryMap
);
if
(
pz004s
!=
null
&&
pz004s
.
size
()==
0
){
pz004s
=
null
;
}
AssertUtils
.
isEmpty
(
pz004s
,
String
.
format
(
"存货
编码[%s]不存在"
,
inventCod
e
));
AssertUtils
.
isEmpty
(
pz004s
,
String
.
format
(
"存货
类型编码[%s]不存在"
,
inventTyp
e
));
return
pz004s
.
get
(
0
);
}
...
...
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