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
77b9efc4
Commit
77b9efc4
authored
Aug 22, 2019
by
sunxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
类型 类别 需求变更
parent
c303d94c
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
290 additions
and
59 deletions
+290
-59
CrudService.java
src/main/java/com/ejweb/core/service/CrudService.java
+1
-0
CtBbtcBusCategory.java
src/main/java/com/ejweb/modules/report/entity/CtBbtcBusCategory.java
+9
-0
CtBbtcBusType.java
src/main/java/com/ejweb/modules/report/entity/CtBbtcBusType.java
+12
-1
CtBbtcBusTypeService.java
src/main/java/com/ejweb/modules/report/service/CtBbtcBusTypeService.java
+32
-5
CtBbtcBusCategoryController.java
src/main/java/com/ejweb/modules/report/web/CtBbtcBusCategoryController.java
+5
-0
CtBbtcBusTypeController.java
src/main/java/com/ejweb/modules/report/web/CtBbtcBusTypeController.java
+21
-0
CtBbtcRegionController.java
src/main/java/com/ejweb/modules/report/web/CtBbtcRegionController.java
+0
-3
CtBbtcBusCategoryDao.xml
src/main/resources/mappings/modules/report/CtBbtcBusCategoryDao.xml
+9
-4
CtBbtcBusTypeDao.xml
src/main/resources/mappings/modules/report/CtBbtcBusTypeDao.xml
+12
-29
ctBbtcBusCategoryForm.jsp
src/main/webapp/WEB-INF/views/modules/report/ctBbtcBusCategoryForm.jsp
+45
-8
ctBbtcBusCategoryList.jsp
src/main/webapp/WEB-INF/views/modules/report/ctBbtcBusCategoryList.jsp
+4
-0
ctBbtcBusTypeForm.jsp
src/main/webapp/WEB-INF/views/modules/report/ctBbtcBusTypeForm.jsp
+140
-5
ctBbtcBusTypeList.jsp
src/main/webapp/WEB-INF/views/modules/report/ctBbtcBusTypeList.jsp
+0
-4
No files found.
src/main/java/com/ejweb/core/service/CrudService.java
View file @
77b9efc4
...
@@ -83,6 +83,7 @@ public abstract class CrudService<D extends CrudDao<T>, T extends DataEntity<T>>
...
@@ -83,6 +83,7 @@ public abstract class CrudService<D extends CrudDao<T>, T extends DataEntity<T>>
public
void
save
(
T
entity
)
{
public
void
save
(
T
entity
)
{
if
(
entity
.
getIsNewRecord
()){
if
(
entity
.
getIsNewRecord
()){
entity
.
preInsert
();
entity
.
preInsert
();
dao
.
insert
(
entity
);
dao
.
insert
(
entity
);
}
else
{
}
else
{
entity
.
preUpdate
();
entity
.
preUpdate
();
...
...
src/main/java/com/ejweb/modules/report/entity/CtBbtcBusCategory.java
View file @
77b9efc4
...
@@ -20,6 +20,15 @@ public class CtBbtcBusCategory extends DataEntity<CtBbtcBusCategory> {
...
@@ -20,6 +20,15 @@ public class CtBbtcBusCategory extends DataEntity<CtBbtcBusCategory> {
private
CtBbtcBusType
type
;
// 所属业务类型
private
CtBbtcBusType
type
;
// 所属业务类型
private
String
typeName
;
// 所属业务类型名称
private
String
typeName
;
// 所属业务类型名称
private
String
ctBbtcGroup
;
//所属集团
private
String
ctBbtcGroup
;
//所属集团
private
String
supplementArea
;
//所属区域
public
String
getSupplementArea
()
{
return
supplementArea
;
}
public
void
setSupplementArea
(
String
supplementArea
)
{
this
.
supplementArea
=
supplementArea
;
}
public
String
getCtBbtcGroup
()
{
public
String
getCtBbtcGroup
()
{
return
ctBbtcGroup
;
return
ctBbtcGroup
;
...
...
src/main/java/com/ejweb/modules/report/entity/CtBbtcBusType.java
View file @
77b9efc4
...
@@ -19,6 +19,16 @@ public class CtBbtcBusType extends DataEntity<CtBbtcBusType> {
...
@@ -19,6 +19,16 @@ public class CtBbtcBusType extends DataEntity<CtBbtcBusType> {
private
String
name
;
// 业务类型名称
private
String
name
;
// 业务类型名称
private
String
group
;
// 所属集团
private
String
group
;
// 所属集团
private
String
groupName
;
// 所属集团名称
private
String
groupName
;
// 所属集团名称
private
String
area
;
//区域
public
String
getArea
()
{
return
area
;
}
public
void
setArea
(
String
area
)
{
this
.
area
=
area
;
}
public
CtBbtcBusType
()
{
public
CtBbtcBusType
()
{
super
();
super
();
}
}
...
@@ -45,7 +55,7 @@ public class CtBbtcBusType extends DataEntity<CtBbtcBusType> {
...
@@ -45,7 +55,7 @@ public class CtBbtcBusType extends DataEntity<CtBbtcBusType> {
this
.
name
=
name
;
this
.
name
=
name
;
}
}
@Length
(
min
=
0
,
max
=
64
,
message
=
"所属集团长度必须介于 0 和 64
之间"
)
@Length
(
min
=
0
,
max
=
1000
,
message
=
"所属集团长度必须介于 0 和 1000
之间"
)
public
String
getGroup
()
{
public
String
getGroup
()
{
return
group
;
return
group
;
}
}
...
@@ -53,6 +63,7 @@ public class CtBbtcBusType extends DataEntity<CtBbtcBusType> {
...
@@ -53,6 +63,7 @@ public class CtBbtcBusType extends DataEntity<CtBbtcBusType> {
public
void
setGroup
(
String
group
)
{
public
void
setGroup
(
String
group
)
{
this
.
group
=
group
;
this
.
group
=
group
;
}
}
public
String
getGroupName
()
{
public
String
getGroupName
()
{
return
groupName
;
return
groupName
;
}
}
...
...
src/main/java/com/ejweb/modules/report/service/CtBbtcBusTypeService.java
View file @
77b9efc4
...
@@ -4,9 +4,12 @@
...
@@ -4,9 +4,12 @@
package
com
.
ejweb
.
modules
.
report
.
service
;
package
com
.
ejweb
.
modules
.
report
.
service
;
import
java.util.List
;
import
java.util.List
;
import
java.util.UUID
;
import
com.ejweb.modules.report.dao.CtBbtcRegionDao
;
import
com.ejweb.modules.report.dao.CtBbtcRegionDao
;
import
com.ejweb.modules.report.dao.CtBbtcTypeAreaDao
;
import
com.ejweb.modules.report.entity.CtBbtcRegion
;
import
com.ejweb.modules.report.entity.CtBbtcRegion
;
import
com.ejweb.modules.report.entity.CtBbtcTypeArea
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -28,6 +31,9 @@ public class CtBbtcBusTypeService extends CrudService<CtBbtcBusTypeDao, CtBbtcBu
...
@@ -28,6 +31,9 @@ public class CtBbtcBusTypeService extends CrudService<CtBbtcBusTypeDao, CtBbtcBu
@Autowired
@Autowired
private
CtBbtcBusTypeDao
ctBbtcBusTypeDao
;
private
CtBbtcBusTypeDao
ctBbtcBusTypeDao
;
@Autowired
private
CtBbtcTypeAreaDao
ctBbtcTypeAreaDao
;
public
CtBbtcBusType
get
(
String
id
)
{
public
CtBbtcBusType
get
(
String
id
)
{
return
super
.
get
(
id
);
return
super
.
get
(
id
);
}
}
...
@@ -43,6 +49,32 @@ public class CtBbtcBusTypeService extends CrudService<CtBbtcBusTypeDao, CtBbtcBu
...
@@ -43,6 +49,32 @@ public class CtBbtcBusTypeService extends CrudService<CtBbtcBusTypeDao, CtBbtcBu
@Transactional
(
readOnly
=
false
)
@Transactional
(
readOnly
=
false
)
public
void
save
(
CtBbtcBusType
ctBbtcBusType
)
{
public
void
save
(
CtBbtcBusType
ctBbtcBusType
)
{
super
.
save
(
ctBbtcBusType
);
super
.
save
(
ctBbtcBusType
);
/*将可用范围存到 typearea表中*/
System
.
out
.
println
(
ctBbtcBusType
.
getGroup
()+
"=========================="
);
System
.
out
.
println
(
ctBbtcBusType
.
getArea
()+
"========================="
);
String
[]
groups
=
ctBbtcBusType
.
getGroup
().
split
(
","
);
String
[]
areas
=
ctBbtcBusType
.
getArea
().
split
(
","
);
int
i
=
0
;
for
(
String
typeArea:
groups
)
{
CtBbtcTypeArea
ctBbtcTypeArea
=
new
CtBbtcTypeArea
();
ctBbtcTypeArea
.
setId
(
UUID
.
randomUUID
().
toString
());
ctBbtcTypeArea
.
setGroup
(
typeArea
);
ctBbtcTypeArea
.
setArea
(
areas
[
i
]);
ctBbtcTypeArea
.
setParentId
(
ctBbtcBusType
.
getId
());
ctBbtcTypeAreaDao
.
insert
(
ctBbtcTypeArea
);
i
++;
}
}
public
List
<
CtBbtcTypeArea
>
getByArea
(
String
groupId
,
String
areaId
){
CtBbtcTypeArea
area
=
new
CtBbtcTypeArea
();
area
.
setGroup
(
groupId
);
area
.
setArea
(
areaId
);
return
this
.
ctBbtcTypeAreaDao
.
getByAreaId
(
area
);
}
}
@Transactional
(
readOnly
=
false
)
@Transactional
(
readOnly
=
false
)
...
@@ -50,8 +82,4 @@ public class CtBbtcBusTypeService extends CrudService<CtBbtcBusTypeDao, CtBbtcBu
...
@@ -50,8 +82,4 @@ public class CtBbtcBusTypeService extends CrudService<CtBbtcBusTypeDao, CtBbtcBu
super
.
delete
(
ctBbtcBusType
);
super
.
delete
(
ctBbtcBusType
);
}
}
public
List
<
CtBbtcBusType
>
getByGroupId
(
String
groupId
){
return
this
.
ctBbtcBusTypeDao
.
getByGroupId
(
groupId
);
}
}
}
\ No newline at end of file
src/main/java/com/ejweb/modules/report/web/CtBbtcBusCategoryController.java
View file @
77b9efc4
...
@@ -109,6 +109,11 @@ public class CtBbtcBusCategoryController extends BaseController {
...
@@ -109,6 +109,11 @@ public class CtBbtcBusCategoryController extends BaseController {
@RequestMapping
(
value
=
"form"
)
@RequestMapping
(
value
=
"form"
)
public
String
form
(
CtBbtcBusCategory
ctBbtcBusCategory
,
Model
model
)
{
public
String
form
(
CtBbtcBusCategory
ctBbtcBusCategory
,
Model
model
)
{
List
<
CtBbtcBusType
>
ctBbtcBusTypeList
=
ctBbtcBusTypeService
.
findList
(
null
);
List
<
CtBbtcBusType
>
ctBbtcBusTypeList
=
ctBbtcBusTypeService
.
findList
(
null
);
if
(
ctBbtcBusCategory
.
getId
()
!=
null
){
CtBbtcBusCategory
ctBbtcBusCategory1
=
ctBbtcBusCategoryService
.
get
(
ctBbtcBusCategory
.
getId
());
ctBbtcBusCategory
.
setType
(
ctBbtcBusCategory1
.
getType
());
ctBbtcBusCategory
.
setTypeName
(
ctBbtcBusCategory1
.
getTypeName
());
}
model
.
addAttribute
(
"ctBbtcBusTypeList"
,
ctBbtcBusTypeList
);
model
.
addAttribute
(
"ctBbtcBusTypeList"
,
ctBbtcBusTypeList
);
model
.
addAttribute
(
"ctBbtcBusCategory"
,
ctBbtcBusCategory
);
model
.
addAttribute
(
"ctBbtcBusCategory"
,
ctBbtcBusCategory
);
return
"modules/report/ctBbtcBusCategoryForm"
;
return
"modules/report/ctBbtcBusCategoryForm"
;
...
...
src/main/java/com/ejweb/modules/report/web/CtBbtcBusTypeController.java
View file @
77b9efc4
...
@@ -3,12 +3,14 @@
...
@@ -3,12 +3,14 @@
*/
*/
package
com
.
ejweb
.
modules
.
report
.
web
;
package
com
.
ejweb
.
modules
.
report
.
web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.ejweb.core.base.BaseController
;
import
com.ejweb.core.base.BaseController
;
import
com.ejweb.core.persistence.Page
;
import
com.ejweb.core.persistence.Page
;
import
com.ejweb.core.utils.StringUtils
;
import
com.ejweb.core.utils.StringUtils
;
import
com.ejweb.modules.report.entity.CtBbtcBusType
;
import
com.ejweb.modules.report.entity.CtBbtcBusType
;
import
com.ejweb.modules.report.entity.CtBbtcRegion
;
import
com.ejweb.modules.report.entity.CtBbtcRegion
;
import
com.ejweb.modules.report.entity.CtBbtcTypeArea
;
import
com.ejweb.modules.report.entity.ReportEntity
;
import
com.ejweb.modules.report.entity.ReportEntity
;
import
com.ejweb.modules.report.service.CtBbtcBusTypeService
;
import
com.ejweb.modules.report.service.CtBbtcBusTypeService
;
import
com.ejweb.modules.report.service.ReportService
;
import
com.ejweb.modules.report.service.ReportService
;
...
@@ -24,6 +26,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
...
@@ -24,6 +26,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.PrintWriter
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -120,4 +123,21 @@ public class CtBbtcBusTypeController extends BaseController {
...
@@ -120,4 +123,21 @@ public class CtBbtcBusTypeController extends BaseController {
return
false
;
return
false
;
}
}
@RequestMapping
(
value
=
"getTypeList"
)
public
void
getRegionList
(
String
groupId
,
RedirectAttributes
redirectAttributes
,
HttpServletResponse
response
,
String
area
)
{
if
(
groupId
!=
null
&&
!
""
.
equals
(
groupId
)
&&
area
!=
null
&&
!
""
.
equals
(
area
))
{
JSONObject
res
=
new
JSONObject
();
List
<
CtBbtcTypeArea
>
ctBbtcTypeList
=
ctBbtcBusTypeService
.
getByArea
(
groupId
,
area
);
res
.
put
(
"ctBbtcTypeList"
,
ctBbtcTypeList
);
String
jsonStr
=
res
.
toJSONString
();
try
{
PrintWriter
out
=
response
.
getWriter
();
out
.
print
(
jsonStr
);
out
.
close
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
}
}
\ No newline at end of file
src/main/java/com/ejweb/modules/report/web/CtBbtcRegionController.java
View file @
77b9efc4
...
@@ -132,10 +132,7 @@ public class CtBbtcRegionController extends BaseController {
...
@@ -132,10 +132,7 @@ public class CtBbtcRegionController extends BaseController {
if
(
groupId
!=
null
&&
!
""
.
equals
(
groupId
)){
if
(
groupId
!=
null
&&
!
""
.
equals
(
groupId
)){
JSONObject
res
=
new
JSONObject
();
JSONObject
res
=
new
JSONObject
();
List
<
CtBbtcRegion
>
ctBbtcRegionList
=
ctBbtcRegionService
.
getByGroupId
(
groupId
);
List
<
CtBbtcRegion
>
ctBbtcRegionList
=
ctBbtcRegionService
.
getByGroupId
(
groupId
);
List
<
CtBbtcBusType
>
ctBbtcBusTypeList
=
ctBbtcBusTypeService
.
getByGroupId
(
groupId
);
res
.
put
(
"ctBbtcRegionList"
,
ctBbtcRegionList
);
res
.
put
(
"ctBbtcRegionList"
,
ctBbtcRegionList
);
res
.
put
(
"ctBbtcBusTypeList"
,
ctBbtcBusTypeList
);
String
jsonStr
=
res
.
toJSONString
();
String
jsonStr
=
res
.
toJSONString
();
try
{
try
{
PrintWriter
out
=
response
.
getWriter
();
PrintWriter
out
=
response
.
getWriter
();
...
...
src/main/resources/mappings/modules/report/CtBbtcBusCategoryDao.xml
View file @
77b9efc4
...
@@ -8,12 +8,14 @@
...
@@ -8,12 +8,14 @@
a.name AS "name",
a.name AS "name",
a.type AS "type.id",
a.type AS "type.id",
b.name AS "typeName",
b.name AS "typeName",
b2.label AS "ctBbtcGroup"
b2.label AS "ctBbtcGroup",
b3.name AS "supplementArea"
</sql>
</sql>
<sql
id=
"ctBbtcBusCategoryJoins"
>
<sql
id=
"ctBbtcBusCategoryJoins"
>
LEFT JOIN ct_bbtc_bus_type b on b.id = a.type
LEFT JOIN ct_bbtc_bus_type b on b.id = a.type
LEFT JOIN ct_bbtc_sys_dict b2 on b2.id = a.CTBBTCGROUP
LEFT JOIN ct_bbtc_sys_dict b2 on b2.id = a.CTBBTCGROUP
LEFT JOIN CT_BBTC_REGION b3 on b3.id = a.supplementArea
</sql>
</sql>
<select
id=
"get"
resultType=
"CtBbtcBusCategory"
>
<select
id=
"get"
resultType=
"CtBbtcBusCategory"
>
...
@@ -79,13 +81,15 @@
...
@@ -79,13 +81,15 @@
fnumber,
fnumber,
name,
name,
type,
type,
ctBbtcGroup
ctBbtcGroup,
supplementArea
) VALUES (
) VALUES (
#{id},
#{id},
#{number},
#{number},
#{name},
#{name},
#{type.id},
#{type.id},
#{ctBbtcGroup}
#{ctBbtcGroup},
#{supplementArea}
)
)
</insert>
</insert>
...
@@ -94,7 +98,8 @@
...
@@ -94,7 +98,8 @@
fnumber = #{number},
fnumber = #{number},
name = #{name},
name = #{name},
type = #{type.id},
type = #{type.id},
ctBbtcGroup=#{ctBbtcGroup}
ctBbtcGroup=#{ctBbtcGroup},
supplementArea=#{supplementArea}
WHERE id = #{id}
WHERE id = #{id}
</update>
</update>
...
...
src/main/resources/mappings/modules/report/CtBbtcBusTypeDao.xml
View file @
77b9efc4
...
@@ -3,34 +3,30 @@
...
@@ -3,34 +3,30 @@
<mapper
namespace=
"com.ejweb.modules.report.dao.CtBbtcBusTypeDao"
>
<mapper
namespace=
"com.ejweb.modules.report.dao.CtBbtcBusTypeDao"
>
<sql
id=
"ctBbtcBusTypeColumns"
>
<sql
id=
"ctBbtcBusTypeColumns"
>
a.id AS "id",
id AS "id",
a.fnumber AS "number",
fnumber AS "number",
a.name AS "name",
name AS "name"
a.supplement_group AS "group",
b.label AS "groupName"
</sql>
</sql>
<sql
id=
"ctBbtcBusTypeJoins"
>
<
!--<
sql id="ctBbtcBusTypeJoins">
LEFT JOIN ct_bbtc_sys_dict b on b.id = a.supplement_group
LEFT JOIN ct_bbtc_sys_dict b on b.id = a.supplement_group
</sql>
</sql>
-->
<select
id=
"get"
resultType=
"CtBbtcBusType"
>
<select
id=
"get"
resultType=
"CtBbtcBusType"
>
SELECT
SELECT
<include
refid=
"ctBbtcBusTypeColumns"
/>
<include
refid=
"ctBbtcBusTypeColumns"
/>
FROM ct_bbtc_bus_type a
FROM ct_bbtc_bus_type
<include
refid=
"ctBbtcBusTypeJoins"
/>
WHERE id = #{id}
WHERE a.id = #{id}
</select>
</select>
<select
id=
"findList"
resultType=
"CtBbtcBusType"
>
<select
id=
"findList"
resultType=
"CtBbtcBusType"
>
SELECT
SELECT
<include
refid=
"ctBbtcBusTypeColumns"
/>
<include
refid=
"ctBbtcBusTypeColumns"
/>
FROM ct_bbtc_bus_type a
FROM ct_bbtc_bus_type
<include
refid=
"ctBbtcBusTypeJoins"
/>
<where>
<where>
<if
test=
"name != null and name != ''"
>
<if
test=
"name != null and name != ''"
>
AND
a.name LIKE
AND
name LIKE
<if
test=
"dbName == 'oracle'"
>
'%'||#{name}||'%'
</if>
<if
test=
"dbName == 'oracle'"
>
'%'||#{name}||'%'
</if>
<if
test=
"dbName == 'mssql'"
>
'%'+#{name}+'%'
</if>
<if
test=
"dbName == 'mssql'"
>
'%'+#{name}+'%'
</if>
<if
test=
"dbName == 'mysql'"
>
concat('%',#{name},'%')
</if>
<if
test=
"dbName == 'mysql'"
>
concat('%',#{name},'%')
</if>
...
@@ -45,20 +41,10 @@
...
@@ -45,20 +41,10 @@
</choose>
</choose>
</select>
</select>
<select
id=
"getByGroupId"
resultType=
"CtBbtcBusType"
>
SELECT
<include
refid=
"ctBbtcBusTypeColumns"
/>
FROM ct_bbtc_bus_type a
<include
refid=
"ctBbtcBusTypeJoins"
/>
WHERE a.supplement_group = #{groupId}
</select>
<select
id=
"findAllList"
resultType=
"CtBbtcBusType"
>
<select
id=
"findAllList"
resultType=
"CtBbtcBusType"
>
SELECT
SELECT
<include
refid=
"ctBbtcBusTypeColumns"
/>
<include
refid=
"ctBbtcBusTypeColumns"
/>
FROM ct_bbtc_bus_type a
FROM ct_bbtc_bus_type
<include
refid=
"ctBbtcBusTypeJoins"
/>
<where>
<where>
</where>
</where>
...
@@ -75,13 +61,11 @@
...
@@ -75,13 +61,11 @@
INSERT INTO ct_bbtc_bus_type(
INSERT INTO ct_bbtc_bus_type(
id,
id,
fnumber,
fnumber,
name,
name
supplement_group
) VALUES (
) VALUES (
#{id},
#{id},
#{number},
#{number},
#{name},
#{name}
#{group}
)
)
</insert>
</insert>
...
@@ -89,7 +73,6 @@
...
@@ -89,7 +73,6 @@
UPDATE ct_bbtc_bus_type SET
UPDATE ct_bbtc_bus_type SET
fnumber = #{number},
fnumber = #{number},
name = #{name},
name = #{name},
supplement_group = #{group}
WHERE id = #{id}
WHERE id = #{id}
</update>
</update>
...
...
src/main/webapp/WEB-INF/views/modules/report/ctBbtcBusCategoryForm.jsp
View file @
77b9efc4
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
function
getRegion
(){
function
getRegion
(){
var
selectNode
=
$
(
"#supplement
Type
"
);
var
selectNode
=
$
(
"#supplement
Area
"
);
selectNode
.
empty
();
//每次需要将上一次的数据进行清空
selectNode
.
empty
();
//每次需要将上一次的数据进行清空
selectNode
.
append
(
"<option value=''>请选择</option>"
);
selectNode
.
append
(
"<option value=''>请选择</option>"
);
...
@@ -40,14 +40,10 @@
...
@@ -40,14 +40,10 @@
url
:
"${ctx}/report/ctBbtcRegion/getRegionList?groupId="
+
ts_describe
,
url
:
"${ctx}/report/ctBbtcRegion/getRegionList?groupId="
+
ts_describe
,
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
returnedData
)
{
success
:
function
(
returnedData
)
{
console
.
log
(
returnedData
);
var
data2
=
returnedData
.
ctBbtcRegionList
;
var
data2
=
returnedData
.
ctBbtcBusTypeList
;
// console.log(data1[0].name);
// console.log(data2[0].name);
if
(
data2
!=
''
)
{
if
(
data2
!=
''
)
{
console
.
log
(
data2
[
0
].
name
);
var
slsb
=
document
.
getElementById
(
"supplementArea"
);
var
slsb
=
document
.
getElementById
(
"supplementType"
);
for
(
var
i
=
0
;
i
<
data2
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
data2
.
length
;
i
++
){
slsb
.
append
(
new
Option
(
data2
[
i
].
name
,
data2
[
i
].
id
));
slsb
.
append
(
new
Option
(
data2
[
i
].
name
,
data2
[
i
].
id
));
}
}
...
@@ -61,6 +57,37 @@
...
@@ -61,6 +57,37 @@
}
}
}
}
function
getType
(){
var
selectNode
=
$
(
"#supplementType"
);
selectNode
.
empty
();
//每次需要将上一次的数据进行清空
selectNode
.
append
(
"<option value=''>请选择</option>"
);
var
ts_describe1
=
$
(
"#ctBbtcGroup"
).
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
));
}
}
},
error
:
function
(
data
){
alert
(
"系统错误"
);
}
});
}
else
{
/*top.$.jBox.tip('请选择所属集团', 'warning');*/
}
}
</script>
</script>
</head>
</head>
<body>
<body>
...
@@ -97,11 +124,21 @@
...
@@ -97,11 +124,21 @@
<span
class=
"help-inline"
><font
color=
"red"
>
*
</font>
</span>
<span
class=
"help-inline"
><font
color=
"red"
>
*
</font>
</span>
</div>
</div>
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
所属区域:
</label>
<div
class=
"controls"
>
<form:select
id=
"supplementArea"
path=
"supplementArea"
class=
"input-small required"
onchange=
"getType();"
cssStyle=
"width: 285px"
>
<form:option
value=
""
>
请选择
</form:option>
</form:select>
<span
class=
"help-inline"
><font
color=
"red"
>
*
</font>
</span>
</div>
</div>
<div
class=
"control-group"
>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
所属业务类型:
</label>
<label
class=
"control-label"
>
所属业务类型:
</label>
<div
class=
"controls"
>
<div
class=
"controls"
>
<form:select
onchange=
"resetPageNo();"
path=
"type.id"
class=
"input-xlarge required"
id=
"supplementType"
cssStyle=
"width: 285px"
>
<form:select
onchange=
"resetPageNo();"
path=
"type.id"
class=
"input-xlarge required"
id=
"supplementType"
cssStyle=
"width: 285px"
>
<
form:option
value=
""
>
请选择
</form:option
>
<
%
--
<
form:option
value=
""
>
请选择
</form:option>
--%
>
</form:select>
</form:select>
<
%
--
<
form:input
path=
"type"
htmlEscape=
"false"
maxlength=
"64"
class=
"input-xlarge "
/>
--%>
<
%
--
<
form:input
path=
"type"
htmlEscape=
"false"
maxlength=
"64"
class=
"input-xlarge "
/>
--%>
<span
class=
"help-inline"
><font
color=
"red"
>
*
</font>
</span>
<span
class=
"help-inline"
><font
color=
"red"
>
*
</font>
</span>
...
...
src/main/webapp/WEB-INF/views/modules/report/ctBbtcBusCategoryList.jsp
View file @
77b9efc4
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
<th>
业务类别编码
</th>
<th>
业务类别编码
</th>
<th>
业务类别名称
</th>
<th>
业务类别名称
</th>
<th>
所属集团
</th>
<th>
所属集团
</th>
<th>
所属区域
</th>
<th>
所属业务类型
</th>
<th>
所属业务类型
</th>
<shiro:hasPermission
name=
"report:ctBbtcBusCategory:edit"
><th>
操作
</th></shiro:hasPermission>
<shiro:hasPermission
name=
"report:ctBbtcBusCategory:edit"
><th>
操作
</th></shiro:hasPermission>
</tr>
</tr>
...
@@ -62,6 +63,9 @@
...
@@ -62,6 +63,9 @@
<c:if
test=
"${ctBbtcBusCategory.ctBbtcGroup eq null}"
>
--
</c:if>
<c:if
test=
"${ctBbtcBusCategory.ctBbtcGroup eq null}"
>
--
</c:if>
</td>
</td>
<td>
<td>
${ctBbtcBusCategory.supplementArea}
</td>
<td>
${ctBbtcBusCategory.typeName}
${ctBbtcBusCategory.typeName}
</td>
</td>
<shiro:hasPermission
name=
"report:ctBbtcBusCategory:edit"
><td>
<shiro:hasPermission
name=
"report:ctBbtcBusCategory:edit"
><td>
...
...
src/main/webapp/WEB-INF/views/modules/report/ctBbtcBusTypeForm.jsp
View file @
77b9efc4
...
@@ -23,6 +23,65 @@
...
@@ -23,6 +23,65 @@
}
}
});
});
});
});
function
addRow
(
list
,
idx
,
tpl
,
row
)
{
$
(
list
).
append
(
Mustache
.
render
(
tpl
,
{
idx
:
idx
,
delBtn
:
true
,
row
:
row
}));
genSeqNo
();
}
function
delRow
(
obj
,
prefix
)
{
var
id
=
$
(
prefix
+
"_id"
);
var
delFlag
=
$
(
prefix
+
"_delFlag"
);
delFlag
.
val
(
"1"
);
$
(
obj
).
parent
().
parent
().
remove
();
genSeqNo
();
}
// 自动生成序号
function
genSeqNo
()
{
var
indx
=
0
;
$
(
'#scopeList'
).
find
(
"tr"
).
each
(
function
()
{
var
tdArr
=
$
(
this
).
children
();
tdArr
.
eq
(
1
).
html
(
indx
+
1
);
indx
=
indx
+
1
;
});
}
/*跟据集团 获取对应的业务类型 和业务类别 */
function
getRegion
(
supplementGroup
,
supplementArea
){
var
selectNode
=
$
(
supplementArea
);
selectNode
.
empty
();
//每次需要将上一次的数据进行清空
selectNode
.
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
;
if
(
data1
!=
''
)
{
var
slsb
=
$
(
supplementArea
);
for
(
var
i
=
0
;
i
<
data1
.
length
;
i
++
){
slsb
.
append
(
new
Option
(
data1
[
i
].
name
,
data1
[
i
].
id
));
}
}
},
error
:
function
(
data
){
alert
(
"系统错误"
);
}
});
}
else
{
/*top.$.jBox.tip('请选择被举报集团', 'warning');*/
}
}
</script>
</script>
</head>
</head>
<body>
<body>
...
@@ -47,15 +106,91 @@
...
@@ -47,15 +106,91 @@
<span
class=
"help-inline"
><font
color=
"red"
>
*
</font>
</span>
<span
class=
"help-inline"
><font
color=
"red"
>
*
</font>
</span>
</div>
</div>
</div>
</div>
<div
class=
"control-group"
>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
所属集团
:
</label>
<label
class=
"control-label"
>
使用范围
:
</label>
<div
class=
"controls"
>
<div
class=
"controls"
>
<form:select
onchange=
"resetPageNo();"
path=
"group"
class=
"input-xlarge required"
cssStyle=
"width: 285px"
>
<table
id=
"contentTable"
class=
"table table-striped table-bordered table-condensed"
>
<thead>
<tr>
<th
class=
"hide"
></th>
<th>
序号
</th>
<th>
集团名称
</th>
<th>
区域名称
</th>
</tr>
</thead>
<tbody
id=
"scopeList"
>
</tbody>
<tfoot>
<tr>
<td
colspan=
"7"
>
<a
href=
"javascript:"
onclick=
"addRow('#scopeList', scopeRowIdx, scopeTpl);scopeRowIdx = scopeRowIdx + 1;"
class=
"btn"
>
新增使用范围
</a></td>
</tr>
</tfoot>
</table>
<script
type=
"text/template"
id=
"scopeTplReadOnly"
>
//
<!--
<
tr
id
=
"scopeList{{idx}}"
>
<
td
class
=
"hide"
>
<
input
id
=
"scopeList{{idx}}_id"
type
=
"hidden"
/>
<
input
id
=
"scopeList{{idx}}_delFlag"
type
=
"hidden"
/>
<
/td
>
<
td
><
/td
>
<
td
>
<
form
:
select
id
=
"supplementGroup{{idx}}"
path
=
"group"
class
=
"input-small required"
onchange
=
"getRegion('#supplementGroup{{idx}}','#supplementArea{{idx}}');"
cssStyle
=
"width: 280px"
>
<
form
:
option
value
=
""
>
请选择
<
/form:option
>
<
form
:
option
value
=
""
>
请选择
<
/form:option
>
<
form
:
options
items
=
"${fns:getDictList('supplement_group')}"
itemLabel
=
"label"
itemValue
=
"id"
<
form
:
options
items
=
"${fns:getDictList('supplement_group')}"
itemLabel
=
"label"
itemValue
=
"id"
htmlEscape=
"false"
/></form:select>
htmlEscape
=
"false"
/>
<
%
--
<
form:input
path=
"group"
htmlEscape=
"false"
maxlength=
"64"
class=
"input-xlarge "
/>
--%>
<
/form:select
>
<span
class=
"help-inline"
><font
color=
"red"
>
*
</font>
</span>
<
/td
>
<
td
>
<
form
:
select
id
=
"supplementArea{{idx}}"
path
=
"area"
class
=
"input-small required"
cssStyle
=
"width: 280px"
>
<
form
:
option
value
=
""
>
请选择
<
/form:option
>
<
/form:select
>
<
/td
>
<
/tr>/
/-->
</script>
<script
type=
"text/template"
id=
"scopeTpl"
>
//
<!--
<
tr
id
=
"scopeList{{idx}}"
>
<
td
class
=
"hide"
>
<
input
id
=
"scopeList{{idx}}_id"
type
=
"hidden"
/>
<
input
id
=
"scopeList{{idx}}_delFlag"
type
=
"hidden"
/>
<
/td
>
<
td
><
/td
>
<
td
>
<
form
:
select
id
=
"supplementGroup{{idx}}"
path
=
"group"
class
=
"input-small required"
onchange
=
"getRegion('#supplementGroup{{idx}}','#supplementArea{{idx}}');"
cssStyle
=
"width: 280px"
>
<
form
:
option
value
=
""
>
请选择
<
/form:option
>
<
form
:
options
items
=
"${fns:getDictList('supplement_group')}"
itemLabel
=
"label"
itemValue
=
"id"
htmlEscape
=
"false"
/>
<
/form:select
>
<
/td
>
<
td
>
<
form
:
select
id
=
"supplementArea{{idx}}"
path
=
"area"
class
=
"input-small required"
cssStyle
=
"width: 280px"
>
<
form
:
option
value
=
""
>
请选择
<
/form:option
>
<
/form:select
>
<
/td
>
<
td
class
=
"text-center"
width
=
"20"
>
{{
#
delBtn
}}
<
span
class
=
"close"
onclick
=
"delRow(this, '#scopeList{{idx}}')"
title
=
"删除"
>&
times
;
<
/span>{{/
delBtn
}}
<
/td
>
<
/tr>/
/-->
</script>
<script
type=
"text/javascript"
>
var
scopeRowIdx
=
0
,
scopeTpl
=
$
(
"#scopeTpl"
).
html
().
replace
(
/
(\/\/
\<!
\-\-)
|
(\/\/\-\-
>
)
/g
,
""
),
scopeTplReadOnly
=
$
(
"#scopeTplReadOnly"
).
html
().
replace
(
/
(\/\/
\<!
\-\-)
|
(\/\/\-\-
>
)
/g
,
""
);
$
(
document
).
ready
(
function
()
{
var
data
=
$
{
fns
:
toJson
(
adjustBill
.
scopeList
)};
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
data
[
i
].
isCanDelete
!=
null
&&
data
[
i
].
isCanDelete
==
'1'
)
{
addRow
(
'#scopeList'
,
scopeRowIdx
,
scopeTpl
,
data
[
i
]);
}
else
{
addRow
(
'#scopeList'
,
scopeRowIdx
,
scopeTplReadOnly
,
data
[
i
]);
}
scopeRowIdx
=
scopeRowIdx
+
1
;
}
});
</script>
</div>
</div>
</div>
</div>
<div
class=
"form-actions"
>
<div
class=
"form-actions"
>
...
...
src/main/webapp/WEB-INF/views/modules/report/ctBbtcBusTypeList.jsp
View file @
77b9efc4
...
@@ -38,7 +38,6 @@
...
@@ -38,7 +38,6 @@
<tr>
<tr>
<th>
业务类型编码
</th>
<th>
业务类型编码
</th>
<th>
业务类型名称
</th>
<th>
业务类型名称
</th>
<th>
所属集团
</th>
<shiro:hasPermission
name=
"report:ctBbtcBusType:edit"
><th>
操作
</th></shiro:hasPermission>
<shiro:hasPermission
name=
"report:ctBbtcBusType:edit"
><th>
操作
</th></shiro:hasPermission>
</tr>
</tr>
</thead>
</thead>
...
@@ -51,9 +50,6 @@
...
@@ -51,9 +50,6 @@
<td>
<td>
${ctBbtcBusType.name}
${ctBbtcBusType.name}
</td>
</td>
<td>
${ctBbtcBusType.groupName}
</td>
<shiro:hasPermission
name=
"report:ctBbtcBusType:edit"
><td>
<shiro:hasPermission
name=
"report:ctBbtcBusType:edit"
><td>
<a
href=
"${ctx}/report/ctBbtcBusType/form?id=${ctBbtcBusType.id}"
>
修改
</a>
<a
href=
"${ctx}/report/ctBbtcBusType/form?id=${ctBbtcBusType.id}"
>
修改
</a>
<a
href=
"${ctx}/report/ctBbtcBusType/delete?id=${ctBbtcBusType.id}"
onclick=
"return confirmx('确认要删除该业务类型吗?', this.href)"
>
删除
</a>
<a
href=
"${ctx}/report/ctBbtcBusType/delete?id=${ctBbtcBusType.id}"
onclick=
"return confirmx('确认要删除该业务类型吗?', this.href)"
>
删除
</a>
...
...
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