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