diff --git a/ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue b/ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue index 0ddb167..399f3b8 100644 --- a/ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue +++ b/ant-design-vue-jeecg/src/views/task/modules/TaskForm.vue @@ -5,24 +5,17 @@ - + - - - - - - - + + + + + + + @@ -31,26 +24,27 @@ - + - + - + - +
{{ item.type_Name }} - + {{ child.type_Name }} @@ -62,66 +56,59 @@ - + - - - - - + + + + + - + - + - - + + - + style="width: 80%"> + - + + placeholder="请选择任务状态" style="width: 100%" /> @@ -129,7 +116,7 @@ - + @@ -137,36 +124,37 @@ - + - + - + - + - + - + @@ -193,13 +181,13 @@ diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java index 6e8d9bf..fafd347 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java @@ -454,6 +454,8 @@ public class TaskController extends JeecgController { return workTime; }else { //时间跨度没有超过两天 + if (startTime.compareTo(date4) >= 0) + return workTime; //任务是下午下班之后发布的,且是下班之后提交的,没有多余工作时间 if (startTime.compareTo(date1) <= 0) startTime = date1; //发布任务在8点之前 if (startTime.compareTo(date2) <= 0){ @@ -530,6 +532,11 @@ public class TaskController extends JeecgController { long tempTime = 0; if (startTime.compareTo(date1) <= 0) startTime = date1; //任务发布在8点半之前,修正时间 + if (startTime.compareTo(date4) >= 0){ + startTime = date1; //任务发布在晚上下班后,修正到第二天早上上班时间 + offset ++; + } + if (startTime.compareTo(date2) < 0){ //上午发布任务 tempTime = date2.getTime() - startTime.getTime(); @@ -547,6 +554,8 @@ public class TaskController extends JeecgController { tempTime = date4.getTime() - startTime.getTime(); if (tempTime >= millisecond) return new Date(startTime.getTime() + millisecond + DAYTIME*offset); + else + millisecond -= tempTime; } //时间修正,天数偏移量加1,到这里有两中情况,1、白天工作时间不足抵消 2、下午6点之后发布任务 offset ++; @@ -557,6 +566,7 @@ public class TaskController extends JeecgController { return new Date(startTime.getTime() + millisecond + DAYTIME*offset); //上午偏移不足,下午一定够,因为不会跨两天 millisecond -= tempTime; + startTime = date3; return new Date(startTime.getTime() + millisecond + DAYTIME*offset); }