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
35ca55cb
Commit
35ca55cb
authored
Apr 22, 2021
by
蔡镇泽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通过报告id查询评定报告人员信息
parent
63252d71
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
24 deletions
+47
-24
TaskController.java
...main/java/com/hungraim/ltc/controller/TaskController.java
+14
-2
AprPersonInfoMapper.java
...c/main/java/com/hungraim/ltc/dao/AprPersonInfoMapper.java
+1
-1
TaskService.java
...e/src/main/java/com/hungraim/ltc/service/TaskService.java
+3
-0
TaskServiceImpl.java
...n/java/com/hungraim/ltc/service/impl/TaskServiceImpl.java
+19
-11
ChDisableEvaluateMapper.xml
...ice/src/main/resources/mapper/ChDisableEvaluateMapper.xml
+10
-10
No files found.
assessment/assessment-service/src/main/java/com/hungraim/ltc/controller/TaskController.java
View file @
35ca55cb
package
com
.
hungraim
.
ltc
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.hungraim.ltc.pojo.entity.assessment.ChAprPersonInfo
;
import
com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel
;
import
com.hungraim.ltc.pojo.vo.assessment.AprEmpVO
;
import
com.hungraim.ltc.pojo.vo.assessment.TaskDistributionVO
;
...
...
@@ -82,6 +83,17 @@ public class TaskController {
}
/**
* 通过报告id查询评定报告人员信息
*
* @param reportId 评定报告id
*/
@RequestMapping
(
"/personInfoList"
)
public
Result
<
List
<
ChAprPersonInfo
>>
personInfoList
(
String
reportId
)
{
List
<
ChAprPersonInfo
>
list
=
taskService
.
personInfoList
(
reportId
);
return
Result
.
success
(
list
);
}
/**
* 查询评定人员列表
*
* @param organName 评定机构名称
...
...
@@ -91,8 +103,8 @@ public class TaskController {
*/
@RequestMapping
(
"/aprEmpList"
)
public
Result
<
List
<
AprEmpVO
>>
aprEmpList
(
String
organName
,
String
name
,
String
tel
,
String
groupLeader
)
{
List
<
AprEmpVO
>
aprEmp
VO
S
=
taskService
.
aprEmpList
(
organName
,
name
,
tel
,
groupLeader
);
return
Result
.
success
(
aprEmp
VO
S
);
List
<
AprEmpVO
>
aprEmpS
=
taskService
.
aprEmpList
(
organName
,
name
,
tel
,
groupLeader
);
return
Result
.
success
(
aprEmpS
);
}
/**
...
...
assessment/assessment-service/src/main/java/com/hungraim/ltc/dao/AprPeronInfoMapper.java
→
assessment/assessment-service/src/main/java/com/hungraim/ltc/dao/AprPer
s
onInfoMapper.java
View file @
35ca55cb
...
...
@@ -10,5 +10,5 @@ import org.springframework.stereotype.Repository;
*/
@Mapper
@Repository
public
interface
AprPeronInfoMapper
extends
BaseMapper
<
ChAprPersonInfo
>
{
public
interface
AprPer
s
onInfoMapper
extends
BaseMapper
<
ChAprPersonInfo
>
{
}
assessment/assessment-service/src/main/java/com/hungraim/ltc/service/TaskService.java
View file @
35ca55cb
package
com
.
hungraim
.
ltc
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.hungraim.ltc.pojo.entity.assessment.ChAprPersonInfo
;
import
com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel
;
import
com.hungraim.ltc.pojo.vo.assessment.AprEmpVO
;
import
com.hungraim.ltc.pojo.vo.assessment.TaskDistributionVO
;
...
...
@@ -65,4 +66,6 @@ public interface TaskService {
Result
<
Object
>
taskGroup
(
Integer
pushId
,
Integer
status
);
List
<
ChCfgSrvDisableLevel
>
cfgSrvDisableLevelList
();
List
<
ChAprPersonInfo
>
personInfoList
(
String
reportId
);
}
assessment/assessment-service/src/main/java/com/hungraim/ltc/service/impl/TaskServiceImpl.java
View file @
35ca55cb
...
...
@@ -36,7 +36,7 @@ public class TaskServiceImpl implements TaskService {
@Autowired
private
TaskEmpMapper
taskEmpMapper
;
@Autowired
private
AprPer
onInfoMapper
per
onInfoMapper
;
private
AprPer
sonInfoMapper
pers
onInfoMapper
;
@Autowired
private
TaskPushMapper
taskPushMapper
;
@Autowired
...
...
@@ -81,20 +81,20 @@ public class TaskServiceImpl implements TaskService {
person1Info
.
setReportId
(
report
.
getReportId
());
person1Info
.
setEmpId
(
person1
);
person1Info
.
setFcd
(
new
Date
());
peronInfoMapper
.
insert
(
person1Info
);
per
s
onInfoMapper
.
insert
(
person1Info
);
if
(
person2
!=
null
)
{
ChAprPersonInfo
personInfo
=
new
ChAprPersonInfo
();
personInfo
.
setReportId
(
report
.
getReportId
());
personInfo
.
setEmpId
(
person1
);
personInfo
.
setFcd
(
new
Date
());
peronInfoMapper
.
insert
(
personInfo
);
per
s
onInfoMapper
.
insert
(
personInfo
);
}
if
(
person3
!=
null
)
{
ChAprPersonInfo
personInfo
=
new
ChAprPersonInfo
();
personInfo
.
setReportId
(
report
.
getReportId
());
personInfo
.
setEmpId
(
person1
);
personInfo
.
setFcd
(
new
Date
());
peronInfoMapper
.
insert
(
personInfo
);
per
s
onInfoMapper
.
insert
(
personInfo
);
}
}
...
...
@@ -108,44 +108,44 @@ public class TaskServiceImpl implements TaskService {
chAprReport
.
setEvaluateTime
(
evaluateDate
);
aprReportMapper
.
updateById
(
chAprReport
);
//修改鉴定报告人员(有就update,没有就insert)
List
<
ChAprPersonInfo
>
personInfos
=
peronInfoMapper
.
selectList
(
new
QueryWrapper
<
ChAprPersonInfo
>().
eq
(
"report_id"
,
reportId
));
List
<
ChAprPersonInfo
>
personInfos
=
per
s
onInfoMapper
.
selectList
(
new
QueryWrapper
<
ChAprPersonInfo
>().
eq
(
"report_id"
,
reportId
));
if
(
person1
!=
null
)
{
if
(
personInfos
.
size
()
>=
1
)
{
ChAprPersonInfo
personInfo
=
personInfos
.
get
(
0
);
personInfo
.
setEmpId
(
person1
);
peronInfoMapper
.
updateById
(
personInfo
);
per
s
onInfoMapper
.
updateById
(
personInfo
);
}
else
{
ChAprPersonInfo
personInfo
=
new
ChAprPersonInfo
();
personInfo
.
setReportId
(
chAprReport
.
getReportId
());
personInfo
.
setEmpId
(
person1
);
personInfo
.
setFcd
(
new
Date
());
peronInfoMapper
.
insert
(
personInfo
);
per
s
onInfoMapper
.
insert
(
personInfo
);
}
}
if
(
person2
!=
null
)
{
if
(
personInfos
.
size
()
>=
2
)
{
ChAprPersonInfo
personInfo
=
personInfos
.
get
(
0
);
personInfo
.
setEmpId
(
person2
);
peronInfoMapper
.
updateById
(
personInfo
);
per
s
onInfoMapper
.
updateById
(
personInfo
);
}
else
{
ChAprPersonInfo
personInfo
=
new
ChAprPersonInfo
();
personInfo
.
setReportId
(
chAprReport
.
getReportId
());
personInfo
.
setEmpId
(
person2
);
personInfo
.
setFcd
(
new
Date
());
peronInfoMapper
.
insert
(
personInfo
);
per
s
onInfoMapper
.
insert
(
personInfo
);
}
}
if
(
person3
!=
null
)
{
if
(
personInfos
.
size
()
>=
3
)
{
ChAprPersonInfo
personInfo
=
personInfos
.
get
(
0
);
personInfo
.
setEmpId
(
person3
);
peronInfoMapper
.
updateById
(
personInfo
);
per
s
onInfoMapper
.
updateById
(
personInfo
);
}
else
{
ChAprPersonInfo
personInfo
=
new
ChAprPersonInfo
();
personInfo
.
setReportId
(
chAprReport
.
getReportId
());
personInfo
.
setEmpId
(
person3
);
personInfo
.
setFcd
(
new
Date
());
peronInfoMapper
.
insert
(
personInfo
);
per
s
onInfoMapper
.
insert
(
personInfo
);
}
}
}
...
...
@@ -158,12 +158,14 @@ public class TaskServiceImpl implements TaskService {
return
Result
.
failed
(
"评定人员必须是组长!"
);
}
String
[]
taskIds
=
taskId
.
split
(
","
);
Date
assignTime
=
new
Date
();
//任务分配日期
for
(
String
id
:
taskIds
)
{
ChAprTask
task
=
taskMapper
.
selectById
(
id
);
if
(
task
==
null
)
{
return
Result
.
failed
(
"无效的taskId!"
);
}
task
.
setAprEmpId
(
empId
);
task
.
setAssignTime
(
assignTime
);
int
count
=
taskMapper
.
updateById
(
task
);
if
(
count
!=
1
)
{
return
Result
.
failed
(
"修改失败!"
);
...
...
@@ -201,4 +203,9 @@ public class TaskServiceImpl implements TaskService {
public
List
<
ChCfgSrvDisableLevel
>
cfgSrvDisableLevelList
()
{
return
cfgSrvDisableLevelMapper
.
selectList
(
new
QueryWrapper
<>());
}
@Override
public
List
<
ChAprPersonInfo
>
personInfoList
(
String
reportId
)
{
return
personInfoMapper
.
selectList
(
new
QueryWrapper
<
ChAprPersonInfo
>().
eq
(
"report_id"
,
reportId
));
}
}
\ No newline at end of file
assessment/assessment-service/src/main/resources/mapper/ChDisableEvaluateMapper.xml
View file @
35ca55cb
...
...
@@ -113,13 +113,13 @@
LEFT JOIN CH_APR_ORGAN organ ON task.APR_ORGAN_ID = organ.APR_ORGAN_ID
LEFT JOIN CH_DISABLE_RISK_LEVEL lev ON report.DISABLE_LEVEL_ID = lev.DISA_RISK_LEVEL_ID
<where>
<if
test=
"name != null and name
=
= ''"
>
<if
test=
"name != null and name
!
= ''"
>
and info.REAL_NAME like CONCAT(CONCAT('%',#{name}) ,'%')
</if>
<if
test=
"certiCode != null and certiCode
=
= ''"
>
<if
test=
"certiCode != null and certiCode
!
= ''"
>
and info.CERTI_CODE = #{certiCode}
</if>
<if
test=
"tel != null and tel
=
= ''"
>
<if
test=
"tel != null and tel
!
= ''"
>
and info.tel = #{tel}
</if>
</where>
...
...
@@ -145,13 +145,13 @@
LEFT JOIN ch_apr_emp emp on task.apr_emp_id = emp.emp_id
LEFT JOIN CH_APR_ORGAN emp_organ on emp.apr_organ_id = emp_organ.apr_organ_id
<where>
<if
test=
"name != null and name
=
= ''"
>
<if
test=
"name != null and name
!
= ''"
>
and emp.REAL_NAME like CONCAT(CONCAT('%',#{name}) ,'%')
</if>
<if
test=
"certiCode != null and certiCode
=
= ''"
>
<if
test=
"certiCode != null and certiCode
!
= ''"
>
and emp.CERTI_CODE = #{certiCode}
</if>
<if
test=
"tel != null and tel
=
= ''"
>
<if
test=
"tel != null and tel
!
= ''"
>
and emp.tel = #{tel}
</if>
</where>
...
...
@@ -176,16 +176,16 @@
LEFT JOIN ch_apr_organ organ ON emp.apr_organ_id = organ.apr_organ_id
LEFT JOIN ch_srv_organ srvOrgan ON organ.organ_id = srvOrgan.srv_organ_id
<where>
<if
test=
"organName != null and organName
=
= ''"
>
<if
test=
"organName != null and organName
!
= ''"
>
and organ.organ_name like CONCAT(CONCAT('%',#{organName}) ,'%')
</if>
<if
test=
"name != null and name
=
= ''"
>
<if
test=
"name != null and name
!
= ''"
>
and emp.real_name like CONCAT(CONCAT('%',#{name}) ,'%')
</if>
<if
test=
"tel != null and tel
=
= ''"
>
<if
test=
"tel != null and tel
!
= ''"
>
and emp.tel = #{tel}
</if>
<if
test=
"groupLeader != null and groupLeader
=
= ''"
>
<if
test=
"groupLeader != null and groupLeader
!
= ''"
>
and emp.Group_leader = #{groupLeader}
</if>
</where>
...
...
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