Procházet zdrojové kódy

计量系统编号递增

DengLinLang před 1 týdnem
rodič
revize
effd799b94

+ 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();
                     }