|
@@ -12,8 +12,9 @@ import java.util.List;
|
|
|
@Repository
|
|
@Repository
|
|
|
public interface ChartsConfigMapper {
|
|
public interface ChartsConfigMapper {
|
|
|
|
|
|
|
|
- @Insert("insert into bi_charts(id,CHART_NAME,CHART_TYPE,BD_DATA_ID,CHART_CONFIG,GROUP_BY,ACCESS_AUTHORITY,UPDATE_AUTHORITY,CHART_DESCRIBES,BC_CHART_STYLE,create_by,create_date) " +
|
|
|
|
|
- "VALUES (#{chartId},#{chartName},#{chartType}, #{dataId}, #{chartConfig}, #{groupBy}, #{accessAuthority}, #{updateAuthority}, #{describes},#{style}, #{createBy},to_date(#{createDate},'YYYY-MM-DD hh24:mi:ss'))" )
|
|
|
|
|
|
|
+ @Insert("insert into bi_charts(id,CHART_NAME,CHART_TYPE,BD_DATA_ID,CHART_CONFIG,GROUP_BY,ACCESS_AUTHORITY,UPDATE_AUTHORITY,BC_CHARTS_GROUP,CHART_DESCRIBES,BC_CHART_STYLE,create_by,create_date) " +
|
|
|
|
|
+ "VALUES (#{chartId},#{chartName},#{chartType}, #{dataId}, #{chartConfig}, #{groupBy}, #{accessAuthority}, #{updateAuthority}, #{ChartsGroup}" +
|
|
|
|
|
+ "#{describes},#{style}, #{createBy},to_date(#{createDate},'YYYY-MM-DD hh24:mi:ss'))" )
|
|
|
// @Options(useGeneratedKeys=false, keyProperty = "chartId",keyColumn = "id")
|
|
// @Options(useGeneratedKeys=false, keyProperty = "chartId",keyColumn = "id")
|
|
|
@SelectKey(before=true,keyProperty="chartId",resultType=Integer.class,statement="SELECT charts_squence.nextval from dual",keyColumn = "id")
|
|
@SelectKey(before=true,keyProperty="chartId",resultType=Integer.class,statement="SELECT charts_squence.nextval from dual",keyColumn = "id")
|
|
|
void insertCharts(ChartConfig chartConfig);
|
|
void insertCharts(ChartConfig chartConfig);
|
|
@@ -28,14 +29,14 @@ public interface ChartsConfigMapper {
|
|
|
"</script>")
|
|
"</script>")
|
|
|
void deleteCharts(List<Integer> idList);
|
|
void deleteCharts(List<Integer> idList);
|
|
|
|
|
|
|
|
- @Select("select id as chartId, chart_name as chartName, chart_type as chartType, create_by as createBy, create_date as createDate" +
|
|
|
|
|
|
|
+ @Select("select id as chartId, chart_name as chartName, chart_type as chartType, create_by as createBy, create_date as createDate, bc_charts_group as ChartsGroup" +
|
|
|
",bc_filters as filters, BD_DATA_ID as dataId, bc_table_name as tableName, CHART_CONFIG as chartConfig, GROUP_BY as groupBy," +
|
|
",bc_filters as filters, BD_DATA_ID as dataId, bc_table_name as tableName, CHART_CONFIG as chartConfig, GROUP_BY as groupBy," +
|
|
|
"ACCESS_AUTHORITY as accessAuthority, UPDATE_AUTHORITY as updateAuthority, CHART_DESCRIBES as describes, BC_CHART_STYLE as style, BC_FILTERS as filters " +
|
|
"ACCESS_AUTHORITY as accessAuthority, UPDATE_AUTHORITY as updateAuthority, CHART_DESCRIBES as describes, BC_CHART_STYLE as style, BC_FILTERS as filters " +
|
|
|
" from bi_charts where id = #{id}")
|
|
" from bi_charts where id = #{id}")
|
|
|
ChartConfig getOneChart(int id);
|
|
ChartConfig getOneChart(int id);
|
|
|
|
|
|
|
|
@Select("select id as chartId, chart_name as chartName, chart_type as chartType, create_by as createBy, create_date as createDate" +
|
|
@Select("select id as chartId, chart_name as chartName, chart_type as chartType, create_by as createBy, create_date as createDate" +
|
|
|
- ",bc_filters as filters, CHART_DESCRIBES as describes from bi_charts")
|
|
|
|
|
|
|
+ ",bc_filters as filters, CHART_DESCRIBES as describes, bc_charts_group as ChartsGroup from bi_charts")
|
|
|
List<ChartConfigList> getListCharts();
|
|
List<ChartConfigList> getListCharts();
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -44,6 +45,7 @@ public interface ChartsConfigMapper {
|
|
|
@Select("select dc.table_name from bi_data_connectors dc left join bi_charts c on dc.id =c.bd_data_id where c.id=#{chartId}")
|
|
@Select("select dc.table_name from bi_data_connectors dc left join bi_charts c on dc.id =c.bd_data_id where c.id=#{chartId}")
|
|
|
String getTableName(@Param("chartId") int id);
|
|
String getTableName(@Param("chartId") int id);
|
|
|
|
|
|
|
|
|
|
+
|
|
|
/*
|
|
/*
|
|
|
通过ID查找数据源配置
|
|
通过ID查找数据源配置
|
|
|
*/
|
|
*/
|
|
@@ -71,6 +73,7 @@ public interface ChartsConfigMapper {
|
|
|
"<if test=\"accessAuthority != null\"> , ACCESS_AUTHORITY = #{accessAuthority} </if>" +
|
|
"<if test=\"accessAuthority != null\"> , ACCESS_AUTHORITY = #{accessAuthority} </if>" +
|
|
|
"<if test=\"updateAuthority != null\"> , UPDATE_AUTHORITY = #{updateAuthority} </if>" +
|
|
"<if test=\"updateAuthority != null\"> , UPDATE_AUTHORITY = #{updateAuthority} </if>" +
|
|
|
"<if test=\"style != null\"> , BC_CHART_STYLE = #{style} </if>" +
|
|
"<if test=\"style != null\"> , BC_CHART_STYLE = #{style} </if>" +
|
|
|
|
|
+ "<if test=\"group !=null\">, BC_CHARTS_GROUP = #{ChartsGroup}</if>"+
|
|
|
"<if test=\"updateDate != null\"> , UPDATE_DATE = to_date(#{updateDate},'YYYY-MM-DD hh24:mi:ss') </if>" +
|
|
"<if test=\"updateDate != null\"> , UPDATE_DATE = to_date(#{updateDate},'YYYY-MM-DD hh24:mi:ss') </if>" +
|
|
|
"where id = #{chartId}" +
|
|
"where id = #{chartId}" +
|
|
|
"</script>")
|
|
"</script>")
|
|
@@ -98,6 +101,23 @@ public interface ChartsConfigMapper {
|
|
|
"</script>")
|
|
"</script>")
|
|
|
void updataChartsGroup(GroupInfo groupInfo);
|
|
void updataChartsGroup(GroupInfo groupInfo);
|
|
|
|
|
|
|
|
|
|
+// /*
|
|
|
|
|
+// 批量更新
|
|
|
|
|
+// */
|
|
|
|
|
+// @Update("<script>"+
|
|
|
|
|
+// "<foreach item = \"value\" index=\"key\" collenction=\"groupInfoMap.entrySet()\" separator=\",\">"+
|
|
|
|
|
+// "update bi_charts_group"+
|
|
|
|
|
+// "set"+
|
|
|
|
|
+// "bc_group_name = #{#{value}.groupName}" +
|
|
|
|
|
+// "<if test=\"value.groupIndex != null\"> , bc_index = #{#{value}.groupIndex} </if>" +
|
|
|
|
|
+// "<if test=\"value.fatherId != null\"> , bc_father_id ={#{value}.fatherId} </if>" +
|
|
|
|
|
+// "<if test=\"value.createBy != null\"> , create_by = {#{value}.createBy} </if>" +
|
|
|
|
|
+// ",updata_date = to_date(to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'),'YYYY-MM-DD hh24:mi:ss') "+
|
|
|
|
|
+// " where bc_id = #{value.id}" +
|
|
|
|
|
+// "</foreach>"+
|
|
|
|
|
+// "</script>")
|
|
|
|
|
+// void updataListGroup(@Param("groupInfoMap") Map<Integer, GroupInfo> groupInfoMap);
|
|
|
|
|
+
|
|
|
/*
|
|
/*
|
|
|
删除分组
|
|
删除分组
|
|
|
*/
|
|
*/
|
|
@@ -117,4 +137,5 @@ public interface ChartsConfigMapper {
|
|
|
@Select("select bc_id as id, bc_group_name as groupName, bc_index as groupIndex, bc_father_id as fatherId, create_by as createBy," +
|
|
@Select("select bc_id as id, bc_group_name as groupName, bc_index as groupIndex, bc_father_id as fatherId, create_by as createBy," +
|
|
|
"create_date as createDate from bi_charts_group")
|
|
"create_date as createDate from bi_charts_group")
|
|
|
List<GroupInfo> getChartsGroup();
|
|
List<GroupInfo> getChartsGroup();
|
|
|
|
|
+
|
|
|
}
|
|
}
|