Commit 6c2e039a authored by zhkwei's avatar zhkwei

1、红字信息表导入bug;2、固定损失计算界面修改

parent 2e09e92d
...@@ -244,9 +244,9 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -244,9 +244,9 @@ public class CitImportExcelServiceImpl extends BaseService {
} }
citJournal.setSubjectCode(cellValue.toString()); citJournal.setSubjectCode(cellValue.toString());
citJournal.setSegment4(CitCommonUtil.getValue(rowData.getCell(12)).toString()); citJournal.setSegment4(CitCommonUtil.getValue(rowData.getCell(12)).toString());
citJournal.setSegment5(CitCommonUtil.getValue(rowData.getCell(13)).toString()); citJournal.setSegment5(CitCommonUtil.getValue(rowData.getCell(13)).toString().replace(".0",""));
citJournal.setSegment6(CitCommonUtil.getValue(rowData.getCell(14)).toString()); citJournal.setSegment6(CitCommonUtil.getValue(rowData.getCell(14)).toString().replace(".0",""));
citJournal.setSegment7(CitCommonUtil.getValue(rowData.getCell(15)).toString()); citJournal.setSegment7(CitCommonUtil.getValue(rowData.getCell(15)).toString().replace(".0",""));
citJournal.setSegment8(CitCommonUtil.getValue(rowData.getCell(16)).toString()); citJournal.setSegment8(CitCommonUtil.getValue(rowData.getCell(16)).toString());
citJournal.setSegment9(CitCommonUtil.getValue(rowData.getCell(17)).toString()); citJournal.setSegment9(CitCommonUtil.getValue(rowData.getCell(17)).toString());
citJournal.setSegment10(CitCommonUtil.getValue(rowData.getCell(18)).toString()); citJournal.setSegment10(CitCommonUtil.getValue(rowData.getCell(18)).toString());
...@@ -401,7 +401,6 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -401,7 +401,6 @@ public class CitImportExcelServiceImpl extends BaseService {
continue; continue;
} }
DecimalFormat df=new DecimalFormat("0");
String companyCode = cellValue.toString().replace(".0",""); String companyCode = cellValue.toString().replace(".0","");
//根据code(主体)获取机构相关信息 //根据code(主体)获取机构相关信息
List<Organization> organizations = getOrganizationByCode(companyCode); List<Organization> organizations = getOrganizationByCode(companyCode);
...@@ -442,25 +441,64 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -442,25 +441,64 @@ public class CitImportExcelServiceImpl extends BaseService {
trialBalance.setOrganizationId(orgId); trialBalance.setOrganizationId(orgId);
trialBalance.setProjectId(project.getId()); trialBalance.setProjectId(project.getId());
trialBalance.setAccountCategory(CitCommonUtil.getValue(rowData.getCell(0)).toString());
trialBalance.setAcctCode1(CitCommonUtil.getValue(rowData.getCell(1)).toString());
trialBalance.setAcctName1(CitCommonUtil.getValue(rowData.getCell(2)).toString());
trialBalance.setAcctName2(CitCommonUtil.getValue(rowData.getCell(3)).toString());
trialBalance.setAcctName3(CitCommonUtil.getValue(rowData.getCell(4)).toString());
trialBalance.setSegment1(companyCode);
trialBalance.setSegment2(CitCommonUtil.getValue(rowData.getCell(6)).toString());
cellValue = CitCommonUtil.getValue(rowData.getCell(7)); cellValue = CitCommonUtil.getValue(rowData.getCell(7));
if("".equals(cellValue)){ if("".equals(cellValue)){
citDataImportLogError.setErrorMsg("数据错误,第"+(rowNum+1)+"行科目为空"); citDataImportLogError.setErrorMsg("数据错误,第"+(rowNum+1)+"行科目为空");
citDataImportLogList.add(citDataImportLogError); citDataImportLogList.add(citDataImportLogError);
continue; continue;
} }
trialBalance.setAccountCode(cellValue.toString().replace(".0",""));
trialBalance.setSegment4(CitCommonUtil.getValue(rowData.getCell(8)).toString());
trialBalance.setSegment5(CitCommonUtil.getValue(rowData.getCell(9)).toString());
trialBalance.setSegment6(CitCommonUtil.getValue(rowData.getCell(10)).toString());
trialBalance.setSegment7(CitCommonUtil.getValue(rowData.getCell(11)).toString());
trialBalance.setSegment8(CitCommonUtil.getValue(rowData.getCell(12)).toString());
trialBalance.setSegment9(CitCommonUtil.getValue(rowData.getCell(13)).toString());
trialBalance.setSegment10(CitCommonUtil.getValue(rowData.getCell(14)).toString());
trialBalance.setSegment1Name(CitCommonUtil.getValue(rowData.getCell(15)).toString());
trialBalance.setSegment2Name(CitCommonUtil.getValue(rowData.getCell(16)).toString());
trialBalance.setAccountCode(cellValue.toString().substring(0,cellValue.toString().indexOf(".")));
trialBalance.setAccountDescription(CitCommonUtil.getValue(rowData.getCell(17)).toString()); trialBalance.setAccountDescription(CitCommonUtil.getValue(rowData.getCell(17)).toString());
trialBalance.setSegment4Name(CitCommonUtil.getValue(rowData.getCell(18)).toString());
trialBalance.setSegment5Name(CitCommonUtil.getValue(rowData.getCell(19)).toString());
trialBalance.setSegment6Name(CitCommonUtil.getValue(rowData.getCell(20)).toString());
trialBalance.setSegment7Name(CitCommonUtil.getValue(rowData.getCell(21)).toString());
trialBalance.setSegment8Name(CitCommonUtil.getValue(rowData.getCell(22)).toString());
trialBalance.setSegment9Name(CitCommonUtil.getValue(rowData.getCell(23)).toString());
trialBalance.setSegment10Name(CitCommonUtil.getValue(rowData.getCell(24)).toString());
//此期间默认为12 //此期间默认为12
trialBalance.setAccountPeriod(12); trialBalance.setAccountPeriod(12);
trialBalance.setBeginningBalance(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(25)).toString())); trialBalance.setBeginningBalance(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(25)).toString()));
trialBalance.setJan(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(26)).toString()));
trialBalance.setFeb(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(27)).toString()));
trialBalance.setMar(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(28)).toString()));
trialBalance.setApr(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(29)).toString()));
trialBalance.setMay(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(30)).toString()));
trialBalance.setJun(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(31)).toString()));
trialBalance.setJul(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(32)).toString()));
trialBalance.setAug(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(33)).toString()));
trialBalance.setSep(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(34)).toString()));
trialBalance.setOct(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(35)).toString()));
trialBalance.setNov(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(36)).toString()));
trialBalance.setDecember(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(37)).toString()));
trialBalance.setThirteen(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(38)).toString()));
trialBalance.setEndingBalance(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(39)).toString())); trialBalance.setEndingBalance(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(39)).toString()));
trialBalanceList.add(trialBalance); trialBalanceList.add(trialBalance);
} }
//判断导入的方式 //判断导入的方式
String msg = "追加导入成功"; String msg = "追加导入成功";
if (EnumTbImportType.CoverImport.getCode().equals(importType)) { if (EnumTbImportType.CoverImport.getCode().equals(importType) && projectIdList.size()>0) {
//覆盖导入要删除原有的该操作人在当前期间导入的数据,且更改之前导入的日志记录状态 //覆盖导入要删除原有的该操作人在当前期间导入的数据,且更改之前导入的日志记录状态
msg = "覆盖导入成功"; msg = "覆盖导入成功";
CitTrialBalanceExample citTrialBalanceExample = new CitTrialBalanceExample(); CitTrialBalanceExample citTrialBalanceExample = new CitTrialBalanceExample();
......
...@@ -1547,7 +1547,10 @@ public class DataImportService extends BaseService { ...@@ -1547,7 +1547,10 @@ public class DataImportService extends BaseService {
rlit.setId(plId); rlit.setId(plId);
rlit.setSubjectNum(getCellStringValue(row.getCell(0))); rlit.setSubjectNum(getCellStringValue(row.getCell(0)));
rlit.setSubjectName(getCellStringValue(row.getCell(1))); rlit.setSubjectName(getCellStringValue(row.getCell(1)));
rlit.setRedLetterInvoiceInfoTableNum(getCellStringValue(row.getCell(2))); Object value = CitCommonUtil.getValue(row.getCell(2));
if(!"".equals(value)){
rlit.setRedLetterInvoiceInfoTableNum(new BigDecimal(value.toString()).toPlainString());
}
rlit.setPeriod(DateUtils.dateToPeriod(row.getCell(3).getDateCellValue())); rlit.setPeriod(DateUtils.dateToPeriod(row.getCell(3).getDateCellValue()));
rlit.setFillInDate(row.getCell(3).getDateCellValue()); rlit.setFillInDate(row.getCell(3).getDateCellValue());
rlit.setSalesTaxNumber(getCellStringValue(row.getCell(4))); rlit.setSalesTaxNumber(getCellStringValue(row.getCell(4)));
......
...@@ -1156,6 +1156,8 @@ ...@@ -1156,6 +1156,8 @@
"ProcessFail": "Process Fail", "ProcessFail": "Process Fail",
"EndOfThisYear": "End Of This Year", "EndOfThisYear": "End Of This Year",
"BeginOfNextYear": "Begin Of Next Year", "BeginOfNextYear": "Begin Of Next Year",
"PreClassified": "Pre Classified" "PreClassified": "Pre Classified",
"AssetType": "Asset Type",
"TaxGroupName": "TaxGroupName"
} }
\ No newline at end of file
...@@ -1209,7 +1209,9 @@ ...@@ -1209,7 +1209,9 @@
"ProcessFail": "处理失败", "ProcessFail": "处理失败",
"EndOfThisYear": "本年底", "EndOfThisYear": "本年底",
"BeginOfNextYear": "下年初", "BeginOfNextYear": "下年初",
"PreClassified": "预提重分类" "PreClassified": "预提重分类",
"AssetType": "资产类型",
"TaxGroupName": "税务资产分类"
......
...@@ -226,7 +226,22 @@ ...@@ -226,7 +226,22 @@
}, },
showBorders: true, showBorders: true,
columns: [ columns: [
{caption: $translate.instant('AssetType'), dataField: "assetType",width: 120}, {
caption: $translate.instant('AssetType'),
dataField: "assetType",
width: 120,
calculateDisplayValue: function (data) {
if(data.assetType == 1){
return "固定资产";
}
if(data.assetType == 2){
return "长期待摊";
}
if(data.assetType == 3){
return "无形资产";
}
}
},
{caption: $translate.instant('AssetNumber'), dataField: "assetNumber",width: 120}, {caption: $translate.instant('AssetNumber'), dataField: "assetNumber",width: 120},
{caption: $translate.instant('AssetName'), dataField: "assetDescription",width: 200}, {caption: $translate.instant('AssetName'), dataField: "assetDescription",width: 200},
{caption: $translate.instant('BuyDate'), dataField: "buyDate", dataType: "date", format: "yyyy-MM-dd",width: 100}, {caption: $translate.instant('BuyDate'), dataField: "buyDate", dataType: "date", format: "yyyy-MM-dd",width: 100},
......
...@@ -170,10 +170,11 @@ ...@@ -170,10 +170,11 @@
}, },
__RequestVerificationToken: token, __RequestVerificationToken: token,
withCredentials: true withCredentials: true
}).then(function(resp) { }).then(function(data) {
$('#busy-indicator-container').hide(); $('#busy-indicator-container').hide();
var resp = data.data;
deferred.resolve(); deferred.resolve();
if (resp.data || resp.result) { if (resp.result) {
logDto.UpdateState = $translate.instant('ImportSuccess')+" "+resp.data + $translate.instant('ItemData'); logDto.UpdateState = $translate.instant('ImportSuccess')+" "+resp.data + $translate.instant('ItemData');
vatOperationLogService.addOperationLog(logDto); vatOperationLogService.addOperationLog(logDto);
SweetAlert.success($translate.instant('ImportSuccess')+" "+resp.data + $translate.instant('ItemData')); SweetAlert.success($translate.instant('ImportSuccess')+" "+resp.data + $translate.instant('ItemData'));
......
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