出差申请

This commit is contained in:
hanrenchun 2025-06-06 16:40:42 +08:00
parent fc83ba33da
commit 6a6b4069d8
2 changed files with 27 additions and 5 deletions

View File

@ -78,13 +78,15 @@ public class BusinessTripApprovalController extends BaseController {
dto.setDepartment(user.getDept().getDeptName());
List<Long> togUserIdList = dto.getTogUserIdList();
StringBuilder ids = new StringBuilder();
for (Long aLong : togUserIdList) {
if (ids.length() > 0) {
ids.append(",");
if (togUserIdList != null && !togUserIdList.isEmpty()) {
for (Long aLong : togUserIdList) {
if (ids.length() > 0) {
ids.append(",");
}
ids.append(aLong);
}
ids.append(aLong);
dto.setTogUserIds(ids.toString());
}
dto.setTogUserIds(ids.toString());
return toAjax(businessTripApprovalService.save(dto));
}

View File

@ -60,6 +60,26 @@ public class DictionaryInterceptor implements Interceptor {
}
if (StrUtil.equals(field.getName(), "startDate")) {
field.setAccessible(true);
Long passTime = (Long) field.get(obj);
try {
ReflectUtil.setFieldValue(obj, field.getName() + "Cn", DateUtil.format(DateUtil.date(passTime * 1000), DatePattern.NORM_DATETIME_PATTERN));
} catch (Exception ignored) {
}
}
if (StrUtil.equals(field.getName(), "endDate")) {
field.setAccessible(true);
Long passTime = (Long) field.get(obj);
try {
ReflectUtil.setFieldValue(obj, field.getName() + "Cn", DateUtil.format(DateUtil.date(passTime * 1000), DatePattern.NORM_DATETIME_PATTERN));
} catch (Exception ignored) {
}
}
if (StrUtil.endWith(field.getName(), "Time") && field.getType().equals(Long.class)) {
field.setAccessible(true);
field.setAccessible(true);