Commit b5b1cadf authored by Memorydoc's avatar Memorydoc

#

parent a1c96d37
......@@ -959,7 +959,7 @@ public class DataImportService extends BaseService {
for (int i = 0; i < workbook.getNumberOfSheets(); i++) {
Sheet sheet = workbook.getSheetAt(i);
if (isSheetEmpty(sheet)) continue;
List<RedLetterInfoTable> rlits = generalRLITs(sheet);
List<RedLetterInfoTable> rlits = generalRLITs(sheet, tmsPeriod);
if (rlits.size() < 1) continue;
// 根据主体分组处理
Map<String, List<RedLetterInfoTable>> atsGroupRes =
......@@ -1686,8 +1686,9 @@ public class DataImportService extends BaseService {
dataImportLogs.add(dataImportLog);
}
private List<RedLetterInfoTable> generalRLITs(Sheet sheet) {
private List<RedLetterInfoTable> generalRLITs(Sheet sheet, Integer periodDate) {
List<RedLetterInfoTable> rlits = Lists.newArrayList();
SimpleDateFormat format = new SimpleDateFormat("yyyyMM");
for (int j = 1; j <= sheet.getLastRowNum(); j++) {
RedLetterInfoTable rlit = new RedLetterInfoTable();
Long plId = idService.nextId();
......@@ -1702,8 +1703,11 @@ public class DataImportService extends BaseService {
if (!"".equals(value)) {
rlit.setRedLetterInvoiceInfoTableNum(new BigDecimal(value.toString()).toPlainString());
}
rlit.setPeriod(DateUtils.dateToPeriod(row.getCell(3).getDateCellValue()));
rlit.setFillInDate(row.getCell(3).getDateCellValue());
rlit.setPeriod(periodDate);
try{
rlit.setFillInDate(row.getCell(1).getDateCellValue());
}catch (Exception e){
}
rlit.setSalesTaxNumber(getCellStringValue(row.getCell(4)));
rlit.setSalespersonName(getCellStringValue(row.getCell(5)));
rlit.setTotalAmount(getCellBigDecimalValue(row.getCell(6)));
......
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