CellDataMapper.java 3.93 KB
Newer Older
frank.xa.zhang's avatar
frank.xa.zhang committed
1
package pwc.taxtech.atms.vat.dao;
2 3 4

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
5
import org.apache.ibatis.annotations.Select;
6 7
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyVatMapper;
frank.xa.zhang's avatar
frank.xa.zhang committed
8 9
import pwc.taxtech.atms.vat.entity.CellData;
import pwc.taxtech.atms.vat.entity.CellDataExample;
10
import pwc.taxtech.atms.vat.entity.PCTEntity;
11

12 13 14
import java.util.List;
import java.util.Set;

15 16 17 18
@Mapper
public interface CellDataMapper extends MyVatMapper {
    /**
     * This method was generated by MyBatis Generator.
19
     * This method corresponds to the database table TAX_PROJECT. CELL_DATA
20 21 22 23 24 25 26
     *
     * @mbg.generated
     */
    long countByExample(CellDataExample example);

    /**
     * This method was generated by MyBatis Generator.
27
     * This method corresponds to the database table TAX_PROJECT. CELL_DATA
28 29 30 31 32 33 34
     *
     * @mbg.generated
     */
    int deleteByExample(CellDataExample example);

    /**
     * This method was generated by MyBatis Generator.
35
     * This method corresponds to the database table TAX_PROJECT. CELL_DATA
36 37 38
     *
     * @mbg.generated
     */
39
    int deleteByPrimaryKey(Long id);
40 41 42

    /**
     * This method was generated by MyBatis Generator.
43
     * This method corresponds to the database table TAX_PROJECT. CELL_DATA
44 45 46 47 48 49 50
     *
     * @mbg.generated
     */
    int insert(CellData record);

    /**
     * This method was generated by MyBatis Generator.
51
     * This method corresponds to the database table TAX_PROJECT. CELL_DATA
52 53 54 55 56 57 58
     *
     * @mbg.generated
     */
    int insertSelective(CellData record);

    /**
     * This method was generated by MyBatis Generator.
59
     * This method corresponds to the database table TAX_PROJECT. CELL_DATA
60 61 62 63 64 65 66
     *
     * @mbg.generated
     */
    List<CellData> selectByExampleWithRowbounds(CellDataExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
67
     * This method corresponds to the database table TAX_PROJECT. CELL_DATA
68 69 70 71 72 73 74
     *
     * @mbg.generated
     */
    List<CellData> selectByExample(CellDataExample example);

    /**
     * This method was generated by MyBatis Generator.
75
     * This method corresponds to the database table TAX_PROJECT. CELL_DATA
76 77 78
     *
     * @mbg.generated
     */
79
    CellData selectByPrimaryKey(Long id);
80 81 82

    /**
     * This method was generated by MyBatis Generator.
83
     * This method corresponds to the database table TAX_PROJECT. CELL_DATA
84 85 86 87 88 89 90
     *
     * @mbg.generated
     */
    int updateByExampleSelective(@Param("record") CellData record, @Param("example") CellDataExample example);

    /**
     * This method was generated by MyBatis Generator.
91
     * This method corresponds to the database table TAX_PROJECT. CELL_DATA
92 93 94 95 96 97 98
     *
     * @mbg.generated
     */
    int updateByExample(@Param("record") CellData record, @Param("example") CellDataExample example);

    /**
     * This method was generated by MyBatis Generator.
99
     * This method corresponds to the database table TAX_PROJECT. CELL_DATA
100 101 102 103 104 105 106
     *
     * @mbg.generated
     */
    int updateByPrimaryKeySelective(CellData record);

    /**
     * This method was generated by MyBatis Generator.
107
     * This method corresponds to the database table TAX_PROJECT. CELL_DATA
108 109 110 111
     *
     * @mbg.generated
     */
    int updateByPrimaryKey(CellData record);
112 113 114

    @Select("<script>" +
            "SELECT   " +
115
            "    R.PERIOD, C.CELL_TEMPLATE_ID AS CELLTEMPLATEID, DATA  " +
116
            "FROM  " +
117 118
            "    CELL_DATA C,  " +
            "    REPORT R  " +
119
            "WHERE  " +
120
            "    C.REPORT_ID = R.ID AND " +
121 122 123
            "       " +
            "  <foreach item=\"item\" index=\"index\" collection=\"list\"" +
            "      open=\"(\" separator=\"OR\" close=\")\">" +
124
            "        ( R.PERIOD=#{item.period} AND C.CELL_TEMPLATE_ID=#{item.cellTemplateId} )" +
125 126
            "  </foreach>" +
            "</script>")
127
    List<PCTEntity> queryByPCTs(@Param("list") Set<PCTEntity> parameter);
128
}