mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-19 01:36:39 +08:00
fix 修复 流程重新提交报错问题
This commit is contained in:
parent
d98d11ae2d
commit
9742b1b596
@ -107,10 +107,10 @@ public class TestLeaveServiceImpl implements ITestLeaveService {
|
||||
long day = DateUtil.betweenDay(bo.getStartDate(), bo.getEndDate(), true);
|
||||
// 截止日期也算一天
|
||||
bo.setLeaveDays((int) day + 1);
|
||||
bo.setApplyCode(System.currentTimeMillis() + StrUtil.EMPTY);
|
||||
TestLeave add = MapstructUtils.convert(bo, TestLeave.class);
|
||||
if (StringUtils.isBlank(add.getStatus())) {
|
||||
add.setStatus(BusinessStatusEnum.DRAFT.getStatus());
|
||||
add.setApplyCode(System.currentTimeMillis() + StrUtil.EMPTY);
|
||||
}
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
@ -125,6 +125,9 @@ public class TestLeaveServiceImpl implements ITestLeaveService {
|
||||
long day = DateUtil.betweenDay(bo.getStartDate(), bo.getEndDate(), true);
|
||||
// 截止日期也算一天
|
||||
bo.setLeaveDays((int) day + 1);
|
||||
if (ObjectUtil.isNull(bo.getId())) {
|
||||
bo.setApplyCode(System.currentTimeMillis() + StrUtil.EMPTY);
|
||||
}
|
||||
TestLeave leave = MapstructUtils.convert(bo, TestLeave.class);
|
||||
boolean flag = baseMapper.insertOrUpdate(leave);
|
||||
if (flag) {
|
||||
|
Loading…
Reference in New Issue
Block a user