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
848d4bce
Commit
848d4bce
authored
May 09, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
f921bd7b
db134027
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
401 additions
and
12 deletions
+401
-12
HGConstant.java
src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
+12
-5
HGPZ008.java
src/main/java/com/baosight/hggp/hg/pz/domain/HGPZ008.java
+5
-5
HGPZ010.java
src/main/java/com/baosight/hggp/hg/pz/domain/HGPZ010.java
+2
-2
ServiceHGPZ008.java
.../java/com/baosight/hggp/hg/pz/service/ServiceHGPZ008.java
+224
-0
HGPZ001.js
src/main/webapp/HG/PZ/HGPZ001.js
+7
-0
HGPZ008.js
src/main/webapp/HG/PZ/HGPZ008.js
+111
-0
HGPZ008.jsp
src/main/webapp/HG/PZ/HGPZ008.jsp
+40
-0
No files found.
src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
View file @
848d4bce
...
...
@@ -28,7 +28,18 @@ public class HGConstant {
public
static
final
String
CUST_TYPE
=
"HGPZ001_CUST_TYPE"
;
// 客户编码
public
static
final
String
CUST_CODE
=
"HGPZ002_CUST_CODE"
;
// 供应商编码
public
static
final
String
SUP_CODE
=
"HGPZ003_SUP_CODE"
;
// 存货类型编码
public
static
final
String
INVENT_TYPE
=
"HGPZ004_INVENT_TYPE"
;
// 存货编码
public
static
final
String
INVENT_CODE
=
"HGPZ005_INVENT_CODE"
;
// 仓库类型编码
public
static
final
String
WH_TYPE
=
"HGPZ006_WH_TYPE"
;
// 仓库编码
public
static
final
String
WH_CODE
=
"HGPZ007_WH_CODE"
;
// 项目性质编码
public
static
final
String
NAT_CODE
=
"HGPZ008_NAT_CODE"
;
//项目档案编号
public
static
final
String
PROJ_NUMBER
=
"PROJ_NUMBER"
;
...
...
@@ -50,10 +61,6 @@ public class HGConstant {
public
static
final
String
HPPZ002_CUST_CODE
=
"HPPZ002_CUST_CODE"
;
// 客户编码
public
static
final
String
HPPZ003_CUST_CODE
=
"HPPZ003_CUST_CODE"
;
// 存货编码
public
static
final
String
INVENT_CODE
=
"INVENT_CODE"
;
// 仓库编码
public
static
final
String
WH_CODE
=
"WH_CODE"
;
// 其他入库单号
public
static
final
String
OTHER_ENTER_NO
=
"OTHER_ENTER_NO"
;
// 其他出库单号
...
...
src/main/java/com/baosight/hggp/hg/pz/domain/HGPZ008.java
View file @
848d4bce
...
...
@@ -49,11 +49,11 @@ public class HGPZ008 extends DaoEPBase {
public
static
final
String
COL_UPDATED_TIME
=
"UPDATED_TIME"
;
/* 更新时间*/
public
static
final
String
COL_DELETE_FLAG
=
"DELETE_FLAG"
;
/* 是否删除0.否1.是*/
public
static
final
String
QUERY
=
"HGPZ00
7
.query"
;
public
static
final
String
COUNT
=
"HGPZ00
7
.count"
;
public
static
final
String
INSERT
=
"HGPZ00
7
.insert"
;
public
static
final
String
UPDATE
=
"HGPZ00
7
.update"
;
public
static
final
String
DELETE
=
"HGPZ00
7
.delete"
;
public
static
final
String
QUERY
=
"HGPZ00
8
.query"
;
public
static
final
String
COUNT
=
"HGPZ00
8
.count"
;
public
static
final
String
INSERT
=
"HGPZ00
8
.insert"
;
public
static
final
String
UPDATE
=
"HGPZ00
8
.update"
;
public
static
final
String
DELETE
=
"HGPZ00
8
.delete"
;
private
Integer
id
=
new
Integer
(
0
);
private
String
accountCode
=
" "
;
/* 帐套编码*/
...
...
src/main/java/com/baosight/hggp/hg/pz/domain/HGPZ010.java
View file @
848d4bce
...
...
@@ -63,8 +63,8 @@ public class HGPZ010 extends DaoEPBase {
public
static
final
String
COL_REMARK
=
"REMARK"
;
/* 备注*/
public
static
final
String
QUERY
=
"HGPZ010.query"
;
public
static
final
String
COUNT
=
"
hgpz
010.count"
;
public
static
final
String
INSERT
=
"
hgpz
010.insert"
;
public
static
final
String
COUNT
=
"
HGPZ
010.count"
;
public
static
final
String
INSERT
=
"
HGPZ
010.insert"
;
public
static
final
String
UPDATE
=
"HGPZ010.update"
;
public
static
final
String
DELETE
=
"HGPZ010.delete"
;
...
...
src/main/java/com/baosight/hggp/hg/pz/service/ServiceHGPZ008.java
0 → 100644
View file @
848d4bce
package
com
.
baosight
.
hggp
.
hg
.
pz
.
service
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.pz.domain.HGPZ008
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ProjectInfo
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.soa.XLocalManager
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 项目性质
*
* @author:songx
* @date:2024/1/15,11:20
*/
public
class
ServiceHGPZ008
extends
ServiceBase
{
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation
(
operModul
=
"项目性质"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROJ_TYPE_BLOCK_ID
),
null
,
false
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGPZ008
().
eiMetadata
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
/**
* 查询数据列表
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation
(
operModul
=
"项目性质"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
inInfo
=
super
.
query
(
inInfo
,
HGPZ008
.
QUERY
,
new
HGPZ008
());
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
inInfo
.
setCell
(
EiConstant
.
resultBlock
,
ACConstants
.
ROW_CODE_0
,
"projectEnv"
,
projectEnv
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
/**
* 保存操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"项目性质"
,
operType
=
"插入"
,
operDesc
=
"保存"
)
public
EiInfo
save
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 数据校验
this
.
checkSaveData
(
resultRows
);
// 写入数据
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HGPZ008
hgpz008
=
new
HGPZ008
();
hgpz008
.
fromMap
(
resultRows
.
get
(
i
));
if
(
hgpz008
.
getId
()
==
null
||
hgpz008
.
getId
()
==
0
)
{
this
.
add
(
hgpz008
);
}
else
{
this
.
modify
(
hgpz008
);
}
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"保存失败"
);
}
return
inInfo
;
}
/**
* 校验保存的数据
*
* @param resultRows
*/
private
void
checkSaveData
(
List
<
Map
>
resultRows
)
{
// 数据校验
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HGPZ008
hgpz008
=
new
HGPZ008
();
hgpz008
.
fromMap
(
resultRows
.
get
(
i
));
AssertUtils
.
isNull
(
hgpz008
.
getStatus
(),
"是否启用不能为空"
);
}
}
/**
* 新增企业信息
*
* @param hgpz008
* @throws Exception
*/
private
void
add
(
HGPZ008
hgpz008
)
throws
Exception
{
hgpz008
.
setNatCode
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
NAT_CODE
));
DaoUtils
.
insert
(
HGPZ008
.
INSERT
,
hgpz008
);
}
/**
* 修改数据
*
* @param hgpz008
*/
private
void
modify
(
HGPZ008
hgpz008
)
{
DaoUtils
.
update
(
HGPZ008
.
UPDATE
,
hgpz008
);
}
/**
* 新增操作.
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation
(
operModul
=
"项目性质"
,
operType
=
"新增"
,
operDesc
=
"新增"
)
public
EiInfo
insert
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 数据校验
this
.
checkSaveData
(
resultRows
);
// 数据写入
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HGPZ008
hgpz008
=
new
HGPZ008
();
hgpz008
.
fromMap
(
resultRows
.
get
(
i
));
this
.
add
(
hgpz008
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据新增成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"新增失败"
);
}
return
inInfo
;
}
/**
* 修改操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"项目性质"
,
operType
=
"修改"
,
operDesc
=
"修改操作"
)
public
EiInfo
update
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 数据校验
this
.
checkSaveData
(
resultRows
);
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HGPZ008
hppz009
=
new
HGPZ008
();
hppz009
.
fromMap
(
resultRows
.
get
(
i
));
DaoUtils
.
update
(
HGPZ008
.
UPDATE
,
hppz009
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据修改成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"修改失败"
);
}
return
inInfo
;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"项目性质"
,
operType
=
"删除"
,
operDesc
=
"删除操作"
)
public
EiInfo
delete
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HGPZ008
hgpz008
=
new
HGPZ008
();
hgpz008
.
fromMap
(
resultRows
.
get
(
i
));
// 校验企业下是否存在用户
int
count
=
HGXSTools
.
XsUser
.
countByAccount
(
hgpz008
.
getAccountCode
());
if
(
count
>
0
)
{
// throw new PlatException(String.format("企业[%s]已关联用户,请先解除用户", hgpz008.getAccountName()));
}
DaoUtils
.
update
(
HGPZ008
.
DELETE
,
hgpz008
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"修改失败"
);
}
return
inInfo
;
}
}
src/main/webapp/HG/PZ/HGPZ001.js
View file @
848d4bce
...
...
@@ -8,6 +8,13 @@ $(function() {
pageSize
:
20
,
pageSizes
:
[
10
,
20
,
30
,
50
,
100
,
200
]
},
toolbarConfig
:
{
// hidden: false, // true时,不显示功能按钮,但保留setting导出按钮
// add: false, // 不显示新增按钮
//add: false, // 不显示取消按钮
// save: true, // 不显示保存按钮
delete
:
false
,
// 显示删除按钮
},
columns
:
[{
field
:
"createdName"
,
template
:
function
(
options
)
{
...
...
src/main/webapp/HG/PZ/HGPZ008.js
0 → 100644
View file @
848d4bce
$
(
function
()
{
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
IPLATUI
.
EFGrid
.
result
=
{
pageable
:
{
pageSize
:
20
,
pageSizes
:
[
10
,
20
,
30
,
50
,
100
,
200
]
},
toolbarConfig
:
{
// hidden: false, // true时,不显示功能按钮,但保留setting导出按钮
// add: false, // 不显示新增按钮
//add: false, // 不显示取消按钮
// save: true, // 不显示保存按钮
delete
:
false
,
// 显示删除按钮
},
columns
:
[{
field
:
"createdName"
,
template
:
function
(
options
)
{
return
showUserName
(
options
.
createdBy
,
options
.
createdName
);
}
},
{
field
:
"updatedName"
,
template
:
function
(
options
)
{
return
showUserName
(
options
.
updatedBy
,
options
.
updatedName
);
}
}],
onSuccess
:
function
(
e
)
{
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'save'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'delete'
){
query
();
}
},
onSave
:
function
(
e
)
{
// 阻止后台保存请求,使用自定义保存
e
.
preventDefault
();
save
();
},
onDelete
:
function
(
e
)
{
// 阻止后台删除请求,使用自定义删除
e
.
preventDefault
();
deleteFunc
();
}
}
downKeyUp
();
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 查询
query
();
});
/**
* 查询
*/
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
/**
* 保存
*/
let
save
=
function
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
natName
=
item
.
get
(
"natName"
);
let
status
=
item
.
get
(
"status"
);
if
(
isBlank
(
natName
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
项目性质
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
if
(
isBlank
(
status
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
状态
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGPZ008"
,
"save"
,
true
);
}
});
}
}
/**
* 删除
*/
let
deleteFunc
=
function
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
删除
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGPZ008"
,
"delete"
,
true
);
}
});
}
src/main/webapp/HG/PZ/HGPZ008.jsp
0 → 100644
View file @
848d4bce
<!DOCTYPE html>
<
%@
page
contentType=
"text/html; charset=UTF-8"
%
>
<
%@
taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%
>
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<EF:EFPage
title=
"项目性质"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<div
class=
"row"
>
<EF:EFSelect
cname=
"项目性质"
ename=
"inqu_status-0-natCode"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOptions
blockId=
"proj_type_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
<EF:EFSelect
blockId=
"inqu_status"
row=
"0"
ename=
"status"
cname=
"状态"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"hpjx.hpjx.status"
/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
cname=
"性质编码"
ename=
"natCode"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
cname=
"项目性质"
ename=
"natName"
width=
"140"
align=
"center"
required=
"true"
/>
<EF:EFComboColumn
cname=
"状态"
ename=
"status"
width=
"90"
align=
"center"
required=
"true"
defaultValue=
"1"
>
<EF:EFCodeOption
codeName=
"hpjx.hpjx.status"
/>
</EF:EFComboColumn>
<EF:EFColumn
cname=
"创建人"
ename=
"createdName"
enable=
"false"
align=
"center"
/>
<EF:EFColumn
cname=
"创建时间"
ename=
"createdTime"
enable=
"false"
width=
"140"
align=
"center"
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"
/>
<EF:EFColumn
cname=
"修改人"
ename=
"updatedName"
enable=
"false"
align=
"center"
/>
<EF:EFColumn
cname=
"修改时间"
ename=
"updatedTime"
enable=
"false"
width=
"140"
align=
"center"
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"
/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
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