Commit 7411d235 authored by 廖旭伟's avatar 廖旭伟

新增请假记录时默认开始时间结束时间

parent 7a24b52e
...@@ -25,6 +25,7 @@ import com.mortals.xhx.module.staff.model.StaffEntity; ...@@ -25,6 +25,7 @@ import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.service.StaffService; import com.mortals.xhx.module.staff.service.StaffService;
import com.mortals.xhx.module.workman.model.WorkmanQuery; import com.mortals.xhx.module.workman.model.WorkmanQuery;
import com.mortals.xhx.module.workman.service.WorkmanService; import com.mortals.xhx.module.workman.service.WorkmanService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
...@@ -146,4 +147,13 @@ public class AttendanceLeaveRecordController extends BaseCRUDJsonBodyMappingCont ...@@ -146,4 +147,13 @@ public class AttendanceLeaveRecordController extends BaseCRUDJsonBodyMappingCont
} }
} }
@Override
protected void addAfter(Map<String, Object> model) throws AppException {
AttendanceLeaveRecordEntity entity = new AttendanceLeaveRecordEntity();
entity.initAttrValue();
String dateStr = DateUtils.getCurrStrDate();
entity.setStartTime(DateUtils.StrToDateTime(dateStr+" 09:00:00","yyyy-MM-dd HH:mm:ss"));
entity.setEndTime(DateUtils.StrToDateTime(dateStr+" 17:00:00","yyyy-MM-dd HH:mm:ss"));
model.put("entity",entity);
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment