Browse Source

修改bug

xiaoqiao 10 months ago
parent
commit
85ee2848be

+ 6 - 1
src/main/java/com/bowintek/practice/controller/EsIndexController.java

@@ -105,8 +105,13 @@ public class EsIndexController {
     @ResponseBody
     @GetMapping("/exportEsIndex")
     public void exportEsIndex(HttpServletResponse response,
-                              @RequestParam(required = false) List<String> idList,
+                              @RequestParam(required = false)String ids,
                               String indexName, String indexCode) throws Exception {
+        List<String> idList = null;
+        if (!stringUtils.IsNullOrEmpty(ids)) {
+            idList = Arrays.stream(ids.split(",")).toList();
+        }
+
         List<EsIndexVo> dataList = esIndexService.getList(1, 9999, indexName, indexCode, idList).getList();
 
         ExcelHelper excelHelper = new ExcelHelper();

+ 8 - 2
src/main/java/com/bowintek/practice/controller/SubjectController.java

@@ -17,6 +17,7 @@ import com.bowintek.practice.vo.SubjectfieldVo;
 import com.github.pagehelper.PageInfo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+
 import javax.servlet.http.HttpServletResponse;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -95,6 +96,7 @@ public class SubjectController {
 
         return RespGenerstor.success(result);
     }
+
     @ResponseBody
     @PostMapping("/delete")
     public BaseResponse delete(@RequestBody List<String> idList) {
@@ -108,8 +110,12 @@ public class SubjectController {
     @ResponseBody
     @GetMapping("/exportSubject")
     public void exportSubject(HttpServletResponse response,
-                              @RequestParam(required = false) List<String> idList,
+                              @RequestParam(required = false) String ids,
                               String subjectName, String tabName, String tabCode) throws Exception {
+        List<String> idList = null;
+        if (!stringUtils.IsNullOrEmpty(ids)) {
+            idList = Arrays.stream(ids.split(",")).toList();
+        }
         List<SubjectVo> dataList = subjectService.getList(1, 9999, subjectName, tabName,
                 tabCode, idList).getList();
 
@@ -139,7 +145,7 @@ public class SubjectController {
         List<SubjectfieldVo> result = subjectService.importData(dataList, accountService.getLoginUserID());
 
         if (result.stream().filter(it -> !stringUtils.IsNullOrEmpty(it.getErrorMessage())).collect(Collectors.toList()).size() > 0) {
-             return RespGenerstor.fail(BaseErrorEnum.IMPORT_DATA_ERROR, result);
+            return RespGenerstor.fail(BaseErrorEnum.IMPORT_DATA_ERROR, result);
         } else {
             return RespGenerstor.success(result);
         }

+ 1 - 1
src/main/java/com/bowintek/practice/controller/system/RoleController.java

@@ -33,7 +33,7 @@ public class RoleController {
     }
 
     @GetMapping("getFunctionCodeTreeList")
-    public BaseResponse<List<FunctionCodeModel>> getFunctionCodeTreeList(@RequestParam("roleID") String roleID, @RequestParam("userTypeID") Integer userTypeID) {
+    public BaseResponse<List<FunctionCodeModel>> getFunctionCodeTreeList(String roleID, @RequestParam("userTypeID") Integer userTypeID) {
         return RespGenerstor.success(roleService.getFunctionCodeTreeList(roleID, userTypeID));
     }
 

+ 1 - 1
src/main/java/com/bowintek/practice/mapper/cquery/EsIndexCquery.java

@@ -7,6 +7,6 @@ import java.util.List;
 
 public interface EsIndexCquery {
 
-    List<EsIndexVo> getList(String indexName, String indexCode, String indexIdsString);
+    List<EsIndexVo> getList(String indexName, String indexCode, List<String> indexIdList);
     List<EsIndexfieldVo> getFieldList(String indexId,String parentId);
 }

+ 1 - 1
src/main/java/com/bowintek/practice/mapper/cquery/SubjectCQuery.java

@@ -8,7 +8,7 @@ import java.util.HashMap;
 import java.util.List;
 
 public interface SubjectCQuery {
-    List<SubjectVo> getList(String subjectName, String tabName, String tabCode, String subjectIdsString);
+    List<SubjectVo> getList(String subjectName, String tabName, String tabCode, List<String> subIdList);
     List<HashMap<String,Object>> getListToHashMap(String tabName);
     List<HashMap<String,Object>> getSubjectFieldToHashMapList(List<String> subIdList);
     List<SubjectfieldVo> getFieldList(String subId);

+ 3 - 2
src/main/java/com/bowintek/practice/services/impl/EsIndexServiceImpl.java

@@ -16,6 +16,7 @@ import com.github.pagehelper.PageInfo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 import java.util.UUID;
@@ -40,7 +41,7 @@ public class EsIndexServiceImpl implements EsIndexService {
                                        String indexName, String indexCode, List<String> idList) {
         PageHelper.startPage(page, rows);
 
-        List<EsIndexVo> dataList = esIndexCquery.getList(indexName, indexCode, stringUtils.ListToInSql(idList));
+        List<EsIndexVo> dataList = esIndexCquery.getList(indexName, indexCode, idList);
 
         PageInfo<EsIndexVo> result = new PageInfo(dataList);
         return result;
@@ -48,7 +49,7 @@ public class EsIndexServiceImpl implements EsIndexService {
 
     @Override
     public EsIndexVo getEsIndex(String indexId) {
-        EsIndexVo esIndex = esIndexCquery.getList(null, null, indexId).get(0);
+        EsIndexVo esIndex = esIndexCquery.getList(null, null,  Arrays.asList( indexId)).get(0);
         return esIndex;
     }
 

+ 2 - 2
src/main/java/com/bowintek/practice/services/impl/SubjectServiceImpl.java

@@ -46,7 +46,7 @@ public class SubjectServiceImpl implements SubjectService {
         PageHelper.startPage(page, rows);
 
         List<SubjectVo> dataList = subjectCQuery.getList(subjectName, tabName,
-                tabCode, stringUtils.ListToInSql(idList));
+                tabCode, idList);
 
         PageInfo<SubjectVo> result = new PageInfo(dataList);
         return result;
@@ -55,7 +55,7 @@ public class SubjectServiceImpl implements SubjectService {
     @Override
     public SubjectVo getSubject(String subjectId) {
         SubjectVo subject = subjectCQuery.getList(null, null,
-                null, subjectId).get(0);
+                null,Arrays.asList( subjectId)).get(0);
         return subject;
     }
 

+ 5 - 2
src/main/resources/mapping/cquery/EsIndexCQuery.xml

@@ -13,8 +13,11 @@
         <if test="indexCode!='' and indexCode!=null">
             and ix.indexCode like Concat('%',#{indexCode},'%')
         </if>
-        <if test="indexIdsString!='' and indexIdsString!=null">
-            and ix.indexId in (#{indexIdsString})
+        <if test="indexIdList!=null and indexIdList.size>0">
+            and ix.indexId in
+            <foreach collection="indexIdList" item="indexId" index="index" open="(" close=")" separator=",">
+                #{indexId}
+            </foreach>
         </if>
         order by ix.indexName
     </select>

+ 5 - 2
src/main/resources/mapping/cquery/SubjectCQuery.xml

@@ -47,8 +47,11 @@
         <if test="tabCode!='' and tabCode!=null">
             and sub.tabCode like Concat('%',#{tabCode},'%')
         </if>
-        <if test="subjectIdsString!='' and subjectIdsString!=null">
-            and sub.subId in (#{subjectIdsString})
+        <if test="subIdList!=null and subIdList.size>0">
+            and sub.subId in
+            <foreach collection="subIdList" item="subId" index="index" open="(" close=")" separator=",">
+                #{subId}
+            </foreach>
         </if>
         order by sub.tabName
     </select>

+ 4 - 4
src/main/resources/mapping/cquery/SysLogCQuery.xml

@@ -12,11 +12,11 @@
         <if test="loginID!='' and loginID!=null">
             and us.loginID like Concat('%',#{loginID},'%')
         </if>
-        <if test="startDate != null">
-            and l.logTime <![CDATA[ >= ]]> #{startDate}
+        <if test="endDate != null">
+            and l.logTime <![CDATA[ >= ]]> STR_TO_DATE(#{startDate},'%Y-%m-%d')
         </if>
-        <if test="startDate != null ">
-            and l.logTime <![CDATA[ < ]]> date_add(#{startDate}, interval 1 day)
+        <if test="endDate != null ">
+            and l.logTime <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day)
         </if>
         <if test="idList!=null and idList.size>0">
             and l.logID in

BIN
target/classes/com/bowintek/practice/controller/system/RoleController.class


+ 7 - 5
vue/src/components/basic/query/display-chart-bar.vue

@@ -42,8 +42,7 @@
       }
     },
     mounted(){
-      this.id
-      console.log("mounted" , "");
+      console.log("mounted" ,this.id);
     },
     methods:{
       getxAxis:function (){
@@ -52,10 +51,10 @@
         for(let i=0;i<this.dataList.length;i++){
           let arys = [] as any;
           for(let n=0;n<this.bases.length;n++){
-            let colName = "RENAME"+n;
+            let colName = "RENAME"+this.bases[n].disOrder;
             if(this.dataList[i][colName]) arys.push(this.dataList[i][colName]);
           }
-          xAxis.data.push(arys.join(' '));
+          xAxis.data.push(arys.join('_'));
         }
         console.log("getxAxis", xAxis);
         return xAxis;
@@ -122,7 +121,10 @@
           this.chart = echarts.init(document.getElementById('chart-'+this.id) as HTMLElement);
         if(this.chart!=null) {
           this.chart.setOption(option);
-          this.chart.resize();
+          let sender=this.chart;
+          setTimeout(function () {
+            sender.resize();
+          }, 100);
         }
       },
       resize: function (){

+ 4 - 0
vue/src/components/basic/query/drag-where.vue

@@ -259,6 +259,10 @@ export default defineComponent({
           if (this.getIsTimeLimit(row.operation) && row.values[0].val && row.values[0].val.length > 1 && row.values[0].val[1]) {
             row.value2 = row.values[0].val[1].format(formatString);
           }
+          if (this.getIsTimeLimit(row.operation) && row.values[0].val2 && row.values[0].val2.length > 1) {
+            row.value1 = row.values[0].val2[0].format(formatString);
+            row.value2 = row.values[0].val2[1].format(formatString);
+          }
           if (!this.getIsTimeLimit(row.operation) && row.values[0].val2) {
             row.value1 = row.values[0].val2.format(formatString);
           }

+ 2 - 2
vue/src/views/esindex/index.vue

@@ -32,8 +32,8 @@
       <a-row class="edit-operation">
         <a-col :span="24" style="text-align: right">
           <a-button type="primary" html-type="button" @click="add" functioncode="T010901">新增</a-button>
-          <BExportExcel :title="'导出'" :filename="'索引信息'" :url="'subject/exportSubject'"
-                        :params="{...formState, idList:selectedRowKeys}"></BExportExcel>
+          <BExportExcel :title="'导出'" :filename="'索引信息'" :url="'esindex/exportEsIndex'"
+                        :params="{...formState,  ids:selectedRowKeys.join(',')}"></BExportExcel>
           <a-popconfirm placement="leftTop"
             title="是否删除数据?"
             @confirm="onDelete()">

+ 0 - 9
vue/src/views/query/index.vue

@@ -226,21 +226,12 @@ export default defineComponent({
       console.log("tabChange", key);
       if (key == "2") {
         (displayChartBar.value as any).setData(dataList.value);
-        setTimeout(function () {
-          (displayChartBar.value as any).resize();
-        }, 100);
       }
       if (key == "3") {
         (displayChartLine.value as any).setData(dataList.value);
-        setTimeout(function () {
-          (displayChartLine.value as any).resize();
-        }, 100);
       }
       if (key == "4") {
         (displayChartYbar.value as any).setData(dataList.value);
-        setTimeout(function () {
-          (displayChartYbar.value as any).resize();
-        }, 100);
       }
     }
 

+ 1 - 1
vue/src/views/subject/index.vue

@@ -41,7 +41,7 @@
         <a-col :span="24" style="text-align: right">
           <a-button type="primary" html-type="button" @click="add" functioncode="T010801">新增</a-button>
           <BExportExcel :title="'导出'" :filename="'主题信息'" :url="'subject/exportSubject'"
-                        :params="{...formState, idList:selectedRowKeys}"></BExportExcel>
+                        :params="{...formState, ids:selectedRowKeys.join(',')}"></BExportExcel>
           <a-popconfirm placement="leftTop"
             title="是否删除数据?"
             @confirm="onDelete()">