Commit bd4b0865 authored by zhangsen's avatar zhangsen

大屏接口新加人员出勤合格数据

parent fc347e09
...@@ -9,9 +9,11 @@ import java.util.Map; ...@@ -9,9 +9,11 @@ import java.util.Map;
public class BigScreen1VO { public class BigScreen1VO {
// private Map<String, Object> firefightersInfo; // private Map<String, Object> firefightersInfo;
List<Map<String, Object>> personList; private List<Map<String, Object>> personList;
List<Map<String, Object>> teamNumInfo; private List<Map<String, Object>> teamNumInfo;
private List<Map<String, Object>> usrSignInfo;
// private Integer teamNum; // private Integer teamNum;
} }
...@@ -46,4 +46,6 @@ public interface FirefightersMapper extends BaseMapper<Firefighters> { ...@@ -46,4 +46,6 @@ public interface FirefightersMapper extends BaseMapper<Firefighters> {
Integer getTeamCountByCode(@Param("companyCode") String companyCode); Integer getTeamCountByCode(@Param("companyCode") String companyCode);
Map<String, Object> getFireForceInfoByCode(@Param("companyCode") String companyCode); Map<String, Object> getFireForceInfoByCode(@Param("companyCode") String companyCode);
List<Map<String, Object>> getStationSignInfo(@Param("companyCode") String companyCode);
} }
...@@ -503,4 +503,39 @@ LEFT JOIN cb_fire_team cft ON cff.fire_team_id = cft.sequence_nbr ...@@ -503,4 +503,39 @@ LEFT JOIN cb_fire_team cft ON cff.fire_team_id = cft.sequence_nbr
) a ) a
) b ) b
</select> </select>
<select id="getStationSignInfo" resultType="java.util.Map">
SELECT b.qualifiedNum, b.unQualifiedNum, (TRUNCATE ( abs(( b.qualifiedNum ) / IF (( b.totalNum = 0 ),
1,
b.totalNum
)),
2
) * 100) as qualifiedAbs
FROM
(
SELECT
count( a.signCount &gt;= 8 OR NULL ) AS qualifiedNum,
count( 1 ) AS totalNum,
count( a.signCount &lt; 8 OR NULL ) AS unQualifiedNum
FROM
(
SELECT
si.`code`,
count( DISTINCT cs.user_id ) AS signCount
FROM
idx_biz_station_info si
LEFT JOIN cb_org_usr ou ON ou.`code` = si.`code`
AND ou.is_delete = 0
LEFT JOIN cb_sign cs ON cs.biz_org_code = ou.biz_org_code
AND cs.date LIKE CONCAT( DATE_FORMAT( now(), '%Y-%m' ), '%' )
<where>
<if test="companyCode != null and companyCode != ''">
si.`code` = #{companyCode}
</if>
</where>
GROUP BY
si.`code`
) a
) b
</select>
</mapper> </mapper>
...@@ -297,6 +297,8 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi ...@@ -297,6 +297,8 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
bigScreen1VO.setTeamNumInfo(teamInfoList); bigScreen1VO.setTeamNumInfo(teamInfoList);
// bigScreen1VO.setTeamNum(teamCount); // bigScreen1VO.setTeamNum(teamCount);
// bigScreen1VO.setFirefightersInfo(fireForceInfoByCode); // bigScreen1VO.setFirefightersInfo(fireForceInfoByCode);
List<Map<String, Object>> stationSignInfo = firefightersMapper.getStationSignInfo(companyCode);
bigScreen1VO.setUsrSignInfo(stationSignInfo);
return bigScreen1VO; return bigScreen1VO;
} }
} }
...@@ -23,7 +23,7 @@ public class BigScreenController { ...@@ -23,7 +23,7 @@ public class BigScreenController {
@GetMapping(value = "/getFireForceInfoByCode") @GetMapping(value = "/getFireForceInfoByCode")
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "消防车、消防力量信息(专职消防队、运维人员)", notes = "消防车、消防力量信息(专职消防队、运维人员)") @ApiOperation(httpMethod = "GET", value = "消防车、消防力量信息(专职消防队、运维人员)、人员出勤", notes = "消防车、消防力量信息(专职消防队、运维人员、人员出勤)")
public ResponseModel getFireForceInfoByCode(@RequestParam(required = false, value = "companyCode") String companyCode) { public ResponseModel getFireForceInfoByCode(@RequestParam(required = false, value = "companyCode") String companyCode) {
return CommonResponseUtil.success(iFirefightersService.getFireForceInfoByCode(companyCode)); return CommonResponseUtil.success(iFirefightersService.getFireForceInfoByCode(companyCode));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment