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
8460c00a
Commit
8460c00a
authored
Jun 18, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-06-18 优化存货档案去掉自动添加编码,改为手动编码,导入添加存货编码
parent
1a15e08b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
5 deletions
+19
-5
ServiceHGPZ005.java
.../java/com/baosight/hggp/hg/pz/service/ServiceHGPZ005.java
+6
-1
HGPZTools.java
src/main/java/com/baosight/hggp/hg/pz/tools/HGPZTools.java
+6
-2
HGPZ005.js
src/main/webapp/HG/PZ/HGPZ005.js
+6
-1
HGPZ005.jsp
src/main/webapp/HG/PZ/HGPZ005.jsp
+1
-1
HGPZ005_存货档案.xls
src/main/webapp/common/template/PZ/HGPZ005_存货档案.xls
+0
-0
No files found.
src/main/java/com/baosight/hggp/hg/pz/service/ServiceHGPZ005.java
View file @
8460c00a
...
@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.pz.service;
...
@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.pz.service;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.enums.OrgTypeEnum
;
import
com.baosight.hggp.core.enums.OrgTypeEnum
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
...
@@ -132,7 +133,11 @@ public class ServiceHGPZ005 extends ServiceBase {
...
@@ -132,7 +133,11 @@ public class ServiceHGPZ005 extends ServiceBase {
* @throws Exception
* @throws Exception
*/
*/
private
void
add
(
HGPZ005
hgpz005
)
throws
Exception
{
private
void
add
(
HGPZ005
hgpz005
)
throws
Exception
{
hgpz005
.
setInventCode
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
INVENT_CODE
));
//hgpz005.setInventCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.INVENT_CODE));
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
HGPZ005
.
FIELD_INVENT_CODE
,
hgpz005
.
getInventCode
());
List
list
=
DaoBase
.
getInstance
().
query
(
HGPZ005
.
QUERY
,
params
);
AssertUtils
.
isNotEmpty
(
list
,
String
.
format
(
"存货编码[%s]已存在"
,
hgpz005
.
getInventCode
()));
DaoUtils
.
insert
(
HGPZ005
.
INSERT
,
hgpz005
);
DaoUtils
.
insert
(
HGPZ005
.
INSERT
,
hgpz005
);
}
}
...
...
src/main/java/com/baosight/hggp/hg/pz/tools/HGPZTools.java
View file @
8460c00a
...
@@ -590,7 +590,7 @@ public class HGPZTools {
...
@@ -590,7 +590,7 @@ public class HGPZTools {
*/
*/
public
static
void
add
(
List
<
Map
>
list
){
public
static
void
add
(
List
<
Map
>
list
){
List
<
HGPZ004
>
hgpz004s
=
DaoBase
.
getInstance
().
query
(
HGPZ004
.
QUERY
,
new
HashMap
<>());
List
<
HGPZ004
>
hgpz004s
=
DaoBase
.
getInstance
().
query
(
HGPZ004
.
QUERY
,
new
HashMap
<>());
Map
parmap
=
hgpz004s
.
stream
().
collect
(
Collectors
.
toMap
(
HGPZ004:
:
getInventTypeName
,
HGPZ004:
:
getInventType
));
Map
parmap
=
hgpz004s
.
stream
().
collect
(
Collectors
.
toMap
(
HGPZ004:
:
getInventTypeName
,
HGPZ004:
:
getInventType
,(
v1
,
v2
)
->
v1
));
for
(
Map
map:
list
)
{
for
(
Map
map:
list
)
{
String
inventType
=
MapUtils
.
getString
(
parmap
,
StringUtils
.
trimToEmpty
(
map
.
get
(
HGPZ005
.
FIELD_INVENT_TYPE
).
toString
()));
String
inventType
=
MapUtils
.
getString
(
parmap
,
StringUtils
.
trimToEmpty
(
map
.
get
(
HGPZ005
.
FIELD_INVENT_TYPE
).
toString
()));
AssertUtils
.
isEmpty
(
inventType
,
String
.
format
(
"存货类型[%s]代码不存在,添加失败!"
,
inventType
));
AssertUtils
.
isEmpty
(
inventType
,
String
.
format
(
"存货类型[%s]代码不存在,添加失败!"
,
inventType
));
...
@@ -598,7 +598,11 @@ public class HGPZTools {
...
@@ -598,7 +598,11 @@ public class HGPZTools {
hgpz005
.
fromMap
(
map
);
hgpz005
.
fromMap
(
map
);
hgpz005
.
setInventType
(
inventType
);
hgpz005
.
setInventType
(
inventType
);
hgpz005
.
setStatus
(
1
);
//默认启用
hgpz005
.
setStatus
(
1
);
//默认启用
hgpz005
.
setInventCode
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
INVENT_CODE
));
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
HGPZ005
.
FIELD_INVENT_CODE
,
hgpz005
.
getInventCode
());
List
hgpz005s
=
DaoBase
.
getInstance
().
query
(
HGPZ005
.
QUERY
,
params
);
AssertUtils
.
isNotEmpty
(
hgpz005s
,
String
.
format
(
"存货编码[%s]已存在"
,
hgpz005
.
getInventCode
()));
//hgpz005.setInventCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.INVENT_CODE));
// 设置规格
// 设置规格
if
(
StringUtils
.
isBlank
(
hgpz005
.
getSpec
()))
{
if
(
StringUtils
.
isBlank
(
hgpz005
.
getSpec
()))
{
hgpz005
.
setSpec
(
HGPZTools
.
HgPz005
.
jointSpec
(
hgpz005
.
getLength
(),
hgpz005
.
getWidth
(),
hgpz005
.
getThick
()));
hgpz005
.
setSpec
(
HGPZTools
.
HgPz005
.
jointSpec
(
hgpz005
.
getLength
(),
hgpz005
.
getWidth
(),
hgpz005
.
getThick
()));
...
...
src/main/webapp/HG/PZ/HGPZ005.js
View file @
8460c00a
...
@@ -164,6 +164,7 @@ let save = function () {
...
@@ -164,6 +164,7 @@ let save = function () {
let
flag
=
true
;
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
inventType
=
item
.
get
(
"inventType"
);
let
inventType
=
item
.
get
(
"inventType"
);
let
inventCode
=
item
.
get
(
"inventCode"
);
let
inventName
=
item
.
get
(
"inventName"
);
let
inventName
=
item
.
get
(
"inventName"
);
let
length
=
item
.
get
(
"length"
);
let
length
=
item
.
get
(
"length"
);
let
width
=
item
.
get
(
"width"
);
let
width
=
item
.
get
(
"width"
);
...
@@ -174,6 +175,11 @@ let save = function () {
...
@@ -174,6 +175,11 @@ let save = function () {
flag
=
false
;
flag
=
false
;
return
false
;
return
false
;
}
}
if
(
isBlank
(
inventCode
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
存货编码
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
if
(
isBlank
(
inventName
)){
if
(
isBlank
(
inventName
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
存货名称
\"
,不能为空!"
);
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
存货名称
\"
,不能为空!"
);
flag
=
false
;
flag
=
false
;
...
@@ -184,7 +190,6 @@ let save = function () {
...
@@ -184,7 +190,6 @@ let save = function () {
flag
=
false
;
flag
=
false
;
return
false
;
return
false
;
}
}
if
(
!
isBlank
(
length
)
&&
!
isNumber
(
length
)){
if
(
!
isBlank
(
length
)
&&
!
isNumber
(
length
)){
message
(
"选中的第"
+
(
i
+
1
)
+
"行
\"
长
\"
,必须是数值!"
);
message
(
"选中的第"
+
(
i
+
1
)
+
"行
\"
长
\"
,必须是数值!"
);
flag
=
false
;
flag
=
false
;
...
...
src/main/webapp/HG/PZ/HGPZ005.jsp
View file @
8460c00a
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<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
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"160"
align=
"center"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"160"
align=
"center"
/>
<EF:EFColumn
cname=
"存货编码"
ename=
"inventCode"
width=
"140"
align=
"center"
enable=
"
fals
e"
/>
<EF:EFColumn
cname=
"存货编码"
ename=
"inventCode"
width=
"140"
align=
"center"
enable=
"
true"
readonly=
"tru
e"
/>
<EF:EFComboColumn
ename=
"inventType"
cname=
"存货类型"
width=
"120"
align=
"center"
required=
"true"
<EF:EFComboColumn
ename=
"inventType"
cname=
"存货类型"
width=
"120"
align=
"center"
required=
"true"
blockName=
"invent_type_box_block_id"
textField=
"textField"
valueField=
"valueField"
blockName=
"invent_type_box_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
readonly=
"false"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
readonly=
"false"
...
...
src/main/webapp/common/template/PZ/HGPZ005_存货档案.xls
View file @
8460c00a
No preview for this file type
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