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
08829f74
Commit
08829f74
authored
Aug 22, 2022
by
litengwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打卡优化
parent
ed601462
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
5 deletions
+53
-5
SignController.java
...n/amos/boot/module/jcs/biz/controller/SignController.java
+25
-1
ExcelServiceImpl.java
...os/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
+28
-4
No files found.
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 @
08829f74
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.FormValue
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgPersonFormDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.SinStaticDto
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -11,6 +16,8 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.SignServiceImpl
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -36,6 +43,8 @@ public class SignController extends BaseController {
@Autowired
SignServiceImpl
signServiceImpl
;
@Autowired
OrgUsrServiceImpl
iOrgUsrService
;
/**
* 新增打卡记录
*
...
...
@@ -79,6 +88,7 @@ public class SignController extends BaseController {
/**
* 根据sequenceNbr查询
*
*
* @param sequenceNbr 主键
* @return
*/
...
...
@@ -86,7 +96,21 @@ public class SignController extends BaseController {
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个打卡记录"
,
notes
=
"根据sequenceNbr查询单个打卡记录"
)
public
ResponseModel
<
SignDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
signServiceImpl
.
queryBySeq
(
sequenceNbr
));
SignDto
signDto
=
signServiceImpl
.
queryBySeq
(
sequenceNbr
);
QueryWrapper
<
OrgUsr
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"amos_user_id"
,
signDto
.
getSignUserId
());
queryWrapper
.
eq
(
"is_delete"
,
0
);
OrgUsr
orgUsr
=
iOrgUsrService
.
getOne
(
queryWrapper
);
try
{
OrgPersonFormDto
orgPersonFormDto
=
iOrgUsrService
.
selectPersonById
(
orgUsr
.
getSequenceNbr
());
List
<
FormValue
>
personImg
=
orgPersonFormDto
.
getDynamicFormAlert
().
stream
().
filter
(
e
->
e
.
getKey
().
equals
(
"personImg"
)).
collect
(
Collectors
.
toList
());
signDto
.
setPersonPhotos
(
personImg
.
get
(
0
).
getValue
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
return
ResponseHelper
.
buildResponse
(
signDto
);
}
}
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
View file @
08829f74
...
...
@@ -10,10 +10,13 @@ import java.util.stream.Collectors;
import
javax.servlet.http.HttpServletResponse
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint
;
import
com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.SignDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.SinStaticDto
;
import
org.apache.commons.beanutils.ConvertUtils
;
import
org.apache.poi.ss.usermodel.Cell
;
import
org.apache.poi.ss.usermodel.Row
;
...
...
@@ -317,13 +320,34 @@ public class ExcelServiceImpl {
maintenancePersonExcelDtoList
,
MaintenancePersonExcleDto
.
class
,
null
,
false
);
break
;
case
"QDSJ"
:
List
<
SignDto
>
signDtos
=
signServiceImpl
.
queryForSignList
();
signDtos
.
stream
().
forEach
(
e
->{
SignDto
dto
=
new
SignDto
();
if
(
par
!=
null
&&
par
.
size
()>
0
)
{
String
date
=
par
.
containsKey
(
"date"
)?
par
.
get
(
"date"
).
toString
():
null
;
String
bizOrgCode
=
par
.
containsKey
(
"bizOrgCode"
)?
par
.
get
(
"bizOrgCode"
).
toString
():
null
;
String
bizOrgName
=
par
.
containsKey
(
"bizOrgName"
)?
par
.
get
(
"bizOrgName"
).
toString
():
null
;
String
name
=
par
.
containsKey
(
"name"
)?
par
.
get
(
"name"
).
toString
():
null
;
String
type
=
par
.
containsKey
(
"type"
)?
par
.
get
(
"type"
).
toString
():
null
;
String
signTimeBIGGER
=
par
.
containsKey
(
"signTimeBIGGER"
)?
par
.
get
(
"signTimeBIGGER"
).
toString
():
null
;
String
signTimeLESS
=
par
.
containsKey
(
"signTimeLESS"
)?
par
.
get
(
"signTimeLESS"
).
toString
():
null
;
dto
.
setBizOrgCode
(
bizOrgCode
);
dto
.
setDate
(
date
);
dto
.
setBizOrgName
(
bizOrgName
);
dto
.
setName
(
name
);
dto
.
setSignTimeBIGGER
(
signTimeBIGGER
);
dto
.
setSignTimeLESS
(
signTimeLESS
);
dto
.
setType
(
type
);
}
Page
<
SignDto
>
page
=
new
Page
<>();
page
.
setCurrent
(
1
);
page
.
setSize
(
10000
);
IPage
<
SignDto
>
signDtos
=
signServiceImpl
.
queryForSignPageByMapper
(
page
,
dto
);
signDtos
.
getRecords
().
stream
().
forEach
(
e
->{
e
.
setType
(
e
.
getType
().
equals
(
"0"
)
?
"上班打卡"
:
"下班打卡"
);
});
ExcelUtil
.
createTemplate
(
response
,
excelDto
.
getFileName
(),
excelDto
.
getSheetName
(),
signDtos
,
SignDto
.
class
,
null
,
false
);
signDtos
.
getRecords
()
,
SignDto
.
class
,
null
,
false
);
break
;
case
"KEYSITE"
:
if
(!
authFalg
)
{
...
...
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