|
@@ -21,6 +21,7 @@ import org.springblade.control.vo.EMFinancialReimbursementInfoVO;
|
|
|
import org.springblade.core.log.exception.ServiceException;
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
|
|
import org.springblade.core.mp.support.Condition;
|
|
|
+import org.springblade.core.secure.BladeUser;
|
|
|
import org.springblade.core.secure.utils.SecureUtil;
|
|
|
import org.springblade.core.tool.utils.BeanUtil;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
@@ -104,7 +105,7 @@ public class EMFinancialReimbursementServiceImpl extends BaseServiceImpl<ExMFina
|
|
|
EMFinancialReimbursementInfo obj = baseMapper.selectById(ids.get(0));
|
|
|
EMDraftGroupVO vo = new EMDraftGroupVO();
|
|
|
if (obj != null) {
|
|
|
- userMaps.get(obj.getCreateUser()).stream().findAny().ifPresent(user -> vo.setTitle((ObjectUtil.isNotEmpty(user) && ObjectUtil.isNotEmpty(user.getRealName())) ? user.getRealName() + "提交的日常报销" : ""));
|
|
|
+ userMaps.get(obj.getCreateUser()).stream().findAny().ifPresent(user -> vo.setTitle((ObjectUtil.isNotEmpty(user) && ObjectUtil.isNotEmpty(user.getRealName())) ? user.getRealName() + "提交的财务报销" : ""));
|
|
|
vo.setUpdateTime(obj.getUpdateTime());
|
|
|
}
|
|
|
vo.setGroupId(groupId);
|
|
@@ -112,7 +113,9 @@ public class EMFinancialReimbursementServiceImpl extends BaseServiceImpl<ExMFina
|
|
|
resultList.add(vo);
|
|
|
}
|
|
|
}
|
|
|
- return resultList;
|
|
|
+ return resultList.stream()
|
|
|
+ .sorted(Comparator.comparing(EMDraftGroupVO::getUpdateTime).reversed())
|
|
|
+ .collect(Collectors.toList());
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -204,7 +207,12 @@ public class EMFinancialReimbursementServiceImpl extends BaseServiceImpl<ExMFina
|
|
|
nonEmptyAuditUserIds.add(userId);
|
|
|
}
|
|
|
}
|
|
|
- taskProcessInfo.setAuditUserIds(StringUtils.join(nonEmptyAuditUserIds, ","));
|
|
|
+ if (nonEmptyAuditUserIds.size() == 0) {
|
|
|
+ taskProcessInfo.setAuditUserIds(null);
|
|
|
+ } else {
|
|
|
+ taskProcessInfo.setAuditUserIds(StringUtils.join(nonEmptyAuditUserIds, ","));
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
//抄送人
|
|
|
if (ObjectUtil.isNotEmpty(dto.getCcUserList())) {
|
|
@@ -252,8 +260,15 @@ public class EMFinancialReimbursementServiceImpl extends BaseServiceImpl<ExMFina
|
|
|
|
|
|
@Override
|
|
|
public boolean financialCancel(Long id) {
|
|
|
+ if (ObjectUtil.isEmpty(SecureUtil.getUser())) {
|
|
|
+ throw new ServiceException("获取当前用户信息失败,请联系管理员");
|
|
|
+ }
|
|
|
EMFinancialReimbursementInfo obj = baseMapper.selectById(id);
|
|
|
if (obj != null && obj.getStatus().equals(1)) {
|
|
|
+ if (!obj.getCreateUser().equals(SecureUtil.getUserId())) {
|
|
|
+ throw new ServiceException("当前申请信息不是当前用户创建的,无法操作");
|
|
|
+ }
|
|
|
+
|
|
|
//查询记录任务关联信息
|
|
|
List<ExpenseTaskRecord> records = jdbcTemplate.query("select * from c_expense_task_record where expense_info_id = " + id, new BeanPropertyRowMapper<>(ExpenseTaskRecord.class));
|
|
|
if (records.size() > 0) {
|