Merge remote-tracking branch 'refs/remotes/origin/master_lz'
# Conflicts: # wms-module-system/src/main/java/top/wms/admin/auth/handler/CardLoginHandler.java
This commit is contained in:
@@ -37,10 +37,10 @@ public class MaterialInfoDO extends BaseDO {
|
|||||||
*/
|
*/
|
||||||
private BigDecimal unitWeight;
|
private BigDecimal unitWeight;
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* 物料单次可称量最大重量(kg)
|
物料规格
|
||||||
*/
|
*/
|
||||||
private BigDecimal maxWeight;
|
private String materialSpec;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物料照片地址
|
* 物料照片地址
|
||||||
|
|||||||
@@ -46,11 +46,11 @@ public class MaterialInfoReq implements Serializable {
|
|||||||
@Schema(description = "物料单位重量(g)")
|
@Schema(description = "物料单位重量(g)")
|
||||||
private Double unitWeight;
|
private Double unitWeight;
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* 物料单次可称量最大重量(kg)
|
* 物料规格
|
||||||
*/
|
* */
|
||||||
@Schema(description = "物料单次可称量最大重量(kg)")
|
@Schema(description = "物料规格")
|
||||||
private Double maxWeight;
|
private String materialSpec;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物料照片地址
|
* 物料照片地址
|
||||||
|
|||||||
@@ -45,11 +45,11 @@ public class MaterialInfoResp extends BaseDetailResp {
|
|||||||
private Double unitWeight;
|
private Double unitWeight;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物料单次可称量最大重量(kg)
|
* 物料规格
|
||||||
*/
|
*/
|
||||||
@Schema(description = "物料单次可称量最大重量(kg)")
|
@Schema(description = "物料规格")
|
||||||
@ExcelProperty(value = "物料单次可称量最大重量(kg)")
|
@ExcelProperty(value = "物料规格")
|
||||||
private Double maxWeight;
|
private Double materialSpec;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物料照片地址
|
* 物料照片地址
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package top.wms.admin.material.service;
|
package top.wms.admin.material.service;
|
||||||
|
|
||||||
import top.continew.starter.extension.crud.service.BaseService;
|
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.query.MaterialInfoQuery;
|
||||||
import top.wms.admin.material.model.req.MaterialInfoReq;
|
import top.wms.admin.material.model.req.MaterialInfoReq;
|
||||||
import top.wms.admin.material.model.resp.MaterialInfoResp;
|
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
|
* @since 2026/02/27 14:19
|
||||||
*/
|
*/
|
||||||
public interface MaterialInfoService extends BaseService<MaterialInfoResp, MaterialInfoResp, MaterialInfoQuery, MaterialInfoReq> {
|
public interface MaterialInfoService extends BaseService<MaterialInfoResp, MaterialInfoResp, MaterialInfoQuery, MaterialInfoReq> {
|
||||||
|
public MaterialInfoDO getMaterialInfoByCode(String code);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
package top.wms.admin.material.service.impl;
|
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 lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -22,4 +26,12 @@ import top.wms.admin.material.service.MaterialInfoService;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class MaterialInfoServiceImpl extends BaseServiceImpl<MaterialInfoMapper, MaterialInfoDO, MaterialInfoResp, MaterialInfoResp, MaterialInfoQuery, MaterialInfoReq> implements MaterialInfoService {
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
|
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
|
||||||
import top.wms.admin.common.controller.BaseController;
|
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.query.MaterialInfoQuery;
|
||||||
import top.wms.admin.material.model.req.MaterialInfoReq;
|
import top.wms.admin.material.model.req.MaterialInfoReq;
|
||||||
import top.wms.admin.material.model.resp.MaterialInfoResp;
|
import top.wms.admin.material.model.resp.MaterialInfoResp;
|
||||||
@@ -23,8 +24,13 @@ import top.wms.admin.material.service.MaterialInfoService;
|
|||||||
@Tag(name = "物料信息管理 API")
|
@Tag(name = "物料信息管理 API")
|
||||||
@RestController
|
@RestController
|
||||||
@RequiredArgsConstructor
|
@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})
|
Api.EXPORT})
|
||||||
public class MaterialInfoController extends BaseController<MaterialInfoService, MaterialInfoResp, MaterialInfoResp, MaterialInfoQuery, MaterialInfoReq> {
|
public class MaterialInfoController extends BaseController<MaterialInfoService, MaterialInfoResp, MaterialInfoResp, MaterialInfoQuery, MaterialInfoReq> {
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/code/{code}")
|
||||||
|
public MaterialInfoDO getMaterialInfoByCode(@PathVariable String code) {
|
||||||
|
return baseService.getMaterialInfoByCode(code);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user