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