Kaynağa Gözat

同步省级单位状态

tags/24080901
PoffyZhang 1 yıl önce
ebeveyn
işleme
93f96c07ba
1 değiştirilmiş dosya ile 6 ekleme ve 7 silme
  1. +6
    -7
      pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/GovBusinessStripManage.java

+ 6
- 7
pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/GovBusinessStripManage.java Dosyayı Görüntüle

@@ -1,6 +1,7 @@
package com.ningdatech.pmapi.organization.manage;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.pmapi.organization.entity.GovBusinessStrip;
import com.ningdatech.pmapi.organization.model.entity.ProvincialGovBusinessStrip;
@@ -15,6 +16,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
@@ -55,17 +57,14 @@ public class GovBusinessStripManage {
}

public List<ProvincialGovBusinessStripVO> getProvincialGovBusinessStripList(String businessStripName) {
if(Objects.nonNull(canSearch) && canSearch){
List<ProvincialGovBusinessStripVO> vos = joinReviewProvincialBureauService.searchGovUnits();
return vos.stream()
.filter(b -> StringUtils.isBlank(businessStripName) || b.getBusinessStripName().contains(businessStripName))
.collect(Collectors.toList());
}

List<ProvincialGovBusinessStrip> strips = provincialGovBusinessStripService.list(Wrappers.lambdaQuery(ProvincialGovBusinessStrip.class)
.like(StringUtils.isNotBlank(businessStripName),ProvincialGovBusinessStrip::getBusinessStripName,businessStripName)
.orderByAsc(ProvincialGovBusinessStrip::getBusinessStripName));

if(CollUtil.isEmpty(strips)){
return Collections.emptyList();
}

return strips.stream()
.map(p -> BeanUtil.copyProperties(p,ProvincialGovBusinessStripVO.class))
.collect(Collectors.toList());


Yükleniyor…
İptal
Kaydet