@ -70,6 +70,14 @@ public class PackagesController {
return success(PackagesConvert.INSTANCE.convert(packages));
}
@GetMapping("/getByCodeValue")
@Operation(summary = "获得装册")
@Parameter(name = "id", description = "条码值", required = true, example = "1-2-3")
public CommonResult<PackagesRespVO> getByCodeValue(@RequestParam("codeValue") String codeValue) {
PackagesDO packages = packagesService.getByCodeValue(codeValue);
@GetMapping("/list")
@Operation(summary = "获得装册列表")
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048")
@ -8,6 +8,7 @@ import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.archives.dal.dataobject.packages.PackagesDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.archives.controller.admin.packages.vo.*;
import org.apache.ibatis.annotations.Select;
/**
* 装册 Mapper
@ -77,4 +78,8 @@ public interface PackagesMapper extends BaseMapperX<PackagesDO> {
.orderByDesc(PackagesDO::getId));
@Select("SELECT id, depot_id, depot_name, cabinet_id, cabinet_name, record_id, company_id, company, year, period, manege_name, case_num, catalog_num, files_num, flow_id, status, remark, package_time, dept_id, user_id, dept_name, attr1, attr2, attr3, attr4, create_by, code_url, code_value, package_num "
+" FROM archives_package WHERE code_value = #{codeValue} ORDER BY create_time DESC LIMIT 1")
PackagesDO getByCodeValue(String codeValue);
@ -59,6 +59,14 @@ public interface PackagesService {
*/
PageResult<PackagesDO> getPackagesPage(PackagesPageReqVO pageReqVO);
* 根据条码值获得装册详情
*
* @param codeValue 条码值
* @return 装册分页
* 获得装册列表, 用于 Excel 导出
@ -106,6 +106,11 @@ public class PackagesServiceImpl implements PackagesService {
return packagesMapper.selectBatchIds(ids);
@Override
public PackagesDO getByCodeValue(String codeValue) {
return packagesMapper.getByCodeValue(codeValue);
public PageResult<PackagesDO> getPackagesPage(PackagesPageReqVO pageReqVO) {
return packagesMapper.selectPage(pageReqVO);