|
@@ -30,6 +30,7 @@ import com.sckw.system.model.pojo.FindPojoParam;
|
|
|
import com.sckw.system.model.vo.req.*;
|
|
import com.sckw.system.model.vo.req.*;
|
|
|
import com.sckw.system.model.vo.res.CertificateResVo;
|
|
import com.sckw.system.model.vo.res.CertificateResVo;
|
|
|
import com.sckw.system.model.vo.res.EntFindPageResVo;
|
|
import com.sckw.system.model.vo.res.EntFindPageResVo;
|
|
|
|
|
+import com.sckw.system.model.vo.res.FindListGroupResVo;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -251,6 +252,7 @@ public class KwsEnterpriseService {
|
|
|
entFindPageResVo.setApprovalTime(item.getApprovalTime());
|
|
entFindPageResVo.setApprovalTime(item.getApprovalTime());
|
|
|
entFindPageResVo.setEntTypes(item.getType());
|
|
entFindPageResVo.setEntTypes(item.getType());
|
|
|
entFindPageResVo.setEntryType(item.getSystemType().intValue() == SystemTypeEnum.MANAGE.getCode() ? EntryTypeEnum.PLATFORM.getCode() : EntryTypeEnum.SELF.getCode());
|
|
entFindPageResVo.setEntryType(item.getSystemType().intValue() == SystemTypeEnum.MANAGE.getCode() ? EntryTypeEnum.PLATFORM.getCode() : EntryTypeEnum.SELF.getCode());
|
|
|
|
|
+ entFindPageResVo.setEntryTypeStr(EntryTypeEnum.getName(entFindPageResVo.getEntryType()).getName());
|
|
|
result.add(entFindPageResVo);
|
|
result.add(entFindPageResVo);
|
|
|
}
|
|
}
|
|
|
return PageHelperUtil.getPageResult(new PageInfo<>(result));
|
|
return PageHelperUtil.getPageResult(new PageInfo<>(result));
|
|
@@ -583,4 +585,40 @@ public class KwsEnterpriseService {
|
|
|
public List<KwsEnterprise> queryEntByName(String entName) {
|
|
public List<KwsEnterprise> queryEntByName(String entName) {
|
|
|
return kwsEnterpriseDao.queryEntByName(entName);
|
|
return kwsEnterpriseDao.queryEntByName(entName);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @param reqVo 查询入参
|
|
|
|
|
+ * @return FindListGroupResVo
|
|
|
|
|
+ * @desc: 查分组
|
|
|
|
|
+ * @author: czh
|
|
|
|
|
+ * @date: 2023/7/13
|
|
|
|
|
+ */
|
|
|
|
|
+ public List<FindListGroupResVo> findListGroup(EntFindPageReqVo reqVo) {
|
|
|
|
|
+ List<FindEntListPojo> list = findPojo(reqVo);
|
|
|
|
|
+ Map<Integer, List<FindEntListPojo>> collect = list.stream().collect(Collectors.groupingBy(FindEntListPojo::getApproval));
|
|
|
|
|
+
|
|
|
|
|
+ List<FindListGroupResVo> result = new ArrayList<>();
|
|
|
|
|
+ FindListGroupResVo findListGroupResVo = new FindListGroupResVo();
|
|
|
|
|
+ findListGroupResVo.setCount(list.size());
|
|
|
|
|
+ result.add(findListGroupResVo);
|
|
|
|
|
+ result.add(getGroup(ApprovalEnum.NO.getCode(), collect));
|
|
|
|
|
+
|
|
|
|
|
+ FindListGroupResVo process = getGroup(ApprovalEnum.PROCESS.getCode(), collect);
|
|
|
|
|
+ FindListGroupResVo refresh = getGroup(ApprovalEnum.REFRESH.getCode(), collect);
|
|
|
|
|
+ process.setCount(process.getCount() + refresh.getCount());
|
|
|
|
|
+ result.add(process);
|
|
|
|
|
+ result.add(getGroup(ApprovalEnum.OK.getCode(), collect));
|
|
|
|
|
+ result.add(getGroup(ApprovalEnum.PASS.getCode(), collect));
|
|
|
|
|
+ return result;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private static FindListGroupResVo getGroup(Integer code, Map<Integer, List<FindEntListPojo>> collect) {
|
|
|
|
|
+ FindListGroupResVo findListGroupResVo = new FindListGroupResVo();
|
|
|
|
|
+ findListGroupResVo.setApproval(code);
|
|
|
|
|
+ List<FindEntListPojo> findEntListPojos = collect.get(code);
|
|
|
|
|
+ findListGroupResVo.setCount(CollectionUtils.isEmpty(findEntListPojos) ? Global.NO : findEntListPojos.size());
|
|
|
|
|
+ findListGroupResVo.setApprovalName(ApprovalEnum.getName(code).getName());
|
|
|
|
|
+ return findListGroupResVo;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|