|
@@ -5,9 +5,9 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.persagy.bdtp.adm.common.AdmResult;
|
|
|
import com.persagy.bdtp.adm.dao.AdmFileMapper;
|
|
|
+import com.persagy.bdtp.adm.entity.AdmCad;
|
|
|
import com.persagy.bdtp.adm.entity.CadFileQueryParam;
|
|
|
-import com.persagy.bdtp.adm.entity.db.AdmFile;
|
|
|
-import com.persagy.bdtp.adm.service.IAdmFileService;
|
|
|
+import com.persagy.bdtp.adm.service.IAdmCadService;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -15,10 +15,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
- * <p>
|
|
|
- * 文件附件 前端控制器
|
|
|
- * </p>
|
|
|
- *
|
|
|
+ * ADM文件服务
|
|
|
* @author yanguofeng
|
|
|
* @since 2022-01-10
|
|
|
*/
|
|
@@ -27,7 +24,7 @@ import java.util.List;
|
|
|
public class AdmFileController {
|
|
|
|
|
|
@Autowired
|
|
|
- IAdmFileService iAdmFileService;
|
|
|
+ IAdmCadService iAdmCadService;
|
|
|
@Autowired
|
|
|
AdmFileMapper admFileMapper;
|
|
|
|
|
@@ -36,22 +33,22 @@ public class AdmFileController {
|
|
|
*/
|
|
|
|
|
|
@PostMapping("/queryCadFiles")
|
|
|
- public AdmResult<List<AdmFile>> queryCadFiles(@RequestBody CadFileQueryParam queryParam){
|
|
|
- Wrapper<AdmFile> eq = new LambdaQueryWrapper<AdmFile>()
|
|
|
- .eq(StringUtils.isNotBlank(queryParam.getProjectId()), AdmFile::getProjectId, queryParam.getProjectId())
|
|
|
- .eq(StringUtils.isNotBlank(queryParam.getBuildingId()),AdmFile::getBuildingId,queryParam.getBuildingId())
|
|
|
- .eq(StringUtils.isNotBlank(queryParam.getFloorId()),AdmFile::getFloorId,queryParam.getFloorId())
|
|
|
- .eq(StringUtils.isNotBlank(queryParam.getFileId()),AdmFile::getFileId,queryParam.getFileId())
|
|
|
- .eq(StringUtils.isNotBlank(queryParam.getBizType()),AdmFile::getBizType,queryParam.getBizType());
|
|
|
- return AdmResult.success(iAdmFileService.list(eq));
|
|
|
+ public AdmResult<List<AdmCad>> queryCadFiles(@RequestBody CadFileQueryParam queryParam){
|
|
|
+ Wrapper<AdmCad> eq = new LambdaQueryWrapper<AdmCad>()
|
|
|
+ .eq(StringUtils.isNotBlank(queryParam.getProjectId()), AdmCad::getProjectId, queryParam.getProjectId())
|
|
|
+ .eq(StringUtils.isNotBlank(queryParam.getBuildingId()),AdmCad::getBuildingId,queryParam.getBuildingId())
|
|
|
+ .eq(StringUtils.isNotBlank(queryParam.getFloorId()),AdmCad::getFloorId,queryParam.getFloorId())
|
|
|
+ .eq(StringUtils.isNotBlank(queryParam.getFileKey()),AdmCad::getFileKey,queryParam.getFileKey())
|
|
|
+ .eq(StringUtils.isNotBlank(queryParam.getMajorCode()),AdmCad::getMajorCode,queryParam.getMajorCode());
|
|
|
+ return AdmResult.success(iAdmCadService.list(eq));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 保存CAD文件信息
|
|
|
*/
|
|
|
@PostMapping("/saveCadFileInfo")
|
|
|
- public AdmResult<Void> saveCadFileInfo(@RequestBody List<AdmFile> admFiles){
|
|
|
- iAdmFileService.saveOrUpdateBatch(admFiles);
|
|
|
+ public AdmResult<Void> saveCadFileInfo(@RequestBody List<AdmCad> admFiles){
|
|
|
+ iAdmCadService.saveOrUpdateBatch(admFiles);
|
|
|
return AdmResult.success(null);
|
|
|
}
|
|
|
|
|
@@ -61,7 +58,7 @@ public class AdmFileController {
|
|
|
*/
|
|
|
@PostMapping("/delete")
|
|
|
public AdmResult<Void> delete(@RequestParam("id") String id){
|
|
|
- iAdmFileService.removeById(id);
|
|
|
+ iAdmCadService.removeById(id);
|
|
|
return AdmResult.success(null);
|
|
|
}
|
|
|
}
|