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
ff36183a
Commit
ff36183a
authored
Sep 06, 2019
by
sunxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
需求变更
parent
5dfe46da
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
105 additions
and
30 deletions
+105
-30
CrudDao.java
src/main/java/com/ejweb/core/persistence/CrudDao.java
+8
-0
CrudService.java
src/main/java/com/ejweb/core/service/CrudService.java
+4
-0
CtBbtcBusCategoryDao.java
src/main/java/com/ejweb/modules/report/dao/CtBbtcBusCategoryDao.java
+2
-0
CtBbtcBusTypeDao.java
src/main/java/com/ejweb/modules/report/dao/CtBbtcBusTypeDao.java
+2
-0
CtBbtcRegionDao.java
src/main/java/com/ejweb/modules/report/dao/CtBbtcRegionDao.java
+2
-0
CtBbtcBusCategoryService.java
src/main/java/com/ejweb/modules/report/service/CtBbtcBusCategoryService.java
+7
-1
CtBbtcBusTypeService.java
src/main/java/com/ejweb/modules/report/service/CtBbtcBusTypeService.java
+5
-1
CtBbtcRegionService.java
src/main/java/com/ejweb/modules/report/service/CtBbtcRegionService.java
+8
-2
CtBbtcBusCategoryController.java
src/main/java/com/ejweb/modules/report/web/CtBbtcBusCategoryController.java
+6
-2
CtBbtcBusTypeController.java
src/main/java/com/ejweb/modules/report/web/CtBbtcBusTypeController.java
+7
-3
CtBbtcRegionController.java
src/main/java/com/ejweb/modules/report/web/CtBbtcRegionController.java
+7
-2
ReportController.java
src/main/java/com/ejweb/modules/report/web/ReportController.java
+2
-2
CtBbtcBusCategoryDao.xml
src/main/resources/mappings/modules/report/CtBbtcBusCategoryDao.xml
+8
-0
CtBbtcBusTypeDao.xml
src/main/resources/mappings/modules/report/CtBbtcBusTypeDao.xml
+8
-1
CtBbtcRegionDao.xml
src/main/resources/mappings/modules/report/CtBbtcRegionDao.xml
+8
-0
CtBbtcTypeAreaDao.xml
src/main/resources/mappings/modules/report/CtBbtcTypeAreaDao.xml
+7
-2
ctBbtcBusCategoryList.jsp
src/main/webapp/WEB-INF/views/modules/report/ctBbtcBusCategoryList.jsp
+12
-12
reportDeliver.jsp
src/main/webapp/WEB-INF/views/modules/report/reportDeliver.jsp
+1
-1
reportList.jsp
src/main/webapp/WEB-INF/views/modules/report/reportList.jsp
+1
-1
No files found.
src/main/java/com/ejweb/core/persistence/CrudDao.java
View file @
ff36183a
...
...
@@ -21,6 +21,14 @@ public interface CrudDao<T> extends BaseDao {
* @return
*/
public
T
get
(
String
id
);
/**
* 跟据类型编码查询列表 是否有相同编码
* @param entity
* @return
*/
public
List
<
T
>
getByNumber
(
T
entity
);
/**
* 获取单条数据
...
...
src/main/java/com/ejweb/core/service/CrudService.java
View file @
ff36183a
...
...
@@ -84,6 +84,10 @@ public abstract class CrudService<D extends CrudDao<T>, T extends DataEntity<T>>
if
(
entity
.
getIsNewRecord
()){
entity
.
preInsert
();
List
<
T
>
byNumber
=
dao
.
getByNumber
(
entity
);
if
(
byNumber
.
size
()
!=
0
){
throw
new
RuntimeException
(
"保存失败,编码重复!!!!!!"
);
}
dao
.
insert
(
entity
);
}
else
{
entity
.
preUpdate
();
...
...
src/main/java/com/ejweb/modules/report/dao/CtBbtcBusCategoryDao.java
View file @
ff36183a
...
...
@@ -23,4 +23,5 @@ public interface CtBbtcBusCategoryDao extends CrudDao<CtBbtcBusCategory> {
* @return
*/
List
<
CtBbtcBusCategory
>
getByTypeId
(
@Param
(
"typeId"
)
String
typeId
);
}
\ No newline at end of file
src/main/java/com/ejweb/modules/report/dao/CtBbtcBusTypeDao.java
View file @
ff36183a
...
...
@@ -24,4 +24,5 @@ public interface CtBbtcBusTypeDao extends CrudDao<CtBbtcBusType> {
* @return
*/
List
<
CtBbtcBusType
>
getByGroupId
(
@Param
(
"groupId"
)
String
groupId
);
}
\ No newline at end of file
src/main/java/com/ejweb/modules/report/dao/CtBbtcRegionDao.java
View file @
ff36183a
...
...
@@ -25,4 +25,5 @@ public interface CtBbtcRegionDao extends CrudDao<CtBbtcRegion> {
*/
List
<
CtBbtcRegion
>
getByGroupId
(
@Param
(
"groupId"
)
String
groupId
);
}
\ No newline at end of file
src/main/java/com/ejweb/modules/report/service/CtBbtcBusCategoryService.java
View file @
ff36183a
...
...
@@ -5,6 +5,7 @@ package com.ejweb.modules.report.service;
import
java.util.List
;
import
com.ejweb.modules.report.entity.CtBbtcRegion
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -39,7 +40,12 @@ public class CtBbtcBusCategoryService extends CrudService<CtBbtcBusCategoryDao,
@Transactional
(
readOnly
=
false
)
public
void
save
(
CtBbtcBusCategory
ctBbtcBusCategory
)
{
super
.
save
(
ctBbtcBusCategory
);
try
{
super
.
save
(
ctBbtcBusCategory
);
}
catch
(
RuntimeException
e
){
throw
new
RuntimeException
(
e
.
getMessage
());
}
}
@Transactional
(
readOnly
=
false
)
...
...
src/main/java/com/ejweb/modules/report/service/CtBbtcBusTypeService.java
View file @
ff36183a
...
...
@@ -49,7 +49,11 @@ public class CtBbtcBusTypeService extends CrudService<CtBbtcBusTypeDao, CtBbtcBu
@Transactional
(
readOnly
=
false
)
public
void
save
(
CtBbtcBusType
ctBbtcBusType
)
{
super
.
save
(
ctBbtcBusType
);
try
{
super
.
save
(
ctBbtcBusType
);
}
catch
(
RuntimeException
e
){
throw
new
RuntimeException
(
e
.
getMessage
());
}
/*将可用范围存到 typearea表中*/
String
[]
groups
=
ctBbtcBusType
.
getGroup
().
split
(
","
);
...
...
src/main/java/com/ejweb/modules/report/service/CtBbtcRegionService.java
View file @
ff36183a
...
...
@@ -41,15 +41,20 @@ public class CtBbtcRegionService extends CrudService<CtBbtcRegionDao, CtBbtcRegi
return
this
.
ctBbtcRegionDao
.
getByGroupId
(
groupId
);
}
@Transactional
(
readOnly
=
false
)
public
void
save
(
CtBbtcRegion
ctBbtcRegion
)
{
super
.
save
(
ctBbtcRegion
);
try
{
super
.
save
(
ctBbtcRegion
);
}
catch
(
RuntimeException
e
){
throw
new
RuntimeException
(
e
.
getMessage
());
}
}
@Transactional
(
readOnly
=
false
)
public
void
delete
(
CtBbtcRegion
ctBbtcRegion
)
{
super
.
delete
(
ctBbtcRegion
);
}
}
\ No newline at end of file
src/main/java/com/ejweb/modules/report/web/CtBbtcBusCategoryController.java
View file @
ff36183a
...
...
@@ -144,8 +144,12 @@ public class CtBbtcBusCategoryController extends BaseController {
if
(!
beanValidator
(
model
,
ctBbtcBusCategory
)){
return
form
(
ctBbtcBusCategory
,
model
);
}
ctBbtcBusCategoryService
.
save
(
ctBbtcBusCategory
);
addMessage
(
redirectAttributes
,
"保存业务类别成功"
);
try
{
ctBbtcBusCategoryService
.
save
(
ctBbtcBusCategory
);
addMessage
(
redirectAttributes
,
"保存业务类别成功"
);
}
catch
(
RuntimeException
e
){
addMessage
(
redirectAttributes
,
e
.
getMessage
());
}
return
"redirect:"
+
adminPath
+
"/report/ctBbtcBusCategory/?repage"
;
}
...
...
src/main/java/com/ejweb/modules/report/web/CtBbtcBusTypeController.java
View file @
ff36183a
...
...
@@ -92,8 +92,12 @@ public class CtBbtcBusTypeController extends BaseController {
if
(!
beanValidator
(
model
,
ctBbtcBusType
)){
return
form
(
ctBbtcBusType
,
model
);
}
ctBbtcBusTypeService
.
save
(
ctBbtcBusType
);
addMessage
(
redirectAttributes
,
"保存业务类型成功"
);
try
{
ctBbtcBusTypeService
.
save
(
ctBbtcBusType
);
addMessage
(
redirectAttributes
,
"保存业务类型成功"
);
}
catch
(
RuntimeException
e
){
addMessage
(
redirectAttributes
,
e
.
getMessage
());
}
return
"redirect:"
+
adminPath
+
"/report/ctBbtcBusType/?repage"
;
}
...
...
@@ -135,7 +139,7 @@ public class CtBbtcBusTypeController extends BaseController {
@RequestMapping
(
value
=
"getTypeList"
)
public
void
getRegionList
(
String
groupId
,
RedirectAttributes
redirectAttributes
,
HttpServletResponse
response
,
String
area
)
{
if
(
groupId
!=
null
&&
!
""
.
equals
(
groupId
)
&&
area
!=
null
&&
!
""
.
equals
(
area
)
)
{
if
(
groupId
!=
null
&&
!
""
.
equals
(
groupId
))
{
JSONObject
res
=
new
JSONObject
();
List
<
CtBbtcTypeArea
>
ctBbtcTypeList
=
ctBbtcBusTypeService
.
getByArea
(
groupId
,
area
);
res
.
put
(
"ctBbtcTypeList"
,
ctBbtcTypeList
);
...
...
src/main/java/com/ejweb/modules/report/web/CtBbtcRegionController.java
View file @
ff36183a
...
...
@@ -28,6 +28,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.PrintWriter
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
...
...
@@ -84,8 +85,12 @@ public class CtBbtcRegionController extends BaseController {
if
(!
beanValidator
(
model
,
ctBbtcRegion
)){
return
form
(
ctBbtcRegion
,
model
);
}
ctBbtcRegionService
.
save
(
ctBbtcRegion
);
addMessage
(
redirectAttributes
,
"保存区域基础资料成功"
);
try
{
ctBbtcRegionService
.
save
(
ctBbtcRegion
);
addMessage
(
redirectAttributes
,
"保存区域基础资料成功"
);
}
catch
(
RuntimeException
e
){
addMessage
(
redirectAttributes
,
e
.
getMessage
());
}
return
"redirect:"
+
adminPath
+
"/report/ctBbtcRegion/?repage"
;
}
...
...
src/main/java/com/ejweb/modules/report/web/ReportController.java
View file @
ff36183a
...
...
@@ -1012,7 +1012,7 @@ public class ReportController extends BaseController {
if
(
ctBbtcBusType
!=
null
)
{
SupplementTypeStr
=
SupplementTypeStr
+
ctBbtcBusType
.
getName
()
+
","
;
}
else
{
/* SupplementTypeStr = SupplementTypeStr + "--";*/
SupplementTypeStr
=
SupplementTypeStr
+
"-"
;
}
}
...
...
@@ -1027,7 +1027,7 @@ public class ReportController extends BaseController {
if
(
ctBbtcBusCategory
!=
null
)
{
SupplementCategoryStr
=
SupplementCategoryStr
+
ctBbtcBusCategory
.
getName
()
+
","
;
}
else
{
/* SupplementCategoryStr = SupplementCategoryStr + "--";*/
SupplementCategoryStr
=
SupplementCategoryStr
+
"-"
;
}
}
reportEntity1
.
setSupplementCategory
(
SupplementCategoryStr
.
substring
(
0
,
SupplementCategoryStr
.
length
()-
1
));
...
...
src/main/resources/mappings/modules/report/CtBbtcBusCategoryDao.xml
View file @
ff36183a
...
...
@@ -26,6 +26,14 @@
WHERE a.id = #{id}
</select>
<select
id=
"getByNumber"
resultType=
"CtBbtcBusCategory"
>
SELECT
<include
refid=
"ctBbtcBusCategoryColumns"
/>
FROM ct_bbtc_bus_category a
<include
refid=
"ctBbtcBusCategoryJoins"
/>
WHERE a.fnumber = #{number}
</select>
<select
id=
"getByTypeId"
resultType=
"CtBbtcBusCategory"
>
SELECT
<include
refid=
"ctBbtcBusCategoryColumns"
/>
...
...
src/main/resources/mappings/modules/report/CtBbtcBusTypeDao.xml
View file @
ff36183a
...
...
@@ -18,7 +18,14 @@
FROM ct_bbtc_bus_type
WHERE id = #{id}
</select>
<select
id=
"getByNumber"
resultType=
"CtBbtcBusType"
>
SELECT
<include
refid=
"ctBbtcBusTypeColumns"
/>
FROM ct_bbtc_bus_type
WHERE fnumber = #{number}
</select>
<select
id=
"findList"
resultType=
"CtBbtcBusType"
>
SELECT
<include
refid=
"ctBbtcBusTypeColumns"
/>
...
...
src/main/resources/mappings/modules/report/CtBbtcRegionDao.xml
View file @
ff36183a
...
...
@@ -22,6 +22,14 @@
WHERE a.id = #{id}
</select>
<select
id=
"getByNumber"
resultType=
"CtBbtcRegion"
>
SELECT
<include
refid=
"ctBbtcRegionColumns"
/>
FROM ct_bbtc_region a
<include
refid=
"ctBbtcRegionJoins"
/>
WHERE a.fnumber = #{number}
</select>
<select
id=
"getByGroupId"
resultType=
"CtBbtcRegion"
>
SELECT
<include
refid=
"ctBbtcRegionColumns"
/>
...
...
src/main/resources/mappings/modules/report/CtBbtcTypeAreaDao.xml
View file @
ff36183a
...
...
@@ -37,8 +37,13 @@
<include
refid=
"ctBbtcTypeAreaColumns"
/>
FROM CT_BBTC_TYPE_AREA a
<include
refid=
"ctBbtcTypeAreaJoins"
/>
WHERE a.area = #{area} AND a.group_name=#{group}
<where>
a.group_name=#{group}
<if
test=
"area != null and area != ''"
>
AND a.area = #{area}
</if>
</where>
GROUP BY a.parent_id
</select>
<select
id=
"findList"
resultType=
"com.ejweb.modules.report.entity.CtBbtcTypeArea"
>
...
...
src/main/webapp/WEB-INF/views/modules/report/ctBbtcBusCategoryList.jsp
View file @
ff36183a
...
...
@@ -6,7 +6,7 @@
<meta
name=
"decorator"
content=
"default"
/>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
getRegion
();
/*getRegion();*/
getType
();
});
function
page
(
n
,
s
){
...
...
@@ -60,11 +60,11 @@
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
!=
''
){
/*var ts_describe2= $("#supplementArea").val();*/
if
(
ts_describe1
!=
null
&&
ts_describe1
!=
''
){
$
.
ajax
({
type
:
"POST"
,
url
:
"${ctx}/report/ctBbtcBusType/getTypeList?groupId="
+
ts_describe1
+
"&area="
+
ts_describe2
,
url
:
"${ctx}/report/ctBbtcBusType/getTypeList?groupId="
+
ts_describe1
,
dataType
:
"json"
,
success
:
function
(
returnedData
)
{
var
data2
=
returnedData
.
ctBbtcTypeList
;
...
...
@@ -105,23 +105,23 @@
<input
id=
"pageSize"
name=
"pageSize"
type=
"hidden"
value=
"${page.pageSize}"
/>
<ul
class=
"ul-form"
>
<li><label>
所属集团:
</label>
<form:select
id=
"supplementGroup"
path=
"ctBbtcGroup"
class=
"input-small required"
onchange=
"get
Region
()"
cssStyle=
"width: 160px"
>
<form:select
id=
"supplementGroup"
path=
"ctBbtcGroup"
class=
"input-small required"
onchange=
"get
Type
()"
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();"
>
<
%
--
<
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>
--%>
</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>
--%>
<li><label>
业务类型:
</label>
<form:select
id=
"supplementType"
onchange=
"resetPageNo();"
path=
"typeName"
class=
"input-small required"
cssStyle=
"width: 160px"
>
<form:option
value=
""
>
请选择
</form:option>
...
...
@@ -142,7 +142,7 @@
<th>
业务类别编码
</th>
<th>
业务类别名称
</th>
<th>
所属集团
</th>
<
th>
所属区域
</th
>
<
%
--
<
th
>
所属区域
</th>
--%
>
<th>
所属业务类型
</th>
<shiro:hasPermission
name=
"report:ctBbtcBusCategory:edit"
><th>
操作
</th></shiro:hasPermission>
</tr>
...
...
@@ -165,9 +165,9 @@
<c:if
test=
"${ctBbtcBusCategory.ctBbtcGroup eq '3770618512934949260'}"
>
文旅集团
</c:if>
--%>
<c:if
test=
"${ctBbtcBusCategory.ctBbtcGroup eq null}"
>
--
</c:if>
</td>
<td>
<
%
--
<
td
>
${ctBbtcBusCategory.supplementArea}
</td>
</td>
--%>
<td>
${ctBbtcBusCategory.typeName}
</td>
...
...
src/main/webapp/WEB-INF/views/modules/report/reportDeliver.jsp
View file @
ff36183a
...
...
@@ -137,7 +137,7 @@
<tr
class=
"reportList"
>
<td><input
type=
"checkbox"
value=
"${report.id}"
></td>
<td></td>
<td>
${report.supplementTitle}
</td>
<td>
<a
href=
"${ctx}/report/view?id=${report.id}"
>
${report.supplementTitle}
</a>
</td>
<td
align=
"center"
>
${report.supplementGroup}
<
%
--
<
c:if
test=
"${user.supplementGroup eq '30590306011301372591'}"
>
集团本部
</c:if>
...
...
src/main/webapp/WEB-INF/views/modules/report/reportList.jsp
View file @
ff36183a
...
...
@@ -583,7 +583,7 @@
<c:forEach
items=
"${page.list}"
var=
"report"
varStatus=
"vs"
>
<tr
class=
"reportList"
>
<td
align=
"center"
style=
"width:5%"
></td>
<td
align=
"left"
style=
"width:15%"
title=
${report.supplementTitle}
>
${report.supplementTitle}
</td>
<td
align=
"left"
style=
"width:15%"
title=
${report.supplementTitle}
>
<a
href=
"${ctx}/report/view?id=${report.id}"
>
${report.supplementTitle}
</a>
</td>
</c:forEach>
</c:if>
...
...
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