Commit 1730f6ac authored by sherlock's avatar sherlock

Merge branch 'dev_oracle_sherlock' into 'dev_oracle'

another dataSource

See merge request root/atms!137
parents 9e2a6a9a f4f918e1
......@@ -14,6 +14,15 @@
</parent>
<dependencies>
<!-- https://mvnrepository.com/artifact/com.oracle/ojdbc6 -->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>pwc.taxtech.atms</groupId>
<artifactId>atms-dao</artifactId>
......
......@@ -9,6 +9,8 @@ import pwc.taxtech.atms.dao.OrganizationMapper;
import pwc.taxtech.atms.dao.ProjectDao;
import pwc.taxtech.atms.dao.ProjectMapper;
import pwc.taxtech.atms.dao.ProjectServiceTypeMapper;
import pwc.taxtech.atms.invoice.InputInvoiceMapper;
import pwc.taxtech.atms.invoice.OutputInvoiceMapper;
import pwc.taxtech.atms.service.impl.DistributedIdService;
import pwc.taxtech.atms.vat.dao.*;
......@@ -30,19 +32,21 @@ public class SpringContextUtil implements ApplicationContextAware {
public static PeriodStandardAccountMapper periodStandardAccountMapper;
public static ProjectDao projectDao;
public static BalanceMapper balanceMapper;
public static DataSourceMapper dataSourceMapper;
// public static DataSourceMapper dataSourceMapper;
public static PeriodDataSourceMapper periodDataSourceMapper;
public static DataSourceDetailMapper dataSourceDetailMapper;
// public static DataSourceDetailMapper dataSourceDetailMapper;
public static PeriodDataSourceDetailMapper periodDataSourceDetailMapper;
public static PeriodFormulaBlockMapper periodFormulaBlockMapper;
public static VatEnterpriseAccountDao vatEnterpriseAccountDao;
public static VatEnterpriseAccountMapper vatEnterpriseAccountMapper;
public static PeriodEnterpriseAccountMapper periodEnterpriseAccountMapper;
public static BalanceStdManualMapper balanceStdManualMapper;
public static OutputVatInvoiceMapper outputVATInvoiceMapper;
// public static OutputVatInvoiceMapper outputVATInvoiceMapper;
public static OutputInvoiceMapper outputInvoiceMapper;
public static PeriodTaxRuleSettingMapper periodTaxRuleSettingMapper;
public static InputVatInvoiceDao inputVatInvoiceDao;
public static InputVatInvoiceMapper inputVATInvoiceMapper;
public static InputInvoiceDao inputInvoiceDao;
// public static InputVatInvoiceMapper inputVATInvoiceMapper;
public static InputInvoiceMapper inputInvoiceMapper;
public static AssetsListMapper assetsListMapper;
public static ProjectMapper projectMapper;
public static CellDataSourceMapper cellDataSourceMapper;
......@@ -72,23 +76,23 @@ public class SpringContextUtil implements ApplicationContextAware {
periodCellTemplateMapper = webApplicationContext.getBean(PeriodCellTemplateMapper.class);
projectServiceTypeMapper = webApplicationContext.getBean(ProjectServiceTypeMapper.class);
periodTemplateMapper = webApplicationContext.getBean(PeriodTemplateMapper.class);
periodStandardAccountMapper = webApplicationContext.getBean(PeriodStandardAccountMapper.class);
// periodStandardAccountMapper = webApplicationContext.getBean(PeriodStandardAccountMapper.class);
periodStandardAccountMapper = webApplicationContext.getBean(PeriodStandardAccountMapper.class);
projectDao = webApplicationContext.getBean(ProjectDao.class);
balanceMapper = webApplicationContext.getBean(BalanceMapper.class);
dataSourceMapper = webApplicationContext.getBean(DataSourceMapper.class);
// dataSourceMapper = webApplicationContext.getBean(DataSourceMapper.class);
periodDataSourceMapper = webApplicationContext.getBean(PeriodDataSourceMapper.class);
dataSourceDetailMapper = webApplicationContext.getBean(DataSourceDetailMapper.class);
// dataSourceDetailMapper = webApplicationContext.getBean(DataSourceDetailMapper.class);
periodDataSourceDetailMapper = webApplicationContext.getBean(PeriodDataSourceDetailMapper.class);
periodFormulaBlockMapper = webApplicationContext.getBean(PeriodFormulaBlockMapper.class);
vatEnterpriseAccountDao = webApplicationContext.getBean(VatEnterpriseAccountDao.class);
vatEnterpriseAccountMapper = webApplicationContext.getBean(VatEnterpriseAccountMapper.class);
periodEnterpriseAccountMapper = webApplicationContext.getBean(PeriodEnterpriseAccountMapper.class);
balanceStdManualMapper = webApplicationContext.getBean(BalanceStdManualMapper.class);
outputVATInvoiceMapper = webApplicationContext.getBean(OutputVatInvoiceMapper.class);
outputInvoiceMapper = webApplicationContext.getBean(OutputInvoiceMapper.class);
periodTaxRuleSettingMapper = webApplicationContext.getBean(PeriodTaxRuleSettingMapper.class);
inputVatInvoiceDao = webApplicationContext.getBean(InputVatInvoiceDao.class);
inputVATInvoiceMapper = webApplicationContext.getBean(InputVatInvoiceMapper.class);
inputInvoiceDao = webApplicationContext.getBean(InputInvoiceDao.class);
inputInvoiceMapper = webApplicationContext.getBean(InputInvoiceMapper.class);
assetsListMapper = webApplicationContext.getBean(AssetsListMapper.class);
projectMapper = webApplicationContext.getBean(ProjectMapper.class);
cellDataSourceMapper = webApplicationContext.getBean(CellDataSourceMapper.class);
......
......@@ -3,17 +3,18 @@ package pwc.taxtech.atms.vat.dao;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.invoice.InputInvoiceMapper;
import pwc.taxtech.atms.vat.entity.InputVatInvoice;
import pwc.taxtech.atms.vat.entity.InputVatInvoiceExample;
import java.util.List;
@Service
public class InputVatInvoiceDao {
public class InputInvoiceDao {
@Autowired
InputVatInvoiceMapper inputVATInvoiceMapper;
InputInvoiceMapper inputInvoiceMapper;
public List<InputVatInvoice> getInputVATInvoice(Integer period, Integer invoiceType, String checkPass, String scanPass, String notPass) {
public List<InputVatInvoice> getInputInvoice(Integer period, Integer invoiceType, String checkPass, String scanPass, String notPass) {
InputVatInvoiceExample example = new InputVatInvoiceExample();
InputVatInvoiceExample.Criteria criteria = example.createCriteria();
InputVatInvoiceExample.Criteria criteria1 = example.createCriteria();
......@@ -37,6 +38,6 @@ public class InputVatInvoiceDao {
example.or(criteria1);
}
return inputVATInvoiceMapper.selectByExample(example);
return inputInvoiceMapper.selectByExample(example);
}
}
......@@ -47,8 +47,8 @@ public class VatAbstractService {
public PeriodCellTemplateMapper periodCellTemplateMapper;
@Autowired
public PeriodCellTemplateConfigMapper periodCellTemplateConfigMapper;
@Autowired
public DataSourceMapper dataSourceMapper;
// @Autowired
// public DataSourceMapper dataSourceMapper;
@Autowired
public PeriodDataSourceMapper periodDataSourceMapper;
@Autowired
......
......@@ -81,22 +81,22 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
List<InputVatInvoice> inputVATInvoices;
if (authenticationType == 1 && formulaContext.getIsYear()) {
inputVATInvoices = SpringContextUtil.inputVatInvoiceDao.getInputVATInvoice(null, invoiceType,
inputVATInvoices = SpringContextUtil.inputInvoiceDao.getInputInvoice(null, invoiceType,
Constant.InputInvoiceCertificationResult.CheckPass, Constant.InputInvoiceCertificationResult.ScanPass,
null);
} else if (authenticationType == 1) {
inputVATInvoices = SpringContextUtil.inputVatInvoiceDao.getInputVATInvoice(period, invoiceType,
inputVATInvoices = SpringContextUtil.inputInvoiceDao.getInputInvoice(period, invoiceType,
Constant.InputInvoiceCertificationResult.CheckPass, Constant.InputInvoiceCertificationResult.ScanPass,
null);
}
// 认证未通过与未认证暂认为是同一个意思
else if ((authenticationType == 1 || authenticationType == 2) && formulaContext.getIsYear()) {
inputVATInvoices = SpringContextUtil.inputVatInvoiceDao.getInputVATInvoice(null, invoiceType,
inputVATInvoices = SpringContextUtil.inputInvoiceDao.getInputInvoice(null, invoiceType,
null, null, Constant.InputInvoiceCertificationResult.NotPass);
}
// 认证未通过与未认证暂认为是同一个意思
else if (authenticationType == 0 || authenticationType == 2) {
inputVATInvoices = SpringContextUtil.inputVatInvoiceDao.getInputVATInvoice(period, invoiceType, null,
inputVATInvoices = SpringContextUtil.inputInvoiceDao.getInputInvoice(period, invoiceType, null,
null, Constant.InputInvoiceCertificationResult.NotPass);
} else {
saveFormulaBlock(period, ec, formulaExpression, new BigDecimal("0.0"), 0L, formulaContext.getProjectId());
......
......@@ -84,7 +84,7 @@ public class JXFPMX extends FunctionBase implements FreeRefFunction {
}
String dbName = SpringContextUtil.projectDao.getDbNameWithYearAndOrgId(formulaContext.getOrganizationId(), curYear);
List<InputVATInvoiceResultDto> inputInvoice = SpringContextUtil.inputVATInvoiceMapper.getInputVATInvoiceResultDto(dbName);
List<InputVATInvoiceResultDto> inputInvoice = SpringContextUtil.inputInvoiceMapper.getInputVATInvoiceResultDto(dbName);
if (!goodsName.equals("99")) {
inputInvoice = inputInvoice.stream()
......
......@@ -71,7 +71,7 @@ public class XXFP extends FunctionBase implements FreeRefFunction {
}
String dbName = SpringContextUtil.projectDao.getDbNameWithYearAndOrgId(formulaContext.getOrganizationId(), curYear);
List<OutputVATInvoiceDto> outputInvoice = SpringContextUtil.outputVATInvoiceMapper.getVatInvoiceWithItems(dbName);
List<OutputVATInvoiceDto> outputInvoice = SpringContextUtil.outputInvoiceMapper.getVatInvoiceWithItems(dbName);
if (invoiceType != 99) {
outputInvoice = outputInvoice.stream()
......
......@@ -26,6 +26,11 @@
</property>
</bean>
<bean id="datasource2" class="com.alibaba.druid.pool.DruidDataSource">
<property name="url" value="${jdbc2_url}" />
<property name="username" value="${jdbc2_username}" />
<property name="password" value="${jdbc2_password}" />
</bean>
<!-- **************************************************************** -->
<!-- 启用注解, 启用component-scan -->
<!-- **************************************************************** -->
......@@ -35,6 +40,12 @@
<import resource="applicationContext-datasource.xml" />
<bean id="sqlSessionFactory2" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="datasource2"/>
<property name="configLocation" value="classpath:sqlMapConfig.xml"/>
<property name="mapperLocations" value="classpath*:pwc/taxtech/atms/invoice/*Mapper.xml"/>
</bean>
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="configLocation" value="classpath:sqlMapConfig.xml" />
......@@ -49,6 +60,13 @@
<constructor-arg ref="sqlSessionFactory" />
</bean>
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="pwc.taxtech.atms.invoice" />
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory2"/>
</bean>
<bean id="transactionManager2" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="datasource2" />
</bean>
<!-- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"> <property name="basePackage" value="pwc.taxtech.atms" /> </bean> -->
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
......
......@@ -4,6 +4,12 @@ jdbc_password=taxadmin2018
#jdbc_password=111111
jdbc_admin_db=tax_admin
jdbc2_url=jdbc:oracle:thin:@10.158.230.144:11521:XE
jdbc2_user=pwc_invoice
jdbc2_password=pwc_invoice
#jdbc_password=111111
jdbc2_admin_db=pwc_invoice
jdbc_url_demo=jdbc:mysql://10.158.230.144:3306/demo_db_name?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
mail_jdbc_url=jdbc:sqlserver://192.168.1.102:1434;DatabaseName=MAILMaster
......
package pwc.taxtech.atms.vat.dao;
package pwc.taxtech.atms.invoice;
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.DataSourceCellDataDto;
import pwc.taxtech.atms.vat.dpo.DataSourceExtendDto;
import pwc.taxtech.atms.vat.entity.DataSource;
import pwc.taxtech.atms.vat.entity.DataSourceExample;
import pwc.taxtech.atms.vat.dpo.CellInvoiceDto;
import pwc.taxtech.atms.vat.dpo.InputInvoicePreviewQueryParam;
import pwc.taxtech.atms.vat.dpo.InputVATInvoiceItemExtendDto;
import pwc.taxtech.atms.vat.dpo.InputVATInvoiceResultDto;
import pwc.taxtech.atms.vat.entity.InputVatInvoice;
import pwc.taxtech.atms.vat.entity.InputVatInvoiceExample;
import java.util.List;
@Mapper
public interface DataSourceMapper extends MyVatMapper {
public interface InputInvoiceMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. DATA_SOURCE
* This method corresponds to the database table TAX_PROJECT. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
long countByExample(DataSourceExample example);
long countByExample(InputVatInvoiceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. DATA_SOURCE
* This method corresponds to the database table TAX_PROJECT. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
int deleteByExample(DataSourceExample example);
int deleteByExample(InputVatInvoiceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. DATA_SOURCE
* This method corresponds to the database table TAX_PROJECT. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
int deleteByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. DATA_SOURCE
* This method corresponds to the database table TAX_PROJECT. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
int insert(DataSource record);
int insert(InputVatInvoice record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. DATA_SOURCE
* This method corresponds to the database table TAX_PROJECT. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
int insertSelective(DataSource record);
int insertSelective(InputVatInvoice record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. DATA_SOURCE
* This method corresponds to the database table TAX_PROJECT. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
List<DataSource> selectByExampleWithRowbounds(DataSourceExample example, RowBounds rowBounds);
List<InputVatInvoice> selectByExampleWithRowbounds(InputVatInvoiceExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. DATA_SOURCE
* This method corresponds to the database table TAX_PROJECT. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
List<DataSource> selectByExample(DataSourceExample example);
List<InputVatInvoice> selectByExample(InputVatInvoiceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. DATA_SOURCE
* This method corresponds to the database table TAX_PROJECT. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
DataSource selectByPrimaryKey(Long id);
InputVatInvoice selectByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. DATA_SOURCE
* This method corresponds to the database table TAX_PROJECT. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") DataSource record, @Param("example") DataSourceExample example);
int updateByExampleSelective(@Param("record") InputVatInvoice record, @Param("example") InputVatInvoiceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. DATA_SOURCE
* This method corresponds to the database table TAX_PROJECT. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
int updateByExample(@Param("record") DataSource record, @Param("example") DataSourceExample example);
int updateByExample(@Param("record") InputVatInvoice record, @Param("example") InputVatInvoiceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. DATA_SOURCE
* This method corresponds to the database table TAX_PROJECT. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(DataSource record);
int updateByPrimaryKeySelective(InputVatInvoice record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. DATA_SOURCE
* This method corresponds to the database table TAX_PROJECT. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
int updateByPrimaryKey(DataSource record);
int updateByPrimaryKey(InputVatInvoice record);
void clearFormulaBlockWithPeriod(@Param("period") Integer period);
long getInputVATInvoiceCountByCondition(@Param("paras") InputInvoicePreviewQueryParam param);
void clearTaxRuleSettingWithPeriod(@Param("period") Integer period);
List<InputVatInvoice> getInputVATInvoiceCountByConditionWithPaging(@Param("paras") InputInvoicePreviewQueryParam param,
@Param("limitFrom") int limitFrom);
void clearCellTemplateWithPeriod(@Param("period") Integer period, @Param("exceptReportTemplateIDs") String exceptReportTemplateIDs);
List<InputVATInvoiceResultDto> getInputVATInvoiceResultDto(@Param("dbName") String dbName);
void clearCellTemplateConfigWithPeriod(@Param("period") Integer period, @Param("exceptReportTemplateIDs") String exceptReportTemplateIDs);
List<CellInvoiceDto> selectInputInvoiceWithItem();
void clearTemplateWithPeriod(@Param("period") Integer period, @Param("exceptReportTemplateIDs") String exceptReportTemplateIDs);
void clearTaxPayerReportWithPeriod(@Param("period") Integer period, @Param("projectId") String projectId);
void clearDataSourceWithPeriod(@Param("period") Integer period);
void clearDataSourceDetailWithPeriod(@Param("period") Integer period);
void clearCellDataSourceDataWithPeriod(@Param("period") Integer period);
void clearCellDataWithPeriod(@Param("exceptReportTemplateIDs") String exceptReportTemplateIDs, @Param("period") Integer period);
void clearReportWithPeriod(Integer period);
void clearDataWithPeriod(@Param("exceptReportTemplateIDs") String exceptReportTemplateIDs, @Param("period") Integer period,
@Param("projectId") String projectId);
List<DataSourceExtendDto> getFormulaDataSource(Long reportID);
List<DataSourceExtendDto> getManualDataSource(Long cellDataID);
DataSourceCellDataDto getManualDataSource2(Long dataSourceID);
InputVATInvoiceItemExtendDto selectInvoiceExtendDto(@Param("invoiceItemId") String invoiceItemId);
}
\ No newline at end of file
package pwc.taxtech.atms.invoice;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyVatMapper;
import pwc.taxtech.atms.vat.dpo.OutputInvoiceDataSourceDto;
import pwc.taxtech.atms.vat.dpo.OutputVATInvoiceDto;
import pwc.taxtech.atms.vat.dpo.OutputVATInvoiceInfoDto;
import pwc.taxtech.atms.vat.dpo.QueryOutputDto;
import pwc.taxtech.atms.vat.entity.OutputVatInvoice;
import pwc.taxtech.atms.vat.entity.OutputVatInvoiceExample;
import java.util.List;
@Mapper
public interface OutputInvoiceMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. OUTPUT_VAT_INVOICE
*
* @mbg.generated
*/
long countByExample(OutputVatInvoiceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. OUTPUT_VAT_INVOICE
*
* @mbg.generated
*/
int deleteByExample(OutputVatInvoiceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. OUTPUT_VAT_INVOICE
*
* @mbg.generated
*/
int deleteByPrimaryKey(String invoiceId);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. OUTPUT_VAT_INVOICE
*
* @mbg.generated
*/
int insert(OutputVatInvoice record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. OUTPUT_VAT_INVOICE
*
* @mbg.generated
*/
int insertSelective(OutputVatInvoice record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. OUTPUT_VAT_INVOICE
*
* @mbg.generated
*/
List<OutputVatInvoice> selectByExampleWithRowbounds(OutputVatInvoiceExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. OUTPUT_VAT_INVOICE
*
* @mbg.generated
*/
List<OutputVatInvoice> selectByExample(OutputVatInvoiceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. OUTPUT_VAT_INVOICE
*
* @mbg.generated
*/
OutputVatInvoice selectByPrimaryKey(String invoiceId);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. OUTPUT_VAT_INVOICE
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") OutputVatInvoice record, @Param("example") OutputVatInvoiceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. OUTPUT_VAT_INVOICE
*
* @mbg.generated
*/
int updateByExample(@Param("record") OutputVatInvoice record, @Param("example") OutputVatInvoiceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. OUTPUT_VAT_INVOICE
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(OutputVatInvoice record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. OUTPUT_VAT_INVOICE
*
* @mbg.generated
*/
int updateByPrimaryKey(OutputVatInvoice record);
List<OutputVATInvoiceInfoDto> selectOutputVATInvoiceInfoLeftJoinItem(@Param("queryDto") QueryOutputDto queryDto);
@Select("SELECT " +
" o.PERIOD_ID as periodId, " +
" o.INVOICE_TYPE as invoiceType, " +
" o.CLASS_CODE as classCode, " +
" o.INVOICE_NUMBER as invoiceNumber, " +
" o.BUYER_NAME as buyerName, " +
" o.BUYER_TAX_NUMBER as buyerTaxNumber, " +
" o.BANK_ACCOUNT as bankAccount, " +
" o.PHONE_NUM as phoneNum, " +
" o.INVOICE_DATE as invoiceDate, " +
" oi.CODE_VERSION as codeVersion, " +
" oi.PRODUCT_NAME as productName, " +
" oi.DOCUMENT_NUM as documentNum, " +
" oi.PRODUCT_STANDARD as productStandard, " +
" oi.UNIT as unit, " +
" oi.QUANTITY as quantity, " +
" oi.UNIT_PRICE as unitPrice, " +
" oi.AMOUNT as amount, " +
" oi.TAX_RATE as taxRate, " +
" oi.TAX_AMOUNT as taxAmount, " +
" oi.TAX_CLASS_CODE as taxClassCode " +
"FROM " +
" OUTPUT_VAT_INVOICE o, " +
" OUTPUT_VAT_INVOICE_ITEM oi, " +
" (SELECT " +
" INVOICE_ID, MIN(SeqNo) MIN_SEQ_NO " +
" FROM " +
" OUTPUT_VAT_INVOICE_ITEM " +
" GROUP BY InvoiceID) m " +
"WHERE " +
" o.INVOICE_ID = oi.INVOICE_ID " +
" AND o.INVOICE_ID = m.INVOICE_ID " +
" AND oi.SEQ_NO = m.MIN_SEQ_NO " +
" AND o.PERIOD_ID = #{period}" +
" UNION SELECT " +
" o2.periodID, " +
" NULL AS invoiceType, " +
" '' AS classCode, " +
" '' AS invoiceNumber, " +
" '' AS buyerName, " +
" '' AS buyerTaxNumber, " +
" '' AS bankAccount, " +
" '' AS phoneNum, " +
" NULL AS invoiceDate, " +
" oi2.codeVersion, " +
" oi2.productName, " +
" oi2.documentNum, " +
" oi2.productStandard, " +
" oi2.unit, " +
" oi2.quantity, " +
" oi2.unitPrice, " +
" oi2.amount, " +
" oi2.taxRate, " +
" oi2.taxAmount, " +
" oi2.taxClassCode " +
"FROM " +
" OUTPUT_VAT_INVOICE o2, " +
" OUTPUT_VAT_INVOICE_ITEM oi2, " +
" (SELECT " +
" INVOICE_ID, MIN(SEQ_NO) MIN_SEQ_NO " +
" FROM " +
" OUTPUT_VAT_INVOICE_ITEM " +
" GROUP BY INVOICE_ID) m2 " +
"WHERE " +
" o2.INVOICE_ID = oi2.INVOICE_ID " +
" AND o2.INVOICE_ID = m2.INVOICE_ID " +
" AND oi2.SEQ_NO != m2.MIN_SEQ_NO " +
" AND o2.PERIOD_ID = #{period}" +
" ")
List<OutputVATInvoiceInfoDto> queryOutputDetailWithItem(Integer period);
List<OutputVATInvoiceDto> getVatInvoiceWithItems(@Param("dbName") String dbName);
List<OutputInvoiceDataSourceDto> selectOutputInvoiceAndItem();
}
\ No newline at end of file
package pwc.taxtech.atms.vat.dpo;
import pwc.taxtech.atms.CommonUtils;
import pwc.taxtech.atms.vat.entity.DataSource;
import pwc.taxtech.atms.vat.entity.PeriodDataSource;
import java.util.List;
public class DataSourceExtendDto extends DataSource {
public class DataSourceExtendDto extends PeriodDataSource {
private Integer operationType;
private Long cellTemplateId;
private Long cellDataId;
......
package pwc.taxtech.atms.vat.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
*
* This class was generated by MyBatis Generator.
* This class corresponds to the database table TAX_PROJECT.DATA_SOURCE
*
* @mbg.generated do_not_delete_during_merge
*/
public class DataSource implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.DATA_SOURCE.ID
*
* @mbg.generated
*/
private Long id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.DATA_SOURCE.TYPE
*
* @mbg.generated
*/
private Integer type;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.DATA_SOURCE.NAME
*
* @mbg.generated
*/
private String name;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.DATA_SOURCE.AMOUNT
*
* @mbg.generated
*/
private BigDecimal amount;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.DATA_SOURCE.DESCRIPTION
*
* @mbg.generated
*/
private String description;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.DATA_SOURCE.KEY_VALUE_DATA_ID
*
* @mbg.generated
*/
private String keyValueDataId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.DATA_SOURCE.CREATE_BY
*
* @mbg.generated
*/
private String createBy;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.DATA_SOURCE.CREATE_TIME
*
* @mbg.generated
*/
private Date createTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.DATA_SOURCE.UPDATE_BY
*
* @mbg.generated
*/
private String updateBy;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.DATA_SOURCE.UPDATE_TIME
*
* @mbg.generated
*/
private Date updateTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.DATA_SOURCE.ROW_NAME
*
* @mbg.generated
*/
private String rowName;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.DATA_SOURCE.COLUMN_NAME
*
* @mbg.generated
*/
private String columnName;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.DATA_SOURCE.ROW_INDEX
*
* @mbg.generated
*/
private Integer rowIndex;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.DATA_SOURCE.REMAP_BATCH_ID
*
* @mbg.generated
*/
private String remapBatchId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.DATA_SOURCE.COLUMN_INDEX
*
* @mbg.generated
*/
private Integer columnIndex;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.DATA_SOURCE.CELL_TEMPLATE_ID
*
* @mbg.generated
*/
private Long cellTemplateId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.DATA_SOURCE.PERIOD
*
* @mbg.generated
*/
private Integer period;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table TAX_PROJECT.DATA_SOURCE
*
* @mbg.generated
*/
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_PROJECT.DATA_SOURCE.ID
*
* @return the value of TAX_PROJECT.DATA_SOURCE.ID
*
* @mbg.generated
*/
public Long getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_PROJECT.DATA_SOURCE.ID
*
* @param id the value for TAX_PROJECT.DATA_SOURCE.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 TAX_PROJECT.DATA_SOURCE.TYPE
*
* @return the value of TAX_PROJECT.DATA_SOURCE.TYPE
*
* @mbg.generated
*/
public Integer getType() {
return type;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_PROJECT.DATA_SOURCE.TYPE
*
* @param type the value for TAX_PROJECT.DATA_SOURCE.TYPE
*
* @mbg.generated
*/
public void setType(Integer type) {
this.type = type;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_PROJECT.DATA_SOURCE.NAME
*
* @return the value of TAX_PROJECT.DATA_SOURCE.NAME
*
* @mbg.generated
*/
public String getName() {
return name;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_PROJECT.DATA_SOURCE.NAME
*
* @param name the value for TAX_PROJECT.DATA_SOURCE.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 TAX_PROJECT.DATA_SOURCE.AMOUNT
*
* @return the value of TAX_PROJECT.DATA_SOURCE.AMOUNT
*
* @mbg.generated
*/
public BigDecimal getAmount() {
return amount;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_PROJECT.DATA_SOURCE.AMOUNT
*
* @param amount the value for TAX_PROJECT.DATA_SOURCE.AMOUNT
*
* @mbg.generated
*/
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_PROJECT.DATA_SOURCE.DESCRIPTION
*
* @return the value of TAX_PROJECT.DATA_SOURCE.DESCRIPTION
*
* @mbg.generated
*/
public String getDescription() {
return description;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_PROJECT.DATA_SOURCE.DESCRIPTION
*
* @param description the value for TAX_PROJECT.DATA_SOURCE.DESCRIPTION
*
* @mbg.generated
*/
public void setDescription(String description) {
this.description = description == null ? null : description.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_PROJECT.DATA_SOURCE.KEY_VALUE_DATA_ID
*
* @return the value of TAX_PROJECT.DATA_SOURCE.KEY_VALUE_DATA_ID
*
* @mbg.generated
*/
public String getKeyValueDataId() {
return keyValueDataId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_PROJECT.DATA_SOURCE.KEY_VALUE_DATA_ID
*
* @param keyValueDataId the value for TAX_PROJECT.DATA_SOURCE.KEY_VALUE_DATA_ID
*
* @mbg.generated
*/
public void setKeyValueDataId(String keyValueDataId) {
this.keyValueDataId = keyValueDataId == null ? null : keyValueDataId.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_PROJECT.DATA_SOURCE.CREATE_BY
*
* @return the value of TAX_PROJECT.DATA_SOURCE.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 TAX_PROJECT.DATA_SOURCE.CREATE_BY
*
* @param createBy the value for TAX_PROJECT.DATA_SOURCE.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 TAX_PROJECT.DATA_SOURCE.CREATE_TIME
*
* @return the value of TAX_PROJECT.DATA_SOURCE.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 TAX_PROJECT.DATA_SOURCE.CREATE_TIME
*
* @param createTime the value for TAX_PROJECT.DATA_SOURCE.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 TAX_PROJECT.DATA_SOURCE.UPDATE_BY
*
* @return the value of TAX_PROJECT.DATA_SOURCE.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 TAX_PROJECT.DATA_SOURCE.UPDATE_BY
*
* @param updateBy the value for TAX_PROJECT.DATA_SOURCE.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 TAX_PROJECT.DATA_SOURCE.UPDATE_TIME
*
* @return the value of TAX_PROJECT.DATA_SOURCE.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 TAX_PROJECT.DATA_SOURCE.UPDATE_TIME
*
* @param updateTime the value for TAX_PROJECT.DATA_SOURCE.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 TAX_PROJECT.DATA_SOURCE.ROW_NAME
*
* @return the value of TAX_PROJECT.DATA_SOURCE.ROW_NAME
*
* @mbg.generated
*/
public String getRowName() {
return rowName;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_PROJECT.DATA_SOURCE.ROW_NAME
*
* @param rowName the value for TAX_PROJECT.DATA_SOURCE.ROW_NAME
*
* @mbg.generated
*/
public void setRowName(String rowName) {
this.rowName = rowName == null ? null : rowName.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_PROJECT.DATA_SOURCE.COLUMN_NAME
*
* @return the value of TAX_PROJECT.DATA_SOURCE.COLUMN_NAME
*
* @mbg.generated
*/
public String getColumnName() {
return columnName;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_PROJECT.DATA_SOURCE.COLUMN_NAME
*
* @param columnName the value for TAX_PROJECT.DATA_SOURCE.COLUMN_NAME
*
* @mbg.generated
*/
public void setColumnName(String columnName) {
this.columnName = columnName == null ? null : columnName.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_PROJECT.DATA_SOURCE.ROW_INDEX
*
* @return the value of TAX_PROJECT.DATA_SOURCE.ROW_INDEX
*
* @mbg.generated
*/
public Integer getRowIndex() {
return rowIndex;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_PROJECT.DATA_SOURCE.ROW_INDEX
*
* @param rowIndex the value for TAX_PROJECT.DATA_SOURCE.ROW_INDEX
*
* @mbg.generated
*/
public void setRowIndex(Integer rowIndex) {
this.rowIndex = rowIndex;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_PROJECT.DATA_SOURCE.REMAP_BATCH_ID
*
* @return the value of TAX_PROJECT.DATA_SOURCE.REMAP_BATCH_ID
*
* @mbg.generated
*/
public String getRemapBatchId() {
return remapBatchId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_PROJECT.DATA_SOURCE.REMAP_BATCH_ID
*
* @param remapBatchId the value for TAX_PROJECT.DATA_SOURCE.REMAP_BATCH_ID
*
* @mbg.generated
*/
public void setRemapBatchId(String remapBatchId) {
this.remapBatchId = remapBatchId == null ? null : remapBatchId.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_PROJECT.DATA_SOURCE.COLUMN_INDEX
*
* @return the value of TAX_PROJECT.DATA_SOURCE.COLUMN_INDEX
*
* @mbg.generated
*/
public Integer getColumnIndex() {
return columnIndex;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_PROJECT.DATA_SOURCE.COLUMN_INDEX
*
* @param columnIndex the value for TAX_PROJECT.DATA_SOURCE.COLUMN_INDEX
*
* @mbg.generated
*/
public void setColumnIndex(Integer columnIndex) {
this.columnIndex = columnIndex;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_PROJECT.DATA_SOURCE.CELL_TEMPLATE_ID
*
* @return the value of TAX_PROJECT.DATA_SOURCE.CELL_TEMPLATE_ID
*
* @mbg.generated
*/
public Long getCellTemplateId() {
return cellTemplateId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_PROJECT.DATA_SOURCE.CELL_TEMPLATE_ID
*
* @param cellTemplateId the value for TAX_PROJECT.DATA_SOURCE.CELL_TEMPLATE_ID
*
* @mbg.generated
*/
public void setCellTemplateId(Long cellTemplateId) {
this.cellTemplateId = cellTemplateId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_PROJECT.DATA_SOURCE.PERIOD
*
* @return the value of TAX_PROJECT.DATA_SOURCE.PERIOD
*
* @mbg.generated
*/
public Integer getPeriod() {
return period;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_PROJECT.DATA_SOURCE.PERIOD
*
* @param period the value for TAX_PROJECT.DATA_SOURCE.PERIOD
*
* @mbg.generated
*/
public void setPeriod(Integer period) {
this.period = period;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.DATA_SOURCE
*
* @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(", type=").append(type);
sb.append(", name=").append(name);
sb.append(", amount=").append(amount);
sb.append(", description=").append(description);
sb.append(", keyValueDataId=").append(keyValueDataId);
sb.append(", createBy=").append(createBy);
sb.append(", createTime=").append(createTime);
sb.append(", updateBy=").append(updateBy);
sb.append(", updateTime=").append(updateTime);
sb.append(", rowName=").append(rowName);
sb.append(", columnName=").append(columnName);
sb.append(", rowIndex=").append(rowIndex);
sb.append(", remapBatchId=").append(remapBatchId);
sb.append(", columnIndex=").append(columnIndex);
sb.append(", cellTemplateId=").append(cellTemplateId);
sb.append(", period=").append(period);
sb.append("]");
return sb.toString();
}
}
\ 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.DataSourceMapper">
<resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.DataSource">
<mapper namespace="pwc.taxtech.atms.invoice.InputInvoiceMapper">
<resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.InputVatInvoice">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="TYPE" jdbcType="DECIMAL" property="type" />
<result column="NAME" jdbcType="VARCHAR" property="name" />
<id column="ID" jdbcType="VARCHAR" property="id" />
<result column="PERIOD_ID" jdbcType="DECIMAL" property="periodId" />
<result column="INVOICE_CODE" jdbcType="VARCHAR" property="invoiceCode" />
<result column="INVOICE_NUMBER" jdbcType="VARCHAR" property="invoiceNumber" />
<result column="INVOICE_DATE" jdbcType="TIMESTAMP" property="invoiceDate" />
<result column="SELLER_TAX_NUMBER" jdbcType="VARCHAR" property="sellerTaxNumber" />
<result column="AMOUNT" jdbcType="DECIMAL" property="amount" />
<result column="DESCRIPTION" jdbcType="VARCHAR" property="description" />
<result column="KEY_VALUE_DATA_ID" jdbcType="VARCHAR" property="keyValueDataId" />
<result column="CREATE_BY" jdbcType="VARCHAR" property="createBy" />
<result column="TAX_AMOUNT" jdbcType="DECIMAL" property="taxAmount" />
<result column="INVOICE_TYPE" jdbcType="DECIMAL" property="invoiceType" />
<result column="CERTIFICATION_RESULT" jdbcType="VARCHAR" property="certificationResult" />
<result column="CERTIFICATION_DATE" jdbcType="TIMESTAMP" property="certificationDate" />
<result column="CREATOR_ID" jdbcType="VARCHAR" property="creatorId" />
<result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
<result column="UPDATE_BY" jdbcType="VARCHAR" property="updateBy" />
<result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
<result column="ROW_NAME" jdbcType="VARCHAR" property="rowName" />
<result column="COLUMN_NAME" jdbcType="VARCHAR" property="columnName" />
<result column="ROW_INDEX" jdbcType="DECIMAL" property="rowIndex" />
<result column="REMAP_BATCH_ID" jdbcType="VARCHAR" property="remapBatchId" />
<result column="COLUMN_INDEX" jdbcType="DECIMAL" property="columnIndex" />
<result column="CELL_TEMPLATE_ID" jdbcType="DECIMAL" property="cellTemplateId" />
<result column="PERIOD" jdbcType="DECIMAL" property="period" />
<result column="STATUS" jdbcType="DECIMAL" property="status" />
<result column="PART_ACCNTED_PERIOD" jdbcType="DECIMAL" property="partAccntedPeriod" />
<result column="ACCNTED_PERIOD" jdbcType="DECIMAL" property="accntedPeriod" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
......@@ -95,11 +94,11 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
ID, "TYPE", "NAME", AMOUNT, DESCRIPTION, KEY_VALUE_DATA_ID, CREATE_BY, CREATE_TIME,
UPDATE_BY, UPDATE_TIME, ROW_NAME, "COLUMN_NAME", ROW_INDEX, REMAP_BATCH_ID, COLUMN_INDEX,
CELL_TEMPLATE_ID, PERIOD
ID, PERIOD_ID, INVOICE_CODE, INVOICE_NUMBER, INVOICE_DATE, SELLER_TAX_NUMBER, AMOUNT,
TAX_AMOUNT, INVOICE_TYPE, CERTIFICATION_RESULT, CERTIFICATION_DATE, CREATOR_ID, CREATE_TIME,
"STATUS", PART_ACCNTED_PERIOD, ACCNTED_PERIOD
</sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.DataSourceExample" resultMap="BaseResultMap">
<select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.InputVatInvoiceExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
......@@ -109,7 +108,7 @@
distinct
</if>
<include refid="Base_Column_List" />
from DATA_SOURCE
from INPUT_INVOICE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -117,171 +116,165 @@
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from DATA_SOURCE
where ID = #{id,jdbcType=DECIMAL}
from INPUT_INVOICE
where ID = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from DATA_SOURCE
where ID = #{id,jdbcType=DECIMAL}
delete from INPUT_INVOICE
where ID = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.DataSourceExample">
<delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.InputVatInvoiceExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from DATA_SOURCE
delete from INPUT_INVOICE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.DataSource">
<insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.InputVatInvoice">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into DATA_SOURCE (ID, "TYPE", "NAME",
AMOUNT, DESCRIPTION, KEY_VALUE_DATA_ID,
CREATE_BY, CREATE_TIME, UPDATE_BY,
UPDATE_TIME, ROW_NAME, "COLUMN_NAME",
ROW_INDEX, REMAP_BATCH_ID, COLUMN_INDEX,
CELL_TEMPLATE_ID, PERIOD)
values (#{id,jdbcType=DECIMAL}, #{type,jdbcType=DECIMAL}, #{name,jdbcType=VARCHAR},
#{amount,jdbcType=DECIMAL}, #{description,jdbcType=VARCHAR}, #{keyValueDataId,jdbcType=VARCHAR},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP}, #{rowName,jdbcType=VARCHAR}, #{columnName,jdbcType=VARCHAR},
#{rowIndex,jdbcType=DECIMAL}, #{remapBatchId,jdbcType=VARCHAR}, #{columnIndex,jdbcType=DECIMAL},
#{cellTemplateId,jdbcType=DECIMAL}, #{period,jdbcType=DECIMAL})
insert into INPUT_INVOICE (ID, PERIOD_ID, INVOICE_CODE,
INVOICE_NUMBER, INVOICE_DATE, SELLER_TAX_NUMBER,
AMOUNT, TAX_AMOUNT, INVOICE_TYPE,
CERTIFICATION_RESULT, CERTIFICATION_DATE,
CREATOR_ID, CREATE_TIME, "STATUS",
PART_ACCNTED_PERIOD, ACCNTED_PERIOD)
values (#{id,jdbcType=VARCHAR}, #{periodId,jdbcType=DECIMAL}, #{invoiceCode,jdbcType=VARCHAR},
#{invoiceNumber,jdbcType=VARCHAR}, #{invoiceDate,jdbcType=TIMESTAMP}, #{sellerTaxNumber,jdbcType=VARCHAR},
#{amount,jdbcType=DECIMAL}, #{taxAmount,jdbcType=DECIMAL}, #{invoiceType,jdbcType=DECIMAL},
#{certificationResult,jdbcType=VARCHAR}, #{certificationDate,jdbcType=TIMESTAMP},
#{creatorId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{status,jdbcType=DECIMAL},
#{partAccntedPeriod,jdbcType=DECIMAL}, #{accntedPeriod,jdbcType=DECIMAL})
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.DataSource">
<insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.InputVatInvoice">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into DATA_SOURCE
insert into INPUT_INVOICE
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
ID,
</if>
<if test="type != null">
"TYPE",
<if test="periodId != null">
PERIOD_ID,
</if>
<if test="name != null">
"NAME",
<if test="invoiceCode != null">
INVOICE_CODE,
</if>
<if test="amount != null">
AMOUNT,
</if>
<if test="description != null">
DESCRIPTION,
<if test="invoiceNumber != null">
INVOICE_NUMBER,
</if>
<if test="keyValueDataId != null">
KEY_VALUE_DATA_ID,
<if test="invoiceDate != null">
INVOICE_DATE,
</if>
<if test="createBy != null">
CREATE_BY,
<if test="sellerTaxNumber != null">
SELLER_TAX_NUMBER,
</if>
<if test="createTime != null">
CREATE_TIME,
<if test="amount != null">
AMOUNT,
</if>
<if test="updateBy != null">
UPDATE_BY,
<if test="taxAmount != null">
TAX_AMOUNT,
</if>
<if test="updateTime != null">
UPDATE_TIME,
<if test="invoiceType != null">
INVOICE_TYPE,
</if>
<if test="rowName != null">
ROW_NAME,
<if test="certificationResult != null">
CERTIFICATION_RESULT,
</if>
<if test="columnName != null">
"COLUMN_NAME",
<if test="certificationDate != null">
CERTIFICATION_DATE,
</if>
<if test="rowIndex != null">
ROW_INDEX,
<if test="creatorId != null">
CREATOR_ID,
</if>
<if test="remapBatchId != null">
REMAP_BATCH_ID,
<if test="createTime != null">
CREATE_TIME,
</if>
<if test="columnIndex != null">
COLUMN_INDEX,
<if test="status != null">
"STATUS",
</if>
<if test="cellTemplateId != null">
CELL_TEMPLATE_ID,
<if test="partAccntedPeriod != null">
PART_ACCNTED_PERIOD,
</if>
<if test="period != null">
PERIOD,
<if test="accntedPeriod != null">
ACCNTED_PERIOD,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=DECIMAL},
#{id,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=DECIMAL},
<if test="periodId != null">
#{periodId,jdbcType=DECIMAL},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
<if test="invoiceCode != null">
#{invoiceCode,jdbcType=VARCHAR},
</if>
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
<if test="invoiceNumber != null">
#{invoiceNumber,jdbcType=VARCHAR},
</if>
<if test="keyValueDataId != null">
#{keyValueDataId,jdbcType=VARCHAR},
<if test="invoiceDate != null">
#{invoiceDate,jdbcType=TIMESTAMP},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
<if test="sellerTaxNumber != null">
#{sellerTaxNumber,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
<if test="taxAmount != null">
#{taxAmount,jdbcType=DECIMAL},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
<if test="invoiceType != null">
#{invoiceType,jdbcType=DECIMAL},
</if>
<if test="rowName != null">
#{rowName,jdbcType=VARCHAR},
<if test="certificationResult != null">
#{certificationResult,jdbcType=VARCHAR},
</if>
<if test="columnName != null">
#{columnName,jdbcType=VARCHAR},
<if test="certificationDate != null">
#{certificationDate,jdbcType=TIMESTAMP},
</if>
<if test="rowIndex != null">
#{rowIndex,jdbcType=DECIMAL},
<if test="creatorId != null">
#{creatorId,jdbcType=VARCHAR},
</if>
<if test="remapBatchId != null">
#{remapBatchId,jdbcType=VARCHAR},
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="columnIndex != null">
#{columnIndex,jdbcType=DECIMAL},
<if test="status != null">
#{status,jdbcType=DECIMAL},
</if>
<if test="cellTemplateId != null">
#{cellTemplateId,jdbcType=DECIMAL},
<if test="partAccntedPeriod != null">
#{partAccntedPeriod,jdbcType=DECIMAL},
</if>
<if test="period != null">
#{period,jdbcType=DECIMAL},
<if test="accntedPeriod != null">
#{accntedPeriod,jdbcType=DECIMAL},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.DataSourceExample" resultType="java.lang.Long">
<select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.InputVatInvoiceExample" resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from DATA_SOURCE
select count(*) from INPUT_INVOICE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -291,58 +284,55 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update DATA_SOURCE
update INPUT_INVOICE
<set>
<if test="record.id != null">
ID = #{record.id,jdbcType=DECIMAL},
ID = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
"TYPE" = #{record.type,jdbcType=DECIMAL},
<if test="record.periodId != null">
PERIOD_ID = #{record.periodId,jdbcType=DECIMAL},
</if>
<if test="record.name != null">
"NAME" = #{record.name,jdbcType=VARCHAR},
<if test="record.invoiceCode != null">
INVOICE_CODE = #{record.invoiceCode,jdbcType=VARCHAR},
</if>
<if test="record.amount != null">
AMOUNT = #{record.amount,jdbcType=DECIMAL},
</if>
<if test="record.description != null">
DESCRIPTION = #{record.description,jdbcType=VARCHAR},
<if test="record.invoiceNumber != null">
INVOICE_NUMBER = #{record.invoiceNumber,jdbcType=VARCHAR},
</if>
<if test="record.keyValueDataId != null">
KEY_VALUE_DATA_ID = #{record.keyValueDataId,jdbcType=VARCHAR},
<if test="record.invoiceDate != null">
INVOICE_DATE = #{record.invoiceDate,jdbcType=TIMESTAMP},
</if>
<if test="record.createBy != null">
CREATE_BY = #{record.createBy,jdbcType=VARCHAR},
<if test="record.sellerTaxNumber != null">
SELLER_TAX_NUMBER = #{record.sellerTaxNumber,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
<if test="record.amount != null">
AMOUNT = #{record.amount,jdbcType=DECIMAL},
</if>
<if test="record.updateBy != null">
UPDATE_BY = #{record.updateBy,jdbcType=VARCHAR},
<if test="record.taxAmount != null">
TAX_AMOUNT = #{record.taxAmount,jdbcType=DECIMAL},
</if>
<if test="record.updateTime != null">
UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP},
<if test="record.invoiceType != null">
INVOICE_TYPE = #{record.invoiceType,jdbcType=DECIMAL},
</if>
<if test="record.rowName != null">
ROW_NAME = #{record.rowName,jdbcType=VARCHAR},
<if test="record.certificationResult != null">
CERTIFICATION_RESULT = #{record.certificationResult,jdbcType=VARCHAR},
</if>
<if test="record.columnName != null">
"COLUMN_NAME" = #{record.columnName,jdbcType=VARCHAR},
<if test="record.certificationDate != null">
CERTIFICATION_DATE = #{record.certificationDate,jdbcType=TIMESTAMP},
</if>
<if test="record.rowIndex != null">
ROW_INDEX = #{record.rowIndex,jdbcType=DECIMAL},
<if test="record.creatorId != null">
CREATOR_ID = #{record.creatorId,jdbcType=VARCHAR},
</if>
<if test="record.remapBatchId != null">
REMAP_BATCH_ID = #{record.remapBatchId,jdbcType=VARCHAR},
<if test="record.createTime != null">
CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.columnIndex != null">
COLUMN_INDEX = #{record.columnIndex,jdbcType=DECIMAL},
<if test="record.status != null">
"STATUS" = #{record.status,jdbcType=DECIMAL},
</if>
<if test="record.cellTemplateId != null">
CELL_TEMPLATE_ID = #{record.cellTemplateId,jdbcType=DECIMAL},
<if test="record.partAccntedPeriod != null">
PART_ACCNTED_PERIOD = #{record.partAccntedPeriod,jdbcType=DECIMAL},
</if>
<if test="record.period != null">
PERIOD = #{record.period,jdbcType=DECIMAL},
<if test="record.accntedPeriod != null">
ACCNTED_PERIOD = #{record.accntedPeriod,jdbcType=DECIMAL},
</if>
</set>
<if test="_parameter != null">
......@@ -354,111 +344,106 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update DATA_SOURCE
set ID = #{record.id,jdbcType=DECIMAL},
"TYPE" = #{record.type,jdbcType=DECIMAL},
"NAME" = #{record.name,jdbcType=VARCHAR},
update INPUT_INVOICE
set ID = #{record.id,jdbcType=VARCHAR},
PERIOD_ID = #{record.periodId,jdbcType=DECIMAL},
INVOICE_CODE = #{record.invoiceCode,jdbcType=VARCHAR},
INVOICE_NUMBER = #{record.invoiceNumber,jdbcType=VARCHAR},
INVOICE_DATE = #{record.invoiceDate,jdbcType=TIMESTAMP},
SELLER_TAX_NUMBER = #{record.sellerTaxNumber,jdbcType=VARCHAR},
AMOUNT = #{record.amount,jdbcType=DECIMAL},
DESCRIPTION = #{record.description,jdbcType=VARCHAR},
KEY_VALUE_DATA_ID = #{record.keyValueDataId,jdbcType=VARCHAR},
CREATE_BY = #{record.createBy,jdbcType=VARCHAR},
TAX_AMOUNT = #{record.taxAmount,jdbcType=DECIMAL},
INVOICE_TYPE = #{record.invoiceType,jdbcType=DECIMAL},
CERTIFICATION_RESULT = #{record.certificationResult,jdbcType=VARCHAR},
CERTIFICATION_DATE = #{record.certificationDate,jdbcType=TIMESTAMP},
CREATOR_ID = #{record.creatorId,jdbcType=VARCHAR},
CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
UPDATE_BY = #{record.updateBy,jdbcType=VARCHAR},
UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP},
ROW_NAME = #{record.rowName,jdbcType=VARCHAR},
"COLUMN_NAME" = #{record.columnName,jdbcType=VARCHAR},
ROW_INDEX = #{record.rowIndex,jdbcType=DECIMAL},
REMAP_BATCH_ID = #{record.remapBatchId,jdbcType=VARCHAR},
COLUMN_INDEX = #{record.columnIndex,jdbcType=DECIMAL},
CELL_TEMPLATE_ID = #{record.cellTemplateId,jdbcType=DECIMAL},
PERIOD = #{record.period,jdbcType=DECIMAL}
"STATUS" = #{record.status,jdbcType=DECIMAL},
PART_ACCNTED_PERIOD = #{record.partAccntedPeriod,jdbcType=DECIMAL},
ACCNTED_PERIOD = #{record.accntedPeriod,jdbcType=DECIMAL}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.DataSource">
<update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.InputVatInvoice">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update DATA_SOURCE
update INPUT_INVOICE
<set>
<if test="type != null">
"TYPE" = #{type,jdbcType=DECIMAL},
<if test="periodId != null">
PERIOD_ID = #{periodId,jdbcType=DECIMAL},
</if>
<if test="name != null">
"NAME" = #{name,jdbcType=VARCHAR},
<if test="invoiceCode != null">
INVOICE_CODE = #{invoiceCode,jdbcType=VARCHAR},
</if>
<if test="amount != null">
AMOUNT = #{amount,jdbcType=DECIMAL},
</if>
<if test="description != null">
DESCRIPTION = #{description,jdbcType=VARCHAR},
<if test="invoiceNumber != null">
INVOICE_NUMBER = #{invoiceNumber,jdbcType=VARCHAR},
</if>
<if test="keyValueDataId != null">
KEY_VALUE_DATA_ID = #{keyValueDataId,jdbcType=VARCHAR},
<if test="invoiceDate != null">
INVOICE_DATE = #{invoiceDate,jdbcType=TIMESTAMP},
</if>
<if test="createBy != null">
CREATE_BY = #{createBy,jdbcType=VARCHAR},
<if test="sellerTaxNumber != null">
SELLER_TAX_NUMBER = #{sellerTaxNumber,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
<if test="amount != null">
AMOUNT = #{amount,jdbcType=DECIMAL},
</if>
<if test="updateBy != null">
UPDATE_BY = #{updateBy,jdbcType=VARCHAR},
<if test="taxAmount != null">
TAX_AMOUNT = #{taxAmount,jdbcType=DECIMAL},
</if>
<if test="updateTime != null">
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
<if test="invoiceType != null">
INVOICE_TYPE = #{invoiceType,jdbcType=DECIMAL},
</if>
<if test="rowName != null">
ROW_NAME = #{rowName,jdbcType=VARCHAR},
<if test="certificationResult != null">
CERTIFICATION_RESULT = #{certificationResult,jdbcType=VARCHAR},
</if>
<if test="columnName != null">
"COLUMN_NAME" = #{columnName,jdbcType=VARCHAR},
<if test="certificationDate != null">
CERTIFICATION_DATE = #{certificationDate,jdbcType=TIMESTAMP},
</if>
<if test="rowIndex != null">
ROW_INDEX = #{rowIndex,jdbcType=DECIMAL},
<if test="creatorId != null">
CREATOR_ID = #{creatorId,jdbcType=VARCHAR},
</if>
<if test="remapBatchId != null">
REMAP_BATCH_ID = #{remapBatchId,jdbcType=VARCHAR},
<if test="createTime != null">
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="columnIndex != null">
COLUMN_INDEX = #{columnIndex,jdbcType=DECIMAL},
<if test="status != null">
"STATUS" = #{status,jdbcType=DECIMAL},
</if>
<if test="cellTemplateId != null">
CELL_TEMPLATE_ID = #{cellTemplateId,jdbcType=DECIMAL},
<if test="partAccntedPeriod != null">
PART_ACCNTED_PERIOD = #{partAccntedPeriod,jdbcType=DECIMAL},
</if>
<if test="period != null">
PERIOD = #{period,jdbcType=DECIMAL},
<if test="accntedPeriod != null">
ACCNTED_PERIOD = #{accntedPeriod,jdbcType=DECIMAL},
</if>
</set>
where ID = #{id,jdbcType=DECIMAL}
where ID = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.DataSource">
<update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.InputVatInvoice">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update DATA_SOURCE
set "TYPE" = #{type,jdbcType=DECIMAL},
"NAME" = #{name,jdbcType=VARCHAR},
update INPUT_INVOICE
set PERIOD_ID = #{periodId,jdbcType=DECIMAL},
INVOICE_CODE = #{invoiceCode,jdbcType=VARCHAR},
INVOICE_NUMBER = #{invoiceNumber,jdbcType=VARCHAR},
INVOICE_DATE = #{invoiceDate,jdbcType=TIMESTAMP},
SELLER_TAX_NUMBER = #{sellerTaxNumber,jdbcType=VARCHAR},
AMOUNT = #{amount,jdbcType=DECIMAL},
DESCRIPTION = #{description,jdbcType=VARCHAR},
KEY_VALUE_DATA_ID = #{keyValueDataId,jdbcType=VARCHAR},
CREATE_BY = #{createBy,jdbcType=VARCHAR},
TAX_AMOUNT = #{taxAmount,jdbcType=DECIMAL},
INVOICE_TYPE = #{invoiceType,jdbcType=DECIMAL},
CERTIFICATION_RESULT = #{certificationResult,jdbcType=VARCHAR},
CERTIFICATION_DATE = #{certificationDate,jdbcType=TIMESTAMP},
CREATOR_ID = #{creatorId,jdbcType=VARCHAR},
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
UPDATE_BY = #{updateBy,jdbcType=VARCHAR},
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
ROW_NAME = #{rowName,jdbcType=VARCHAR},
"COLUMN_NAME" = #{columnName,jdbcType=VARCHAR},
ROW_INDEX = #{rowIndex,jdbcType=DECIMAL},
REMAP_BATCH_ID = #{remapBatchId,jdbcType=VARCHAR},
COLUMN_INDEX = #{columnIndex,jdbcType=DECIMAL},
CELL_TEMPLATE_ID = #{cellTemplateId,jdbcType=DECIMAL},
PERIOD = #{period,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
"STATUS" = #{status,jdbcType=DECIMAL},
PART_ACCNTED_PERIOD = #{partAccntedPeriod,jdbcType=DECIMAL},
ACCNTED_PERIOD = #{accntedPeriod,jdbcType=DECIMAL}
where ID = #{id,jdbcType=VARCHAR}
</update>
<select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.DataSourceExample" resultMap="BaseResultMap">
<select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.InputVatInvoiceExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
......@@ -468,7 +453,7 @@
distinct
</if>
<include refid="Base_Column_List" />
from DATA_SOURCE
from INPUT_INVOICE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......
<?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.DataSourceDetailMapper">
<resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.DataSourceDetail">
<mapper namespace="pwc.taxtech.atms.invoice.OutputInvoiceMapper">
<resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.OutputVatInvoice">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="DATA_SOURCE_ID" jdbcType="DECIMAL" property="dataSourceId" />
<result column="DATA_SOURCE_TYPE" jdbcType="DECIMAL" property="dataSourceType" />
<result column="ITEM_VALUE" jdbcType="VARCHAR" property="itemValue" />
<id column="INVOICE_ID" jdbcType="VARCHAR" property="invoiceId" />
<result column="INVOICE_TYPE" jdbcType="DECIMAL" property="invoiceType" />
<result column="CLASS_CODE" jdbcType="VARCHAR" property="classCode" />
<result column="INVOICE_NUMBER" jdbcType="VARCHAR" property="invoiceNumber" />
<result column="BUYER_NAME" jdbcType="VARCHAR" property="buyerName" />
<result column="BUYER_TAX_NUMBER" jdbcType="VARCHAR" property="buyerTaxNumber" />
<result column="BANK_ACCOUNT" jdbcType="VARCHAR" property="bankAccount" />
<result column="PHONE_NUM" jdbcType="VARCHAR" property="phoneNum" />
<result column="INVOICE_DATE" jdbcType="TIMESTAMP" property="invoiceDate" />
<result column="SEQ_NO" jdbcType="DECIMAL" property="seqNo" />
<result column="PERIOD_ID" jdbcType="DECIMAL" property="periodId" />
<result column="STATUS" jdbcType="DECIMAL" property="status" />
<result column="CREATOR_ID" jdbcType="VARCHAR" property="creatorId" />
<result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
<result column="PART_ACCNTED_PERIOD" jdbcType="DECIMAL" property="partAccntedPeriod" />
<result column="ACCNTED_PERIOD" jdbcType="DECIMAL" property="accntedPeriod" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
......@@ -82,9 +94,11 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
ID, DATA_SOURCE_ID, DATA_SOURCE_TYPE, ITEM_VALUE
INVOICE_ID, INVOICE_TYPE, CLASS_CODE, INVOICE_NUMBER, BUYER_NAME, BUYER_TAX_NUMBER,
BANK_ACCOUNT, PHONE_NUM, INVOICE_DATE, SEQ_NO, PERIOD_ID, "STATUS", CREATOR_ID, CREATE_TIME,
PART_ACCNTED_PERIOD, ACCNTED_PERIOD
</sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.DataSourceDetailExample" resultMap="BaseResultMap">
<select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.OutputVatInvoiceExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
......@@ -94,7 +108,7 @@
distinct
</if>
<include refid="Base_Column_List" />
from DATA_SOURCE_DETAIL
from OUTPUT_INVOICE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -102,85 +116,165 @@
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from DATA_SOURCE_DETAIL
where ID = #{id,jdbcType=DECIMAL}
from OUTPUT_INVOICE
where INVOICE_ID = #{invoiceId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from DATA_SOURCE_DETAIL
where ID = #{id,jdbcType=DECIMAL}
delete from OUTPUT_INVOICE
where INVOICE_ID = #{invoiceId,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.DataSourceDetailExample">
<delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.OutputVatInvoiceExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from DATA_SOURCE_DETAIL
delete from OUTPUT_INVOICE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.DataSourceDetail">
<insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.OutputVatInvoice">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into DATA_SOURCE_DETAIL (ID, DATA_SOURCE_ID, DATA_SOURCE_TYPE,
ITEM_VALUE)
values (#{id,jdbcType=DECIMAL}, #{dataSourceId,jdbcType=DECIMAL}, #{dataSourceType,jdbcType=DECIMAL},
#{itemValue,jdbcType=VARCHAR})
insert into OUTPUT_INVOICE (INVOICE_ID, INVOICE_TYPE, CLASS_CODE,
INVOICE_NUMBER, BUYER_NAME, BUYER_TAX_NUMBER,
BANK_ACCOUNT, PHONE_NUM, INVOICE_DATE,
SEQ_NO, PERIOD_ID, "STATUS",
CREATOR_ID, CREATE_TIME, PART_ACCNTED_PERIOD,
ACCNTED_PERIOD)
values (#{invoiceId,jdbcType=VARCHAR}, #{invoiceType,jdbcType=DECIMAL}, #{classCode,jdbcType=VARCHAR},
#{invoiceNumber,jdbcType=VARCHAR}, #{buyerName,jdbcType=VARCHAR}, #{buyerTaxNumber,jdbcType=VARCHAR},
#{bankAccount,jdbcType=VARCHAR}, #{phoneNum,jdbcType=VARCHAR}, #{invoiceDate,jdbcType=TIMESTAMP},
#{seqNo,jdbcType=DECIMAL}, #{periodId,jdbcType=DECIMAL}, #{status,jdbcType=DECIMAL},
#{creatorId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{partAccntedPeriod,jdbcType=DECIMAL},
#{accntedPeriod,jdbcType=DECIMAL})
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.DataSourceDetail">
<insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.OutputVatInvoice">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into DATA_SOURCE_DETAIL
insert into OUTPUT_INVOICE
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
ID,
<if test="invoiceId != null">
INVOICE_ID,
</if>
<if test="dataSourceId != null">
DATA_SOURCE_ID,
<if test="invoiceType != null">
INVOICE_TYPE,
</if>
<if test="dataSourceType != null">
DATA_SOURCE_TYPE,
<if test="classCode != null">
CLASS_CODE,
</if>
<if test="itemValue != null">
ITEM_VALUE,
<if test="invoiceNumber != null">
INVOICE_NUMBER,
</if>
<if test="buyerName != null">
BUYER_NAME,
</if>
<if test="buyerTaxNumber != null">
BUYER_TAX_NUMBER,
</if>
<if test="bankAccount != null">
BANK_ACCOUNT,
</if>
<if test="phoneNum != null">
PHONE_NUM,
</if>
<if test="invoiceDate != null">
INVOICE_DATE,
</if>
<if test="seqNo != null">
SEQ_NO,
</if>
<if test="periodId != null">
PERIOD_ID,
</if>
<if test="status != null">
"STATUS",
</if>
<if test="creatorId != null">
CREATOR_ID,
</if>
<if test="createTime != null">
CREATE_TIME,
</if>
<if test="partAccntedPeriod != null">
PART_ACCNTED_PERIOD,
</if>
<if test="accntedPeriod != null">
ACCNTED_PERIOD,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=DECIMAL},
<if test="invoiceId != null">
#{invoiceId,jdbcType=VARCHAR},
</if>
<if test="invoiceType != null">
#{invoiceType,jdbcType=DECIMAL},
</if>
<if test="classCode != null">
#{classCode,jdbcType=VARCHAR},
</if>
<if test="invoiceNumber != null">
#{invoiceNumber,jdbcType=VARCHAR},
</if>
<if test="buyerName != null">
#{buyerName,jdbcType=VARCHAR},
</if>
<if test="buyerTaxNumber != null">
#{buyerTaxNumber,jdbcType=VARCHAR},
</if>
<if test="bankAccount != null">
#{bankAccount,jdbcType=VARCHAR},
</if>
<if test="phoneNum != null">
#{phoneNum,jdbcType=VARCHAR},
</if>
<if test="invoiceDate != null">
#{invoiceDate,jdbcType=TIMESTAMP},
</if>
<if test="seqNo != null">
#{seqNo,jdbcType=DECIMAL},
</if>
<if test="periodId != null">
#{periodId,jdbcType=DECIMAL},
</if>
<if test="status != null">
#{status,jdbcType=DECIMAL},
</if>
<if test="creatorId != null">
#{creatorId,jdbcType=VARCHAR},
</if>
<if test="dataSourceId != null">
#{dataSourceId,jdbcType=DECIMAL},
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="dataSourceType != null">
#{dataSourceType,jdbcType=DECIMAL},
<if test="partAccntedPeriod != null">
#{partAccntedPeriod,jdbcType=DECIMAL},
</if>
<if test="itemValue != null">
#{itemValue,jdbcType=VARCHAR},
<if test="accntedPeriod != null">
#{accntedPeriod,jdbcType=DECIMAL},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.DataSourceDetailExample" resultType="java.lang.Long">
<select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.OutputVatInvoiceExample" resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from DATA_SOURCE_DETAIL
select count(*) from OUTPUT_INVOICE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -190,19 +284,55 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update DATA_SOURCE_DETAIL
update OUTPUT_INVOICE
<set>
<if test="record.id != null">
ID = #{record.id,jdbcType=DECIMAL},
<if test="record.invoiceId != null">
INVOICE_ID = #{record.invoiceId,jdbcType=VARCHAR},
</if>
<if test="record.dataSourceId != null">
DATA_SOURCE_ID = #{record.dataSourceId,jdbcType=DECIMAL},
<if test="record.invoiceType != null">
INVOICE_TYPE = #{record.invoiceType,jdbcType=DECIMAL},
</if>
<if test="record.dataSourceType != null">
DATA_SOURCE_TYPE = #{record.dataSourceType,jdbcType=DECIMAL},
<if test="record.classCode != null">
CLASS_CODE = #{record.classCode,jdbcType=VARCHAR},
</if>
<if test="record.itemValue != null">
ITEM_VALUE = #{record.itemValue,jdbcType=VARCHAR},
<if test="record.invoiceNumber != null">
INVOICE_NUMBER = #{record.invoiceNumber,jdbcType=VARCHAR},
</if>
<if test="record.buyerName != null">
BUYER_NAME = #{record.buyerName,jdbcType=VARCHAR},
</if>
<if test="record.buyerTaxNumber != null">
BUYER_TAX_NUMBER = #{record.buyerTaxNumber,jdbcType=VARCHAR},
</if>
<if test="record.bankAccount != null">
BANK_ACCOUNT = #{record.bankAccount,jdbcType=VARCHAR},
</if>
<if test="record.phoneNum != null">
PHONE_NUM = #{record.phoneNum,jdbcType=VARCHAR},
</if>
<if test="record.invoiceDate != null">
INVOICE_DATE = #{record.invoiceDate,jdbcType=TIMESTAMP},
</if>
<if test="record.seqNo != null">
SEQ_NO = #{record.seqNo,jdbcType=DECIMAL},
</if>
<if test="record.periodId != null">
PERIOD_ID = #{record.periodId,jdbcType=DECIMAL},
</if>
<if test="record.status != null">
"STATUS" = #{record.status,jdbcType=DECIMAL},
</if>
<if test="record.creatorId != null">
CREATOR_ID = #{record.creatorId,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.partAccntedPeriod != null">
PART_ACCNTED_PERIOD = #{record.partAccntedPeriod,jdbcType=DECIMAL},
</if>
<if test="record.accntedPeriod != null">
ACCNTED_PERIOD = #{record.accntedPeriod,jdbcType=DECIMAL},
</if>
</set>
<if test="_parameter != null">
......@@ -214,46 +344,106 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update DATA_SOURCE_DETAIL
set ID = #{record.id,jdbcType=DECIMAL},
DATA_SOURCE_ID = #{record.dataSourceId,jdbcType=DECIMAL},
DATA_SOURCE_TYPE = #{record.dataSourceType,jdbcType=DECIMAL},
ITEM_VALUE = #{record.itemValue,jdbcType=VARCHAR}
update OUTPUT_INVOICE
set INVOICE_ID = #{record.invoiceId,jdbcType=VARCHAR},
INVOICE_TYPE = #{record.invoiceType,jdbcType=DECIMAL},
CLASS_CODE = #{record.classCode,jdbcType=VARCHAR},
INVOICE_NUMBER = #{record.invoiceNumber,jdbcType=VARCHAR},
BUYER_NAME = #{record.buyerName,jdbcType=VARCHAR},
BUYER_TAX_NUMBER = #{record.buyerTaxNumber,jdbcType=VARCHAR},
BANK_ACCOUNT = #{record.bankAccount,jdbcType=VARCHAR},
PHONE_NUM = #{record.phoneNum,jdbcType=VARCHAR},
INVOICE_DATE = #{record.invoiceDate,jdbcType=TIMESTAMP},
SEQ_NO = #{record.seqNo,jdbcType=DECIMAL},
PERIOD_ID = #{record.periodId,jdbcType=DECIMAL},
"STATUS" = #{record.status,jdbcType=DECIMAL},
CREATOR_ID = #{record.creatorId,jdbcType=VARCHAR},
CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
PART_ACCNTED_PERIOD = #{record.partAccntedPeriod,jdbcType=DECIMAL},
ACCNTED_PERIOD = #{record.accntedPeriod,jdbcType=DECIMAL}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.DataSourceDetail">
<update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.OutputVatInvoice">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update DATA_SOURCE_DETAIL
update OUTPUT_INVOICE
<set>
<if test="dataSourceId != null">
DATA_SOURCE_ID = #{dataSourceId,jdbcType=DECIMAL},
<if test="invoiceType != null">
INVOICE_TYPE = #{invoiceType,jdbcType=DECIMAL},
</if>
<if test="classCode != null">
CLASS_CODE = #{classCode,jdbcType=VARCHAR},
</if>
<if test="invoiceNumber != null">
INVOICE_NUMBER = #{invoiceNumber,jdbcType=VARCHAR},
</if>
<if test="buyerName != null">
BUYER_NAME = #{buyerName,jdbcType=VARCHAR},
</if>
<if test="buyerTaxNumber != null">
BUYER_TAX_NUMBER = #{buyerTaxNumber,jdbcType=VARCHAR},
</if>
<if test="bankAccount != null">
BANK_ACCOUNT = #{bankAccount,jdbcType=VARCHAR},
</if>
<if test="phoneNum != null">
PHONE_NUM = #{phoneNum,jdbcType=VARCHAR},
</if>
<if test="invoiceDate != null">
INVOICE_DATE = #{invoiceDate,jdbcType=TIMESTAMP},
</if>
<if test="seqNo != null">
SEQ_NO = #{seqNo,jdbcType=DECIMAL},
</if>
<if test="periodId != null">
PERIOD_ID = #{periodId,jdbcType=DECIMAL},
</if>
<if test="status != null">
"STATUS" = #{status,jdbcType=DECIMAL},
</if>
<if test="creatorId != null">
CREATOR_ID = #{creatorId,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="dataSourceType != null">
DATA_SOURCE_TYPE = #{dataSourceType,jdbcType=DECIMAL},
<if test="partAccntedPeriod != null">
PART_ACCNTED_PERIOD = #{partAccntedPeriod,jdbcType=DECIMAL},
</if>
<if test="itemValue != null">
ITEM_VALUE = #{itemValue,jdbcType=VARCHAR},
<if test="accntedPeriod != null">
ACCNTED_PERIOD = #{accntedPeriod,jdbcType=DECIMAL},
</if>
</set>
where ID = #{id,jdbcType=DECIMAL}
where INVOICE_ID = #{invoiceId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.DataSourceDetail">
<update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.OutputVatInvoice">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update DATA_SOURCE_DETAIL
set DATA_SOURCE_ID = #{dataSourceId,jdbcType=DECIMAL},
DATA_SOURCE_TYPE = #{dataSourceType,jdbcType=DECIMAL},
ITEM_VALUE = #{itemValue,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
update OUTPUT_INVOICE
set INVOICE_TYPE = #{invoiceType,jdbcType=DECIMAL},
CLASS_CODE = #{classCode,jdbcType=VARCHAR},
INVOICE_NUMBER = #{invoiceNumber,jdbcType=VARCHAR},
BUYER_NAME = #{buyerName,jdbcType=VARCHAR},
BUYER_TAX_NUMBER = #{buyerTaxNumber,jdbcType=VARCHAR},
BANK_ACCOUNT = #{bankAccount,jdbcType=VARCHAR},
PHONE_NUM = #{phoneNum,jdbcType=VARCHAR},
INVOICE_DATE = #{invoiceDate,jdbcType=TIMESTAMP},
SEQ_NO = #{seqNo,jdbcType=DECIMAL},
PERIOD_ID = #{periodId,jdbcType=DECIMAL},
"STATUS" = #{status,jdbcType=DECIMAL},
CREATOR_ID = #{creatorId,jdbcType=VARCHAR},
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
PART_ACCNTED_PERIOD = #{partAccntedPeriod,jdbcType=DECIMAL},
ACCNTED_PERIOD = #{accntedPeriod,jdbcType=DECIMAL}
where INVOICE_ID = #{invoiceId,jdbcType=VARCHAR}
</update>
<select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.DataSourceDetailExample" resultMap="BaseResultMap">
<select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.OutputVatInvoiceExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
......@@ -263,7 +453,7 @@
distinct
</if>
<include refid="Base_Column_List" />
from DATA_SOURCE_DETAIL
from OUTPUT_INVOICE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......
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