| | |
| | | } |
| | | 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())) { |
| | | return R.failed("请在产品信息中补充税收分类信息"); |
| | | return R.failed("请检查产品编码是否存在或请在产品信息中补充税收分类信息"); |
| | | } |
| | | } else { |
| | | Product product = productMapper.selectOne(Wrappers.<Product>lambdaQuery().eq(Product::getErpCode, subjectMatter.getMaterialCode()) |
| | | .eq(Product::getCompId, SecurityUtils.getUser().getCompId()).last("limit 1")); |
| | | if (ObjUtil.isNull(product) || StrUtil.isBlank(product.getTaxClass()) || StrUtil.isBlank(product.getTaxCode())) { |
| | | return R.failed("请在产品信息中补充税收分类信息"); |
| | | return R.failed("请检查产品编码是否存在或请在产品信息中补充税收分类信息"); |
| | | } |
| | | } |
| | | } |
| | |
| | | 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())) { |
| | | return R.failed("请在产品信息中补充税收分类信息"); |
| | | return R.failed("请检查产品编码是否存在或请在产品信息中补充税收分类信息"); |
| | | } |
| | | } else { |
| | | Product product = productMapper.selectOne(Wrappers.<Product>lambdaQuery().eq(Product::getErpCode, contractOutBound.getSubjectMatterCode()) |
| | | .eq(Product::getCompId, SecurityUtils.getUser().getCompId()).last("limit 1")); |
| | | if (ObjUtil.isNull(product) || StrUtil.isBlank(product.getTaxClass()) || StrUtil.isBlank(product.getTaxCode())) { |
| | | return R.failed("请在产品信息中补充税收分类信息"); |
| | | return R.failed("请检查产品编码是否存在或请在产品信息中补充税收分类信息"); |
| | | } |
| | | } |
| | | |
| | |
| | | //机动车开票 |
| | | if (StrUtil.equals(genInvoiceInfoDTO.getInvoiceType(), "4")) { |
| | | if (StrUtil.isBlank(genInvoiceInfoDTO.getVehicleNo())) { |
| | | return R.failed("机动车开票请输入车架号"); |
| | | return R.failed("机动车销售发票请输入车架号"); |
| | | } |
| | | BigDecimal invoiceNumSum = genInvoiceInfoDTO.getOutBoundInvoiceList().stream().map(item -> item.getInvoiceNum()).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | if (invoiceNumSum.compareTo(new BigDecimal("1")) > 0) { |
| | | return R.failed("机动车开票只能1次开1辆"); |
| | | return R.failed("机动车销售发票只能1次开1辆"); |
| | | } |
| | | JSONObject request = genQueryVinParam(genInvoiceInfoDTO.getVehicleNo(), b); |
| | | R r1 = requestQueryVehicleNo(request); |
| | |
| | | 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())) { |
| | | return R.failed("请在产品信息中补充税收分类信息"); |
| | | return R.failed("请检查产品编码是否存在或请在产品信息中补充税收分类信息"); |
| | | } |
| | | } else { |
| | | Product product = productMapper.selectOne(Wrappers.<Product>lambdaQuery().eq(Product::getErpCode, contractOutBound.getSubjectMatterCode()) |
| | | .eq(Product::getCompId, SecurityUtils.getUser().getCompId()).last("limit 1")); |
| | | if (ObjUtil.isNull(product) || StrUtil.isBlank(product.getTaxClass()) || StrUtil.isBlank(product.getTaxCode())) { |
| | | return R.failed("请在产品信息中补充税收分类信息"); |
| | | return R.failed("请检查产品编码是否存在或请在产品信息中补充税收分类信息"); |
| | | } |
| | | } |
| | | |
| | |
| | | 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 { |
| | |
| | | |
| | | log.info("机动车合格证查询接口入参:{},", request.toJSONString()); |
| | | String result = HttpUtil.post(bwUrl + "method=baiwang.output.invoice.queryVinDetail&version=1.0&request_id=" + requestId, request.toJSONString()); |
| | | // String result = "{\"success\":true,\"requestId\":\"5c2bc8a3-1399-4ff0-a039-92688c6740e0\",\"model\":[{\"engineNo\":\"5210F866\",\"vehicleName\":\"轿车\",\"vehicleSourceCode\":\"\",\"passengersLimited\":\"\",\"originPlace\":\"\",\"vehicleManufactureDate\":\"\",\"vehicleIdForAccountingUuid\":\"\",\"brandModel\":\"北京牌/BJJBJJ7201TN\",\"certificateInvoiceFlag\":\"\\\"certificateInvoiceFlag\\\": \\\"Y\\\"\",\"importCertificateNo\":\"HWJC22411181133\",\"certificateNo\":\"WZHGZBH22411181133\",\"paymentVoucherNo\":\"\",\"certificateStatusCode\":\"\\\"certificateStatusCode\\\": \\\"0\\\"\",\"vehicleNo\":\"CLSBDH22406190234\",\"invoiceUnavailableReasonCode\":\"\",\"manufacturingEnterprise\":\"佛山简捷陶瓷材料科技有限公司\",\"invoiceUnavailableReasonDesc\":\"\",\"tonnage\":0,\"inspectionListNo\":\"\",\"vehicleType\":\"\"}]}"; |
| | | log.info("机动车合格证查询接口回参:{},", result); |
| | | saveBwRequestRecord("baiwang.output.invoice.queryVinDetail", requestId, request.toJSONString(), result); |
| | | JSONObject resultObj = JSONObject.parseObject(result); |
| | |
| | | |
| | | private R requestQueryVehicleNo(JSONObject request) { |
| | | String requestId = IdUtil.fastUUID(); |
| | | |
| | | log.info("查询税局车架号码入参:{},", request.toJSONString()); |
| | | String result = HttpUtil.post(bwUrl + "method=baiwang.output.einvoice.queryvinlist&version=1.0&request_id=" + requestId, request.toJSONString()); |
| | | // String result = "{\"success\":true,\"requestId\":\"5c2bc8a3-1399-4ff0-a039-92688c6740e0\",\"model\":[{\"vehicleNo\":\"\",\"isNotOpenInvReason\":\"\",\"isOpenInvoice\":true}]}"; |
| | | log.info("查询税局车架号码回参:{},", result); |
| | | saveBwRequestRecord("baiwang.output.einvoice.queryvinlist", requestId, request.toJSONString(), result); |
| | | JSONObject resultObj = JSONObject.parseObject(result); |
| | |
| | | vo.setPartyBBankAccount(b.getOrgBankAccount()); |
| | | vo.setInvoiceType(a.getInvoiceType()); |
| | | vo.setRemarks(genInvoiceInfoDTO.getRemarks()); |
| | | if (StrUtil.isNotBlank(b.getOrgContact())) { |
| | | vo.setContact(b.getOrgContact()); |
| | | } |
| | | if (StrUtil.isNotBlank(b.getOrgAddress())) { |
| | | vo.setAddress(b.getOrgAddress()); |
| | | } |
| | | vo.setOutBoundInvoiceList(genInvoiceInfoDTO.getOutBoundInvoiceList()); |
| | | if (StrUtil.isNotBlank(genInvoiceInfoDTO.getInvoiceType())) { |
| | | vo.setInvoiceVehicleType(genInvoiceInfoDTO.getInvoiceType()); |
| | |
| | | } |
| | | if (StrUtil.isNotBlank(genInvoiceInfoDTO.getVehicleData())) { |
| | | vo.setVehicleData(genInvoiceInfoDTO.getVehicleData()); |
| | | } |
| | | if (StrUtil.isNotBlank(genInvoiceInfoDTO.getSwjg())) { |
| | | vo.setSwjg(genInvoiceInfoDTO.getSwjg()); |
| | | } |
| | | List<InvoiceItemVo> invoiceItemVoList = new ArrayList<>(); |
| | | List<String> erpCode = new ArrayList<>(); |
| | |
| | | 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()); |
| | |
| | | } |
| | | BusinessCustomer customer = businessCustomerMapper.selectById(contract.getPartyAId()); |
| | | if (ObjUtil.isNull(customer) || StrUtil.isEmpty(customer.getBipCode())) { |
| | | log.error("查询合同信息异常"); |
| | | log.error("查询客户信息异常"); |
| | | return; |
| | | } |
| | | R<SysDept> r = remoteDeptService.getById(contract.getPartyBId()); |
| | |
| | | return; |
| | | } |
| | | SysDept comp = r.getData(); |
| | | R<SysDept> rDept = remoteDeptService.getById(SecurityUtils.getUser().getDeptId()); |
| | | if (!r.isOk()) { |
| | | log.error("查询单位信息异常"); |
| | | return; |
| | | } |
| | | SysDept dept = rDept.getData(); |
| | | // R<SysDept> rDept = remoteDeptService.getById(SecurityUtils.getUser().getDeptId()); |
| | | // if (!r.isOk()) { |
| | | // log.error("查询单位信息异常"); |
| | | // return; |
| | | // } |
| | | // SysDept dept = rDept.getData(); |
| | | //蓝票 |
| | | if (StrUtil.equals(contractInvoice.getInvoiceCategory(), "1")) { |
| | | |
| | | JSONObject params = genBlueReceiveParams(contractInvoice, contract, customer, comp, dept); |
| | | JSONObject params = genBlueReceiveParams(contractInvoice, contract, customer, comp); |
| | | String finalAccessToken = accessToken; |
| | | |
| | | log.info("应收发票集成入参:{}", params.toJSONString()); |
| | |
| | | } |
| | | |
| | | private JSONObject genBlueReceiveParams(ContractInvoice contractInvoice, Contract contract, BusinessCustomer customer |
| | | , SysDept comp, SysDept dept) { |
| | | , SysDept comp) { |
| | | GenInvoiceInfoVo vo = BeanUtil.copyProperties(JSONObject.parseObject(contractInvoice.getInvoicePreview()), GenInvoiceInfoVo.class); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | JSONObject data = new JSONObject(); |
| | | if (contractInvoice.getInvoiceCategory().equals("1")) { |
| | |
| | | data.put("exchangeRate", "1");//汇率 |
| | | data.put("exchangeRateDate", DateUtil.now());//汇率时间 |
| | | data.put("objectType", "1");//往来对象类型(枚举值 1:客户; 2:员工;3:资金业务对象) |
| | | data.put("deptCode", dept.getOrgCode());//部门编码 SS2 |
| | | data.put("staffCode", SecurityUtils.getUser().getNickname());//业务员编码 |
| | | data.put("deptCode", vo.getBipVo().getBm());//部门编码 SS2 |
| | | data.put("staffCode", vo.getBipVo().getYwy());//业务员编码 |
| | | data.put("customerCode", customer.getBipCode());//客户编码 |
| | | data.put("financeOrgCode", comp.getBipCode());//开票组织编码 |
| | | data.put("orgCode", comp.getBipCode());//业务组织编码 |
| | | data.put("bustypeCode", "ZBYXGLXT");//交易类型编码 暂估默认ZGYSFP,销售默认ZBYXGLXT |
| | | data.put("bustypeCode", "ZBYXGLXT");//交易类型编码 暂估默认ZGYSFP,销售默认ZBYXGLXT ar_invoice 应收发票 |
| | | data.put("contractNo", contract.getContractNo()); |
| | | data.put("oriCurrencyCode", "CNY");//币种 |
| | | |
| | | data.put("_status", "Insert"); |
| | | GenInvoiceInfoVo vo = BeanUtil.copyProperties(JSONObject.parseObject(contractInvoice.getInvoicePreview()), GenInvoiceInfoVo.class); |
| | | |
| | | JSONArray bodyItem = new JSONArray(); |
| | | for (InvoiceItemVo invoiceItemVo : vo.getBipVo().getItemList()) { |
| | | JSONObject item = new JSONObject(); |
| | |
| | | contract.setBillingStatus("3"); |
| | | } |
| | | if (contract.getPaidAmount().compareTo(contract.getAmount().subtract(contract.getDropAmount())) >= 0 && |
| | | contract.getBillingAmout().compareTo(contract.getAmount()) == 0) { |
| | | contract.getBillingAmout().compareTo(contract.getAmount()) == 0&& |
| | | StrUtil.isBlank(contract.getNextScheduleName())) { |
| | | contract.setContractStatus(3); |
| | | } |
| | | if (contract.getBillingAmout().compareTo(contract.getAmount()) < 0) { |
| | |
| | | contract.setBillingStatus("3"); |
| | | } |
| | | if (contract.getBillingAmout().compareTo(contract.getAmount()) == 0 && |
| | | contract.getPaidAmount().compareTo(contract.getAmount().subtract(contract.getDropAmount())) >= 0) { |
| | | contract.getPaidAmount().compareTo(contract.getAmount().subtract(contract.getDropAmount())) >= 0&& |
| | | StrUtil.isBlank(contract.getNextScheduleName())) { |
| | | contract.setBillingStatus("3"); |
| | | contract.setContractStatus(3); |
| | | } |
| | |
| | | } |
| | | SysDept comp = r.getData(); |
| | | |
| | | R<SysDept> rDept = remoteDeptService.getById(SecurityUtils.getUser().getDeptId()); |
| | | if (!r.isOk()) { |
| | | log.error("查询部门信息异常"); |
| | | return R.failed("查询部门信息异常"); |
| | | } |
| | | SysDept dept = rDept.getData(); |
| | | // R<SysDept> rDept = remoteDeptService.getById(SecurityUtils.getUser().getDeptId()); |
| | | // if (!r.isOk()) { |
| | | // log.error("查询部门信息异常"); |
| | | // return R.failed("查询部门信息异常"); |
| | | // } |
| | | // SysDept dept = rDept.getData(); |
| | | |
| | | //蓝票 |
| | | if (StrUtil.equals(contractInvoice.getInvoiceCategory(), "1")) { |
| | | JSONObject params = genBlueReceiveParams(contractInvoice, contract, customer, comp, dept); |
| | | JSONObject params = genBlueReceiveParams(contractInvoice, contract, customer, comp); |
| | | String finalAccessToken = accessToken; |
| | | |
| | | log.info("应收发票集成入参:{}", params.toJSONString()); |
| | |
| | | } |
| | | |
| | | @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()); |
| | |
| | | return bipPushPdf(invoice.getId()); |
| | | } |
| | | |
| | | @Override |
| | | public R updBwParamById(UpdBwParamDTO dto) { |
| | | ContractInvoice invoice = baseMapper.selectById(dto.getId()); |
| | | if (ObjUtil.isNull(invoice)){ |
| | | return R.failed("发票信息异常"); |
| | | } |
| | | invoice.setBwRequestParam(dto.getBwRequestParam()); |
| | | baseMapper.updateById(invoice); |
| | | return R.ok(); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | File file = new File("d://tmp//" + IdUtil.fastUUID() + ".pdf"); |
| | | HttpUtil.downloadFile("http://fp.baiwang.com/format/d?d=BB99645F8ED2AE7D2055E7D29330D366B7CAE92C278C6BB84D222610CEC2118D", file); |