소스 검색

计量系统编号递增

DengLinLang 1 주 전
부모
커밋
effd799b94
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      blade-service/blade-meter/src/main/java/org/springblade/meter/service/impl/MiddleMeterApplyServiceImpl.java

+ 5 - 3
blade-service/blade-meter/src/main/java/org/springblade/meter/service/impl/MiddleMeterApplyServiceImpl.java

@@ -20,13 +20,13 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import io.swagger.models.auth.In;
 import lombok.AllArgsConstructor;
 import org.apache.commons.lang.StringUtils;
 import org.springblade.business.entity.InformationQuery;
 import org.springblade.business.entity.Task;
 import org.springblade.common.utils.SnowFlakeUtil;
 import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.mp.base.BaseServiceImpl;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.core.tool.utils.ObjectUtil;
@@ -37,7 +37,6 @@ import org.springblade.meter.dto.WbsNodeDTO;
 import org.springblade.meter.entity.*;
 import org.springblade.meter.mapper.MiddleMeterApplyMapper;
 import org.springblade.meter.service.*;
-import org.springblade.core.mp.base.BaseServiceImpl;
 import org.springblade.meter.utils.ForestNodeMerger;
 import org.springblade.meter.vo.*;
 import org.springframework.beans.BeanUtils;
@@ -711,7 +710,10 @@ public class MiddleMeterApplyServiceImpl extends BaseServiceImpl<MiddleMeterAppl
                     if (num == list.get(i+1)){
                         throw new ServiceException("计量期期号出现相同,请联系管理员");
                     }
-                    if (++num != list.get(i+1)){
+                    Integer j = ++num;
+                    String j2 = j.toString();
+                    String j3 = list.get(i + 1).toString();
+                    if (!j2.equals(j3)){
                         str.append(num);
                         return str.toString();
                     }