diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue index 03512483..b632d2ef 100644 --- a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue +++ b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue @@ -5,7 +5,12 @@ - + + + + + + @@ -18,11 +23,7 @@ {{ typeId }} - - - - - + @@ -62,6 +63,7 @@ data () { return { model:{ + nums:'' }, typeId:"", labelCol: { @@ -88,7 +90,8 @@ url: { add: "/base/zyClothsType/add", edit: "/base/zyClothsType/edit", - queryById: "/base/zyClothsType/queryById" + queryById: "/base/zyClothsType/queryById", + weiyi:"/base/zyClothsType/weiyi" } } }, @@ -102,6 +105,20 @@ this.modelDefault = JSON.parse(JSON.stringify(this.model)); }, methods: { + bianhao(){ + var n=6 + getAction(this.url.weiyi,null).then((res)=>{ + var num=parseInt(res.result,10)+1 + console.log(num) + num=num.toString() + while(num.length weiyi() { + String a=zyClothsTypeService.sort(); + if(a==null){ + return Result.OK("0"); + } + return Result.OK(a.substring(4)); + } + + } diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsTypeMapper.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsTypeMapper.java index 7ebf1bd1..f485abab 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsTypeMapper.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsTypeMapper.java @@ -3,6 +3,7 @@ package org.jeecg.modules.demo.base.mapper; import java.util.List; import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; import org.jeecg.modules.demo.base.entity.ZyClothsType; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -17,4 +18,7 @@ public interface ZyClothsTypeMapper extends BaseMapper { List selectNumsList(); List listByTypeId(String typeId); + + @Select("select nums from zy_cloths_type where nums like 'QIYE%' order by nums desc limit 0,1 ") + String sort(); } diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsTypeService.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsTypeService.java index 0f1b4359..5f17c12d 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsTypeService.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsTypeService.java @@ -13,4 +13,6 @@ public interface IZyClothsTypeService extends IService { /**nums,编号,varchar,10,非空,不重复,企业缩写(4)+顺序号(6)*/ String generateNumber(); + + String sort(); } diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java index 265a785b..ee8a39ab 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java @@ -40,6 +40,15 @@ public class ZyClothsTypeServiceImpl extends ServiceImpl listString = zyClothsTypeMapper.selectNumsList(); //System.out.println(listString);