Commit babc14ff authored by zhkwei's avatar zhkwei

Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql

parents 4c3cf747 a4d3e404
......@@ -11,6 +11,7 @@ public class ErrorMessage {
public static final String NoSelectSheet = "NoSelectSheet";
public static final String DIDNOTSELECTPERIOD = "You should select period!";
public static final String ImportFailed = "ImportFailed!";
public static final String ExportFailed = "ExportFailed!";
......
package pwc.taxtech.atms.constant;
/**
* @Auther: Gary J Li
* @Date: 27/02/2019 20:47
* @Description:
*/
public final class CountTypeConstant {
public static final int TOTAL = 1;
public static final int SIXTEEN_PERCENT = 2;
public static final int TEN_PERCENT = 3;
public static final int SIX_PERCENT = 4;
public static final int THREE_PERCENT = 5;
public static final int SEVENTEEN_PERCENT = 6;
public static final int ELEVEN_PERCENT = 7;
public static final int FIVE_PERCENT = 8;
public static final int OTHER = 9;
}
package pwc.taxtech.atms.constant;
/**
* @Auther: Gary J Li
* @Date: 27/02/2019 20:47
* @Description:
*/
public final class ExportTemplatePathConstant {
public static final String INVOICES_RECORD = "/vat_excel_template/invoice_record.xlsx";
public static final String CASH_FLOW = "/vat_excel_template/cash_flow.xlsx";
public static final String CERTIFIED_INVOICES_LIST = "/vat_excel_template/certified_invoices_list.xlsx";
public static final String RED_LETTER_INFO_TAB = "/vat_excel_template/red_letter_info_tab.xlsx";
public static final String COUPA_PURCHASING_REPORT = "/vat_excel_template/coupa_purchasing_report.xlsx";
public static final String INVOICE_DATA = "/vat_excel_template/invoice_data.xlsx";
}
package pwc.taxtech.atms.constant.enums;
/**
* @Auther: Gary J Li
* @Date: 27/02/2019 20:36
* @Description:
*/
public enum CountTypeEnum {
total(1,"合计"),
sixteenPercent(2,"16%"),
tenPercent(3,"10%"),
sixPercent(4,"6%"),
threePercent(5,"3%"),
seventeenPercent(6,"17%"),
elevenPercent(7,"11%"),
fivePercent(8,"5%"),
other(9,"其他");
private int code;
private String type;
CountTypeEnum(int code,String type){
this.code = code;
this.type = type;
}
public int getCode() {
return code;
}
public String getType() {
return type;
}
}
package pwc.taxtech.atms.controller;
import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.dto.ApiResultDto;
import pwc.taxtech.atms.dto.billDetail.BillDetailParam;
import pwc.taxtech.atms.dto.billDetail.BillDetailResult;
import pwc.taxtech.atms.dto.input.CamelPagingResultDto;
import pwc.taxtech.atms.service.impl.BillDetailService;
import pwc.taxtech.atms.vat.entity.BillDetail;
import javax.annotation.Resource;
import java.util.List;
@RestController
@RequestMapping(value = "api/v1/billDetail")
public class BillDetailController extends BaseController {
@Resource
private BillDetailService billDetailService;
@PostMapping("queryPage")
public CamelPagingResultDto<BillDetailResult> queryPage(@RequestBody BillDetailParam param) {
return new CamelPagingResultDto<>(billDetailService.queryPage(param));
}
@PostMapping("queryBillTypeGroupBy")
public List<String> queryBillTypeGroupBy( @RequestParam(name = "projectId",required = true) String projectId,
@RequestParam(name = "period",required = true) Integer period) {
return billDetailService.queryBillTypeGroupBy(projectId,period);
}
@PostMapping("update")
public ApiResultDto updateConf(@RequestBody BillDetail billDetail) {
billDetailService.updateBillDetail(billDetail);
return ApiResultDto.success();
}
}
......@@ -79,6 +79,12 @@ public class DataPreviewController extends BaseController {
return dataPreviewSerivceImpl.getCILDataForDisplay(param);
}
@PostMapping("getIDDataForDisplay")
public PageInfo<InvoiceDataDto> getIDDataForDisplay(@RequestBody InvoiceDataParam param) {
logger.debug(String.format("发票资料查询 Condition:%s", JSON.toJSONString(param)));
return dataPreviewSerivceImpl.getIDDataForDisplay(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");
......@@ -181,4 +187,42 @@ public class DataPreviewController extends BaseController {
logger.error(String.format("下载科目余额表-生成文件异常:%s",e.getMessage()));
}
}
@RequestMapping(value = "exportIRData/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void downloadIRQueryData(@RequestBody InvoiceRecordParam param, HttpServletResponse response) {
logger.debug("enter downloadIRQueryData");
String fileName="testFile";
dataPreviewSerivceImpl.exportInvoiceRecordList(response, param, fileName);
}
@RequestMapping(value = "exportCILData/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void downloadCILQueryData(@RequestBody CertifiedInvoicesListParam param, HttpServletResponse response) {
logger.debug("enter downloadCILQueryData");
String fileName="testFile";
dataPreviewSerivceImpl.exportCILList(response, param, fileName);
}
@RequestMapping(value = "exportRLITData/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void downloadRLITQueryData(@RequestBody RedLetterInfoTableParam param, HttpServletResponse response) {
logger.debug("enter downloadRLITQueryData");
String fileName="testFile";
dataPreviewSerivceImpl.exportRLITList(response, param, fileName);
}
@RequestMapping(value = "exportCPRData/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void downloadCPRQueryData(@RequestBody CoupaPurchasingReportParam param, HttpServletResponse response) {
logger.debug("enter downloadCPRQueryData");
String fileName="testFile";
dataPreviewSerivceImpl.exportCPRList(response, param, fileName);
}
@RequestMapping(value = "exportIDData/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void downloadIDQueryData(@RequestBody InvoiceDataParam param, HttpServletResponse response) {
logger.debug("enter downloadIDQueryData");
String fileName="testFile";
dataPreviewSerivceImpl.exportIDList(response, param, fileName);
}
}
package pwc.taxtech.atms.dto.billDetail;
import pwc.taxtech.atms.dto.input.CamelPagingDto;
import java.io.Serializable;
import java.math.BigDecimal;
public class BillDetailParam implements Serializable {
private static final long serialVersionUID = 3854050681366543422L;
private CamelPagingDto pageInfo;
private String billType;
private String customer;
private String billContent;
private String billDate;
private Long revenueCofId;
private String department;
private BigDecimal billTaxRat;
private String billNumber;
private String projectId;
private Integer period;
private String queryDate;
public String getProjectId() {
return projectId;
}
public void setProjectId(String projectId) {
this.projectId = projectId;
}
public Integer getPeriod() {
return period;
}
public void setPeriod(Integer period) {
this.period = period;
}
public String getQueryDate() {
return queryDate;
}
public void setQueryDate(String queryDate) {
this.queryDate = queryDate;
}
public String getCustomer() {
return customer;
}
public void setCustomer(String customer) {
this.customer = customer;
}
public Long getRevenueCofId() {
return revenueCofId;
}
public void setRevenueCofId(Long revenueCofId) {
this.revenueCofId = revenueCofId;
}
public String getBillType() {
return billType;
}
public void setBillType(String billType) {
this.billType = billType;
}
public String getBillContent() {
return billContent;
}
public void setBillContent(String billContent) {
this.billContent = billContent;
}
public String getBillDate() {
return billDate;
}
public void setBillDate(String billDate) {
this.billDate = billDate;
}
public String getDepartment() {
return department;
}
public void setDepartment(String department) {
this.department = department;
}
public BigDecimal getBillTaxRat() {
return billTaxRat;
}
public void setBillTaxRat(BigDecimal billTaxRat) {
this.billTaxRat = billTaxRat;
}
public String getBillNumber() {
return billNumber;
}
public void setBillNumber(String billNumber) {
this.billNumber = billNumber;
}
public CamelPagingDto getPageInfo() {
return this.pageInfo;
}
public void setPageInfo(CamelPagingDto pageInfo) {
this.pageInfo = pageInfo;
}
}
package pwc.taxtech.atms.dto.billDetail;
import java.io.Serializable;
import java.math.BigDecimal;
public class BillDetailResult implements Serializable {
private static final long serialVersionUID = 4342336578709406470L;
private Long id;
private String subject;
private String customer;
private String billType;
private String billContent;
private BigDecimal billAmount;
private BigDecimal billTaxRat;
private BigDecimal billTaxAmount;
private String OANo;
private String department;
private String billDate;
private String billCode;
private String billNumber;
private String revenueConfName;
private Long revenueCofId;
private Integer emptyCode;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getSubject() {
return subject;
}
public void setSubject(String subject) {
this.subject = subject;
}
public String getCustomer() {
return customer;
}
public void setCustomer(String customer) {
this.customer = customer;
}
public String getBillType() {
return billType;
}
public void setBillType(String billType) {
this.billType = billType;
}
public String getBillContent() {
return billContent;
}
public void setBillContent(String billContent) {
this.billContent = billContent;
}
public BigDecimal getBillAmount() {
return billAmount;
}
public void setBillAmount(BigDecimal billAmount) {
this.billAmount = billAmount;
}
public BigDecimal getBillTaxRat() {
return billTaxRat;
}
public void setBillTaxRat(BigDecimal billTaxRat) {
this.billTaxRat = billTaxRat;
}
public BigDecimal getBillTaxAmount() {
return billTaxAmount;
}
public void setBillTaxAmount(BigDecimal billTaxAmount) {
this.billTaxAmount = billTaxAmount;
}
public String getOANo() {
return OANo;
}
public void setOANo(String OANo) {
this.OANo = OANo;
}
public String getDepartment() {
return department;
}
public void setDepartment(String department) {
this.department = department;
}
public String getBillDate() {
return billDate;
}
public void setBillDate(String billDate) {
this.billDate = billDate;
}
public String getBillCode() {
return billCode;
}
public void setBillCode(String billCode) {
this.billCode = billCode;
}
public String getBillNumber() {
return billNumber;
}
public void setBillNumber(String billNumber) {
this.billNumber = billNumber;
}
public String getRevenueConfName() {
return revenueConfName;
}
public void setRevenueConfName(String revenueConfName) {
this.revenueConfName = revenueConfName;
}
public Long getRevenueCofId() {
return revenueCofId;
}
public void setRevenueCofId(Long revenueCofId) {
this.revenueCofId = revenueCofId;
}
public Integer getEmptyCode() {
return emptyCode;
}
public void setEmptyCode(Integer emptyCode) {
this.emptyCode = emptyCode;
}
}
......@@ -48,6 +48,17 @@ public class OrganizationAccountingRateDto implements Serializable {
*/
private Integer period;
/**
* Database Column Remarks:
* 来源
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization_accounting_rate.source
*
* @mbg.generated
*/
private String source;
/**
* Database Column Remarks:
* 汇率类型
......@@ -216,6 +227,30 @@ public class OrganizationAccountingRateDto implements Serializable {
this.period = period;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization_accounting_rate.source
*
* @return the value of organization_accounting_rate.source
*
* @mbg.generated
*/
public String getSource() {
return source;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization_accounting_rate.source
*
* @param source the value for organization_accounting_rate.source
*
* @mbg.generated
*/
public void setSource(String source) {
this.source = source == null ? null : source.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization_accounting_rate.convertion_type
......@@ -423,6 +458,7 @@ public class OrganizationAccountingRateDto implements Serializable {
sb.append(", id=").append(id);
sb.append(", organizationId=").append(organizationId);
sb.append(", period=").append(period);
sb.append(", source=").append(source);
sb.append(", convertionType=").append(convertionType);
sb.append(", currencyFrom=").append(currencyFrom);
sb.append(", currencyTo=").append(currencyTo);
......
......@@ -32,6 +32,17 @@ public class RevenueDetailResult implements Serializable {
private String taxOn;
private Integer emptyCode;
public Integer getEmptyCode() {
return emptyCode;
}
public void setEmptyCode(Integer emptyCode) {
this.emptyCode = emptyCode;
}
public String getSubject() {
return subject;
}
......
package pwc.taxtech.atms.dto.vatdto;
import pwc.taxtech.atms.dpo.PagingDto;
public class InvoiceDataParam {
private PagingDto pageInfo;
private String orgId;
private Integer periodStart;
private Integer periodEnd;
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 getOrgId() {
return this.orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public PagingDto getPageInfo() {
return pageInfo;
}
public void setPageInfo(PagingDto pageInfo) {
this.pageInfo = pageInfo;
}
}
......@@ -20,6 +20,28 @@ public class CashFlowDto implements Serializable {
@JsonSerialize(using = PwCIdSerialize.class)
private Long id;
/**
* Database Column Remarks:
* 机构id
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column cash_flow.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 cash_flow.project_id
*
* @mbg.generated
*/
private String projectId;
/**
* Database Column Remarks:
* 数据日期
......@@ -42,6 +64,17 @@ public class CashFlowDto implements Serializable {
*/
private String source;
/**
* Database Column Remarks:
* 税务系统期间 yyyyMM
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column cash_flow.tms_period
*
* @mbg.generated
*/
private Integer tmsPeriod;
/**
* Database Column Remarks:
* 期间 YYYY-MM
......@@ -91,7 +124,7 @@ public class CashFlowDto implements Serializable {
* 账套币种
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column cash_flow.edger_currency_code
* This field corresponds to the database column cash_flow.ledger_currency_code
*
* @mbg.generated
*/
......@@ -133,7 +166,7 @@ public class CashFlowDto implements Serializable {
/**
* Database Column Remarks:
* 频度(固定值M,
仅期间(月度含13期)报表数据)
仅期间(月度含13期)报表数据)
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column cash_flow.frequency
......@@ -236,6 +269,54 @@ public class CashFlowDto implements Serializable {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column cash_flow.organization_id
*
* @return the value of cash_flow.organization_id
*
* @mbg.generated
*/
public String getOrganizationId() {
return organizationId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column cash_flow.organization_id
*
* @param organizationId the value for cash_flow.organization_id
*
* @mbg.generated
*/
public void setOrganizationId(String organizationId) {
this.organizationId = organizationId == null ? null : organizationId.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column cash_flow.project_id
*
* @return the value of cash_flow.project_id
*
* @mbg.generated
*/
public String getProjectId() {
return projectId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column cash_flow.project_id
*
* @param projectId the value for cash_flow.project_id
*
* @mbg.generated
*/
public void setProjectId(String projectId) {
this.projectId = projectId == null ? null : projectId.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column cash_flow.date
......@@ -284,6 +365,30 @@ public class CashFlowDto implements Serializable {
this.source = source == null ? null : source.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column cash_flow.tms_period
*
* @return the value of cash_flow.tms_period
*
* @mbg.generated
*/
public Integer getTmsPeriod() {
return tmsPeriod;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column cash_flow.tms_period
*
* @param tmsPeriod the value for cash_flow.tms_period
*
* @mbg.generated
*/
public void setTmsPeriod(Integer tmsPeriod) {
this.tmsPeriod = tmsPeriod;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column cash_flow.period
......@@ -382,9 +487,9 @@ public class CashFlowDto implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column cash_flow.edger_currency_code
* This method returns the value of the database column cash_flow.ledger_currency_code
*
* @return the value of cash_flow.edger_currency_code
* @return the value of cash_flow.ledger_currency_code
*
* @mbg.generated
*/
......@@ -394,9 +499,9 @@ public class CashFlowDto implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column cash_flow.edger_currency_code
* This method sets the value of the database column cash_flow.ledger_currency_code
*
* @param ledgerCurrencyCode the value for cash_flow.edger_currency_code
* @param ledgerCurrencyCode the value for cash_flow.ledger_currency_code
*
* @mbg.generated
*/
......@@ -657,8 +762,11 @@ public class CashFlowDto implements Serializable {
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", organizationId=").append(organizationId);
sb.append(", projectId=").append(projectId);
sb.append(", date=").append(date);
sb.append(", source=").append(source);
sb.append(", tmsPeriod=").append(tmsPeriod);
sb.append(", period=").append(period);
sb.append(", status=").append(status);
sb.append(", ledgerId=").append(ledgerId);
......
package pwc.taxtech.atms.dto.vatdto.dd;
import java.io.Serializable;
import java.math.BigDecimal;
/**
*
* This class was generated by MyBatis Generator.
* This class corresponds to the database table invoice_data
*
* @mbg.generated do_not_delete_during_merge
*/
public class InvoiceDataDto implements Serializable {
private String projectName;
private BigDecimal totalAmount;
private BigDecimal amount1;
private BigDecimal amount2;
private BigDecimal amount3;
private BigDecimal amount4;
private BigDecimal amount5;
private BigDecimal amount6;
private BigDecimal amount7;
private BigDecimal otherAmount;
public BigDecimal getTotalAmount() {
return totalAmount;
}
public void setTotalAmount(BigDecimal totalAmount) {
this.totalAmount = totalAmount;
}
public BigDecimal getAmount1() {
return amount1;
}
public void setAmount1(BigDecimal amount1) {
this.amount1 = amount1;
}
public BigDecimal getAmount2() {
return amount2;
}
public void setAmount2(BigDecimal amount2) {
this.amount2 = amount2;
}
public BigDecimal getAmount3() {
return amount3;
}
public void setAmount3(BigDecimal amount3) {
this.amount3 = amount3;
}
public BigDecimal getAmount4() {
return amount4;
}
public void setAmount4(BigDecimal amount4) {
this.amount4 = amount4;
}
public BigDecimal getAmount5() {
return amount5;
}
public void setAmount5(BigDecimal amount5) {
this.amount5 = amount5;
}
public BigDecimal getAmount6() {
return amount6;
}
public void setAmount6(BigDecimal amount6) {
this.amount6 = amount6;
}
public BigDecimal getAmount7() {
return amount7;
}
public void setAmount7(BigDecimal amount7) {
this.amount7 = amount7;
}
public BigDecimal getOtherAmount() {
return otherAmount;
}
public void setOtherAmount(BigDecimal otherAmount) {
this.otherAmount = otherAmount;
}
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
public InvoiceDataDto(){
}
public InvoiceDataDto(String projectName){
this.projectName = projectName;
}
}
\ No newline at end of file
......@@ -50,6 +50,28 @@ public class RedLetterInfoTableDto implements Serializable {
*/
private String projectId;
/**
* Database Column Remarks:
* 税务系统期间
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column red_letter_info_table.tms_period
*
* @mbg.generated
*/
private Integer tmsPeriod;
/**
* Database Column Remarks:
* 填开日期 yyyyMM 对应期间
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column red_letter_info_table.fill_in_date
*
* @mbg.generated
*/
private Integer fillInDate;
/**
* Database Column Remarks:
* 主体编号
......@@ -83,17 +105,6 @@ public class RedLetterInfoTableDto implements Serializable {
*/
private String redLetterInvoiceInfoTableNum;
/**
* Database Column Remarks:
* 填开日期 yyyyMM
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column red_letter_info_table.fill_in_date
*
* @mbg.generated
*/
private Integer fillInDate;
/**
* Database Column Remarks:
* 销方税号
......@@ -284,6 +295,54 @@ public class RedLetterInfoTableDto implements Serializable {
this.projectId = projectId == null ? null : projectId.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column red_letter_info_table.tms_period
*
* @return the value of red_letter_info_table.tms_period
*
* @mbg.generated
*/
public Integer getTmsPeriod() {
return tmsPeriod;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column red_letter_info_table.tms_period
*
* @param tmsPeriod the value for red_letter_info_table.tms_period
*
* @mbg.generated
*/
public void setTmsPeriod(Integer tmsPeriod) {
this.tmsPeriod = tmsPeriod;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column red_letter_info_table.fill_in_date
*
* @return the value of red_letter_info_table.fill_in_date
*
* @mbg.generated
*/
public Integer getFillInDate() {
return fillInDate;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column red_letter_info_table.fill_in_date
*
* @param fillInDate the value for red_letter_info_table.fill_in_date
*
* @mbg.generated
*/
public void setFillInDate(Integer fillInDate) {
this.fillInDate = fillInDate;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column red_letter_info_table.subject_num
......@@ -356,30 +415,6 @@ public class RedLetterInfoTableDto implements Serializable {
this.redLetterInvoiceInfoTableNum = redLetterInvoiceInfoTableNum == null ? null : redLetterInvoiceInfoTableNum.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column red_letter_info_table.fill_in_date
*
* @return the value of red_letter_info_table.fill_in_date
*
* @mbg.generated
*/
public Integer getFillInDate() {
return fillInDate;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column red_letter_info_table.fill_in_date
*
* @param fillInDate the value for red_letter_info_table.fill_in_date
*
* @mbg.generated
*/
public void setFillInDate(Integer fillInDate) {
this.fillInDate = fillInDate;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column red_letter_info_table.sales_tax_number
......@@ -635,10 +670,11 @@ public class RedLetterInfoTableDto implements Serializable {
sb.append(", id=").append(id);
sb.append(", organizationId=").append(organizationId);
sb.append(", projectId=").append(projectId);
sb.append(", tmsPeriod=").append(tmsPeriod);
sb.append(", fillInDate=").append(fillInDate);
sb.append(", subjectNum=").append(subjectNum);
sb.append(", subjectName=").append(subjectName);
sb.append(", redLetterInvoiceInfoTableNum=").append(redLetterInvoiceInfoTableNum);
sb.append(", fillInDate=").append(fillInDate);
sb.append(", salesTaxNumber=").append(salesTaxNumber);
sb.append(", salespersonName=").append(salespersonName);
sb.append(", totalAmount=").append(totalAmount);
......
package pwc.taxtech.atms.dto.vatdto.excelheader;
public class CertifiedInvoicesListHeader {
private String taxPayerNumber;
private Integer period;
private String unit;
public String getTaxPayerNumber() {
return taxPayerNumber;
}
public void setTaxPayerNumber(String taxPayerNumber) {
this.taxPayerNumber = taxPayerNumber;
}
public Integer getPeriod() {
return period;
}
public void setPeriod(Integer period) {
this.period = period;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
}
package pwc.taxtech.atms.service.impl;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dpo.BillDetailDto;
import pwc.taxtech.atms.dto.billDetail.BillDetailParam;
import pwc.taxtech.atms.dto.billDetail.BillDetailResult;
import pwc.taxtech.atms.vat.dao.BillDetailMapper;
import pwc.taxtech.atms.vat.entity.BillDetail;
import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
@Service
public class BillDetailService extends BaseService {
@Resource
private BillDetailMapper billDetailMapper;
public PageInfo<BillDetailResult> queryPage(BillDetailParam param) {
Page page = PageHelper.startPage(param.getPageInfo().getPageIndex(), param.getPageInfo().getPageSize());
List<BillDetailDto> dataList = billDetailMapper.queryBillWithRevenueConf(param.getBillType(), param.getCustomer(), param.getBillNumber(), param.getRevenueCofId(), param.getBillContent(), param.getDepartment(), param.getBillTaxRat(), param.getBillDate(), param.getProjectId(), param.getPeriod(), param.getQueryDate());
PageInfo<BillDetailResult> pageInfo = new PageInfo<>(dataList.stream()
.map(o -> beanUtil.copyProperties(o, new BillDetailResult())).collect(Collectors.toList()));
pageInfo.setTotal(page.getTotal());
return pageInfo;
}
public List<String> queryBillTypeGroupBy(String projectId,Integer period){
return billDetailMapper.queryBillTypeGroupBy(projectId,period);
}
public void updateBillDetail(BillDetail billDetail) {
billDetailMapper.updateByPrimaryKeySelective(billDetail);
}
}
......@@ -79,5 +79,33 @@ public class CommonDocumentHelper {
return os;
}
public OutputStream toXlsxFileUsingJxls(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("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;
}
}
......@@ -26,6 +26,7 @@ import java.io.IOException;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
/**
* @Auther: Gary J Li
......@@ -65,7 +66,6 @@ public class DataInitTest extends CommonIT {
e.printStackTrace();
}
JSONObject object = JSONObject.parseObject(input);
Map<String, Object> orgs = object.getInnerMap();
Map<String, Object> failList = new HashMap<>();
......@@ -104,7 +104,13 @@ public class DataInitTest extends CommonIT {
equityInfo.setPayableContributionProportion(Float.valueOf((investmentRadio.replace("%", ""))));
}
} else if ("payableCapitalContributionAmount".equals(OrgKV.Map.get(eK))) {
equityInfo.setPayableCapitalContributionAmount((long) Double.parseDouble(((String) eV).trim()));
String payableCapitalContributionAmount = ((String) eV).trim();
if(payableCapitalContributionAmount.contains(",")){
double res = Arrays.asList(payableCapitalContributionAmount.split(",")).stream().mapToDouble(Double::parseDouble).sum();
equityInfo.setPayableCapitalContributionAmount((long) res);
}else{
equityInfo.setPayableCapitalContributionAmount("-".equals(payableCapitalContributionAmount) ?0:(long) Double.parseDouble(payableCapitalContributionAmount));
}
} else if ("investorName".equals(OrgKV.Map.get(eK))) {
String investorName = (String) eV;
if (investorName.contains("公司")) {
......@@ -127,14 +133,14 @@ public class DataInitTest extends CommonIT {
double res = Arrays.asList(investmentAmountStr.split(",")).stream().mapToDouble(Double::parseDouble).sum();
equityInfo.setInvestmentAmount((long) res);
}else{
equityInfo.setInvestmentAmount((long) Double.parseDouble(investmentAmountStr));
equityInfo.setInvestmentAmount("-".equals(investmentAmountStr) ?0:(long) Double.parseDouble(investmentAmountStr));
}
if(equityInfo.getPayableCapitalContributionAmount()==null){
if(investmentAmountStr.contains(",")){
double res = Arrays.asList(investmentAmountStr.split(",")).stream().mapToDouble(Double::parseDouble).sum();
equityInfo.setPayableCapitalContributionAmount((long) res);
}else{
equityInfo.setPayableCapitalContributionAmount((long) Double.parseDouble(investmentAmountStr));
equityInfo.setPayableCapitalContributionAmount("-".equals(investmentAmountStr) ?0:(long) Double.parseDouble(investmentAmountStr));
}
}
} else if (null != OrgKV.Map.get(eK)) {
......@@ -170,7 +176,13 @@ public class DataInitTest extends CommonIT {
equityInfo.setPayableContributionProportion(Float.valueOf((investmentRadio.replace("%", ""))));
}
} else if ("payableCapitalContributionAmount".equals(OrgKV.Map.get(eK))) {
equityInfo.setPayableCapitalContributionAmount((long) Double.parseDouble(((String) eV).trim()));
String payableCapitalContributionAmount = ((String) eV).trim();
if(payableCapitalContributionAmount.contains(",")){
double res = Arrays.asList(payableCapitalContributionAmount.split(",")).stream().mapToDouble(Double::parseDouble).sum();
equityInfo.setPayableCapitalContributionAmount((long) res);
}else{
equityInfo.setPayableCapitalContributionAmount("-".equals(payableCapitalContributionAmount) ?0:(long) Double.parseDouble(payableCapitalContributionAmount));
}
} else if ("investorName".equals(OrgKV.Map.get(eK))) {
String investorName = (String) eV;
if (investorName.contains("公司")) {
......@@ -193,14 +205,14 @@ public class DataInitTest extends CommonIT {
double res = Arrays.asList(investmentAmountStr.split(",")).stream().mapToDouble(Double::parseDouble).sum();
equityInfo.setInvestmentAmount((long) res);
}else{
equityInfo.setInvestmentAmount((long) Double.parseDouble(investmentAmountStr));
equityInfo.setInvestmentAmount("-".equals(investmentAmountStr) ?0:(long) Double.parseDouble(investmentAmountStr));
}
if(equityInfo.getPayableCapitalContributionAmount()==null){
if(investmentAmountStr.contains(",")){
double res = Arrays.asList(investmentAmountStr.split(",")).stream().mapToDouble(Double::parseDouble).sum();
equityInfo.setPayableCapitalContributionAmount((long) res);
}else{
equityInfo.setPayableCapitalContributionAmount((long) Double.parseDouble(investmentAmountStr));
equityInfo.setPayableCapitalContributionAmount("-".equals(investmentAmountStr) ?0:(long) Double.parseDouble(investmentAmountStr));
}
}
} else if (null != OrgKV.Map.get(eK)) {
......@@ -323,6 +335,7 @@ public class DataInitTest extends CommonIT {
}
});
} catch (Exception e) {
logger.error(String.format("机构:[%s]导入异常",orgK),e);
failMsg.append(e.getMessage()+"\n");
failList.putIfAbsent(orgK, orgV);
}
......@@ -346,9 +359,20 @@ public class DataInitTest extends CommonIT {
} catch (IOException e) {
e.printStackTrace();
}
System.out.println(String.format("成功条数[%s]", orgs.size()));
System.out.println(String.format("失败条数[%s]", failList.size()));
}
@Test
public void syncOrg(){
List<String> taxPayNums= organizationMapper.selectByExample(new OrganizationExample()).stream().map(Organization::getTaxPayerNumber).collect(Collectors.toList());
/**
* 1、taxPayNums http 滴滴oa接口同步机构的信息
* 2、逐条update,记录更新失败或未更新上的taxPayNum
* 3、失败的再次处理
*/
}
private void setProperty(Object obj, String propertyName, Object value) {
try{
Class c = obj.getClass();
......
......@@ -41,20 +41,15 @@
<property name="rootInterface" value="pwc.taxtech.atms.MyVatMapper" />
</javaClientGenerator>
<table tableName="revenue_type_mapping" domainObjectName="RevenueTypeMapping">
<property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>
<!-- <table tableName="trial_balance_final" domainObjectName="TrialBalanceFinal">
<property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>-->
<!--<table tableName="pwc_report_attach" domainObjectName="PwcReportAttach">-->
<!--<property name="useActualColumnNames" value="false"/>-->
<!--<property name="ignoreQualifiersAtRuntime" value="true"/>-->
<!--</table>-->
<table tableName="bill_detail" domainObjectName="BillDetail">
<property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>
<!--<table tableName="certified_invoices_list" domainObjectName="CertifiedInvoicesList">
<property name="useActualColumnNames" value="false"/>
......
package pwc.taxtech.atms.dpo;
import java.io.Serializable;
import java.math.BigDecimal;
public class BillDetailDto implements Serializable {
private static final long serialVersionUID = 3576219442624663660L;
private Long id;
private String subject;
private String customer;
private String billType;
private String billContent;
private BigDecimal billAmount;
private BigDecimal billTaxRat;
private BigDecimal billTaxAmount;
private String OANo;
private String department;
private String billDate;
private String billCode;
private String billNumber;
private String revenueConfName;
private Long revenueCofId;
private Integer emptyCode;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getSubject() {
return subject;
}
public void setSubject(String subject) {
this.subject = subject;
}
public String getCustomer() {
return customer;
}
public void setCustomer(String customer) {
this.customer = customer;
}
public String getBillType() {
return billType;
}
public void setBillType(String billType) {
this.billType = billType;
}
public String getBillContent() {
return billContent;
}
public void setBillContent(String billContent) {
this.billContent = billContent;
}
public BigDecimal getBillAmount() {
return billAmount;
}
public void setBillAmount(BigDecimal billAmount) {
this.billAmount = billAmount;
}
public BigDecimal getBillTaxRat() {
return billTaxRat;
}
public void setBillTaxRat(BigDecimal billTaxRat) {
this.billTaxRat = billTaxRat;
}
public BigDecimal getBillTaxAmount() {
return billTaxAmount;
}
public void setBillTaxAmount(BigDecimal billTaxAmount) {
this.billTaxAmount = billTaxAmount;
}
public String getOANo() {
return OANo;
}
public void setOANo(String OANo) {
this.OANo = OANo;
}
public String getDepartment() {
return department;
}
public void setDepartment(String department) {
this.department = department;
}
public String getBillDate() {
return billDate;
}
public void setBillDate(String billDate) {
this.billDate = billDate;
}
public String getBillCode() {
return billCode;
}
public void setBillCode(String billCode) {
this.billCode = billCode;
}
public String getBillNumber() {
return billNumber;
}
public void setBillNumber(String billNumber) {
this.billNumber = billNumber;
}
public String getRevenueConfName() {
return revenueConfName;
}
public void setRevenueConfName(String revenueConfName) {
this.revenueConfName = revenueConfName;
}
public Long getRevenueCofId() {
return revenueCofId;
}
public void setRevenueCofId(Long revenueCofId) {
this.revenueCofId = revenueCofId;
}
public Integer getEmptyCode() {
return emptyCode;
}
public void setEmptyCode(Integer emptyCode) {
this.emptyCode = emptyCode;
}
}
......@@ -32,6 +32,16 @@ public class RevenueDetailDto implements Serializable {
private String taxOn;
private Integer emptyCode;
public Integer getEmptyCode() {
return emptyCode;
}
public void setEmptyCode(Integer emptyCode) {
this.emptyCode = emptyCode;
}
public String getSubject() {
return subject;
}
......
......@@ -44,6 +44,17 @@ public class OrganizationAccountingRate extends BaseEntity implements Serializab
*/
private Integer period;
/**
* Database Column Remarks:
* 来源
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization_accounting_rate.source
*
* @mbg.generated
*/
private String source;
/**
* Database Column Remarks:
* 汇率类型
......@@ -212,6 +223,30 @@ public class OrganizationAccountingRate extends BaseEntity implements Serializab
this.period = period;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization_accounting_rate.source
*
* @return the value of organization_accounting_rate.source
*
* @mbg.generated
*/
public String getSource() {
return source;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization_accounting_rate.source
*
* @param source the value for organization_accounting_rate.source
*
* @mbg.generated
*/
public void setSource(String source) {
this.source = source == null ? null : source.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization_accounting_rate.convertion_type
......@@ -419,6 +454,7 @@ public class OrganizationAccountingRate extends BaseEntity implements Serializab
sb.append(", id=").append(id);
sb.append(", organizationId=").append(organizationId);
sb.append(", period=").append(period);
sb.append(", source=").append(source);
sb.append(", convertionType=").append(convertionType);
sb.append(", currencyFrom=").append(currencyFrom);
sb.append(", currencyTo=").append(currencyTo);
......
......@@ -385,6 +385,76 @@ public class OrganizationAccountingRateExample {
return (Criteria) this;
}
public Criteria andSourceIsNull() {
addCriterion("source is null");
return (Criteria) this;
}
public Criteria andSourceIsNotNull() {
addCriterion("source is not null");
return (Criteria) this;
}
public Criteria andSourceEqualTo(String value) {
addCriterion("source =", value, "source");
return (Criteria) this;
}
public Criteria andSourceNotEqualTo(String value) {
addCriterion("source <>", value, "source");
return (Criteria) this;
}
public Criteria andSourceGreaterThan(String value) {
addCriterion("source >", value, "source");
return (Criteria) this;
}
public Criteria andSourceGreaterThanOrEqualTo(String value) {
addCriterion("source >=", value, "source");
return (Criteria) this;
}
public Criteria andSourceLessThan(String value) {
addCriterion("source <", value, "source");
return (Criteria) this;
}
public Criteria andSourceLessThanOrEqualTo(String value) {
addCriterion("source <=", value, "source");
return (Criteria) this;
}
public Criteria andSourceLike(String value) {
addCriterion("source like", value, "source");
return (Criteria) this;
}
public Criteria andSourceNotLike(String value) {
addCriterion("source not like", value, "source");
return (Criteria) this;
}
public Criteria andSourceIn(List<String> values) {
addCriterion("source in", values, "source");
return (Criteria) this;
}
public Criteria andSourceNotIn(List<String> values) {
addCriterion("source not in", values, "source");
return (Criteria) this;
}
public Criteria andSourceBetween(String value1, String value2) {
addCriterion("source between", value1, value2, "source");
return (Criteria) this;
}
public Criteria andSourceNotBetween(String value1, String value2) {
addCriterion("source not between", value1, value2, "source");
return (Criteria) this;
}
public Criteria andConvertionTypeIsNull() {
addCriterion("convertion_type is null");
return (Criteria) this;
......
package pwc.taxtech.atms.vat.dao;
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.dpo.BillDetailDto;
import pwc.taxtech.atms.vat.entity.BillDetail;
import pwc.taxtech.atms.vat.entity.BillDetailExample;
import java.math.BigDecimal;
import java.util.List;
@Mapper
public interface BillDetailMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bill_detail
*
* @mbg.generated
*/
long countByExample(BillDetailExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bill_detail
*
* @mbg.generated
*/
int deleteByExample(BillDetailExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bill_detail
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bill_detail
*
* @mbg.generated
*/
int insert(BillDetail record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bill_detail
*
* @mbg.generated
*/
int insertSelective(BillDetail record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bill_detail
*
* @mbg.generated
*/
List<BillDetail> selectByExampleWithRowbounds(BillDetailExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bill_detail
*
* @mbg.generated
*/
List<BillDetail> selectByExample(BillDetailExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bill_detail
*
* @mbg.generated
*/
BillDetail selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bill_detail
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") BillDetail record, @Param("example") BillDetailExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bill_detail
*
* @mbg.generated
*/
int updateByExample(@Param("record") BillDetail record, @Param("example") BillDetailExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bill_detail
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(BillDetail record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bill_detail
*
* @mbg.generated
*/
int updateByPrimaryKey(BillDetail record);
List<BillDetailDto> queryBillWithRevenueConf(
@Param("billType") String billType,
@Param("customer") String customer,
@Param("billNumber") String billNumber,
@Param("revenueCofId") Long revenueCofId,
@Param("billContent") String billContent,
@Param("department") String department,
@Param("billTaxRat") BigDecimal billTaxRat,
@Param("billDate") String billDate,
@Param("projectId") String projectId,
@Param("period") Integer period,
@Param("queryDate") String queryDate);
List<String> queryBillTypeGroupBy(@Param("projectId") String projectId,
@Param("period") Integer period);
}
\ No newline at end of file
......@@ -5,6 +5,7 @@ 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.dpo.InvoiceDataCondition;
import pwc.taxtech.atms.vat.entity.InvoiceData;
import pwc.taxtech.atms.vat.entity.InvoiceDataExample;
......@@ -107,4 +108,6 @@ public interface InvoiceDataMapper extends MyVatMapper {
int updateByPrimaryKey(InvoiceData record);
int insertBatch(List<InvoiceData> iDatas);
List<InvoiceData> selectByCondition(@Param("idCondition") InvoiceDataCondition condition);
}
\ No newline at end of file
package pwc.taxtech.atms.vat.dpo;
import pwc.taxtech.atms.dpo.PagingDto;
public class InvoiceDataCondition {
private PagingDto pageInfo;
private String orgId;
private Integer periodStart;
private Integer periodEnd;
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 getOrgId() {
return this.orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public PagingDto getPageInfo() {
return pageInfo;
}
public void setPageInfo(PagingDto pageInfo) {
this.pageInfo = pageInfo;
}
}
......@@ -35,8 +35,6 @@ public class AdjustmentTable extends BaseEntity implements Serializable {
*/
private String organizationId;
/**
* Database Column Remarks:
* 项目ID
......@@ -342,6 +340,17 @@ public class AdjustmentTable extends BaseEntity implements Serializable {
*/
private Date updateTime;
/**
* Database Column Remarks:
* 税务系统期间
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column adjustment_table.tms_period
*
* @mbg.generated
*/
private Integer tmsPeriod;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table adjustment_table
......@@ -1054,6 +1063,30 @@ public class AdjustmentTable extends BaseEntity implements Serializable {
this.updateTime = updateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column adjustment_table.tms_period
*
* @return the value of adjustment_table.tms_period
*
* @mbg.generated
*/
public Integer getTmsPeriod() {
return tmsPeriod;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column adjustment_table.tms_period
*
* @param tmsPeriod the value for adjustment_table.tms_period
*
* @mbg.generated
*/
public void setTmsPeriod(Integer tmsPeriod) {
this.tmsPeriod = tmsPeriod;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table adjustment_table
......@@ -1095,6 +1128,7 @@ public class AdjustmentTable extends BaseEntity implements Serializable {
sb.append(", endBalBeq=").append(endBalBeq);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", tmsPeriod=").append(tmsPeriod);
sb.append("]");
return sb.toString();
}
......
......@@ -2155,6 +2155,66 @@ public class AdjustmentTableExample {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andTmsPeriodIsNull() {
addCriterion("tms_period is null");
return (Criteria) this;
}
public Criteria andTmsPeriodIsNotNull() {
addCriterion("tms_period is not null");
return (Criteria) this;
}
public Criteria andTmsPeriodEqualTo(Integer value) {
addCriterion("tms_period =", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodNotEqualTo(Integer value) {
addCriterion("tms_period <>", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodGreaterThan(Integer value) {
addCriterion("tms_period >", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodGreaterThanOrEqualTo(Integer value) {
addCriterion("tms_period >=", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodLessThan(Integer value) {
addCriterion("tms_period <", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodLessThanOrEqualTo(Integer value) {
addCriterion("tms_period <=", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodIn(List<Integer> values) {
addCriterion("tms_period in", values, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodNotIn(List<Integer> values) {
addCriterion("tms_period not in", values, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodBetween(Integer value1, Integer value2) {
addCriterion("tms_period between", value1, value2, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodNotBetween(Integer value1, Integer value2) {
addCriterion("tms_period not between", value1, value2, "tmsPeriod");
return (Criteria) this;
}
}
/**
......
......@@ -35,6 +35,17 @@ public class CashFlow extends BaseEntity implements Serializable {
*/
private String organizationId;
/**
* Database Column Remarks:
* 卡片id
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column cash_flow.project_id
*
* @mbg.generated
*/
private String projectId;
/**
* Database Column Remarks:
* 数据日期
......@@ -286,6 +297,30 @@ public class CashFlow extends BaseEntity implements Serializable {
this.organizationId = organizationId == null ? null : organizationId.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column cash_flow.project_id
*
* @return the value of cash_flow.project_id
*
* @mbg.generated
*/
public String getProjectId() {
return projectId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column cash_flow.project_id
*
* @param projectId the value for cash_flow.project_id
*
* @mbg.generated
*/
public void setProjectId(String projectId) {
this.projectId = projectId == null ? null : projectId.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column cash_flow.date
......@@ -732,6 +767,7 @@ public class CashFlow extends BaseEntity implements Serializable {
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", organizationId=").append(organizationId);
sb.append(", projectId=").append(projectId);
sb.append(", date=").append(date);
sb.append(", source=").append(source);
sb.append(", tmsPeriod=").append(tmsPeriod);
......
......@@ -326,6 +326,76 @@ public class CashFlowExample {
return (Criteria) this;
}
public Criteria andProjectIdIsNull() {
addCriterion("project_id is null");
return (Criteria) this;
}
public Criteria andProjectIdIsNotNull() {
addCriterion("project_id is not null");
return (Criteria) this;
}
public Criteria andProjectIdEqualTo(String value) {
addCriterion("project_id =", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotEqualTo(String value) {
addCriterion("project_id <>", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdGreaterThan(String value) {
addCriterion("project_id >", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdGreaterThanOrEqualTo(String value) {
addCriterion("project_id >=", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLessThan(String value) {
addCriterion("project_id <", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLessThanOrEqualTo(String value) {
addCriterion("project_id <=", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLike(String value) {
addCriterion("project_id like", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotLike(String value) {
addCriterion("project_id not like", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdIn(List<String> values) {
addCriterion("project_id in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotIn(List<String> values) {
addCriterion("project_id not in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdBetween(String value1, String value2) {
addCriterion("project_id between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotBetween(String value1, String value2) {
addCriterion("project_id not between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria andDateIsNull() {
addCriterion("`date` is null");
return (Criteria) this;
......
......@@ -46,6 +46,28 @@ public class RedLetterInfoTable extends BaseEntity implements Serializable {
*/
private String projectId;
/**
* Database Column Remarks:
* 税务系统期间
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column red_letter_info_table.tms_period
*
* @mbg.generated
*/
private Integer tmsPeriod;
/**
* Database Column Remarks:
* 填开日期 yyyyMM 对应期间
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column red_letter_info_table.fill_in_date
*
* @mbg.generated
*/
private Integer fillInDate;
/**
* Database Column Remarks:
* 主体编号
......@@ -79,17 +101,6 @@ public class RedLetterInfoTable extends BaseEntity implements Serializable {
*/
private String redLetterInvoiceInfoTableNum;
/**
* Database Column Remarks:
* 填开日期 yyyyMM
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column red_letter_info_table.fill_in_date
*
* @mbg.generated
*/
private Integer fillInDate;
/**
* Database Column Remarks:
* 销方税号
......@@ -280,6 +291,54 @@ public class RedLetterInfoTable extends BaseEntity implements Serializable {
this.projectId = projectId == null ? null : projectId.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column red_letter_info_table.tms_period
*
* @return the value of red_letter_info_table.tms_period
*
* @mbg.generated
*/
public Integer getTmsPeriod() {
return tmsPeriod;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column red_letter_info_table.tms_period
*
* @param tmsPeriod the value for red_letter_info_table.tms_period
*
* @mbg.generated
*/
public void setTmsPeriod(Integer tmsPeriod) {
this.tmsPeriod = tmsPeriod;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column red_letter_info_table.fill_in_date
*
* @return the value of red_letter_info_table.fill_in_date
*
* @mbg.generated
*/
public Integer getFillInDate() {
return fillInDate;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column red_letter_info_table.fill_in_date
*
* @param fillInDate the value for red_letter_info_table.fill_in_date
*
* @mbg.generated
*/
public void setFillInDate(Integer fillInDate) {
this.fillInDate = fillInDate;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column red_letter_info_table.subject_num
......@@ -352,30 +411,6 @@ public class RedLetterInfoTable extends BaseEntity implements Serializable {
this.redLetterInvoiceInfoTableNum = redLetterInvoiceInfoTableNum == null ? null : redLetterInvoiceInfoTableNum.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column red_letter_info_table.fill_in_date
*
* @return the value of red_letter_info_table.fill_in_date
*
* @mbg.generated
*/
public Integer getFillInDate() {
return fillInDate;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column red_letter_info_table.fill_in_date
*
* @param fillInDate the value for red_letter_info_table.fill_in_date
*
* @mbg.generated
*/
public void setFillInDate(Integer fillInDate) {
this.fillInDate = fillInDate;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column red_letter_info_table.sales_tax_number
......@@ -631,10 +666,11 @@ public class RedLetterInfoTable extends BaseEntity implements Serializable {
sb.append(", id=").append(id);
sb.append(", organizationId=").append(organizationId);
sb.append(", projectId=").append(projectId);
sb.append(", tmsPeriod=").append(tmsPeriod);
sb.append(", fillInDate=").append(fillInDate);
sb.append(", subjectNum=").append(subjectNum);
sb.append(", subjectName=").append(subjectName);
sb.append(", redLetterInvoiceInfoTableNum=").append(redLetterInvoiceInfoTableNum);
sb.append(", fillInDate=").append(fillInDate);
sb.append(", salesTaxNumber=").append(salesTaxNumber);
sb.append(", salespersonName=").append(salespersonName);
sb.append(", totalAmount=").append(totalAmount);
......
......@@ -396,6 +396,126 @@ public class RedLetterInfoTableExample {
return (Criteria) this;
}
public Criteria andTmsPeriodIsNull() {
addCriterion("tms_period is null");
return (Criteria) this;
}
public Criteria andTmsPeriodIsNotNull() {
addCriterion("tms_period is not null");
return (Criteria) this;
}
public Criteria andTmsPeriodEqualTo(Integer value) {
addCriterion("tms_period =", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodNotEqualTo(Integer value) {
addCriterion("tms_period <>", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodGreaterThan(Integer value) {
addCriterion("tms_period >", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodGreaterThanOrEqualTo(Integer value) {
addCriterion("tms_period >=", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodLessThan(Integer value) {
addCriterion("tms_period <", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodLessThanOrEqualTo(Integer value) {
addCriterion("tms_period <=", value, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodIn(List<Integer> values) {
addCriterion("tms_period in", values, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodNotIn(List<Integer> values) {
addCriterion("tms_period not in", values, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodBetween(Integer value1, Integer value2) {
addCriterion("tms_period between", value1, value2, "tmsPeriod");
return (Criteria) this;
}
public Criteria andTmsPeriodNotBetween(Integer value1, Integer value2) {
addCriterion("tms_period not between", value1, value2, "tmsPeriod");
return (Criteria) this;
}
public Criteria andFillInDateIsNull() {
addCriterion("fill_in_date is null");
return (Criteria) this;
}
public Criteria andFillInDateIsNotNull() {
addCriterion("fill_in_date is not null");
return (Criteria) this;
}
public Criteria andFillInDateEqualTo(Integer value) {
addCriterion("fill_in_date =", value, "fillInDate");
return (Criteria) this;
}
public Criteria andFillInDateNotEqualTo(Integer value) {
addCriterion("fill_in_date <>", value, "fillInDate");
return (Criteria) this;
}
public Criteria andFillInDateGreaterThan(Integer value) {
addCriterion("fill_in_date >", value, "fillInDate");
return (Criteria) this;
}
public Criteria andFillInDateGreaterThanOrEqualTo(Integer value) {
addCriterion("fill_in_date >=", value, "fillInDate");
return (Criteria) this;
}
public Criteria andFillInDateLessThan(Integer value) {
addCriterion("fill_in_date <", value, "fillInDate");
return (Criteria) this;
}
public Criteria andFillInDateLessThanOrEqualTo(Integer value) {
addCriterion("fill_in_date <=", value, "fillInDate");
return (Criteria) this;
}
public Criteria andFillInDateIn(List<Integer> values) {
addCriterion("fill_in_date in", values, "fillInDate");
return (Criteria) this;
}
public Criteria andFillInDateNotIn(List<Integer> values) {
addCriterion("fill_in_date not in", values, "fillInDate");
return (Criteria) this;
}
public Criteria andFillInDateBetween(Integer value1, Integer value2) {
addCriterion("fill_in_date between", value1, value2, "fillInDate");
return (Criteria) this;
}
public Criteria andFillInDateNotBetween(Integer value1, Integer value2) {
addCriterion("fill_in_date not between", value1, value2, "fillInDate");
return (Criteria) this;
}
public Criteria andSubjectNumIsNull() {
addCriterion("subject_num is null");
return (Criteria) this;
......@@ -606,66 +726,6 @@ public class RedLetterInfoTableExample {
return (Criteria) this;
}
public Criteria andFillInDateIsNull() {
addCriterion("fill_in_date is null");
return (Criteria) this;
}
public Criteria andFillInDateIsNotNull() {
addCriterion("fill_in_date is not null");
return (Criteria) this;
}
public Criteria andFillInDateEqualTo(Integer value) {
addCriterion("fill_in_date =", value, "fillInDate");
return (Criteria) this;
}
public Criteria andFillInDateNotEqualTo(Integer value) {
addCriterion("fill_in_date <>", value, "fillInDate");
return (Criteria) this;
}
public Criteria andFillInDateGreaterThan(Integer value) {
addCriterion("fill_in_date >", value, "fillInDate");
return (Criteria) this;
}
public Criteria andFillInDateGreaterThanOrEqualTo(Integer value) {
addCriterion("fill_in_date >=", value, "fillInDate");
return (Criteria) this;
}
public Criteria andFillInDateLessThan(Integer value) {
addCriterion("fill_in_date <", value, "fillInDate");
return (Criteria) this;
}
public Criteria andFillInDateLessThanOrEqualTo(Integer value) {
addCriterion("fill_in_date <=", value, "fillInDate");
return (Criteria) this;
}
public Criteria andFillInDateIn(List<Integer> values) {
addCriterion("fill_in_date in", values, "fillInDate");
return (Criteria) this;
}
public Criteria andFillInDateNotIn(List<Integer> values) {
addCriterion("fill_in_date not in", values, "fillInDate");
return (Criteria) this;
}
public Criteria andFillInDateBetween(Integer value1, Integer value2) {
addCriterion("fill_in_date between", value1, value2, "fillInDate");
return (Criteria) this;
}
public Criteria andFillInDateNotBetween(Integer value1, Integer value2) {
addCriterion("fill_in_date not between", value1, value2, "fillInDate");
return (Criteria) this;
}
public Criteria andSalesTaxNumberIsNull() {
addCriterion("sales_tax_number is null");
return (Criteria) this;
......
......@@ -9,6 +9,7 @@
<id column="id" jdbcType="BIGINT" property="id" />
<result column="organization_id" jdbcType="VARCHAR" property="organizationId" />
<result column="period" jdbcType="INTEGER" property="period" />
<result column="source" jdbcType="VARCHAR" property="source" />
<result column="convertion_type" jdbcType="VARCHAR" property="convertionType" />
<result column="currency_from" jdbcType="VARCHAR" property="currencyFrom" />
<result column="currency_to" jdbcType="VARCHAR" property="currencyTo" />
......@@ -89,8 +90,8 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, organization_id, period, convertion_type, currency_from, currency_to, start_date,
end_date, rate, create_time, update_time
id, organization_id, period, source, convertion_type, currency_from, currency_to,
start_date, end_date, rate, create_time, update_time
</sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.entity.OrganizationAccountingRateExample" resultMap="BaseResultMap">
<!--
......@@ -144,13 +145,15 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into organization_accounting_rate (id, organization_id, period,
convertion_type, currency_from, currency_to,
start_date, end_date, rate,
create_time, update_time)
source, convertion_type, currency_from,
currency_to, start_date, end_date,
rate, create_time, update_time
)
values (#{id,jdbcType=BIGINT}, #{organizationId,jdbcType=VARCHAR}, #{period,jdbcType=INTEGER},
#{convertionType,jdbcType=VARCHAR}, #{currencyFrom,jdbcType=VARCHAR}, #{currencyTo,jdbcType=VARCHAR},
#{startDate,jdbcType=TIMESTAMP}, #{endDate,jdbcType=TIMESTAMP}, #{rate,jdbcType=REAL},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
#{source,jdbcType=VARCHAR}, #{convertionType,jdbcType=VARCHAR}, #{currencyFrom,jdbcType=VARCHAR},
#{currencyTo,jdbcType=VARCHAR}, #{startDate,jdbcType=TIMESTAMP}, #{endDate,jdbcType=TIMESTAMP},
#{rate,jdbcType=REAL}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.OrganizationAccountingRate">
<!--
......@@ -168,6 +171,9 @@
<if test="period != null">
period,
</if>
<if test="source != null">
source,
</if>
<if test="convertionType != null">
convertion_type,
</if>
......@@ -203,6 +209,9 @@
<if test="period != null">
#{period,jdbcType=INTEGER},
</if>
<if test="source != null">
#{source,jdbcType=VARCHAR},
</if>
<if test="convertionType != null">
#{convertionType,jdbcType=VARCHAR},
</if>
......@@ -255,6 +264,9 @@
<if test="record.period != null">
period = #{record.period,jdbcType=INTEGER},
</if>
<if test="record.source != null">
source = #{record.source,jdbcType=VARCHAR},
</if>
<if test="record.convertionType != null">
convertion_type = #{record.convertionType,jdbcType=VARCHAR},
</if>
......@@ -293,6 +305,7 @@
set id = #{record.id,jdbcType=BIGINT},
organization_id = #{record.organizationId,jdbcType=VARCHAR},
period = #{record.period,jdbcType=INTEGER},
source = #{record.source,jdbcType=VARCHAR},
convertion_type = #{record.convertionType,jdbcType=VARCHAR},
currency_from = #{record.currencyFrom,jdbcType=VARCHAR},
currency_to = #{record.currencyTo,jdbcType=VARCHAR},
......@@ -318,6 +331,9 @@
<if test="period != null">
period = #{period,jdbcType=INTEGER},
</if>
<if test="source != null">
source = #{source,jdbcType=VARCHAR},
</if>
<if test="convertionType != null">
convertion_type = #{convertionType,jdbcType=VARCHAR},
</if>
......@@ -353,6 +369,7 @@
update organization_accounting_rate
set organization_id = #{organizationId,jdbcType=VARCHAR},
period = #{period,jdbcType=INTEGER},
source = #{source,jdbcType=VARCHAR},
convertion_type = #{convertionType,jdbcType=VARCHAR},
currency_from = #{currencyFrom,jdbcType=VARCHAR},
currency_to = #{currencyTo,jdbcType=VARCHAR},
......
......@@ -35,6 +35,7 @@
<result column="end_bal_beq" jdbcType="DECIMAL" property="endBalBeq" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="tms_period" jdbcType="INTEGER" property="tmsPeriod" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
......@@ -111,7 +112,7 @@
segment5, segment6, segment7, segment8, segment9, segment10, segment1_name, segment2_name,
segment3_name, segment4_name, segment5_name, segment6_name, segment7_name, segment8_name,
segment9_name, segment10_name, period_dr_beq, period_cr_beq, end_bal_beq, create_time,
update_time
update_time, tms_period
</sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.AdjustmentTableExample" resultMap="BaseResultMap">
<!--
......@@ -173,7 +174,8 @@
segment5_name, segment6_name, segment7_name,
segment8_name, segment9_name, segment10_name,
period_dr_beq, period_cr_beq, end_bal_beq,
create_time, update_time)
create_time, update_time, tms_period
)
values (#{id,jdbcType=BIGINT}, #{organizationId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR},
#{period,jdbcType=INTEGER}, #{segment1,jdbcType=VARCHAR}, #{segment2,jdbcType=VARCHAR},
#{segment3,jdbcType=VARCHAR}, #{segment4,jdbcType=VARCHAR}, #{segment5,jdbcType=VARCHAR},
......@@ -183,7 +185,8 @@
#{segment5Name,jdbcType=VARCHAR}, #{segment6Name,jdbcType=VARCHAR}, #{segment7Name,jdbcType=VARCHAR},
#{segment8Name,jdbcType=VARCHAR}, #{segment9Name,jdbcType=VARCHAR}, #{segment10Name,jdbcType=VARCHAR},
#{periodDrBeq,jdbcType=DECIMAL}, #{periodCrBeq,jdbcType=DECIMAL}, #{endBalBeq,jdbcType=DECIMAL},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{tmsPeriod,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.AdjustmentTable">
<!--
......@@ -279,6 +282,9 @@
<if test="updateTime != null">
update_time,
</if>
<if test="tmsPeriod != null">
tms_period,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
......@@ -368,6 +374,9 @@
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="tmsPeriod != null">
#{tmsPeriod,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.AdjustmentTableExample" resultType="java.lang.Long">
......@@ -474,6 +483,9 @@
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.tmsPeriod != null">
tms_period = #{record.tmsPeriod,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
......@@ -513,7 +525,8 @@
period_cr_beq = #{record.periodCrBeq,jdbcType=DECIMAL},
end_bal_beq = #{record.endBalBeq,jdbcType=DECIMAL},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
tms_period = #{record.tmsPeriod,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -609,6 +622,9 @@
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="tmsPeriod != null">
tms_period = #{tmsPeriod,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
......@@ -645,7 +661,8 @@
period_cr_beq = #{periodCrBeq,jdbcType=DECIMAL},
end_bal_beq = #{endBalBeq,jdbcType=DECIMAL},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
update_time = #{updateTime,jdbcType=TIMESTAMP},
tms_period = #{tmsPeriod,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.AdjustmentTableExample" resultMap="BaseResultMap">
......@@ -668,7 +685,7 @@
</select>
<select id ="selectBeforeAdjustData" parameterType="java.util.Map" resultType="pwc.taxtech.atms.vat.entity.AdjustmentTable">
<select id="selectBeforeAdjustData" parameterType="java.util.Map" resultType="pwc.taxtech.atms.vat.entity.AdjustmentTable">
SELECT
max(CASE #{period}
WHEN 0 THEN
......
......@@ -8,6 +8,7 @@
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="organization_id" jdbcType="VARCHAR" property="organizationId" />
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
<result column="date" jdbcType="TIMESTAMP" property="date" />
<result column="source" jdbcType="VARCHAR" property="source" />
<result column="tms_period" jdbcType="INTEGER" property="tmsPeriod" />
......@@ -98,9 +99,9 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, organization_id, `date`, `source`, tms_period, period, `status`, ledger_id, ledger_name,
ledger_currency_code, entity_code, entity_name, category, frequency, item_name, item_name2,
period_amt, ytd_amt, create_time, update_time
id, organization_id, project_id, `date`, `source`, tms_period, period, `status`,
ledger_id, ledger_name, ledger_currency_code, entity_code, entity_name, category,
frequency, item_name, item_name2, period_amt, ytd_amt, create_time, update_time
</sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.CashFlowExample" resultMap="BaseResultMap">
<!--
......@@ -153,20 +154,22 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into cash_flow (id, organization_id, `date`,
`source`, tms_period, period,
`status`, ledger_id, ledger_name,
ledger_currency_code, entity_code, entity_name,
category, frequency, item_name,
item_name2, period_amt, ytd_amt,
create_time, update_time)
values (#{id,jdbcType=BIGINT}, #{organizationId,jdbcType=VARCHAR}, #{date,jdbcType=TIMESTAMP},
#{source,jdbcType=VARCHAR}, #{tmsPeriod,jdbcType=INTEGER}, #{period,jdbcType=INTEGER},
#{status,jdbcType=VARCHAR}, #{ledgerId,jdbcType=VARCHAR}, #{ledgerName,jdbcType=VARCHAR},
#{ledgerCurrencyCode,jdbcType=VARCHAR}, #{entityCode,jdbcType=VARCHAR}, #{entityName,jdbcType=VARCHAR},
#{category,jdbcType=VARCHAR}, #{frequency,jdbcType=VARCHAR}, #{itemName,jdbcType=VARCHAR},
#{itemName2,jdbcType=VARCHAR}, #{periodAmt,jdbcType=DECIMAL}, #{ytdAmt,jdbcType=DECIMAL},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
insert into cash_flow (id, organization_id, project_id,
`date`, `source`, tms_period,
period, `status`, ledger_id,
ledger_name, ledger_currency_code, entity_code,
entity_name, category, frequency,
item_name, item_name2, period_amt,
ytd_amt, create_time, update_time
)
values (#{id,jdbcType=BIGINT}, #{organizationId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR},
#{date,jdbcType=TIMESTAMP}, #{source,jdbcType=VARCHAR}, #{tmsPeriod,jdbcType=INTEGER},
#{period,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR}, #{ledgerId,jdbcType=VARCHAR},
#{ledgerName,jdbcType=VARCHAR}, #{ledgerCurrencyCode,jdbcType=VARCHAR}, #{entityCode,jdbcType=VARCHAR},
#{entityName,jdbcType=VARCHAR}, #{category,jdbcType=VARCHAR}, #{frequency,jdbcType=VARCHAR},
#{itemName,jdbcType=VARCHAR}, #{itemName2,jdbcType=VARCHAR}, #{periodAmt,jdbcType=DECIMAL},
#{ytdAmt,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.CashFlow">
<!--
......@@ -181,6 +184,9 @@
<if test="organizationId != null">
organization_id,
</if>
<if test="projectId != null">
project_id,
</if>
<if test="date != null">
`date`,
</if>
......@@ -243,6 +249,9 @@
<if test="organizationId != null">
#{organizationId,jdbcType=VARCHAR},
</if>
<if test="projectId != null">
#{projectId,jdbcType=VARCHAR},
</if>
<if test="date != null">
#{date,jdbcType=TIMESTAMP},
</if>
......@@ -322,6 +331,9 @@
<if test="record.organizationId != null">
organization_id = #{record.organizationId,jdbcType=VARCHAR},
</if>
<if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=VARCHAR},
</if>
<if test="record.date != null">
`date` = #{record.date,jdbcType=TIMESTAMP},
</if>
......@@ -389,6 +401,7 @@
update cash_flow
set id = #{record.id,jdbcType=BIGINT},
organization_id = #{record.organizationId,jdbcType=VARCHAR},
project_id = #{record.projectId,jdbcType=VARCHAR},
`date` = #{record.date,jdbcType=TIMESTAMP},
`source` = #{record.source,jdbcType=VARCHAR},
tms_period = #{record.tmsPeriod,jdbcType=INTEGER},
......@@ -421,6 +434,9 @@
<if test="organizationId != null">
organization_id = #{organizationId,jdbcType=VARCHAR},
</if>
<if test="projectId != null">
project_id = #{projectId,jdbcType=VARCHAR},
</if>
<if test="date != null">
`date` = #{date,jdbcType=TIMESTAMP},
</if>
......@@ -485,6 +501,7 @@
-->
update cash_flow
set organization_id = #{organizationId,jdbcType=VARCHAR},
project_id = #{projectId,jdbcType=VARCHAR},
`date` = #{date,jdbcType=TIMESTAMP},
`source` = #{source,jdbcType=VARCHAR},
tms_period = #{tmsPeriod,jdbcType=INTEGER},
......
<?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.InvoiceDataMapper">
<sql id="QueryCondition">
1 = 1
<if test="@com.github.pagehelper.util.StringUtil@isNotEmpty(idCondition.orgId)">
AND organization_id= #{idCondition.orgId,jdbcType=VARCHAR}
</if>
<if test="idCondition.periodStart!=null">
AND period &gt;= #{idCondition.periodStart,jdbcType=INTEGER}
</if>
<if test="idCondition.periodEnd!=null">
AND period &lt;= #{idCondition.periodEnd,jdbcType=INTEGER}
</if>
</sql>
<select id="selectByCondition" parameterType="pwc.taxtech.atms.vat.dpo.InvoiceDataCondition" resultMap="BaseResultMap">
SELECT
id.*
FROM
invoice_data id
WHERE
<include refid="QueryCondition"/>
</select>
<insert id="insertBatch" parameterType="java.util.List">
insert into invoice_data
(<include refid="Base_Column_List"/>)
......
......@@ -26,7 +26,7 @@
when tbf.segment3 like '8002%' and rc.id is null then 1
<![CDATA[WHEN rc.id IS NOT NULL and (rc.start_date > #{queryDate} or rc.end_date < #{queryDate}) then 1]]>
<![CDATA[WHEN rc.id IS NOT NULL and rc.start_date <= #{queryDate} and rc.end_date >= #{queryDate} THEN 2]]>
else 3 end as isEmpty
else 3 end as emptyCode
from trial_balance_final as tbf
left join
revenue_config as rc
......@@ -70,8 +70,8 @@
</if>
) as detail
where
<![CDATA[detail.isEmpty < 3]]>
order by detail.isEmpty
<![CDATA[detail.emptyCode < 3]]>
order by detail.emptyCode
</select>
......
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