Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
519f67fb
Commit
519f67fb
authored
Aug 18, 2022
by
litengwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务 8612 任务 8695
parent
96d3415b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
118 additions
and
0 deletions
+118
-0
SignDto.java
...ava/com/yeejoin/amos/boot/module/jcs/api/dto/SignDto.java
+2
-0
SinStaticDto.java
...om/yeejoin/amos/boot/module/jcs/api/dto/SinStaticDto.java
+41
-0
SignMapper.java
...m/yeejoin/amos/boot/module/jcs/api/mapper/SignMapper.java
+5
-0
SignMapper.xml
...t-module-jcs-api/src/main/resources/mapper/SignMapper.xml
+31
-0
SignController.java
...n/amos/boot/module/jcs/biz/controller/SignController.java
+16
-0
SignServiceImpl.java
...mos/boot/module/jcs/biz/service/impl/SignServiceImpl.java
+23
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/dto/SignDto.java
View file @
519f67fb
...
...
@@ -23,6 +23,8 @@ public class SignDto extends BaseDto {
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"打卡人照片"
)
private
String
personPhotos
;
@ApiModelProperty
(
value
=
"当前页"
)
private
int
current
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/dto/SinStaticDto.java
0 → 100644
View file @
519f67fb
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
@Data
@ApiModel
(
value
=
"SinStaticDto"
,
description
=
"打卡统计记录"
)
public
class
SinStaticDto
{
@ApiModelProperty
(
value
=
"打卡日期"
)
private
Date
date
;
@ApiModelProperty
(
value
=
"出勤人数"
)
private
String
signNum
;
@ApiModelProperty
(
value
=
"出勤率"
)
private
String
attendance
;
@ApiModelProperty
(
value
=
"换流站Name"
)
private
String
bizOrgName
;
@ApiModelProperty
(
value
=
"换流站Code"
)
private
String
bizOrgCode
;
@ApiModelProperty
(
value
=
"当前页"
)
private
int
current
;
@ApiModelProperty
(
value
=
"每页几条"
)
private
int
size
;
@ApiModelProperty
(
value
=
"开始时间"
)
private
String
dateBIGGER
;
@ApiModelProperty
(
value
=
"结束时间"
)
private
String
dateLESS
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/mapper/SignMapper.java
View file @
519f67fb
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jcs.api.mapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.SignDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.SinStaticDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Sign
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
...
...
@@ -15,4 +16,8 @@ public interface SignMapper extends BaseMapper<Sign> {
IPage
<
SignDto
>
queryForPage
(
IPage
page
,
SignDto
dto
);
IPage
<
SinStaticDto
>
queryStaticForPage
(
IPage
page
,
SinStaticDto
dto
);
int
queryPersonNum
(
String
bizOgrCode
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/SignMapper.xml
View file @
519f67fb
...
...
@@ -35,4 +35,35 @@
</where>
order by sign.rec_date desc
</select>
<select
id=
"queryStaticForPage"
resultType=
"com.yeejoin.amos.boot.module.jcs.api.dto.SinStaticDto"
>
SELECT
date,
count(name) signNum,
biz_org_name bizOrgName,
biz_org_code bizOrgCode
FROM
cb_sign sign
<where>
<if
test=
"dto.dateBIGGER!=null and dto.dateBIGGER!=''"
>
and sign.sign_time >= #{dto.dateBIGGER}
</if>
<if
test=
"dto.dateLESS!=null and dto.dateLESS!=''"
>
and #{dto.dateLESS} >= sign.sign_time
</if>
<if
test=
"dto.bizOrgCode!=null and dto.bizOrgCode!=''"
>
and sign.biz_org_code like CONCAT(#{dto.bizOrgCode},'%')
</if>
<if
test=
"dto.bizOrgName!=null and dto.bizOrgName!=''"
>
and sign.biz_org_Name like CONCAT(#{dto.bizOrgName},'%')
</if>
</where>
group by date,biz_org_code
order by sign.rec_date desc
</select>
<select
id=
"queryPersonNum"
resultType=
"java.lang.Integer"
>
select count(*) from cb_firefighters where fire_team_id = (
select sequence_nbr from cb_fire_team where biz_org_code = #{bizOgrCode} and type_code = '116'
)
</select>
</mapper>
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/SignController.java
View file @
519f67fb
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jcs.biz.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.SinStaticDto
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
...
...
@@ -104,6 +105,21 @@ public class SignController extends BaseController {
}
/**
* 列表分页查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/static/page"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"打卡记录分页查询"
,
notes
=
"打卡记录分页查询"
)
public
ResponseModel
<
IPage
<
SinStaticDto
>>
queryStaticForPage
(
@RequestBody
SinStaticDto
dto
)
{
Page
<
SinStaticDto
>
page
=
new
Page
<>();
page
.
setCurrent
(
dto
.
getCurrent
());
page
.
setSize
(
dto
.
getSize
());
return
ResponseHelper
.
buildResponse
(
signServiceImpl
.
queryForSignStaticPageByMapper
(
page
,
dto
));
}
/**
* 列表全部数据查询
*
* @return
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/SignServiceImpl.java
View file @
519f67fb
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.SinStaticDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Sign
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.SignMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.ISignService
;
...
...
@@ -12,6 +13,8 @@ import org.typroject.tyboot.core.foundation.utils.Bean;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.text.NumberFormat
;
import
java.util.List
;
/**
...
...
@@ -37,6 +40,26 @@ public class SignServiceImpl extends BaseService<SignDto,Sign,SignMapper> implem
}
/**
* 分页查询
*/
public
IPage
<
SinStaticDto
>
queryForSignStaticPageByMapper
(
IPage
<
SinStaticDto
>
page
,
SinStaticDto
dto
)
{
IPage
<
SinStaticDto
>
sinStaticDtoIPage
=
this
.
baseMapper
.
queryStaticForPage
(
page
,
dto
);
NumberFormat
numberFormat
=
NumberFormat
.
getNumberInstance
();
numberFormat
.
setMaximumFractionDigits
(
2
);
sinStaticDtoIPage
.
getRecords
().
stream
().
forEach
(
e
->{
int
num
=
this
.
baseMapper
.
queryPersonNum
(
e
.
getBizOrgCode
());
if
(
num
!=
0
)
{
e
.
setAttendance
(
numberFormat
.
format
((
float
)
Integer
.
parseInt
(
e
.
getSignNum
())/(
float
)
num
*
100
)
+
"%"
);
}
else
{
e
.
setAttendance
(
"0%"
);
}
});
return
sinStaticDtoIPage
;
}
/**
* 列表查询 示例
*/
public
List
<
SignDto
>
queryForSignList
()
{
...
...
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