Commit 63676740 authored by chase's avatar chase

fix bug

parent 2339e2cb
package pwc.taxtech.atms.constant.enums;
import java.util.HashMap;
import java.util.Map;
public enum EnumInvoiceType {
VATInvoice(1, "增值税专票"),
FreightTransport(2, "货运发票"),
......@@ -9,7 +12,7 @@ public enum EnumInvoiceType {
private int code;
private String name;
public static final Map<Integer, String> MAPPING = new HashMap<>();
EnumInvoiceType(int code, String name) {
this.code = code;
this.name = name;
......@@ -22,4 +25,10 @@ public enum EnumInvoiceType {
public String getName() {
return name;
}
static {
for (EnumInvoiceType invoiceType : EnumInvoiceType.values()) {
MAPPING.put(invoiceType.getCode(), invoiceType.getName());
}
}
}
......@@ -9,8 +9,8 @@ public class InvoiceRecordEnum {
* 发票类型
*/
public enum InvoiceType {
ORDINARY(1, "增值税普票"),
SPECIAL(2, "增值税专票");
ORDINARY(1, "增值税普通发票"),
SPECIAL(2, "增值税专用发票");
private Integer code;
private String name;
public static final Map<Integer, String> MAPPING = new HashMap<>();
......
......@@ -6,6 +6,7 @@ import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction;
import pwc.taxtech.atms.common.util.SpringContextUtil;
import pwc.taxtech.atms.constant.Constant;
import pwc.taxtech.atms.constant.enums.EnumInvoiceType;
import pwc.taxtech.atms.constant.enums.EnumOperationType;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType;
import pwc.taxtech.atms.constant.enums.KeyValueConfigResultType;
......@@ -199,15 +200,12 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
CertifiedInvoicesListExample.Criteria criteria = example.createCriteria();
if (period != null) {
Calendar date = Calendar.getInstance();
String year = String.valueOf(date.get(Calendar.YEAR));
//认证期间
criteria.andPeriodEqualTo(Integer.valueOf(year + (period > 9 ? period.toString() : "0" + period.toString())));
criteria.andPeriodEqualTo(Integer.valueOf(formulaContext.getYear() + (period > 9 ? period.toString() : "0" + period.toString())));
}
if (invoiceType != null) {
//发票类型
criteria.andInvoiceTypeEqualTo(String.valueOf(invoiceType));
criteria.andInvoiceTypeEqualTo(EnumInvoiceType.MAPPING.get(invoiceType));
// criteria1.andFPLXEqualTo(String.valueOf(invoiceType));
}
......@@ -223,7 +221,7 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
//// example.or(criteria1);
// }
//发票状态
criteria.andInvoiceTypeEqualTo("1"); // 过滤作废状态
criteria.andInvoiceTypeEqualTo("正常"); // 过滤作废状态
// List<InputInvoice> list = inputInvoiceMapper.selectByExample(example).stream().filter(x -> {
// return x.getRZSQ().endsWith("-" + (period.intValue() > 9 ? period.toString() : "0" + period.toString()));
......
......@@ -1457,6 +1457,7 @@
"SelectCheck": "请至少选择一项",
"SelectColumnError": "列名对应错误",
"SelectExportReport": "选择导出报表",
"SelectUploadReport": "选择保存版本",
"SelectFile": "选择文件...",
"SelectFileTitle": "选择文件",
"SelectFileToUpload": "上传文件...",
......
......@@ -910,6 +910,12 @@
//打开导出文件弹出框
$scope.openExportPop = function (evenType) {
$scope.evenType = evenType;
if ('export' == $scope.evenType) {
$scope.viewTitle = $translate.instant('SelectExportReport');
}
if ('upload' == $scope.evenType) {
$scope.viewTitle = $translate.instant('SelectUploadReport');
}
var grp = _.find($scope.$parent.$parent.groups, function (g) {
return g.name == 'TaxReturnType';
});
......
......@@ -76,7 +76,7 @@
<div id="exportReportFilesContainer">
<script type="text/ng-template" class="content" id="exportReport.html">
<div class="modal-header">
<h4 class="modal-title" style="float: left;width: 70%;">{{'SelectExportReport' | translate}}</h4>
<h4 class="modal-title" style="float: left;width: 70%;">{{viewTitle}}</h4>
<span ng-click="$dismiss();" style="width: 20px; float: right; cursor: pointer;">x</span>
</div>
<div class="modal-body process-bar-container">
......
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