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
7e930d83
Commit
7e930d83
authored
May 23, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-05-23 优化存货类型改完手动编辑
parent
cef2cc71
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
11 deletions
+24
-11
HGPZ004.java
src/main/java/com/baosight/hggp/hg/pz/domain/HGPZ004.java
+4
-4
ServiceHGPZ004.java
.../java/com/baosight/hggp/hg/pz/service/ServiceHGPZ004.java
+11
-4
HGPZ004.js
src/main/webapp/HG/PZ/HGPZ004.js
+7
-1
HGPZ004.jsp
src/main/webapp/HG/PZ/HGPZ004.jsp
+2
-2
No files found.
src/main/java/com/baosight/hggp/hg/pz/domain/HGPZ004.java
View file @
7e930d83
...
@@ -76,7 +76,7 @@ public class HGPZ004 extends DaoEPBase {
...
@@ -76,7 +76,7 @@ public class HGPZ004 extends DaoEPBase {
private
String
updatedName
=
" "
;
/* 更新人名称*/
private
String
updatedName
=
" "
;
/* 更新人名称*/
private
String
updatedTime
=
" "
;
/* 更新时间*/
private
String
updatedTime
=
" "
;
/* 更新时间*/
private
Integer
deleteFlag
=
0
;
/* 是否删除0.否1.是*/
private
Integer
deleteFlag
=
0
;
/* 是否删除0.否1.是*/
private
Integer
inventTypeDetail
=
0
;
/*存货类型明细 1:构建 2:零件*/
private
String
inventTypeDetail
;
/*存货类型明细 1:构建 2:零件*/
/**
/**
* initialize the metadata.
* initialize the metadata.
...
@@ -400,11 +400,11 @@ public class HGPZ004 extends DaoEPBase {
...
@@ -400,11 +400,11 @@ public class HGPZ004 extends DaoEPBase {
this
.
deleteFlag
=
deleteFlag
;
this
.
deleteFlag
=
deleteFlag
;
}
}
public
Integer
getInventTypeDetail
()
{
public
String
getInventTypeDetail
()
{
return
inventTypeDetail
;
return
inventTypeDetail
;
}
}
public
void
setInventTypeDetail
(
Integer
inventTypeDetail
)
{
public
void
setInventTypeDetail
(
String
inventTypeDetail
)
{
this
.
inventTypeDetail
=
inventTypeDetail
;
this
.
inventTypeDetail
=
inventTypeDetail
;
}
}
...
@@ -431,7 +431,7 @@ public class HGPZ004 extends DaoEPBase {
...
@@ -431,7 +431,7 @@ public class HGPZ004 extends DaoEPBase {
setUpdatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_NAME
)),
updatedName
));
setUpdatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_NAME
)),
updatedName
));
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_TIME
)),
updatedTime
));
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_TIME
)),
updatedTime
));
setDeleteFlag
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELETE_FLAG
)),
deleteFlag
));
setDeleteFlag
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELETE_FLAG
)),
deleteFlag
));
setInventTypeDetail
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE_DETAIL
)),
inventTypeDetail
));
setInventTypeDetail
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE_DETAIL
)),
inventTypeDetail
));
}
}
/**
/**
...
...
src/main/java/com/baosight/hggp/hg/pz/service/ServiceHGPZ004.java
View file @
7e930d83
...
@@ -78,16 +78,16 @@ public class ServiceHGPZ004 extends ServiceBase {
...
@@ -78,16 +78,16 @@ public class ServiceHGPZ004 extends ServiceBase {
// 数据校验
// 数据校验
this
.
checkSaveData
(
resultRows
);
this
.
checkSaveData
(
resultRows
);
// 写入数据
// 写入数据
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++
)
{
for
(
Map
resultRow
:
resultRows
)
{
HGPZ004
hgpz004
=
new
HGPZ004
();
HGPZ004
hgpz004
=
new
HGPZ004
();
hgpz004
.
fromMap
(
resultRow
s
.
get
(
i
)
);
hgpz004
.
fromMap
(
resultRow
);
if
(
hgpz004
.
getId
()
==
null
||
hgpz004
.
getId
()
==
0
)
{
if
(
hgpz004
.
getId
()
==
null
||
hgpz004
.
getId
()
==
0
)
{
dataValida
(
hgpz004
);
this
.
add
(
hgpz004
);
this
.
add
(
hgpz004
);
}
else
{
}
else
{
this
.
modify
(
hgpz004
);
this
.
modify
(
hgpz004
);
}
}
}
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -117,7 +117,8 @@ public class ServiceHGPZ004 extends ServiceBase {
...
@@ -117,7 +117,8 @@ public class ServiceHGPZ004 extends ServiceBase {
* @throws Exception
* @throws Exception
*/
*/
private
void
add
(
HGPZ004
hgpz004
)
throws
Exception
{
private
void
add
(
HGPZ004
hgpz004
)
throws
Exception
{
hgpz004
.
setInventType
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
INVENT_TYPE
));
//hgpz004.setInventType(SequenceGenerator.getNextSequence(HGConstant.SequenceId.INVENT_TYPE));
DaoUtils
.
insert
(
HGPZ004
.
INSERT
,
hgpz004
);
DaoUtils
.
insert
(
HGPZ004
.
INSERT
,
hgpz004
);
}
}
...
@@ -233,5 +234,11 @@ public class ServiceHGPZ004 extends ServiceBase {
...
@@ -233,5 +234,11 @@ public class ServiceHGPZ004 extends ServiceBase {
}
}
public
void
dataValida
(
HGPZ004
hgpz004
){
Map
map
=
new
HashMap
();
map
.
put
(
HGPZ004
.
FIELD_INVENT_TYPE
,
hgpz004
.
getInventType
());
List
list
=
this
.
dao
.
query
(
HGPZ004
.
QUERY
,
map
);
AssertUtils
.
isNotEmpty
(
list
,
String
.
format
(
"存货类型[%s]已经存在,添加失败"
,
hgpz004
.
getInventType
()));
}
}
}
src/main/webapp/HG/PZ/HGPZ004.js
View file @
7e930d83
...
@@ -30,7 +30,7 @@ $(function() {
...
@@ -30,7 +30,7 @@ $(function() {
inInfo
.
set
(
"field"
,
options
.
field
);
inInfo
.
set
(
"field"
,
options
.
field
);
refreshSelect
(
container
,
inInfo
);
refreshSelect
(
container
,
inInfo
);
}
}
},{
},
{
field
:
"createdName"
,
field
:
"createdName"
,
template
:
function
(
options
)
{
template
:
function
(
options
)
{
return
showUserName
(
options
.
createdBy
,
options
.
createdName
);
return
showUserName
(
options
.
createdBy
,
options
.
createdName
);
...
@@ -103,6 +103,7 @@ let save = function () {
...
@@ -103,6 +103,7 @@ let save = function () {
let
flag
=
true
;
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
parInventType
=
item
.
get
(
"parInventType"
);
let
parInventType
=
item
.
get
(
"parInventType"
);
let
inventType
=
item
.
get
(
"inventType"
);
let
inventTypeName
=
item
.
get
(
"inventTypeName"
);
let
inventTypeName
=
item
.
get
(
"inventTypeName"
);
let
status
=
item
.
get
(
"status"
);
let
status
=
item
.
get
(
"status"
);
if
(
isBlank
(
parInventType
)){
if
(
isBlank
(
parInventType
)){
...
@@ -110,6 +111,11 @@ let save = function () {
...
@@ -110,6 +111,11 @@ let save = function () {
flag
=
false
;
flag
=
false
;
return
false
;
return
false
;
}
}
if
(
isBlank
(
inventType
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
存货类型
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
if
(
isBlank
(
inventTypeName
)){
if
(
isBlank
(
inventTypeName
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
存货类型
\"
,不能为空!"
);
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
存货类型
\"
,不能为空!"
);
flag
=
false
;
flag
=
false
;
...
...
src/main/webapp/HG/PZ/HGPZ004.jsp
View file @
7e930d83
...
@@ -18,9 +18,9 @@
...
@@ -18,9 +18,9 @@
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
cname=
"类型编码"
ename=
"inventType"
enable=
"
false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
cname=
"类型编码"
ename=
"inventType"
enable=
"
true"
width=
"120"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
cname=
"存货类型"
ename=
"inventTypeName"
width=
"140"
align=
"center"
required=
"true"
/>
<EF:EFColumn
cname=
"存货类型"
ename=
"inventTypeName"
width=
"140"
align=
"center"
required=
"true"
/>
<EF:EFComboColumn
ename=
"inventTypeDetail"
cname=
"存货类型明细"
width=
"80"
align=
"center"
readonly=
"false"
required=
"true"
>
<EF:EFComboColumn
ename=
"inventTypeDetail"
cname=
"存货类型明细"
width=
"80"
align=
"center"
readonly=
"false"
>
<EF:EFCodeOption
codeName=
"hggp.hgpz.inventTypeDetail"
/>
<EF:EFCodeOption
codeName=
"hggp.hgpz.inventTypeDetail"
/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn
cname=
"上级名称"
ename=
"parInventType"
width=
"80"
align=
"center"
required=
"true"
/>
<EF:EFColumn
cname=
"上级名称"
ename=
"parInventType"
width=
"80"
align=
"center"
required=
"true"
/>
...
...
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