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
67ff52c2
Commit
67ff52c2
authored
Jul 17, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-07-17 业务账期维护优化防止重复提交
parent
fad7a97c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
15 deletions
+33
-15
ServiceHGCW001.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW001.java
+4
-0
HGCW001.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW001.xml
+11
-8
HGCW001.js
src/main/webapp/HG/CW/HGCW001.js
+17
-6
HGCW001.jsp
src/main/webapp/HG/CW/HGCW001.jsp
+1
-1
No files found.
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW001.java
View file @
67ff52c2
...
...
@@ -72,6 +72,10 @@ public class ServiceHGCW001 extends ServiceBase {
if
(!
roleCompanyCode
.
isEmpty
())
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGCW001
.
FIELD_COMPANY_CODES
,
roleCompanyCode
);
}
String
accountPeriod
=
inInfo
.
getCellStr
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGCW001
.
FIELD_ACCOUNT_PERIOD
);
if
(
StringUtils
.
isNotEmpty
(
accountPeriod
))
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGCW001
.
FIELD_ACCOUNT_PERIOD
,
DateUtils
.
formatShort
(
accountPeriod
));
}
inInfo
=
super
.
query
(
inInfo
,
HGCW001
.
QUERY
,
new
HGCW001
());
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
...
...
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW001.xml
View file @
67ff52c2
...
...
@@ -137,6 +137,16 @@
ACCOUNT_PERIOD
<
= #accountPeriodEnd#
</isNotEmpty>
</sql>
<sql
id=
"order"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
COMPANY_CODE ASC, ACCOUNT_YEAR desc, ACCOUNT_PERIOD desc, ID desc
</isEmpty>
</dynamic>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.cw.domain.HGCW001"
>
...
...
@@ -159,14 +169,7 @@
DEP_CODE as "depCode"
<!-- 部门编码 -->
FROM ${hggpSchema}.HGCW001 WHERE 1=1
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ACCOUNT_YEAR desc, ACCOUNT_PERIOD desc, ID desc
</isEmpty>
</dynamic>
<include
refid=
"order"
/>
</select>
...
...
src/main/webapp/HG/CW/HGCW001.js
View file @
67ff52c2
...
...
@@ -62,7 +62,9 @@ $(function () {
},
loadComplete
:
function
(
grid
)
{
$
(
"#SWITCH"
).
on
(
"click"
,
function
()
{
switchRow
();
let
btnNode
=
$
(
this
);
btnNode
.
attr
(
"disabled"
,
true
);
switchRow
(
btnNode
);
});
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
){
var
item
=
e
.
items
[
0
];
...
...
@@ -86,7 +88,9 @@ $(function () {
onSave
:
function
(
e
)
{
// 阻止默认请求,使用自定义保存
e
.
preventDefault
();
saveFunc
();
let
btnNode
=
$
(
this
);
btnNode
.
attr
(
"disabled"
,
true
);
saveFunc
(
btnNode
);
},
onDelete
:
function
(
e
)
{
// 阻止默认请求,使用自定义删除
...
...
@@ -126,7 +130,7 @@ var query = function () {
/**
* 保存
*/
function
saveFunc
()
{
function
saveFunc
(
btnNode
)
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
...
...
@@ -180,6 +184,7 @@ function saveFunc() {
info
.
addBlock
(
JSUtils
.
checkedRows2Block
(
"result"
));
EiCommunicator
.
send
(
"HGCW001"
,
"save"
,
info
,
{
onSuccess
:
function
(
ei
)
{
btnNode
.
attr
(
"disabled"
,
false
);
if
(
ei
.
getStatus
()
>=
0
)
{
if
(
ei
.
getStatus
()
==
0
)
{
NotificationUtil
(
ei
,
'warning'
);
...
...
@@ -192,12 +197,14 @@ function saveFunc() {
}
},
onFail
:
function
(
ei
)
{
btnNode
.
attr
(
"disabled"
,
false
);
// 发生异常
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
}
});
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
},
cancel
:
function
()
{
btnNode
.
attr
(
"disabled"
,
false
);
}
});
}
...
...
@@ -230,7 +237,7 @@ function deleteFunc() {
}
}
function
switchRow
()
{
function
switchRow
(
btnNode
)
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
!=
1
)
{
message
(
"请选择一条数据"
);
...
...
@@ -257,14 +264,18 @@ function switchRow() {
}
else
{
NotificationUtil
(
ei
,
"error"
);
}
btnNode
.
attr
(
"disabled"
,
false
);
},
onFail
:
function
(
ei
)
{
// 发生异常
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
btnNode
.
attr
(
"disabled"
,
false
);
}
});
}
,
);
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
},
cancel
:
function
()
{
btnNode
.
attr
(
"disabled"
,
false
);
}
});
}
...
...
src/main/webapp/HG/CW/HGCW001.jsp
View file @
67ff52c2
...
...
@@ -24,7 +24,7 @@
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
isFloat=
"true"
autoBind=
"false"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
isFloat=
"true"
autoBind=
"false"
checkMode=
"single"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"companyCode"
cname=
"公司名称"
width=
"110"
align=
"center"
filter=
"contains"
readonly=
"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