装册管理-根据条码值查找装册详情

new
JilingLee 1 year ago
parent e93cd9d396
commit 1bd28f657f

@ -70,6 +70,14 @@ public class PackagesController {
return success(PackagesConvert.INSTANCE.convert(packages)); 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);
return success(PackagesConvert.INSTANCE.convert(packages));
}
@GetMapping("/list") @GetMapping("/list")
@Operation(summary = "获得装册列表") @Operation(summary = "获得装册列表")
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") @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 cn.iocoder.yudao.module.archives.dal.dataobject.packages.PackagesDO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.archives.controller.admin.packages.vo.*; import cn.iocoder.yudao.module.archives.controller.admin.packages.vo.*;
import org.apache.ibatis.annotations.Select;
/** /**
* Mapper * Mapper
@ -77,4 +78,8 @@ public interface PackagesMapper extends BaseMapperX<PackagesDO> {
.orderByDesc(PackagesDO::getId)); .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); PageResult<PackagesDO> getPackagesPage(PackagesPageReqVO pageReqVO);
/**
*
*
* @param codeValue
* @return
*/
PackagesDO getByCodeValue(String codeValue);
/** /**
* , Excel * , Excel
* *

@ -106,6 +106,11 @@ public class PackagesServiceImpl implements PackagesService {
return packagesMapper.selectBatchIds(ids); return packagesMapper.selectBatchIds(ids);
} }
@Override
public PackagesDO getByCodeValue(String codeValue) {
return packagesMapper.getByCodeValue(codeValue);
}
@Override @Override
public PageResult<PackagesDO> getPackagesPage(PackagesPageReqVO pageReqVO) { public PageResult<PackagesDO> getPackagesPage(PackagesPageReqVO pageReqVO) {
return packagesMapper.selectPage(pageReqVO); return packagesMapper.selectPage(pageReqVO);

Loading…
Cancel
Save