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. 6
      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 筛选条件 * @param request 筛选条件
* @return * @return
*/ */
@GetMapping(LIST) @PostMapping(LIST)
R<List<ContentDefinitionVO>> list(@RequestParam ("request") ContentDefinitionDTO request); 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 @Override
@GetMapping(LIST) @PostMapping(LIST)
public R<List<ContentDefinitionVO>> list(@RequestParam("request") ContentDefinitionDTO request) { public R<List<ContentDefinitionVO>> list(@RequestBody ContentDefinitionDTO request) {
return R.data(contentDefinitionService.list(request)); return R.data(contentDefinitionService.list(request));
} }

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

Loading…
Cancel
Save