فهرست منبع

增加可补填3天前日报功能

QuYueTing 10 ماه پیش
والد
کامیت
e539c6146f

+ 6 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportController.java

@@ -719,6 +719,12 @@ public class ReportController {
                 }else if(fillMonths ==5){
                 }else if(fillMonths ==5){
                     //前一天
                     //前一天
                     targetDate=curMonth.minusDays(1);
                     targetDate=curMonth.minusDays(1);
+                }else if(fillMonths ==6){
+                    //前2天
+                    targetDate=curMonth.minusDays(2);
+                }else if(fillMonths ==7){
+                    //前3天
+                    targetDate=curMonth.minusDays(3);
                 }
                 }
 
 
                 DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
                 DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");

+ 7 - 8
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -5985,28 +5985,27 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                             if (company.getIsInternational() == 1) {
                             if (company.getIsInternational() == 1) {
                                 operateDate = operateDate.plusSeconds(offsetSeconds);
                                 operateDate = operateDate.plusSeconds(offsetSeconds);
                             }
                             }
-							
-								
                             String time = dtf.format(operateDate);
                             String time = dtf.format(operateDate);
                             String msg= "";
                             String msg= "";
 							if (auditMsg != null) {
 							if (auditMsg != null) {
 								if(needCorpWxTranslate){
 								if(needCorpWxTranslate){
 									Optional<User> first = userList.stream().filter(ul -> ul.getId().equals(audit.getOperatorId())).findFirst();
 									Optional<User> first = userList.stream().filter(ul -> ul.getId().equals(audit.getOperatorId())).findFirst();
 									if(first.isPresent()){
 									if(first.isPresent()){
-										String corpwxUserId = first.get().getCorpwxUserid();
-										if (!StringUtils.isEmpty(corpwxUserId) && auditMsg.contains(corpwxUserId)) {
+                                        User corpwxUser = first.get();
+										String corpwxUserName = corpwxUser.getName();
+										if (!StringUtils.isEmpty(corpwxUserName) && (auditMsg.contains(corpwxUserName))) {
 											if(auditMsg.contains("提交了")){
 											if(auditMsg.contains("提交了")){
 												int i = auditMsg.indexOf("提");
 												int i = auditMsg.indexOf("提");
 												String substring = auditMsg.substring(0, i);
 												String substring = auditMsg.substring(0, i);
-												msg = time+" " + auditMsg.replace(substring,"\\$userName="+corpwxUserId+"$\\");
+												msg = time+" " + auditMsg.replace(substring,"$userName="+corpwxUserName+"$");
 											}else if(auditMsg.contains("审核通过了")){
 											}else if(auditMsg.contains("审核通过了")){
 												int i = auditMsg.indexOf("审");
 												int i = auditMsg.indexOf("审");
 												String substring = auditMsg.substring(0, i);
 												String substring = auditMsg.substring(0, i);
-												msg = time+" " + auditMsg.replace(substring,"\\$userName="+corpwxUserId+"$\\");
+												msg = time+" " + auditMsg.replace(substring,"$userName="+corpwxUserName+"$");
 											}else if(auditMsg.contains("驳回了")) {
 											}else if(auditMsg.contains("驳回了")) {
 												int i = auditMsg.indexOf("驳");
 												int i = auditMsg.indexOf("驳");
 												String substring = auditMsg.substring(0, i);
 												String substring = auditMsg.substring(0, i);
-												msg = time+" " + auditMsg.replace(substring,"\\$userName="+corpwxUserId+"$\\");
+												msg = time+" " + auditMsg.replace(substring,"$userName="+corpwxUserName+"$");
 											}
 											}
 										} else {
 										} else {
 											msg = time+" " + auditMsg;
 											msg = time+" " + auditMsg;
@@ -6037,7 +6036,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                                 }else {
                                 }else {
 									msg = time+" " + auditMsg;
 									msg = time+" " + auditMsg;
 								}
 								}
-							} 
+							}
                             if (!isFirst) {
                             if (!isFirst) {
                                 sb.append("->");
                                 sb.append("->");
                             } else {
                             } else {

+ 5 - 3
fhKeeper/formulahousekeeper/timesheet/src/i18n/en.json

@@ -176,7 +176,7 @@
   "textLink": {
   "textLink": {
     "fillInTheWork": "Fill out the daily",
     "fillInTheWork": "Fill out the daily",
     "fillInAWeek": "Fill in week",
     "fillInAWeek": "Fill in week",
-    "helpToFillIn": "Fill in the daily newspaper",
+    "helpToFillIn": "Fill in the daily report",
     "batchFillIn": "Fill in bulk",
     "batchFillIn": "Fill in bulk",
     "workHoursImport": "Work hours import",
     "workHoursImport": "Work hours import",
     "exportWork": "Export daily",
     "exportWork": "Export daily",
@@ -984,8 +984,10 @@
   "donlimit": "not limited",
   "donlimit": "not limited",
   "lastlastmonth": "Can be filled up to the previous month",
   "lastlastmonth": "Can be filled up to the previous month",
   "lastmonth": "Can be filled up to last month",
   "lastmonth": "Can be filled up to last month",
-  "newspaperwithin": "Daily newspapers can be filled within 7 days",
-  "previousdaydaily": "You can fill in the daily newspaper 1 day before",
+  "newspaperwithin": "Daily report can be filled within 7 days",
+  "previousdaydaily": "Can fill in the daily report 1 day before",
+  "previous2daydaily": "Can fill in the daily report 2 days before",
+  "previous3daydaily": "Can fill in the daily report 3 days before",
   "afternoonworkinghours": "Please enter the working hours in the afternoon",
   "afternoonworkinghours": "Please enter the working hours in the afternoon",
   "dayworkinghours": "Please select full working hours",
   "dayworkinghours": "Please select full working hours",
   "morningworkinghours": "Please enter the working hours in the morning",
   "morningworkinghours": "Please enter the working hours in the morning",

+ 2 - 0
fhKeeper/formulahousekeeper/timesheet/src/i18n/zh.json

@@ -990,6 +990,8 @@
   "lastlastmonth": "可补填到上上月",
   "lastlastmonth": "可补填到上上月",
   "newspaperwithin": "可补填7天内日报",
   "newspaperwithin": "可补填7天内日报",
   "previousdaydaily": "可补填前1天日报",
   "previousdaydaily": "可补填前1天日报",
+  "previous2daydaily": "可补填前2天日报",
+  "previous3daydaily": "可补填前3天日报",
   "dayworkinghours": "请选择全天工作时长",
   "dayworkinghours": "请选择全天工作时长",
   "morningworkinghours": "请输入上午工作时长",
   "morningworkinghours": "请输入上午工作时长",
   "afternoonworkinghours": "请输入下午工作时长",
   "afternoonworkinghours": "请输入下午工作时长",

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue

@@ -810,7 +810,7 @@
                     dayList:['01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30'],
                     dayList:['01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30'],
                     hourList:['00','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23']
                     hourList:['00','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23']
                 },
                 },
-                monthTimeList:[{id:0, name:this.$t('donlimit')},{id:1, name:this.$t('canbefilled')},{id:2, name:this.$t('lastmonth')},{id:3, name:this.$t('lastlastmonth')},{id:4, name:this.$t('newspaperwithin')},{id:5, name:this.$t('previousdaydaily')}],
+                monthTimeList:[{id:0, name:this.$t('donlimit')},{id:1, name:this.$t('canbefilled')},{id:2, name:this.$t('lastmonth')},{id:3, name:this.$t('lastlastmonth')},{id:4, name:this.$t('newspaperwithin')},{id:5, name:this.$t('previousdaydaily')},{id:6, name:this.$t('previous2daydaily')},{id:7, name:this.$t('previous3daydaily')}],
                 progress:30,
                 progress:30,
                 startTime:null,
                 startTime:null,
                 endTime:null,
                 endTime:null,