Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sunac_report
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
java-sunac-report
sunac_report
Commits
f4520004
Commit
f4520004
authored
Aug 26, 2019
by
sunxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基础资料 筛选条件增加
parent
d43e465c
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
152 additions
and
4 deletions
+152
-4
CtBbtcBusCategoryController.java
src/main/java/com/ejweb/modules/report/web/CtBbtcBusCategoryController.java
+16
-0
CtBbtcRegionController.java
src/main/java/com/ejweb/modules/report/web/CtBbtcRegionController.java
+1
-1
SysUserController.java
src/main/java/com/ejweb/modules/sys/web/SysUserController.java
+5
-0
CtBbtcBusCategoryDao.xml
src/main/resources/mappings/modules/report/CtBbtcBusCategoryDao.xml
+9
-1
CtBbtcRegionDao.xml
src/main/resources/mappings/modules/report/CtBbtcRegionDao.xml
+3
-0
UserDao.xml
src/main/resources/mappings/modules/sys/UserDao.xml
+2
-0
ctBbtcBusCategoryList.jsp
src/main/webapp/WEB-INF/views/modules/report/ctBbtcBusCategoryList.jsp
+105
-2
ctBbtcRegionList.jsp
src/main/webapp/WEB-INF/views/modules/report/ctBbtcRegionList.jsp
+7
-0
userForm.jsp
src/main/webapp/WEB-INF/views/modules/sys/userForm.jsp
+4
-0
No files found.
src/main/java/com/ejweb/modules/report/web/CtBbtcBusCategoryController.java
View file @
f4520004
...
...
@@ -14,6 +14,7 @@ import com.ejweb.modules.report.entity.CtBbtcRegion;
import
com.ejweb.modules.report.entity.ReportEntity
;
import
com.ejweb.modules.report.service.CtBbtcBusCategoryService
;
import
com.ejweb.modules.report.service.CtBbtcBusTypeService
;
import
com.ejweb.modules.report.service.CtBbtcRegionService
;
import
com.ejweb.modules.report.service.ReportService
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -50,6 +51,9 @@ public class CtBbtcBusCategoryController extends BaseController {
private
CtBbtcBusTypeService
ctBbtcBusTypeService
;
@Autowired
private
CtBbtcRegionService
ctBbtcRegionService
;
@Autowired
private
ReportService
reportService
;
@ModelAttribute
...
...
@@ -102,6 +106,18 @@ public class CtBbtcBusCategoryController extends BaseController {
public
String
list
(
CtBbtcBusCategory
ctBbtcBusCategory
,
HttpServletRequest
request
,
HttpServletResponse
response
,
Model
model
)
{
Page
<
CtBbtcBusCategory
>
page
=
ctBbtcBusCategoryService
.
findPage
(
new
Page
<
CtBbtcBusCategory
>(
request
,
response
),
ctBbtcBusCategory
);
model
.
addAttribute
(
"page"
,
page
);
/*回显查询条件*/
if
(
StringUtils
.
isNotBlank
(
ctBbtcBusCategory
.
getSupplementArea
())){
CtBbtcRegion
ctBbtcRegion
=
ctBbtcRegionService
.
get
(
ctBbtcBusCategory
.
getSupplementArea
());
ctBbtcBusCategory
.
setSupplementArea
(
ctBbtcRegion
.
getName
());
}
if
(
StringUtils
.
isNotBlank
(
ctBbtcBusCategory
.
getTypeName
())){
CtBbtcBusType
ctBbtcBusType
=
ctBbtcBusTypeService
.
get
(
ctBbtcBusCategory
.
getTypeName
());
ctBbtcBusCategory
.
setTypeName
(
ctBbtcBusType
.
getName
());
}
model
.
addAttribute
(
"ctBbtcBusCategory"
,
ctBbtcBusCategory
);
return
"modules/report/ctBbtcBusCategoryList"
;
}
...
...
src/main/java/com/ejweb/modules/report/web/CtBbtcRegionController.java
View file @
f4520004
...
...
@@ -66,7 +66,7 @@ public class CtBbtcRegionController extends BaseController {
@RequiresPermissions
(
"report:ctBbtcRegion:view"
)
@RequestMapping
(
value
=
{
"list"
,
""
})
public
String
list
(
CtBbtcRegion
ctBbtcRegion
,
HttpServletRequest
request
,
HttpServletResponse
response
,
Model
model
)
{
Page
<
CtBbtcRegion
>
page
=
ctBbtcRegionService
.
findPage
(
new
Page
<
CtBbtcRegion
>(
request
,
response
),
ctBbtcRegion
);
Page
<
CtBbtcRegion
>
page
=
ctBbtcRegionService
.
findPage
(
new
Page
<
CtBbtcRegion
>(
request
,
response
),
ctBbtcRegion
);
model
.
addAttribute
(
"page"
,
page
);
return
"modules/report/ctBbtcRegionList"
;
}
...
...
src/main/java/com/ejweb/modules/sys/web/SysUserController.java
View file @
f4520004
...
...
@@ -84,6 +84,11 @@ public class SysUserController extends BaseController {
if
(
user
.
getOffice
()==
null
||
user
.
getOffice
().
getId
()==
null
){
user
.
setOffice
(
UserUtils
.
getUser
().
getOffice
());
}
/*跟据id查询 */
if
(
StringUtils
.
isNotBlank
(
user
.
getId
())){
user
=
systemService
.
getUser
(
user
.
getId
());
}
model
.
addAttribute
(
"user"
,
user
);
List
<
Role
>
roleList
=
systemService
.
findAllRole
();
for
(
int
i
=
roleList
.
size
()
-
1
;
i
>
0
;
i
--)
{
...
...
src/main/resources/mappings/modules/report/CtBbtcBusCategoryDao.xml
View file @
f4520004
...
...
@@ -41,7 +41,15 @@
FROM ct_bbtc_bus_category a
<include
refid=
"ctBbtcBusCategoryJoins"
/>
<where>
<if
test=
"ctBbtcGroup != null and ctBbtcGroup != ''"
>
AND a.ctBbtcGroup = #{ctBbtcGroup}
</if>
<if
test=
"typeName != null and typeName != ''"
>
AND a.type = #{typeName}
</if>
<if
test=
"supplementArea != null and supplementArea != ''"
>
AND a.supplementArea = #{supplementArea}
</if>
<if
test=
"name != null and name != ''"
>
AND a.name LIKE
<if
test=
"dbName == 'oracle'"
>
'%'||#{name}||'%'
</if>
...
...
src/main/resources/mappings/modules/report/CtBbtcRegionDao.xml
View file @
f4520004
...
...
@@ -44,6 +44,9 @@
<if
test=
"dbName == 'mssql'"
>
'%'+#{name}+'%'
</if>
<if
test=
"dbName == 'mysql'"
>
concat('%',#{name},'%')
</if>
</if>
<if
test=
"group != null and group != ''"
>
AND a.supplement_group = #{group}
</if>
</where>
<choose>
<when
test=
"page !=null and page.orderBy != null and page.orderBy != ''"
>
...
...
src/main/resources/mappings/modules/sys/UserDao.xml
View file @
f4520004
...
...
@@ -136,8 +136,10 @@
<select
id=
"get"
resultType=
"User"
>
SELECT
<include
refid=
"userColumns"
/>
,cr.name AS areaName
FROM ct_bbtc_sys_user a
<include
refid=
"userJoins"
/>
LEFT JOIN ct_bbtc_region CR ON a.area = CR.id
WHERE a.id = #{id}
</select>
...
...
src/main/webapp/WEB-INF/views/modules/report/ctBbtcBusCategoryList.jsp
View file @
f4520004
...
...
@@ -6,7 +6,8 @@
<meta
name=
"decorator"
content=
"default"
/>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
getRegion
();
getType
();
});
function
page
(
n
,
s
){
$
(
"#pageNo"
).
val
(
n
);
...
...
@@ -14,6 +15,84 @@
$
(
"#searchForm"
).
submit
();
return
false
;
}
function
getRegion
(){
var
selectNode
=
$
(
"#supplementArea"
);
selectNode
.
empty
();
//每次需要将上一次的数据进行清空
$
(
"#supplementArea"
).
append
(
"<option value=''>请选择</option>"
);
var
ts_describe
=
$
(
"#supplementGroup"
).
val
();
if
(
ts_describe
!=
null
&&
ts_describe
!=
''
){
$
.
ajax
({
type
:
"POST"
,
url
:
"${ctx}/report/ctBbtcRegion/getRegionList?groupId="
+
ts_describe
,
dataType
:
"json"
,
success
:
function
(
returnedData
)
{
var
data1
=
returnedData
.
ctBbtcRegionList
;
// console.log(data1[0].name);
// console.log(data2[0].name);
/* var selectNode = $("#area");
selectNode.empty();//每次需要将上一次的数据进行清空
$("#area").append("<option value=''>请选择</option>");*/
if
(
data1
!=
''
)
{
var
slsb
=
document
.
getElementById
(
"supplementArea"
);
for
(
var
i
=
0
;
i
<
data1
.
length
;
i
++
){
slsb
.
append
(
new
Option
(
data1
[
i
].
name
,
data1
[
i
].
id
));
}
}
var
area
=
"${ctBbtcBusCategory.supplementArea}"
;
if
(
area
!=
null
&&
area
!=
''
){
$
(
"#supplementArea"
).
val
(
area
);
}
},
error
:
function
(
data
){
alert
(
系统错误
);
}
});
}
else
{
/* top.$.jBox.tip('请选择被举报集团', 'warning');*/
}
}
/*跟据 集团区域 查询类型*/
function
getType
(){
var
selectNode
=
$
(
"#supplementType"
);
selectNode
.
empty
();
//每次需要将上一次的数据进行清空
selectNode
.
append
(
"<option value=''>请选择</option>"
);
var
ts_describe1
=
$
(
"#supplementGroup"
).
val
();
var
ts_describe2
=
$
(
"#supplementArea"
).
val
();
if
(
ts_describe1
!=
null
&&
ts_describe1
!=
''
&&
ts_describe2
!=
null
&&
ts_describe2
!=
''
){
$
.
ajax
({
type
:
"POST"
,
url
:
"${ctx}/report/ctBbtcBusType/getTypeList?groupId="
+
ts_describe1
+
"&area="
+
ts_describe2
,
dataType
:
"json"
,
success
:
function
(
returnedData
)
{
var
data2
=
returnedData
.
ctBbtcTypeList
;
if
(
data2
!=
''
)
{
var
slsb
=
document
.
getElementById
(
"supplementType"
);
for
(
var
i
=
0
;
i
<
data2
.
length
;
i
++
){
slsb
.
append
(
new
Option
(
data2
[
i
].
typeName
,
data2
[
i
].
parentId
));
}
}
var
type
=
"${ctBbtcBusCategory.typeName}"
;
if
(
type
!=
null
&&
type
!=
''
){
$
(
"#supplementType"
).
val
(
type
);
}
},
error
:
function
(
data
){
alert
(
"系统错误"
);
}
});
}
else
{
/*top.$.jBox.tip('请选择所属集团', 'warning');*/
}
}
function
resetPageNo
()
{
$
(
"#pageNo"
).
val
(
0
);
}
</script>
</head>
<body>
...
...
@@ -25,11 +104,35 @@
<input
id=
"pageNo"
name=
"pageNo"
type=
"hidden"
value=
"${page.pageNo}"
/>
<input
id=
"pageSize"
name=
"pageSize"
type=
"hidden"
value=
"${page.pageSize}"
/>
<ul
class=
"ul-form"
>
<li><label
style=
"width: auto;"
>
业务类别名称:
</label>
<li><label>
所属集团:
</label>
<form:select
id=
"supplementGroup"
path=
"ctBbtcGroup"
class=
"input-small required"
onchange=
"getRegion()"
cssStyle=
"width: 160px"
>
<form:option
value=
""
>
请选择
</form:option>
<form:options
items=
"${fns:getDictList('supplement_group')}"
itemLabel=
"label"
itemValue=
"id"
htmlEscape=
"false"
/>
</form:select>
</li>
<li><label>
所属区域:
</label>
<
%
--
<
select
id=
"supplementArea"
path=
"supplementArea"
class=
"input-small required"
onchange=
"resetPageNo();"
>
<option
value=
""
>
请选择
</option>
<
%
–
<options
items=
"${ctBbtcRegionList}"
itemLabel=
"name"
itemValue=
"id"
&
ndash
;%&
gt
;
&
lt
;%&
ndash
;
htmlEscape=
"false"
/></select>
–
%
>
</select>
--%>
<form:select
id=
"supplementArea"
onchange=
"getType();"
path=
"supplementArea"
class=
"input-medium "
cssStyle=
"width: 160px"
htmlEscape=
"false"
>
<form:option
value=
""
>
请选择
</form:option>
</form:select>
</li>
<li><label>
业务类型:
</label>
<form:select
id=
"supplementType"
onchange=
"resetPageNo();"
path=
"typeName"
class=
"input-small required"
cssStyle=
"width: 160px"
>
<form:option
value=
""
>
请选择
</form:option>
</form:select>
</li>
<li>
<label
style=
"width: auto;"
>
业务类别名称:
</label>
<form:input
path=
"name"
htmlEscape=
"false"
maxlength=
"255"
class=
"input-medium"
/>
</li>
<li
class=
"btns"
><input
id=
"btnSubmit"
class=
"btn btn-primary"
type=
"submit"
value=
"查询"
/></li>
<li
class=
"clearfix"
></li>
</ul>
</form:form>
<sys:message
content=
"${message}"
/>
...
...
src/main/webapp/WEB-INF/views/modules/report/ctBbtcRegionList.jsp
View file @
f4520004
...
...
@@ -25,6 +25,13 @@
<input
id=
"pageNo"
name=
"pageNo"
type=
"hidden"
value=
"${page.pageNo}"
/>
<input
id=
"pageSize"
name=
"pageSize"
type=
"hidden"
value=
"${page.pageSize}"
/>
<ul
class=
"ul-form"
>
<li><label>
所属集团:
</label>
<form:select
onchange=
"resetPageNo();"
path=
"group"
class=
"input-xlarge required"
cssStyle=
"width: 230px"
>
<form:option
value=
""
>
请选择
</form:option>
<form:options
items=
"${fns:getDictList('supplement_group')}"
itemLabel=
"label"
itemValue=
"id"
htmlEscape=
"false"
/>
</form:select>
</li>
<li><label>
区域名称:
</label>
<form:input
path=
"name"
htmlEscape=
"false"
maxlength=
"255"
class=
"input-medium"
/>
</li>
...
...
src/main/webapp/WEB-INF/views/modules/sys/userForm.jsp
View file @
f4520004
...
...
@@ -55,6 +55,10 @@
slsb
.
append
(
new
Option
(
data1
[
i
].
name
,
data1
[
i
].
id
));
}
}
var
supplementArea
=
"${user.areaName}"
;
if
(
supplementArea
!=
null
&&
supplementArea
!=
''
){
$
(
"#supplementArea"
).
val
(
supplementArea
);
}
},
error
:
function
(
data
){
alert
(
"系统错误"
);
}
...
...
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