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
023db654
Commit
023db654
authored
Jan 14, 2023
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:新增获取指定日期值班人员统计
parent
b7d61f76
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
2 deletions
+50
-2
DutyPersonShiftMapper.java
.../boot/module/common/api/mapper/DutyPersonShiftMapper.java
+2
-0
DutyPersonShiftMapper.xml
...n-api/src/main/resources/mapper/DutyPersonShiftMapper.xml
+30
-0
DutyPersonController.java
...ot/module/common/biz/controller/DutyPersonController.java
+12
-0
DutyPersonServiceImpl.java
...module/common/biz/service/impl/DutyPersonServiceImpl.java
+6
-2
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 @
023db654
...
...
@@ -150,4 +150,6 @@ public interface DutyPersonShiftMapper extends BaseMapper<DutyPersonShift> {
List
<
Map
<
String
,
Object
>>
getNewEquipmentForSpecifyDate
(
String
dutyDate
,
String
groupCode
,
String
equipmentId
,
String
equipmentName
,
String
groupByName
);
String
getFirstAidCompanyId
();
List
<
Map
<
String
,
Object
>>
dayDutyStatistics
(
String
date
,
String
groupCode
,
String
fieldCode
,
String
dictType
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/DutyPersonShiftMapper.xml
View file @
023db654
...
...
@@ -119,6 +119,36 @@
AND i.field_value != ''
GROUP BY i.field_value
</select>
<select
id=
"dayDutyStatistics"
resultType=
"java.util.Map"
>
SELECT
i.field_value AS postTypeName,
count( 1 ) AS total,
d.`code`,
MAX( CASE d.`code` WHEN '1601' THEN 'firePerson' WHEN '1602' THEN 'opsPerson' WHEN '1601' THEN 'securityPerson' ELSE 'otherPerson' END ) AS postType
FROM
cb_duty_person_shift s,
cb_dynamic_form_instance i
LEFT JOIN cb_data_dictionary d ON i.field_value = d.`name`
WHERE
s.instance_id = i.instance_id
<if
test=
"fieldCode != null and fieldCode != ''"
>
AND i.field_code = #{fieldCode}
</if>
<if
test=
"date != null and date != ''"
>
AND s.duty_date = #{date}
</if>
AND s.shift_id IS NOT NULL
<if
test=
"groupCode != null and groupCode != ''"
>
AND i.group_code = #{groupCode}
</if>
AND i.field_value IS NOT NULL
AND i.field_value != ''
<if
test=
"dictType != null and dictType != ''"
>
AND d.type = #{dictType}
</if>
GROUP BY
i.field_value
</select>
<select
id=
"genRangeDate"
resultType=
"map"
>
SELECT
DATE_FORMAT(DATE( DATE_ADD( #{beginDate}, INTERVAL @s DAY )),'%Y-%m-%d') AS date,
...
...
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 @
023db654
...
...
@@ -149,6 +149,18 @@ public class DutyPersonController extends BaseController {
return
ResponseHelper
.
buildResponse
(
iDutyPersonService
.
newStatisticsDay
(
beginDate
,
endDate
,
fieldCode
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
"/day-duty-statistics"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取指定日期值班人员统计"
,
notes
=
"获取指定日期值班人员统计"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
newDutyDetail
(
@ApiParam
(
value
=
"值班日期"
,
required
=
true
)
@RequestParam
String
date
,
@ApiParam
(
value
=
"分组编码"
,
required
=
true
)
@RequestParam
String
groupCode
,
@ApiParam
(
value
=
"属性编码"
)
@RequestParam
(
required
=
false
)
String
fieldCode
,
@ApiParam
(
value
=
"字典类型"
)
@RequestParam
(
required
=
false
)
String
dictType
)
throws
ParseException
{
return
ResponseHelper
.
buildResponse
(
iDutyPersonService
.
dayDutyStatistics
(
date
,
groupCode
,
fieldCode
,
dictType
));
}
/**
* 调班
*
...
...
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 @
023db654
...
...
@@ -329,8 +329,12 @@ public Object BuildScheduleDetails(String dutyDay, Long shiftId, String postType
public
List
<
Map
<
String
,
Object
>>
queryByCompanyNew
(
String
bizOrgName
){
return
dutyPersonShiftMapper
.
queryByCompanyNew
(
bizOrgName
);
}
@Override
public
List
<
Map
<
String
,
Object
>>
dayDutyStatistics
(
String
date
,
String
groupCode
,
String
fieldCode
,
String
dictType
)
{
return
dutyPersonShiftMapper
.
dayDutyStatistics
(
date
,
groupCode
,
fieldCode
,
dictType
);
}
public
Object
getSchedulingDutyForSpecifyDate
(
String
dutyDay
,
Long
shiftId
,
String
postType
,
String
fieldCode
)
{
List
<
Map
<
String
,
Object
>>
equipmentList
=
dutyPersonShiftMapper
.
getNewEquipmentForSpecifyDate
(
dutyDay
,
this
.
getGroupCode
(),
"deptId"
,
"deptName"
,
"result.deptId"
);
...
...
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