Commit 3193f8aa authored by neo's avatar neo

[bugfix] fixed query output invoice detail impl

parent f2e14ab7
...@@ -29,6 +29,7 @@ import pwc.taxtech.atms.dto.vatdto.QueryEvidenceDto; ...@@ -29,6 +29,7 @@ import pwc.taxtech.atms.dto.vatdto.QueryEvidenceDto;
import pwc.taxtech.atms.entity.Organization; import pwc.taxtech.atms.entity.Organization;
import pwc.taxtech.atms.entity.OrganizationExample; import pwc.taxtech.atms.entity.OrganizationExample;
import pwc.taxtech.atms.entity.Project; import pwc.taxtech.atms.entity.Project;
import pwc.taxtech.atms.invoice.OutputInvoiceDetailMapper;
import pwc.taxtech.atms.invoice.OutputInvoiceMapper; import pwc.taxtech.atms.invoice.OutputInvoiceMapper;
import pwc.taxtech.atms.service.impl.Message; import pwc.taxtech.atms.service.impl.Message;
import pwc.taxtech.atms.vat.dao.ImportFileMapper; import pwc.taxtech.atms.vat.dao.ImportFileMapper;
...@@ -66,6 +67,8 @@ public class OutputInvoiceServiceImpl { ...@@ -66,6 +67,8 @@ public class OutputInvoiceServiceImpl {
private ProjectMapper projectMapper; private ProjectMapper projectMapper;
@Autowired @Autowired
private OrganizationMapper organizationMapper; private OrganizationMapper organizationMapper;
@Autowired
private OutputInvoiceDetailMapper outputInvoiceDetailMapper;
public PageInfo<OutputInvoice> queryOutputInvoiceList(QueryOutputDto queryDto, String projectId) { public PageInfo<OutputInvoice> queryOutputInvoiceList(QueryOutputDto queryDto, String projectId) {
Project project = projectMapper.selectByPrimaryKey(projectId); Project project = projectMapper.selectByPrimaryKey(projectId);
...@@ -290,11 +293,14 @@ public class OutputInvoiceServiceImpl { ...@@ -290,11 +293,14 @@ public class OutputInvoiceServiceImpl {
} }
} }
public List<OutputVatInvoiceItem> QueryOutputInvoiceItemList(String invoiceId) { public List<OutputInvoiceDetail> QueryOutputInvoiceItemList(String invoiceId) {
OutputVatInvoiceItemExample example = new OutputVatInvoiceItemExample(); OutputInvoiceExample example = new OutputInvoiceExample();
example.createCriteria().andInvoiceIdEqualTo(invoiceId); example.createCriteria().andIDEqualTo(invoiceId);
List<OutputVatInvoiceItem> result = outputVATInvoiceItemMapper.selectByExample(example); OutputInvoice outputInvoice = outputInvoiceMapper.selectByExample(example).get(0);
result.stream().sorted(Comparator.comparing(OutputVatInvoiceItem::getSeqNo));
OutputInvoiceDetailExample detailExample = new OutputInvoiceDetailExample();
detailExample.createCriteria().andFPQQLSHEqualTo(outputInvoice.getFPQQLSH());
List<OutputInvoiceDetail> result = outputInvoiceDetailMapper.selectByExample(detailExample);
return result; return result;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment