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
ff8d2fe4
Commit
ff8d2fe4
authored
Jan 07, 2022
by
chenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交值班排版人员的右侧详情接口
parent
fdc6eaad
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
106 additions
and
11 deletions
+106
-11
DutyPersonShiftMapper.java
.../boot/module/common/api/mapper/DutyPersonShiftMapper.java
+3
-0
DutyPersonShiftMapper.xml
...n-api/src/main/resources/mapper/DutyPersonShiftMapper.xml
+44
-0
DutyPersonController.java
...ot/module/common/biz/controller/DutyPersonController.java
+8
-1
DutyFirstAidServiceImpl.java
...dule/common/biz/service/impl/DutyFirstAidServiceImpl.java
+9
-9
DutyPersonServiceImpl.java
...module/common/biz/service/impl/DutyPersonServiceImpl.java
+42
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/DutyPersonShiftMapper.java
View file @
ff8d2fe4
...
...
@@ -140,4 +140,7 @@ public interface DutyPersonShiftMapper extends BaseMapper<DutyPersonShift> {
List
<
Map
<
String
,
Object
>>
queryByCompanyId
(
@Param
(
value
=
"bizNames"
)
List
<
String
>
bizNames
);
List
<
Map
<
String
,
Object
>>
queryByCompanyNew
(
String
bizOrgName
);
List
<
Map
<
String
,
Object
>>
getNewEquipmentForSpecifyDate
(
String
dutyDate
,
String
groupCode
,
String
equipmentId
,
String
equipmentName
,
String
groupByName
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/DutyPersonShiftMapper.xml
View file @
ff8d2fe4
...
...
@@ -202,6 +202,50 @@ select * from (
group by ${groupByName}
</if>
</select>
<select
id=
'getNewEquipmentForSpecifyDate'
resultType=
'map'
>
select * from (
SELECT
MAX(
CASE
WHEN cd.FIELD_CODE = #{equipmentId} THEN
cd.FIELD_VALUE
END
) AS #{equipmentId},
MAX(
CASE
WHEN cd.FIELD_CODE = 'userName' THEN
cd.FIELD_VALUE
END
) AS 'userName',
MAX(
CASE
WHEN cd.FIELD_CODE = #{equipmentName} THEN
cd.FIELD_VALUE
END
) AS #{equipmentName}
FROM
cb_dynamic_form_instance cd
LEFT JOIN (
SELECT
dp.instance_id,
ds.`name`
FROM
cb_duty_person_shift dp
LEFT JOIN cb_duty_shift ds ON dp.shift_id = ds.sequence_nbr
WHERE
dp.duty_date = #{dutyDate} and dp.is_delete=0
) cds ON cd.instance_id = cds.instance_id
where cd.group_code =#{groupCode} and cds.instance_id is not null and
cd.is_delete=0
group by cd.instance_id
) result
<if
test=
"groupByName != null and groupByName!='' "
>
group by ${groupByName}
</if>
</select>
<select
id=
'getInstanceIdForSpecifyDateAndEquipment'
resultType=
'map'
>
SELECT
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/DutyPersonController.java
View file @
ff8d2fe4
...
...
@@ -181,7 +181,14 @@ public class DutyPersonController extends BaseController {
@ApiParam
(
value
=
"岗位"
)
@RequestParam
(
required
=
false
)
String
postType
)
{
return
ResponseHelper
.
buildResponse
(
iDutyPersonService
.
dayDutyPersonList
(
dutyDay
,
shiftId
,
postType
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
"新查询指定日期值班人信息列表"
)
@GetMapping
(
"/new-person/{dutyDay}/list"
)
public
ResponseModel
newListDutyPerson
(
@ApiParam
(
value
=
"值班日期"
,
required
=
true
)
@PathVariable
String
dutyDay
,
@ApiParam
(
value
=
"班次id"
)
@RequestParam
(
required
=
false
)
Long
shiftId
,
@ApiParam
(
value
=
"岗位"
)
@RequestParam
(
required
=
false
)
String
postType
)
{
return
ResponseHelper
.
buildResponse
(
iDutyPersonService
.
getSchedulingDutyForSpecifyDate
(
dutyDay
,
shiftId
,
postType
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
"查询当前值班人信息列表"
)
@GetMapping
(
"/person/on_duty/list"
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DutyFirstAidServiceImpl.java
View file @
ff8d2fe4
...
...
@@ -65,15 +65,15 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
}
List
<
Object
>
detailList
=
new
ArrayList
<
Object
>();
for
(
Map
<
String
,
Object
>
map
:
equipmentList
)
{
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<
Map
<
String
,
Object
>
>();
LinkedHashMap
<
String
,
Object
>
titleMap_1
=
new
LinkedHashMap
<
String
,
Object
>();
titleMap_1
.
put
(
"120急救站"
,
map
.
get
(
"firstAid"
).
toString
());
resultList
.
add
(
titleMap_1
);
LinkedHashMap
<
String
,
Object
>
titleMap_2
=
new
LinkedHashMap
<
String
,
Object
>();
if
(
map
.
containsKey
(
"teamName"
)
&&
map
.
get
(
"teamName"
)
!=
null
){
titleMap_2
.
put
(
"单位/部门"
,
map
.
get
(
"teamName"
).
toString
());
}
resultList
.
add
(
titleMap_2
);
List
<
Object
>
resultList
=
new
ArrayList
<
Object
>();
//
LinkedHashMap<String, Object> titleMap_1 = new LinkedHashMap<String, Object>();
//
titleMap_1.put("120急救站", map.get("firstAid").toString());
resultList
.
add
(
map
.
get
(
"firstAid"
).
toString
()
);
//
LinkedHashMap<String, Object> titleMap_2 = new LinkedHashMap<String, Object>();
//
if(map.containsKey("teamName") && map.get("teamName") != null){
//
titleMap_2.put("单位/部门", map.get("teamName").toString());
//
}
//
resultList.add(titleMap_2);
String
carId
=
map
.
get
(
"firstAidId"
).
toString
();
Map
<
String
,
Object
>
instanceMap
=
dutyPersonShiftMapper
.
getInstanceIdForSpecifyDateAndEquipment
(
dutyDay
,
this
.
getGroupCode
(),
carId
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DutyPersonServiceImpl.java
View file @
ff8d2fe4
...
...
@@ -304,7 +304,48 @@ public Object BuildScheduleDetails(String dutyDay, Long shiftId, String postType
}
public
Object
getSchedulingDutyForSpecifyDate
(
String
dutyDay
,
Long
shiftId
,
String
postType
)
{
List
<
Map
<
String
,
Object
>>
equipmentList
=
dutyPersonShiftMapper
.
getNewEquipmentForSpecifyDate
(
dutyDay
,
this
.
getGroupCode
(),
"deptId"
,
"deptName"
,
"result.deptId"
);
if
(
equipmentList
==
null
||
equipmentList
.
size
()
<
1
||
equipmentList
.
get
(
0
)
==
null
)
{
return
null
;
}
List
<
Object
>
detailList
=
new
ArrayList
<
Object
>();
for
(
Map
<
String
,
Object
>
map
:
equipmentList
)
{
List
<
Object
>
resultList
=
new
ArrayList
<
Object
>();
LinkedHashMap
<
String
,
Object
>
titleMap_2
=
new
LinkedHashMap
<
String
,
Object
>();
if
(
map
.
containsKey
(
"deptName"
)
&&
map
.
get
(
"deptName"
)
!=
null
){
resultList
.
add
(
map
.
get
(
"deptName"
).
toString
());
}
String
carId
=
map
.
get
(
"deptId"
).
toString
();
Map
<
String
,
Object
>
instanceMap
=
dutyPersonShiftMapper
.
getInstanceIdForSpecifyDateAndEquipment
(
dutyDay
,
this
.
getGroupCode
(),
carId
);
if
(
instanceMap
==
null
)
{
continue
;
}
String
instanceId
=
instanceMap
.
get
(
"instanceIds"
).
toString
();
if
(
StringUtils
.
isNotBlank
(
instanceId
))
{
String
[]
instanceIds
=
instanceId
.
split
(
","
);
// 获取当前装备ID下的排版数据
List
<
Map
<
String
,
Object
>>
specifyDateList
=
dutyPersonShiftMapper
.
getPositionStaffDutyForSpecifyDate
(
dutyDay
,
this
.
getGroupCode
(),
instanceIds
,
null
);
if
(
specifyDateList
==
null
||
specifyDateList
.
size
()
<
1
||
specifyDateList
.
get
(
0
)
==
null
)
{
continue
;
}
for
(
Map
<
String
,
Object
>
specify
:
specifyDateList
)
{
LinkedHashMap
<
String
,
Object
>
infoMap_2
=
new
LinkedHashMap
<
String
,
Object
>();
if
(
specify
.
containsKey
(
"postTypeName"
)&&
specify
.
get
(
"postTypeName"
)!=
null
&&
specify
.
containsKey
(
"userName"
)&&
specify
.
get
(
"userName"
)!=
null
)
{
infoMap_2
.
put
(
specify
.
get
(
"postTypeName"
).
toString
(),
specify
.
get
(
"userName"
).
toString
());
resultList
.
add
(
infoMap_2
);
}
}
}
detailList
.
add
(
resultList
);
}
return
detailList
;
}
...
...
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