自动生成物料id
This commit is contained in:
@@ -5,15 +5,15 @@ import com.ruoyi.bas.BasProduct.domain.BasProduct;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 物料信息Service接口
|
* 物料信息Service接口
|
||||||
*
|
*
|
||||||
* @author gw
|
* @author gw
|
||||||
* @date 2025-09-11
|
* @date 2025-09-11
|
||||||
*/
|
*/
|
||||||
public interface IBasProductService
|
public interface IBasProductService
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询物料信息
|
* 查询物料信息
|
||||||
*
|
*
|
||||||
* @param productGuid 物料信息主键
|
* @param productGuid 物料信息主键
|
||||||
* @return 物料信息
|
* @return 物料信息
|
||||||
*/
|
*/
|
||||||
@@ -21,7 +21,7 @@ public interface IBasProductService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询物料信息列表
|
* 查询物料信息列表
|
||||||
*
|
*
|
||||||
* @param basProduct 物料信息
|
* @param basProduct 物料信息
|
||||||
* @return 物料信息集合
|
* @return 物料信息集合
|
||||||
*/
|
*/
|
||||||
@@ -29,7 +29,7 @@ public interface IBasProductService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增物料信息
|
* 新增物料信息
|
||||||
*
|
*
|
||||||
* @param basProduct 物料信息
|
* @param basProduct 物料信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -37,7 +37,7 @@ public interface IBasProductService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改物料信息
|
* 修改物料信息
|
||||||
*
|
*
|
||||||
* @param basProduct 物料信息
|
* @param basProduct 物料信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -45,7 +45,7 @@ public interface IBasProductService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除物料信息
|
* 批量删除物料信息
|
||||||
*
|
*
|
||||||
* @param productGuids 需要删除的物料信息主键集合
|
* @param productGuids 需要删除的物料信息主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -53,7 +53,7 @@ public interface IBasProductService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除物料信息信息
|
* 删除物料信息信息
|
||||||
*
|
*
|
||||||
* @param productGuid 物料信息主键
|
* @param productGuid 物料信息主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.ruoyi.bas.BasProduct.service.impl;
|
package com.ruoyi.bas.BasProduct.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.ruoyi.bas.BasProduct.mapper.BasProductMapper;
|
import com.ruoyi.bas.BasProduct.mapper.BasProductMapper;
|
||||||
@@ -52,6 +54,7 @@ public class BasProductServiceImpl implements IBasProductService
|
|||||||
@Override
|
@Override
|
||||||
public int insertBasProduct(BasProduct basProduct)
|
public int insertBasProduct(BasProduct basProduct)
|
||||||
{
|
{
|
||||||
|
basProduct.setProductGuid(IdUtil.fastSimpleUUID());
|
||||||
return basProductMapper.insertBasProduct(basProduct);
|
return basProductMapper.insertBasProduct(basProduct);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -135,7 +135,7 @@
|
|||||||
|
|
||||||
<el-table v-loading="loading" :data="BasProductList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="BasProductList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="主键" align="center" prop="productGuid" />
|
<!-- <el-table-column label="主键" align="center" prop="productGuid" />-->
|
||||||
<el-table-column label="物料编码" align="center" prop="productId" />
|
<el-table-column label="物料编码" align="center" prop="productId" />
|
||||||
<el-table-column label="物料名称" align="center" prop="productName" />
|
<el-table-column label="物料名称" align="center" prop="productName" />
|
||||||
<el-table-column label="序列号" align="center" prop="spare4" />
|
<el-table-column label="序列号" align="center" prop="spare4" />
|
||||||
@@ -166,7 +166,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total>0"
|
||||||
:total="total"
|
:total="total"
|
||||||
|
|||||||
Reference in New Issue
Block a user