java110 %!s(int64=4) %!d(string=hai) anos
pai
achega
a53b4c975c

+ 40 - 25
java110-bean/src/main/java/com/java110/dto/reportCustomComponent/ReportCustomComponentDto.java

@@ -1,6 +1,7 @@
 package com.java110.dto.reportCustomComponent;
 
 import com.java110.dto.PageDto;
+
 import java.io.Serializable;
 import java.util.Date;
 
@@ -15,13 +16,13 @@ import java.util.Date;
 public class ReportCustomComponentDto extends PageDto implements Serializable {
 
     private String componentType;
-private String componentId;
-private String javaScript;
-private String name;
-private String componentGroup;
-private String remark;
-private String queryModel;
-private String sql;
+    private String componentId;
+    private String javaScript;
+    private String name;
+    private String componentGroup;
+    private String remark;
+    private String queryModel;
+    private String componentSql;
 
 
     private Date createTime;
@@ -32,52 +33,66 @@ private String sql;
     public String getComponentType() {
         return componentType;
     }
-public void setComponentType(String componentType) {
+
+    public void setComponentType(String componentType) {
         this.componentType = componentType;
     }
-public String getComponentId() {
+
+    public String getComponentId() {
         return componentId;
     }
-public void setComponentId(String componentId) {
+
+    public void setComponentId(String componentId) {
         this.componentId = componentId;
     }
-public String getJavaScript() {
+
+    public String getJavaScript() {
         return javaScript;
     }
-public void setJavaScript(String javaScript) {
+
+    public void setJavaScript(String javaScript) {
         this.javaScript = javaScript;
     }
-public String getName() {
+
+    public String getName() {
         return name;
     }
-public void setName(String name) {
+
+    public void setName(String name) {
         this.name = name;
     }
-public String getComponentGroup() {
+
+    public String getComponentGroup() {
         return componentGroup;
     }
-public void setComponentGroup(String componentGroup) {
+
+    public void setComponentGroup(String componentGroup) {
         this.componentGroup = componentGroup;
     }
-public String getRemark() {
+
+    public String getRemark() {
         return remark;
     }
-public void setRemark(String remark) {
+
+    public void setRemark(String remark) {
         this.remark = remark;
     }
-public String getQueryModel() {
+
+    public String getQueryModel() {
         return queryModel;
     }
-public void setQueryModel(String queryModel) {
+
+    public void setQueryModel(String queryModel) {
         this.queryModel = queryModel;
     }
-public String getSql() {
-        return sql;
-    }
-public void setSql(String sql) {
-        this.sql = sql;
+
+    public String getComponentSql() {
+        return componentSql;
     }
 
+    public void setComponentSql(String componentSql) {
+        this.componentSql = componentSql;
+    }
 
     public Date getCreateTime() {
         return createTime;

+ 47 - 32
java110-bean/src/main/java/com/java110/po/reportCustomComponent/ReportCustomComponentPo.java

@@ -16,7 +16,7 @@
 package com.java110.po.reportCustomComponent;
 
 import java.io.Serializable;
-import java.util.Date;
+
 /**
  * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体
  * add by 吴学文 at 2021-11-09 13:18:41 mail: 928255095@qq.com
@@ -28,69 +28,84 @@ import java.util.Date;
 public class ReportCustomComponentPo implements Serializable {
 
     private String componentType;
-private String componentId;
-private String javaScript;
-private String name;
-private String componentGroup;
-private String remark;
-private String statusCd = "0";
-private String queryModel;
-private String sql;
-public String getComponentType() {
+    private String componentId;
+    private String javaScript;
+    private String name;
+    private String componentGroup;
+    private String remark;
+    private String statusCd = "0";
+    private String queryModel;
+    private String componentSql;
+
+    public String getComponentType() {
         return componentType;
     }
-public void setComponentType(String componentType) {
+
+    public void setComponentType(String componentType) {
         this.componentType = componentType;
     }
-public String getComponentId() {
+
+    public String getComponentId() {
         return componentId;
     }
-public void setComponentId(String componentId) {
+
+    public void setComponentId(String componentId) {
         this.componentId = componentId;
     }
-public String getJavaScript() {
+
+    public String getJavaScript() {
         return javaScript;
     }
-public void setJavaScript(String javaScript) {
+
+    public void setJavaScript(String javaScript) {
         this.javaScript = javaScript;
     }
-public String getName() {
+
+    public String getName() {
         return name;
     }
-public void setName(String name) {
+
+    public void setName(String name) {
         this.name = name;
     }
-public String getComponentGroup() {
+
+    public String getComponentGroup() {
         return componentGroup;
     }
-public void setComponentGroup(String componentGroup) {
+
+    public void setComponentGroup(String componentGroup) {
         this.componentGroup = componentGroup;
     }
-public String getRemark() {
+
+    public String getRemark() {
         return remark;
     }
-public void setRemark(String remark) {
+
+    public void setRemark(String remark) {
         this.remark = remark;
     }
-public String getStatusCd() {
+
+    public String getStatusCd() {
         return statusCd;
     }
-public void setStatusCd(String statusCd) {
+
+    public void setStatusCd(String statusCd) {
         this.statusCd = statusCd;
     }
-public String getQueryModel() {
+
+    public String getQueryModel() {
         return queryModel;
     }
-public void setQueryModel(String queryModel) {
+
+    public void setQueryModel(String queryModel) {
         this.queryModel = queryModel;
     }
-public String getSql() {
-        return sql;
-    }
-public void setSql(String sql) {
-        this.sql = sql;
-    }
-
 
+    public String getComponentSql() {
+        return componentSql;
+    }
 
+    public void setComponentSql(String componentSql) {
+        this.componentSql = componentSql;
+    }
 }

+ 101 - 106
java110-db/src/main/resources/mapper/report/ReportCustomComponentV1ServiceDaoImplMapper.xml

@@ -5,129 +5,124 @@
 <mapper namespace="reportCustomComponentV1ServiceDaoImpl">
 
 
-
-
-
     <!-- 保存报表组件信息 add by wuxw 2018-07-03 -->
     <insert id="saveReportCustomComponentInfo" parameterType="Map">
         insert into report_custom_component(
-component_type,component_id,java_script,name,component_group,remark,query_model,sql
-) values (
-#{componentType},#{componentId},#{javaScript},#{name},#{componentGroup},#{remark},#{queryModel},#{sql}
-)
+        component_type,component_id,java_script,name,component_group,remark,query_model,component_sql
+        ) values (
+        #{componentType},#{componentId},#{javaScript},#{name},#{componentGroup},#{remark},#{queryModel},#{componentSql}
+        )
     </insert>
 
 
-
     <!-- 查询报表组件信息 add by wuxw 2018-07-03 -->
     <select id="getReportCustomComponentInfo" parameterType="Map" resultType="Map">
-        select  t.component_type,t.component_type componentType,t.component_id,t.component_id componentId,t.java_script,t.java_script javaScript,t.name,t.component_group,t.component_group componentGroup,t.remark,t.status_cd,t.status_cd statusCd,t.query_model,t.query_model queryModel,t.sql 
-from report_custom_component t 
-where 1 =1 
-<if test="componentType !=null and componentType != ''">
-   and t.component_type= #{componentType}
-</if> 
-<if test="componentId !=null and componentId != ''">
-   and t.component_id= #{componentId}
-</if> 
-<if test="javaScript !=null and javaScript != ''">
-   and t.java_script= #{javaScript}
-</if> 
-<if test="name !=null and name != ''">
-   and t.name= #{name}
-</if> 
-<if test="componentGroup !=null and componentGroup != ''">
-   and t.component_group= #{componentGroup}
-</if> 
-<if test="remark !=null and remark != ''">
-   and t.remark= #{remark}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="queryModel !=null and queryModel != ''">
-   and t.query_model= #{queryModel}
-</if> 
-<if test="sql !=null and sql != ''">
-   and t.sql= #{sql}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.component_type,t.component_type componentType,t.component_id,t.component_id
+        componentId,t.java_script,t.java_script javaScript,t.name,t.component_group,t.component_group
+        componentGroup,t.remark,t.status_cd,t.status_cd statusCd,t.query_model,t.query_model queryModel,t.component_sql componentSql
+        from report_custom_component t
+        where 1 =1
+        <if test="componentType !=null and componentType != ''">
+            and t.component_type= #{componentType}
+        </if>
+        <if test="componentId !=null and componentId != ''">
+            and t.component_id= #{componentId}
+        </if>
+        <if test="javaScript !=null and javaScript != ''">
+            and t.java_script= #{javaScript}
+        </if>
+        <if test="name !=null and name != ''">
+            and t.name= #{name}
+        </if>
+        <if test="componentGroup !=null and componentGroup != ''">
+            and t.component_group= #{componentGroup}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="queryModel !=null and queryModel != ''">
+            and t.query_model= #{queryModel}
+        </if>
+        <if test="componentSql !=null and componentSql != ''">
+            and t.component_sql= #{componentSql}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
     </select>
 
 
-
-
     <!-- 修改报表组件信息 add by wuxw 2018-07-03 -->
     <update id="updateReportCustomComponentInfo" parameterType="Map">
-        update  report_custom_component t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="componentType !=null and componentType != ''">
-, t.component_type= #{componentType}
-</if> 
-<if test="javaScript !=null and javaScript != ''">
-, t.java_script= #{javaScript}
-</if> 
-<if test="name !=null and name != ''">
-, t.name= #{name}
-</if> 
-<if test="componentGroup !=null and componentGroup != ''">
-, t.component_group= #{componentGroup}
-</if> 
-<if test="remark !=null and remark != ''">
-, t.remark= #{remark}
-</if> 
-<if test="queryModel !=null and queryModel != ''">
-, t.query_model= #{queryModel}
-</if> 
-<if test="sql !=null and sql != ''">
-, t.sql= #{sql}
-</if> 
- where 1=1 <if test="componentId !=null and componentId != ''">
-and t.component_id= #{componentId}
-</if> 
+        update report_custom_component t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="componentType !=null and componentType != ''">
+            , t.component_type= #{componentType}
+        </if>
+        <if test="javaScript !=null and javaScript != ''">
+            , t.java_script= #{javaScript}
+        </if>
+        <if test="name !=null and name != ''">
+            , t.name= #{name}
+        </if>
+        <if test="componentGroup !=null and componentGroup != ''">
+            , t.component_group= #{componentGroup}
+        </if>
+        <if test="remark !=null and remark != ''">
+            , t.remark= #{remark}
+        </if>
+        <if test="queryModel !=null and queryModel != ''">
+            , t.query_model= #{queryModel}
+        </if>
+        <if test="componentSql !=null and componentSql != ''">
+            , t.component_sql= #{componentSql}
+        </if>
+        where 1=1
+        <if test="componentId !=null and componentId != ''">
+            and t.component_id= #{componentId}
+        </if>
 
     </update>
 
     <!-- 查询报表组件数量 add by wuxw 2018-07-03 -->
-     <select id="queryReportCustomComponentsCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from report_custom_component t 
-where 1 =1 
-<if test="componentType !=null and componentType != ''">
-   and t.component_type= #{componentType}
-</if> 
-<if test="componentId !=null and componentId != ''">
-   and t.component_id= #{componentId}
-</if> 
-<if test="javaScript !=null and javaScript != ''">
-   and t.java_script= #{javaScript}
-</if> 
-<if test="name !=null and name != ''">
-   and t.name= #{name}
-</if> 
-<if test="componentGroup !=null and componentGroup != ''">
-   and t.component_group= #{componentGroup}
-</if> 
-<if test="remark !=null and remark != ''">
-   and t.remark= #{remark}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="queryModel !=null and queryModel != ''">
-   and t.query_model= #{queryModel}
-</if> 
-<if test="sql !=null and sql != ''">
-   and t.sql= #{sql}
-</if> 
-
-
-     </select>
+    <select id="queryReportCustomComponentsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from report_custom_component t
+        where 1 =1
+        <if test="componentType !=null and componentType != ''">
+            and t.component_type= #{componentType}
+        </if>
+        <if test="componentId !=null and componentId != ''">
+            and t.component_id= #{componentId}
+        </if>
+        <if test="javaScript !=null and javaScript != ''">
+            and t.java_script= #{javaScript}
+        </if>
+        <if test="name !=null and name != ''">
+            and t.name= #{name}
+        </if>
+        <if test="componentGroup !=null and componentGroup != ''">
+            and t.component_group= #{componentGroup}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="queryModel !=null and queryModel != ''">
+            and t.query_model= #{queryModel}
+        </if>
+        <if test="componentSql !=null and componentSql != ''">
+            and t.component_sql= #{componentSql}
+        </if>
+    </select>
 
 </mapper>