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
329526b9
Commit
329526b9
authored
Apr 17, 2023
by
zhangwanglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补卡
parent
0637dab4
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
347 additions
and
10 deletions
+347
-10
ChDisabAccountsDetailMapper.xml
...src/main/resources/mapper/ChDisabAccountsDetailMapper.xml
+1
-1
DisableController.java
...n/java/com/hungraim/ltc/controller/DisableController.java
+18
-0
SrvOrganController.java
.../java/com/hungraim/ltc/controller/SrvOrganController.java
+11
-0
DisableInfoMapper.java
...src/main/java/com/hungraim/ltc/dao/DisableInfoMapper.java
+6
-0
DisableService.java
...rc/main/java/com/hungraim/ltc/service/DisableService.java
+4
-0
SrvOrganEmpService.java
...ain/java/com/hungraim/ltc/service/SrvOrganEmpService.java
+2
-0
DisableServiceImpl.java
...ava/com/hungraim/ltc/service/impl/DisableServiceImpl.java
+23
-0
SrvOrganEmpServiceImpl.java
...com/hungraim/ltc/service/impl/SrvOrganEmpServiceImpl.java
+17
-1
DisableInfoMapper.xml
...y-service/src/main/resources/mapper/DisableInfoMapper.xml
+18
-7
ChSrvTaskDetail.java
...ngraim/ltc/pojo/entity/serviceManage/ChSrvTaskDetail.java
+7
-0
DisableInfoRespDTO.java
.../com/hungraim/ltc/pojo/vo/disable/DisableInfoRespDTO.java
+21
-0
ProgramRespDTO.java
...java/com/hungraim/ltc/pojo/vo/disable/ProgramRespDTO.java
+31
-0
ItemDTO.java
...ain/java/com/hungraim/ltc/pojo/vo/governance/ItemDTO.java
+17
-0
SrvPlanInputVO.java
...a/com/hungraim/ltc/pojo/vo/governance/SrvPlanInputVO.java
+50
-0
SrvTaskController.java
...hungraim/ltc/governance/controller/SrvTaskController.java
+23
-0
ChSrvPlanMapper.java
...java/com/hungraim/ltc/governance/dao/ChSrvPlanMapper.java
+3
-0
SrvTaskService.java
...a/com/hungraim/ltc/governance/service/SrvTaskService.java
+7
-0
SrvTaskServiceImpl.java
...graim/ltc/governance/service/impl/SrvTaskServiceImpl.java
+81
-1
ChSrvPlanMapper.xml
...es/com/hungraim/ltc/governance/mapper/ChSrvPlanMapper.xml
+7
-0
No files found.
account/account-service/src/main/resources/mapper/ChDisabAccountsDetailMapper.xml
View file @
329526b9
...
...
@@ -39,7 +39,7 @@
and d.status = #{req.accountsStatus}
</if>
<if
test=
"req.realName != null and req.realName != ''"
>
and info.real_name = #{req.realName}
AND info.real_name LIKE CONCAT('%',CONCAT(#{req.realName},'%'))
</if>
<if
test=
"req.srvOrganId != null and req.srvOrganId != '' and req.srvOrganId!=0"
>
and d.SRV_ORGAN_ID = #{req.srvOrganId}
...
...
apply/apply-service/src/main/java/com/hungraim/ltc/controller/DisableController.java
View file @
329526b9
...
...
@@ -394,6 +394,7 @@ public class DisableController {
if
(
chDisableApply
.
getMedicalType
()
==
null
)
{
return
Result
.
failed
(
"医保类型不能为空!"
);
}
chDisableApply
.
setRealName
(
chDisableApply
.
getRealName
().
trim
());
return
disableService
.
addDisable
(
chDisableApply
);
}
...
...
@@ -575,4 +576,21 @@ public class DisableController {
return
Result
.
success
();
}
@GetMapping
(
"/selectDisableInfoByEmp"
)
public
Result
selectDisableInfoByEmp
(
String
srvEmpId
){
if
(
StringUtils
.
isEmpty
(
srvEmpId
))
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
return
disableService
.
selectDisableInfoByEmp
(
srvEmpId
);
}
@GetMapping
(
"/selectProgram"
)
public
Result
selectProgram
(
String
disabInfoId
,
String
srvOrganId
){
if
(
StringUtils
.
isEmpty
(
disabInfoId
)
||
StringUtils
.
isEmpty
(
srvOrganId
))
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
return
disableService
.
selectProgram
(
disabInfoId
,
srvOrganId
);
}
}
apply/apply-service/src/main/java/com/hungraim/ltc/controller/SrvOrganController.java
View file @
329526b9
...
...
@@ -19,6 +19,7 @@ import com.hungraim.ltc.util.ResultCode;
import
com.hungraim.ltc.util.TokenParsingUtil
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -316,4 +317,14 @@ public class SrvOrganController {
}
@GetMapping
(
"/selectEmpBySrvOrganId"
)
public
Result
selectEmpBySrvOrganId
(
String
srvOrganId
){
if
(
StringUtils
.
isEmpty
(
srvOrganId
))
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
return
srvOrganEmpService
.
selectEmpBySrvOrganId
(
srvOrganId
);
}
}
apply/apply-service/src/main/java/com/hungraim/ltc/dao/DisableInfoMapper.java
View file @
329526b9
...
...
@@ -6,6 +6,8 @@ import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvProgram
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvSend
;
import
com.hungraim.ltc.pojo.vo.disable.DisableInfoListVo
;
import
com.hungraim.ltc.pojo.vo.disable.DisableInfoRespDTO
;
import
com.hungraim.ltc.pojo.vo.disable.ProgramRespDTO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -33,6 +35,8 @@ public interface DisableInfoMapper extends BaseMapper<ChDisableInfo> {
List
<
DisableInfoListVo
>
getDisableExitList
();
List
<
ProgramRespDTO
>
selectProgram
(
String
disabInfoId
,
String
srvOrganId
);
int
updateSrvProgramById
(
ChSrvProgram
chSrvProgram
);
...
...
@@ -40,5 +44,7 @@ public interface DisableInfoMapper extends BaseMapper<ChDisableInfo> {
int
updateSrvSendById
(
ChSrvSend
chSrvSend
);
List
<
DisableInfoRespDTO
>
selectDisableInfoByEmp
(
String
srvEmpId
);
}
apply/apply-service/src/main/java/com/hungraim/ltc/service/DisableService.java
View file @
329526b9
...
...
@@ -60,6 +60,8 @@ public interface DisableService {
*/
List
<
SrvModeVo
>
cfgSrvModeList
();
Result
selectProgram
(
String
disabInfoId
,
String
srvOrganId
);
/**
* 查询机构下所有护理机构
*
...
...
@@ -192,4 +194,6 @@ public interface DisableService {
Integer
selectByCertiCode
(
String
certiCode
);
void
disableExitTask
();
Result
selectDisableInfoByEmp
(
String
srvEmpId
);
}
apply/apply-service/src/main/java/com/hungraim/ltc/service/SrvOrganEmpService.java
View file @
329526b9
...
...
@@ -73,4 +73,6 @@ public interface SrvOrganEmpService {
Page
<
ChSrvTaskDetail2Vo
>
chSrvTaskDetailQuery
(
Page
<
ChSrvTaskDetail2Vo
>
page
,
Long
empId
);
Result
chSrvTaskDetailDelete
(
long
taskDetailId
,
String
userName
);
Result
selectEmpBySrvOrganId
(
String
srvOrganId
);
}
apply/apply-service/src/main/java/com/hungraim/ltc/service/impl/DisableServiceImpl.java
View file @
329526b9
...
...
@@ -4,6 +4,7 @@ import cn.afterturn.easypoi.excel.ExcelExportUtil;
import
cn.afterturn.easypoi.excel.entity.ExportParams
;
import
cn.afterturn.easypoi.excel.entity.enmus.ExcelType
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -30,11 +31,13 @@ import com.hungraim.ltc.util.ResultCode;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.poi.hssf.record.common.FeatSmartTag
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
java.util.*
;
...
...
@@ -361,6 +364,7 @@ public class DisableServiceImpl implements DisableService {
return
srvModeMapper
.
selectAll
();
}
@Override
public
List
<
ChSrvOrgan
>
srvOrganList
(
String
organId
,
Long
srvOrganId
,
Boolean
isInvolveChild
)
{
// zhangch 2021-11-04 修改查询条件 new QueryWrapper<ChSrvOrgan>().eq("organ_id", organId).eq("STATUS", (short) 0)
...
...
@@ -728,4 +732,23 @@ public class DisableServiceImpl implements DisableService {
@Override
public
Result
selectDisableInfoByEmp
(
String
srvEmpId
)
{
List
<
DisableInfoRespDTO
>
disableInfoRespDTOS
=
disableInfoMapper
.
selectDisableInfoByEmp
(
srvEmpId
);
if
(
CollectionUtils
.
isEmpty
(
disableInfoRespDTOS
))
{
return
Result
.
failed
(
"没有找到相应的服务计划,请检查"
);
}
return
Result
.
success
(
disableInfoRespDTOS
);
}
@Override
public
Result
selectProgram
(
String
disabInfoId
,
String
srvOrganId
)
{
List
<
ProgramRespDTO
>
programRespDTOS
=
disableInfoMapper
.
selectProgram
(
disabInfoId
,
srvOrganId
);
if
(
CollectionUtil
.
isEmpty
(
programRespDTOS
))
{
return
Result
.
success
(
"没有找到相应的服务方案,请检查"
);
}
ProgramRespDTO
programRespDTO
=
programRespDTOS
.
get
(
0
);
return
Result
.
success
(
programRespDTO
);
}
}
apply/apply-service/src/main/java/com/hungraim/ltc/service/impl/SrvOrganEmpServiceImpl.java
View file @
329526b9
...
...
@@ -3,8 +3,8 @@ package com.hungraim.ltc.service.impl;
import
cn.afterturn.easypoi.excel.ExcelExportUtil
;
import
cn.afterturn.easypoi.excel.entity.ExportParams
;
import
cn.afterturn.easypoi.excel.entity.enmus.ExcelType
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.OrderItem
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.api.AttachFeignService
;
import
com.hungraim.ltc.dao.*
;
...
...
@@ -72,6 +72,8 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
return
chSrvOrganEmpMapper
.
getSrvOrganEmpListVo
(
page
,
organIds
,
empName
,
srvOrganName
,
certifNum
,
isLock
,
empType
,
srvOrganId
);
}
@Override
public
void
updateSrvEmpStatus
(
Long
empId
,
Short
isLock
)
{
ChSrvOrganEmp
chSrvOrganEmp
=
new
ChSrvOrganEmp
();
...
...
@@ -279,4 +281,18 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
}
}
@Override
public
Result
selectEmpBySrvOrganId
(
String
srvOrganId
){
LambdaQueryWrapper
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<
ChSrvOrganEmp
>()
.
eq
(
ChSrvOrganEmp:
:
getSrvOrganId
,
Long
.
valueOf
(
srvOrganId
))
.
eq
(
ChSrvOrganEmp:
:
getIsLock
,(
short
)
0
);
List
<
ChSrvOrganEmp
>
list
=
chSrvOrganEmpMapper
.
selectList
(
lambdaQueryWrapper
);
return
Result
.
success
(
list
);
}
}
apply/apply-service/src/main/resources/mapper/DisableInfoMapper.xml
View file @
329526b9
...
...
@@ -4,7 +4,7 @@
<select
id=
"getDisableInfoList"
resultType=
"com.hungraim.ltc.pojo.vo.disable.DisableInfoListVo"
>
SELECT distinct T2.DISAB_INFO_ID disabInfoId,
T1.PROGRAM_ID programId,
T
6
.SRV_ORGAN_ID srvOrganId,
T
1
.SRV_ORGAN_ID srvOrganId,
T5.DISTRICT_PROVINCIAL districtProvincial,
T5.DISTRICT_CITY districtCity,
T2.REAL_NAME realName,
...
...
@@ -16,7 +16,8 @@
T2.ACPT_AREA acptArea,
T2.ACPT_STREET acptStreet,
T2.ACPT_ADDRESS acptAddress,
T7.MODE_NAME svrModelName,
-- T7.MODE_NAME svrModelName,
DECODE(T1.SRV_MODE_ID, '1','医疗','2', '养老','3','上门', '4', '异地') srvModeName,
T5.SRV_ORGAN_NAME svrOrganName,
T1.PROG_STATUS progStatus,
T1.EFF_TIME effTime,
...
...
@@ -30,14 +31,14 @@
T2.EXIT_FLAG exitFlag,
T2.EXIT_REASON_ID exitReasonId
FROM CH_DISABLE_INFO T2
inner join (select * from CH_SRV_SEND where STATUS in(1,3)) T6 on T6.DISAB_INFO_ID = T2.DISAB_INFO_ID
--
inner join (select * from CH_SRV_SEND where STATUS in(1,3)) T6 on T6.DISAB_INFO_ID = T2.DISAB_INFO_ID
LEFT JOIN CH_SRV_PROGRAM T1 ON T1.DISAB_INFO_ID = T2.DISAB_INFO_ID
LEFT JOIN CH_CFG_SRV_MODE T7 ON T2.SRV_MODE_ID = T7.MODE_ID
LEFT JOIN CH_SRV_ORGAN T5 ON T
6
.SRV_ORGAN_ID = T5.SRV_ORGAN_ID
--
LEFT JOIN CH_CFG_SRV_MODE T7 ON T2.SRV_MODE_ID = T7.MODE_ID
LEFT JOIN CH_SRV_ORGAN T5 ON T
1
.SRV_ORGAN_ID = T5.SRV_ORGAN_ID
<where>
1=1
<if
test=
"srvOrganId != null and srvOrganId != '' and srvOrganId!=0"
>
and T
5
.SRV_ORGAN_ID = #{srvOrganId}
and T
1
.SRV_ORGAN_ID = #{srvOrganId}
</if>
<if
test=
"certiCode != null and certiCode != ''"
>
and T2.CERTI_CODE = #{certiCode}
...
...
@@ -46,7 +47,7 @@
and T2.real_name like CONCAT(CONCAT('%',#{realName}) ,'%')
</if>
<if
test=
"svrModelId != null and svrModelId != ''"
>
and T
7.
MODE_ID = #{svrModelId}
and T
1.SRV_
MODE_ID = #{svrModelId}
</if>
</where>
...
...
@@ -104,6 +105,15 @@
s.DISAB_INFO_ID = #{disabInfoId}
</update>
<select
id=
"selectDisableInfoByEmp"
resultType=
"com.hungraim.ltc.pojo.vo.disable.DisableInfoRespDTO"
>
select i.REAL_NAME realName,i.DISAB_INFO_ID disabInfoId,i.SRV_MODE_ID srvModeId,t.SRV_TASK_ID srvTaskId from CH_DISABLE_INFO i left join ch_srv_task t
on i.DISAB_INFO_ID = t.DISAB_INFO_ID where t.SRV_EMP_ID = #{srvEmpId} and
<![CDATA[ t.STATUS<> 2 ]]>
</select>
<select
id=
"selectProgram"
resultType=
"com.hungraim.ltc.pojo.vo.disable.ProgramRespDTO"
>
select * from CH_SRV_PROGRAM t where t.DISAB_INFO_ID = #{disabInfoId} and t.srv_organ_id = #{srvOrganId} and
<![CDATA[ t.PROG_STATUS<> 2 ]]>
order by t.FCD desc
</select>
</mapper>
\ No newline at end of file
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/serviceManage/ChSrvTaskDetail.java
View file @
329526b9
...
...
@@ -244,5 +244,11 @@ public class ChSrvTaskDetail implements Serializable {
*/
private
String
srvStartPic2
;
private
Short
isClock
;
private
String
clockReason
;
private
String
clockOperator
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/disable/DisableInfoRespDTO.java
0 → 100644
View file @
329526b9
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
disable
;
import
lombok.Data
;
/**
* @author zwl
* @ClassName DisableInfoRespDTO
* @description
* @date 2023/4/12 16:42
**/
@Data
public
class
DisableInfoRespDTO
{
private
Long
disabInfoId
;
private
String
realName
;
private
String
srvModeId
;
private
String
srvTaskId
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/disable/ProgramRespDTO.java
0 → 100644
View file @
329526b9
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
disable
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
/**
* @author zwl
* @ClassName ProgramRespDTO
* @description
* @date 2023/4/12 16:49
**/
@Data
public
class
ProgramRespDTO
{
/**
* 方案生效时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
programDate
;
/**
* 方案终止时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
programEdnDate
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/governance/ItemDTO.java
0 → 100644
View file @
329526b9
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
governance
;
import
lombok.Data
;
/**
* @author zwl
* @ClassName ItemDTO
* @description
* @date 2023/4/13 10:52
**/
@Data
public
class
ItemDTO
{
private
String
itemId
;
private
String
itemName
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/governance/SrvPlanInputVO.java
0 → 100644
View file @
329526b9
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
governance
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
/**
* @author zwl
* @ClassName SrvPlanInputVO
* @description
* @date 2023/4/12 11:08
**/
@Data
public
class
SrvPlanInputVO
{
private
Long
srvOrganId
;
private
Long
disabInfoId
;
private
Long
modeId
;
private
Long
empId
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
srvPlanTime
;
/**
* 服务项目ids
*/
private
String
[]
itemIds
;
/**
* 操作人
*/
private
String
admin
;
/**
* 补卡原因
*/
private
String
clockReason
;
private
Long
srvTaskId
;
}
governance/src/main/java/com/hungraim/ltc/governance/controller/SrvTaskController.java
View file @
329526b9
...
...
@@ -154,4 +154,27 @@ public class SrvTaskController {
return
Result
.
success
();
}
/**
* 补卡
**/
@PostMapping
(
"/saveApplyCard"
)
public
Result
saveApplyCard
(
SrvPlanInputVO
srvPlanInputVO
){
if
(
srvPlanInputVO
.
getDisabInfoId
()
==
null
)
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
return
srvTaskService
.
saveApplyCard
(
srvPlanInputVO
);
}
/**
* 根据护理机构查询项目
**/
@GetMapping
(
"/queryItem"
)
public
Result
queryItem
(
Long
srvOrganId
){
if
(
srvOrganId
==
null
)
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
return
srvTaskService
.
queryItemBySrvOrganId
(
srvOrganId
);
}
}
governance/src/main/java/com/hungraim/ltc/governance/dao/ChSrvPlanMapper.java
View file @
329526b9
...
...
@@ -3,6 +3,7 @@ package com.hungraim.ltc.governance.dao;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.hungraim.ltc.pojo.entity.governance.ChSrvPlan
;
import
com.hungraim.ltc.pojo.vo.governance.ItemDTO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -13,4 +14,6 @@ import java.util.List;
public
interface
ChSrvPlanMapper
extends
BaseMapper
<
ChSrvPlan
>
{
List
<
ChSrvPlan
>
queryPlan
(
String
programId
,
String
srvPlanTime
);
List
<
ItemDTO
>
queryItem
(
Long
srvOrganId
);
}
governance/src/main/java/com/hungraim/ltc/governance/service/SrvTaskService.java
View file @
329526b9
package
com
.
hungraim
.
ltc
.
governance
.
service
;
import
com.baomidou.mybatisplus.extension.api.R
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.pojo.vo.account.SrvTaskReqVO
;
import
com.hungraim.ltc.pojo.vo.account.SrvTaskRespVO
;
import
com.hungraim.ltc.pojo.vo.governance.*
;
import
com.hungraim.ltc.util.Result
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -35,4 +38,8 @@ public interface SrvTaskService {
void
timeAllocationSrvTask
(
String
dateStr
);
// 补卡
Result
saveApplyCard
(
SrvPlanInputVO
srvPlanInputVO
);
Result
queryItemBySrvOrganId
(
Long
srvOrganId
);
}
governance/src/main/java/com/hungraim/ltc/governance/service/impl/SrvTaskServiceImpl.java
View file @
329526b9
...
...
@@ -3,6 +3,7 @@ package com.hungraim.ltc.governance.service.impl;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -14,13 +15,13 @@ import com.hungraim.ltc.governance.service.SrvTaskService;
import
com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach
;
import
com.hungraim.ltc.pojo.entity.governance.ChSrvPlan
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvProgram
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvSend
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTask
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail
;
import
com.hungraim.ltc.pojo.vo.governance.*
;
import
com.hungraim.ltc.pojo.vo.system.AttachUpdateVo
;
import
com.hungraim.ltc.util.AttachType
;
import
com.hungraim.ltc.util.DateUtils
;
import
com.hungraim.ltc.util.Result
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
...
...
@@ -265,4 +266,83 @@ public class SrvTaskServiceImpl implements SrvTaskService {
}
}
// 补卡
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
Result
saveApplyCard
(
SrvPlanInputVO
srvPlanInputVO
){
Long
taskDetailId
=
null
;
// 先查询是否有计划,有计划了不再生成计划
List
<
ChSrvTaskDetail
>
chSrvTaskDetailList
=
chSrvTaskDetailMapper
.
selectList
(
new
LambdaQueryWrapper
<
ChSrvTaskDetail
>()
.
eq
(
ChSrvTaskDetail:
:
getSrvTaskId
,
srvPlanInputVO
.
getSrvTaskId
())
.
eq
(
ChSrvTaskDetail:
:
getSrvDate
,
srvPlanInputVO
.
getSrvPlanTime
()));
if
(
CollectionUtil
.
isNotEmpty
(
chSrvTaskDetailList
))
{
ChSrvTaskDetail
chSrvTaskDetail
=
chSrvTaskDetailList
.
get
(
0
);
taskDetailId
=
chSrvTaskDetail
.
getTaskDetailId
();
List
<
ChSrvPlan
>
srvPlanList
=
chSrvPlanMapper
.
selectList
(
new
LambdaQueryWrapper
<
ChSrvPlan
>()
.
eq
(
ChSrvPlan:
:
getDisabInfoId
,
srvPlanInputVO
.
getDisabInfoId
())
.
eq
(
ChSrvPlan:
:
getSrvPlanTime
,
srvPlanInputVO
.
getSrvPlanTime
())
.
eq
(
ChSrvPlan:
:
getModeId
,
srvPlanInputVO
.
getModeId
()));
if
(
CollectionUtil
.
isNotEmpty
(
srvPlanList
)){
return
Result
.
failed
(
"任务列表已有计划,不可重复生成"
);
}
}
else
{
// 插入计划表
ChSrvTaskDetail
chSrvTaskDetail
=
new
ChSrvTaskDetail
();
// taskId
chSrvTaskDetail
.
setSrvTaskId
(
srvPlanInputVO
.
getSrvTaskId
());
// 服务开始时间
chSrvTaskDetail
.
setSrvDate
(
srvPlanInputVO
.
getSrvPlanTime
());
// 状态 未执行:0;执行中:1;已执行:2;已失效:3已完成4
chSrvTaskDetail
.
setStatus
((
short
)
0
);
// 补卡标识
chSrvTaskDetail
.
setIsClock
((
short
)
1
);
chSrvTaskDetail
.
setClockReason
(
srvPlanInputVO
.
getClockReason
());
chSrvTaskDetail
.
setClockOperator
(
"admin"
);
chSrvTaskDetail
.
setFcd
(
new
Date
());
int
insert
=
chSrvTaskDetailMapper
.
insert
(
chSrvTaskDetail
);
if
(
insert
==
0
){
return
Result
.
failed
(
"补卡失败,请重新提交"
);
}
taskDetailId
=
chSrvTaskDetail
.
getTaskDetailId
();
}
try
{
log
.
info
(
"=======SrvTaskServiceImpl.saveApplyCard.taskDetailId:{}"
,
taskDetailId
);
String
[]
itemIds
=
srvPlanInputVO
.
getItemIds
();
List
<
ItemDTO
>
itemDTOS
=
chSrvPlanMapper
.
queryItem
(
srvPlanInputVO
.
getSrvOrganId
());
for
(
String
r
:
itemIds
)
{
ChSrvPlan
chSrvPlan
=
new
ChSrvPlan
();
chSrvPlan
.
setItemId
(
Long
.
valueOf
(
r
));
if
(
CollectionUtil
.
isNotEmpty
(
itemDTOS
))
{
String
itemName
=
itemDTOS
.
stream
().
filter
(
s
->
s
.
getItemId
().
equals
(
r
)).
map
(
ItemDTO:
:
getItemName
).
findFirst
().
orElse
(
null
);
chSrvPlan
.
setItemName
(
itemName
);
}
chSrvPlan
.
setSrvOrganId
(
srvPlanInputVO
.
getSrvOrganId
());
chSrvPlan
.
setModeId
(
srvPlanInputVO
.
getModeId
());
chSrvPlan
.
setCreationTime
(
new
Date
());
chSrvPlan
.
setDisabInfoId
(
srvPlanInputVO
.
getDisabInfoId
());
chSrvPlan
.
setEmpId
(
srvPlanInputVO
.
getEmpId
());
chSrvPlan
.
setSrvPlanTime
(
srvPlanInputVO
.
getSrvPlanTime
());
chSrvPlan
.
setTaskDetailId
(
taskDetailId
);
chSrvPlan
.
setIsStatus
(
Long
.
valueOf
(
0
));
int
insert1
=
chSrvPlanMapper
.
insert
(
chSrvPlan
);
if
(
insert1
==
0
){
return
Result
.
failed
(
"补卡失败,请重新提交"
);
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"=======SrvTaskServiceImpl error {}"
,
e
);
return
Result
.
failed
(
"补卡失败"
);
}
return
Result
.
success
();
}
@Override
public
Result
queryItemBySrvOrganId
(
Long
srvOrganId
){
List
<
ItemDTO
>
itemDTOS
=
chSrvPlanMapper
.
queryItem
(
srvOrganId
);
return
Result
.
success
(
itemDTOS
);
}
}
governance/src/main/resources/com/hungraim/ltc/governance/mapper/ChSrvPlanMapper.xml
View file @
329526b9
...
...
@@ -36,6 +36,13 @@
</select>
<select
id=
"queryItem"
resultType=
"com.hungraim.ltc.pojo.vo.governance.ItemDTO"
>
select CSOP.PROJECT_ID itemId,service.SERVICE_TYPE_DETAILED_NAME itemName from CH_SRV_ORGAN_PROJECT CSOP
left join CH_SERVICE_TYPE_DETAILED service on service.SERVICE_TYPE_DETAILED_ID = CSOP.ITEM_NAME
where SRV_ORGAN_ID = #{srvOrganId}
</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