From 5f7964261f9752bee51071f3a8ae00e84976ccb7 Mon Sep 17 00:00:00 2001 From: lenovo <123> Date: Wed, 14 Dec 2022 12:15:05 +0800 Subject: [PATCH] =?UTF-8?q?2022-12-14=E6=9C=8D=E8=A3=85=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=BC=96=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../process/modules/ZyClothsTypeForm.vue | 31 ++++++++++++++----- .../controller/ZyClothsTypeController.java | 12 ++++++- .../demo/base/mapper/ZyClothsTypeMapper.java | 4 +++ .../base/service/IZyClothsTypeService.java | 2 ++ .../service/impl/ZyClothsTypeServiceImpl.java | 9 ++++++ 5 files changed, 50 insertions(+), 8 deletions(-) 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);