| | |
| | | requestApply.put("fd_customerName", contract.getPartyA()); |
| | | requestApply.put("fd_systemSource", "非煤销售系统"); |
| | | requestApply.put("fd_type", "00"); |
| | | requestApply.put("fd_baozhangren", comp.getBaozhangren()); |
| | | String bzr = comp.getBaozhangren(); |
| | | String syr = baseMapper.selectYZSH(); |
| | | if (!StrUtil.equals(contract.getCompId()+"",contract.getPartyBId()+"")&& (StrUtil.equals(SecurityUtils.getUser().getCompId() + "", smjsc) || |
| | | StrUtil.equals(SecurityUtils.getUser().getCompId() + "", smjzt)|| |
| | | StrUtil.equals(SecurityUtils.getUser().getCompId() + "", smjhw))&&StrUtil.isNotBlank(syr)) { |
| | | log.info("石煤机子公司用总公司印章"); |
| | | bzr =bzr.concat(syr); |
| | | } |
| | | requestApply.put("fd_baozhangren", bzr); |
| | | requestApply.put("fd_summary",contract.getSummary()); |
| | | JSONArray signList = new JSONArray(); |
| | | JSONObject j = new JSONObject(); |
| | |
| | | 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"))); |
| | | } |