|
|
@ -26,6 +26,7 @@ import java.util.ArrayList;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.UUID;
|
|
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* <p>
|
|
|
|
* <p>
|
|
|
@ -151,9 +152,23 @@ public class InvoiceServiceImpl extends ServiceImpl<InvoiceMapper, Invoice> impl
|
|
|
|
return invoiceHeader;
|
|
|
|
return invoiceHeader;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public JSONObject pcDisableInvoiceList(Integer pageNum,Integer pageSize){
|
|
|
|
public JSONObject pcDisableInvoiceList(Integer pageNum, Integer pageSize, String copycatId) {
|
|
|
|
Integer count = invoiceMapper.selectCount(new EntityWrapper<Invoice>().eq("status_code", "disable"));
|
|
|
|
|
|
|
|
List<Invoice> invoiceList = invoiceMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize),new EntityWrapper<Invoice>().eq("status_code", "disable").orderBy("create_date",false));
|
|
|
|
Integer count = null;
|
|
|
|
|
|
|
|
List<Invoice> invoiceList;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (null == copycatId) {
|
|
|
|
|
|
|
|
count = invoiceMapper.selectCount(new EntityWrapper<Invoice>().eq("status_code", "disable"));
|
|
|
|
|
|
|
|
invoiceList = invoiceMapper.selectPage(new RowBounds((pageNum - 1) * pageSize, pageSize), new EntityWrapper<Invoice>().eq("status_code", "disable").orderBy("create_date", false));
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
List<Custom> customList = customMapper.selectList(new EntityWrapper<Custom>().eq("copycat_id", copycatId));
|
|
|
|
|
|
|
|
count = invoiceMapper.selectCount(new EntityWrapper<Invoice>().eq("status_code", "disable").in("custom_id", customList.stream().map(item ->
|
|
|
|
|
|
|
|
item.getId()
|
|
|
|
|
|
|
|
).collect(Collectors.toList())));
|
|
|
|
|
|
|
|
invoiceList = invoiceMapper.selectPage(new RowBounds((pageNum - 1) * pageSize, pageSize), new EntityWrapper<Invoice>().eq("status_code", "disable").in("custom_id", customList.stream().map(item ->
|
|
|
|
|
|
|
|
item.getId()
|
|
|
|
|
|
|
|
).collect(Collectors.toList())).orderBy("create_date", false));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for (Invoice invoice : invoiceList) {
|
|
|
|
for (Invoice invoice : invoiceList) {
|
|
|
|
String invoiceHeaderId = invoice.getInvoiceHeaderId();
|
|
|
|
String invoiceHeaderId = invoice.getInvoiceHeaderId();
|
|
|
@ -169,9 +184,22 @@ public class InvoiceServiceImpl extends ServiceImpl<InvoiceMapper, Invoice> impl
|
|
|
|
return jsonObject;
|
|
|
|
return jsonObject;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public JSONObject pcEnableInvoiceList(Integer pageNum,Integer pageSize){
|
|
|
|
public JSONObject pcEnableInvoiceList(Integer pageNum, Integer pageSize, String copycatId) {
|
|
|
|
Integer count = invoiceMapper.selectCount(new EntityWrapper<Invoice>().eq("status_code", "enable"));
|
|
|
|
Integer count = null;
|
|
|
|
List<Invoice> invoiceList = invoiceMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize),new EntityWrapper<Invoice>().eq("status_code", "enable").orderBy("create_date",false));
|
|
|
|
List<Invoice> invoiceList;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (null == copycatId) {
|
|
|
|
|
|
|
|
count = invoiceMapper.selectCount(new EntityWrapper<Invoice>().eq("status_code", "enable"));
|
|
|
|
|
|
|
|
invoiceList = invoiceMapper.selectPage(new RowBounds((pageNum - 1) * pageSize, pageSize), new EntityWrapper<Invoice>().eq("status_code", "enable").orderBy("create_date", false));
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
List<Custom> customList = customMapper.selectList(new EntityWrapper<Custom>().eq("copycat_id", copycatId));
|
|
|
|
|
|
|
|
count = invoiceMapper.selectCount(new EntityWrapper<Invoice>().eq("status_code", "enable").in("custom_id", customList.stream().map(item ->
|
|
|
|
|
|
|
|
item.getId()
|
|
|
|
|
|
|
|
).collect(Collectors.toList())));
|
|
|
|
|
|
|
|
invoiceList = invoiceMapper.selectPage(new RowBounds((pageNum - 1) * pageSize, pageSize), new EntityWrapper<Invoice>().eq("status_code", "enable").in("custom_id", customList.stream().map(item ->
|
|
|
|
|
|
|
|
item.getId()
|
|
|
|
|
|
|
|
).collect(Collectors.toList())).orderBy("create_date", false));
|
|
|
|
|
|
|
|
}
|
|
|
|
for (Invoice invoice : invoiceList) {
|
|
|
|
for (Invoice invoice : invoiceList) {
|
|
|
|
String invoiceHeaderId = invoice.getInvoiceHeaderId();
|
|
|
|
String invoiceHeaderId = invoice.getInvoiceHeaderId();
|
|
|
|
String customId = invoice.getCustomId();
|
|
|
|
String customId = invoice.getCustomId();
|
|
|
|