Commit 03000ff9 authored by chase's avatar chase

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

parents 1fd33481 7e67c133
......@@ -397,6 +397,25 @@
<version>3.2.6</version>
</dependency>
<!--CXF END-->
<!-- https://mvnrepository.com/artifact/org.jxls/jxls -->
<dependency>
<groupId>org.jxls</groupId>
<artifactId>jxls</artifactId>
<version>2.4.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jxls/jxls-poi -->
<dependency>
<groupId>org.jxls</groupId>
<artifactId>jxls-poi</artifactId>
<version>1.0.15</version>
</dependency>
<!-- https://mvnrepository.com/artifact/net.sf.jxls/jxls-core -->
<dependency>
<groupId>net.sf.jxls</groupId>
<artifactId>jxls-core</artifactId>
<version>1.0.6</version>
</dependency>
</dependencies>
<profiles>
......@@ -468,6 +487,14 @@
</includes>
<targetPath>${basedir}/target/classes/userTemplate</targetPath>
</resource>
<resource>
<directory>src/main/resources/vat_excel_template</directory>
<includes>
<include>**/*.xls</include>
<include>**/*.xlsx</include>
</includes>
<targetPath>${basedir}/target/classes/vat_excel_template</targetPath>
</resource>
</resources>
<plugins>
<plugin>
......
package pwc.taxtech.atms.common;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayOutputStream;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
@Component
public class ResponseMessageBuilder {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
public HttpServletResponse getDownloadTmpResponseMessage(HttpServletResponse response, OutputStream outputStream, String fileName) throws Exception {
fileName = fileName + DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS").format(LocalDateTime.now()) + ".xlsx";
response.setContentType("application/octet-stream;charset=UTF-8");
response.setHeader("Access-Control-Expose-Headers", "x-file-name");
response.addHeader("Content-Disposition", "attachment; filename=" + fileName);
try (OutputStream responseOutputStream = response.getOutputStream()) {
response.setHeader("x-file-name", URLEncoder.encode(fileName, "UTF-8"));
ByteArrayOutputStream byteArrayOutputStream = (ByteArrayOutputStream) outputStream;
responseOutputStream.write(byteArrayOutputStream.toByteArray());
} catch (Exception e) {
logger.error("Error write data to response output stream");
e.printStackTrace();
throw new Exception(e.getMessage());
}
return response;
}
}
package pwc.taxtech.atms.constant.enums;
import java.util.HashMap;
import java.util.Map;
public class RevenueConfEnum {
/**
* 账载收入类型
*/
public enum AccountType {
Zero(0, "0值"),
Account(1, "科目"),
Manual(2, "手工录入");
private Integer code;
private String name;
public static final Map<Integer, String> MAPPING = new HashMap<>();
AccountType(Integer code, String name) {
this.code = code;
this.name = name;
}
public Integer getCode() {
return code;
}
public String getName() {
return name;
}
static {
for (RevenueConfEnum.AccountType accountType : RevenueConfEnum.AccountType.values()) {
MAPPING.put(accountType.getCode(), accountType.getName());
}
}
}
/**
* 账载收入类型
*/
public enum TaxBase {
Account(1, "账载"),
Invoice(2, "开票收入"),
Manual(3, "手工录入"),
Period_Dr(4, "借方发生额"),
Period_Cr(5, "贷方发生额");
private Integer code;
private String name;
public static final Map<Integer, String> MAPPING = new HashMap<>();
TaxBase(Integer code, String name) {
this.code = code;
this.name = name;
}
public Integer getCode() {
return code;
}
public String getName() {
return name;
}
static {
for (RevenueConfEnum.TaxBase taxBase : RevenueConfEnum.TaxBase.values()) {
MAPPING.put(taxBase.getCode(), taxBase.getName());
}
}
}
/**
* 计税方法
*/
public enum TaxType {
Common(0, "一般计税"),
Simple(1, "简易计税"),
Tax_Exemption(2, "免抵退税"),
Free(3, "免税");
private Integer code;
private String name;
public static final Map<Integer, String> MAPPING = new HashMap<>();
TaxType(Integer code, String name) {
this.code = code;
this.name = name;
}
public Integer getCode() {
return code;
}
public String getName() {
return name;
}
static {
for (RevenueConfEnum.TaxType taxType : RevenueConfEnum.TaxType.values()) {
MAPPING.put(taxType.getCode(), taxType.getName());
}
}
}
/**
* 收入类型
*/
public enum RevenueType {
Service(0, "货物及加工修理修配劳务"),
Assets(1, "服务、不动产和无形资产");
private Integer code;
private String name;
public static final Map<Integer, String> MAPPING = new HashMap<>();
RevenueType(Integer code, String name) {
this.code = code;
this.name = name;
}
public Integer getCode() {
return code;
}
public String getName() {
return name;
}
static {
for (RevenueConfEnum.RevenueType revenueType : RevenueConfEnum.RevenueType.values()) {
MAPPING.put(revenueType.getCode(), revenueType.getName());
}
}
}
/**
* 状态
*/
public enum Status {
Enable(0, "启用"),
Disable(1, "停用");
private Integer code;
private String name;
public static final Map<Integer, String> MAPPING = new HashMap<>();
Status(Integer code, String name) {
this.code = code;
this.name = name;
}
public Integer getCode() {
return code;
}
public String getName() {
return name;
}
static {
for (RevenueConfEnum.Status status : RevenueConfEnum.Status.values()) {
MAPPING.put(status.getCode(), status.getName());
}
}
}
}
......@@ -55,6 +55,13 @@ public class DataPreviewController extends BaseController {
return dataPreviewSerivceImpl.getBSDataForDisplay(param);
}
@RequestMapping(value = "exportCFData/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void downloadCFQueryData(@RequestBody CashFlowParam param, HttpServletResponse response) {
logger.debug("enter downloadCFQueryData");
String fileName="testFile";
dataPreviewSerivceImpl.exportCashFlowList(response, param, fileName);
}
@RequestMapping(value = "exportTBData/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void downloadTBQueryData(@RequestBody TrialBalanceParam paras, HttpServletResponse response) {
response.setContentType("application/vnd.ms-excel;charset=utf-8");
......
package pwc.taxtech.atms.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.dto.ApiResultDto;
import pwc.taxtech.atms.dto.ebsdto.JEqueryDto;
import pwc.taxtech.atms.service.EbsApiService;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
@RestController
@RequestMapping("/ebs/api/v1/dd")
public class EbsApiController {
private static final Logger logger= LoggerFactory.getLogger(EbsApiController.class);
@Resource
private EbsApiService ebsApiService;
@RequestMapping(value = "/queryRemoteServerThenUpdateJE", method = RequestMethod.POST)
public ApiResultDto queryRemoteServerThenUpdateJE(@RequestBody List<JEqueryDto> items) {
if (items!=null&&!items.isEmpty()) {
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdateJE(items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("queryRemoteServerThenUpdateJE error.", e);
}
return ApiResultDto.fail();
}
}
package pwc.taxtech.atms.dto.ebsdto;
import java.math.BigDecimal;
import java.util.Date;
public class JEqueryDto {
/**
* Database Column Remarks:
* 唯一编号 系统唯一编号
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.id
*
* @mbg.generated
*/
private Long id;
/**
* Database Column Remarks:
* 机构编号 对应机构编号
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.organization_id
*
* @mbg.generated
*/
private String organizationId;
/**
* Database Column Remarks:
* 项目ID
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.project_id
*
* @mbg.generated
*/
private String projectId;
/**
* Database Column Remarks:
* 数据日期
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.date
*
* @mbg.generated
*/
private Date date;
/**
* Database Column Remarks:
* 来源 GL
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.source
*
* @mbg.generated
*/
private String source;
/**
* Database Column Remarks:
* 账套ID
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.ledger_id
*
* @mbg.generated
*/
private String ledgerId;
/**
* Database Column Remarks:
* 账套名称
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.ledger_name
*
* @mbg.generated
*/
private String ledgerName;
/**
* Database Column Remarks:
* 账套币种
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.currency_code
*
* @mbg.generated
*/
private String currencyCode;
/**
* Database Column Remarks:
* 关账标识 Y/N
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.status
*
* @mbg.generated
*/
private String status;
/**
* Database Column Remarks:
* 日记账头ID
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.header_id
*
* @mbg.generated
*/
private String headerId;
/**
* Database Column Remarks:
* 日记账行号
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.line_num
*
* @mbg.generated
*/
private String lineNum;
/**
* Database Column Remarks:
* 审批状态
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.approval_status
*
* @mbg.generated
*/
private String approvalStatus;
/**
* Database Column Remarks:
* 过账
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.posted_status
*
* @mbg.generated
*/
private String postedStatus;
/**
* Database Column Remarks:
* 会计期间 yyyymm
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.period
*
* @mbg.generated
*/
private Integer period;
/**
* Database Column Remarks:
* 凭证日期
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.accounting_date
*
* @mbg.generated
*/
private Date accountingDate;
/**
* Database Column Remarks:
* 日记账来源
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.journal_source
*
* @mbg.generated
*/
private String journalSource;
/**
* Database Column Remarks:
* 日记账类别
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.category
*
* @mbg.generated
*/
private String category;
/**
* Database Column Remarks:
* 日记账名称
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.name
*
* @mbg.generated
*/
private String name;
/**
* Database Column Remarks:
* 凭证编号
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.voucher_num
*
* @mbg.generated
*/
private String voucherNum;
/**
* Database Column Remarks:
* 摘要
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.description
*
* @mbg.generated
*/
private String description;
/**
* Database Column Remarks:
* 主体代码
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.segment1
*
* @mbg.generated
*/
private String segment1;
/**
* Database Column Remarks:
* 成本中心
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.segment2
*
* @mbg.generated
*/
private String segment2;
/**
* Database Column Remarks:
* 科目代码
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.segment3
*
* @mbg.generated
*/
private String segment3;
/**
* Database Column Remarks:
* 辅助科目
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.segment4
*
* @mbg.generated
*/
private String segment4;
/**
* Database Column Remarks:
* 利润中心
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.segment5
*
* @mbg.generated
*/
private String segment5;
/**
* Database Column Remarks:
* 产品
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.segment6
*
* @mbg.generated
*/
private String segment6;
/**
* Database Column Remarks:
* 项目
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.segment7
*
* @mbg.generated
*/
private String segment7;
/**
* Database Column Remarks:
* 公司间
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.segment8
*
* @mbg.generated
*/
private String segment8;
/**
* Database Column Remarks:
* 备用1
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.segment9
*
* @mbg.generated
*/
private String segment9;
/**
* Database Column Remarks:
* 备用2
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.segment10
*
* @mbg.generated
*/
private String segment10;
/**
* Database Column Remarks:
* 主体说明
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.segment1_name
*
* @mbg.generated
*/
private String segment1Name;
/**
* Database Column Remarks:
* 成本中心说明
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.segment2_name
*
* @mbg.generated
*/
private String segment2Name;
/**
* Database Column Remarks:
* 科目说明
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.segment3_name
*
* @mbg.generated
*/
private String segment3Name;
/**
* Database Column Remarks:
* 辅助科目说明
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.segment4_name
*
* @mbg.generated
*/
private String segment4Name;
/**
* Database Column Remarks:
* 利润中心说明
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.segment5_name
*
* @mbg.generated
*/
private String segment5Name;
/**
* Database Column Remarks:
* 产品说明
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.segment6_name
*
* @mbg.generated
*/
private String segment6Name;
/**
* Database Column Remarks:
* 项目说明
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.segment7_name
*
* @mbg.generated
*/
private String segment7Name;
/**
* Database Column Remarks:
* 公司间说明
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.segment8_name
*
* @mbg.generated
*/
private String segment8Name;
/**
* Database Column Remarks:
* 备用1说明
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.segment9_name
*
* @mbg.generated
*/
private String segment9Name;
/**
* Database Column Remarks:
* 备用2说明
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.segment10_name
*
* @mbg.generated
*/
private String segment10Name;
/**
* Database Column Remarks:
* 币种
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.journal_currency_code
*
* @mbg.generated
*/
private String journalCurrencyCode;
/**
* Database Column Remarks:
* 本位币币种
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.sob_currency_code
*
* @mbg.generated
*/
private String sobCurrencyCode;
/**
* Database Column Remarks:
* 借方金额
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.accounted_dr
*
* @mbg.generated
*/
private BigDecimal accountedDr;
/**
* Database Column Remarks:
* 贷方金额
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.accounted_cr
*
* @mbg.generated
*/
private BigDecimal accountedCr;
/**
* Database Column Remarks:
* 本位币借方金额
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.entered_dr
*
* @mbg.generated
*/
private BigDecimal enteredDr;
/**
* Database Column Remarks:
* 本位币贷方金额
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.entered_cr
*
* @mbg.generated
*/
private BigDecimal enteredCr;
/**
* Database Column Remarks:
* 现金流量表项
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.cf_item
*
* @mbg.generated
*/
private String cfItem;
/**
* Database Column Remarks:
* 城市
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.attribute1
*
* @mbg.generated
*/
private String attribute1;
/**
* Database Column Remarks:
* 交易日期
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.attribute2
*
* @mbg.generated
*/
private Date attribute2;
/**
* Database Column Remarks:
* 对方银行账号
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.attribute3
*
* @mbg.generated
*/
private String attribute3;
/**
* Database Column Remarks:
* 银行流水号
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.attribute4
*
* @mbg.generated
*/
private String attribute4;
/**
* Database Column Remarks:
* 供应商编号
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.attribute5
*
* @mbg.generated
*/
private String attribute5;
/**
* Database Column Remarks:
* 交易单号
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.attribute6
*
* @mbg.generated
*/
private String attribute6;
/**
* Database Column Remarks:
* 供应商名称
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.attribute7
*
* @mbg.generated
*/
private String attribute7;
/**
* Database Column Remarks:
* 接收编码
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.attribute8
*
* @mbg.generated
*/
private String attribute8;
/**
* Database Column Remarks:
* 制单人
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.attribute9
*
* @mbg.generated
*/
private String attribute9;
/**
* Database Column Remarks:
* 审核人
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.attribute10
*
* @mbg.generated
*/
private String attribute10;
/**
* Database Column Remarks:
* 成本中心部门描述1
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.attribute11
*
* @mbg.generated
*/
private String attribute11;
/**
* Database Column Remarks:
* 成本中心部门描述2
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.attribute12
*
* @mbg.generated
*/
private String attribute12;
/**
* Database Column Remarks:
* 成本中心部门描述3
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.attribute13
*
* @mbg.generated
*/
private String attribute13;
/**
* Database Column Remarks:
* 成本中心部门描述4
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.attribute14
*
* @mbg.generated
*/
private String attribute14;
/**
* Database Column Remarks:
* 成本中心部门描述5
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.attribute15
*
* @mbg.generated
*/
private String attribute15;
/**
* Database Column Remarks:
* 成本中心部门描述6
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.attribute16
*
* @mbg.generated
*/
private String attribute16;
/**
* Database Column Remarks:
* 创建人
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.created_by
*
* @mbg.generated
*/
private String createdBy;
/**
* Database Column Remarks:
* 创建日期
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.created_date
*
* @mbg.generated
*/
private Date createdDate;
/**
* Database Column Remarks:
* 最后更新人
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.late_updated_by
*
* @mbg.generated
*/
private String lateUpdatedBy;
/**
* Database Column Remarks:
* 最后更新日期
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.late_updated_date
*
* @mbg.generated
*/
private Date lateUpdatedDate;
/**
* Database Column Remarks:
* 创建时间
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.create_time
*
* @mbg.generated
*/
private Date createTime;
/**
* Database Column Remarks:
* 更新时间
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.update_time
*
* @mbg.generated
*/
private Date updateTime;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getOrganizationId() {
return organizationId;
}
public void setOrganizationId(String organizationId) {
this.organizationId = organizationId;
}
public String getProjectId() {
return projectId;
}
public void setProjectId(String projectId) {
this.projectId = projectId;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public String getLedgerId() {
return ledgerId;
}
public void setLedgerId(String ledgerId) {
this.ledgerId = ledgerId;
}
public String getLedgerName() {
return ledgerName;
}
public void setLedgerName(String ledgerName) {
this.ledgerName = ledgerName;
}
public String getCurrencyCode() {
return currencyCode;
}
public void setCurrencyCode(String currencyCode) {
this.currencyCode = currencyCode;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getHeaderId() {
return headerId;
}
public void setHeaderId(String headerId) {
this.headerId = headerId;
}
public String getLineNum() {
return lineNum;
}
public void setLineNum(String lineNum) {
this.lineNum = lineNum;
}
public String getApprovalStatus() {
return approvalStatus;
}
public void setApprovalStatus(String approvalStatus) {
this.approvalStatus = approvalStatus;
}
public String getPostedStatus() {
return postedStatus;
}
public void setPostedStatus(String postedStatus) {
this.postedStatus = postedStatus;
}
public Integer getPeriod() {
return period;
}
public void setPeriod(Integer period) {
this.period = period;
}
public Date getAccountingDate() {
return accountingDate;
}
public void setAccountingDate(Date accountingDate) {
this.accountingDate = accountingDate;
}
public String getJournalSource() {
return journalSource;
}
public void setJournalSource(String journalSource) {
this.journalSource = journalSource;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getVoucherNum() {
return voucherNum;
}
public void setVoucherNum(String voucherNum) {
this.voucherNum = voucherNum;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getSegment1() {
return segment1;
}
public void setSegment1(String segment1) {
this.segment1 = segment1;
}
public String getSegment2() {
return segment2;
}
public void setSegment2(String segment2) {
this.segment2 = segment2;
}
public String getSegment3() {
return segment3;
}
public void setSegment3(String segment3) {
this.segment3 = segment3;
}
public String getSegment4() {
return segment4;
}
public void setSegment4(String segment4) {
this.segment4 = segment4;
}
public String getSegment5() {
return segment5;
}
public void setSegment5(String segment5) {
this.segment5 = segment5;
}
public String getSegment6() {
return segment6;
}
public void setSegment6(String segment6) {
this.segment6 = segment6;
}
public String getSegment7() {
return segment7;
}
public void setSegment7(String segment7) {
this.segment7 = segment7;
}
public String getSegment8() {
return segment8;
}
public void setSegment8(String segment8) {
this.segment8 = segment8;
}
public String getSegment9() {
return segment9;
}
public void setSegment9(String segment9) {
this.segment9 = segment9;
}
public String getSegment10() {
return segment10;
}
public void setSegment10(String segment10) {
this.segment10 = segment10;
}
public String getSegment1Name() {
return segment1Name;
}
public void setSegment1Name(String segment1Name) {
this.segment1Name = segment1Name;
}
public String getSegment2Name() {
return segment2Name;
}
public void setSegment2Name(String segment2Name) {
this.segment2Name = segment2Name;
}
public String getSegment3Name() {
return segment3Name;
}
public void setSegment3Name(String segment3Name) {
this.segment3Name = segment3Name;
}
public String getSegment4Name() {
return segment4Name;
}
public void setSegment4Name(String segment4Name) {
this.segment4Name = segment4Name;
}
public String getSegment5Name() {
return segment5Name;
}
public void setSegment5Name(String segment5Name) {
this.segment5Name = segment5Name;
}
public String getSegment6Name() {
return segment6Name;
}
public void setSegment6Name(String segment6Name) {
this.segment6Name = segment6Name;
}
public String getSegment7Name() {
return segment7Name;
}
public void setSegment7Name(String segment7Name) {
this.segment7Name = segment7Name;
}
public String getSegment8Name() {
return segment8Name;
}
public void setSegment8Name(String segment8Name) {
this.segment8Name = segment8Name;
}
public String getSegment9Name() {
return segment9Name;
}
public void setSegment9Name(String segment9Name) {
this.segment9Name = segment9Name;
}
public String getSegment10Name() {
return segment10Name;
}
public void setSegment10Name(String segment10Name) {
this.segment10Name = segment10Name;
}
public String getJournalCurrencyCode() {
return journalCurrencyCode;
}
public void setJournalCurrencyCode(String journalCurrencyCode) {
this.journalCurrencyCode = journalCurrencyCode;
}
public String getSobCurrencyCode() {
return sobCurrencyCode;
}
public void setSobCurrencyCode(String sobCurrencyCode) {
this.sobCurrencyCode = sobCurrencyCode;
}
public BigDecimal getAccountedDr() {
return accountedDr;
}
public void setAccountedDr(BigDecimal accountedDr) {
this.accountedDr = accountedDr;
}
public BigDecimal getAccountedCr() {
return accountedCr;
}
public void setAccountedCr(BigDecimal accountedCr) {
this.accountedCr = accountedCr;
}
public BigDecimal getEnteredDr() {
return enteredDr;
}
public void setEnteredDr(BigDecimal enteredDr) {
this.enteredDr = enteredDr;
}
public BigDecimal getEnteredCr() {
return enteredCr;
}
public void setEnteredCr(BigDecimal enteredCr) {
this.enteredCr = enteredCr;
}
public String getCfItem() {
return cfItem;
}
public void setCfItem(String cfItem) {
this.cfItem = cfItem;
}
public String getAttribute1() {
return attribute1;
}
public void setAttribute1(String attribute1) {
this.attribute1 = attribute1;
}
public Date getAttribute2() {
return attribute2;
}
public void setAttribute2(Date attribute2) {
this.attribute2 = attribute2;
}
public String getAttribute3() {
return attribute3;
}
public void setAttribute3(String attribute3) {
this.attribute3 = attribute3;
}
public String getAttribute4() {
return attribute4;
}
public void setAttribute4(String attribute4) {
this.attribute4 = attribute4;
}
public String getAttribute5() {
return attribute5;
}
public void setAttribute5(String attribute5) {
this.attribute5 = attribute5;
}
public String getAttribute6() {
return attribute6;
}
public void setAttribute6(String attribute6) {
this.attribute6 = attribute6;
}
public String getAttribute7() {
return attribute7;
}
public void setAttribute7(String attribute7) {
this.attribute7 = attribute7;
}
public String getAttribute8() {
return attribute8;
}
public void setAttribute8(String attribute8) {
this.attribute8 = attribute8;
}
public String getAttribute9() {
return attribute9;
}
public void setAttribute9(String attribute9) {
this.attribute9 = attribute9;
}
public String getAttribute10() {
return attribute10;
}
public void setAttribute10(String attribute10) {
this.attribute10 = attribute10;
}
public String getAttribute11() {
return attribute11;
}
public void setAttribute11(String attribute11) {
this.attribute11 = attribute11;
}
public String getAttribute12() {
return attribute12;
}
public void setAttribute12(String attribute12) {
this.attribute12 = attribute12;
}
public String getAttribute13() {
return attribute13;
}
public void setAttribute13(String attribute13) {
this.attribute13 = attribute13;
}
public String getAttribute14() {
return attribute14;
}
public void setAttribute14(String attribute14) {
this.attribute14 = attribute14;
}
public String getAttribute15() {
return attribute15;
}
public void setAttribute15(String attribute15) {
this.attribute15 = attribute15;
}
public String getAttribute16() {
return attribute16;
}
public void setAttribute16(String attribute16) {
this.attribute16 = attribute16;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public Date getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Date createdDate) {
this.createdDate = createdDate;
}
public String getLateUpdatedBy() {
return lateUpdatedBy;
}
public void setLateUpdatedBy(String lateUpdatedBy) {
this.lateUpdatedBy = lateUpdatedBy;
}
public Date getLateUpdatedDate() {
return lateUpdatedDate;
}
public void setLateUpdatedDate(Date lateUpdatedDate) {
this.lateUpdatedDate = lateUpdatedDate;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
package pwc.taxtech.atms.dto.vatdto.excelheader;
public class CashFlowHeader {
private String companyNameCn;
private String companyNameEn;
private Integer periodStart;
private Integer periodEnd;
private String ledgerName;
private String ledgerCurrencyCode;
private String status;
public String getCompanyNameCn() {
return companyNameCn;
}
public void setCompanyNameCn(String companyNameCn) {
this.companyNameCn = companyNameCn;
}
public String getCompanyNameEn() {
return companyNameEn;
}
public void setCompanyNameEn(String companyNameEn) {
this.companyNameEn = companyNameEn;
}
public Integer getPeriodStart() {
return periodStart;
}
public void setPeriodStart(Integer periodStart) {
this.periodStart = periodStart;
}
public Integer getPeriodEnd() {
return periodEnd;
}
public void setPeriodEnd(Integer periodEnd) {
this.periodEnd = periodEnd;
}
public String getLedgerName() {
return ledgerName;
}
public void setLedgerName(String ledgerName) {
this.ledgerName = ledgerName;
}
public String getLedgerCurrencyCode() {
return ledgerCurrencyCode;
}
public void setLedgerCurrencyCode(String ledgerCurrencyCode) {
this.ledgerCurrencyCode = ledgerCurrencyCode;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
}
package pwc.taxtech.atms.service;
import pwc.taxtech.atms.dto.ebsdto.JEqueryDto;
import java.util.List;
public interface EbsApiService {
/**
* EBS 日记账同步更新
* @param items
*/
void queryRemoteServerThenUpdateJE(List<JEqueryDto> items);
}
......@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.client.RestTemplate;
import pwc.taxtech.atms.common.AtmsApiSettings;
import pwc.taxtech.atms.common.AuthUserHelper;
import pwc.taxtech.atms.common.ResponseMessageBuilder;
import pwc.taxtech.atms.common.util.BeanUtil;
public class BaseService {
......@@ -23,5 +24,9 @@ public class BaseService {
protected BeanUtil beanUtil;
@Autowired
protected RestTemplate restTemplate;
@Autowired
protected CommonDocumentHelper commonDocumentHelper;
@Autowired
protected ResponseMessageBuilder responseMessageBuilder;
}
package pwc.taxtech.atms.service.impl;
import org.jxls.common.Context;
import org.jxls.expression.JexlExpressionEvaluator;
import org.jxls.transform.Transformer;
import org.jxls.util.JxlsHelper;
import org.nutz.lang.Lang;
import org.nutz.lang.Streams;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Component
public class CommonDocumentHelper {
private static final Logger logger = LoggerFactory.getLogger(CommonDocumentHelper.class);
public void toXlsxFileUsingJxls(List<?> list, String excelTemplatePathInClassPath, String outputFilePath) {
//InputStream is = Streams.fileIn(excelTemplatePathInClassPath);
InputStream is = this.getClass().getResourceAsStream(excelTemplatePathInClassPath);
OutputStream os = Streams.fileOut(outputFilePath);
Context context = new Context();
context.putVar("list", list);
context.putVar("REPORT_DATE", new Date());
JxlsHelper jxlsHelper = JxlsHelper.getInstance();
Transformer transformer = jxlsHelper.createTransformer(is, os);
JexlExpressionEvaluator evaluator = (JexlExpressionEvaluator) transformer.getTransformationConfig()
.getExpressionEvaluator();
// evaluator.getJexlEngine().setSilent(true); // 设置静默模式,不报警告
Map<String, Object> funcs = new HashMap<String, Object>();
funcs.put("myutils", new JxlsUtils());
evaluator.getJexlEngine().setFunctions(funcs);
// jxlsHelper.setUseFastFormulaProcessor(false); //与统计函数有关
try {
jxlsHelper.processTemplate(context, transformer);
} catch (IOException e) {
logger.error("error when calling processTemplate:" + e, e);
throw Lang.wrapThrow(e);
} finally {
Streams.safeClose(is);
Streams.safeClose(os);
}
}
public OutputStream toXlsxFileUsingJxls(Object header, List<?> list, String excelTemplatePathInClassPath) {
//InputStream is = Streams.fileIn(excelTemplatePathInClassPath);
InputStream is = this.getClass().getResourceAsStream(excelTemplatePathInClassPath);
OutputStream os = new ByteArrayOutputStream();
Context context = new Context();
context.putVar("header", header);
context.putVar("list", list);
context.putVar("REPORT_DATE", new Date());
JxlsHelper jxlsHelper = JxlsHelper.getInstance();
Transformer transformer = jxlsHelper.createTransformer(is, os);
JexlExpressionEvaluator evaluator = (JexlExpressionEvaluator) transformer.getTransformationConfig()
.getExpressionEvaluator();
// evaluator.getJexlEngine().setSilent(true); // 设置静默模式,不报警告
Map<String, Object> funcs = new HashMap<String, Object>();
funcs.put("myutils", new JxlsUtils());
evaluator.getJexlEngine().setFunctions(funcs);
// jxlsHelper.setUseFastFormulaProcessor(false); //与统计函数有关
try {
jxlsHelper.processTemplate(context, transformer);
} catch (IOException e) {
logger.error("error when calling processTemplate:" + e, e);
throw Lang.wrapThrow(e);
} finally {
Streams.safeClose(is);
Streams.safeClose(os);
}
return os;
}
}
package pwc.taxtech.atms.service.impl;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dao.OrganizationMapper;
import pwc.taxtech.atms.dto.vatdto.*;
import pwc.taxtech.atms.dto.vatdto.dd.*;
import pwc.taxtech.atms.dto.vatdto.dd.TrialBalanceDto;
import pwc.taxtech.atms.dto.vatdto.excelheader.CashFlowHeader;
import pwc.taxtech.atms.entity.Organization;
import pwc.taxtech.atms.thirdparty.ExcelUtil;
import pwc.taxtech.atms.vat.dao.*;
import pwc.taxtech.atms.vat.dpo.*;
......@@ -14,11 +18,9 @@ import pwc.taxtech.atms.vat.dpo.TrialBalanceCondition;
import pwc.taxtech.atms.vat.entity.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* @Auther: Gary J Li
......@@ -42,6 +44,8 @@ public class DataPreviewSerivceImpl extends BaseService {
@Resource
private CashFlowMapper cashFlowMapper;
@Resource
private OrganizationMapper organizationMapper;
public PageInfo<TrialBalanceDto> getTBDataForDisplay(TrialBalanceParam param) {
......@@ -85,6 +89,30 @@ public class DataPreviewSerivceImpl extends BaseService {
}
public PageInfo<CashFlowDto> getCFDataForDisplay(CashFlowParam param) {
CashFlowCondition condition = new CashFlowCondition();
beanUtil.copyProperties(param, condition);
//Integer totalCount=cashFlowMapper.selectCountByCondition(condition);
List<CashFlowDto> cashFlowDtos = Lists.newArrayList();
Page page = PageHelper.startPage(param.getPageInfo().getPageIndex(), param.getPageInfo().getPageSize());
List<CashFlow> cashFlows = cashFlowMapper.selectByCondition(condition);
//使用page的getTotal()
Long total = page.getTotal();
cashFlows.forEach(cf -> {
CashFlowDto cashFlowDto = new CashFlowDto();
beanUtil.copyProperties(cf, cashFlowDto);
cashFlowDtos.add(cashFlowDto);
});
PageInfo<CashFlowDto> pageInfo=new PageInfo<>(cashFlowDtos);
pageInfo.setTotal(total);
pageInfo.setPageNum(param.getPageInfo().getPageIndex());
return pageInfo;
}
public HttpServletResponse exportCashFlowList(HttpServletResponse response, CashFlowParam param, String fileName) {
//Boolean isEn = StringUtils.equals(language, "en-us");
logger.debug("start export input invoice list to excel");
//String excelTemplatePathInClassPath = "/vat_excel_template/cash_flow"+(isEn?"":"_cn") + ".xlsx";
String excelTemplatePathInClassPath = "/vat_excel_template/cash_flow.xlsx";
CashFlowCondition condition = new CashFlowCondition();
beanUtil.copyProperties(param, condition);
PageHelper.startPage(param.getPageInfo().getPageIndex(), param.getPageInfo().getPageSize());
......@@ -95,7 +123,25 @@ public class DataPreviewSerivceImpl extends BaseService {
beanUtil.copyProperties(cf, cashFlowDto);
cashFlowDtos.add(cashFlowDto);
});
return new PageInfo<>(cashFlowDtos);
CashFlowHeader cashFlowHeader=new CashFlowHeader();
if(cashFlowDtos.size()>0){
Organization org = organizationMapper.selectByPrimaryKey(param.getOrgId());
cashFlowHeader.setCompanyNameCn(org.getName());
cashFlowHeader.setPeriodStart(param.getPeriodStart());
cashFlowHeader.setPeriodEnd(param.getPeriodEnd());
cashFlowHeader.setLedgerName(cashFlowDtos.get(0).getLedgerName());
cashFlowHeader.setLedgerCurrencyCode(cashFlowDtos.get(0).getLedgerCurrencyCode());
cashFlowHeader.setStatus(cashFlowDtos.get(0).getStatus());
}
OutputStream outputStream = commonDocumentHelper.toXlsxFileUsingJxls(cashFlowHeader, cashFlowDtos, excelTemplatePathInClassPath);
try {
return responseMessageBuilder.getDownloadTmpResponseMessage(response, outputStream, fileName);
} catch (Exception e) {
e.printStackTrace();
logger.error(e.getMessage());
}
return null;
}
public PageInfo<JournalEntryDto> getJEDataForDisplay(JournalEntryParam param) {
......
package pwc.taxtech.atms.service.impl;
import com.alibaba.fastjson.JSON;
import org.apache.commons.lang3.StringUtils;
import org.nutz.lang.Lang;
import org.nutz.lang.Strings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.common.util.BeanUtil;
import pwc.taxtech.atms.dto.ebsdto.JEqueryDto;
import pwc.taxtech.atms.service.EbsApiService;
import pwc.taxtech.atms.vat.dao.JournalEntryMapper;
import pwc.taxtech.atms.vat.entity.JournalEntry;
import pwc.taxtech.atms.vat.entity.JournalEntryExample;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Date;
import java.util.List;
import java.util.Optional;
@Service
public class EbsApiServiceImpl implements EbsApiService {
@Resource
private JournalEntryMapper journalEntryMapper;
@Resource
private DistributedIdService distributedIdService;
@Resource
private BeanUtil beanUtil;
private static final Logger logger= LoggerFactory.getLogger(EbsApiServiceImpl.class);
@Override
public void queryRemoteServerThenUpdateJE(List<JEqueryDto> items) {
long start=System.currentTimeMillis();
logger.debug("start queryRemoteServerThenUpdateJE");
//判断数据是否存在
if(items.size()==0){
logger.error("empty EBS JE response, skip processing");
return;
}
logger.debug("requestJEItems:"+ JSON.toJSONString(items));
for(JEqueryDto a:items){
try {
processJE(a);
}catch (Exception e){
logger.error("break loop as catch:" + e, e);
}
}
logger.debug("end queryRemoteServerThenUpdateJE,took [{}] ms",System.currentTimeMillis()-start);
}
private void processJE(JEqueryDto item){
JournalEntryExample journalEntryExample=new JournalEntryExample();
journalEntryExample.createCriteria().andHeaderIdEqualTo(item.getHeaderId()).andLineNumEqualTo(item.getLineNum());
List<JournalEntry> journalEntryList=journalEntryMapper.selectByExample(journalEntryExample);
//唯一则更新否则插入
JournalEntry journalEntry=new JournalEntry();
if(journalEntryList.size()==1){
logger.info("exit and update journalEntry headerId:{},lineNum:{}", item.getHeaderId(),item.getLineNum());
journalEntry=journalEntryList.get(0);
populateFieldsJE(item,journalEntry);
journalEntryMapper.updateByPrimaryKey(journalEntry);
}else{
logger.info("miss and insert journalEntry headerId:{},lineNum:{}", item.getHeaderId(),item.getLineNum());
populateFieldsJE(item,journalEntry);
journalEntry.setId(distributedIdService.nextId());
journalEntry.setCreatedBy("");
journalEntry.setCreatedDate(new Date());
journalEntry.setCreateTime(new Date());
journalEntryMapper.insertSelective(journalEntry);
}
}
private void populateFieldsJE(JEqueryDto item,JournalEntry result){
result.setOrganizationId(trimLimit(item.getOrganizationId(),128));
result.setProjectId(trimLimit(item.getProjectId(),128));
result.setDate(item.getDate());
result.setSource(trimLimit(item.getSource(),20));
result.setLedgerId(trimLimit(item.getLedgerId(),128));
result.setLedgerName(trimLimit(item.getLedgerName(),300));
result.setCurrencyCode(trimLimit(item.getCurrencyCode(),20));
result.setStatus(trimLimit(item.getStatus(),10));
result.setHeaderId(trimLimit(item.getHeaderId(),128));
result.setLineNum(trimLimit(item.getLineNum(),300));
result.setApprovalStatus(trimLimit(item.getApprovalStatus(),20));
result.setPostedStatus(trimLimit(item.getPostedStatus(),20));
result.setPeriod(StringUtils.isBlank(item.getPeriod().toString())?0:item.getPeriod());
result.setAccountingDate(item.getAccountingDate());
result.setJournalSource(trimLimit(item.getJournalSource(),20));
result.setCategory(trimLimit(item.getCategory(),50));
result.setName(trimLimit(item.getName(),300));
result.setVoucherNum(trimLimit(item.getVoucherNum(),128));
result.setDescription(trimLimit(item.getDescription(),500));
result.setSegment1(trimLimit(item.getSegment1(),300));
result.setSegment2(trimLimit(item.getSegment2(),300));
result.setSegment3(trimLimit(item.getSegment3(),300));
result.setSegment4(trimLimit(item.getSegment4(),300));
result.setSegment5(trimLimit(item.getSegment5(),300));
result.setSegment6(trimLimit(item.getSegment6(),300));
result.setSegment7(trimLimit(item.getSegment7(),300));
result.setSegment8(trimLimit(item.getSegment8(),300));
result.setSegment9(trimLimit(item.getSegment9(),300));
result.setSegment10(trimLimit(item.getSegment10(),300));
result.setSegment1Name(trimLimit(item.getSegment1Name(),300));
result.setSegment2Name(trimLimit(item.getSegment2Name(),300));
result.setSegment3Name(trimLimit(item.getSegment3Name(),300));
result.setSegment4Name(trimLimit(item.getSegment4Name(),300));
result.setSegment5Name(trimLimit(item.getSegment5Name(),300));
result.setSegment6Name(trimLimit(item.getSegment6Name(),300));
result.setSegment7Name(trimLimit(item.getSegment7Name(),300));
result.setSegment8Name(trimLimit(item.getSegment8Name(),300));
result.setSegment9Name(trimLimit(item.getSegment9Name(),300));
result.setSegment10Name(trimLimit(item.getSegment10Name(),300));
result.setJournalCurrencyCode(trimLimit(item.getJournalCurrencyCode(),20));
result.setSobCurrencyCode(trimLimit(item.getSobCurrencyCode(),20));
result.setAccountedDr(Optional.ofNullable(item.getAccountedDr()).map(x->x.setScale(4, RoundingMode.HALF_UP)).orElse(BigDecimal.ZERO));
result.setAccountedCr(Optional.ofNullable(item.getAccountedCr()).map(x->x.setScale(4, RoundingMode.HALF_UP)).orElse(BigDecimal.ZERO));
result.setEnteredDr(Optional.ofNullable(item.getEnteredDr()).map(x->x.setScale(4, RoundingMode.HALF_UP)).orElse(BigDecimal.ZERO));
result.setEnteredCr(Optional.ofNullable(item.getEnteredCr()).map(x->x.setScale(4, RoundingMode.HALF_UP)).orElse(BigDecimal.ZERO));
result.setCfItem(trimLimit(item.getCfItem(),50));
result.setAttribute1(trimLimit(item.getAttribute1(),300));
result.setAttribute2(item.getAttribute2());
result.setAttribute3(trimLimit(item.getAttribute3(),300));
result.setAttribute4(trimLimit(item.getAttribute4(),300));
result.setAttribute5(trimLimit(item.getAttribute5(),300));
result.setAttribute6(trimLimit(item.getAttribute6(),300));
result.setAttribute7(trimLimit(item.getAttribute7(),300));
result.setAttribute8(trimLimit(item.getAttribute8(),300));
result.setAttribute9(trimLimit(item.getAttribute9(),300));
result.setAttribute10(trimLimit(item.getAttribute10(),300));
result.setAttribute11(trimLimit(item.getAttribute11(),300));
result.setAttribute12(trimLimit(item.getAttribute12(),300));
result.setAttribute13(trimLimit(item.getAttribute13(),300));
result.setAttribute14(trimLimit(item.getAttribute14(),300));
result.setAttribute15(trimLimit(item.getAttribute15(),300));
result.setAttribute16(trimLimit(item.getAttribute16(),300));
result.setLateUpdatedBy("");
result.setLateUpdatedDate(new Date());
result.setUpdateTime(new Date());
}
/** Trim字符串,并限定字符串的长度. 如果是输入值是空指针,会返回空字符串 */
public String trimLimit(String str, int limit) {
if (Strings.isBlank(str)) {
return "";
}
String tmp = str.trim();
String result = cutString(tmp, limit);
if (result == null)
result = "";
return result;
}
/** 限定字符串的长度. */
public String cutString(String s, int length) {
if (Lang.isEmpty(length) || Lang.isEmpty(s))
return "";
else if (s.length() <= length)
return s;
else
return s.substring(0, length);
}
}
package pwc.taxtech.atms.service.impl;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
public class JxlsUtils {
public String formatDate(Date date, String pattern) {
if (null == date)
return "";
SimpleDateFormat sdf = new SimpleDateFormat(pattern, Locale.US);
sdf.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
try {
return sdf.format(date);
} catch (Exception e) {
return "<Invalid date pattern:" + pattern + ">";
}
}
}
......@@ -6,7 +6,7 @@
org.quartz.jobStore.useProperties=true
org.quartz.jobStore.tablePrefix = QRTZ_
org.quartz.jobStore.isClustered = true
org.quartz.jobStore.clusterCheckinInterval = 5000
org.quartz.jobStore.clusterCheckinInterval = 60000
org.quartz.jobStore.misfireThreshold = 60000
org.quartz.jobStore.txIsolationLevelReadCommitted = true
......
......@@ -17,7 +17,7 @@
<plugins>
<plugin interceptor="com.github.pagehelper.PageInterceptor">
<!-- 4.0.0以后版本可以不设置该参数 -->
<property name="diaect" value="oracle"/>
<property name="helperDialect" value="mysql"/>
<!--
该参数默认为false
设置为true时,会将RowBounds第一个参数offset当成pageNum页码使用
......
package pwc.taxtech.atms.service.impl;
import org.junit.Test;
import pwc.taxtech.atms.CommonIT;
import pwc.taxtech.atms.dto.ebsdto.JEqueryDto;
import pwc.taxtech.atms.service.EbsApiService;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class EbsApiServiceImplTest extends CommonIT {
@Resource
private EbsApiService ebsApiService;
@Resource
private DistributedIdService distributedIdService;
@Test
public void queryRemoteServerThenUpdateJE(){
List<JEqueryDto> items=new ArrayList<>();
for(int i=0;i<10;i++){
JEqueryDto jEqueryDto=new JEqueryDto();
jEqueryDto.setId(distributedIdService.nextId());
jEqueryDto.setOrganizationId("44250A49-F3EF-4A1E-89E0-165BB89A94D0");
jEqueryDto.setProjectId("44250A49-F3EF-4A1E-89E0-165BB89A94D0");
jEqueryDto.setDate(new Date());
jEqueryDto.setSource("这是哪里"+i);
jEqueryDto.setLedgerId("我关联谁"+i);
jEqueryDto.setLedgerName("我是谁"+i);
jEqueryDto.setCurrencyCode("123"+i);
jEqueryDto.setStatus("1");
jEqueryDto.setHeaderId("123456789");
jEqueryDto.setLineNum("1");
jEqueryDto.setApprovalStatus("1");
jEqueryDto.setPostedStatus("1");
jEqueryDto.setPeriod(0);
jEqueryDto.setAccountingDate(new Date());
jEqueryDto.setJournalSource("setJournalSource");
jEqueryDto.setCategory("setCategory");
jEqueryDto.setName("setName");
jEqueryDto.setVoucherNum("setVoucherNum");
jEqueryDto.setDescription("setDescription");
jEqueryDto.setSegment1("setSegment1");
jEqueryDto.setSegment2("setSegment2");
jEqueryDto.setSegment3("");
jEqueryDto.setSegment4("");
jEqueryDto.setSegment5("");
jEqueryDto.setSegment6("");
jEqueryDto.setSegment7("");
jEqueryDto.setSegment8("");
jEqueryDto.setSegment9("");
jEqueryDto.setSegment10("");
jEqueryDto.setSegment1Name("");
jEqueryDto.setSegment2Name("");
jEqueryDto.setSegment3Name("");
jEqueryDto.setSegment4Name("");
jEqueryDto.setSegment5Name("");
jEqueryDto.setSegment6Name("");
jEqueryDto.setSegment7Name("");
jEqueryDto.setSegment8Name("");
jEqueryDto.setSegment9Name("");
jEqueryDto.setSegment10Name("");
jEqueryDto.setJournalCurrencyCode("");
jEqueryDto.setSobCurrencyCode("");
jEqueryDto.setAccountedDr(new BigDecimal("0"));
jEqueryDto.setAccountedCr(new BigDecimal("0"));
jEqueryDto.setEnteredDr(new BigDecimal("0"));
jEqueryDto.setEnteredCr(new BigDecimal("0"));
jEqueryDto.setCfItem("");
jEqueryDto.setAttribute1("");
jEqueryDto.setAttribute2(new Date());
jEqueryDto.setAttribute3("");
jEqueryDto.setAttribute4("");
jEqueryDto.setAttribute5("");
jEqueryDto.setAttribute6("");
jEqueryDto.setAttribute7("");
jEqueryDto.setAttribute8("");
jEqueryDto.setAttribute9("");
jEqueryDto.setAttribute10("");
jEqueryDto.setAttribute11("");
jEqueryDto.setAttribute12("");
jEqueryDto.setAttribute13("");
jEqueryDto.setAttribute14("");
jEqueryDto.setAttribute15("");
jEqueryDto.setAttribute16("");
items.add(jEqueryDto);
}
ebsApiService.queryRemoteServerThenUpdateJE(items);
}
}
\ No newline at end of file
......@@ -41,12 +41,22 @@
<property name="rootInterface" value="pwc.taxtech.atms.MyVatMapper" />
</javaClientGenerator>
<table tableName="invoice_data" domainObjectName="InvoiceData">
<table tableName="revenue_config" domainObjectName="RevenueConfig">
<property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
<columnOverride column="count_type" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<columnOverride column="account_type" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<columnOverride column="tax_base" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<columnOverride column="revenue_type" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<columnOverride column="tax_type" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<columnOverride column="status" javaType="java.lang.Integer" jdbcType="TINYINT"/>
</table>
<!--<table tableName="invoice_data" domainObjectName="InvoiceData">-->
<!--<property name="useActualColumnNames" value="false"/>-->
<!--<property name="ignoreQualifiersAtRuntime" value="true"/>-->
<!--<columnOverride column="count_type" javaType="java.lang.Integer" jdbcType="TINYINT"/>-->
<!--</table>-->
<!--<table tableName="coupa_purchasing_report" domainObjectName="CoupaPurchasingReport">
<property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
......
package pwc.taxtech.atms.vat.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
......@@ -9,6 +8,8 @@ import pwc.taxtech.atms.vat.dpo.CashFlowCondition;
import pwc.taxtech.atms.vat.entity.CashFlow;
import pwc.taxtech.atms.vat.entity.CashFlowExample;
import java.util.List;
@Mapper
public interface CashFlowMapper extends MyVatMapper {
/**
......@@ -109,5 +110,7 @@ public interface CashFlowMapper extends MyVatMapper {
List<CashFlow> selectByCondition(@Param("cfCondition") CashFlowCondition condition);
Integer selectCountByCondition(@Param("cfCondition") CashFlowCondition condition);
int insertBatch(List<CashFlow> cfs);
}
\ No newline at end of file
package pwc.taxtech.atms.vat.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyVatMapper;
import pwc.taxtech.atms.vat.entity.RevenueConfig;
import pwc.taxtech.atms.vat.entity.RevenueConfigExample;
@Mapper
public interface RevenueConfigMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
long countByExample(RevenueConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
int deleteByExample(RevenueConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
int insert(RevenueConfig record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
int insertSelective(RevenueConfig record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
List<RevenueConfig> selectByExampleWithRowbounds(RevenueConfigExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
List<RevenueConfig> selectByExample(RevenueConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
RevenueConfig selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") RevenueConfig record, @Param("example") RevenueConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
int updateByExample(@Param("record") RevenueConfig record, @Param("example") RevenueConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(RevenueConfig record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
int updateByPrimaryKey(RevenueConfig record);
}
\ No newline at end of file
package pwc.taxtech.atms.vat.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import pwc.taxtech.atms.entity.BaseEntity;
/**
*
* This class was generated by MyBatis Generator.
* This class corresponds to the database table revenue_config
*
* @mbg.generated do_not_delete_during_merge
*/
public class RevenueConfig extends BaseEntity implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_config.id
*
* @mbg.generated
*/
private Long id;
/**
* Database Column Remarks:
* 序号
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_config.serial_no
*
* @mbg.generated
*/
private String serialNo;
/**
* Database Column Remarks:
* 收入类型名称
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_config.name
*
* @mbg.generated
*/
private String name;
/**
* Database Column Remarks:
* 机构ID
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_config.org_id
*
* @mbg.generated
*/
private String orgId;
/**
* Database Column Remarks:
* 账载收入类型 0.0值 1.科目 2.手工输入
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_config.account_type
*
* @mbg.generated
*/
private Integer accountType;
/**
* Database Column Remarks:
* 账载收入名称
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_config.account_name
*
* @mbg.generated
*/
private String accountName;
/**
* Database Column Remarks:
* 税率
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_config.tax_rate
*
* @mbg.generated
*/
private BigDecimal taxRate;
/**
* Database Column Remarks:
* 计税基础 1.账载 2.开票收入 3.手工录入 4.借方发生额 5.贷方发生额
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_config.tax_base
*
* @mbg.generated
*/
private Integer taxBase;
/**
* Database Column Remarks:
* 收入类型 0.货物及加工修理修配劳务 1.服务、不动产和无形资产
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_config.revenue_type
*
* @mbg.generated
*/
private Integer revenueType;
/**
* Database Column Remarks:
* 计税方法 0.一般计税 1.简易计税 2.免抵退税 3.免税
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_config.tax_type
*
* @mbg.generated
*/
private Integer taxType;
/**
* Database Column Remarks:
* 状态 0:启用 1:停用
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_config.status
*
* @mbg.generated
*/
private Integer status;
/**
* Database Column Remarks:
* 启用日期
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_config.start_date
*
* @mbg.generated
*/
private String startDate;
/**
* Database Column Remarks:
* 终止日期
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_config.end_date
*
* @mbg.generated
*/
private String endDate;
/**
* Database Column Remarks:
* 账载科目代码
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_config.tb_segment3
*
* @mbg.generated
*/
private String tbSegment3;
/**
* Database Column Remarks:
* 账载利润中心代码
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_config.tb_segment5
*
* @mbg.generated
*/
private String tbSegment5;
/**
* Database Column Remarks:
* 账载产品代码
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_config.tb_segment6
*
* @mbg.generated
*/
private String tbSegment6;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_config.update_time
*
* @mbg.generated
*/
private Date updateTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_config.create_time
*
* @mbg.generated
*/
private Date createTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_config.update_by
*
* @mbg.generated
*/
private String updateBy;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_config.create_by
*
* @mbg.generated
*/
private String createBy;
/**
* Database Column Remarks:
* 计税基础贷方发生额Code
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_config.base_cr_code
*
* @mbg.generated
*/
private String baseCrCode;
/**
* Database Column Remarks:
* 计税基础借方发生额Code
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column revenue_config.base_dr_code
*
* @mbg.generated
*/
private String baseDrCode;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table revenue_config
*
* @mbg.generated
*/
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_config.id
*
* @return the value of revenue_config.id
*
* @mbg.generated
*/
public Long getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_config.id
*
* @param id the value for revenue_config.id
*
* @mbg.generated
*/
public void setId(Long id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_config.serial_no
*
* @return the value of revenue_config.serial_no
*
* @mbg.generated
*/
public String getSerialNo() {
return serialNo;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_config.serial_no
*
* @param serialNo the value for revenue_config.serial_no
*
* @mbg.generated
*/
public void setSerialNo(String serialNo) {
this.serialNo = serialNo == null ? null : serialNo.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_config.name
*
* @return the value of revenue_config.name
*
* @mbg.generated
*/
public String getName() {
return name;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_config.name
*
* @param name the value for revenue_config.name
*
* @mbg.generated
*/
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_config.org_id
*
* @return the value of revenue_config.org_id
*
* @mbg.generated
*/
public String getOrgId() {
return orgId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_config.org_id
*
* @param orgId the value for revenue_config.org_id
*
* @mbg.generated
*/
public void setOrgId(String orgId) {
this.orgId = orgId == null ? null : orgId.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_config.account_type
*
* @return the value of revenue_config.account_type
*
* @mbg.generated
*/
public Integer getAccountType() {
return accountType;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_config.account_type
*
* @param accountType the value for revenue_config.account_type
*
* @mbg.generated
*/
public void setAccountType(Integer accountType) {
this.accountType = accountType;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_config.account_name
*
* @return the value of revenue_config.account_name
*
* @mbg.generated
*/
public String getAccountName() {
return accountName;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_config.account_name
*
* @param accountName the value for revenue_config.account_name
*
* @mbg.generated
*/
public void setAccountName(String accountName) {
this.accountName = accountName == null ? null : accountName.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_config.tax_rate
*
* @return the value of revenue_config.tax_rate
*
* @mbg.generated
*/
public BigDecimal getTaxRate() {
return taxRate;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_config.tax_rate
*
* @param taxRate the value for revenue_config.tax_rate
*
* @mbg.generated
*/
public void setTaxRate(BigDecimal taxRate) {
this.taxRate = taxRate;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_config.tax_base
*
* @return the value of revenue_config.tax_base
*
* @mbg.generated
*/
public Integer getTaxBase() {
return taxBase;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_config.tax_base
*
* @param taxBase the value for revenue_config.tax_base
*
* @mbg.generated
*/
public void setTaxBase(Integer taxBase) {
this.taxBase = taxBase;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_config.revenue_type
*
* @return the value of revenue_config.revenue_type
*
* @mbg.generated
*/
public Integer getRevenueType() {
return revenueType;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_config.revenue_type
*
* @param revenueType the value for revenue_config.revenue_type
*
* @mbg.generated
*/
public void setRevenueType(Integer revenueType) {
this.revenueType = revenueType;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_config.tax_type
*
* @return the value of revenue_config.tax_type
*
* @mbg.generated
*/
public Integer getTaxType() {
return taxType;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_config.tax_type
*
* @param taxType the value for revenue_config.tax_type
*
* @mbg.generated
*/
public void setTaxType(Integer taxType) {
this.taxType = taxType;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_config.status
*
* @return the value of revenue_config.status
*
* @mbg.generated
*/
public Integer getStatus() {
return status;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_config.status
*
* @param status the value for revenue_config.status
*
* @mbg.generated
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_config.start_date
*
* @return the value of revenue_config.start_date
*
* @mbg.generated
*/
public String getStartDate() {
return startDate;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_config.start_date
*
* @param startDate the value for revenue_config.start_date
*
* @mbg.generated
*/
public void setStartDate(String startDate) {
this.startDate = startDate == null ? null : startDate.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_config.end_date
*
* @return the value of revenue_config.end_date
*
* @mbg.generated
*/
public String getEndDate() {
return endDate;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_config.end_date
*
* @param endDate the value for revenue_config.end_date
*
* @mbg.generated
*/
public void setEndDate(String endDate) {
this.endDate = endDate == null ? null : endDate.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_config.tb_segment3
*
* @return the value of revenue_config.tb_segment3
*
* @mbg.generated
*/
public String getTbSegment3() {
return tbSegment3;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_config.tb_segment3
*
* @param tbSegment3 the value for revenue_config.tb_segment3
*
* @mbg.generated
*/
public void setTbSegment3(String tbSegment3) {
this.tbSegment3 = tbSegment3 == null ? null : tbSegment3.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_config.tb_segment5
*
* @return the value of revenue_config.tb_segment5
*
* @mbg.generated
*/
public String getTbSegment5() {
return tbSegment5;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_config.tb_segment5
*
* @param tbSegment5 the value for revenue_config.tb_segment5
*
* @mbg.generated
*/
public void setTbSegment5(String tbSegment5) {
this.tbSegment5 = tbSegment5 == null ? null : tbSegment5.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_config.tb_segment6
*
* @return the value of revenue_config.tb_segment6
*
* @mbg.generated
*/
public String getTbSegment6() {
return tbSegment6;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_config.tb_segment6
*
* @param tbSegment6 the value for revenue_config.tb_segment6
*
* @mbg.generated
*/
public void setTbSegment6(String tbSegment6) {
this.tbSegment6 = tbSegment6 == null ? null : tbSegment6.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_config.update_time
*
* @return the value of revenue_config.update_time
*
* @mbg.generated
*/
public Date getUpdateTime() {
return updateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_config.update_time
*
* @param updateTime the value for revenue_config.update_time
*
* @mbg.generated
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_config.create_time
*
* @return the value of revenue_config.create_time
*
* @mbg.generated
*/
public Date getCreateTime() {
return createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_config.create_time
*
* @param createTime the value for revenue_config.create_time
*
* @mbg.generated
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_config.update_by
*
* @return the value of revenue_config.update_by
*
* @mbg.generated
*/
public String getUpdateBy() {
return updateBy;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_config.update_by
*
* @param updateBy the value for revenue_config.update_by
*
* @mbg.generated
*/
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy == null ? null : updateBy.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_config.create_by
*
* @return the value of revenue_config.create_by
*
* @mbg.generated
*/
public String getCreateBy() {
return createBy;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_config.create_by
*
* @param createBy the value for revenue_config.create_by
*
* @mbg.generated
*/
public void setCreateBy(String createBy) {
this.createBy = createBy == null ? null : createBy.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_config.base_cr_code
*
* @return the value of revenue_config.base_cr_code
*
* @mbg.generated
*/
public String getBaseCrCode() {
return baseCrCode;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_config.base_cr_code
*
* @param baseCrCode the value for revenue_config.base_cr_code
*
* @mbg.generated
*/
public void setBaseCrCode(String baseCrCode) {
this.baseCrCode = baseCrCode == null ? null : baseCrCode.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column revenue_config.base_dr_code
*
* @return the value of revenue_config.base_dr_code
*
* @mbg.generated
*/
public String getBaseDrCode() {
return baseDrCode;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column revenue_config.base_dr_code
*
* @param baseDrCode the value for revenue_config.base_dr_code
*
* @mbg.generated
*/
public void setBaseDrCode(String baseDrCode) {
this.baseDrCode = baseDrCode == null ? null : baseDrCode.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", serialNo=").append(serialNo);
sb.append(", name=").append(name);
sb.append(", orgId=").append(orgId);
sb.append(", accountType=").append(accountType);
sb.append(", accountName=").append(accountName);
sb.append(", taxRate=").append(taxRate);
sb.append(", taxBase=").append(taxBase);
sb.append(", revenueType=").append(revenueType);
sb.append(", taxType=").append(taxType);
sb.append(", status=").append(status);
sb.append(", startDate=").append(startDate);
sb.append(", endDate=").append(endDate);
sb.append(", tbSegment3=").append(tbSegment3);
sb.append(", tbSegment5=").append(tbSegment5);
sb.append(", tbSegment6=").append(tbSegment6);
sb.append(", updateTime=").append(updateTime);
sb.append(", createTime=").append(createTime);
sb.append(", updateBy=").append(updateBy);
sb.append(", createBy=").append(createBy);
sb.append(", baseCrCode=").append(baseCrCode);
sb.append(", baseDrCode=").append(baseDrCode);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package pwc.taxtech.atms.vat.entity;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class RevenueConfigExample {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table revenue_config
*
* @mbg.generated
*/
protected String orderByClause;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table revenue_config
*
* @mbg.generated
*/
protected boolean distinct;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table revenue_config
*
* @mbg.generated
*/
protected List<Criteria> oredCriteria;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
public RevenueConfigExample() {
oredCriteria = new ArrayList<Criteria>();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
public String getOrderByClause() {
return orderByClause;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_config
*
* @mbg.generated
*/
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table revenue_config
*
* @mbg.generated
*/
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andSerialNoIsNull() {
addCriterion("serial_no is null");
return (Criteria) this;
}
public Criteria andSerialNoIsNotNull() {
addCriterion("serial_no is not null");
return (Criteria) this;
}
public Criteria andSerialNoEqualTo(String value) {
addCriterion("serial_no =", value, "serialNo");
return (Criteria) this;
}
public Criteria andSerialNoNotEqualTo(String value) {
addCriterion("serial_no <>", value, "serialNo");
return (Criteria) this;
}
public Criteria andSerialNoGreaterThan(String value) {
addCriterion("serial_no >", value, "serialNo");
return (Criteria) this;
}
public Criteria andSerialNoGreaterThanOrEqualTo(String value) {
addCriterion("serial_no >=", value, "serialNo");
return (Criteria) this;
}
public Criteria andSerialNoLessThan(String value) {
addCriterion("serial_no <", value, "serialNo");
return (Criteria) this;
}
public Criteria andSerialNoLessThanOrEqualTo(String value) {
addCriterion("serial_no <=", value, "serialNo");
return (Criteria) this;
}
public Criteria andSerialNoLike(String value) {
addCriterion("serial_no like", value, "serialNo");
return (Criteria) this;
}
public Criteria andSerialNoNotLike(String value) {
addCriterion("serial_no not like", value, "serialNo");
return (Criteria) this;
}
public Criteria andSerialNoIn(List<String> values) {
addCriterion("serial_no in", values, "serialNo");
return (Criteria) this;
}
public Criteria andSerialNoNotIn(List<String> values) {
addCriterion("serial_no not in", values, "serialNo");
return (Criteria) this;
}
public Criteria andSerialNoBetween(String value1, String value2) {
addCriterion("serial_no between", value1, value2, "serialNo");
return (Criteria) this;
}
public Criteria andSerialNoNotBetween(String value1, String value2) {
addCriterion("serial_no not between", value1, value2, "serialNo");
return (Criteria) this;
}
public Criteria andNameIsNull() {
addCriterion("`name` is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("`name` is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("`name` =", value, "name");
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("`name` <>", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("`name` >", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("`name` >=", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("`name` <", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("`name` <=", value, "name");
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("`name` like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("`name` not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("`name` in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("`name` not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("`name` between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("`name` not between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andOrgIdIsNull() {
addCriterion("org_id is null");
return (Criteria) this;
}
public Criteria andOrgIdIsNotNull() {
addCriterion("org_id is not null");
return (Criteria) this;
}
public Criteria andOrgIdEqualTo(String value) {
addCriterion("org_id =", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdNotEqualTo(String value) {
addCriterion("org_id <>", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdGreaterThan(String value) {
addCriterion("org_id >", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdGreaterThanOrEqualTo(String value) {
addCriterion("org_id >=", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdLessThan(String value) {
addCriterion("org_id <", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdLessThanOrEqualTo(String value) {
addCriterion("org_id <=", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdLike(String value) {
addCriterion("org_id like", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdNotLike(String value) {
addCriterion("org_id not like", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdIn(List<String> values) {
addCriterion("org_id in", values, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdNotIn(List<String> values) {
addCriterion("org_id not in", values, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdBetween(String value1, String value2) {
addCriterion("org_id between", value1, value2, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdNotBetween(String value1, String value2) {
addCriterion("org_id not between", value1, value2, "orgId");
return (Criteria) this;
}
public Criteria andAccountTypeIsNull() {
addCriterion("account_type is null");
return (Criteria) this;
}
public Criteria andAccountTypeIsNotNull() {
addCriterion("account_type is not null");
return (Criteria) this;
}
public Criteria andAccountTypeEqualTo(Integer value) {
addCriterion("account_type =", value, "accountType");
return (Criteria) this;
}
public Criteria andAccountTypeNotEqualTo(Integer value) {
addCriterion("account_type <>", value, "accountType");
return (Criteria) this;
}
public Criteria andAccountTypeGreaterThan(Integer value) {
addCriterion("account_type >", value, "accountType");
return (Criteria) this;
}
public Criteria andAccountTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("account_type >=", value, "accountType");
return (Criteria) this;
}
public Criteria andAccountTypeLessThan(Integer value) {
addCriterion("account_type <", value, "accountType");
return (Criteria) this;
}
public Criteria andAccountTypeLessThanOrEqualTo(Integer value) {
addCriterion("account_type <=", value, "accountType");
return (Criteria) this;
}
public Criteria andAccountTypeIn(List<Integer> values) {
addCriterion("account_type in", values, "accountType");
return (Criteria) this;
}
public Criteria andAccountTypeNotIn(List<Integer> values) {
addCriterion("account_type not in", values, "accountType");
return (Criteria) this;
}
public Criteria andAccountTypeBetween(Integer value1, Integer value2) {
addCriterion("account_type between", value1, value2, "accountType");
return (Criteria) this;
}
public Criteria andAccountTypeNotBetween(Integer value1, Integer value2) {
addCriterion("account_type not between", value1, value2, "accountType");
return (Criteria) this;
}
public Criteria andAccountNameIsNull() {
addCriterion("account_name is null");
return (Criteria) this;
}
public Criteria andAccountNameIsNotNull() {
addCriterion("account_name is not null");
return (Criteria) this;
}
public Criteria andAccountNameEqualTo(String value) {
addCriterion("account_name =", value, "accountName");
return (Criteria) this;
}
public Criteria andAccountNameNotEqualTo(String value) {
addCriterion("account_name <>", value, "accountName");
return (Criteria) this;
}
public Criteria andAccountNameGreaterThan(String value) {
addCriterion("account_name >", value, "accountName");
return (Criteria) this;
}
public Criteria andAccountNameGreaterThanOrEqualTo(String value) {
addCriterion("account_name >=", value, "accountName");
return (Criteria) this;
}
public Criteria andAccountNameLessThan(String value) {
addCriterion("account_name <", value, "accountName");
return (Criteria) this;
}
public Criteria andAccountNameLessThanOrEqualTo(String value) {
addCriterion("account_name <=", value, "accountName");
return (Criteria) this;
}
public Criteria andAccountNameLike(String value) {
addCriterion("account_name like", value, "accountName");
return (Criteria) this;
}
public Criteria andAccountNameNotLike(String value) {
addCriterion("account_name not like", value, "accountName");
return (Criteria) this;
}
public Criteria andAccountNameIn(List<String> values) {
addCriterion("account_name in", values, "accountName");
return (Criteria) this;
}
public Criteria andAccountNameNotIn(List<String> values) {
addCriterion("account_name not in", values, "accountName");
return (Criteria) this;
}
public Criteria andAccountNameBetween(String value1, String value2) {
addCriterion("account_name between", value1, value2, "accountName");
return (Criteria) this;
}
public Criteria andAccountNameNotBetween(String value1, String value2) {
addCriterion("account_name not between", value1, value2, "accountName");
return (Criteria) this;
}
public Criteria andTaxRateIsNull() {
addCriterion("tax_rate is null");
return (Criteria) this;
}
public Criteria andTaxRateIsNotNull() {
addCriterion("tax_rate is not null");
return (Criteria) this;
}
public Criteria andTaxRateEqualTo(BigDecimal value) {
addCriterion("tax_rate =", value, "taxRate");
return (Criteria) this;
}
public Criteria andTaxRateNotEqualTo(BigDecimal value) {
addCriterion("tax_rate <>", value, "taxRate");
return (Criteria) this;
}
public Criteria andTaxRateGreaterThan(BigDecimal value) {
addCriterion("tax_rate >", value, "taxRate");
return (Criteria) this;
}
public Criteria andTaxRateGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("tax_rate >=", value, "taxRate");
return (Criteria) this;
}
public Criteria andTaxRateLessThan(BigDecimal value) {
addCriterion("tax_rate <", value, "taxRate");
return (Criteria) this;
}
public Criteria andTaxRateLessThanOrEqualTo(BigDecimal value) {
addCriterion("tax_rate <=", value, "taxRate");
return (Criteria) this;
}
public Criteria andTaxRateIn(List<BigDecimal> values) {
addCriterion("tax_rate in", values, "taxRate");
return (Criteria) this;
}
public Criteria andTaxRateNotIn(List<BigDecimal> values) {
addCriterion("tax_rate not in", values, "taxRate");
return (Criteria) this;
}
public Criteria andTaxRateBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("tax_rate between", value1, value2, "taxRate");
return (Criteria) this;
}
public Criteria andTaxRateNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("tax_rate not between", value1, value2, "taxRate");
return (Criteria) this;
}
public Criteria andTaxBaseIsNull() {
addCriterion("tax_base is null");
return (Criteria) this;
}
public Criteria andTaxBaseIsNotNull() {
addCriterion("tax_base is not null");
return (Criteria) this;
}
public Criteria andTaxBaseEqualTo(Integer value) {
addCriterion("tax_base =", value, "taxBase");
return (Criteria) this;
}
public Criteria andTaxBaseNotEqualTo(Integer value) {
addCriterion("tax_base <>", value, "taxBase");
return (Criteria) this;
}
public Criteria andTaxBaseGreaterThan(Integer value) {
addCriterion("tax_base >", value, "taxBase");
return (Criteria) this;
}
public Criteria andTaxBaseGreaterThanOrEqualTo(Integer value) {
addCriterion("tax_base >=", value, "taxBase");
return (Criteria) this;
}
public Criteria andTaxBaseLessThan(Integer value) {
addCriterion("tax_base <", value, "taxBase");
return (Criteria) this;
}
public Criteria andTaxBaseLessThanOrEqualTo(Integer value) {
addCriterion("tax_base <=", value, "taxBase");
return (Criteria) this;
}
public Criteria andTaxBaseIn(List<Integer> values) {
addCriterion("tax_base in", values, "taxBase");
return (Criteria) this;
}
public Criteria andTaxBaseNotIn(List<Integer> values) {
addCriterion("tax_base not in", values, "taxBase");
return (Criteria) this;
}
public Criteria andTaxBaseBetween(Integer value1, Integer value2) {
addCriterion("tax_base between", value1, value2, "taxBase");
return (Criteria) this;
}
public Criteria andTaxBaseNotBetween(Integer value1, Integer value2) {
addCriterion("tax_base not between", value1, value2, "taxBase");
return (Criteria) this;
}
public Criteria andRevenueTypeIsNull() {
addCriterion("revenue_type is null");
return (Criteria) this;
}
public Criteria andRevenueTypeIsNotNull() {
addCriterion("revenue_type is not null");
return (Criteria) this;
}
public Criteria andRevenueTypeEqualTo(Integer value) {
addCriterion("revenue_type =", value, "revenueType");
return (Criteria) this;
}
public Criteria andRevenueTypeNotEqualTo(Integer value) {
addCriterion("revenue_type <>", value, "revenueType");
return (Criteria) this;
}
public Criteria andRevenueTypeGreaterThan(Integer value) {
addCriterion("revenue_type >", value, "revenueType");
return (Criteria) this;
}
public Criteria andRevenueTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("revenue_type >=", value, "revenueType");
return (Criteria) this;
}
public Criteria andRevenueTypeLessThan(Integer value) {
addCriterion("revenue_type <", value, "revenueType");
return (Criteria) this;
}
public Criteria andRevenueTypeLessThanOrEqualTo(Integer value) {
addCriterion("revenue_type <=", value, "revenueType");
return (Criteria) this;
}
public Criteria andRevenueTypeIn(List<Integer> values) {
addCriterion("revenue_type in", values, "revenueType");
return (Criteria) this;
}
public Criteria andRevenueTypeNotIn(List<Integer> values) {
addCriterion("revenue_type not in", values, "revenueType");
return (Criteria) this;
}
public Criteria andRevenueTypeBetween(Integer value1, Integer value2) {
addCriterion("revenue_type between", value1, value2, "revenueType");
return (Criteria) this;
}
public Criteria andRevenueTypeNotBetween(Integer value1, Integer value2) {
addCriterion("revenue_type not between", value1, value2, "revenueType");
return (Criteria) this;
}
public Criteria andTaxTypeIsNull() {
addCriterion("tax_type is null");
return (Criteria) this;
}
public Criteria andTaxTypeIsNotNull() {
addCriterion("tax_type is not null");
return (Criteria) this;
}
public Criteria andTaxTypeEqualTo(Integer value) {
addCriterion("tax_type =", value, "taxType");
return (Criteria) this;
}
public Criteria andTaxTypeNotEqualTo(Integer value) {
addCriterion("tax_type <>", value, "taxType");
return (Criteria) this;
}
public Criteria andTaxTypeGreaterThan(Integer value) {
addCriterion("tax_type >", value, "taxType");
return (Criteria) this;
}
public Criteria andTaxTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("tax_type >=", value, "taxType");
return (Criteria) this;
}
public Criteria andTaxTypeLessThan(Integer value) {
addCriterion("tax_type <", value, "taxType");
return (Criteria) this;
}
public Criteria andTaxTypeLessThanOrEqualTo(Integer value) {
addCriterion("tax_type <=", value, "taxType");
return (Criteria) this;
}
public Criteria andTaxTypeIn(List<Integer> values) {
addCriterion("tax_type in", values, "taxType");
return (Criteria) this;
}
public Criteria andTaxTypeNotIn(List<Integer> values) {
addCriterion("tax_type not in", values, "taxType");
return (Criteria) this;
}
public Criteria andTaxTypeBetween(Integer value1, Integer value2) {
addCriterion("tax_type between", value1, value2, "taxType");
return (Criteria) this;
}
public Criteria andTaxTypeNotBetween(Integer value1, Integer value2) {
addCriterion("tax_type not between", value1, value2, "taxType");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("`status` is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("`status` is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(Integer value) {
addCriterion("`status` =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(Integer value) {
addCriterion("`status` <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(Integer value) {
addCriterion("`status` >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
addCriterion("`status` >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(Integer value) {
addCriterion("`status` <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(Integer value) {
addCriterion("`status` <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<Integer> values) {
addCriterion("`status` in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<Integer> values) {
addCriterion("`status` not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(Integer value1, Integer value2) {
addCriterion("`status` between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(Integer value1, Integer value2) {
addCriterion("`status` not between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStartDateIsNull() {
addCriterion("start_date is null");
return (Criteria) this;
}
public Criteria andStartDateIsNotNull() {
addCriterion("start_date is not null");
return (Criteria) this;
}
public Criteria andStartDateEqualTo(String value) {
addCriterion("start_date =", value, "startDate");
return (Criteria) this;
}
public Criteria andStartDateNotEqualTo(String value) {
addCriterion("start_date <>", value, "startDate");
return (Criteria) this;
}
public Criteria andStartDateGreaterThan(String value) {
addCriterion("start_date >", value, "startDate");
return (Criteria) this;
}
public Criteria andStartDateGreaterThanOrEqualTo(String value) {
addCriterion("start_date >=", value, "startDate");
return (Criteria) this;
}
public Criteria andStartDateLessThan(String value) {
addCriterion("start_date <", value, "startDate");
return (Criteria) this;
}
public Criteria andStartDateLessThanOrEqualTo(String value) {
addCriterion("start_date <=", value, "startDate");
return (Criteria) this;
}
public Criteria andStartDateLike(String value) {
addCriterion("start_date like", value, "startDate");
return (Criteria) this;
}
public Criteria andStartDateNotLike(String value) {
addCriterion("start_date not like", value, "startDate");
return (Criteria) this;
}
public Criteria andStartDateIn(List<String> values) {
addCriterion("start_date in", values, "startDate");
return (Criteria) this;
}
public Criteria andStartDateNotIn(List<String> values) {
addCriterion("start_date not in", values, "startDate");
return (Criteria) this;
}
public Criteria andStartDateBetween(String value1, String value2) {
addCriterion("start_date between", value1, value2, "startDate");
return (Criteria) this;
}
public Criteria andStartDateNotBetween(String value1, String value2) {
addCriterion("start_date not between", value1, value2, "startDate");
return (Criteria) this;
}
public Criteria andEndDateIsNull() {
addCriterion("end_date is null");
return (Criteria) this;
}
public Criteria andEndDateIsNotNull() {
addCriterion("end_date is not null");
return (Criteria) this;
}
public Criteria andEndDateEqualTo(String value) {
addCriterion("end_date =", value, "endDate");
return (Criteria) this;
}
public Criteria andEndDateNotEqualTo(String value) {
addCriterion("end_date <>", value, "endDate");
return (Criteria) this;
}
public Criteria andEndDateGreaterThan(String value) {
addCriterion("end_date >", value, "endDate");
return (Criteria) this;
}
public Criteria andEndDateGreaterThanOrEqualTo(String value) {
addCriterion("end_date >=", value, "endDate");
return (Criteria) this;
}
public Criteria andEndDateLessThan(String value) {
addCriterion("end_date <", value, "endDate");
return (Criteria) this;
}
public Criteria andEndDateLessThanOrEqualTo(String value) {
addCriterion("end_date <=", value, "endDate");
return (Criteria) this;
}
public Criteria andEndDateLike(String value) {
addCriterion("end_date like", value, "endDate");
return (Criteria) this;
}
public Criteria andEndDateNotLike(String value) {
addCriterion("end_date not like", value, "endDate");
return (Criteria) this;
}
public Criteria andEndDateIn(List<String> values) {
addCriterion("end_date in", values, "endDate");
return (Criteria) this;
}
public Criteria andEndDateNotIn(List<String> values) {
addCriterion("end_date not in", values, "endDate");
return (Criteria) this;
}
public Criteria andEndDateBetween(String value1, String value2) {
addCriterion("end_date between", value1, value2, "endDate");
return (Criteria) this;
}
public Criteria andEndDateNotBetween(String value1, String value2) {
addCriterion("end_date not between", value1, value2, "endDate");
return (Criteria) this;
}
public Criteria andTbSegment3IsNull() {
addCriterion("tb_segment3 is null");
return (Criteria) this;
}
public Criteria andTbSegment3IsNotNull() {
addCriterion("tb_segment3 is not null");
return (Criteria) this;
}
public Criteria andTbSegment3EqualTo(String value) {
addCriterion("tb_segment3 =", value, "tbSegment3");
return (Criteria) this;
}
public Criteria andTbSegment3NotEqualTo(String value) {
addCriterion("tb_segment3 <>", value, "tbSegment3");
return (Criteria) this;
}
public Criteria andTbSegment3GreaterThan(String value) {
addCriterion("tb_segment3 >", value, "tbSegment3");
return (Criteria) this;
}
public Criteria andTbSegment3GreaterThanOrEqualTo(String value) {
addCriterion("tb_segment3 >=", value, "tbSegment3");
return (Criteria) this;
}
public Criteria andTbSegment3LessThan(String value) {
addCriterion("tb_segment3 <", value, "tbSegment3");
return (Criteria) this;
}
public Criteria andTbSegment3LessThanOrEqualTo(String value) {
addCriterion("tb_segment3 <=", value, "tbSegment3");
return (Criteria) this;
}
public Criteria andTbSegment3Like(String value) {
addCriterion("tb_segment3 like", value, "tbSegment3");
return (Criteria) this;
}
public Criteria andTbSegment3NotLike(String value) {
addCriterion("tb_segment3 not like", value, "tbSegment3");
return (Criteria) this;
}
public Criteria andTbSegment3In(List<String> values) {
addCriterion("tb_segment3 in", values, "tbSegment3");
return (Criteria) this;
}
public Criteria andTbSegment3NotIn(List<String> values) {
addCriterion("tb_segment3 not in", values, "tbSegment3");
return (Criteria) this;
}
public Criteria andTbSegment3Between(String value1, String value2) {
addCriterion("tb_segment3 between", value1, value2, "tbSegment3");
return (Criteria) this;
}
public Criteria andTbSegment3NotBetween(String value1, String value2) {
addCriterion("tb_segment3 not between", value1, value2, "tbSegment3");
return (Criteria) this;
}
public Criteria andTbSegment5IsNull() {
addCriterion("tb_segment5 is null");
return (Criteria) this;
}
public Criteria andTbSegment5IsNotNull() {
addCriterion("tb_segment5 is not null");
return (Criteria) this;
}
public Criteria andTbSegment5EqualTo(String value) {
addCriterion("tb_segment5 =", value, "tbSegment5");
return (Criteria) this;
}
public Criteria andTbSegment5NotEqualTo(String value) {
addCriterion("tb_segment5 <>", value, "tbSegment5");
return (Criteria) this;
}
public Criteria andTbSegment5GreaterThan(String value) {
addCriterion("tb_segment5 >", value, "tbSegment5");
return (Criteria) this;
}
public Criteria andTbSegment5GreaterThanOrEqualTo(String value) {
addCriterion("tb_segment5 >=", value, "tbSegment5");
return (Criteria) this;
}
public Criteria andTbSegment5LessThan(String value) {
addCriterion("tb_segment5 <", value, "tbSegment5");
return (Criteria) this;
}
public Criteria andTbSegment5LessThanOrEqualTo(String value) {
addCriterion("tb_segment5 <=", value, "tbSegment5");
return (Criteria) this;
}
public Criteria andTbSegment5Like(String value) {
addCriterion("tb_segment5 like", value, "tbSegment5");
return (Criteria) this;
}
public Criteria andTbSegment5NotLike(String value) {
addCriterion("tb_segment5 not like", value, "tbSegment5");
return (Criteria) this;
}
public Criteria andTbSegment5In(List<String> values) {
addCriterion("tb_segment5 in", values, "tbSegment5");
return (Criteria) this;
}
public Criteria andTbSegment5NotIn(List<String> values) {
addCriterion("tb_segment5 not in", values, "tbSegment5");
return (Criteria) this;
}
public Criteria andTbSegment5Between(String value1, String value2) {
addCriterion("tb_segment5 between", value1, value2, "tbSegment5");
return (Criteria) this;
}
public Criteria andTbSegment5NotBetween(String value1, String value2) {
addCriterion("tb_segment5 not between", value1, value2, "tbSegment5");
return (Criteria) this;
}
public Criteria andTbSegment6IsNull() {
addCriterion("tb_segment6 is null");
return (Criteria) this;
}
public Criteria andTbSegment6IsNotNull() {
addCriterion("tb_segment6 is not null");
return (Criteria) this;
}
public Criteria andTbSegment6EqualTo(String value) {
addCriterion("tb_segment6 =", value, "tbSegment6");
return (Criteria) this;
}
public Criteria andTbSegment6NotEqualTo(String value) {
addCriterion("tb_segment6 <>", value, "tbSegment6");
return (Criteria) this;
}
public Criteria andTbSegment6GreaterThan(String value) {
addCriterion("tb_segment6 >", value, "tbSegment6");
return (Criteria) this;
}
public Criteria andTbSegment6GreaterThanOrEqualTo(String value) {
addCriterion("tb_segment6 >=", value, "tbSegment6");
return (Criteria) this;
}
public Criteria andTbSegment6LessThan(String value) {
addCriterion("tb_segment6 <", value, "tbSegment6");
return (Criteria) this;
}
public Criteria andTbSegment6LessThanOrEqualTo(String value) {
addCriterion("tb_segment6 <=", value, "tbSegment6");
return (Criteria) this;
}
public Criteria andTbSegment6Like(String value) {
addCriterion("tb_segment6 like", value, "tbSegment6");
return (Criteria) this;
}
public Criteria andTbSegment6NotLike(String value) {
addCriterion("tb_segment6 not like", value, "tbSegment6");
return (Criteria) this;
}
public Criteria andTbSegment6In(List<String> values) {
addCriterion("tb_segment6 in", values, "tbSegment6");
return (Criteria) this;
}
public Criteria andTbSegment6NotIn(List<String> values) {
addCriterion("tb_segment6 not in", values, "tbSegment6");
return (Criteria) this;
}
public Criteria andTbSegment6Between(String value1, String value2) {
addCriterion("tb_segment6 between", value1, value2, "tbSegment6");
return (Criteria) this;
}
public Criteria andTbSegment6NotBetween(String value1, String value2) {
addCriterion("tb_segment6 not between", value1, value2, "tbSegment6");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateByIsNull() {
addCriterion("update_by is null");
return (Criteria) this;
}
public Criteria andUpdateByIsNotNull() {
addCriterion("update_by is not null");
return (Criteria) this;
}
public Criteria andUpdateByEqualTo(String value) {
addCriterion("update_by =", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotEqualTo(String value) {
addCriterion("update_by <>", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByGreaterThan(String value) {
addCriterion("update_by >", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByGreaterThanOrEqualTo(String value) {
addCriterion("update_by >=", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLessThan(String value) {
addCriterion("update_by <", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLessThanOrEqualTo(String value) {
addCriterion("update_by <=", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLike(String value) {
addCriterion("update_by like", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotLike(String value) {
addCriterion("update_by not like", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByIn(List<String> values) {
addCriterion("update_by in", values, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotIn(List<String> values) {
addCriterion("update_by not in", values, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByBetween(String value1, String value2) {
addCriterion("update_by between", value1, value2, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotBetween(String value1, String value2) {
addCriterion("update_by not between", value1, value2, "updateBy");
return (Criteria) this;
}
public Criteria andCreateByIsNull() {
addCriterion("create_by is null");
return (Criteria) this;
}
public Criteria andCreateByIsNotNull() {
addCriterion("create_by is not null");
return (Criteria) this;
}
public Criteria andCreateByEqualTo(String value) {
addCriterion("create_by =", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotEqualTo(String value) {
addCriterion("create_by <>", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByGreaterThan(String value) {
addCriterion("create_by >", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByGreaterThanOrEqualTo(String value) {
addCriterion("create_by >=", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLessThan(String value) {
addCriterion("create_by <", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLessThanOrEqualTo(String value) {
addCriterion("create_by <=", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLike(String value) {
addCriterion("create_by like", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotLike(String value) {
addCriterion("create_by not like", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByIn(List<String> values) {
addCriterion("create_by in", values, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotIn(List<String> values) {
addCriterion("create_by not in", values, "createBy");
return (Criteria) this;
}
public Criteria andCreateByBetween(String value1, String value2) {
addCriterion("create_by between", value1, value2, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotBetween(String value1, String value2) {
addCriterion("create_by not between", value1, value2, "createBy");
return (Criteria) this;
}
public Criteria andBaseCrCodeIsNull() {
addCriterion("base_cr_code is null");
return (Criteria) this;
}
public Criteria andBaseCrCodeIsNotNull() {
addCriterion("base_cr_code is not null");
return (Criteria) this;
}
public Criteria andBaseCrCodeEqualTo(String value) {
addCriterion("base_cr_code =", value, "baseCrCode");
return (Criteria) this;
}
public Criteria andBaseCrCodeNotEqualTo(String value) {
addCriterion("base_cr_code <>", value, "baseCrCode");
return (Criteria) this;
}
public Criteria andBaseCrCodeGreaterThan(String value) {
addCriterion("base_cr_code >", value, "baseCrCode");
return (Criteria) this;
}
public Criteria andBaseCrCodeGreaterThanOrEqualTo(String value) {
addCriterion("base_cr_code >=", value, "baseCrCode");
return (Criteria) this;
}
public Criteria andBaseCrCodeLessThan(String value) {
addCriterion("base_cr_code <", value, "baseCrCode");
return (Criteria) this;
}
public Criteria andBaseCrCodeLessThanOrEqualTo(String value) {
addCriterion("base_cr_code <=", value, "baseCrCode");
return (Criteria) this;
}
public Criteria andBaseCrCodeLike(String value) {
addCriterion("base_cr_code like", value, "baseCrCode");
return (Criteria) this;
}
public Criteria andBaseCrCodeNotLike(String value) {
addCriterion("base_cr_code not like", value, "baseCrCode");
return (Criteria) this;
}
public Criteria andBaseCrCodeIn(List<String> values) {
addCriterion("base_cr_code in", values, "baseCrCode");
return (Criteria) this;
}
public Criteria andBaseCrCodeNotIn(List<String> values) {
addCriterion("base_cr_code not in", values, "baseCrCode");
return (Criteria) this;
}
public Criteria andBaseCrCodeBetween(String value1, String value2) {
addCriterion("base_cr_code between", value1, value2, "baseCrCode");
return (Criteria) this;
}
public Criteria andBaseCrCodeNotBetween(String value1, String value2) {
addCriterion("base_cr_code not between", value1, value2, "baseCrCode");
return (Criteria) this;
}
public Criteria andBaseDrCodeIsNull() {
addCriterion("base_dr_code is null");
return (Criteria) this;
}
public Criteria andBaseDrCodeIsNotNull() {
addCriterion("base_dr_code is not null");
return (Criteria) this;
}
public Criteria andBaseDrCodeEqualTo(String value) {
addCriterion("base_dr_code =", value, "baseDrCode");
return (Criteria) this;
}
public Criteria andBaseDrCodeNotEqualTo(String value) {
addCriterion("base_dr_code <>", value, "baseDrCode");
return (Criteria) this;
}
public Criteria andBaseDrCodeGreaterThan(String value) {
addCriterion("base_dr_code >", value, "baseDrCode");
return (Criteria) this;
}
public Criteria andBaseDrCodeGreaterThanOrEqualTo(String value) {
addCriterion("base_dr_code >=", value, "baseDrCode");
return (Criteria) this;
}
public Criteria andBaseDrCodeLessThan(String value) {
addCriterion("base_dr_code <", value, "baseDrCode");
return (Criteria) this;
}
public Criteria andBaseDrCodeLessThanOrEqualTo(String value) {
addCriterion("base_dr_code <=", value, "baseDrCode");
return (Criteria) this;
}
public Criteria andBaseDrCodeLike(String value) {
addCriterion("base_dr_code like", value, "baseDrCode");
return (Criteria) this;
}
public Criteria andBaseDrCodeNotLike(String value) {
addCriterion("base_dr_code not like", value, "baseDrCode");
return (Criteria) this;
}
public Criteria andBaseDrCodeIn(List<String> values) {
addCriterion("base_dr_code in", values, "baseDrCode");
return (Criteria) this;
}
public Criteria andBaseDrCodeNotIn(List<String> values) {
addCriterion("base_dr_code not in", values, "baseDrCode");
return (Criteria) this;
}
public Criteria andBaseDrCodeBetween(String value1, String value2) {
addCriterion("base_dr_code between", value1, value2, "baseDrCode");
return (Criteria) this;
}
public Criteria andBaseDrCodeNotBetween(String value1, String value2) {
addCriterion("base_dr_code not between", value1, value2, "baseDrCode");
return (Criteria) this;
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table revenue_config
*
* @mbg.generated do_not_delete_during_merge
*/
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table revenue_config
*
* @mbg.generated
*/
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pwc.taxtech.atms.vat.dao.RevenueConfigMapper">
<resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.RevenueConfig">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="serial_no" jdbcType="VARCHAR" property="serialNo" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="org_id" jdbcType="VARCHAR" property="orgId" />
<result column="account_type" jdbcType="TINYINT" property="accountType" />
<result column="account_name" jdbcType="VARCHAR" property="accountName" />
<result column="tax_rate" jdbcType="DECIMAL" property="taxRate" />
<result column="tax_base" jdbcType="TINYINT" property="taxBase" />
<result column="revenue_type" jdbcType="TINYINT" property="revenueType" />
<result column="tax_type" jdbcType="TINYINT" property="taxType" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="start_date" jdbcType="VARCHAR" property="startDate" />
<result column="end_date" jdbcType="VARCHAR" property="endDate" />
<result column="tb_segment3" jdbcType="VARCHAR" property="tbSegment3" />
<result column="tb_segment5" jdbcType="VARCHAR" property="tbSegment5" />
<result column="tb_segment6" jdbcType="VARCHAR" property="tbSegment6" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="base_cr_code" jdbcType="VARCHAR" property="baseCrCode" />
<result column="base_dr_code" jdbcType="VARCHAR" property="baseDrCode" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, serial_no, `name`, org_id, account_type, account_name, tax_rate, tax_base, revenue_type,
tax_type, `status`, start_date, end_date, tb_segment3, tb_segment5, tb_segment6,
update_time, create_time, update_by, create_by, base_cr_code, base_dr_code
</sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.RevenueConfigExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from revenue_config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from revenue_config
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from revenue_config
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.RevenueConfigExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from revenue_config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.RevenueConfig">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into revenue_config (id, serial_no, `name`,
org_id, account_type, account_name,
tax_rate, tax_base, revenue_type,
tax_type, `status`, start_date,
end_date, tb_segment3, tb_segment5,
tb_segment6, update_time, create_time,
update_by, create_by, base_cr_code,
base_dr_code)
values (#{id,jdbcType=BIGINT}, #{serialNo,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{orgId,jdbcType=VARCHAR}, #{accountType,jdbcType=TINYINT}, #{accountName,jdbcType=VARCHAR},
#{taxRate,jdbcType=DECIMAL}, #{taxBase,jdbcType=TINYINT}, #{revenueType,jdbcType=TINYINT},
#{taxType,jdbcType=TINYINT}, #{status,jdbcType=TINYINT}, #{startDate,jdbcType=VARCHAR},
#{endDate,jdbcType=VARCHAR}, #{tbSegment3,jdbcType=VARCHAR}, #{tbSegment5,jdbcType=VARCHAR},
#{tbSegment6,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
#{updateBy,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{baseCrCode,jdbcType=VARCHAR},
#{baseDrCode,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.RevenueConfig">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into revenue_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="serialNo != null">
serial_no,
</if>
<if test="name != null">
`name`,
</if>
<if test="orgId != null">
org_id,
</if>
<if test="accountType != null">
account_type,
</if>
<if test="accountName != null">
account_name,
</if>
<if test="taxRate != null">
tax_rate,
</if>
<if test="taxBase != null">
tax_base,
</if>
<if test="revenueType != null">
revenue_type,
</if>
<if test="taxType != null">
tax_type,
</if>
<if test="status != null">
`status`,
</if>
<if test="startDate != null">
start_date,
</if>
<if test="endDate != null">
end_date,
</if>
<if test="tbSegment3 != null">
tb_segment3,
</if>
<if test="tbSegment5 != null">
tb_segment5,
</if>
<if test="tbSegment6 != null">
tb_segment6,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="baseCrCode != null">
base_cr_code,
</if>
<if test="baseDrCode != null">
base_dr_code,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="serialNo != null">
#{serialNo,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="orgId != null">
#{orgId,jdbcType=VARCHAR},
</if>
<if test="accountType != null">
#{accountType,jdbcType=TINYINT},
</if>
<if test="accountName != null">
#{accountName,jdbcType=VARCHAR},
</if>
<if test="taxRate != null">
#{taxRate,jdbcType=DECIMAL},
</if>
<if test="taxBase != null">
#{taxBase,jdbcType=TINYINT},
</if>
<if test="revenueType != null">
#{revenueType,jdbcType=TINYINT},
</if>
<if test="taxType != null">
#{taxType,jdbcType=TINYINT},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="startDate != null">
#{startDate,jdbcType=VARCHAR},
</if>
<if test="endDate != null">
#{endDate,jdbcType=VARCHAR},
</if>
<if test="tbSegment3 != null">
#{tbSegment3,jdbcType=VARCHAR},
</if>
<if test="tbSegment5 != null">
#{tbSegment5,jdbcType=VARCHAR},
</if>
<if test="tbSegment6 != null">
#{tbSegment6,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="baseCrCode != null">
#{baseCrCode,jdbcType=VARCHAR},
</if>
<if test="baseDrCode != null">
#{baseDrCode,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.RevenueConfigExample" resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from revenue_config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update revenue_config
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.serialNo != null">
serial_no = #{record.serialNo,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.orgId != null">
org_id = #{record.orgId,jdbcType=VARCHAR},
</if>
<if test="record.accountType != null">
account_type = #{record.accountType,jdbcType=TINYINT},
</if>
<if test="record.accountName != null">
account_name = #{record.accountName,jdbcType=VARCHAR},
</if>
<if test="record.taxRate != null">
tax_rate = #{record.taxRate,jdbcType=DECIMAL},
</if>
<if test="record.taxBase != null">
tax_base = #{record.taxBase,jdbcType=TINYINT},
</if>
<if test="record.revenueType != null">
revenue_type = #{record.revenueType,jdbcType=TINYINT},
</if>
<if test="record.taxType != null">
tax_type = #{record.taxType,jdbcType=TINYINT},
</if>
<if test="record.status != null">
`status` = #{record.status,jdbcType=TINYINT},
</if>
<if test="record.startDate != null">
start_date = #{record.startDate,jdbcType=VARCHAR},
</if>
<if test="record.endDate != null">
end_date = #{record.endDate,jdbcType=VARCHAR},
</if>
<if test="record.tbSegment3 != null">
tb_segment3 = #{record.tbSegment3,jdbcType=VARCHAR},
</if>
<if test="record.tbSegment5 != null">
tb_segment5 = #{record.tbSegment5,jdbcType=VARCHAR},
</if>
<if test="record.tbSegment6 != null">
tb_segment6 = #{record.tbSegment6,jdbcType=VARCHAR},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateBy != null">
update_by = #{record.updateBy,jdbcType=VARCHAR},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if test="record.baseCrCode != null">
base_cr_code = #{record.baseCrCode,jdbcType=VARCHAR},
</if>
<if test="record.baseDrCode != null">
base_dr_code = #{record.baseDrCode,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update revenue_config
set id = #{record.id,jdbcType=BIGINT},
serial_no = #{record.serialNo,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
org_id = #{record.orgId,jdbcType=VARCHAR},
account_type = #{record.accountType,jdbcType=TINYINT},
account_name = #{record.accountName,jdbcType=VARCHAR},
tax_rate = #{record.taxRate,jdbcType=DECIMAL},
tax_base = #{record.taxBase,jdbcType=TINYINT},
revenue_type = #{record.revenueType,jdbcType=TINYINT},
tax_type = #{record.taxType,jdbcType=TINYINT},
`status` = #{record.status,jdbcType=TINYINT},
start_date = #{record.startDate,jdbcType=VARCHAR},
end_date = #{record.endDate,jdbcType=VARCHAR},
tb_segment3 = #{record.tbSegment3,jdbcType=VARCHAR},
tb_segment5 = #{record.tbSegment5,jdbcType=VARCHAR},
tb_segment6 = #{record.tbSegment6,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_by = #{record.updateBy,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
base_cr_code = #{record.baseCrCode,jdbcType=VARCHAR},
base_dr_code = #{record.baseDrCode,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.RevenueConfig">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update revenue_config
<set>
<if test="serialNo != null">
serial_no = #{serialNo,jdbcType=VARCHAR},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="orgId != null">
org_id = #{orgId,jdbcType=VARCHAR},
</if>
<if test="accountType != null">
account_type = #{accountType,jdbcType=TINYINT},
</if>
<if test="accountName != null">
account_name = #{accountName,jdbcType=VARCHAR},
</if>
<if test="taxRate != null">
tax_rate = #{taxRate,jdbcType=DECIMAL},
</if>
<if test="taxBase != null">
tax_base = #{taxBase,jdbcType=TINYINT},
</if>
<if test="revenueType != null">
revenue_type = #{revenueType,jdbcType=TINYINT},
</if>
<if test="taxType != null">
tax_type = #{taxType,jdbcType=TINYINT},
</if>
<if test="status != null">
`status` = #{status,jdbcType=TINYINT},
</if>
<if test="startDate != null">
start_date = #{startDate,jdbcType=VARCHAR},
</if>
<if test="endDate != null">
end_date = #{endDate,jdbcType=VARCHAR},
</if>
<if test="tbSegment3 != null">
tb_segment3 = #{tbSegment3,jdbcType=VARCHAR},
</if>
<if test="tbSegment5 != null">
tb_segment5 = #{tbSegment5,jdbcType=VARCHAR},
</if>
<if test="tbSegment6 != null">
tb_segment6 = #{tbSegment6,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="baseCrCode != null">
base_cr_code = #{baseCrCode,jdbcType=VARCHAR},
</if>
<if test="baseDrCode != null">
base_dr_code = #{baseDrCode,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.RevenueConfig">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update revenue_config
set serial_no = #{serialNo,jdbcType=VARCHAR},
`name` = #{name,jdbcType=VARCHAR},
org_id = #{orgId,jdbcType=VARCHAR},
account_type = #{accountType,jdbcType=TINYINT},
account_name = #{accountName,jdbcType=VARCHAR},
tax_rate = #{taxRate,jdbcType=DECIMAL},
tax_base = #{taxBase,jdbcType=TINYINT},
revenue_type = #{revenueType,jdbcType=TINYINT},
tax_type = #{taxType,jdbcType=TINYINT},
`status` = #{status,jdbcType=TINYINT},
start_date = #{startDate,jdbcType=VARCHAR},
end_date = #{endDate,jdbcType=VARCHAR},
tb_segment3 = #{tbSegment3,jdbcType=VARCHAR},
tb_segment5 = #{tbSegment5,jdbcType=VARCHAR},
tb_segment6 = #{tbSegment6,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
base_cr_code = #{baseCrCode,jdbcType=VARCHAR},
base_dr_code = #{baseDrCode,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.RevenueConfigExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from revenue_config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
</mapper>
\ No newline at end of file
......@@ -35,6 +35,13 @@
where
<include refid="QueryCondition"/>
</select>
<select id="selectCountByCondition" parameterType="pwc.taxtech.atms.vat.dpo.CashFlowCondition" resultType="Integer">
select
count(*)
from cash_flow
where
<include refid="QueryCondition"/>
</select>
<insert id="insertBatch" parameterType="java.util.List">
insert into cash_flow
......
......@@ -928,7 +928,7 @@ constant.outputTaxRate = ['17%', '13%', '11%', '6%', '5%', '3%', '1.5%', '0%', '
constant.AccountMappingProcessKey = {UnSelected: 'UnSelected', Submit: 'Submit', Undo: 'Undo'}
constant.pagesize = 100;
constant.pagesize = 50;
constant.ErpCheckType = {
CustomInvoice_DuplicatePayNum: 20
......
webservices.factory('vatPreviewService', ['$http', 'apiConfig', function ($http, apiConfig) {
webservices.factory('vatPreviewService', ['$http', 'apiConfig','FileSaver', function ($http, apiConfig,FileSaver) {
'use strict';
return {
sample: function () {
......@@ -189,8 +189,14 @@
getCFDataForDisplay: function (queryParams) {
return $http.post('/dataPreview/getCFDataForDisplay', queryParams, apiConfig.createVat());
},
initExportCFData: function (queryParams) {
return $http.post('/dataPreview/exportCFData/get', queryParams, apiConfig.create({ responseType: 'arraybuffer' }));
//服务器导出
initExportCFData: function (queryParm, fileName) {
var thisConfig = apiConfig.create();
thisConfig.responseType = "arraybuffer";
return $http.post('/dataPreview/exportCFData/get', queryParm, thisConfig).then(function (response) {
var data = new Blob([response.data], {type: response.headers('Content-Type')});
FileSaver.saveAs(data, fileName + '.xlsx');
});
},
getPLDataForDisplay: function (queryParams) {
return $http.post('/dataPreview/getPLDataForDisplay', queryParams, apiConfig.createVat());
......
......@@ -18,14 +18,6 @@
[vatSessionService.month, vatSessionService.project.year],
[vatSessionService.month, vatSessionService.project.year]];
//发票类型
var invoiceTypeEnum = {
VATInvoice: $translate.instant('VATInvoice'),
FreightTransport: $translate.instant('FreightTransport'),
MotorVehicle: $translate.instant('MotorVehicle'),
AgriculturalProduct: $translate.instant('AgriculturalProduct')
};
$scope.monthList = [$translate.instant('Month01'),
$translate.instant('Month02'),
$translate.instant('Month03'),
......@@ -40,13 +32,6 @@
$translate.instant('Month12')
];
//认证结果
$scope.cetificationResultList = [
{ id: 999, name: $translate.instant('AllTheItems') },
{ id: 1, name: $translate.instant('CertificationPass') },
{ id: 2, name: $translate.instant('CertificationNotPass') }
];
//发票类型
$scope.invoiceTypeList = [
{ id: 999, name: $translate.instant('AllTheItems') },
......@@ -56,7 +41,6 @@
{ id: enums.invoiceType.AgriculturalProduct, name: $translate.instant('AgriculturalProduct') }
];
$scope.InvoiceType = {};
$scope.CertificationStatus = {};
......@@ -71,27 +55,6 @@
};
};
// var countTotal = function(){
// $scope.queryParams.pageInfo = {
// totalCount: -1,
// pageIndex: 1,
// pageSize: -1,
// totalPage: 0,
// };
// // vatPreviewService.queryInputInvoiceAllList($scope.queryParams).success(function (data) {
// // if (data) {
// // var totalMoneyAmount = 0;
// // var totalTaxAmount = 0;
// // _.each(data, function (x) {
// // totalMoneyAmount = totalMoneyAmount + parseFloat(x.hjje.replace(/,/g, ""));
// // totalTaxAmount = totalTaxAmount + parseFloat(x.hjse.replace(/,/g, ""));
// // })
// // $scope.totalMoneyAmount = totalMoneyAmount.toLocaleString();
// // $scope.totalTaxAmount = totalTaxAmount.toLocaleString();
// // }
// // });
// };
//从数据库中load数据
var loadIncomeInvoiceItemDataFromDB = function (pageIndex) {
initIncomeInvoiceItemPagination();
......@@ -100,13 +63,12 @@
//初始化查询信息
$scope.queryParams.pageInfo = {
totalCount: $scope.queryIncomeInvoiceItemResult.pageInfo.totalCount,
totalCount: $scope.queryIncomeInvoiceItemResult.pageInfo.total,
pageIndex: pageIndex,
pageSize: $scope.queryIncomeInvoiceItemResult.pageInfo.pageSize,
pageSize: constant.pagesize,
totalPage: 0,
};
vatPreviewService.getCFDataForDisplay($scope.queryParams).success(function (data) {
if (data) {
if(data.list.length>0){
......@@ -132,15 +94,16 @@
if ($scope.queryIncomeInvoiceItemResult.pageInfo && $scope.queryIncomeInvoiceItemResult.pageInfo.total > 0) {
var totalPage = parseInt($scope.queryIncomeInvoiceItemResult.pageInfo.total / $scope.queryIncomeInvoiceItemResult.pageInfo.pageSize);
totalPage = $scope.queryIncomeInvoiceItemResult.pageInfo.totalCount % $scope.queryIncomeInvoiceItemResult.pageInfo.pageSize == 0 ? totalPage : totalPage + 1;
var totalPage = parseInt($scope.queryIncomeInvoiceItemResult.pageInfo.total / constant.pagesize);
totalPage = $scope.queryIncomeInvoiceItemResult.pageInfo.total % constant.pagesize == 0 ? totalPage : totalPage + 1;
//计算本页记录数
if ($scope.queryIncomeInvoiceItemResult.pageInfo.pageNum === totalPage) {
$scope.curPageItemCount = $scope.queryIncomeInvoiceItemResult.pageInfo.total % $scope.queryIncomeInvoiceItemResult.pageInfo.pageSize;
var pageItemCount=$scope.queryIncomeInvoiceItemResult.pageInfo.total % constant.pagesize;
$scope.curPageItemCount = pageItemCount == 0 ? constant.pagesize : pageItemCount;
}
else {
$scope.curPageItemCount = $scope.queryIncomeInvoiceItemResult.pageInfo.pageSize;
$scope.curPageItemCount = constant.pagesize;
}
$scope.queryIncomeInvoiceItemResult.pageInfo.totalPage = totalPage;
......@@ -185,264 +148,6 @@
$scope.curIncomeInvoiceItemPage = 1;
};
//将选择了的查询条件显示在grid上方
var doDataFilter = function (removeData) {
if ($scope.queryParams.periodStart > $scope.queryParams.periodEnd) {
$scope.queryParams.periodEnd = $scope.queryParams.periodStart;
}
//设置需要去掉的查询条件的值为空
if (!PWC.isNullOrEmpty(removeData)) {
var removeItem = removeData.split("|");
removeItem.forEach(function (v) {
$scope.queryParams[v] = null;
//如果去掉了发票代码的查询条件,则将查询条件设置为'',因为是字符串,设置为null会导致查询结果错误
if ($scope.queryParams.invoiceCode === null) {
$scope.queryParams.invoiceCode = '';
}
//如果去掉了发票号码的查询条件,则将查询条件设置为'',因为是字符串,设置为null会导致查询结果错误
if ($scope.queryParams.invoiceNumber === null) {
$scope.queryParams.invoiceNumber = '';
}
//如果去掉了供货方税号的查询条件,则将查询条件设置为'',因为是字符串,设置为null会导致查询结果错误
if ($scope.queryParams.sellerTaxNumber === null) {
$scope.queryParams.sellerTaxNumber = '';
}
if ($scope.queryParams.invoiceType === null) {
$scope.InvoiceType.selected = undefined;
}
if ($scope.queryParams.certificationStatus === null) {
$scope.CertificationStatus.selected = undefined;
}
});
}
//设置发票类型和认证结果
if ($scope.InvoiceType.selected !== undefined)
$scope.queryParams.invoiceType = $scope.InvoiceType.selected.id;
else
$scope.queryParams.invoiceType = null;
if ($scope.CertificationStatus.selected !== undefined)
$scope.queryParams.certificationStatus = $scope.CertificationStatus.selected.id;
else
$scope.queryParams.certificationStatus = null;
// 将查询条件加入到grid上方
var crits = $scope.queryParams;
//定义查询条件数组用于存放已选的查询条件
$scope.criteriaList = [];
var crit = [];
//认证日期
if (!PWC.isNullOrEmpty(crits.certificationDateStart) && !PWC.isNullOrEmpty(crits.certificationDateEnd)) {
if (new Date(crits.certificationDateStart.replace(/[\.-]/g, '/')) > new Date(crits.certificationDateEnd.replace(/[\.-]/g, '/'))) {
$scope.criteriaList = [];
SweetAlert.warning($translate.instant('InvoiceDateQueryError'));
return;
}
crit = new Object;
crit.name = $translate.instant('InvoiceRZRQQuery') + crits.certificationDateStart + "-" + crits.certificationDateEnd;;
crit.fullName = $translate.instant('InvoiceRZRQQuery') + crits.certificationDateStart + "-" + crits.certificationDateEnd;
crit.valueFrom = crits.certificationDateStart;
crit.valueTo = crits.certificationDateEnd;
crit.propertyName = "certificationDateStart|certificationDateEnd";
$scope.criteriaList.push(crit);
} else if (!PWC.isNullOrEmpty(crits.certificationDateStart) && PWC.isNullOrEmpty(crits.invoiceDateEnd)) {
crit = new Object;
crit.name = $translate.instant('InvoiceRZRQQuery') + crits.certificationDateStart + $translate.instant('After');
crit.fullName = $translate.instant('InvoiceRZRQQuery') + crits.certificationDateStart + $translate.instant('After');
crit.valueFrom = crits.certificationDateStart;
crit.valueTo = crits.certificationDateEnd;
crit.propertyName = "certificationDateStart|certificationDateEnd";
$scope.criteriaList.push(crit);
}
else if (PWC.isNullOrEmpty(crits.certificationDateStart) && !PWC.isNullOrEmpty(crits.certificationDateEnd)) {
crit = new Object;
crit.name = $translate.instant('InvoiceRZRQQuery') + crits.certificationDateEnd + $translate.instant('Before');
crit.fullName = $translate.instant('InvoiceRZRQQuery') + crits.certificationDateEnd + $translate.instant('Before');
crit.valueFrom = crits.certificationDateStart;
crit.valueTo = crits.certificationDateEnd;
crit.propertyName = "certificationDateStart|certificationDateEnd";
$scope.criteriaList.push(crit);
}
//发票代码
if (!PWC.isNullOrEmpty(crits.invoiceCode)) {
crit = new Object;
crit.name = $translate.instant('InvoiceFPDMQuery') + PWC.limitString(crits.invoiceCode, 10);
crit.fullName = $translate.instant('InvoiceFPDMQuery') + crits.invoiceCode;
crit.valueFrom = crits.invoiceCode;
crit.propertyName = "invoiceCode";
$scope.criteriaList.push(crit);
}
//发票号码
if (!PWC.isNullOrEmpty(crits.invoiceNumber)) {
crit = new Object;
crit.name = $translate.instant('InvoiceFPHMQuery') + PWC.limitString(crits.invoiceNumber, 10);
crit.fullName = $translate.instant('InvoiceFPHMQuery') + crits.invoiceNumber;
crit.valueFrom = crits.invoiceNumber;
crit.propertyName = "invoiceNumber";
$scope.criteriaList.push(crit);
}
//销方识别号
if (!PWC.isNullOrEmpty(crits.sellerTaxNumber)) {
crit = new Object;
crit.name = $translate.instant('InvoiceGHFSHQuery') + PWC.limitString(crits.sellerTaxNumber, 10);
crit.fullName = $translate.instant('InvoiceGHFSHQuery') + crits.sellerTaxNumber;
crit.valueFrom = crits.sellerTaxNumber;
crit.propertyName = "sellerTaxNumber";
$scope.criteriaList.push(crit);
}
//金额
if (!PWC.isNullOrEmpty(crits.amountStart) && !PWC.isNullOrEmpty(crits.amountEnd)) {
if (Number(crits.amountStart) > Number(crits.amountEnd)) {
SweetAlert.warning($translate.instant('AmountQueryError'));
return;
}
crit = new Object;
crit.name = $translate.instant('InvoiceJEQuery') + PWC.limitString(crits.amountStart, 5) + ' - ' + PWC.limitString(crits.amountEnd, 5);
crit.fullName = $translate.instant('InvoiceJEQuery') + crits.amountStart + ' - ' + crits.amountEnd;
crit.valueFrom = crits.amountStart;
crit.valueTo = crits.amountEnd;
crit.propertyName = "amountStart|amountEnd";
$scope.criteriaList.push(crit);
}
else if (!PWC.isNullOrEmpty(crits.amountStart) && PWC.isNullOrEmpty(crits.amountEnd)) {
crit = new Object;
crit.name = $translate.instant('InvoiceJEQuery') + PWC.limitString(crits.amountStart, 5) + $translate.instant('MoreThan');
crit.fullName = $translate.instant('InvoiceJEQuery') + crits.amountStart + $translate.instant('MoreThan');
crit.valueFrom = crits.amountStart;
crit.valueTo = crits.amountEnd;
crit.propertyName = "amountStart|amountEnd";
$scope.criteriaList.push(crit);
}
else if (PWC.isNullOrEmpty(crits.amountStart) && !PWC.isNullOrEmpty(crits.amountEnd)) {
crit = new Object;
crit.name = $translate.instant('InvoiceJEQuery') + PWC.limitString(crits.amountEnd, 5) + $translate.instant('LessThan');
crit.fullName = $translate.instant('InvoiceJEQuery') + crits.amountEnd + $translate.instant('LessThan');
crit.valueFrom = crits.amountStart;
crit.valueTo = crits.amountEnd;
crit.propertyName = "amountStart|amountEnd";
$scope.criteriaList.push(crit);
}
//税额
if (!PWC.isNullOrEmpty(crits.taxAmountStart) && !PWC.isNullOrEmpty(crits.taxAmountEnd)) {
if (Number(crits.taxAmountStart) > Number(crits.taxAmountEnd)) {
SweetAlert.warning($translate.instant('TaxAmountQueryError'));
return;
}
crit = new Object;
crit.name = $translate.instant('InvoiceSEQuery') + PWC.limitString(crits.taxAmountStart, 5) + ' - ' + PWC.limitString(crits.taxAmountEnd, 5);
crit.fullName = $translate.instant('InvoiceSEQuery') + crits.taxAmountStart + ' - ' + crits.taxAmountEnd;
crit.valueFrom = crits.taxAmountStart;
crit.valueTo = crits.taxAmountEnd;
crit.propertyName = "taxAmountStart|taxAmountEnd";
$scope.criteriaList.push(crit);
}
else if (!PWC.isNullOrEmpty(crits.taxAmountStart) && PWC.isNullOrEmpty(crits.taxAmountEnd)) {
crit = new Object;
crit.name = $translate.instant('InvoiceSEQuery') + PWC.limitString(crits.taxAmountStart, 5) + $translate.instant('MoreThan');
crit.fullName = $translate.instant('InvoiceSEQuery') + crits.taxAmountStart + $translate.instant('MoreThan');
crit.valueFrom = crits.taxAmountStart;
crit.valueTo = crits.taxAmountEnd;
crit.propertyName = "taxAmountStart|taxAmountEnd";
$scope.criteriaList.push(crit);
}
else if (PWC.isNullOrEmpty(crits.taxAmountStart) && !PWC.isNullOrEmpty(crits.taxAmountEnd)) {
crit = new Object;
crit.name = $translate.instant('InvoiceSEQuery') + PWC.limitString(crits.taxAmountEnd, 5) + $translate.instant('LessThan');
crit.fullName = $translate.instant('InvoiceSEQuery') + crits.taxAmountEnd + $translate.instant('LessThan');
crit.valueFrom = crits.taxAmountStart;
crit.valueTo = crits.taxAmountEnd;
crit.propertyName = "taxAmountStart|taxAmountEnd";
$scope.criteriaList.push(crit);
}
//发票类型
if (!PWC.isNullOrEmpty(crits.invoiceType)) {
crit = new Object;
crit.valueFrom = _.find($scope.invoiceTypeList, function (v) {
return v.id === crits.invoiceType;
}).name;
crit.name = $translate.instant('InvoiceFPLXQuery') + crit.valueFrom;
crit.fullName = $translate.instant('InvoiceFPLXQuery') + crit.valueFrom;
crit.propertyName = "invoiceType";
$scope.criteriaList.push(crit);
}
//认证结果
if (!PWC.isNullOrEmpty(crits.certificationStatus)) {
crit = new Object;
crit.valueFrom = _.find($scope.cetificationResultList, function (v) {
return v.id === crits.certificationStatus;
}).name;
crit.name = $translate.instant('InvoiceRZJGQuery') + crit.valueFrom;
crit.fullName = $translate.instant('InvoiceRZJGQuery') + crit.valueFrom;
crit.propertyName = "certificationStatus";
$scope.criteriaList.push(crit);
}
// add to Criteria List for display on top of the grid:
//********************************************************************************
var criteria = JSON.stringify($scope.queryParams);
if (browserService.isIE() || browserService.isEdge())
criteria = encodeURIComponent(criteria);
countTotal();
loadIncomeInvoiceItemDataFromDB(1);
if ($scope.criteriaList.length > 6) {
$scope.criteriaListFirstRow = $scope.criteriaList.slice(0, 6);
$scope.criteriaListSecondRow = $scope.criteriaList.slice(6, $scope.criteriaList.length);
}
else {
$scope.criteriaListFirstRow = $scope.criteriaList.slice(0, $scope.criteriaList.length);
}
$('.filter-button').popover("hide");
};
//去掉所有的查询条件,重新load数据
var doDataFilterReset = function () {
$scope.queryParams = {
pageInfo: {},
periodStart: '',
periodEnd: '',
orgId:''
};
$scope.criteriaList = [];
$scope.queryParams.periodStart = $scope.startMonth;
$scope.queryParams.periodEnd = $scope.endMonth;
//countTotal();
loadIncomeInvoiceItemDataFromDB(1);
$('.filter-button').popover("hide");
};
var prepareSummary = function () {
// do something before show popover
};
//在popover打开时执行事件
var showPopover = function () {
$timeout(function () {
......@@ -488,40 +193,16 @@
})
};
//发票类型转换
$scope.typeToString = function (strType) {
var type = invoiceTypeEnum.VATInvoice;
switch (strType) {
case 1:
type = invoiceTypeEnum.VATInvoice;
break;
case 2:
type = invoiceTypeEnum.FreightTransport;
break;
case 3:
type = invoiceTypeEnum.MotorVehicle;
break;
case 4:
type = invoiceTypeEnum.AgriculturalProduct;
break;
default:
type = "";
}
return type;
};
//导出进项发票数据
var downloadInputInvoice = function () {
vatPreviewService.getExportInputInvoiceList($scope.queryParams).success(function (data, status, headers) {
if(status===204){
SweetAlert.warning("没有数据可以下载");
return;
$scope.downloadCashFlow = function () {
var fileName="cash_flow"
vatPreviewService.initExportCFData($scope.queryParams,fileName).then(function (data) {
if (data) {
ackMessageBox.success(translate('FileExportSuccess'));
}
vatExportService.exportToExcel(data, status, headers, '进项发票信息.xls');
});
};
(function initialize() {
$log.debug('VatPreviewInputInvoiceController.ctor()...');
$('#input-invoice-period-picker').focus(function () {
......@@ -538,23 +219,20 @@
})
.on('datePicker.done', function (e, result) {
//开始月份
var startMonth = result[0][0];
var startMonth = result[0][1] * 100 + result[0][0];
//结束月份
var endMonth = result[1][0];
var endMonth = result[1][1] * 100 + result[1][0];
$scope.startMonth = startMonth;
$scope.endMonth = endMonth;
$scope.queryParams.periodStart = startMonth;
$scope.queryParams.periodEnd = endMonth;
countTotal();
loadIncomeInvoiceItemDataFromDB(1);
});
$scope.gridOptions = {
rowHeight: constant.UIGrid.rowHeight,
selectionRowHeaderWidth: constant.UIGrid.rowHeight,
//expandableRowTemplate: '<div ui-grid="row.entity.subGridOptions" style="height:150px;"></div>',
virtualizationThreshold: 50,//默认加载50条数据,避免在数据展示时,只显示前面4条
enableSorting: false,
enableColumnMenus: false,
......@@ -563,61 +241,15 @@
{ name: $translate.instant('Item'), width: '38%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.itemName2}}<span></div>' },
{ name: $translate.instant('CurrentPeriodAmount'), width: '15%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.periodAmt}}<span></div>' },
{ name: $translate.instant('ThisYearAccumulatedAmount'), width: '15%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.ytdAmt}}<span></div>' }
],
// onRegisterApi: function (gridApi) {
// $scope.gridApi = gridApi;
// //定义子table属性
// gridApi.expandable.on.rowExpandedStateChanged($scope, function (row) {
// if (row.isExpanded) {
// row.entity.subGridOptions = {
// rowHeight: constant.UIGrid.rowHeight,
// selectionRowHeaderWidth: constant.UIGrid.rowHeight,
// virtualizationThreshold: 50,//默认加载50条数据,避免在数据展示时,只显示前面4条
// enableSorting: false,
// enableColumnMenus: false,
// columnDefs: [
// // { name: $translate.instant('ImportErrorPopUpNoCol'), width: '10%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.index}}<span></div>' },
// { name: $translate.instant('InvoiceHWMC'), headerCellClass:'right', width: '20%', cellTemplate: '<div class="ui-grid-cell-contents"><span style="float:right" title="{{row.entity.spmc}}">{{row.entity.spmc}}<span></div>' },
// { name: $translate.instant('InvoiceJE'), headerCellClass:'right', width: '13%', cellTemplate: '<div class="ui-grid-cell-contents"><span style="float:right">{{row.entity.je}}<span></div>' },
// { name: $translate.instant('InvoiceSL'), headerCellClass:'right', width: '13%', cellTemplate: '<div class="ui-grid-cell-contents"><span style="float:right">{{row.entity.slv}}%<span></div>' },
// { name: $translate.instant('InvoiceSE'), headerCellClass:'right', width: '13%', cellTemplate: '<div class="ui-grid-cell-contents"><span style="float:right">{{row.entity.se}}<span></div>' }
// ]
// };
// //获取子table数据
// vatPreviewService.queryInputInvoiceItemList(row.entity.id).success(function (data) {
// if (data) {
// var index = 1;
// data.forEach(function (v) {
// v.index = index++;
// v.je = PWC.round(v.je, 2);
// v.se = PWC.round(v.se, 2);
// });
// row.entity.subGridOptions.data = data;
// }
// });
// }
// });
// $interval(function () {
// $scope.gridApi.core.handleWindowResize();
// }, 500, 60 * 60 * 8);
// }
]
};
//$scope.doDataFilter = doDataFilter;
$scope.doDataFilterReset = doDataFilterReset;
//$scope.prepareSummary = prepareSummary;
$scope.showPopover = showPopover;
$scope.downloadInputInvoice = downloadInputInvoice;
initPeriods();
initIncomeInvoiceItemPagination();
//初始化查询条件-期间范围
$scope.queryParams.periodStart = vatSessionService.month;
$scope.queryParams.periodEnd = vatSessionService.month;
countTotal();
$scope.queryParams.periodStart = vatSessionService.year * 100 + vatSessionService.month;
$scope.queryParams.periodEnd = vatSessionService.year * 100 + vatSessionService.month;
$scope.queryParams.orgId = vatSessionService.project.organizationID;
loadIncomeInvoiceItemDataFromDB(1);
......
<div class="vat-preview-cash-flow" id="mainPreviewDiv">
<div class="top-area-wrapper" style="margin-top: 10px">
<span translate="ImportCFStatusGridSourceDDTitle" class="text-bold"></span> &nbsp;&nbsp;|&nbsp;&nbsp;<span class="text-bold" translate="InvoiceQJ"></span>
<span translate="CashFlowDDTitle" class="text-bold"></span> &nbsp;&nbsp;|&nbsp;&nbsp;<span class="text-bold" translate="InvoiceQJ"></span>
<input type="text" class="form-control input-width-middle" style="position: relative; top: -30px; left: 130px;" id="input-invoice-period-picker" />
<span ng-click="downloadInputInvoice()" style="position: relative; top: -13px; left: 95%;"><i class="fa fa-file-excel-o" aria-hidden="true"></i>{{'ExportBtn' | translate}}</span>
<span ng-click="downloadCashFlow()" style="position: relative; top: -13px; left: 95%;"><i class="fa fa-file-excel-o" aria-hidden="true"></i>{{'ExportBtn' | translate}}</span>
</div>
<div style="margin-bottom: 10px;margin-left: 20px;margin-top: 10px;">
......@@ -11,26 +11,8 @@
是否关账:<span class="numAmount">{{ledgerStatusFirst}}</span>
</div>
<!-- <div id="filterCriteriaDiv" style="max-width:98%;margin-bottom:2px;" ng-show="criteriaList.length>0">
<span class="text-bold margin-left20" translate="FilterCriteriaTags"></span>:
<span class="tag label label-default" ng-repeat="criteria in criteriaListFirstRow">
<span title="{{criteria.fullName}}">
{{criteria.name}}
</span>
<a><i class="remove glyphicon glyphicon-remove-sign glyphicon-white" ng-click="doDataFilter(criteria.propertyName)"></i></a>
</span>
<span ng-if="criteriaList.length>6"><br /></span>
<span ng-if="criteriaList.length>6" style="margin-left: 81px; margin-top: 19px; display: inline-block;"></span>
<span ng-if="criteriaList.length>6" class="tag label label-default" ng-repeat="criteria in criteriaListSecondRow">
<span title="{{criteria.fullName}}">
{{criteria.name}}
</span>
<a><i class="remove glyphicon glyphicon-remove-sign glyphicon-white" ng-click="doDataFilter(criteria.propertyName)"></i></a>
</span>
</div> -->
<div id="mainAreaDiv" class="main-area">
<div class="inputInvoiceGrid" ui-grid-expandable ui-grid="gridOptions">
<div class="inputInvoiceGrid" ui-grid="gridOptions">
<div class="watermark" ng-show="!gridOptions.data.length"><span translate="NoDataAvailable"></span></div>
</div>
<div class="pagination-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