mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 16:23:42 +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);
 | 
			
		||||
        // 截止日期也算一天
 | 
			
		||||
        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) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user