Commit ee2fc699 authored by neo's avatar neo

[dev] delete unused single java

parent b1319068
package pwc.taxtech.atms.common;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class EnumHelper {
private static Map<Class, List<IdKeyNameData>> enumMap;
static {
enumMap = new HashMap<Class, List<IdKeyNameData>>();
}
public static List<IdKeyNameData> ToIdkeyNameCollection(Class enumType) {
if (!enumMap.containsKey(enumType)) {
synchronized (enumMap) {
if (!enumMap.containsKey(enumType)) {
enumMap.put(enumType, EnumToIdKeyNameCollection(enumType));
}
}
}
return enumMap.get(enumType);
}
private static List<IdKeyNameData> EnumToIdKeyNameCollection(Class enumType) {
List<IdKeyNameData> enumKeyNames = new ArrayList<IdKeyNameData>();
try {
Method toName = enumType.getMethod("toName");
Method toCode = enumType.getMethod("toCode");
Method toDisplayName = enumType.getMethod("toDisplayName");
// 得到enum的所有实例
Object[] objs = enumType.getEnumConstants();
for (Object obj : objs) {
IdKeyNameData newData = new IdKeyNameData();
newData.setId((Integer) toCode.invoke(obj));
newData.setKey((String) toName.invoke(obj));
newData.setName((String) toDisplayName.invoke(obj));
enumKeyNames.add(newData);
}
return enumKeyNames;
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
return enumKeyNames;
}
}
package pwc.taxtech.atms.common;
import pwc.taxtech.atms.dpo.PagingDto;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
public class PagingList<T> {
private List<T> sourceData;
private PagingDto pagingDto;
/**
* 总页数
*/
private int totalPage = 0;
/**
* 当前是第几页
*/
private int curPageNo = 0;
/**
* 每页的大小
*/
private int pageSize = 0;
/**
* 每页默认大小
*/
private static final int DEFAULT_PAGE_SIZE = 500;
private int totalCount = 0;
public PagingList(List<T> sourceData, PagingDto pagingDto) {
this.sourceData = sourceData;
this.pagingDto = pagingDto;
this.pageSize = pagingDto.getPageSize();
this.curPageNo = pagingDto.getPageIndex();
this.totalCount = pagingDto.getTotalCount();
init();
}
private void init() {
if (pagingDto.getPageSize() <= 0) {
throw new IllegalArgumentException("Paging size must be greater than zero.");
}
if (null == sourceData) {
throw new NullPointerException("Paging resource list must be not null.");
}
if (totalCount % pageSize > 0) {
this.totalPage = (totalCount / pageSize) + 1;
} else {
this.totalPage = totalCount / pageSize;
}
}
public List<T> getPagingList() {
if (curPageNo <= totalPage) {
if (curPageNo < totalCount) {
return sourceData.stream().skip((curPageNo - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
} else {
int lastPageItemCount = totalCount - (curPageNo - 1) * pageSize;
return sourceData.stream().skip((curPageNo - 1) * pageSize).limit(lastPageItemCount).collect(Collectors.toList());
}
} else {
return new ArrayList<>();
}
}
}
package pwc.taxtech.atms.constant;
public class DictionaryConstant {
public static final String WFSubmitReport = "WFSubmitReport"; //提交审核
public static final String WFReportApproval = "WFReportApproval"; //审核报表
public static final String WFCargoNameMatch = "WFCargoNameMatch";//货物匹配
public static final String WFDataProcess = "WFDataProcess"; //数据处理
public static final String WFDeclarationComplete = "WFDeclarationComplete"; //申报完成
public static final String WFAccountMap = "WFAccountMap"; //科目对应
public static final String WFImportErpData = "WFImportErpData"; //导入财务数据
public static final String WFImportBalanceTable = "WFImportBalanceTable"; //导入TB
public static final String WFImportIncomeInvoice = "WFImportIncomeInvoice"; //导入进项发票
public static final String WFImportInvoiceMap = "WFImportInvoiceMap"; //导入发票对应
public static final String WFImportVoucherMap = "WFImportVoucherMap"; //导入凭证对应
public static final String WFImportOutputInvoice = "WFImportOutputInvoice"; //导入销项发票
public static final String WFImportCustomInvoice = "WFImportCustomInvoice"; //导入海关清单
public static final String WFImportJournalEntry = "WFImportJournalEntry"; //导入序时账
public static final String WFImportAuditAdjust = "WFImportAuditAdjust"; //导入审计调整
public static final String WFViewFinancialReport = "WFViewFinancialReport"; //查看报表
}
package pwc.taxtech.atms.constant;
public final class IsSystemType {
public static final int YES =1;
public static final int No = 0;
}
package pwc.taxtech.atms.constant;
public class VATCommon {
public static final String Const_ImportFileError = "文件为空或者格式不正确";
public static final int inValidNum = -1;
public static final String ValidationExisted = "validation existed";
public static final String ReValidate = "revalidate";
public static final int WholeYearPeriod = -1;
}
package pwc.taxtech.atms.constant;
public class VatErpImportValidation {
public static final String CompanyBalanceTbName = "CompanyBalance";
public static final String CustBalanceTb = "CustBalance";
public static final String BalanceTb = "Balance";
public static final String AccountRemapTb = "AccountRemap";
public static final String VoucherTbName = "Voucher";
public static final String ImportMethod_OneClick = "oneClick";
public static final String ImportMethod_Universal = "universal";
public static final String Const_ComBalanceAcctValidate = "试算平衡表科目存在于企业科目列表中";
public static final String Const_ComBalanceAcctUnValidate = "试算平衡表中出现的科目不在科目表中";
public static final String Const_ComBalanceAcctUnValidate_Tips = "请在企业科目中补全该科目信息。";
public static final String Const_VoucherAcctValidate = "凭证表中科目存在于企业科目列表中";
public static final String Const_VoucherAcctUnValidate = "凭证表中出现的科目不在科目表中";
public static final String Const_VoucherAcctUnValidate_Tips = "请在企业科目中补全该科目信息。";
public static final String Const_VSingleDebitCreditValidate = "凭证表中凭证借贷平衡";
public static final String Const_VSingleDebitCreditUnValidate = "凭证表中凭证借贷不平衡";
public static final String Const_VSingleDebitCreditUnValidate_Tips = "凭证借贷不平衡会导致系统计算所得的试算平衡表也借贷不平衡。";
public static final String Const_VEmptyCheckValidateItemId = "凭证表中凭证分录号完整";
public static final String Const_VEmptyCheckUnValidateItemId = "凭证表中凭证分录号为空";
public static final String Const_VEmptyCheckUnValidateItemId_Tips = "凭证分录号为空 ,系统无法正确判断凭证是否重复。";
public static final String Const_VEmptyCheckValidateGroup = "凭证表中凭证类型完整";
public static final String Const_VEmptyCheckUnValidateGroup = "凭证表中凭证类型为空";
public static final String Const_VEmptyCheckUnValidateGroup_Tips = "凭证类型为空,系统无法正确判断此分录属于哪张凭证,所有类型为空的会作为同一张凭证对待。";
public static final String Const_VEmptyCheckValidateAcctCode = "凭证表中科目代码完整";
public static final String Const_VEmptyCheckUnValidateAcctCode = "凭证表中科目代码为空";
public static final String Const_VEmptyCheckUnValidateAcctCode_Tips = "凭证科目代码为空,系统会在后续的所有计算中忽略此分录。";
public static final String Const_VEmptyCheckValidateSummary = "凭证表中凭证摘要完整";
public static final String Const_VEmptyCheckUnValidateSummary = "凭证表中凭证摘要为空";
public static final String Const_VEmptyCheckUnValidateSummary_Tips = "凭证摘要为空,不符合财务准则,查看明细时,不易识别分录目的。";
public static final String Const_AcctBegBalAcctLevelValidate = "试算平衡表中期初余额上下级平衡";
public static final String Const_AcctBegBalAcctLevelUnValidate = "试算平衡表中期初余额上下级不平衡";
public static final String Const_AcctBegBalAcctLevelUnValidate_Tips = "期初余额不正确会导致后续报表或分析的不准确。";
public static final String Const_BegBalValidate = "试算平衡表中期初余额借贷平衡";
public static final String Const_BegBalUnValidate = "试算平衡表中期初余额借贷不平衡";
public static final String Const_BegBalUnValidate_Tips = "期初余额不正确会导致后续报表或分析的不准确。";
public static final String Const_CompCustEndBalValidate = "系统计算所得的试算平衡表期末余额与导入的一致";
public static final String Const_CompCustEndBalUnValidate = "系统计算所得的试算平衡表期末余额与导入的不一致";
public static final String Const_CompCustAmountValidate = "系统计算所得的试算平衡表期间发生额与导入的一致";
public static final String Const_CompCustAmountUnValidate = "系统计算所得的试算平衡表期间发生额与导入的不一致";
public static final String Const_CompCustBegBalValidate = "系统计算所得的试算平衡表期初余额与导入的一致";
public static final String Const_CompCustBegBalUnValidate = "系统计算所得的试算平衡表期初余额与导入的不一致";
public static final String Const_BegEndBalValidate = "系统计算所得的上月期末与导入的本月期初一致";
public static final String Const_BegEndBalUnValidate = "系统计算所得的上月期末与导入的本月期初不一致";
public static final String Const_JournalEntryDebitCreditUnValidate = "凭证借贷不平衡";
public static final String Const_JournalEntrySummaryEmptyUnValidate = "凭证摘要为空";
public static final String Const_AccountMapping_NotMapStd = "没有对应标准科目";
public static final String Const_AccountMapping_NotMapStd_Tips = "没有对应标准科目会导致后续报表不准确";
}
package pwc.taxtech.atms.constant;
public class VoucherSelect {
public static final String S_EqualAnyKey = "等于任意一个关键词";
public static final String S_AnyHeaderKey = "以任意一个关键词开头";
public static final String S_AllKey = "包含全部关键词";
public static final String S_ContainAnyKey = "包含任意一个关键词";
public static final String S_AndAll = "与";
public static final String S_OrAll = "或";
public static final String S_Manual = "手工凭证";
public static final String S_Industry = "企业凭证";
public static final String S_Equal = "等于";
public static final String S_Greater = "大于";
public static final String S_GreaterEqual = "大于等于";
public static final String S_Include = "包含";
public static final String S_JFLJ = "借方累计金额";
public static final String S_Less = "小于";
public static final String S_LessEqual = "小于等于";
public static final String S_NotEqual = "不等于";
public static final String S_NotInclude = "不包含";
public static final String S_Or = "或者";
public static final String S_And = "并且";
public static final String S_Condition = "条件间的关系";
public static final String S_CorpAcctCoding = "科目代码";
public static final String S_CorpAcctName = "科目名称";
public static final String S_Period = "会计期间";
public static final String S_VoucherType = "凭证类型";
public static final String S_VoucherVId = "凭证编号";
public static final String S_VoucherSummary = "摘要关键字";
public static final String S_CustomerCode = "往来核算代码";
public static final String S_CustomerName = "往来核算名称";
public static final String S_Date = "凭证日期";
public static final String S_Debit = "借方金额";
public static final String S_Credit = "贷方金额";
public static final String S_Source = "凭证来源";
public static final String S_AllJe = "显示全部凭证";
public static final String S_DAcctCode = "借方科目代码";
public static final String S_CAcctCode = "贷方科目代码";
public static final String S_VSummary = "摘要包含";
public static final String S_TaxType = "税种";
public static final String S_NegativeNum = "是否包含借方红字或贷方红字";
}
package pwc.taxtech.atms.constant.enums;
public enum ApplyScope {
FinancialStatement(1),
TaxReturn (2),
AnalyticsModel (3);
private Integer code;
ApplyScope(Integer code) {
this.code = code;
}
public Integer getCode() {
return code;
}
}
package pwc.taxtech.atms.constant.enums;
import pwc.taxtech.atms.vat.entity.CellDataSource;
public enum CellDataSourceType {
/// <summary>
/// 公式(包含KeyValue)
......
package pwc.taxtech.atms.controller;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.taxadmin.NotificationFilterDto;
import pwc.taxtech.atms.dto.taxadmin.PushNotificationsWithTasksInfor;
import pwc.taxtech.atms.dto.vatdto.WorkflowDetailsDto;
@RestController
@RequestMapping("/api/v1/workflow/")
public class WorkflowController {//TODO:only for index running,should be delete future (neo)
@RequestMapping(value = "getPushNotifications", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody
PushNotificationsWithTasksInfor getPushNotifications(@RequestBody NotificationFilterDto notificationFilterDto) {
PushNotificationsWithTasksInfor notificationsWithTasksInfor = new PushNotificationsWithTasksInfor();
return notificationsWithTasksInfor;
}
@RequestMapping(value = "getWorkflowDetailByDb/{dbName}/{periodId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody
OperationResultDto<WorkflowDetailsDto> getWorkflowDetailByDb(@PathVariable String dbName, @PathVariable int periodId) {
return new OperationResultDto<>();
}
}
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