diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusAttendanceServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusAttendanceServiceImpl.java index a47f1105..d4709dec 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusAttendanceServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusAttendanceServiceImpl.java @@ -2842,7 +2842,7 @@ public class BusAttendanceServiceImpl extends ServiceImpl map){ //构建数据 //timeType 1:今天 2:本周 3:本月 - Long zrs = 0L; //总人数 + Long zrs; //总人数 Long cqr = 0L; //出勤人数 BigDecimal cql = BigDecimal.ZERO; //出勤率 //查询此项目的所有人员 @@ -2875,8 +2875,8 @@ public class BusAttendanceServiceImpl extends ServiceImpl0){ vo.setDgl( - //到岗人数/总人数 四舍五入 一位小数 - BigDecimal.valueOf(vo.getDgrs()).divide(BigDecimal.valueOf(vo.getZrs()), 1, RoundingMode.HALF_UP) + //到岗人数/总人数 四舍五入 2位小数 + BigDecimal.valueOf(vo.getDgrs()).divide(BigDecimal.valueOf(vo.getZrs()), 2, RoundingMode.HALF_UP).multiply(BigDecimal.valueOf(100)) ); }else { vo.setDgl(BigDecimal.ZERO); @@ -2887,8 +2887,8 @@ public class BusAttendanceServiceImpl extends ServiceImpl0){ vo.setDgl( - //到岗人数/总人数 四舍五入 一位小数 - BigDecimal.valueOf(vo.getDgrs()).divide(BigDecimal.valueOf(vo.getZrs()), 1, RoundingMode.HALF_UP) + //到岗人数/总人数 四舍五入 2位小数 + BigDecimal.valueOf(vo.getDgrs()).divide(BigDecimal.valueOf(vo.getZrs()), 2, RoundingMode.HALF_UP).multiply(BigDecimal.valueOf(100)) ); }else { vo.setDgl(BigDecimal.ZERO); @@ -2897,12 +2897,16 @@ public class BusAttendanceServiceImpl extends ServiceImpl infoData = busAttendanceService.getRyglOnlineUserInfoData(projectId); //获取右边数据 - busAttendanceService.getAttendanceInfo(projectId, (long) timeType, infoData); + busAttendanceService.getAttendanceInfo(projectId, Long.valueOf(timeType) , infoData); //返回数据 maps.add(infoData); break;