Commit a2708d48 authored by eddie.woo's avatar eddie.woo

modify

parent d74d34ed
......@@ -184,7 +184,7 @@ public class DataInitTest extends CommonIT {
}
OutputInvoice outputInvoice = new OutputInvoice();
outputInvoice.setID(CommonUtils.getUUID());
outputInvoice.setFPQQLSH(CommonUtils.getUUID());
outputInvoice.setFPQQLSH(sheet.getRow(r).getCell(1).getStringCellValue());
outputInvoice.setFPDM(sheet.getRow(r).getCell(2).getStringCellValue());
outputInvoice.setFPHM(sheet.getRow(r).getCell(3).getStringCellValue());
outputInvoice.setKPRQ(sheet.getRow(r).getCell(4).getStringCellValue());
......@@ -202,7 +202,52 @@ public class DataInitTest extends CommonIT {
outputInvoice.setJSHJ(sheet.getRow(r).getCell(35).getStringCellValue());
// outputInvoice.setSLV(sheet.getRow(r).getCell(42).getStringCellValue());
// outputInvoice.setHTBH(sheet.getRow(r).getCell(54).getStringCellValue());
outputInvoiceMapper.insertSelective(outputInvoice);
OutputInvoiceExample example = new OutputInvoiceExample();
example.createCriteria().andFPDMEqualTo(outputInvoice.getFPDM()).andFPHMEqualTo(outputInvoice.getFPHM());
if (outputInvoiceMapper.selectByExample(example).size() > 0) {
outputInvoiceMapper.updateByExampleSelective(outputInvoice, example);
} else {
outputInvoiceMapper.insertSelective(outputInvoice);
}
} catch (Exception e) {
e.printStackTrace();
}
}
System.out.println("end");
}
@Test
public void initOutputDetail() throws Exception {
Workbook workbook = WorkbookFactory.create(new File("C:\\Users\\Eddie Wu\\Desktop\\导入\\进销项/导入模板_销项明细_绿能_201809.xlsx"));
Sheet sheet = workbook.getSheetAt(0);
for (int r = 1; r <= sheet.getLastRowNum(); r++) {
try {
for (int c = 0; c <= sheet.getRow(r).getLastCellNum(); c++) {
Cell cell = sheet.getRow(r).getCell(c);
if (null != cell) {
cell.setCellType(CellType.STRING);
}
}
OutputInvoiceDetail detail = new OutputInvoiceDetail();
detail.setID(CommonUtils.getUUID());
detail.setFPQQLSH(sheet.getRow(r).getCell(1).getStringCellValue());
detail.setSPMC(sheet.getRow(r).getCell(2).getStringCellValue());
detail.setGGXH(sheet.getRow(r).getCell(3).getStringCellValue());
detail.setDW(sheet.getRow(r).getCell(4).getStringCellValue());
detail.setDJ(sheet.getRow(r).getCell(5).getStringCellValue());
detail.setSL(sheet.getRow(r).getCell(6).getStringCellValue());
detail.setJE(sheet.getRow(r).getCell(7).getStringCellValue());
detail.setSLV(sheet.getRow(r).getCell(8).getStringCellValue());
detail.setSE(sheet.getRow(r).getCell(9).getStringCellValue());
detail.setMXXH(NumberUtils.createBigDecimal(sheet.getRow(r).getCell(15).getStringCellValue()));
detail.setFPHXZ(sheet.getRow(r).getCell(16).getStringCellValue());
OutputInvoiceDetailExample example = new OutputInvoiceDetailExample();
example.createCriteria().andFPQQLSHEqualTo(detail.getFPQQLSH());
if (outputInvoiceDetailMapper.selectByExample(example).size() > 0) {
outputInvoiceDetailMapper.updateByExampleSelective(detail, example);
} else {
outputInvoiceDetailMapper.insertSelective(detail);
}
} catch (Exception e) {
e.printStackTrace();
}
......
......@@ -182,6 +182,17 @@
if (treeData && treeData.calculateData) {
treeData.calculateData.TitleName = $translate.instant('Total');
$scope.subtotals = treeData.calculateData;
var tmp = parseInt($scope.subtotals.begDebitBal.replace(/\,/g, '')) - parseInt($scope.subtotals.begCreditBal.replace(/\,/g, ''))
+ parseInt($scope.subtotals.debitBal.replace(/\,/g, '')) - parseInt($scope.subtotals.creditBal.replace(/\,/g, ''))
- parseInt($scope.subtotals.endDebitBal.replace(/\,/g, '')) + parseInt($scope.subtotals.endCreditBal.replace(/\,/g, ''));
if (0 !== tmp) {
swal({
title: $translate.instant('WarningTitle'),
text: '试算平衡表金额不平衡!差异:' + tmp,
type: "warning",
confirmButtonText: $translate.instant('Confirm')
});
}
}
$('.filter-button').popover("hide");
......
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