Commit 8aab228c authored by wei's avatar wei 🎱

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

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