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
7db1a7b3
Commit
7db1a7b3
authored
Apr 25, 2021
by
zhangch
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://129.211.99.254:8088/hg-hubin/long-tern-care-service
parents
567755de
f2edd7f9
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
201 additions
and
18 deletions
+201
-18
DisableServiceImpl.java
...ava/com/hungraim/ltc/service/impl/DisableServiceImpl.java
+1
-0
TaskController.java
...main/java/com/hungraim/ltc/controller/TaskController.java
+53
-4
DisableInfoMapper.java
...src/main/java/com/hungraim/ltc/dao/DisableInfoMapper.java
+16
-0
RefuseReasonMapper.java
...rc/main/java/com/hungraim/ltc/dao/RefuseReasonMapper.java
+16
-0
TaskPushHisMapper.java
...src/main/java/com/hungraim/ltc/dao/TaskPushHisMapper.java
+14
-0
TaskService.java
...e/src/main/java/com/hungraim/ltc/service/TaskService.java
+7
-2
TaskServiceImpl.java
...n/java/com/hungraim/ltc/service/impl/TaskServiceImpl.java
+56
-8
ChDisableEvaluateMapper.xml
...ice/src/main/resources/mapper/ChDisableEvaluateMapper.xml
+5
-2
ChAprTaskPushHis.java
...hungraim/ltc/pojo/entity/assessment/ChAprTaskPushHis.java
+1
-1
ChRefuseReason.java
...m/hungraim/ltc/pojo/entity/assessment/ChRefuseReason.java
+26
-0
TaskGroupInfoVO.java
.../com/hungraim/ltc/pojo/vo/assessment/TaskGroupInfoVO.java
+6
-1
No files found.
apply/apply-service/src/main/java/com/hungraim/ltc/service/impl/DisableServiceImpl.java
View file @
7db1a7b3
...
...
@@ -92,6 +92,7 @@ public class DisableServiceImpl implements DisableService {
@Override
public
void
addDisable
(
ChDisableApply
chDisableApply
)
{
chDisableApply
.
setEffTime
(
new
Date
());
disableApplyMapper
.
insert
(
chDisableApply
);
}
...
...
assessment/assessment-service/src/main/java/com/hungraim/ltc/controller/TaskController.java
View file @
7db1a7b3
package
com
.
hungraim
.
ltc
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.hungraim.ltc.pojo.entity.assessment.ChRefuseReason
;
import
com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel
;
import
com.hungraim.ltc.pojo.vo.assessment.*
;
import
com.hungraim.ltc.service.TaskService
;
...
...
@@ -261,16 +262,18 @@ public class TaskController {
*
* @param groupNumber 组号
* @param status 分组状态 未分配(拒绝(重新分配)):0;已分配:1;已接受:2;已完成:3;拒绝(中止):4,拒绝(终止):5
* @param refuseReason 拒绝原因id
* @param refuseRemark 拒绝备注
*/
@RequestMapping
(
"/taskGroupByGroup"
)
public
Result
taskGroupByGroup
(
String
groupNumber
,
Integer
status
)
{
public
Result
taskGroupByGroup
(
String
groupNumber
,
Integer
status
,
Integer
refuseReason
,
String
refuseRemark
)
{
if
(
StringUtils
.
isBlank
(
groupNumber
))
{
return
Result
.
failed
(
"组号不能为空!"
);
}
if
(
status
==
null
||
status
<
0
||
status
>
5
)
{
return
Result
.
failed
(
"状态异常!"
);
}
Result
<
Object
>
objectResult
=
taskService
.
taskGroupByGroup
(
groupNumber
,
status
);
Result
<
Object
>
objectResult
=
taskService
.
taskGroupByGroup
(
groupNumber
,
status
,
refuseReason
,
refuseRemark
);
if
(!
ResultCode
.
SUCCESS
.
getCode
().
equals
(
objectResult
.
getCode
()))
{
//失败
return
Result
.
failed
(
objectResult
.
getMsg
());
...
...
@@ -283,16 +286,62 @@ public class TaskController {
*
* @param pushId 任务组id
* @param status 分组状态 未分配(拒绝(重新分配)):0;已分配:1;已接受:2;已完成:3;拒绝(中止):4,拒绝(终止):5
* @param refuseReason 拒绝原因id
* @param refuseRemark 拒绝备注
*/
@RequestMapping
(
"/taskGroup"
)
public
Result
taskGroup
(
Integer
pushId
,
Integer
status
)
{
public
Result
taskGroup
(
Integer
pushId
,
Integer
status
,
Integer
refuseReason
,
String
refuseRemark
)
{
if
(
status
==
null
||
status
<
0
||
status
>
5
)
{
return
Result
.
failed
(
"状态异常!"
);
}
if
(
pushId
==
null
)
{
return
Result
.
failed
(
"任务组id不能为空!"
);
}
Result
<
Object
>
objectResult
=
taskService
.
taskGroup
(
pushId
,
status
);
Result
<
Object
>
objectResult
=
taskService
.
taskGroup
(
pushId
,
status
,
refuseReason
,
refuseRemark
);
if
(!
ResultCode
.
SUCCESS
.
getCode
().
equals
(
objectResult
.
getCode
()))
{
//失败
return
Result
.
failed
(
objectResult
.
getMsg
());
}
return
Result
.
success
();
}
/**
* 查询拒绝原因
*
* @return 拒绝原因
*/
@RequestMapping
(
"/refuseReasonList"
)
public
Result
<
List
<
ChRefuseReason
>>
refuseReasonList
()
{
List
<
ChRefuseReason
>
refuseReasons
=
taskService
.
refuseReasonList
();
return
Result
.
success
(
refuseReasons
);
}
/**
* 设置预约日期和备注
*
* @param pushId 分组id
* @param time 预约日期 yyyy-MM-dd
* @param remark 备注
*/
@RequestMapping
(
"/updatePushTimeAndRemark"
)
public
Result
updatePushTimeAndRemark
(
String
pushId
,
String
time
,
String
remark
)
{
if
(
StringUtils
.
isBlank
(
pushId
))
{
return
Result
.
failed
(
"分组id不能为空!"
);
}
if
(
StringUtils
.
isBlank
(
time
))
{
return
Result
.
failed
(
"预约日期不能为空!"
);
}
if
(
StringUtils
.
isBlank
(
remark
))
{
return
Result
.
failed
(
"备注不能为空!"
);
}
Date
timeDate
;
try
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
timeDate
=
sdf
.
parse
(
time
);
}
catch
(
ParseException
e
)
{
return
Result
.
failed
(
"预约日期格式不正确!"
);
}
Result
<
Object
>
objectResult
=
taskService
.
updatePushTimeAndRemark
(
pushId
,
timeDate
,
remark
);
if
(!
ResultCode
.
SUCCESS
.
getCode
().
equals
(
objectResult
.
getCode
()))
{
//失败
return
Result
.
failed
(
objectResult
.
getMsg
());
...
...
assessment/assessment-service/src/main/java/com/hungraim/ltc/dao/DisableInfoMapper.java
0 → 100644
View file @
7db1a7b3
package
com
.
hungraim
.
ltc
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.hungraim.ltc.pojo.entity.disable.ChDisableInfo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
/**
* 失能人员信息Mapper
*
* @author czz
*/
@Mapper
@Repository
public
interface
DisableInfoMapper
extends
BaseMapper
<
ChDisableInfo
>
{
}
assessment/assessment-service/src/main/java/com/hungraim/ltc/dao/RefuseReasonMapper.java
0 → 100644
View file @
7db1a7b3
package
com
.
hungraim
.
ltc
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.hungraim.ltc.pojo.entity.assessment.ChRefuseReason
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
/**
* 拒绝原因Mapper
*
* @author czz
*/
@Mapper
@Repository
public
interface
RefuseReasonMapper
extends
BaseMapper
<
ChRefuseReason
>
{
}
assessment/assessment-service/src/main/java/com/hungraim/ltc/dao/TaskPushHisMapper.java
0 → 100644
View file @
7db1a7b3
package
com
.
hungraim
.
ltc
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.hungraim.ltc.pojo.entity.assessment.ChAprTaskPushHis
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
/**
* @author czz
*/
@Mapper
@Repository
public
interface
TaskPushHisMapper
extends
BaseMapper
<
ChAprTaskPushHis
>
{
}
assessment/assessment-service/src/main/java/com/hungraim/ltc/service/TaskService.java
View file @
7db1a7b3
package
com
.
hungraim
.
ltc
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.hungraim.ltc.pojo.entity.assessment.ChRefuseReason
;
import
com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel
;
import
com.hungraim.ltc.pojo.vo.assessment.*
;
import
com.hungraim.ltc.util.Result
;
...
...
@@ -59,7 +60,7 @@ public interface TaskService {
List
<
TaskGroupVO
>
taskGroupList
(
String
name
,
String
certiCode
,
String
tel
);
Result
<
Object
>
taskGroup
(
Integer
pushId
,
Integer
status
);
Result
<
Object
>
taskGroup
(
Integer
pushId
,
Integer
status
,
Integer
refuseReason
,
String
refuseRemark
);
List
<
ChCfgSrvDisableLevel
>
cfgSrvDisableLevelList
();
...
...
@@ -67,9 +68,13 @@ public interface TaskService {
List
<
TaskGroupInfoVO
>
taskGroupInfoList
(
String
groupNumber
);
Result
<
Object
>
taskGroupByGroup
(
String
groupNumber
,
Integer
status
);
Result
<
Object
>
taskGroupByGroup
(
String
groupNumber
,
Integer
status
,
Integer
refuseReason
,
String
refuseRemark
);
TaskGroupInfoListInfoVO
taskGroupInfoListInfo
(
String
pushId
);
List
<
AllotTaskHisVO
>
allotTaskHisList
();
Result
<
Object
>
updatePushTimeAndRemark
(
String
pushId
,
Date
timeDate
,
String
remark
);
List
<
ChRefuseReason
>
refuseReasonList
();
}
assessment/assessment-service/src/main/java/com/hungraim/ltc/service/impl/TaskServiceImpl.java
View file @
7db1a7b3
...
...
@@ -7,10 +7,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.hungraim.ltc.dao.*
;
import
com.hungraim.ltc.pojo.entity.assessment.*
;
import
com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel
;
import
com.hungraim.ltc.pojo.entity.disable.ChDisableInfo
;
import
com.hungraim.ltc.pojo.vo.assessment.*
;
import
com.hungraim.ltc.service.TaskService
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.SerialNumberUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -37,7 +39,13 @@ public class TaskServiceImpl implements TaskService {
@Autowired
private
TaskPushMapper
taskPushMapper
;
@Autowired
private
TaskPushHisMapper
taskPushHisMapper
;
@Autowired
private
CfgSrvDisableLevelMapper
cfgSrvDisableLevelMapper
;
@Autowired
private
DisableInfoMapper
disableInfoMapper
;
@Autowired
private
RefuseReasonMapper
refuseReasonMapper
;
@Override
public
IPage
<
TaskDistributionVO
>
taskDistributionList
(
String
organId
,
String
provincial
,
String
city
,
...
...
@@ -160,28 +168,35 @@ public class TaskServiceImpl implements TaskService {
return
Result
.
failed
(
"评定人员必须是组长!"
);
}
String
[]
taskIds
=
taskId
.
split
(
","
);
Date
assignTime
=
new
Date
();
//任务分配日期
//任务分配日期
Date
assignTime
=
new
Date
();
for
(
String
id
:
taskIds
)
{
ChAprTask
task
=
taskMapper
.
selectById
(
id
);
if
(
task
==
null
)
{
return
Result
.
failed
(
"无效的taskId!"
);
}
//更新评定任务信息
task
.
setAprEmpId
(
Integer
.
parseInt
(
empId
));
task
.
setAssignTime
(
assignTime
);
int
count
=
taskMapper
.
updateById
(
task
);
if
(
count
!=
1
)
{
return
Result
.
failed
(
"修改失败!"
);
}
taskMapper
.
updateById
(
task
);
//更新失能人员信息
ChDisableInfo
chDisableInfo
=
disableInfoMapper
.
selectById
(
task
.
getDisableInfoId
());
chDisableInfo
.
setLastTaskId
(
task
.
getTaskId
());
disableInfoMapper
.
updateById
(
chDisableInfo
);
//生成组
ChAprTaskPush
taskPush
=
new
ChAprTaskPush
();
taskPush
.
setTime
(
new
Date
());
taskPush
.
setAssignTime
(
new
Date
());
taskPush
.
setGroupNumber
(
SerialNumberUtils
.
getSerialNumber
(
empId
));
taskPush
.
setTaskId
(
Long
.
parseLong
(
id
));
taskPush
.
setEmpId
(
Long
.
parseLong
(
empId
));
taskPush
.
setStatus
((
short
)
1
);
taskPush
.
setIsManual
((
short
)
1
);
//生成分组历史
ChAprTaskPushHis
pushHis
=
new
ChAprTaskPushHis
();
BeanUtils
.
copyProperties
(
taskPush
,
pushHis
);
//插入分组数据
taskPushMapper
.
insert
(
taskPush
);
taskPushHisMapper
.
insert
(
pushHis
);
}
return
Result
.
success
();
}
...
...
@@ -192,12 +207,16 @@ public class TaskServiceImpl implements TaskService {
}
@Override
public
Result
<
Object
>
taskGroup
(
Integer
pushId
,
Integer
status
)
{
public
Result
<
Object
>
taskGroup
(
Integer
pushId
,
Integer
status
,
Integer
refuseReason
,
String
refuseRemark
)
{
ChAprTaskPush
chAprTaskPush
=
taskPushMapper
.
selectById
(
pushId
);
if
(
chAprTaskPush
==
null
)
{
return
Result
.
failed
(
"不存在的组!"
);
}
chAprTaskPush
.
setStatus
(
status
.
shortValue
());
if
(
status
==
4
||
status
==
5
||
status
==
0
)
{
chAprTaskPush
.
setRefuseReason
(
refuseReason
.
shortValue
());
chAprTaskPush
.
setRefuseRemark
(
refuseRemark
);
}
taskPushMapper
.
updateById
(
chAprTaskPush
);
return
Result
.
success
();
}
...
...
@@ -218,7 +237,7 @@ public class TaskServiceImpl implements TaskService {
}
@Override
public
Result
<
Object
>
taskGroupByGroup
(
String
groupNumber
,
Integer
status
)
{
public
Result
<
Object
>
taskGroupByGroup
(
String
groupNumber
,
Integer
status
,
Integer
refuseReason
,
String
refuseRemark
)
{
List
<
ChAprTaskPush
>
pushList
=
taskPushMapper
.
selectList
(
new
QueryWrapper
<
ChAprTaskPush
>().
eq
(
"group_number"
,
groupNumber
));
if
(
pushList
==
null
||
pushList
.
size
()
<=
0
)
{
return
Result
.
failed
(
"不存在的组!"
);
...
...
@@ -230,8 +249,16 @@ public class TaskServiceImpl implements TaskService {
}
}
for
(
ChAprTaskPush
push
:
pushList
)
{
//更新任务组状态
push
.
setStatus
(
status
.
shortValue
());
if
(
status
==
4
||
status
==
5
||
status
==
0
)
{
push
.
setRefuseReason
(
refuseReason
.
shortValue
());
push
.
setRefuseRemark
(
refuseRemark
);
}
taskPushMapper
.
updateById
(
push
);
//更新评定任务状态
ChAprTask
chAprTask
=
taskMapper
.
selectById
(
push
.
getTaskId
());
chAprTask
.
setTaskStatus
(
status
);
}
return
Result
.
success
();
}
...
...
@@ -245,4 +272,24 @@ public class TaskServiceImpl implements TaskService {
public
List
<
AllotTaskHisVO
>
allotTaskHisList
()
{
return
taskMapper
.
allotTaskHisList
();
}
@Override
public
Result
<
Object
>
updatePushTimeAndRemark
(
String
pushId
,
Date
timeDate
,
String
remark
)
{
ChAprTaskPush
chAprTaskPush
=
taskPushMapper
.
selectById
(
pushId
);
if
(
chAprTaskPush
==
null
)
{
return
Result
.
failed
(
"无效的分组id!"
);
}
chAprTaskPush
.
setTime
(
timeDate
);
chAprTaskPush
.
setRefuseRemark
(
remark
);
int
i
=
taskPushMapper
.
updateById
(
chAprTaskPush
);
if
(
i
<=
0
)
{
return
Result
.
failed
(
"更新失败!"
);
}
return
Result
.
success
();
}
@Override
public
List
<
ChRefuseReason
>
refuseReasonList
()
{
return
refuseReasonMapper
.
selectList
(
new
QueryWrapper
<>());
}
}
\ No newline at end of file
assessment/assessment-service/src/main/resources/mapper/ChDisableEvaluateMapper.xml
View file @
7db1a7b3
...
...
@@ -45,7 +45,7 @@
task.accept_time acceptTime,
task.finish_time finishTime,
task.task_status taskStatus,
push
.refuse_reason refuseReason,
reason
.refuse_reason refuseReason,
push.refuse_remark refuseRemark
from CH_APR_TASK task
left join ch_apr_organ organ on task.apr_organ_id = organ.apr_organ_id
...
...
@@ -54,6 +54,7 @@
left join ch_apr_task_push push on task.task_id = push.task_id
left join ch_apr_task_emp cate on task.task_id = cate.task_id
left join ch_apr_report report on report.TASK_ID = task.TASK_ID
left join ch_refuse_reason reason on push.refuse_reason = reason.refuse_reason_id
<where>
<if
test=
"organIds != null"
>
and task.apr_organ_id in
...
...
@@ -233,6 +234,7 @@
<select
id=
"taskGroupInfoList"
resultType=
"com.hungraim.ltc.pojo.vo.assessment.TaskGroupInfoVO"
>
select push.task_push_id taskPushId,
push.time time,
push.assign_time assignTime,
push.Group_number groupNumber,
task.apr_organ_id aprOrganId,
organ.ORGAN_NAME organName,
...
...
@@ -252,13 +254,14 @@
emp.real_name empRealName,
emp.certi_code empCertiCode,
push.status status,
push.Refuse_reason
refuseReason,/*拒绝原因*/
reason.Refuse_reason
refuseReason,/*拒绝原因*/
push.Refuse_remark remark/*备注*/
from ch_apr_task_push push
left join ch_apr_task task on push.task_id = task.task_id
left join CH_FND_ORGAN organ on organ.organ_id = task.organ_id
left join ch_disable_info disable on task.disable_info_id = disable.disab_info_id
left join ch_apr_emp emp on emp.emp_id = push.emp_id
left join ch_refuse_reason reason on push.refuse_reason = reason.refuse_reason_id
where push.group_number = #{groupNumber}
</select>
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/assessment/ChAprTaskPushHis.java
View file @
7db1a7b3
...
...
@@ -21,7 +21,7 @@ public class ChAprTaskPushHis implements Serializable {
/**
* 任务推送ID(年月日+串码6)
*/
@TableId
(
type
=
IdType
.
INPUT
)
@TableId
(
value
=
"his_task_push_id"
,
type
=
IdType
.
INPUT
)
private
Long
hisTaskPushId
;
/**
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/assessment/ChRefuseReason.java
0 → 100644
View file @
7db1a7b3
package
com
.
hungraim
.
ltc
.
pojo
.
entity
.
assessment
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.KeySequence
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
/**
* 拒绝原因基表:ch_refuse_reason
*/
@Data
@TableName
(
"CH_REFUSE_REASON"
)
@KeySequence
(
"SEQ_CH_REFUSE_REASON"
)
public
class
ChRefuseReason
{
/**
* 拒绝原因id
*/
@TableId
(
value
=
"refuse_reason_id"
,
type
=
IdType
.
INPUT
)
private
Integer
refuseReasonId
;
/**
* 拒绝原因名称
*/
private
String
refuseReason
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/assessment/TaskGroupInfoVO.java
View file @
7db1a7b3
...
...
@@ -15,11 +15,16 @@ public class TaskGroupInfoVO {
*/
private
String
taskPushId
;
/**
*
分组日期
*
预约时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
time
;
/**
* 分组日期
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
assignTime
;
/**
* 组号
*/
private
String
groupNumber
;
...
...
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