| | |
| | | } |
| | | List<String> smjList = new ArrayList<>(); |
| | | smjList.add(smj); |
| | | smjList.add(smjsc); |
| | | smjList.add(smjzt); |
| | | smjList.add(smjhw); |
| | | if (("" + SecurityUtils.getUser().getCompId()).equals(smj) || ("" + SecurityUtils.getUser().getCompId()).equals(smjsc) || |
| | | ("" + SecurityUtils.getUser().getCompId()).equals(smjzt) || |
| | | ("" + SecurityUtils.getUser().getCompId()).equals(smjhw)) { |
| | | if (("" + SecurityUtils.getUser().getCompId()).equals(smj)||("" + SecurityUtils.getUser().getCompId()).equals(smjhw)) { |
| | | Product product = productMapper.selectOne(Wrappers.<Product>lambdaQuery().eq(Product::getErpCode, subjectMatter.getMaterialCode()) |
| | | .in(Product::getCompId, smjList).last("limit 1")); |
| | | if (ObjUtil.isNull(product) || StrUtil.isBlank(product.getTaxClass()) || StrUtil.isBlank(product.getTaxCode())) { |
| | |
| | | ContractOutBound contractOutBound = contractOutBoundMapper.selectById(contractOutBoundInvoiceVo.getContractOutBoundId()); |
| | | List<String> smjList = new ArrayList<>(); |
| | | smjList.add(smj); |
| | | smjList.add(smjsc); |
| | | smjList.add(smjzt); |
| | | smjList.add(smjhw); |
| | | if (("" + SecurityUtils.getUser().getCompId()).equals(smj) || ("" + SecurityUtils.getUser().getCompId()).equals(smjsc) || |
| | | ("" + SecurityUtils.getUser().getCompId()).equals(smjzt)|| |
| | | ("" + SecurityUtils.getUser().getCompId()).equals(smjhw)) { |
| | | if (("" + SecurityUtils.getUser().getCompId()).equals(smj) || ("" + SecurityUtils.getUser().getCompId()).equals(smjhw)) { |
| | | Product product = productMapper.selectOne(Wrappers.<Product>lambdaQuery().eq(Product::getErpCode, contractOutBound.getSubjectMatterCode()) |
| | | .in(Product::getCompId, smjList).last("limit 1")); |
| | | if (ObjUtil.isNull(product) || StrUtil.isBlank(product.getTaxClass()) || StrUtil.isBlank(product.getTaxCode())) { |
| | |
| | | ContractOutBound contractOutBound = contractOutBoundMapper.selectById(contractOutBoundInvoiceVo.getContractOutBoundId()); |
| | | List<String> smjList = new ArrayList<>(); |
| | | smjList.add(smj); |
| | | smjList.add(smjsc); |
| | | smjList.add(smjzt); |
| | | smjList.add(smjhw); |
| | | if (("" + SecurityUtils.getUser().getCompId()).equals(smj) || ("" + SecurityUtils.getUser().getCompId()).equals(smjsc) || |
| | | ("" + SecurityUtils.getUser().getCompId()).equals(smjzt) || |
| | | ("" + SecurityUtils.getUser().getCompId()).equals(smjhw)) { |
| | | if (("" + SecurityUtils.getUser().getCompId()).equals(smj) ||("" + SecurityUtils.getUser().getCompId()).equals(smjhw)) { |
| | | Product product = productMapper.selectOne(Wrappers.<Product>lambdaQuery().eq(Product::getErpCode, contractOutBound.getSubjectMatterCode()) |
| | | .in(Product::getCompId, smjList).last("limit 1")); |
| | | if (ObjUtil.isNull(product) || StrUtil.isBlank(product.getTaxClass()) || StrUtil.isBlank(product.getTaxCode())) { |
| | |
| | | Product product = new Product(); |
| | | List<String> smjList = new ArrayList<>(); |
| | | smjList.add(smj); |
| | | smjList.add(smjsc); |
| | | smjList.add(smjzt); |
| | | smjList.add(smjhw); |
| | | if (("" + SecurityUtils.getUser().getCompId()).equals(smj) || ("" + SecurityUtils.getUser().getCompId()).equals(smjsc) || |
| | | ("" + SecurityUtils.getUser().getCompId()).equals(smjzt) || |
| | | ("" + SecurityUtils.getUser().getCompId()).equals(smjhw)) { |
| | | if (("" + SecurityUtils.getUser().getCompId()).equals(smj) || ("" + SecurityUtils.getUser().getCompId()).equals(smjhw)) { |
| | | product = productMapper.selectOne(Wrappers.<Product>lambdaQuery().eq(Product::getErpCode, contractOutBound.getSubjectMatterCode()) |
| | | .in(Product::getCompId, smjList).last("limit 1")); |
| | | } else { |
| | |
| | | Product product = new Product(); |
| | | List<String> smjList = new ArrayList<>(); |
| | | smjList.add(smj); |
| | | smjList.add(smjsc); |
| | | smjList.add(smjzt); |
| | | smjList.add(smjhw); |
| | | if (("" + SecurityUtils.getUser().getCompId()).equals(smj) || ("" + SecurityUtils.getUser().getCompId()).equals(smjsc) || |
| | | ("" + SecurityUtils.getUser().getCompId()).equals(smjzt)|| |
| | | ("" + SecurityUtils.getUser().getCompId()).equals(smjhw)) { |
| | | if (("" + SecurityUtils.getUser().getCompId()).equals(smj) || ("" + SecurityUtils.getUser().getCompId()).equals(smjhw)) { |
| | | product = productMapper.selectOne(Wrappers.<Product>lambdaQuery().eq(Product::getErpCode, contractOutBound.getSubjectMatterCode()) |
| | | .in(Product::getCompId, smjList).last("limit 1")); |
| | | } else { |
| | |
| | | Product product = new Product(); |
| | | List<String> smjList = new ArrayList<>(); |
| | | smjList.add(smj); |
| | | smjList.add(smjsc); |
| | | smjList.add(smjzt); |
| | | smjList.add(smjhw); |
| | | if (("" + SecurityUtils.getUser().getCompId()).equals(smj) || ("" + SecurityUtils.getUser().getCompId()).equals(smjsc) || |
| | | ("" + SecurityUtils.getUser().getCompId()).equals(smjzt)|| |
| | | ("" + SecurityUtils.getUser().getCompId()).equals(smjhw)) { |
| | | if (("" + SecurityUtils.getUser().getCompId()).equals(smj) ||("" + SecurityUtils.getUser().getCompId()).equals(smjhw)) { |
| | | product = productMapper.selectOne(Wrappers.<Product>lambdaQuery().eq(Product::getErpCode, contractOutBound.getSubjectMatterCode()) |
| | | .in(Product::getCompId, smjList).last("limit 1")); |
| | | } else { |
| | |
| | | mergeVo.setMaterialInternalName(schedule.getSubjectMatterName()); |
| | | mergeVo.setPriceAndTax(schedule.getPlannedAmount()); |
| | | mergeVo.setQuantity(schedule.getInvoiceNum()); |
| | | Product product = productMapper.selectOne(Wrappers.<Product>lambdaQuery().eq(Product::getErpCode, schedule.getSubjectMatterCode()) |
| | | .eq(Product::getCompId, SecurityUtils.getUser().getCompId()).last("limit 1")); |
| | | List<String> smjList = new ArrayList<>(); |
| | | smjList.add(smj); |
| | | smjList.add(smjhw); |
| | | Product product = null; |
| | | if (("" + SecurityUtils.getUser().getCompId()).equals(smj) ||("" + SecurityUtils.getUser().getCompId()).equals(smjhw)) { |
| | | product = productMapper.selectOne(Wrappers.<Product>lambdaQuery().eq(Product::getErpCode, schedule.getSubjectMatterCode()) |
| | | .in(Product::getCompId, smjList).last("limit 1")); |
| | | } else { |
| | | product = productMapper.selectOne(Wrappers.<Product>lambdaQuery().eq(Product::getErpCode, schedule.getSubjectMatterCode()) |
| | | .eq(Product::getCompId, SecurityUtils.getUser().getCompId()).last("limit 1")); |
| | | } |
| | | if (ObjUtil.isNotNull(product)) { |
| | | mergeVo.setTaxClass(product.getTaxClass()); |
| | | mergeVo.setSpecification(product.getProductType()); |
| | | mergeVo.setTaxRate(new BigDecimal(product.getTaxRate())); |
| | | mergeVo.setTaxCode(product.getTaxCode()); |
| | | } |
| | | |
| | | ContractSubjectMatter subjectMatter = subjectMatterMapper.selectOne(Wrappers.<ContractSubjectMatter>lambdaQuery() |
| | | .eq(ContractSubjectMatter::getMaterialCode, schedule.getSubjectMatterCode()) |
| | | .eq(ContractSubjectMatter::getContractId, contract.getId()).last("limit 1")); |
| | |
| | | mergeVo.setMaterialCode(subjectMatter.getMaterialCode()); |
| | | mergeVo.setMaterialInternalName(subjectMatter.getMaterialName()); |
| | | mergeVo.setQuantity(contractOutBoundInvoiceVo.getInvoiceNum()); |
| | | Product product = productMapper.selectOne(Wrappers.<Product>lambdaQuery().eq(Product::getErpCode, subjectMatter.getMaterialCode()) |
| | | .eq(Product::getCompId, SecurityUtils.getUser().getCompId()).last("limit 1")); |
| | | List<String> smjList = new ArrayList<>(); |
| | | smjList.add(smj); |
| | | smjList.add(smjhw); |
| | | Product product = null; |
| | | if (("" + SecurityUtils.getUser().getCompId()).equals(smj) ||("" + SecurityUtils.getUser().getCompId()).equals(smjhw)) { |
| | | product = productMapper.selectOne(Wrappers.<Product>lambdaQuery().eq(Product::getErpCode, subjectMatter.getMaterialCode()) |
| | | .in(Product::getCompId, smjList).last("limit 1")); |
| | | } else { |
| | | product = productMapper.selectOne(Wrappers.<Product>lambdaQuery().eq(Product::getErpCode, subjectMatter.getMaterialCode()) |
| | | .eq(Product::getCompId, SecurityUtils.getUser().getCompId()).last("limit 1")); |
| | | } |
| | | if (ObjUtil.isNotNull(product)) { |
| | | mergeVo.setTaxClass(product.getTaxClass()); |
| | | mergeVo.setSpecification(product.getProductType()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R selectZbByKey(String dictKey) { |
| | | List<BipDict> bipDictList = bipDictMapper.selectList(Wrappers.<BipDict>lambdaQuery().eq(BipDict::getDictKey, dictKey) |
| | | .eq(BipDict::getCompId,SecurityUtils.getUser().getCompId())); |
| | | if (CollUtil.isNotEmpty(bipDictList)) { |
| | | // 权限内部门 |
| | | List<TreeNode<Long>> collect = bipDictList.stream() |
| | | .map(dict -> { |
| | | TreeNode<Long> treeNode = new TreeNode<>(); |
| | | treeNode.setId(dict.getId()); |
| | | treeNode.setParentId(dict.getParentId()); |
| | | treeNode.setName(dict.getDictName()); |
| | | treeNode.setWeight(dict.getDictCode()); |
| | | return treeNode; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | |
| | | return R.ok(TreeUtil.build(collect, 0L)); |
| | | } |
| | | return R.failed("字典获取失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R saveAndPush(ContractInvoiceUpateDTO upateDTO) { |
| | | ContractInvoice invoice = baseMapper.selectById(upateDTO.getId()); |
| | | invoice.setInvoicePreview(upateDTO.getInvoicePreview()); |