Commit 195e4c9e authored by eddie.woo's avatar eddie.woo

Merge branch 'dev_oracle' of http://code.tech.tax.asia.pwcinternal.com/root/atms into dev_oracle

parents e9f08ea4 8583d5c7
...@@ -111,22 +111,25 @@ public class OutputInvoiceController { ...@@ -111,22 +111,25 @@ public class OutputInvoiceController {
if (list.size() == 0) { if (list.size() == 0) {
return 0; return 0;
} }
OutputVATInvoiceInfoDto outputVATInvoiceInfoDto = new OutputVATInvoiceInfoDto(); pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto outputVATInvoiceInfoDto = new pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto();
outputVATInvoiceInfoDto.setTaxAmount(list.stream().map(OutputVATInvoiceInfoDto::getTaxAmount).reduce(BigDecimal::add).get()); outputVATInvoiceInfoDto.setTaxAmount(list.stream().map(OutputVATInvoiceInfoDto::getTaxAmount).reduce(BigDecimal::add).get());
outputVATInvoiceInfoDto.setAmount(list.stream().map(OutputVATInvoiceInfoDto::getAmount).reduce(BigDecimal::add).get()); outputVATInvoiceInfoDto.setAmount(list.stream().map(OutputVATInvoiceInfoDto::getAmount).reduce(BigDecimal::add).get());
OutputVATInvoiceInfoDto black = new OutputVATInvoiceInfoDto(); pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto black = new pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto();
list.add(black); // list.add(black);
list.add(outputVATInvoiceInfoDto); // list.add(outputVATInvoiceInfoDto);
List<pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto> list2 = new ArrayList<>(); List<pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto> list2 = new ArrayList<>();
list.stream().forEach(x -> { list.stream().forEach(x -> {
pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto d = pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto d =
new pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto(); new pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto();
d = beanUtil.copyProperties(x,d); d = beanUtil.copyProperties(x,d);
d.setInvoiceTypeName(d.getInvoiceTypeName()); d.setInvoiceTypeName(d.getInvoiceTypeName());
d.setTaxRate(x.getTaxRate().toString() + "%"); d.setTaxRateS(x.getTaxRate().toString() + "%");
list2.add(d); list2.add(d);
}); });
list2.add(black);
list2.add(outputVATInvoiceInfoDto);
Map<String, String> header = new LinkedHashMap<>(); Map<String, String> header = new LinkedHashMap<>();
header.put("InvoiceTypeName", "发票类型"); header.put("InvoiceTypeName", "发票类型");
header.put("ClassCode", "发票代码"); header.put("ClassCode", "发票代码");
...@@ -144,7 +147,7 @@ public class OutputInvoiceController { ...@@ -144,7 +147,7 @@ public class OutputInvoiceController {
header.put("Quantity", "数量"); header.put("Quantity", "数量");
header.put("UnitPrice", "单价"); header.put("UnitPrice", "单价");
header.put("Amount", "金额"); header.put("Amount", "金额");
header.put("TaxRate", "税率"); header.put("TaxRateS", "税率");
header.put("TaxAmount", "税额"); header.put("TaxAmount", "税额");
// header.put("TaxClassCode", "税收分类编码"); // header.put("TaxClassCode", "税收分类编码");
......
...@@ -45,7 +45,7 @@ public class OutputVATInvoiceInfoDto { ...@@ -45,7 +45,7 @@ public class OutputVATInvoiceInfoDto {
@ExcelCell(index=10) @ExcelCell(index=10)
private BigDecimal amount; private BigDecimal amount;
@ExcelCell(index=11) @ExcelCell(index=11)
private String taxRate; private String taxRateS;
@ExcelCell(index=12) @ExcelCell(index=12)
private BigDecimal taxAmount; private BigDecimal taxAmount;
private String taxClassCode; private String taxClassCode;
...@@ -194,12 +194,12 @@ public class OutputVATInvoiceInfoDto { ...@@ -194,12 +194,12 @@ public class OutputVATInvoiceInfoDto {
this.amount = amount; this.amount = amount;
} }
public String getTaxRate() { public String getTaxRateS() {
return taxRate; return taxRateS;
} }
public void setTaxRate(String taxRate) { public void setTaxRateS(String taxRateS) {
this.taxRate = taxRate; this.taxRateS = taxRateS;
} }
public BigDecimal getTaxAmount() { public BigDecimal getTaxAmount() {
......
...@@ -102,9 +102,9 @@ public class InputInvoiceDataImportServiceImpl { ...@@ -102,9 +102,9 @@ public class InputInvoiceDataImportServiceImpl {
private String convertRzjg(String rzjg){ private String convertRzjg(String rzjg){
if (StringUtils.isEmpty(rzjg)) return ""; if (StringUtils.isEmpty(rzjg)) return "";
switch (rzjg){ switch (rzjg){
case "0":
return "认证成功";
case "1": case "1":
return "认证成功";
case "2":
return "认证失败"; return "认证失败";
default: default:
return "未认证"; return "未认证";
......
...@@ -481,7 +481,7 @@ public class ReportServiceImpl { ...@@ -481,7 +481,7 @@ public class ReportServiceImpl {
MyAsserts.assertEq(serviceType, EnumServiceType.VAT, new NotFoundException()); MyAsserts.assertEq(serviceType, EnumServiceType.VAT, new NotFoundException());
MyAsserts.assertNull(periodJobMapper.getRunningJob(projectId,periodParam), Exceptions.TASK_HAS_BEGINNING); MyAsserts.assertNull(periodJobMapper.getRunningJob(projectId,periodParam), Exceptions.TASK_HAS_BEGINNING);
String status = periodApprovalMapper.getStatusByProjectIdAndPeriod(projectId, periodParam); String status = periodApprovalMapper.getStatusByProjectIdAndPeriod(projectId, periodParam);
MyAsserts.assertTrue(status == null || status.equals(Constant.APPROVAL_DISAGREED), Exceptions.REPORT_IN_PROCESS_OR_AGREED_EXCEPTION); MyAsserts.assertTrue(status == null || !status.equals(Constant.APPROVAL_COMMITTED), Exceptions.REPORT_IN_PROCESS_OR_AGREED_EXCEPTION);
try { try {
if (serviceType.equals(EnumServiceType.VAT) && (periodParam == null || periodParam <= 0)) { if (serviceType.equals(EnumServiceType.VAT) && (periodParam == null || periodParam <= 0)) {
......
...@@ -61,9 +61,7 @@ ...@@ -61,9 +61,7 @@
<when test="item.data != null">#{item.data,jdbcType=VARCHAR},</when> <when test="item.data != null">#{item.data,jdbcType=VARCHAR},</when>
<otherwise>' ',</otherwise> <otherwise>' ',</otherwise>
</choose> </choose>
<choose>
<when test="item.keyinData != null">#{item.keyinData,jdbcType=VARCHAR},</when>
</choose>
<choose> <choose>
<when test="item.formulaExp != null">#{item.formulaExp,jdbcType=VARCHAR},</when> <when test="item.formulaExp != null">#{item.formulaExp,jdbcType=VARCHAR},</when>
<otherwise>' ',</otherwise> <otherwise>' ',</otherwise>
...@@ -88,6 +86,9 @@ ...@@ -88,6 +86,9 @@
<when test="item.projectId != null">#{item.projectId,jdbcType=VARCHAR},</when> <when test="item.projectId != null">#{item.projectId,jdbcType=VARCHAR},</when>
<otherwise>' ',</otherwise> <otherwise>' ',</otherwise>
</choose> </choose>
<choose>
<when test="item.keyinData != null">#{item.keyinData,jdbcType=VARCHAR},</when>
</choose>
</trim> </trim>
</foreach> </foreach>
SELECT 1 FROM DUAL SELECT 1 FROM DUAL
......
...@@ -378,11 +378,7 @@ ...@@ -378,11 +378,7 @@
0, 0,
</otherwise> </otherwise>
</choose> </choose>
<choose>
<when test="item.keyinData != null">
#{item.keyinData,jdbcType=VARCHAR},
</when>
</choose>
<choose> <choose>
<when test="item.description != null"> <when test="item.description != null">
#{item.description,jdbcType=VARCHAR}, #{item.description,jdbcType=VARCHAR},
...@@ -396,7 +392,7 @@ ...@@ -396,7 +392,7 @@
#{item.keyValueDataId,jdbcType=VARCHAR}, #{item.keyValueDataId,jdbcType=VARCHAR},
</when> </when>
<otherwise> <otherwise>
0, '0',
</otherwise> </otherwise>
</choose> </choose>
<choose> <choose>
...@@ -496,6 +492,14 @@ ...@@ -496,6 +492,14 @@
'', '',
</otherwise> </otherwise>
</choose> </choose>
<choose>
<when test="item.keyinData != null">
#{item.keyinData,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
</trim> </trim>
</foreach> </foreach>
SELECT 1 FROM DUAL SELECT 1 FROM DUAL
......
...@@ -251,9 +251,10 @@ ...@@ -251,9 +251,10 @@
// if ($scope.detail.inputValue && (isNaN($scope.detail.inputValue) || r.test($scope.detail.inputValue))) { // if ($scope.detail.inputValue && (isNaN($scope.detail.inputValue) || r.test($scope.detail.inputValue))) {
// message = $translate.instant('CheckInputValueFormat'); // message = $translate.instant('CheckInputValueFormat');
// } else // } else
if ($scope.detail.inputValue && parseFloat($scope.detail.inputValue).toFixed(2) > 9999999999999) { // if ($scope.detail.inputValue && parseFloat($scope.detail.inputValue).toFixed(2) > 9999999999999) {
message = $translate.instant('CheckInputValueLength'); // message = $translate.instant('CheckInputValueLength');
} else if ($scope.detail.dataType === 5) { // } else
if ($scope.detail.dataType === 5) {
r = /^(-[1-9]\d*|[1-9]\d*|[0]{1,1})$/; r = /^(-[1-9]\d*|[1-9]\d*|[0]{1,1})$/;
if (!r.test($scope.detail.inputValue)) { if (!r.test($scope.detail.inputValue)) {
message = $translate.instant('CheckIntInputValue'); message = $translate.instant('CheckIntInputValue');
......
...@@ -512,11 +512,19 @@ ...@@ -512,11 +512,19 @@
// 设置顺序: 非数值字符串 -> 单元格值覆盖修改 -> 公式或手工数据源 -> 数值 // 设置顺序: 非数值字符串 -> 单元格值覆盖修改 -> 公式或手工数据源 -> 数值
var ifShowParseFloat = true; // 用于标识单元格是否设置成数值 var ifShowParseFloat = true; // 用于标识单元格是否设置成数值
if(_.isString(data.keyinData) && data.keyinData.length > 0 && isNaN(Number(data.keyinData))){
sheet.setValue(data.rowIndex, data.columnIndex, data.keyinData); if(data.dataSourceList && data.dataSourceList.length > 0 && data.dataSourceList[0].keyinData){
// sheet.getCell(data.rowIndex, data.columnIndex).cellType(new GC.Spread.Sheets.CellTypes.Text());
sheet.setValue(data.rowIndex, data.columnIndex, data.dataSourceList[0].keyinData+" ");
ifShowParseFloat = false; // 非数值字符串,单元格设置为字符串 ifShowParseFloat = false; // 非数值字符串,单元格设置为字符串
// data.value = data.dataSourceList[0].keyinData;
} }
else if (_.isString(data.value) && data.value.length > 0 && isNaN(Number(data.value))) { // else if(_.isString(data.keyinData) && data.keyinData.length > 0 && isNaN(Number(data.keyinData))){
// sheet.setValue(data.rowIndex, data.columnIndex, data.keyinData);
// ifShowParseFloat = false; // 非数值字符串,单元格设置为字符串
// data.value = data.keyinData;
// }
else if (_.isString(data.value) && data.value.length > 0 && isNaN(Number(data.value))) {
sheet.setValue(data.rowIndex, data.columnIndex, data.value); sheet.setValue(data.rowIndex, data.columnIndex, data.value);
ifShowParseFloat = false; // 非数值字符串,单元格设置为字符串 ifShowParseFloat = false; // 非数值字符串,单元格设置为字符串
} }
...@@ -602,6 +610,10 @@ ...@@ -602,6 +610,10 @@
newVal = newVal.toFixed(4); newVal = newVal.toFixed(4);
} }
if(x.keyinData){
sheet.setValue(x.rowIndex, x.columnIndex, x.keyinData);
}
var oldVal = x.value; var oldVal = x.value;
oldVal = PWC.tryParseStringToNum(oldVal); oldVal = PWC.tryParseStringToNum(oldVal);
if (_.isBoolean(oldVal)) { if (_.isBoolean(oldVal)) {
...@@ -627,7 +639,7 @@ ...@@ -627,7 +639,7 @@
sheet.setTag(x.rowIndex, x.columnIndex, JSON.stringify(x)); sheet.setTag(x.rowIndex, x.columnIndex, JSON.stringify(x));
} }
}); });
loadSheet(scope.templateId);
return cells; return cells;
}; };
......
...@@ -585,7 +585,8 @@ ...@@ -585,7 +585,8 @@
var parseItem = { var parseItem = {
index: row.index, index: row.index,
name: row.name, name: row.name,
amount: row.value amount: row.value,
keyinData:row.keyinData
}; };
modelItem.dataSource.push(parseItem); modelItem.dataSource.push(parseItem);
}); });
...@@ -595,6 +596,7 @@ ...@@ -595,6 +596,7 @@
var parseItem = { var parseItem = {
index: row.index, index: row.index,
name: row.name, name: row.name,
keyinData:row.keyinData,
amount: row.amount amount: row.amount
}; };
modelItem.dataSource.push(parseItem); modelItem.dataSource.push(parseItem);
...@@ -1175,12 +1177,8 @@ ...@@ -1175,12 +1177,8 @@
for (var j = 0; j < reportD.dataSourceList.length; j++) { for (var j = 0; j < reportD.dataSourceList.length; j++) {
if (reportD.dataSourceList[j].rowIndex === cellData.rowIndex if (reportD.dataSourceList[j].rowIndex === cellData.rowIndex
&& reportD.dataSourceList[j].columnIndex === cellData.columnIndex) { && reportD.dataSourceList[j].columnIndex === cellData.columnIndex) {
if(manualData.keyinData){
reportD.keyinData = manualData.keyinData;
reportD.dataSourceList[j].keyinData = manualData.keyinData; reportD.dataSourceList[j].keyinData = manualData.keyinData;
} else {
reportD.dataSourceList[j].amount = manualData.amount; reportD.dataSourceList[j].amount = manualData.amount;
}
} }
} }
} }
...@@ -1280,6 +1278,7 @@ ...@@ -1280,6 +1278,7 @@
// 刷新spreadsheet,获取操作数据源后最新的计算结果,并拿来与当前所有单元格value比较,得到value修改前后的值对比 // 刷新spreadsheet,获取操作数据源后最新的计算结果,并拿来与当前所有单元格value比较,得到value修改前后的值对比
var updatedCells = $scope.reportApi.refreshReport(); var updatedCells = $scope.reportApi.refreshReport();
loadCellData(getActualPeriod());
}; };
$scope.updateCellBySourceDetailDelete = function (dataSource, detailId, opType) { $scope.updateCellBySourceDetailDelete = function (dataSource, detailId, opType) {
...@@ -1550,9 +1549,6 @@ ...@@ -1550,9 +1549,6 @@
}; };
$scope.saveReportCache = function () { $scope.saveReportCache = function () {
if (!$scope.reportData) { if (!$scope.reportData) {
return $q.reject(); return $q.reject();
...@@ -2759,6 +2755,7 @@ ...@@ -2759,6 +2755,7 @@
var manualSheet = $scope.manualSpread.getActiveSheet(); var manualSheet = $scope.manualSpread.getActiveSheet();
var currentSheet = $scope.spread.getActiveSheet() var currentSheet = $scope.spread.getActiveSheet()
currentSheet.options.isProtected=false; currentSheet.options.isProtected=false;
var text= $(".li").find(".active").text();
for (var rowIndex = 0; rowIndex < currentSheet.getRowCount(); rowIndex++) { for (var rowIndex = 0; rowIndex < currentSheet.getRowCount(); rowIndex++) {
for (var columnIndex = 0; columnIndex < currentSheet.getColumnCount(); columnIndex++) { for (var columnIndex = 0; columnIndex < currentSheet.getColumnCount(); columnIndex++) {
var tagInfo = currentSheet.getTag(rowIndex, columnIndex); var tagInfo = currentSheet.getTag(rowIndex, columnIndex);
...@@ -2772,7 +2769,7 @@ ...@@ -2772,7 +2769,7 @@
var r = /^00\d*|^\.\d+|\.$/; var r = /^00\d*|^\.\d+|\.$/;
if (typeof cellValue == "undefined" || cellValue == null || cellValue == "" || cellValue == "NaN")continue; if (typeof cellValue == "undefined" || cellValue == null || cellValue == "" || cellValue == "NaN")continue;
if (cellValue && (isNaN(cellValue) || r.test(cellValue))) { if (cellValue && (isNaN(cellValue) || r.test(cellValue)) || (text == '代扣代缴税收通用缴款书取数' && columnIndex == 0)) {
cellString=cellValue; cellString=cellValue;
} else if (cellValue && parseFloat(cellValue).toFixed(2) > 9999999999999) { } else if (cellValue && parseFloat(cellValue).toFixed(2) > 9999999999999) {
SweetAlert.warning($translate.instant('CheckInputValueLength')); SweetAlert.warning($translate.instant('CheckInputValueLength'));
...@@ -2844,8 +2841,9 @@ ...@@ -2844,8 +2841,9 @@
}; };
$scope.closeManualModal = function () { $scope.closeManualModal = function () {
loadCellData(getActualPeriod());
$scope.cleanManual(); $scope.cleanManual();
$scope.modalInstance.dismiss('cancel'); $("#importExcellFile").modal('hide');
}; };
......
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
</div> </div>
<br/> <br/>
<div class="row" style="margin-left:12px; margin-right:12px;width:850px;height:500px"> <div class="row" style="width:850px;height:500px">
<div id="ss" class="sample-spreadsheets" style="height:100%;width:100%"></div> <div id="ss" class="sample-spreadsheets" style="height:100%;width:100%"></div>
</div> </div>
......
...@@ -299,7 +299,7 @@ ...@@ -299,7 +299,7 @@
} }
}).error(function (data,status,config,statusText) { }).error(function (data,status,config,statusText) {
if(status==412){ if(status==412){
SweetAlert.error('报表提审中或审核已通过!'); SweetAlert.error('报表提审中!');
}else if(status == 409){ }else if(status == 409){
SweetAlert.error('报表已在处理中!'); SweetAlert.error('报表已在处理中!');
} }
......
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