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
Hide 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 {
...
@@ -72,6 +72,10 @@ public class ServiceHGCW001 extends ServiceBase {
if
(!
roleCompanyCode
.
isEmpty
())
{
if
(!
roleCompanyCode
.
isEmpty
())
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGCW001
.
FIELD_COMPANY_CODES
,
roleCompanyCode
);
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
());
inInfo
=
super
.
query
(
inInfo
,
HGCW001
.
QUERY
,
new
HGCW001
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
...
...
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW001.xml
View file @
67ff52c2
...
@@ -137,6 +137,16 @@
...
@@ -137,6 +137,16 @@
ACCOUNT_PERIOD
<
= #accountPeriodEnd#
ACCOUNT_PERIOD
<
= #accountPeriodEnd#
</isNotEmpty>
</isNotEmpty>
</sql>
</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"
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.cw.domain.HGCW001"
>
resultClass=
"com.baosight.hggp.hg.cw.domain.HGCW001"
>
...
@@ -159,14 +169,7 @@
...
@@ -159,14 +169,7 @@
DEP_CODE as "depCode"
<!-- 部门编码 -->
DEP_CODE as "depCode"
<!-- 部门编码 -->
FROM ${hggpSchema}.HGCW001 WHERE 1=1
FROM ${hggpSchema}.HGCW001 WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<include
refid=
"order"
/>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ACCOUNT_YEAR desc, ACCOUNT_PERIOD desc, ID desc
</isEmpty>
</dynamic>
</select>
</select>
...
...
src/main/webapp/HG/CW/HGCW001.js
View file @
67ff52c2
...
@@ -62,7 +62,9 @@ $(function () {
...
@@ -62,7 +62,9 @@ $(function () {
},
},
loadComplete
:
function
(
grid
)
{
loadComplete
:
function
(
grid
)
{
$
(
"#SWITCH"
).
on
(
"click"
,
function
()
{
$
(
"#SWITCH"
).
on
(
"click"
,
function
()
{
switchRow
();
let
btnNode
=
$
(
this
);
btnNode
.
attr
(
"disabled"
,
true
);
switchRow
(
btnNode
);
});
});
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
){
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
){
var
item
=
e
.
items
[
0
];
var
item
=
e
.
items
[
0
];
...
@@ -86,7 +88,9 @@ $(function () {
...
@@ -86,7 +88,9 @@ $(function () {
onSave
:
function
(
e
)
{
onSave
:
function
(
e
)
{
// 阻止默认请求,使用自定义保存
// 阻止默认请求,使用自定义保存
e
.
preventDefault
();
e
.
preventDefault
();
saveFunc
();
let
btnNode
=
$
(
this
);
btnNode
.
attr
(
"disabled"
,
true
);
saveFunc
(
btnNode
);
},
},
onDelete
:
function
(
e
)
{
onDelete
:
function
(
e
)
{
// 阻止默认请求,使用自定义删除
// 阻止默认请求,使用自定义删除
...
@@ -126,7 +130,7 @@ var query = function () {
...
@@ -126,7 +130,7 @@ var query = function () {
/**
/**
* 保存
* 保存
*/
*/
function
saveFunc
()
{
function
saveFunc
(
btnNode
)
{
let
rows
=
resultGrid
.
getCheckedRows
();
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
message
(
"请选择数据"
);
...
@@ -180,6 +184,7 @@ function saveFunc() {
...
@@ -180,6 +184,7 @@ function saveFunc() {
info
.
addBlock
(
JSUtils
.
checkedRows2Block
(
"result"
));
info
.
addBlock
(
JSUtils
.
checkedRows2Block
(
"result"
));
EiCommunicator
.
send
(
"HGCW001"
,
"save"
,
info
,
{
EiCommunicator
.
send
(
"HGCW001"
,
"save"
,
info
,
{
onSuccess
:
function
(
ei
)
{
onSuccess
:
function
(
ei
)
{
btnNode
.
attr
(
"disabled"
,
false
);
if
(
ei
.
getStatus
()
>=
0
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
if
(
ei
.
getStatus
()
==
0
)
{
if
(
ei
.
getStatus
()
==
0
)
{
NotificationUtil
(
ei
,
'warning'
);
NotificationUtil
(
ei
,
'warning'
);
...
@@ -192,12 +197,14 @@ function saveFunc() {
...
@@ -192,12 +197,14 @@ function saveFunc() {
}
}
},
},
onFail
:
function
(
ei
)
{
onFail
:
function
(
ei
)
{
btnNode
.
attr
(
"disabled"
,
false
);
// 发生异常
// 发生异常
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
}
}
});
});
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
},
cancel
:
function
()
{
btnNode
.
attr
(
"disabled"
,
false
);
}
}
});
});
}
}
...
@@ -230,7 +237,7 @@ function deleteFunc() {
...
@@ -230,7 +237,7 @@ function deleteFunc() {
}
}
}
}
function
switchRow
()
{
function
switchRow
(
btnNode
)
{
let
rows
=
resultGrid
.
getCheckedRows
();
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
!=
1
)
{
if
(
rows
.
length
!=
1
)
{
message
(
"请选择一条数据"
);
message
(
"请选择一条数据"
);
...
@@ -257,14 +264,18 @@ function switchRow() {
...
@@ -257,14 +264,18 @@ function switchRow() {
}
else
{
}
else
{
NotificationUtil
(
ei
,
"error"
);
NotificationUtil
(
ei
,
"error"
);
}
}
btnNode
.
attr
(
"disabled"
,
false
);
},
},
onFail
:
function
(
ei
)
{
onFail
:
function
(
ei
)
{
// 发生异常
// 发生异常
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
btnNode
.
attr
(
"disabled"
,
false
);
}
}
});
}
,
);
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
//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 @@
...
@@ -24,7 +24,7 @@
</EF:EFRegion>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<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:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"companyCode"
cname=
"公司名称"
width=
"110"
align=
"center"
<EF:EFComboColumn
ename=
"companyCode"
cname=
"公司名称"
width=
"110"
align=
"center"
filter=
"contains"
readonly=
"true"
>
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