|
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.gyee.common.model.StringUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.awt.event.FocusEvent;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -82,5 +83,26 @@ public class StandardpointServiceImpl extends ServiceImpl<StandardpointMapper, S
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public String getPointCode(String type) {
|
|
|
+
|
|
|
+ String code = "CI";
|
|
|
+ QueryWrapper<Standardpoint> qw = new QueryWrapper<>();
|
|
|
+ if (StringUtils.isNotEmpty(type)){
|
|
|
+ qw.in("type",type);
|
|
|
+ }
|
|
|
+ int count = baseMapper.selectCount(qw)+1;
|
|
|
+ if (count <= 0){
|
|
|
+ count = 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ String strcount = String.valueOf(count);
|
|
|
+ for(int i=0;i<5-strcount.length();i++){
|
|
|
+
|
|
|
+ code = code+"0";
|
|
|
+ }
|
|
|
+ return code+strcount;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|