فهرست منبع

【task-5528】
5528 考勤概况数据统计条数错误修改
考勤统计分钟数小数点后过长修改为保留两位小数点后数字

xiexh 8 ماه پیش
والد
کامیت
b3fec8afc4

+ 4 - 2
ibps-provider-root/modules/provider-business/src/main/java/com/lc/ibps/components/sqlzdy/Service/SwdlServiceImpl.java

@@ -803,7 +803,8 @@ public class SwdlServiceImpl extends GenericProvider implements SwdlService {
                     // 8. 班次时长统计,标准工作时长
                     if (shiftDuration != null && !shiftDuration.isEmpty()) {
                         try {
-                            double duration = Double.parseDouble(shiftDuration)/60;
+                            //double duration = Double.parseDouble(shiftDuration)/60;
+                            double duration = Math.round(Double.parseDouble(shiftDuration)/60);
                             addTo(userStats, "ban_ci_shi_chang", duration);
                         } catch (NumberFormatException e) {
                             // 忽略格式错误
@@ -813,7 +814,8 @@ public class SwdlServiceImpl extends GenericProvider implements SwdlService {
                     // 9. 实际工作时长统计
                     if (workDuration != null && !workDuration.isEmpty()) {
                         try {
-                            double duration = Double.parseDouble(workDuration)/60;
+                           // double duration = Double.parseDouble(workDuration)/60;
+                            double duration = Math.round(Double.parseDouble(shiftDuration)/60);
                             addTo(userStats, "gong_zuo_shi_chang", duration);
                         } catch (NumberFormatException e) {
                             // 忽略格式错误

+ 10 - 1
ibps-provider-root/modules/provider-business/src/main/resources/com/lc/ibps/klimsibps/mapping/UpdateDataTableMapper.xml

@@ -611,7 +611,12 @@
     </select>
     <select id="selectAttendanceDataCount" resultType="java.lang.Integer" parameterType="java.util.Map">
         SELECT
-        COUNT( DISTINCT USER_ID_ )
+        COUNT(*) as totalCount
+        FROM
+        (
+        SELECT
+        USER_ID_,
+        ri_qi_
         FROM
         v_attendance_statistics
         <where>
@@ -629,6 +634,10 @@
                 AND FIND_IN_SET(yong_hu_id_, #{map.yongHuId})
             </if>
         </where>
+        GROUP BY
+        USER_ID_,
+        ri_qi_
+        ) as T1
     </select>
     <select id="selectClassAdjustmentList" resultType="java.util.Map" parameterType="java.util.Map">
         SELECT