Commit 1fd33481 authored by chase's avatar chase

新增查询模板方法

parent 8bdc79b3
...@@ -86,4 +86,46 @@ public interface FormulaAdminMapper extends MyMapper { ...@@ -86,4 +86,46 @@ public interface FormulaAdminMapper extends MyMapper {
" AND p.organization_id = t.organization_id AND p.year = #{year}" + " AND p.organization_id = t.organization_id AND p.year = #{year}" +
"") "")
Project getFixedProject(@Param("projectId") String projectId, @Param("year") Integer year); Project getFixedProject(@Param("projectId") String projectId, @Param("year") Integer year);
@Select("select " +
" detail.*, " +
" source_cell.cell_template_id AS cellTemplateID," +
" source_cell.column_index AS columnIndex," +
" source_cell.column_name AS columnName," +
" source_cell.row_name AS rowName," +
" source_cell.data_type AS resultType " +
"from (" +
" select " +
" template.template_id AS reportTemplateID," +
" template.template_group_id AS reportTemplateGroupID," +
" template.code AS reportCode," +
" cell_template.row_index AS rowIndex " +
" from period_template as template " +
" inner join period_cell_template as cell_template" +
" on template.template_id = cell_template.report_template_id" +
" where template.template_group_id = #{templateGroupId}" +
" and template.is_active_association = 1" +
" and template.code = #{code}" +
" and template.project_id = #{projectId}" +
" and template.period = #{period}" +
" and cell_template.project_id = #{projectId}" +
" and cell_template.period = #{period}" +
" and cell_template.column_index = #{rowColumnIndex}" +
" and cell_template.row_name = #{rowName}) as detail," +
" period_cell_template as source_cell" +
" where source_cell.project_id = #{projectId}" +
" and source_cell.period = #{period}" +
" and detail.reportTemplateID = source_cell.report_template_id" +
" and detail.rowIndex = source_cell.row_index" +
" and source_cell.column_index = #{columnIndex}"
)
List<CellTemplatePerGroupDto> getCellTemplateByNameAndIndex(
@Param("templateGroupId") Long templateGroupId,
@Param("code") String code,
@Param("rowColumnIndex") Integer rowColumnIndex,
@Param("rowName") String rowName,
@Param("columnIndex") Integer columnIndex,
@Param("projectId") String projectId,
@Param("period") Integer period);
} }
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