Compare commits

...

2 Commits

Author SHA1 Message Date
zc
15af775af4 Merge remote-tracking branch 'refs/remotes/origin/master_lz'
# Conflicts:
#	wms-module-system/src/main/java/top/wms/admin/auth/handler/CardLoginHandler.java
2026-03-03 15:26:12 +08:00
b37300ef8c 优化 2026-03-03 15:03:31 +08:00
6 changed files with 34 additions and 15 deletions

View File

@@ -37,10 +37,10 @@ public class MaterialInfoDO extends BaseDO {
*/
private BigDecimal unitWeight;
/**
* 物料单次可称量最大重量(kg)
*/
private BigDecimal maxWeight;
/*
物料规格
*/
private String materialSpec;
/**
* 物料照片地址

View File

@@ -46,11 +46,11 @@ public class MaterialInfoReq implements Serializable {
@Schema(description = "物料单位重量(g)")
private Double unitWeight;
/**
* 物料单次可称量最大重量(kg)
*/
@Schema(description = "物料单次可称量最大重量(kg)")
private Double maxWeight;
/*
* 物料规格
* */
@Schema(description = "物料规格")
private String materialSpec;
/**
* 物料照片地址

View File

@@ -45,11 +45,11 @@ public class MaterialInfoResp extends BaseDetailResp {
private Double unitWeight;
/**
* 物料单次可称量最大重量(kg)
* 物料规格
*/
@Schema(description = "物料单次可称量最大重量(kg)")
@ExcelProperty(value = "物料单次可称量最大重量(kg)")
private Double maxWeight;
@Schema(description = "物料规格")
@ExcelProperty(value = "物料规格")
private Double materialSpec;
/**
* 物料照片地址

View File

@@ -1,6 +1,7 @@
package top.wms.admin.material.service;
import top.continew.starter.extension.crud.service.BaseService;
import top.wms.admin.material.model.entity.MaterialInfoDO;
import top.wms.admin.material.model.query.MaterialInfoQuery;
import top.wms.admin.material.model.req.MaterialInfoReq;
import top.wms.admin.material.model.resp.MaterialInfoResp;
@@ -12,5 +13,5 @@ import top.wms.admin.material.model.resp.MaterialInfoResp;
* @since 2026/02/27 14:19
*/
public interface MaterialInfoService extends BaseService<MaterialInfoResp, MaterialInfoResp, MaterialInfoQuery, MaterialInfoReq> {
public MaterialInfoDO getMaterialInfoByCode(String code);
}

View File

@@ -1,5 +1,9 @@
package top.wms.admin.material.service.impl;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
@@ -22,4 +26,12 @@ import top.wms.admin.material.service.MaterialInfoService;
@RequiredArgsConstructor
public class MaterialInfoServiceImpl extends BaseServiceImpl<MaterialInfoMapper, MaterialInfoDO, MaterialInfoResp, MaterialInfoResp, MaterialInfoQuery, MaterialInfoReq> implements MaterialInfoService {
@Override
public MaterialInfoDO getMaterialInfoByCode(String code) {
if(StrUtil.isNotBlank(code)){
return baseMapper.lambdaQuery().eq(MaterialInfoDO::getEncoding, code).one();
}else{
return null;
}
}
}

View File

@@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.*;
import lombok.RequiredArgsConstructor;
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
import top.wms.admin.common.controller.BaseController;
import top.wms.admin.material.model.entity.MaterialInfoDO;
import top.wms.admin.material.model.query.MaterialInfoQuery;
import top.wms.admin.material.model.req.MaterialInfoReq;
import top.wms.admin.material.model.resp.MaterialInfoResp;
@@ -23,8 +24,13 @@ import top.wms.admin.material.service.MaterialInfoService;
@Tag(name = "物料信息管理 API")
@RestController
@RequiredArgsConstructor
@CrudRequestMapping(value = "/admin/meterialInfo", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE,
@CrudRequestMapping(value = "/admin/materialInfo", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE,
Api.EXPORT})
public class MaterialInfoController extends BaseController<MaterialInfoService, MaterialInfoResp, MaterialInfoResp, MaterialInfoQuery, MaterialInfoReq> {
@GetMapping("/code/{code}")
public MaterialInfoDO getMaterialInfoByCode(@PathVariable String code) {
return baseService.getMaterialInfoByCode(code);
}
}