|
|
@ -394,24 +394,29 @@ public class AsBusrepairBillService extends MybatisBaseService<AsBusrepairBillMa |
|
|
|
AsBusrepairBillInvoice invoice = new AsBusrepairBillInvoice(); |
|
|
|
BeanUtil.copyProperties(dto.getInvoiceVo(), invoice, "id", "sid"); |
|
|
|
invoice.setBillSid(sid); |
|
|
|
if (dto.getInvoiceVo().getIsInvoicing().equals("1")) { |
|
|
|
List<String> taxItems = dto.getInvoiceVo().getTaxItems(); |
|
|
|
if (!taxItems.isEmpty()) { |
|
|
|
StringBuffer sb = new StringBuffer(); |
|
|
|
for (String taxItem : taxItems) { |
|
|
|
if (StringUtils.isNotBlank(taxItem)) { |
|
|
|
sb.append(taxItem).append(","); |
|
|
|
if (null != dto.getInvoiceVo().getIsInvoicing()) { |
|
|
|
if (dto.getInvoiceVo().getIsInvoicing().equals("1")) { |
|
|
|
List<String> taxItems = dto.getInvoiceVo().getTaxItems(); |
|
|
|
if (!taxItems.isEmpty()) { |
|
|
|
StringBuffer sb = new StringBuffer(); |
|
|
|
for (String taxItem : taxItems) { |
|
|
|
if (StringUtils.isNotBlank(taxItem)) { |
|
|
|
sb.append(taxItem).append(","); |
|
|
|
} |
|
|
|
} |
|
|
|
if (sb.length() > 0) { |
|
|
|
sb.delete(sb.length() - 1, sb.length()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(sb)) { |
|
|
|
invoice.setTaxItems(sb.toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
if (sb.length() > 0) { |
|
|
|
sb.delete(sb.length() - 1, sb.length()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(sb)) { |
|
|
|
invoice.setTaxItems(sb.toString()); |
|
|
|
} |
|
|
|
} else { |
|
|
|
invoice.setTaxItems(null); |
|
|
|
} |
|
|
|
} else { |
|
|
|
invoice.setTaxItems(null); |
|
|
|
} |
|
|
|
|
|
|
|
asBusrepairBillInvoiceService.insert(invoice); |
|
|
|
} |
|
|
|
//保险信息
|
|
|
|