Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
long-tern-care-service
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
hubin
long-tern-care-service
Commits
197dd574
Commit
197dd574
authored
Jul 10, 2023
by
zhangwanglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打卡记录管理详情显示图片
parent
49994246
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
73 additions
and
5 deletions
+73
-5
ChServiceTypeDetailedVO.java
...raim/ltc/pojo/entity/account/ChServiceTypeDetailedVO.java
+10
-0
PicRoleConfig.java
...ava/com/hungraim/ltc/governance/config/PicRoleConfig.java
+16
-0
BuildBedController.java
...ungraim/ltc/governance/controller/BuildBedController.java
+4
-2
BuildBedMapper.java
.../java/com/hungraim/ltc/governance/dao/BuildBedMapper.java
+2
-0
IBuildBedService.java
...com/hungraim/ltc/governance/service/IBuildBedService.java
+1
-1
BuildBedServiceImpl.java
...raim/ltc/governance/service/impl/BuildBedServiceImpl.java
+26
-1
BuildBedMapper.xml
...ces/com/hungraim/ltc/governance/mapper/BuildBedMapper.xml
+14
-1
No files found.
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/ChServiceTypeDetailedVO.java
View file @
197dd574
...
@@ -2,6 +2,8 @@ package com.hungraim.ltc.pojo.entity.account;
...
@@ -2,6 +2,8 @@ package com.hungraim.ltc.pojo.entity.account;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.List
;
/**
/**
* @author mq
* @author mq
*/
*/
...
@@ -21,4 +23,12 @@ public class ChServiceTypeDetailedVO {
...
@@ -21,4 +23,12 @@ public class ChServiceTypeDetailedVO {
*/
*/
private
String
serviceTypeDetailedId
;
private
String
serviceTypeDetailedId
;
private
List
<
String
>
srvPicList
;
private
String
srvStartPic
;
private
String
srvStartPic2
;
private
String
srvEndPic
;
}
}
governance/src/main/java/com/hungraim/ltc/governance/config/PicRoleConfig.java
0 → 100644
View file @
197dd574
package
com
.
hungraim
.
ltc
.
governance
.
config
;
import
lombok.Data
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
@Component
@Data
@ConfigurationProperties
(
prefix
=
"pic.view"
)
public
class
PicRoleConfig
{
private
List
<
String
>
roleId
;
}
governance/src/main/java/com/hungraim/ltc/governance/controller/BuildBedController.java
View file @
197dd574
...
@@ -21,6 +21,7 @@ import com.hungraim.ltc.pojo.vo.disable.SearchDisableSimpleVo;
...
@@ -21,6 +21,7 @@ import com.hungraim.ltc.pojo.vo.disable.SearchDisableSimpleVo;
import
com.hungraim.ltc.pojo.vo.governance.*
;
import
com.hungraim.ltc.pojo.vo.governance.*
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.ResultCode
;
import
com.hungraim.ltc.util.ResultCode
;
import
com.hungraim.ltc.util.TokenParsingUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
oracle.sql.DATE
;
import
oracle.sql.DATE
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
...
@@ -382,8 +383,9 @@ public class BuildBedController {
...
@@ -382,8 +383,9 @@ public class BuildBedController {
* @return
* @return
*/
*/
@GetMapping
(
"/chPunchDetailsQuery"
)
@GetMapping
(
"/chPunchDetailsQuery"
)
public
Result
chPunchDetailsQuery
(
Long
taskDetailId
,
String
certiCode
,
String
sevStarTime
,
String
sevEndTime
){
public
Result
chPunchDetailsQuery
(
@RequestHeader
(
"Authorization"
)
String
token
,
Long
taskDetailId
,
String
certiCode
,
String
sevStarTime
,
String
sevEndTime
){
ChPunchDetailsVO
chPunchDetailsVO
=
buildBedService
.
chPunchDetailsQuery
(
taskDetailId
,
certiCode
,
sevStarTime
,
sevEndTime
);
Integer
userId
=
TokenParsingUtil
.
TokenParsing
(
token
,
"userId"
);
ChPunchDetailsVO
chPunchDetailsVO
=
buildBedService
.
chPunchDetailsQuery
(
taskDetailId
,
certiCode
,
sevStarTime
,
sevEndTime
,
userId
);
return
Result
.
success
(
chPunchDetailsVO
);
return
Result
.
success
(
chPunchDetailsVO
);
}
}
...
...
governance/src/main/java/com/hungraim/ltc/governance/dao/BuildBedMapper.java
View file @
197dd574
...
@@ -45,4 +45,6 @@ public interface BuildBedMapper extends BaseMapper<ChSrvBuildBed> {
...
@@ -45,4 +45,6 @@ public interface BuildBedMapper extends BaseMapper<ChSrvBuildBed> {
List
<
ChServiceTypeVO
>
selectServiceTypeDetailed
();
List
<
ChServiceTypeVO
>
selectServiceTypeDetailed
();
String
selectModeTypeById
(
@Param
(
"pId"
)
Long
pId
);
String
selectModeTypeById
(
@Param
(
"pId"
)
Long
pId
);
int
getRoleByUserId
(
@Param
(
"userId"
)
Integer
userId
,
@Param
(
"roleIds"
)
List
<
String
>
roleIds
);
}
}
governance/src/main/java/com/hungraim/ltc/governance/service/IBuildBedService.java
View file @
197dd574
...
@@ -53,5 +53,5 @@ public interface IBuildBedService extends IService<ChSrvBuildBed> {
...
@@ -53,5 +53,5 @@ public interface IBuildBedService extends IService<ChSrvBuildBed> {
* 打卡详情
* 打卡详情
* @param taskDetailId
* @param taskDetailId
*/
*/
ChPunchDetailsVO
chPunchDetailsQuery
(
Long
taskDetailId
,
String
certiCode
,
String
sevStarTime
,
String
sevEndTime
);
ChPunchDetailsVO
chPunchDetailsQuery
(
Long
taskDetailId
,
String
certiCode
,
String
sevStarTime
,
String
sevEndTime
,
Integer
userId
);
}
}
governance/src/main/java/com/hungraim/ltc/governance/service/impl/BuildBedServiceImpl.java
View file @
197dd574
...
@@ -3,6 +3,7 @@ package com.hungraim.ltc.governance.service.impl;
...
@@ -3,6 +3,7 @@ package com.hungraim.ltc.governance.service.impl;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.hungraim.ltc.api.AttachFeignService
;
import
com.hungraim.ltc.api.AttachFeignService
;
import
com.hungraim.ltc.governance.config.PicRoleConfig
;
import
com.hungraim.ltc.governance.dao.BuildBedMapper
;
import
com.hungraim.ltc.governance.dao.BuildBedMapper
;
import
com.hungraim.ltc.governance.dao.ServiceTypeDetailedMapper
;
import
com.hungraim.ltc.governance.dao.ServiceTypeDetailedMapper
;
import
com.hungraim.ltc.governance.service.IBuildBedService
;
import
com.hungraim.ltc.governance.service.IBuildBedService
;
...
@@ -24,6 +25,7 @@ import com.hungraim.ltc.util.ResultCode;
...
@@ -24,6 +25,7 @@ import com.hungraim.ltc.util.ResultCode;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -44,6 +46,9 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
...
@@ -44,6 +46,9 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
private
final
ServiceTypeDetailedMapper
serviceTypeDetailed
;
private
final
ServiceTypeDetailedMapper
serviceTypeDetailed
;
@Autowired
private
PicRoleConfig
picRoleConfig
;
@Override
@Override
...
@@ -122,7 +127,7 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
...
@@ -122,7 +127,7 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
* @param taskDetailId
* @param taskDetailId
*/
*/
@Override
@Override
public
ChPunchDetailsVO
chPunchDetailsQuery
(
Long
taskDetailId
,
String
certiCode
,
String
sevStarTime
,
String
sevEndTime
)
{
public
ChPunchDetailsVO
chPunchDetailsQuery
(
Long
taskDetailId
,
String
certiCode
,
String
sevStarTime
,
String
sevEndTime
,
Integer
userId
)
{
List
<
ChPunchDetailVO
>
chPunchDetailVOS
=
new
ArrayList
<>();
List
<
ChPunchDetailVO
>
chPunchDetailVOS
=
new
ArrayList
<>();
//获取项目信息
//获取项目信息
List
<
ChServiceTypeVO
>
chServiceTypeDetaileds
=
buildBedMapper
.
selectServiceTypeDetailed
();
List
<
ChServiceTypeVO
>
chServiceTypeDetaileds
=
buildBedMapper
.
selectServiceTypeDetailed
();
...
@@ -146,6 +151,26 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
...
@@ -146,6 +151,26 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
//打卡详情
//打卡详情
String
modeType
=
buildBedMapper
.
selectModeTypeById
(
taskDetailId
);
String
modeType
=
buildBedMapper
.
selectModeTypeById
(
taskDetailId
);
List
<
ChServiceTypeDetailedVO
>
serviceTypeDetailed1s
=
buildBedMapper
.
getServiceTypeDetailed
(
taskDetailId
,
certiCode
,
sevStarTime
,
sevEndTime
,
modeType
);
List
<
ChServiceTypeDetailedVO
>
serviceTypeDetailed1s
=
buildBedMapper
.
getServiceTypeDetailed
(
taskDetailId
,
certiCode
,
sevStarTime
,
sevEndTime
,
modeType
);
List
<
String
>
roleIds
=
picRoleConfig
.
getRoleId
();
log
.
info
(
"==========chPunchDetailsQuery====roleIds:{}"
,
roleIds
);
int
roleByUserId
=
buildBedMapper
.
getRoleByUserId
(
userId
,
roleIds
);
for
(
ChServiceTypeDetailedVO
serviceTypeDetailed1
:
serviceTypeDetailed1s
)
{
String
srvStartPic
=
serviceTypeDetailed1
.
getSrvStartPic
();
String
srvStartPic2
=
serviceTypeDetailed1
.
getSrvStartPic2
();
String
srvEndPic
=
serviceTypeDetailed1
.
getSrvEndPic
();
List
<
String
>
srvPicList
=
new
ArrayList
<>();
if
(
srvStartPic
!=
null
)
{
srvPicList
.
add
(
srvStartPic
);
}
// 机构端能护理人员的拍照和第三张拍照,其他都能看到 等于0角色不是机构端
if
(
roleByUserId
==
0
&&
srvStartPic2
!=
null
)
{
srvPicList
.
add
(
srvStartPic2
);
}
if
(
srvEndPic
!=
null
)
{
srvPicList
.
add
(
srvEndPic
);
}
serviceTypeDetailed1
.
setSrvPicList
(
srvPicList
);
}
log
.
info
(
"chPunchDetailsQuery打卡详情:"
+
serviceTypeDetailed1s
);
log
.
info
(
"chPunchDetailsQuery打卡详情:"
+
serviceTypeDetailed1s
);
chPunchDetailsVO
.
setRecordData
(
chPunchDetailVOS
);
chPunchDetailsVO
.
setRecordData
(
chPunchDetailVOS
);
chPunchDetailsVO
.
setChPunchDetailVOS
(
serviceTypeDetailed1s
);
chPunchDetailsVO
.
setChPunchDetailVOS
(
serviceTypeDetailed1s
);
...
...
governance/src/main/resources/com/hungraim/ltc/governance/mapper/BuildBedMapper.xml
View file @
197dd574
...
@@ -88,7 +88,10 @@
...
@@ -88,7 +88,10 @@
case when mode1.MODE_NAME='上门' then to_char(detail.SRV_DATE, 'dd' )
case when mode1.MODE_NAME='上门' then to_char(detail.SRV_DATE, 'dd' )
else to_char(detail.SRV_DATE, 'dd' ) end executionTime,
else to_char(detail.SRV_DATE, 'dd' ) end executionTime,
service.SERVICE_TYPE_DETAILED_NAME itemName,
service.SERVICE_TYPE_DETAILED_NAME itemName,
service.SERVICE_TYPE_DETAILED_ID serviceTypeDetailedId
service.SERVICE_TYPE_DETAILED_ID serviceTypeDetailedId,
detail.SRV_START_PIC srvStartPic,
detail.SRV_START_PIC2 srvStartPic2,
detail.SRV_END_PIC srvEndPic
FROM
FROM
CH_SRV_TASK_DETAIL detail
CH_SRV_TASK_DETAIL detail
inner JOIN ch_srv_task task ON task.srv_task_id = detail.srv_task_id
inner JOIN ch_srv_task task ON task.srv_task_id = detail.srv_task_id
...
@@ -135,6 +138,15 @@
...
@@ -135,6 +138,15 @@
LEFT JOIN CH_SERVICE_TYPE e ON d.PARA_ID = e.SERVICE_TYPE_ID
LEFT JOIN CH_SERVICE_TYPE e ON d.PARA_ID = e.SERVICE_TYPE_ID
</select>
</select>
<select
id=
"getRoleByUserId"
resultType=
"java.lang.Integer"
>
select count(*) from LTC_USER_ROLE r where r.user_id = #{userId}
<if
test=
"roleIds != null"
>
and r.role_id in
<foreach
collection=
"roleIds"
item=
"roleIds"
open=
"("
close=
")"
separator=
","
>
#{roleIds}
</foreach>
</if>
</select>
</mapper>
</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