Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bill-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
bill-platform
Commits
6ce9241f
Commit
6ce9241f
authored
Jun 25, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加排号与评价统计报表
parent
5c9cd9bc
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
93 additions
and
5 deletions
+93
-5
bill-manager/src/main/java/com/mortals/xhx/module/pj/dao/PjEvaluateStatDao.java
...java/com/mortals/xhx/module/pj/dao/PjEvaluateStatDao.java
+7
-0
bill-manager/src/main/java/com/mortals/xhx/module/pj/dao/ibatis/PjEvaluateStatDaoImpl.java
...rtals/xhx/module/pj/dao/ibatis/PjEvaluateStatDaoImpl.java
+14
-1
bill-manager/src/main/java/com/mortals/xhx/module/pj/service/PjEvaluateStatService.java
.../mortals/xhx/module/pj/service/PjEvaluateStatService.java
+9
-0
bill-manager/src/main/java/com/mortals/xhx/module/pj/service/impl/PjEvaluateStatServiceImpl.java
...xhx/module/pj/service/impl/PjEvaluateStatServiceImpl.java
+30
-4
bill-manager/src/main/resources/sqlmap/module/pj/PjEvaluateStatMapperExt.xml
...in/resources/sqlmap/module/pj/PjEvaluateStatMapperExt.xml
+33
-0
No files found.
bill-manager/src/main/java/com/mortals/xhx/module/pj/dao/PjEvaluateStatDao.java
View file @
6ce9241f
package
com.mortals.xhx.module.pj.dao
;
import
com.mortals.framework.dao.ICRUDDao
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.xhx.module.pj.model.PjEvaluateStatEntity
;
import
com.mortals.xhx.module.pj.model.PjEvaluateStatQuery
;
import
java.util.List
;
/**
* 评价汇总统计Dao
...
...
@@ -14,4 +17,8 @@ import java.util.List;
public
interface
PjEvaluateStatDao
extends
ICRUDDao
<
PjEvaluateStatEntity
,
Long
>{
String
SQLID_GET_STATLIST
=
"getStatList"
;
List
<
PjEvaluateStatEntity
>
getStatList
(
PjEvaluateStatQuery
query
,
PageInfo
pageInfo
);
}
bill-manager/src/main/java/com/mortals/xhx/module/pj/dao/ibatis/PjEvaluateStatDaoImpl.java
View file @
6ce9241f
package
com.mortals.xhx.module.pj.dao.ibatis
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.ParamDto
;
import
com.mortals.xhx.module.pj.model.PjEvaluateStatQuery
;
import
org.apache.ibatis.session.RowBounds
;
import
org.springframework.stereotype.Repository
;
import
com.mortals.xhx.module.pj.dao.PjEvaluateStatDao
;
import
com.mortals.xhx.module.pj.model.PjEvaluateStatEntity
;
...
...
@@ -17,5 +21,14 @@ import java.util.List;
public
class
PjEvaluateStatDaoImpl
extends
BaseCRUDDaoMybatis
<
PjEvaluateStatEntity
,
Long
>
implements
PjEvaluateStatDao
{
@Override
public
List
<
PjEvaluateStatEntity
>
getStatList
(
PjEvaluateStatQuery
query
,
PageInfo
pageInfo
)
{
ParamDto
queryParam
=
super
.
getQueryParam
(
query
);
if
(
pageInfo
.
getPrePageResult
()
==
-
1
)
{
return
getSqlSession
().
selectList
(
SQLID_GET_STATLIST
,
queryParam
);
}
else
{
RowBounds
rowBounds
=
new
RowBounds
(
pageInfo
.
getBeginIndex
(),
pageInfo
.
getPrePageResult
());
return
getSqlSession
().
selectList
(
SQLID_GET_STATLIST
,
queryParam
,
rowBounds
);
}
}
}
bill-manager/src/main/java/com/mortals/xhx/module/pj/service/PjEvaluateStatService.java
View file @
6ce9241f
package
com.mortals.xhx.module.pj.service
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.xhx.module.pj.model.PjEvaluateStatEntity
;
import
com.mortals.xhx.module.pj.dao.PjEvaluateStatDao
;
import
java.util.List
;
/**
* PjEvaluateStatService
*
...
...
@@ -23,4 +27,9 @@ public interface PjEvaluateStatService extends ICRUDService<PjEvaluateStatEntity
* @return
*/
Rest
<
Void
>
updateSitePjStat
(
PjEvaluateStatEntity
entity
,
Context
context
);
List
<
PjEvaluateStatEntity
>
getBillInfos
(
Long
siteId
,
String
createTimeStart
,
Integer
datePattern
,
PageInfo
pageInfo
,
Context
context
);
}
\ No newline at end of file
bill-manager/src/main/java/com/mortals/xhx/module/pj/service/impl/PjEvaluateStatServiceImpl.java
View file @
6ce9241f
package
com.mortals.xhx.module.pj.service.impl
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.model.OrderCol
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.xhx.common.code.TimeUnitEnum
;
import
com.mortals.xhx.module.pj.model.PjEvaluateEntity
;
import
com.mortals.xhx.module.pj.model.PjEvaluateQuery
;
import
com.mortals.xhx.module.pj.model.PjEvaluateStatQuery
;
...
...
@@ -17,10 +20,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.util.ObjectUtils
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -69,6 +69,7 @@ public class PjEvaluateStatServiceImpl extends AbstractCRUDServiceImpl<PjEvaluat
return
Rest
.
ok
();
}
private
void
updateSitePjCount
(
PjEvaluateStatEntity
entity
,
List
<
PjEvaluateEntity
>
pjEvaluateEntities
)
{
if
(
ObjectUtils
.
isEmpty
(
entity
.
getSiteId
()))
return
;
if
(
0L
>=
entity
.
getSiteId
())
return
;
...
...
@@ -271,4 +272,29 @@ public class PjEvaluateStatServiceImpl extends AbstractCRUDServiceImpl<PjEvaluat
}
});
}
@Override
public
List
<
PjEvaluateStatEntity
>
getBillInfos
(
Long
siteId
,
String
createTimeStart
,
Integer
datePattern
,
PageInfo
pageInfo
,
Context
context
)
{
List
<
PjEvaluateStatEntity
>
statList
=
new
ArrayList
<>();
PjEvaluateStatQuery
query
=
new
PjEvaluateStatQuery
();
query
.
setSiteId
(
siteId
);
query
.
setCreateTimeStart
(
createTimeStart
);
if
(
datePattern
==
TimeUnitEnum
.
DAY
.
getValue
())
{
query
.
setGroupList
(
Arrays
.
asList
(
"day"
));
query
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"year"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"month"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"day"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"createTime"
)));
statList
=
this
.
getDao
().
getStatList
(
query
,
pageInfo
);
}
else
if
(
datePattern
==
TimeUnitEnum
.
MONTH
.
getValue
())
{
query
.
setGroupList
(
Arrays
.
asList
(
"month"
));
query
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"year"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"month"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"createTime"
)));
statList
=
this
.
getDao
().
getStatList
(
query
,
pageInfo
);
}
else
if
(
datePattern
==
TimeUnitEnum
.
YEAR
.
getValue
())
{
query
.
setGroupList
(
Arrays
.
asList
(
"year"
));
query
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"year"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"createTime"
)));
statList
=
this
.
getDao
().
getStatList
(
query
,
pageInfo
);
}
else
{
throw
new
AppException
(
"不支持当前日期格式查询统计!"
);
}
return
statList
;
}
}
\ No newline at end of file
bill-manager/src/main/resources/sqlmap/module/pj/PjEvaluateStatMapperExt.xml
0 → 100644
View file @
6ce9241f
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper
namespace=
"com.mortals.xhx.module.pj.dao.ibatis.PjEvaluateStatDaoImpl"
>
<!-- 获取统计列表 -->
<select
id=
"getStatList"
parameterType=
"paramDto"
resultMap=
"PjEvaluateStatEntity-Map"
>
select
<!-- 获取分组字段 -->
<if
test=
"groupList != null and !groupList.isEmpty()"
>
<foreach
collection=
"groupList"
open=
""
close=
""
index=
"index"
item=
"item"
>
${item},
</foreach>
</if>
id,
siteId,
createTime,
year,
month,
day,
<!-- 评价数量-->
sum(IFNULL(a.pj_count,0)) pj_count
from mortals_xhx_pj_evaluate_stat as a
<trim
suffixOverrides=
"where"
suffix=
""
>
where
<trim
prefixOverrides=
"and"
prefix=
""
>
<include
refid=
"_condition_"
/>
</trim>
</trim>
<include
refid=
"_group_by_"
/>
<include
refid=
"_orderCols_"
/>
</select>
</mapper>
\ No newline at end of file
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