Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cyyy
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
zhangfeng
cyyy
Commits
fc46454e
Commit
fc46454e
authored
Mar 31, 2021
by
yangbenyong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://39.106.223.11/462269006/cyyy
parents
861ddf51
ab655dc2
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
243 additions
and
0 deletions
+243
-0
BudgetVerificationController.java
...om/corp/cyyy/dubget/web/BudgetVerificationController.java
+65
-0
BudgetVerificationQuery.java
...m/corp/cyyy/dubget/web/query/BudgetVerificationQuery.java
+12
-0
申报执行导出.xls
src/main/resources/excelTemplates/dubget/申报执行导出.xls
+0
-0
budgetVerification.md
src/main/resources/sql/dubget/budgetVerification.md
+3
-0
budgetVerificationApi.js
...tic/js/dubget/budgetVerification/budgetVerificationApi.js
+6
-0
tjindex.js
.../resources/static/js/dubget/budgetVerification/tjindex.js
+139
-0
tjindex.html
...esources/templates/dubget/budgetVerification/tjindex.html
+18
-0
No files found.
src/main/java/com/corp/cyyy/dubget/web/BudgetVerificationController.java
View file @
fc46454e
...
@@ -90,6 +90,19 @@ public class BudgetVerificationController{
...
@@ -90,6 +90,19 @@ public class BudgetVerificationController{
return
view
;
return
view
;
}
}
@GetMapping
(
MODEL
+
"/tjindex.do"
)
@Function
(
"budgetVerification.query"
)
@ResponseBody
public
ModelAndView
tjindex
(
Integer
budgetId
)
{
ModelAndView
view
=
new
ModelAndView
(
"/dubget/budgetVerification/tjindex.html"
)
;
view
.
addObject
(
"search"
,
BudgetVerificationQuery
.
class
.
getName
());
view
.
addObject
(
"budgetId"
,
budgetId
);
return
view
;
}
@GetMapping
(
MODEL
+
"/yldindex.do"
)
@GetMapping
(
MODEL
+
"/yldindex.do"
)
@Function
(
"budgetVerification.query"
)
@Function
(
"budgetVerification.query"
)
@ResponseBody
@ResponseBody
...
@@ -177,7 +190,24 @@ public class BudgetVerificationController{
...
@@ -177,7 +190,24 @@ public class BudgetVerificationController{
budgetVerificationService
.
queryByCondition
(
page
);
budgetVerificationService
.
queryByCondition
(
page
);
return
JsonResult
.
success
(
page
);
return
JsonResult
.
success
(
page
);
}
}
/* ajax json */
@PostMapping
(
MODEL
+
"/tjlist.json"
)
@Function
(
"budgetVerification.query"
)
@ResponseBody
public
JsonResult
<
PageQuery
>
tjlist
(
BudgetVerificationQuery
condtion
)
{
CoreUser
user
=
paltformService
.
getCurrentUser
();
CoreRole
role
=
paltformService
.
getRoleOfUser
(
user
.
getId
());
CoreOrg
org
=
recordService
.
getOrg
(
user
.
getOrgId
());
if
(
role
.
getId
().
intValue
()!=
204
)
{
condtion
.
setOrgId
(
org
.
getId
().
toString
());
}
PageQuery
page
=
condtion
.
getPageQuery
();
budgetVerificationService
.
queryByCondition
(
page
);
return
JsonResult
.
success
(
page
);
}
@SuppressWarnings
({
"static-access"
,
"rawtypes"
})
@SuppressWarnings
({
"static-access"
,
"rawtypes"
})
@PostMapping
(
MODEL
+
"/add.json"
)
@PostMapping
(
MODEL
+
"/add.json"
)
@Function
(
"budgetVerification.add"
)
@Function
(
"budgetVerification.add"
)
...
@@ -392,4 +422,39 @@ public class BudgetVerificationController{
...
@@ -392,4 +422,39 @@ public class BudgetVerificationController{
return
"成功"
;
return
"成功"
;
}
}
@PostMapping
(
MODEL
+
"/excel/export.json"
)
@Function
(
"budgetDeclaratio.export"
)
@ResponseBody
public
JsonResult
<
String
>
export
(
HttpServletResponse
response
,
BudgetVerificationQuery
condtion
)
{
/**
* 1)需要用你自己编写一个的excel模板
* 2)通常excel导出需要关联更多数据,因此budgetDeclaratioService.queryByCondition方法经常不符合需求,需要重写一个为模板导出的查询
* 3)参考ConsoleDictController来实现模板导入导出
*/
String
excelTemplate
=
"excelTemplates/dubget/申报执行导出.xls"
;
PageQuery
<
BudgetDeclaratio
>
page
=
condtion
.
getPageQuery
();
//取出全部符合条件的
page
.
setPageSize
(
Integer
.
MAX_VALUE
);
page
.
setPageNumber
(
1
);
page
.
setTotalRow
(
Integer
.
MAX_VALUE
);
//本次导出需要的数据
List
<
BudgetVerification
>
list
=
budgetVerificationService
.
queryByCondition
(
page
).
getList
();
try
(
InputStream
is
=
Thread
.
currentThread
().
getContextClassLoader
().
getResourceAsStream
(
excelTemplate
))
{
if
(
is
==
null
)
{
throw
new
PlatformException
(
"模板资源不存在:"
+
excelTemplate
);
}
FileItem
item
=
fileService
.
createFileTemp
(
"统计_"
+
DateUtil
.
now
(
"yyyyMMddHHmmss"
)+
".xls"
);
OutputStream
os
=
item
.
openOutpuStream
();
Context
context
=
new
Context
();
context
.
putVar
(
"list"
,
list
);
JxlsHelper
.
getInstance
().
processTemplate
(
is
,
os
,
context
);
os
.
close
();
//下载参考FileSystemContorller
return
JsonResult
.
success
(
item
.
getPath
());
}
catch
(
IOException
e
)
{
throw
new
PlatformException
(
e
.
getMessage
());
}
}
}
}
src/main/java/com/corp/cyyy/dubget/web/query/BudgetVerificationQuery.java
View file @
fc46454e
...
@@ -14,6 +14,18 @@ public class BudgetVerificationQuery extends PageParam {
...
@@ -14,6 +14,18 @@ public class BudgetVerificationQuery extends PageParam {
private
String
deptName
;
private
String
deptName
;
@Query
(
type
=
Query
.
TYPE_DICT
,
name
=
"类型"
,
dict
=
"OAtype"
,
display
=
true
)
@Query
(
type
=
Query
.
TYPE_DICT
,
name
=
"类型"
,
dict
=
"OAtype"
,
display
=
true
)
private
String
type
;
private
String
type
;
@Query
(
type
=
Query
.
TYPE_DICT
,
name
=
"进度"
,
dict
=
"zxtype"
,
display
=
true
)
private
String
state
;
public
String
getState
()
{
return
state
;
}
public
void
setState
(
String
state
)
{
this
.
state
=
state
;
}
private
String
orgId
;
private
String
orgId
;
public
String
getOrgId
()
{
public
String
getOrgId
()
{
...
...
src/main/resources/excelTemplates/dubget/申报执行导出.xls
0 → 100644
View file @
fc46454e
File added
src/main/resources/sql/dubget/budgetVerification.md
View file @
fc46454e
...
@@ -25,6 +25,9 @@ queryByCondition
...
@@ -25,6 +25,9 @@ queryByCondition
@if(!isEmpty(orgId)){
@if(!isEmpty(orgId)){
and t.DEPT_ID = #orgId#
and t.DEPT_ID = #orgId#
@}
@}
@if(!isEmpty(state)){
and t.state = #state#
@}
ORDER BY t.IMPLEMENT_TIME DESC
ORDER BY t.IMPLEMENT_TIME DESC
batchDelBudgetVerificationByIds
batchDelBudgetVerificationByIds
...
...
src/main/resources/static/js/dubget/budgetVerification/budgetVerificationApi.js
View file @
fc46454e
...
@@ -17,6 +17,12 @@ layui.define([], function(exports) {
...
@@ -17,6 +17,12 @@ layui.define([], function(exports) {
Common
.
post
(
"/dubget/budgetVerification/delete.json"
,{
"ids"
:
ids
},
function
(){
Common
.
post
(
"/dubget/budgetVerification/delete.json"
,{
"ids"
:
ids
},
function
(){
callback
();
callback
();
})
})
}
,
exportExcel
:
function
(
form
,
callback
){
var
formPara
=
form
.
serializeJson
();
Common
.
post
(
"/dubget/budgetVerification/excel/export.json"
,
formPara
,
function
(
fileId
)
{
callback
(
fileId
);
})
}
}
};
};
...
...
src/main/resources/static/js/dubget/budgetVerification/tjindex.js
0 → 100644
View file @
fc46454e
layui
.
define
([
'form'
,
'laydate'
,
'table'
],
function
(
exports
)
{
var
form
=
layui
.
form
;
var
laydate
=
layui
.
laydate
;
var
table
=
layui
.
table
;
var
budgetVerificationTable
=
null
;
var
view
=
{
init
:
function
(){
this
.
initTable
();
this
.
initSearchForm
();
this
.
initToolBar
();
window
.
dataReload
=
function
(){
Lib
.
doSearchForm
(
$
(
"#searchForm"
),
budgetVerificationTable
)
}
},
initTable
:
function
(){
budgetVerificationTable
=
table
.
render
({
elem
:
'#budgetVerificationTable'
,
height
:
Lib
.
getTableHeight
(
1
),
cellMinWidth
:
100
,
method
:
'post'
,
url
:
Common
.
ctxPath
+
'/dubget/budgetVerification/tjlist.json'
// 数据接口
,
page
:
Lib
.
tablePage
// 开启分页
,
limit
:
10
,
cols
:
[
[
// 表头
{
type
:
'checkbox'
,
fixed
:
'left'
,
},
{
field
:
'deptName'
,
title
:
'科室名称'
,
},
{
field
:
'number'
,
title
:
'预算编号'
,
},
{
field
:
'implementMatter'
,
title
:
'执行事项'
,
},
{
field
:
'execute'
,
title
:
'执行金额'
,
},
{
field
:
'chargeOff'
,
title
:
'核销金额'
,
},
{
field
:
'stateText'
,
title
:
'状态'
,
},
{
title
:
'操作'
,
//rowspan: 2,
align
:
'center'
,
fixed
:
'right'
,
minWidth
:
'160'
,
templet
:
function
(
d
)
{
edit
=
'<button type="button" class="layui-btn layui-btn-sm layui-btn-warm" lay-event="view" title="查看">查看</button>'
;
return
edit
;
}
}
]
]
});
table
.
on
(
'tool(budgetVerificationTable)'
,
function
(
obj
){
var
budget
=
obj
.
data
;
if
(
obj
.
event
===
'dit'
){
var
url
=
"/dubget/budgetVerification/audit.do?id="
+
budget
.
id
;
Common
.
openDlg
(
url
,
"执行管理>编辑"
);
}
else
if
(
obj
.
event
===
'view'
){
var
url
=
"/dubget/budgetVerification/view.do?id="
+
budget
.
id
;
Common
.
openDlg
(
url
,
"执行管理>编辑"
);
}
})
},
initSearchForm
:
function
(){
Lib
.
initSearchForm
(
$
(
"#searchForm"
),
budgetVerificationTable
,
form
);
},
initToolBar
:
function
(){
toolbar
=
{
add
:
function
()
{
// 获取选中数据
var
checkStatus
=
table
.
checkStatus
(
'budgetVerificationTable'
),
data
=
checkStatus
.
data
;
var
myCars
=
new
Array
();
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
myCars
[
i
]
=
data
[
i
].
id
;
}
$
.
post
(
Common
.
ctxPath
+
'/dubget/budget/Onekey.json'
,{
ids
:
myCars
.
toString
()},
function
(
result
){
parent
.
window
.
dataReload
();
Common
.
info
(
"保存成功"
);
budgetVerificationTable
.
reload
({});
});
},
edit
:
function
()
{
// 获取选中数目
var
data
=
Common
.
getOneFromTable
(
table
,
"budgetVerificationTable"
);
if
(
data
==
null
){
return
;
}
var
url
=
"/dubget/budgetVerification/edit.do?id="
+
data
.
id
;
Common
.
openDlg
(
url
,
"执行子表管理>"
+
data
.
id
+
">编辑"
);
},
del
:
function
()
{
layui
.
use
([
'del'
],
function
(){
var
delView
=
layui
.
del
delView
.
delBatch
();
});
},
exportDocument
:
function
()
{
layui
.
use
([
'budgetVerificationApi'
],
function
()
{
var
budgetVerificationApi
=
layui
.
budgetVerificationApi
Common
.
openConfirm
(
"确认要导出这些预算申报数据?"
,
function
()
{
budgetVerificationApi
.
exportExcel
(
$
(
"#searchForm"
),
function
(
fileId
)
{
Lib
.
download
(
fileId
);
})
})
});
}
};
$
(
'.ext-toolbar'
).
on
(
'click'
,
function
()
{
var
type
=
$
(
this
).
data
(
'type'
);
toolbar
[
type
]
?
toolbar
[
type
].
call
(
this
)
:
''
;
});
}
}
exports
(
'tjindex'
,
view
);
});
\ No newline at end of file
src/main/resources/templates/dubget/budgetVerification/tjindex.html
0 → 100644
View file @
fc46454e
<!--#layout("/common/layout.html",{"jsBase":"/js/dubget/budgetVerification/"}){ -->
<layui:searchForm
formId=
"searchForm"
condition=
"${search}"
>
</layui:searchForm>
<input
type=
"hidden"
id=
"budgetId"
name=
"budgetId"
class=
"layui-input"
value=
"${budgetId}"
>
<layui:accessButton
function=
"budgetVerification.exportDocument"
action=
"exportDocument"
>
导出全部
</layui:accessButton>
<table
id=
"budgetVerificationTable"
lay-filter=
"budgetVerificationTable"
></table>
<!--#} -->
<script>
layui
.
use
([
'tjindex'
],
function
(){
var
index
=
layui
.
tjindex
index
.
init
();
});
</script>
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