| | |
| | | shop.setLegalPhone(model.getLegalPhone()); |
| | | shop.setLegalIdcode(model.getLegalIdcode()); |
| | | shop.setLegalName(model.getLegalName()); |
| | | shop.setFcode(model.getFcode()); |
| | | shop.setScode(model.getScode()); |
| | | shop.setTaxRegCode(model.getTaxRegCode()); |
| | | shopMapper.updateById(shop); |
| | | } |
| | |
| | | shop.setSecondType(model.getSecondType()); |
| | | shop.setAttribute(model.getAttribute()); |
| | | shop.setParentIamId(model.getParentOrgId()); |
| | | shop.setScode(model.getScode()); |
| | | newList.add(shop); |
| | | }else { |
| | | shop.setEditor(loginUserInfo.getId()); |
| | |
| | | shop.setSecondType(model.getSecondType()); |
| | | shop.setName(model.getName()); |
| | | shop.setCode(model.getCode()); |
| | | shop.setScode(model.getScode()); |
| | | shop.setUnitCode(model.getUnitCode()); |
| | | if(Constants.equalsInteger(model.getStatus(),Constants.TWO)){ |
| | | shop.setIsdeleted(Constants.ONE); |
| | |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | | public List<Shop> getUserShopList(Long userId) { |
| | | Users users = usersMapper.selectById(userId); |
| | | if(Objects.isNull(users)){ |
| | | return new ArrayList<>(); |
| | | } |
| | | Shop userShop = shopMapper.selectById(users.getDepartmentId()); |
| | | if(Objects.isNull(userShop)){ |
| | | return new ArrayList<>(); |
| | | } |
| | | List<Shop> shopList = shopMapper.selectList(new QueryWrapper<Shop>() |
| | | .lambda() |
| | | .eq(Shop::getScode,userShop.getScode()) |
| | | .eq(Shop::getType,Constants.TWO) |
| | | .eq(Shop::getSecondType,Constants.THREE) |
| | | ); |
| | | //查询经营范围信息 |
| | | List<CategorySeg> categorySegAllList = categorySegMapper.selectList(new QueryWrapper<CategorySeg>().lambda() |
| | | .isNotNull(CategorySeg::getOrgId) |
| | | .eq(CategorySeg::getIsdeleted,Constants.ZERO)); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(categorySegAllList)){ |
| | | for (Shop shop:shopList) { |
| | | if(StringUtils.isBlank(shop.getOrgId())){ |
| | | continue; |
| | | } |
| | | List<CategorySeg> categorySegList = categorySegAllList.stream().filter(i->i.getOrgId().equals(shop.getOrgId())).collect(Collectors.toList()); |
| | | List<UnitCodeVo> unitCodeVoList =systemDictDataBiz.getUnitList(); |
| | | List<String> seqNameList = new ArrayList<>(); |
| | | for(CategorySeg model : categorySegList){ |
| | | String seqName = systemDictDataBiz.getUnitName(model.getUnitCode(),unitCodeVoList); |
| | | if(Objects.nonNull(seqName)){ |
| | | seqNameList.add(seqName); |
| | | } |
| | | } |
| | | shop.setSeqNameList(seqNameList); |
| | | } |
| | | } |
| | | return shopList; |
| | | } |
| | | |
| | | } |