mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-14 21:52:07 +08:00
新增webcad生产单导入:复制webcad专用接口,无需权限检查
This commit is contained in:
+4
-6
@@ -95,7 +95,7 @@ public class PartsController {
|
|||||||
@GetMapping("/webcad/page")
|
@GetMapping("/webcad/page")
|
||||||
@Operation(summary = "获得配件分页")
|
@Operation(summary = "获得配件分页")
|
||||||
public CommonResult<PageResult<PartsRespVO>> webCadGetPage(@Valid PartsPageReqVO pageReqVO) {
|
public CommonResult<PageResult<PartsRespVO>> webCadGetPage(@Valid PartsPageReqVO pageReqVO) {
|
||||||
PageResult<PartsDO> pageResult = partsService.getPage(pageReqVO);
|
PageResult<PartsDO> pageResult = partsService.webCadGetPage(pageReqVO);
|
||||||
return success(BeanUtils.toBean(pageResult, PartsRespVO.class));
|
return success(BeanUtils.toBean(pageResult, PartsRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,12 +159,10 @@ public class PartsController {
|
|||||||
return success(BeanUtils.toBean(pageResult, PartsRespVO.class));
|
return success(BeanUtils.toBean(pageResult, PartsRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/all")
|
@GetMapping("/webcad/all")
|
||||||
@Operation(summary = "获取全部配件信息")
|
@Operation(summary = "获取全部配件信息")
|
||||||
@PreAuthorize("@ss.hasAnyPermissions('manage:plate:query','base:plate:query')")
|
public CommonResult<List<PartsRespVO>> getPlateAll(@RequestParam("category") String category) {
|
||||||
public CommonResult<List<PartsRespVO>> getPlateAll(@RequestParam("organId") Long organId,
|
List<PartsDO> list = partsService.getPartAll(category);
|
||||||
@RequestParam("category") String category) {
|
|
||||||
List<PartsDO> list = partsService.getPartAll(organId,category);
|
|
||||||
return success(BeanUtils.toBean(list, PartsRespVO.class));
|
return success(BeanUtils.toBean(list, PartsRespVO.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-1
@@ -61,6 +61,14 @@ public interface PartsService {
|
|||||||
*/
|
*/
|
||||||
PageResult<PartsDO> getPage(PartsPageReqVO pageReqVO);
|
PageResult<PartsDO> getPage(PartsPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* webcad获取配件表 parts_{N}分页
|
||||||
|
*
|
||||||
|
* @param pageReqVO 分页查询
|
||||||
|
* @return 配件表 parts_{N}分页
|
||||||
|
*/
|
||||||
|
PageResult<PartsDO> webCadGetPage(PartsPageReqVO pageReqVO);
|
||||||
|
|
||||||
PageResult<PartsDO> getCadPage(PartsCadPageReqVO pageReqVO);
|
PageResult<PartsDO> getCadPage(PartsCadPageReqVO pageReqVO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -85,5 +93,5 @@ public interface PartsService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
List<PartsDO> getPartAll(Long organId, String category);
|
List<PartsDO> getPartAll(String category);
|
||||||
}
|
}
|
||||||
+11
-3
@@ -157,6 +157,15 @@ public class PartsServiceImpl implements PartsService {
|
|||||||
return partsMapper.selectPage(pageReqVO);
|
return partsMapper.selectPage(pageReqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<PartsDO> webCadGetPage(PartsPageReqVO pageReqVO) {
|
||||||
|
pageReqVO.setLength(numberUtil.compareLength(pageReqVO.getLength()))
|
||||||
|
.setWidth(numberUtil.compareLength(pageReqVO.getWidth()))
|
||||||
|
.setThickness(numberUtil.compareLength(pageReqVO.getThickness()));
|
||||||
|
|
||||||
|
return partsMapper.selectPage(pageReqVO);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@OrganIgnore
|
@OrganIgnore
|
||||||
public PageResult<PartsDO> getCadPage(PartsCadPageReqVO pageReqVO) {
|
public PageResult<PartsDO> getCadPage(PartsCadPageReqVO pageReqVO) {
|
||||||
@@ -209,9 +218,8 @@ public class PartsServiceImpl implements PartsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<PartsDO> getPartAll(Long organId, String category) {
|
public List<PartsDO> getPartAll(String category) {
|
||||||
organId = getOrganId(BASE_PARTS_QUERY_PERMISSION, getLoginUser().getId(), organId);
|
return partsMapper.getAllByOrganId(OrganContextHolder.getOrganId(), category);
|
||||||
return partsMapper.getAllByOrganId(organId , category);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void validateOrganExists(Long organId) {
|
private void validateOrganExists(Long organId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user