Commit 158e0c4c authored by neo's avatar neo

[dev] add vat some file

parent e99ddc02
package pwc.taxtech.atms.vat.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyVatMapper;
import pwc.taxtech.atms.vat.entity.InputVatInvoiceItem;
import pwc.taxtech.atms.vat.entity.InputVatInvoiceItemExample;
@Mapper
public interface InputVatInvoiceItemMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.INPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
long countByExample(InputVatInvoiceItemExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.INPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
int deleteByExample(InputVatInvoiceItemExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.INPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
int deleteByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.INPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
int insert(InputVatInvoiceItem record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.INPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
int insertSelective(InputVatInvoiceItem record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.INPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
List<InputVatInvoiceItem> selectByExampleWithRowbounds(InputVatInvoiceItemExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.INPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
List<InputVatInvoiceItem> selectByExample(InputVatInvoiceItemExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.INPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
InputVatInvoiceItem selectByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.INPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") InputVatInvoiceItem record, @Param("example") InputVatInvoiceItemExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.INPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
int updateByExample(@Param("record") InputVatInvoiceItem record, @Param("example") InputVatInvoiceItemExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.INPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(InputVatInvoiceItem record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.INPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
int updateByPrimaryKey(InputVatInvoiceItem record);
}
\ No newline at end of file
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.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 InputVatInvoiceMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
long countByExample(InputVatInvoiceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
int deleteByExample(InputVatInvoiceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
int deleteByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
int insert(InputVatInvoice record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
int insertSelective(InputVatInvoice record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
List<InputVatInvoice> selectByExampleWithRowbounds(InputVatInvoiceExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
List<InputVatInvoice> selectByExample(InputVatInvoiceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
InputVatInvoice selectByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
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. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
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. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(InputVatInvoice record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. INPUT_VAT_INVOICE
*
* @mbg.generated
*/
int updateByPrimaryKey(InputVatInvoice record);
long getInputVATInvoiceCountByCondition(@Param("paras") InputInvoicePreviewQueryParam param);
List<InputVatInvoice> getInputVATInvoiceCountByConditionWithPaging(@Param("paras") InputInvoicePreviewQueryParam param,
@Param("limitFrom") int limitFrom);
List<InputVATInvoiceResultDto> getInputVATInvoiceResultDto(@Param("dbName") String dbName);
List<CellInvoiceDto> selectInputInvoiceWithItem();
InputVATInvoiceItemExtendDto selectInvoiceExtendDto(@Param("invoiceItemId") String invoiceItemId);
}
\ No newline at end of file
package pwc.taxtech.atms.vat.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyVatMapper;
import pwc.taxtech.atms.vat.entity.OutputVatInvoiceItem;
import pwc.taxtech.atms.vat.entity.OutputVatInvoiceItemExample;
@Mapper
public interface OutputVatInvoiceItemMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.OUTPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
long countByExample(OutputVatInvoiceItemExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.OUTPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
int deleteByExample(OutputVatInvoiceItemExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.OUTPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
int deleteByPrimaryKey(String itemId);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.OUTPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
int insert(OutputVatInvoiceItem record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.OUTPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
int insertSelective(OutputVatInvoiceItem record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.OUTPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
List<OutputVatInvoiceItem> selectByExampleWithRowbounds(OutputVatInvoiceItemExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.OUTPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
List<OutputVatInvoiceItem> selectByExample(OutputVatInvoiceItemExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.OUTPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
OutputVatInvoiceItem selectByPrimaryKey(String itemId);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.OUTPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") OutputVatInvoiceItem record, @Param("example") OutputVatInvoiceItemExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.OUTPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
int updateByExample(@Param("record") OutputVatInvoiceItem record, @Param("example") OutputVatInvoiceItemExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.OUTPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(OutputVatInvoiceItem record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.OUTPUT_VAT_INVOICE_ITEM
*
* @mbg.generated
*/
int updateByPrimaryKey(OutputVatInvoiceItem record);
}
\ No newline at end of file
package pwc.taxtech.atms.vat.dao;
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 OutputVatInvoiceMapper 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
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