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
8bf45a47
Commit
8bf45a47
authored
Sep 23, 2022
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
9411 3.6 在岗人员
parent
b5ad4194
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
143 additions
and
0 deletions
+143
-0
OrgUserController.java
...com/yeejoin/equipmanage/controller/OrgUserController.java
+56
-0
DutyDetailsMapper.java
...ava/com/yeejoin/equipmanage/mapper/DutyDetailsMapper.java
+12
-0
DutyDetailsService.java
...a/com/yeejoin/equipmanage/service/DutyDetailsService.java
+16
-0
DutyDetailsImpl.java
...com/yeejoin/equipmanage/service/impl/DutyDetailsImpl.java
+36
-0
DutyDetailsMapper.xml
...tem-equip/src/main/resources/mapper/DutyDetailsMapper.xml
+23
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/OrgUserController.java
0 → 100644
View file @
8bf45a47
package
com
.
yeejoin
.
equipmanage
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.equipmanage.config.PersonIdentify
;
import
com.yeejoin.equipmanage.service.DutyDetailsService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.*
;
/**
* 获取用户信息
*
*/
@RestController
@RequestMapping
(
value
=
"/org/user"
)
@Api
(
tags
=
"用户信息api"
)
public
class
OrgUserController
{
@Autowired
DutyDetailsService
dutyDetailsService
;
@Autowired
RedisUtils
redisUtils
;
/**
* 今日值班运维人员列表清单--分页
*
* @return ResponseModel
*/
@PersonIdentify
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"duty-person/page-list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"今日值班运维人员列表清单"
,
notes
=
"今日值班运维人员列表清单"
)
public
ResponseModel
<
IPage
<
Map
<
String
,
Object
>>>
dutyPersonPageList
(
@ApiParam
(
value
=
"当前页"
,
required
=
true
)
@RequestParam
(
value
=
"current"
)
int
current
,
@ApiParam
(
value
=
"页面大小"
,
required
=
true
)
@RequestParam
(
value
=
"size"
)
int
size
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
bizOrgCode
=
reginParams
.
getPersonIdentity
().
getBizOrgCode
();
return
ResponseHelper
.
buildResponse
(
dutyDetailsService
.
dutyPersonPageList
(
current
,
size
,
bizOrgCode
));
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/DutyDetailsMapper.java
0 → 100644
View file @
8bf45a47
package
com
.
yeejoin
.
equipmanage
.
mapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Map
;
public
interface
DutyDetailsMapper
{
IPage
<
Map
<
String
,
Object
>>
selectDutyPersonList
(
Page
page
,
@Param
(
value
=
"dutyDate"
)
String
dutyDate
,
@Param
(
value
=
"bizOrgCode"
)
String
bizOrgCode
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/DutyDetailsService.java
0 → 100644
View file @
8bf45a47
package
com
.
yeejoin
.
equipmanage
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
java.util.Map
;
/**
* 服务类
*
*/
public
interface
DutyDetailsService
{
IPage
<
Map
<
String
,
Object
>>
dutyPersonPageList
(
int
current
,
int
size
,
String
bizOrgCode
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/DutyDetailsImpl.java
0 → 100644
View file @
8bf45a47
package
com
.
yeejoin
.
equipmanage
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.equipmanage.mapper.DutyDetailsMapper
;
import
com.yeejoin.equipmanage.service.DutyDetailsService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Map
;
@Service
public
class
DutyDetailsImpl
implements
DutyDetailsService
{
@Autowired
private
DutyDetailsMapper
dutyDetailsMapper
;
@Autowired
RedisUtils
redisUtils
;
@Override
public
IPage
<
Map
<
String
,
Object
>>
dutyPersonPageList
(
int
current
,
int
size
,
String
bizOrgCode
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
dutyDate
=
sdf
.
format
(
new
Date
());
Page
page
=
new
Page
();
if
(
current
>
0
){
page
.
setCurrent
((
long
)
(
current
-
1
)
*
size
);
page
.
setSize
(
size
);
}
return
dutyDetailsMapper
.
selectDutyPersonList
(
page
,
dutyDate
,
bizOrgCode
);
}
}
amos-boot-system-equip/src/main/resources/mapper/DutyDetailsMapper.xml
0 → 100644
View file @
8bf45a47
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.equipmanage.mapper.DutyDetailsMapper"
>
<select
id=
'selectDutyPersonList'
resultType=
"java.util.Map"
>
SELECT
c.biz_org_name,
IFNULL(c.personImg,'') personImg,
IFNULL(c.job_title,'') job_title,
IFNULL(c.telephone,'') telephone,
d.duty_date
FROM
cb_org_usr c
RIGHT JOIN d_duty_details d ON c.amos_org_id = d.user_id
WHERE
d.duty_date like concat('%',#{dutyDate},'%')
<if
test=
"bizOrgCode != null and bizOrgCode!='' "
>
and c.biz_org_code like concat(#{bizOrgCode},'%')
</if>
ORDER BY
d.duty_date DESC
</select>
</mapper>
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