This commit is contained in:
parent
62bfb600d4
commit
ff6de21cfb
|
|
@ -208,10 +208,13 @@ public class SelectController {
|
|||
@PostMapping("/getUseTypeTree")
|
||||
public AjaxResult getUseTypeTree(@RequestBody BackApplyInfo bean) {
|
||||
BmUnit queryUnitInfo = bmUnitMapper.selectBmUnitByUnitId(bean.getUnitId());
|
||||
if (queryUnitInfo != null && queryUnitInfo.getTypeId() == null) {
|
||||
if (queryUnitInfo == null) {
|
||||
throw new ServiceException("单位不存在");
|
||||
}
|
||||
if (queryUnitInfo.getTypeId() == null) {
|
||||
throw new ServiceException("单位类型为空");
|
||||
}
|
||||
if (queryUnitInfo != null && queryUnitInfo.getTypeId() == 1731L) {
|
||||
if (queryUnitInfo.getTypeId() == 1731L) {
|
||||
// 获取班组在用量
|
||||
return service.getBzUseTypeTree(bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -380,6 +380,15 @@ public class SelectServiceImpl implements SelectService {
|
|||
List<TypeTreeNode> listL21 = new ArrayList<>();
|
||||
try {
|
||||
// 先查第四层类型
|
||||
SelectDto dto = new SelectDto();
|
||||
dto.setUnitId(bean.getUnitId().intValue());
|
||||
dto.setProjectId(bean.getProId().toString());
|
||||
List<AgreementVo> newList = mapper.getAgreementInfoByIdBack(dto);
|
||||
if (CollectionUtils.isNotEmpty(newList)) {
|
||||
bean.setAgreementId(newList.get(0).getAgreementId().longValue());
|
||||
} else {
|
||||
return AjaxResult.success(groupList);
|
||||
}
|
||||
listL4 = mapper.getBzUseTypeTreeL4(bean);
|
||||
if (CollectionUtils.isNotEmpty(listL4)) {
|
||||
List<Long> list4ParentIds = listL4.stream().map(TypeTreeNode::getParentId).collect(Collectors.toList());
|
||||
|
|
|
|||
Loading…
Reference in New Issue