Commit 8aab228c authored by wei's avatar wei 🎱

获取项目裙下所有案卷并展开dxContext拼接案卷名称

parent e30740ed
......@@ -13,6 +13,16 @@ import java.io.Serializable;
*/
@Data
public class ExtFilesUpdateVO implements Serializable {
/**
* 项目代号
*/
private String projectCode;
/**
* 案卷名称
*/
private String caseName;
/**
* 移交单ID
*/
......
package com.inet.dcs.document.core.controller;
import org.springframework.stereotype.Controller;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import java.util.List;
import com.inet.dcs.document.common.vo.ExtFilesVO;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Autowired;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;
import com.inet.dcs.document.common.vo.archivesOtherVO.ExtFilesUpdateVO;
import com.inet.dcs.document.core.controller.shadow.ExtFilesControllerShadow;
import com.inet.dcs.document.core.service.ExtFilesService;
import com.yonde.dex.basedata.entity.api.ApiResult;
import com.inet.dcs.document.core.controller.shadow.ExtFilesControllerShadow;
import javax.annotation.Resource;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
/**
* @description: ExtFiles-Controller
* @author: dexadmin
* @version: V
* @date: 2024-10-29 10:30:49
**/
* @description: ExtFiles-Controller
* @author: dexadmin
* @version: V
* @date: 2024-10-29 10:30:49
**/
@Api(tags = "ExtFiles管理服务")
@RequestMapping("/ExtFiles")
@ResponseBody()
......@@ -31,9 +32,9 @@ public class ExtFilesController<V extends ExtFilesVO, S extends ExtFilesService<
private ExtFilesService extFilesService;
@ApiOperation(value = "获取项目群", notes = "移交单下文件清单退档")
@GetMapping(value = "/getExtFilesByProjectCode")
public ApiResult getExtFilesByProjectCode(@RequestParam("projectCode") String projectCode) {
List<ExtFilesVO> extFilesVOList = extFilesService.getExtFilesByProjectCode(projectCode);
@PostMapping(value = "/getExtFilesByProjectCode")
public ApiResult getExtFilesByProjectCode(@RequestBody ExtFilesUpdateVO extFilesUpdateVO) {
List<ExtFilesVO> extFilesVOList = extFilesService.getExtFilesByProjectCode(extFilesUpdateVO);
return ApiResult.ok(extFilesVOList);
}
......
......@@ -33,9 +33,9 @@ public interface ExtFilesService<V extends ExtFilesVO> extends ExtFilesServiceSh
/**
* 根据项目代号查询所有案卷
*
* @param projectCode
* @param extFilesUpdateVO
* @return
*/
List<ExtFilesVO> getExtFilesByProjectCode(String projectCode);
List<ExtFilesVO> getExtFilesByProjectCode(ExtFilesUpdateVO extFilesUpdateVO);
}
......@@ -3,7 +3,6 @@ package com.inet.dcs.document.core.service.impl;
import com.inet.dcs.document.common.vo.ExtFilesDocLinkVO;
import com.inet.dcs.document.common.vo.ExtFilesVO;
import com.inet.dcs.document.common.vo.archivesOtherVO.ExtFilesUpdateVO;
import com.inet.dcs.document.core.constants.Constants;
import com.inet.dcs.document.core.repository.ExtFilesRepository;
import com.inet.dcs.document.core.service.ExtDocService;
import com.inet.dcs.document.core.service.ExtFilesDocLinkService;
......@@ -123,11 +122,13 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
}
@Override
public List<ExtFilesVO> getExtFilesByProjectCode(String projectCode) {
String volumeNumber = "-" + projectCode + "-";
public List<ExtFilesVO> getExtFilesByProjectCode(ExtFilesUpdateVO extFilesUpdateVO) {
String volumeNumber = "-" + extFilesUpdateVO.getProjectCode() + "-";
String caseName = extFilesUpdateVO.getCaseName();
SearchQueryCondition queryDoc = SearchQueryCondition.builder()
.openProp(SearchQueryCondition.builder().name("dxContext").build())
.searchItems(SearchItems.builder()
.item(new SearchItem("caseName", SearchItem.Operator.LIKE, caseName, null))
.item(new SearchItem("volumeNumber", SearchItem.Operator.LIKE, volumeNumber, null))
/*.item(new SearchItem("latest", SearchItem.Operator.EQ, true, null))
.item(new SearchItem("checkOuted", SearchItem.Operator.EQ, true, null))*/
......@@ -136,8 +137,9 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
List<ExtFilesVO> extFilesVOList = (List<ExtFilesVO>) this.findRecursion(queryDoc).getContent();
for (ExtFilesVO extFilesVO : extFilesVOList) {
DxContextVO dxContext = extFilesVO.getDxContext();
String projectClass = dxContext.getProjectClass();
dxContext.setProjectClass(extDocService.searchDictDataByDictCode(Constants.PROJECT_CATEGORY, projectClass));
String projectClass = dxContext.getDxContextExpand().getProjectClass();
extFilesVO.setCaseName(extFilesVO.getCaseName() + "-" + projectClass + "(" + extFilesVO.getVolumeNumber() + ")");
//dxContext.setProjectClass(extDocService.searchDictDataByDictCode(Constants.PROJECT_CATEGORY, projectClass));
}
return extFilesVOList;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment