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