forked from Gitlink/microservices
Merge pull request '根据产品库名称获取产品库详情接口' (#591) from otto/microservices:dev_PMS_ZPK into dev_PMS_ZPK
This commit is contained in:
commit
97a655751e
|
|
@ -2,6 +2,7 @@ package com.microservices.pms.productLibrary.controller;
|
|||
|
||||
import com.microservices.common.core.web.controller.BaseController;
|
||||
import com.microservices.common.core.web.domain.AjaxResult;
|
||||
import com.microservices.common.core.web.domain.GenericsAjaxResult;
|
||||
import com.microservices.common.core.web.page.GenericsTableDataInfo;
|
||||
import com.microservices.common.log.annotation.Log;
|
||||
import com.microservices.common.log.enums.BusinessType;
|
||||
|
|
@ -34,6 +35,17 @@ public class PmsProductLibraryController extends BaseController {
|
|||
@Autowired
|
||||
private IPmsProductLibraryComponentService pmsProductLibraryComponentService;
|
||||
|
||||
/**
|
||||
* 查询制品库-仓库列表
|
||||
*/
|
||||
// @RequiresPermissions("pms:pmsProductLibraryRepositories:list")
|
||||
@GetMapping("/byRepoName/{repoName}")
|
||||
@ApiOperation(value = "获取产品库详情")
|
||||
public GenericsAjaxResult<PmsProductLibraryRepositoriesDataVo> getByRepoName(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "产品库名称", required = true) @PathVariable String repoName) {
|
||||
return GenericsAjaxResult.success(pmsProductLibraryRepositoriesService.selectPmsProductLibraryByRepoName(enterpriseIdentifier, repoName));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询产品库列表
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.microservices.pms.productLibrary.controller;
|
|||
|
||||
import com.microservices.common.core.web.controller.BaseController;
|
||||
import com.microservices.common.core.web.domain.AjaxResult;
|
||||
import com.microservices.common.core.web.domain.GenericsAjaxResult;
|
||||
import com.microservices.common.core.web.page.GenericsTableDataInfo;
|
||||
import com.microservices.common.log.annotation.Log;
|
||||
import com.microservices.common.log.enums.BusinessType;
|
||||
|
|
@ -33,6 +34,17 @@ public class PmsProductLibraryRepositoriesController extends BaseController {
|
|||
/**
|
||||
* 查询制品库-仓库列表
|
||||
*/
|
||||
// @RequiresPermissions("pms:pmsProductLibraryRepositories:list")
|
||||
@GetMapping("/byRepoName/{repoName}")
|
||||
@ApiOperation(value = "获取制品库详情")
|
||||
public GenericsAjaxResult<PmsProductLibraryRepositoriesDataVo> getByRepoName(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName) {
|
||||
return GenericsAjaxResult.success(pmsProductLibraryRepositoriesService.selectPmsProductLibraryRepositoriesByRepoName(enterpriseIdentifier, repoName));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询制品库
|
||||
*/
|
||||
// @RequiresPermissions("pms:pmsProductLibraryRepositories:list")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value = "查询制品库列表")
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.alibaba.fastjson2.JSONValidator;
|
|||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.microservices.common.core.utils.bean.BeanUtils;
|
||||
import com.microservices.common.core.web.domain.BaseEntity;
|
||||
import com.microservices.pms.productLibrary.domain.vo.PmsProductLibraryRepositoriesDataVo;
|
||||
import com.microservices.pms.productLibrary.domain.vo.PmsProductLibraryRepositoriesSimpleVo;
|
||||
import com.microservices.pms.productLibrary.domain.vo.PmsProductLibrarySimpleVo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
|
@ -93,6 +94,13 @@ public class PmsProductLibraryRepositories extends BaseEntity {
|
|||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private String reservedField2;
|
||||
|
||||
public PmsProductLibraryRepositoriesDataVo toPmsProductLibraryRepositoriesDataVo() {
|
||||
PmsProductLibraryRepositoriesDataVo target = new PmsProductLibraryRepositoriesDataVo();
|
||||
BeanUtils.copyProperties(this, target);
|
||||
target.setAttributes(JSONObject.parseObject(attributes));
|
||||
return target;
|
||||
}
|
||||
|
||||
public PmsProductLibraryRepositoriesSimpleVo toPmsProductLibraryRepositoriesSimpleVo() {
|
||||
PmsProductLibraryRepositoriesSimpleVo target = new PmsProductLibraryRepositoriesSimpleVo();
|
||||
BeanUtils.copyProperties(this, target);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,50 @@
|
|||
package com.microservices.pms.productLibrary.domain.vo;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 制品库数据对象
|
||||
*
|
||||
* @author otto
|
||||
* @date 2024-07-11
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("制品库数据对象")
|
||||
public class PmsProductLibraryRepositoriesDataVo {
|
||||
|
||||
/**
|
||||
* 制品仓库ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 制品仓库名称
|
||||
*/
|
||||
@ApiModelProperty(value = "制品仓库名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 制品仓库名称类型
|
||||
*/
|
||||
@ApiModelProperty(value = "制品库类型")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "制品库格式")
|
||||
private String format;
|
||||
|
||||
/**
|
||||
* 制品仓库访问路径
|
||||
*/
|
||||
@ApiModelProperty(value = "制品仓库访问路径")
|
||||
private String url;
|
||||
|
||||
|
||||
/**
|
||||
* 其他属性
|
||||
*/
|
||||
@ApiModelProperty(value = "其他属性")
|
||||
private JSONObject attributes;
|
||||
}
|
||||
|
|
@ -143,4 +143,15 @@ public interface IPmsProductLibraryRepositoriesService {
|
|||
* @return 产品库
|
||||
*/
|
||||
int deletePmsProductLibraryByName(String enterpriseIdentifier, String name);
|
||||
|
||||
/**
|
||||
* 根据制品库名称获取制品库详情
|
||||
*
|
||||
* @param enterpriseIdentifier 组织标识
|
||||
* @param repoName 制品库名称
|
||||
* @return 制品库详情
|
||||
*/
|
||||
PmsProductLibraryRepositoriesDataVo selectPmsProductLibraryRepositoriesByRepoName(String enterpriseIdentifier, String repoName);
|
||||
|
||||
PmsProductLibraryRepositoriesDataVo selectPmsProductLibraryByRepoName(String enterpriseIdentifier, String repoName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -353,6 +353,20 @@ public class PmsProductLibraryRepositoriesServiceImpl implements IPmsProductLibr
|
|||
return pmsProductLibraryRepositoriesMapper.deletePmsProductLibraryRepositoriesById(oldRepo.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public PmsProductLibraryRepositoriesDataVo selectPmsProductLibraryRepositoriesByRepoName(String enterpriseIdentifier, String repoName) {
|
||||
PmsProductLibraryRepositories pmsProductLibraryRepositories =
|
||||
selectPmsProductLibraryRepositoriesByName(enterpriseIdentifier, repoName);
|
||||
return pmsProductLibraryRepositories.toPmsProductLibraryRepositoriesDataVo();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PmsProductLibraryRepositoriesDataVo selectPmsProductLibraryByRepoName(String enterpriseIdentifier, String repoName) {
|
||||
PmsProductLibraryRepositories pmsProductLibraryRepositories =
|
||||
selectPmsProductLibraryByName(enterpriseIdentifier, repoName);
|
||||
return pmsProductLibraryRepositories.toPmsProductLibraryRepositoriesDataVo();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deletePmsProductLibraryRepositoriesByName(String enterpriseIdentifier, String name) {
|
||||
PmsProductLibraryRepositories oldRepo = selectPmsProductLibraryRepositoriesByName(enterpriseIdentifier, name);
|
||||
|
|
|
|||
Loading…
Reference in New Issue