|
|
@@ -7,6 +7,7 @@ import com.usoftchina.bi.server.model.po.ChartConfig;
|
|
|
import com.usoftchina.bi.server.model.po.ChartConfigList;
|
|
|
import com.usoftchina.bi.server.model.po.ChartsConfigToDash;
|
|
|
import com.usoftchina.bi.server.model.vo.configVo.GroupInfo;
|
|
|
+import io.swagger.models.auth.In;
|
|
|
import org.apache.ibatis.annotations.*;
|
|
|
import org.springframework.stereotype.Repository;
|
|
|
|
|
|
@@ -18,9 +19,9 @@ import java.util.Map;
|
|
|
public interface ChartsConfigMapper {
|
|
|
|
|
|
@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, bc_charts_option, create_id, BC_FETCHCONFIG) " +
|
|
|
+ "create_by,create_date, bc_charts_option, create_id, BC_FETCHCONFIG, from_id, from_data_id) " +
|
|
|
"VALUES (#{chartId,jdbcType=INTEGER},#{chartName,jdbcType=VARCHAR},#{chartType,jdbcType=VARCHAR}, #{dataId,jdbcType=INTEGER}, #{chartConfig,jdbcType=VARCHAR}, #{groupBy,jdbcType=VARCHAR}, #{accessAuthority,jdbcType=VARCHAR}, #{updateAuthority,jdbcType=VARCHAR}, #{chartsGroup,jdbcType=INTEGER}," +
|
|
|
- "#{describes,jdbcType=VARCHAR},#{style,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},to_date(to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'),'YYYY-MM-DD hh24:mi:ss'), #{chartOption,jdbcType=VARCHAR}, #{createId,jdbcType=INTEGER}, #{fetchConfig,jdbcType=VARCHAR})" )
|
|
|
+ "#{describes,jdbcType=VARCHAR},#{style,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},to_date(to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'),'YYYY-MM-DD hh24:mi:ss'), #{chartOption,jdbcType=VARCHAR}, #{createId,jdbcType=INTEGER}, #{fetchConfig,jdbcType=VARCHAR},#{from_id,jdbcType=INTEGER},#{from_data_id,jdbcType=INTEGER})" )
|
|
|
// @Options(useGeneratedKeys=false, keyProperty = "chartId",keyColumn = "id")
|
|
|
@SelectKey(before=true,keyProperty="chartId",resultType=Integer.class,statement="SELECT bi_charts_sequence.nextval from dual",keyColumn = "id")
|
|
|
void insertCharts(ChartConfig chartConfig);
|
|
|
@@ -41,6 +42,9 @@ public interface ChartsConfigMapper {
|
|
|
@Select("select DATA_NAME as name from BI_DATA_CONNECTORS where id = #{id}")
|
|
|
String getDataNameById(int id);
|
|
|
|
|
|
+ @Select("select BD_DATA_ID from BI_CHARTS where FROM_DATA_ID = #{bd_data_id}")
|
|
|
+ Integer getDataConnectId(@Param("bd_data_id") int id);
|
|
|
+
|
|
|
/*
|
|
|
查看图表列表
|
|
|
*/
|
|
|
@@ -339,4 +343,9 @@ public interface ChartsConfigMapper {
|
|
|
"from bi_charts bc left join bi_data_connectors bd on bc.bd_data_id = bd.id where bc.id = #{id}")
|
|
|
ChartsColumnConfig getChartsColumn(int id);
|
|
|
|
|
|
+ /*
|
|
|
+ 通过图表ID查询图表列配置和style
|
|
|
+ */
|
|
|
+ @Select("select ID,BD_DATA_ID from BI_CHARTS where FROM_ID = #{bc_id} and FROM_DATA_ID = #{bd_data_id}")
|
|
|
+ List<Map<String, Object>> checkOldChart(@Param("bc_id") int bc_id,@Param("bd_data_id") int bd_data_id);
|
|
|
}
|