Browse Source

Merge remote-tracking branch 'origin/prod-5.1.3' into prod-5.1.3

zhongwei
ty 4 months ago
parent
commit
ad094b1d9c
  1. 4
      hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/feign/IContentDefinitionClient.java
  2. 4
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/feign/ContentDefinitionClient.java
  3. 10
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ProjectServiceImpl.java

4
hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/feign/IContentDefinitionClient.java

@ -49,8 +49,8 @@ public interface IContentDefinitionClient {
* @param request 筛选条件
* @return
*/
@GetMapping(LIST)
R<List<ContentDefinitionVO>> list(@RequestParam ("request") ContentDefinitionDTO request);
@PostMapping(LIST)
R<List<ContentDefinitionVO>> list(@RequestBody ContentDefinitionDTO request);
/**
* 批量更新

4
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/feign/ContentDefinitionClient.java

@ -47,8 +47,8 @@ public class ContentDefinitionClient implements IContentDefinitionClient {
}
@Override
@GetMapping(LIST)
public R<List<ContentDefinitionVO>> list(@RequestParam("request") ContentDefinitionDTO request) {
@PostMapping(LIST)
public R<List<ContentDefinitionVO>> list(@RequestBody ContentDefinitionDTO request) {
return R.data(contentDefinitionService.list(request));
}

10
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ProjectServiceImpl.java

@ -110,6 +110,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, ProjectEntity
@Override
public ProjectVO getProjectAndContentByEmCode(String emCode, ContentDTO content, Query query) {
LambdaQueryWrapper<ProjectEntity> queryWrapper = Wrappers.<ProjectEntity>lambdaQuery()
.eq(ProjectEntity::getEmCode, emCode)
.eq(ProjectEntity::getStatus, ObjectConstants.ProjectEnableEnum.YES.getEnableType());
@ -127,8 +128,13 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, ProjectEntity
List<Long> contentIdList = projectContentList.stream().map(ProjectContentEntity::getContentId).collect(Collectors.toList());
LambdaQueryWrapper<ContentEntity> wrapper = Condition.getQueryWrapper(BeanUtil.copy(content,ContentEntity.class)).lambda();
wrapper.in(CollectionUtil.isNotEmpty(contentIdList),ContentEntity::getId, contentIdList);
IPage page = contentService.page(Condition.getPage(query), wrapper);
projectVO.setContentList(ContentWrapper.build().listVO(page.getRecords()));
if(-1 == query.getSize()) {
List<ContentEntity> contents = contentService.list(wrapper);
projectVO.setContentList(ContentWrapper.build().listVO(contents));
} else {
IPage page = contentService.page(Condition.getPage(query), wrapper);
projectVO.setContentList(ContentWrapper.build().listVO(page.getRecords()));
}
}
return projectVO;
}

Loading…
Cancel
Save