mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
新增webcad生产单导入:复制webcad专用接口,无需权限检查
This commit is contained in:
+4
-6
@@ -95,7 +95,7 @@ public class PartsController {
|
||||
@GetMapping("/webcad/page")
|
||||
@Operation(summary = "获得配件分页")
|
||||
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));
|
||||
}
|
||||
|
||||
@@ -159,12 +159,10 @@ public class PartsController {
|
||||
return success(BeanUtils.toBean(pageResult, PartsRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
@GetMapping("/webcad/all")
|
||||
@Operation(summary = "获取全部配件信息")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('manage:plate:query','base:plate:query')")
|
||||
public CommonResult<List<PartsRespVO>> getPlateAll(@RequestParam("organId") Long organId,
|
||||
@RequestParam("category") String category) {
|
||||
List<PartsDO> list = partsService.getPartAll(organId,category);
|
||||
public CommonResult<List<PartsRespVO>> getPlateAll(@RequestParam("category") String category) {
|
||||
List<PartsDO> list = partsService.getPartAll(category);
|
||||
return success(BeanUtils.toBean(list, PartsRespVO.class));
|
||||
}
|
||||
}
|
||||
|
||||
+10
-2
@@ -61,6 +61,14 @@ public interface PartsService {
|
||||
*/
|
||||
PageResult<PartsDO> getPage(PartsPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* webcad获取配件表 parts_{N}分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 配件表 parts_{N}分页
|
||||
*/
|
||||
PageResult<PartsDO> webCadGetPage(PartsPageReqVO pageReqVO);
|
||||
|
||||
PageResult<PartsDO> getCadPage(PartsCadPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
@@ -74,7 +82,7 @@ public interface PartsService {
|
||||
* @param importParts 导入配件列表
|
||||
* @param isUpdateSupport 是否支持更新
|
||||
*/
|
||||
void importPartsList(List<PartsImportExcelVO> importParts, boolean isUpdateSupport , Long organId);
|
||||
void importPartsList(List<PartsImportExcelVO> importParts, boolean isUpdateSupport, Long organId);
|
||||
|
||||
|
||||
default String getSavePath() {
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@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
|
||||
@OrganIgnore
|
||||
public PageResult<PartsDO> getCadPage(PartsCadPageReqVO pageReqVO) {
|
||||
@@ -209,9 +218,8 @@ public class PartsServiceImpl implements PartsService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PartsDO> getPartAll(Long organId, String category) {
|
||||
organId = getOrganId(BASE_PARTS_QUERY_PERMISSION, getLoginUser().getId(), organId);
|
||||
return partsMapper.getAllByOrganId(organId , category);
|
||||
public List<PartsDO> getPartAll(String category) {
|
||||
return partsMapper.getAllByOrganId(OrganContextHolder.getOrganId(), category);
|
||||
}
|
||||
|
||||
private void validateOrganExists(Long organId) {
|
||||
|
||||
Reference in New Issue
Block a user