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
2c66ff4a
Commit
2c66ff4a
authored
May 11, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目立项提交、完工dev;
parent
8a2d7a2e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
168 additions
and
2 deletions
+168
-2
HGSC001.java
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC001.java
+2
-0
ServiceHGSC001.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC001.java
+30
-0
HGSC001.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC001.xml
+23
-0
HGSC001.js
src/main/webapp/HG/SC/HGSC001.js
+100
-1
HGSC001.jsp
src/main/webapp/HG/SC/HGSC001.jsp
+1
-1
common.js
src/main/webapp/common/js/common.js
+12
-0
No files found.
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC001.java
View file @
2c66ff4a
...
...
@@ -86,6 +86,8 @@ public class HGSC001 extends DaoEPBase {
public
static
final
String
UPDATE
=
"HGSC001.update"
;
public
static
final
String
DELETE
=
"HGSC001.delete"
;
public
static
final
String
BATCH_DELETE
=
"HGSC001.batch_delete"
;
public
static
final
String
BATCH_COMPLETE
=
"HGSC001.batch_complete"
;
public
static
final
String
BATCH_COMMIT
=
"HGSC001.batch_commit"
;
private
Long
id
=
new
Long
(
0
);
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC001.java
View file @
2c66ff4a
...
...
@@ -72,6 +72,36 @@ public class ServiceHGSC001 extends ServiceBase {
return
inInfo
;
}
public
EiInfo
complete
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 销售单号
List
<
Long
>
ids
=
ObjectUtils
.
listKey
(
resultRows
,
"id"
);
DaoUtils
.
update
(
HGSC001
.
BATCH_COMPLETE
,
new
HashMap
<
String
,
Object
>(){{
put
(
"ids"
,
ids
);}});
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"删除失败"
);
}
return
inInfo
;
}
public
EiInfo
commit
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 销售单号
List
<
Long
>
ids
=
ObjectUtils
.
listKey
(
resultRows
,
"id"
);
DaoUtils
.
update
(
HGSC001
.
BATCH_COMMIT
,
new
HashMap
<
String
,
Object
>(){{
put
(
"ids"
,
ids
);}});
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"删除失败"
);
}
return
inInfo
;
}
public
EiInfo
save
(
EiInfo
inInfo
){
try
{
Map
resultMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
,
EiConstant
.
resultBlock
);
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC001.xml
View file @
2c66ff4a
...
...
@@ -338,4 +338,27 @@
id = #id#
</update>
<update
id=
"complete"
>
UPDATE ${hggpSchema}.HGSC001
SET
proj_status = 1,
<!-- 项目状态 0:在建;1:完工 -->
updated_by = #updatedBy#,
<!-- 更新人 -->
updated_name = #updatedName#,
<!-- 修改人名称 -->
updated_time = #updatedTime#
<!-- 更新时间 -->
WHERE
id IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
</update>
<update
id=
"commit"
>
UPDATE ${hggpSchema}.HGSC001
SET
approval_status = 2,
<!-- 审批状态 0:待审;1:审核中;2:已审 -->
updated_by = #updatedBy#,
<!-- 更新人 -->
updated_name = #updatedName#,
<!-- 修改人名称 -->
updated_time = #updatedTime#
<!-- 更新时间 -->
WHERE
id IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
</update>
</sqlMap>
src/main/webapp/HG/SC/HGSC001.js
View file @
2c66ff4a
...
...
@@ -47,7 +47,13 @@ $(function () {
// 新增
$
(
"#add"
).
click
(
create
);
//修改
$
(
"#BNT_UPDATE"
).
on
(
"click"
,
update
);
$
(
"#BNT_MODIFY"
).
on
(
"click"
,
update
);
//删除
$
(
"#BNT_REMOVE"
).
on
(
"click"
,
remove
);
//删除
$
(
"#BNT_COMPLETE"
).
on
(
"click"
,
complete
);
//删除
$
(
"#BNT_COMMIT"
).
on
(
"click"
,
commit
);
},
onAdd
:
function
(
e
)
{
e
.
preventDefault
();
...
...
@@ -98,6 +104,99 @@ function update() {
callbackName
:
windowCallback
});}
function
remove
()
{
let
rows
=
resultGrid
.
getCheckedRows
()
if
(
rows
.
length
<
1
)
{
message
(
"删除"
,
"没有选中的行"
);
return
;
}
IPLAT
.
confirm
({
title
:
'删除'
,
message
:
'确认删除此数据么?'
,
okFn
:
function
()
{
var
post
=
new
EiInfo
();
post
.
addBlock
(
resultGrid
.
getCheckedBlockData
());
post
.
set
(
"recursion"
,
true
);
EiCommunicator
.
send
(
"HGSC001"
,
"delete"
,
post
,{
onSuccess
:
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
NotificationUtil
(
ei
);
resultGrid
.
dataSource
.
query
();
}
else
{
NotificationUtil
(
ei
,
"error"
);
}
},
onFail
:
function
(
ei
)
{
// 发生异常
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
}
});
}
})
}
function
complete
()
{
let
rows
=
resultGrid
.
getCheckedRows
()
if
(
rows
.
length
<
1
)
{
message
(
"完工"
,
"没有选中的行"
);
return
;
}
IPLAT
.
confirm
({
title
:
'完工'
,
message
:
'确认完工此数据么?'
,
okFn
:
function
()
{
var
post
=
new
EiInfo
();
post
.
addBlock
(
resultGrid
.
getCheckedBlockData
());
post
.
set
(
"recursion"
,
true
);
EiCommunicator
.
send
(
"HGSC001"
,
"complete"
,
post
,{
onSuccess
:
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
NotificationUtil
(
ei
);
resultGrid
.
dataSource
.
query
();
}
else
{
NotificationUtil
(
ei
,
"error"
);
}
},
onFail
:
function
(
ei
)
{
// 发生异常
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
}
});
}
})
}
function
commit
()
{
let
rows
=
resultGrid
.
getCheckedRows
()
if
(
rows
.
length
<
1
)
{
message
(
"提交"
,
"没有选中的行"
);
return
;
}
IPLAT
.
confirm
({
title
:
'提交'
,
message
:
'确认提交此数据么?'
,
okFn
:
function
()
{
var
post
=
new
EiInfo
();
post
.
addBlock
(
resultGrid
.
getCheckedBlockData
());
post
.
set
(
"recursion"
,
true
);
EiCommunicator
.
send
(
"HGSC001"
,
"commit"
,
post
,{
onSuccess
:
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
NotificationUtil
(
ei
);
resultGrid
.
dataSource
.
query
();
}
else
{
NotificationUtil
(
ei
,
"error"
);
}
},
onFail
:
function
(
ei
)
{
// 发生异常
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
}
});
}
})
}
function
windowCallback
()
{
// 刷新列表
resultGrid
.
dataSource
.
page
(
1
);
...
...
src/main/webapp/HG/SC/HGSC001.jsp
View file @
2c66ff4a
...
...
@@ -32,7 +32,7 @@
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
isFloat=
"true"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
isFloat=
"true"
copyToAdd=
"false"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
enable=
"false"
width=
"120"
align=
"center"
/>
...
...
src/main/webapp/common/js/common.js
View file @
2c66ff4a
...
...
@@ -81,6 +81,18 @@ function message(msg) {
}
/**
* 消息提示
* @param title
* @param msg
*/
function
message
(
title
,
msg
)
{
WindowUtil
({
title
:
title
,
content
:
"<div class='kendo-del-message'>"
+
msg
+
"</div>"
});
}
/**
* 文件下载路径
*
* @param docId
...
...
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