seyason 1 рік тому
батько
коміт
48ca282ccb

+ 22 - 8
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportController.java

@@ -1155,7 +1155,7 @@ public class ReportController {
         }
         //校验工作时长
         for (Report report : reportList) {
-            if (report.getWorkingTime() == null || report.getWorkingTime() <= 0.0) {
+            if (report.getWorkingTime() == null) {
                 HttpRespMsg httpRespMsg = new HttpRespMsg();
                 //httpRespMsg.setError("请填写工作时长");
                 httpRespMsg.setError(MessageUtils.message("profession.duration"));
@@ -1281,21 +1281,35 @@ public class ReportController {
         }
 
         //如果锁定工作时长上限的话,需要校验每日的合计工作时长
-        if (comTimeType.getLockWorktime() == 1) {
-            for (Report report : reportList) {
-                String creatorId = report.getCreatorId();
-                LocalDate cDate = report.getCreateDate();
-                //查找同一个人同一天的日报合计工作时长
-                double dailyWorktime = reportList.stream().filter(r->r.getCreatorId().equals(creatorId) && r.getCreateDate().isEqual(cDate)).mapToDouble(Report::getWorkingTime).sum();
-
+        for (Report report : reportList) {
+            String creatorId = report.getCreatorId();
+            LocalDate cDate = report.getCreateDate();
+            //查找同一个人同一天的日报合计工作时长
+            double dailyWorktime = reportList.stream().filter(r->r.getCreatorId().equals(creatorId) && r.getCreateDate().isEqual(cDate)).mapToDouble(Report::getWorkingTime).sum();
+            if (comTimeType.getLockWorktime() == 1) {
                 if (dailyWorktime > comTimeType.getAllday()) {
                     HttpRespMsg httpRespMsg = new HttpRespMsg();
                     //httpRespMsg.setError("每日工作时长不得超过"+comTimeType.getAllday()+"小时");
                     httpRespMsg.setError(MessageUtils.message("profession.MaxReportTimeError",comTimeType.getAllday()));
                     return httpRespMsg;
                 }
+            } else {
+                //校验上下限
+                if (dailyWorktime < comTimeType.getMinReportTime()) {
+                    HttpRespMsg httpRespMsg = new HttpRespMsg();
+                    //httpRespMsg.setError("每日工作时长不得超过"+comTimeType.getAllday()+"小时");
+                    httpRespMsg.setError("每日工作时长不得少于" + comTimeType.getMinReportTime() + "小时");
+                    return httpRespMsg;
+                } else if (dailyWorktime > comTimeType.getMaxReportTime()) {
+                    HttpRespMsg httpRespMsg = new HttpRespMsg();
+                    //httpRespMsg.setError("每日工作时长不得超过"+comTimeType.getAllday()+"小时");
+                    httpRespMsg.setError("每日工作时长不得超过" + comTimeType.getMaxReportTime() + "小时");
+                    return httpRespMsg;
+                }
             }
         }
+
+
         //校验填报工时
         List<Report> checkedUserDayList = new ArrayList<>();
         for (Report report : reportList) {

+ 4 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ExcelExportServiceImpl.java

@@ -76,6 +76,7 @@ public class ExcelExportServiceImpl implements ExcelExportService {
         if(wxCorpInfo != null && wxCorpInfo.getSaasSyncContact() == 1){
             String mediaId = wxCorpInfoService.getTranslationMediaId(fileUrlSuffix);
             String jobId = wxCorpInfoService.syncTranslation(wxCorpInfo.getCorpid(),mediaId,fileUrlSuffix, null);
+            System.out.println("上传待转译文件到企业微信, jobId==" + jobId);
             int i = 0;
             String syncTranslationResult = null;
             /**
@@ -86,8 +87,10 @@ public class ExcelExportServiceImpl implements ExcelExportService {
             while (i < 30) {
                 if (i < 10) {
                     Thread.sleep(300);
-                } else {
+                } else if (i < 20){
                     Thread.sleep(1000);
+                } else {
+                    Thread.sleep(3000);
                 }
                 System.out.println("i=="+i+", "+LocalDateTime.now());
                 CorpwxJobResult corpwxJobResult = corpwxJobCenter.get(jobId);

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/workView/fillReport.vue

@@ -182,7 +182,7 @@ export default {
         //完成件数为小数时,如果勾选了钢印号需要二次确认
         this.$dialog.confirm({
                     title: '提醒',
-                    message: '检测到件数为小数同时勾选了钢印号,确认该钢印号已完成吗?'
+                    message: '检测到件数为小数同时勾选了钢印号,确认该钢印号已完成吗?'
                 }).then(() => {
                     this.submitData();
                 }).catch(() => {});

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/i18n/en.json

@@ -911,7 +911,7 @@
   "imitillingtime": "Max report time",
   "minReportTime": "Min report time",
   "lockingworkinghours": "Lock working hours",
-  "chargedtocost": "Overtime hours charged to cost",
+  "chargedtocost": "Overtime hours produce extra cost",
   "hourscanbereported": "Reportable overtime hours",
   "workSettings": "Overtime settings",
   "bei-gong-zi": "double salary",

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/i18n/zh.json

@@ -917,7 +917,7 @@
   "minReportTime": "工时下限",
   "workSettings": "加班设置",
   "hourscanbereported": "可填报加班时长",
-  "chargedtocost": "加班工时记入成本",
+  "chargedtocost": "加班产生额外成本",
   "bei-gong-zi": "倍工资",
   "visittwo": "方式二:直接录入时薪",
   "timeemployees": "(适合计时发放酬劳的小时工,兼职员工)",