diff --git a/yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairbill/AsBusrepairBillService.java b/yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairbill/AsBusrepairBillService.java index 7865761541..0522691f0c 100644 --- a/yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairbill/AsBusrepairBillService.java +++ b/yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairbill/AsBusrepairBillService.java @@ -1274,45 +1274,45 @@ public class AsBusrepairBillService extends MybatisBaseService 4) { return rb.setMsg("当前已完成竣工环节,无需提交"); } - String customerSid = dto.getCustomerSid(); - CrmCustomer customerTemp = yxtCrmCustomerTempFeign.fetchEntity(customerSid).getData(); - if (null != customerTemp) { - if (dto.getBillType().equals("欠款月结")) { - if (customerTemp.getIsDesignatedEnterprise().intValue() == 1) { - Date filingIndate = customerTemp.getFilingIndate(); - if (null != filingIndate) { - LocalDate date = LocalDate.now(); // get the current date - Date dateNow = Date.from(date.atStartOfDay(ZoneId.systemDefault()).toInstant()); - int result = filingIndate.compareTo(dateNow); - if (result < 0) { - return rb.setMsg("请选择备案有效期内的欠款月结客户"); - } - } else { + } + String customerSid = dto.getCustomerSid(); + CrmCustomer customerTemp = yxtCrmCustomerTempFeign.fetchEntity(customerSid).getData(); + if (null != customerTemp) { + if (dto.getBillType().equals("欠款月结")) { + if (customerTemp.getIsDesignatedEnterprise().intValue() == 1) { + Date filingIndate = customerTemp.getFilingIndate(); + if (null != filingIndate) { + LocalDate date = LocalDate.now(); // get the current date + Date dateNow = Date.from(date.atStartOfDay(ZoneId.systemDefault()).toInstant()); + int result = filingIndate.compareTo(dateNow); + if (result < 0) { return rb.setMsg("请选择备案有效期内的欠款月结客户"); } } else { return rb.setMsg("请选择备案有效期内的欠款月结客户"); } + } else { + return rb.setMsg("请选择备案有效期内的欠款月结客户"); } - if (dto.getBillType().equals("常规维修")) { - if (customerTemp.getIsDesignatedEnterprise().intValue() != 0) { - return rb.setMsg("请选择非欠款月结客户"); - } + } + if (dto.getBillType().equals("常规维修")) { + if (customerTemp.getIsDesignatedEnterprise().intValue() != 0) { + return rb.setMsg("请选择非欠款月结客户"); } } - //如果开发票含税其中税率不能低于财务中心设置的最低税率 - InvoiceVo invoiceVo = dto.getInvoiceVo(); - if (null != invoiceVo) { - if (StringUtils.isNotBlank(invoiceVo.getTaxRate())) { - String taxRate = invoiceVo.getTaxRate(); - String createOrgSid = dto.getCreateOrgSid(); - String lastRate = baseMapper.selLastTaxRateByUseOrgSid(createOrgSid); - if (StringUtils.isNotBlank(lastRate)) { - BigDecimal a = new BigDecimal(taxRate); - BigDecimal b = new BigDecimal(lastRate); - if (a.compareTo(b) < 0) { - return rb.setMsg("其中税率不能低于财务中心设置的最低税率!"); - } + } + //如果开发票含税其中税率不能低于财务中心设置的最低税率 + InvoiceVo invoiceVo = dto.getInvoiceVo(); + if (null != invoiceVo) { + if (StringUtils.isNotBlank(invoiceVo.getTaxRate())) { + String taxRate = invoiceVo.getTaxRate(); + String createOrgSid = dto.getCreateOrgSid(); + String lastRate = baseMapper.selLastTaxRateByUseOrgSid(createOrgSid); + if (StringUtils.isNotBlank(lastRate)) { + BigDecimal a = new BigDecimal(taxRate); + BigDecimal b = new BigDecimal(lastRate); + if (a.compareTo(b) < 0) { + return rb.setMsg("其中税率不能低于财务中心设置的最低税率!"); } } }