Commit 187fba43 authored by neo's avatar neo

[DEV] add get detail for xxkp

parent 214352f2
......@@ -185,8 +185,8 @@ public class OutputInvoiceController {
}
@RequestMapping(value = "queryOutputInvoiceItemList/{invoiceId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity QueryOutputInvoiceItemList(@PathVariable String invoiceId) {
return ResponseEntity.ok(outputInvoiceService.QueryOutputInvoiceItemList(invoiceId));
public ResponseEntity QueryOutputInvoiceItemList(@PathVariable String invoiceId,@RequestParam(required = false) String tag) {
return ResponseEntity.ok(outputInvoiceService.QueryOutputInvoiceItemList(invoiceId,tag));
}
private String GetExtension(String file) {
......
......@@ -466,13 +466,22 @@ public class OutputInvoiceServiceImpl {
}
}
public List<OutputInvoiceDetail> QueryOutputInvoiceItemList(String invoiceId) {
OutputInvoiceExample example = new OutputInvoiceExample();
example.createCriteria().andIDEqualTo(invoiceId);
OutputInvoice outputInvoice = outputInvoiceMapper.selectByExample(example).get(0);
public List<OutputInvoiceDetail> QueryOutputInvoiceItemList(String invoiceId ,String tag) {
String fpqqlsh;
if("off".equals(tag)){
OutputFpxxtbExample example = new OutputFpxxtbExample();
example.createCriteria().andIDEqualTo(invoiceId);
OutputFpxxtb outputInvoice = outputFpxxtbMapper.selectByExample(example).get(0);
fpqqlsh = outputInvoice.getFPQQLSH();
}else {
OutputInvoiceExample example = new OutputInvoiceExample();
example.createCriteria().andIDEqualTo(invoiceId);
OutputInvoice outputInvoice = outputInvoiceMapper.selectByExample(example).get(0);
fpqqlsh = outputInvoice.getFPQQLSH();
}
OutputInvoiceDetailExample detailExample = new OutputInvoiceDetailExample();
detailExample.createCriteria().andFPQQLSHEqualTo(outputInvoice.getFPQQLSH());
detailExample.createCriteria().andFPQQLSHEqualTo(fpqqlsh);
List<OutputInvoiceDetail> result = outputInvoiceDetailMapper.selectByExample(detailExample);
return result;
}
......
......@@ -45,8 +45,8 @@
}, apiConfig.createVat());
},
queryOutputInvoiceItemList: function (invoiceID) {
return $http.get('/outputInvoiceImport/queryOutputInvoiceItemList/' + invoiceID, apiConfig.createVat());
queryOutputInvoiceItemList: function (invoiceID,tag) {
return $http.get('/outputInvoiceImport/queryOutputInvoiceItemList/' + invoiceID+"?tag="tag, apiConfig.createVat());
},
getExportOutputInvoiceList: function (param) {
......
......@@ -637,7 +637,7 @@
columnDefs: $scope.subGridOptionsColumnDefs,
};
//获取子table数据
vatPreviewService.queryOutputInvoiceItemList(row.entity.id).success(function (data) {
vatPreviewService.queryOutputInvoiceItemList(row.entity.id,'off').success(function (data) {
if (data) {
data.forEach(function (v) {
v.dj = PWC.round(v.dj, 2);
......
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