| | |
| | | baseMapper.updateById(contract); |
| | | |
| | | } |
| | | if ((StrUtil.equals(contract.getPartyBId() + "", smj) || |
| | | if ((StrUtil.equals(contract.getPartyBId() + "", smj) ||StrUtil.equals(contract.getPartyBId() + "", smjsc) || |
| | | StrUtil.equals(contract.getPartyBId() + "", smjzt) || |
| | | StrUtil.equals(contract.getPartyBId() + "", smjhw)) && StrUtil.isNotEmpty(smjErp)) { |
| | | request.put("customerCode", customer.getErpCompanyCode()); |
| | | request.put("currencyId", "RMB"); |
| | |
| | | subjectMatterItem.put("salePrice", contractSubjectMatter.getUnitPrice()); |
| | | subjectMatterItem.put("qtyRequired", contractSubjectMatter.getQuantity()); |
| | | subjectMatterItem.put("money", contractSubjectMatter.getQuantity().multiply(contractSubjectMatter.getUnitPrice())); |
| | | Product product = productMapper.selectOne(Wrappers.<Product>lambdaQuery().eq(Product::getCompId, contract.getCompId()) |
| | | .eq(Product::getErpCode, contractSubjectMatter.getMaterialCode())); |
| | | Product product = null; |
| | | List<String> smjList = new ArrayList<>(); |
| | | smjList.add(smj); |
| | | smjList.add(smjhw); |
| | | if (("" + SecurityUtils.getUser().getCompId()).equals(smj)||("" + SecurityUtils.getUser().getCompId()).equals(smjhw)) { |
| | | product = productMapper.selectOne(Wrappers.<Product>lambdaQuery().eq(Product::getErpCode, contractSubjectMatter.getMaterialCode()) |
| | | .in(Product::getCompId, smjList).last("limit 1")); |
| | | } else { |
| | | product = productMapper.selectOne(Wrappers.<Product>lambdaQuery().eq(Product::getErpCode, contractSubjectMatter.getMaterialCode()) |
| | | .eq(Product::getCompId, SecurityUtils.getUser().getCompId()).last("limit 1")); |
| | | } |
| | | if (ObjUtil.isNotNull(product)) { |
| | | subjectMatterItem.put("taxRate", new BigDecimal(product.getTaxRate()).divide(new BigDecimal("100"))); |
| | | } |