diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/skillPoints/controller/SkillPointsController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/skillPoints/controller/SkillPointsController.java index 07b488f..d4dd5bf 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/skillPoints/controller/SkillPointsController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/skillPoints/controller/SkillPointsController.java @@ -1,26 +1,26 @@ package org.jeecg.modules.skillPoints.controller; -import java.util.Arrays; -import java.util.List; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import org.jeecg.common.api.vo.Result; -import org.jeecg.common.system.query.QueryGenerator; -import org.jeecg.modules.skillPoints.entity.SkillPoints; -import org.jeecg.modules.skillPoints.service.ISkillPointsService; - import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; - +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.modules.skillPoints.entity.SkillPoints; +import org.jeecg.modules.skillPoints.entity.SkillPointsConstant; +import org.jeecg.modules.skillPoints.service.ISkillPointsService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.jeecg.common.aspect.annotation.AutoLog; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; +import java.util.List; /** * @Description: 技能点管理 @@ -72,8 +72,8 @@ public class SkillPointsController extends JeecgController list = skillPointsService.list(new QueryWrapper().lambda().orderByDesc(SkillPoints::getSkillCode)); SkillPoints skillPoints1 = list.get(0); if (skillPoints1 == null){ -// 编码格式 J+顺序号 共10个字符 ,如果数据库获取不到,则用默认值 - code = "J000000001"; +// 编码格式 J+顺序号 共10个字符 ,如果数据库获取不到,说明还没有编号,则用默认值重新编号 + code = SkillPointsConstant.skill_code; }else { Integer s = Integer.valueOf(skillPoints1.getSkillCode().substring(1)) + 1; String format = String.format("%0" + 9 + "d", s); diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/skillPoints/entity/SkillPointsConstant.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/skillPoints/entity/SkillPointsConstant.java new file mode 100644 index 0000000..e307061 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/skillPoints/entity/SkillPointsConstant.java @@ -0,0 +1,8 @@ +package org.jeecg.modules.skillPoints.entity; + +/** + * @author admin + */ +public interface SkillPointsConstant { + public final String skill_code="J000000001"; +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/skillType/controller/SkillTypeController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/skillType/controller/SkillTypeController.java index 1427545..8ca30a8 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/skillType/controller/SkillTypeController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/skillType/controller/SkillTypeController.java @@ -1,40 +1,25 @@ package org.jeecg.modules.skillType.controller; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import org.jeecg.common.api.vo.Result; -import org.jeecg.common.system.query.QueryGenerator; -import org.jeecg.common.util.oConvertUtils; -import org.jeecg.modules.skillType.entity.SkillType; -import org.jeecg.modules.skillType.service.ISkillTypeService; - import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; - -import org.jeecgframework.poi.excel.ExcelImportUtil; -import org.jeecgframework.poi.excel.def.NormalExcelConstants; -import org.jeecgframework.poi.excel.entity.ExportParams; -import org.jeecgframework.poi.excel.entity.ImportParams; -import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.modules.skillType.entity.SkillType; +import org.jeecg.modules.skillType.service.ISkillTypeService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.multipart.MultipartHttpServletRequest; import org.springframework.web.servlet.ModelAndView; -import com.alibaba.fastjson.JSON; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.jeecg.common.aspect.annotation.AutoLog; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; +import java.util.List; /** * @Description: 技能类型管理