Commit 2e20b5dc authored by gary's avatar gary

1、fixbug

parent 272ee822
......@@ -226,7 +226,7 @@ public class DataImportService extends BaseService {
Sheet sheet = workbook.getSheetAt(i);
if (isSheetEmpty(sheet)) continue;
List<ProfitLossStatement> pls = Lists.newArrayList();
String companyCode = sheet.getRow(5).getCell(1).getStringCellValue();
String companyCode = getCellStringValue(sheet.getRow(5).getCell(1));
OrganizationExample example = new OrganizationExample();
example.createCriteria().andCodeEqualTo(companyCode);
List<Organization> organizations = organizationMapper.selectByExample(example);
......@@ -325,7 +325,7 @@ public class DataImportService extends BaseService {
if (EnumTbImportType.CoverImport.getCode().equals(importType)) {
ProfitLossStatementExample profitLossStatementExample = new ProfitLossStatementExample();
profitLossStatementExample.createCriteria().andOrganizationIdEqualTo(orgId).andPeriodEqualTo(period);
profitLossStatementMapper.deleteByExample(profitLossStatementExample);
profitLossStatementManualMapper.deleteByExample(profitLossStatementExample);
if (profitLossStatementFinalMapper.countByExample(profitLossStatementExample) > 0) {
profitLossStatementFinalMapper.deleteByExample(profitLossStatementExample);
}
......@@ -1560,7 +1560,8 @@ public class DataImportService extends BaseService {
if (cell.getCellTypeEnum().equals(CellType.STRING)) {
return cell.getStringCellValue();
} else if(cell.getCellTypeEnum().equals(CellType.NUMERIC)) {
return String.valueOf(cell.getNumericCellValue());
// 取整
return String.valueOf((int)cell.getNumericCellValue());
}
logger.warn("获取单元格数据类型未匹配");
return null;
......
......@@ -111,4 +111,5 @@ public interface AdjustmentTableMapper extends MyVatMapper {
int insertBatch(List<AdjustmentTable> rlits);
List<AdjustmentTable> selectBeforeAdjustData(Map<String,Object> map1);
}
\ No newline at end of file
......@@ -113,4 +113,5 @@ public interface CashFlowMapper extends MyVatMapper {
Integer selectCountByCondition(@Param("cfCondition") CashFlowCondition condition);
int insertBatch(List<CashFlow> cfs);
}
\ No newline at end of file
......@@ -124,6 +124,10 @@
<when test="item.updateTime != null">#{item.updateTime,jdbcType=TIMESTAMP},</when>
<otherwise>CURRENT_TIMESTAMP,</otherwise>
</choose>
<choose>
<when test="item.tmsPeriod != null">#{item.tmsPeriod,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
</choose>
</trim>
</foreach>;
SELECT 1 FROM DUAL;
......
......@@ -57,6 +57,10 @@
<when test="item.organizationId != null">#{item.organizationId,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.projectId != null">#{item.projectId,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.date != null">#{item.date,jdbcType=TIMESTAMP},</when>
<otherwise>CURRENT_TIMESTAMP,</otherwise>
......
......@@ -50,6 +50,14 @@
<when test="item.projectId != null">#{item.projectId,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.tmsPeriod != null">#{item.tmsPeriod,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.fillInDate != null">#{item.fillInDate,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.subjectNum != null">#{item.subjectNum,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
......@@ -62,10 +70,6 @@
<when test="item.redLetterInvoiceInfoTableNum != null">#{item.redLetterInvoiceInfoTableNum,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.fillInDate != null">#{item.fillInDate,jdbcType=TIMESTAMP},</when>
<otherwise>CURRENT_TIMESTAMP,</otherwise>
</choose>
<choose>
<when test="item.salesTaxNumber != null">#{item.salesTaxNumber,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
......
......@@ -56,15 +56,12 @@
<button type="button" atms-permission permission-control-type="ngIf"
class="btn btn-vat-primary" style="float:right; margin-right: 10px;margin-left: 30px;margin-top: 8px;"
translate="AddImportBtn"
ng-click="doUploadPL(importEnum.AddImport)"></button>
ng-click="doUploadAT(importEnum.AddImport)"></button>
<button type="button" atms-permission permission-control-type="ngIf" permission-code="{{$root.vatPermission.dataImport.balanceSheet.importCode}}"
class="btn btn-vat-primary" style="float:right; margin-right: 10px;margin-left: 30px;margin-top: 8px;"
translate="CoverImportBtn"
ng-click="doUploadPL(importEnum.CoverImport)"></button>
ng-click="doUploadAT(importEnum.CoverImport)"></button>
<div class="btn-wrapper" ng-if="!isShowImportTotalBtn">
<button class="btn btn-vat-primary" atms-permission permission-control-type="ngIf"
permission-code="{{$root.vatPermission.dataImport.balanceSheet.importCode}}"
......
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