Explorar el Código

修改出差用车审批后用车时间消失问题

user5 hace 5 años
padre
commit
620710f47e

+ 6 - 1
src/main/java/com/jeeplus/modules/workleave/service/WorkLeaveService.java

@@ -293,7 +293,12 @@ public class WorkLeaveService extends CrudService<WorkLeaveDao, WorkLeave> {
 	 */
 	@Transactional(readOnly = false)
 	public String auditSave(WorkLeave workLeave, List<User> auditUsers) {
-		String userName = UserUtils.get(workLeave.getCreateBy().getId()).getName();
+        WorkLeave workLeaveinfo = workLeaveDao.get(workLeave.getId());
+        if (null == workLeave.getStartDate()){
+            workLeave.setStartDate(workLeaveinfo.getStartDate());
+            workLeave.setEndDate(workLeaveinfo.getEndDate());
+        }
+        String userName = UserUtils.get(workLeave.getCreateBy().getId()).getName();
 		Office office = officeService.get(workLeave.getOfficeId());
 		String title = "申请人:"+userName;
 		String str  =  "出差申请编号:"+workLeave.getNum()+",所属部门:"+office.getName();