Переглянути джерело

修改工时导入新版的模板,增加阶段

QuYueTing 6 місяців тому
батько
коміт
258f934d42

+ 5 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -5614,8 +5614,10 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                             return msg;
                         }
                     }
-                    String stringCellValue = row.getCell(7)==null?null:row.getCell(7).getStringCellValue();
-                    String workContent = row.getCell(8)==null?null:row.getCell(8).getStringCellValue();
+                    //新增阶段
+                    String stageName = row.getCell(7)==null?null:row.getCell(7).getStringCellValue();
+                    String stringCellValue = row.getCell(8)==null?null:row.getCell(8).getStringCellValue();
+                    String workContent = row.getCell(9)==null?null:row.getCell(9).getStringCellValue();
                     double time = 0;
                     if (!StringUtils.isEmpty(stringCellValue)) {
                         time = Double.parseDouble(stringCellValue);
@@ -5630,6 +5632,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                             report.setGroupId(groupId);
                             report.setReportTimeType(1);
                             report.setWorkingTime(time);
+                            report.setStage(stageName);
                             report.setContent(workContent);
                             report.setMultiWorktime(timeType.getMultiWorktime());
 //                            report.setFillUserid(user.getId());  导入时,处理为自己填写的

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/UserCorpwxTimeMapper.xml

@@ -58,7 +58,7 @@
         </foreach>
         GROUP BY a.`corpwx_userid`,a.name ) card_time
         ON user.name = card_time.name
-        LEFT JOIN (SELECT r.creator_id, SUM(r.working_time) AS projectTime FROM report r WHERE r.company_id = #{companyId} AND  r.create_date in
+        LEFT JOIN (SELECT r.creator_id, SUM(r.working_time) AS projectTime FROM report r WHERE r.company_id = #{companyId} and r.state &lt;= 1 AND  r.create_date in
         <foreach collection="dateList" item="date" open="(" separator="," close=")">
             #{date}
         </foreach> GROUP BY r.`creator_id` ) report_time

BIN
fhKeeper/formulahousekeeper/management-platform/src/main/resources/upload/员工工时导入模板_新版.xlsx