提交 594d20eb authored 作者: wangjiahao's avatar wangjiahao

refactor:代码格式化

上级 343ea393
package io.dataease.base.mapper.ext; package io.dataease.base.mapper.ext;
import io.dataease.base.domain.PanelView;
import io.dataease.dto.panel.PanelViewDto; import io.dataease.dto.panel.PanelViewDto;
import io.dataease.dto.panel.po.PanelViewInsertDTO; import io.dataease.dto.panel.po.PanelViewInsertDTO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
......
...@@ -2,7 +2,6 @@ package io.dataease.base.mapper.ext; ...@@ -2,7 +2,6 @@ package io.dataease.base.mapper.ext;
import io.dataease.base.domain.SysMsgExample; import io.dataease.base.domain.SysMsgExample;
import io.dataease.base.domain.SysMsgSetting; import io.dataease.base.domain.SysMsgSetting;
import io.dataease.controller.message.dto.BatchSettingRequest;
import io.dataease.controller.message.dto.MsgGridDto; import io.dataease.controller.message.dto.MsgGridDto;
import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
......
...@@ -4,9 +4,7 @@ import io.dataease.datasource.dto.TableFiled; ...@@ -4,9 +4,7 @@ import io.dataease.datasource.dto.TableFiled;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.InputStream; import java.io.InputStream;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
public class ExcelReaderUtil { public class ExcelReaderUtil {
//excel2003扩展名 //excel2003扩展名
......
package io.dataease.commons.utils; package io.dataease.commons.utils;
import com.google.gson.Gson;
import io.dataease.datasource.dto.TableFiled; import io.dataease.datasource.dto.TableFiled;
import io.dataease.dto.dataset.ExcelSheetData; import io.dataease.dto.dataset.ExcelSheetData;
import io.dataease.i18n.Translator; import io.dataease.i18n.Translator;
import org.apache.poi.hssf.eventusermodel.*; import org.apache.poi.hssf.eventusermodel.*;
import org.apache.poi.hssf.eventusermodel.dummyrecord.LastCellOfRowDummyRecord; import org.apache.poi.hssf.eventusermodel.dummyrecord.LastCellOfRowDummyRecord;
import org.apache.poi.hssf.eventusermodel.dummyrecord.MissingCellDummyRecord; import org.apache.poi.hssf.eventusermodel.dummyrecord.MissingCellDummyRecord;
import org.apache.poi.hssf.model.HSSFFormulaParser;
import org.apache.poi.hssf.record.*; import org.apache.poi.hssf.record.*;
import org.apache.poi.hssf.usermodel.HSSFDataFormatter; import org.apache.poi.hssf.usermodel.HSSFDataFormatter;
import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.poifs.filesystem.POIFSFileSystem; import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import java.io.FileInputStream;
import java.io.InputStream; import java.io.InputStream;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -309,7 +306,7 @@ public class ExcelXlsReader implements HSSFListener { ...@@ -309,7 +306,7 @@ public class ExcelXlsReader implements HSSFListener {
excelSheetData.setFields(new ArrayList<>()); excelSheetData.setFields(new ArrayList<>());
totalSheets.add(excelSheetData); totalSheets.add(excelSheetData);
} }
if(curRow == 0){ if(curRow == 0){
for (String s : cellList) { for (String s : cellList) {
TableFiled tableFiled = new TableFiled(); TableFiled tableFiled = new TableFiled();
...@@ -387,4 +384,4 @@ public class ExcelXlsReader implements HSSFListener { ...@@ -387,4 +384,4 @@ public class ExcelXlsReader implements HSSFListener {
return type; return type;
} }
} }
\ No newline at end of file
package io.dataease.commons.utils; package io.dataease.commons.utils;
import com.google.gson.Gson;
import io.dataease.datasource.dto.TableFiled; import io.dataease.datasource.dto.TableFiled;
import io.dataease.dto.dataset.ExcelSheetData; import io.dataease.dto.dataset.ExcelSheetData;
import io.dataease.i18n.Translator; import io.dataease.i18n.Translator;
import io.dataease.service.message.MsgAop;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.openxml4j.opc.OPCPackage; import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.ss.usermodel.BuiltinFormats;
import org.apache.poi.ss.usermodel.DataFormatter; import org.apache.poi.ss.usermodel.DataFormatter;
import org.apache.poi.xssf.eventusermodel.XSSFReader; import org.apache.poi.xssf.eventusermodel.XSSFReader;
import org.apache.poi.xssf.model.SharedStringsTable; import org.apache.poi.xssf.model.SharedStringsTable;
...@@ -471,4 +467,4 @@ public class ExcelXlsxReader extends DefaultHandler { ...@@ -471,4 +467,4 @@ public class ExcelXlsxReader extends DefaultHandler {
return str; return str;
} }
} }
\ No newline at end of file
package io.dataease.dto.chart; package io.dataease.dto.chart;
import io.dataease.base.domain.DatasetTableField;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
......
package io.dataease.dto.dataset; package io.dataease.dto.dataset;
import io.dataease.base.domain.DatasetTableTask; import io.dataease.base.domain.DatasetTableTask;
import io.dataease.base.domain.DatasetTableTaskLog;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
......
package io.dataease.service.dataset; package io.dataease.service.dataset;
import com.google.gson.Gson;
import io.dataease.base.domain.*; import io.dataease.base.domain.*;
import io.dataease.base.mapper.DatasetTableMapper; import io.dataease.base.mapper.DatasetTableMapper;
import io.dataease.base.mapper.DatasetTableTaskMapper; import io.dataease.base.mapper.DatasetTableTaskMapper;
...@@ -14,8 +13,6 @@ import io.dataease.commons.constants.TriggerType; ...@@ -14,8 +13,6 @@ import io.dataease.commons.constants.TriggerType;
import io.dataease.controller.request.dataset.DataSetTaskRequest; import io.dataease.controller.request.dataset.DataSetTaskRequest;
import io.dataease.controller.sys.base.BaseGridRequest; import io.dataease.controller.sys.base.BaseGridRequest;
import io.dataease.controller.sys.base.ConditionEntity; import io.dataease.controller.sys.base.ConditionEntity;
import io.dataease.controller.sys.response.SysUserGridResponse;
import io.dataease.controller.sys.response.SysUserRole;
import io.dataease.dto.dataset.DataSetTaskDTO; import io.dataease.dto.dataset.DataSetTaskDTO;
import io.dataease.exception.DataEaseException; import io.dataease.exception.DataEaseException;
import io.dataease.i18n.Translator; import io.dataease.i18n.Translator;
...@@ -32,7 +29,6 @@ import javax.annotation.Resource; ...@@ -32,7 +29,6 @@ import javax.annotation.Resource;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
import java.util.stream.Collectors;
/** /**
* @Author gin * @Author gin
......
...@@ -3,9 +3,7 @@ package io.dataease.service.panel; ...@@ -3,9 +3,7 @@ package io.dataease.service.panel;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import io.dataease.base.domain.PanelGroup;
import io.dataease.base.domain.PanelGroupWithBLOBs; import io.dataease.base.domain.PanelGroupWithBLOBs;
import io.dataease.base.mapper.PanelViewMapper;
import io.dataease.base.mapper.ext.ExtPanelViewMapper; import io.dataease.base.mapper.ext.ExtPanelViewMapper;
import io.dataease.commons.utils.AuthUtils; import io.dataease.commons.utils.AuthUtils;
import io.dataease.commons.utils.BeanUtils; import io.dataease.commons.utils.BeanUtils;
...@@ -21,7 +19,6 @@ import org.springframework.transaction.annotation.Propagation; ...@@ -21,7 +19,6 @@ import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
......
...@@ -30,7 +30,6 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -30,7 +30,6 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Service @Service
......
...@@ -22,7 +22,7 @@ module.exports = { ...@@ -22,7 +22,7 @@ module.exports = {
} }
}], }],
"vue/singleline-html-element-content-newline": "off", "vue/singleline-html-element-content-newline": "off",
"vue/multiline-html-element-content-newline":"off", "vue/multiline-html-element-content-newline": "off",
"vue/name-property-casing": ["error", "PascalCase"], "vue/name-property-casing": ["error", "PascalCase"],
"vue/no-v-html": "off", "vue/no-v-html": "off",
'accessor-pairs': 2, 'accessor-pairs': 2,
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
font-family: "iconfont logo"; font-family: "iconfont logo";
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834'); src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'), src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'), url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'), url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg'); url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
} }
.logo { .logo {
...@@ -215,35 +215,35 @@ ...@@ -215,35 +215,35 @@
margin: 1em 0; margin: 1em 0;
} }
.markdown>p, .markdown > p,
.markdown>blockquote, .markdown > blockquote,
.markdown>.highlight, .markdown > .highlight,
.markdown>ol, .markdown > ol,
.markdown>ul { .markdown > ul {
width: 80%; width: 80%;
} }
.markdown ul>li { .markdown ul > li {
list-style: circle; list-style: circle;
} }
.markdown>ul li, .markdown > ul li,
.markdown blockquote ul>li { .markdown blockquote ul > li {
margin-left: 20px; margin-left: 20px;
padding-left: 4px; padding-left: 4px;
} }
.markdown>ul li p, .markdown > ul li p,
.markdown>ol li p { .markdown > ol li p {
margin: 0.6em 0; margin: 0.6em 0;
} }
.markdown ol>li { .markdown ol > li {
list-style: decimal; list-style: decimal;
} }
.markdown>ol li, .markdown > ol li,
.markdown blockquote ol>li { .markdown blockquote ol > li {
margin-left: 20px; margin-left: 20px;
padding-left: 4px; padding-left: 4px;
} }
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
font-weight: 600; font-weight: 600;
} }
.markdown>table { .markdown > table {
border-collapse: collapse; border-collapse: collapse;
border-spacing: 0px; border-spacing: 0px;
empty-cells: show; empty-cells: show;
...@@ -269,20 +269,20 @@ ...@@ -269,20 +269,20 @@
margin-bottom: 24px; margin-bottom: 24px;
} }
.markdown>table th { .markdown > table th {
white-space: nowrap; white-space: nowrap;
color: #333; color: #333;
font-weight: 600; font-weight: 600;
} }
.markdown>table th, .markdown > table th,
.markdown>table td { .markdown > table td {
border: 1px solid #e9e9e9; border: 1px solid #e9e9e9;
padding: 8px 16px; padding: 8px 16px;
text-align: left; text-align: left;
} }
.markdown>table th { .markdown > table th {
background: #F7F7F7; background: #F7F7F7;
} }
...@@ -318,8 +318,8 @@ ...@@ -318,8 +318,8 @@
display: inline-block; display: inline-block;
} }
.markdown>br, .markdown > br,
.markdown>p>br { .markdown > p > br {
clear: both; clear: both;
} }
...@@ -453,13 +453,13 @@ pre[class*="language-"] { ...@@ -453,13 +453,13 @@ pre[class*="language-"] {
overflow: auto; overflow: auto;
} }
:not(pre)>code[class*="language-"], :not(pre) > code[class*="language-"],
pre[class*="language-"] { pre[class*="language-"] {
background: #f5f2f0; background: #f5f2f0;
} }
/* Inline code */ /* Inline code */
:not(pre)>code[class*="language-"] { :not(pre) > code[class*="language-"] {
padding: .1em; padding: .1em;
border-radius: .3em; border-radius: .3em;
white-space: normal; white-space: normal;
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
append-to-body append-to-body
> >
<el-col> <el-col>
<el-form :form="taskForm" :model="taskForm" label-width="100px" size="mini" ref="taskForm" :rules="taskFormRules"> <el-form ref="taskForm" :form="taskForm" :model="taskForm" label-width="100px" size="mini" :rules="taskFormRules">
<el-form-item :label="$t('dataset.task_name')" prop="name"> <el-form-item :label="$t('dataset.task_name')" prop="name">
<el-input <el-input
v-model="taskForm.name" v-model="taskForm.name"
...@@ -143,19 +143,18 @@ ...@@ -143,19 +143,18 @@
<el-form-item v-if="taskForm.rate === 'SIMPLE_CRON'" label=""> <el-form-item v-if="taskForm.rate === 'SIMPLE_CRON'" label="">
<el-form :inline="true"> <el-form :inline="true">
<el-form-item :label="$t('cron.every')" > <el-form-item :label="$t('cron.every')">
<el-input v-model="taskForm.extraData.simple_cron_value" size="mini" type="number" min="1" @change="onSimpleCronChange()" /> <el-input v-model="taskForm.extraData.simple_cron_value" size="mini" type="number" min="1" @change="onSimpleCronChange()" />
</el-form-item> </el-form-item>
<el-form-item class="form-item"> <el-form-item class="form-item">
<el-select v-model="taskForm.extraData.simple_cron_type" filterable size="mini" @change="onSimpleCronChange()" > <el-select v-model="taskForm.extraData.simple_cron_type" filterable size="mini" @change="onSimpleCronChange()">
<el-option :label="$t('cron.minute')" value="minute" /> <el-option :label="$t('cron.minute')" value="minute" />
<el-option :label="$t('cron.hour')" value="hour" /> <el-option :label="$t('cron.hour')" value="hour" />
<el-option :label="$t('cron.day')" value="day" /> <el-option :label="$t('cron.day')" value="day" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="form-item" :label="$t('cron.every_exec')"> <el-form-item class="form-item" :label="$t('cron.every_exec')" />
</el-form-item>
</el-form> </el-form>
</el-form-item> </el-form-item>
...@@ -535,7 +534,7 @@ export default { ...@@ -535,7 +534,7 @@ export default {
} }
this.incrementalConfig.tableId = this.table.id this.incrementalConfig.tableId = this.table.id
let startTime = new Date(task.startTime).getTime() let startTime = new Date(task.startTime).getTime()
if(startTime < new Date().getTime()){ if (startTime < new Date().getTime()) {
startTime = new Date().getTime() startTime = new Date().getTime()
} }
task.startTime = startTime task.startTime = startTime
...@@ -559,10 +558,9 @@ export default { ...@@ -559,10 +558,9 @@ export default {
this.listTask() this.listTask()
this.listTaskLog() this.listTaskLog()
}) })
}else { } else {
return false return false
} }
}) })
}, },
deleteTask(task) { deleteTask(task) {
...@@ -590,27 +588,27 @@ export default { ...@@ -590,27 +588,27 @@ export default {
}, },
onSimpleCronChange() { onSimpleCronChange() {
if (this.taskForm.extraData.simple_cron_type === 'minute') { if (this.taskForm.extraData.simple_cron_type === 'minute') {
if(this.taskForm.extraData.simple_cron_value < 1 || this.taskForm.extraData.simple_cron_value > 59){ if (this.taskForm.extraData.simple_cron_value < 1 || this.taskForm.extraData.simple_cron_value > 59) {
this.$message({message: this.$t('cron.minute_limit'), type: 'warning', showClose: true}) this.$message({ message: this.$t('cron.minute_limit'), type: 'warning', showClose: true })
this.taskForm.extraData.simple_cron_value = 59 this.taskForm.extraData.simple_cron_value = 59
} }
this.taskForm.cron = '0 0/'+ this.taskForm.extraData.simple_cron_value + ' * * * ? *' this.taskForm.cron = '0 0/' + this.taskForm.extraData.simple_cron_value + ' * * * ? *'
return return
} }
if (this.taskForm.extraData.simple_cron_type === 'hour') { if (this.taskForm.extraData.simple_cron_type === 'hour') {
if(this.taskForm.extraData.simple_cron_value < 1 || this.taskForm.extraData.simple_cron_value > 23){ if (this.taskForm.extraData.simple_cron_value < 1 || this.taskForm.extraData.simple_cron_value > 23) {
this.$message({message: this.$t('cron.hour_limit'), type: 'warning', showClose: true}) this.$message({ message: this.$t('cron.hour_limit'), type: 'warning', showClose: true })
this.taskForm.extraData.simple_cron_value = 23 this.taskForm.extraData.simple_cron_value = 23
} }
this.taskForm.cron = '0 0 0/'+ this.taskForm.extraData.simple_cron_value + ' * * ? *' this.taskForm.cron = '0 0 0/' + this.taskForm.extraData.simple_cron_value + ' * * ? *'
return return
} }
if (this.taskForm.extraData.simple_cron_type === 'day') { if (this.taskForm.extraData.simple_cron_type === 'day') {
if(this.taskForm.extraData.simple_cron_value < 1 || this.taskForm.extraData.simple_cron_value > 31){ if (this.taskForm.extraData.simple_cron_value < 1 || this.taskForm.extraData.simple_cron_value > 31) {
this.$message({message: this.$t('cron.day_limit'), type: 'warning', showClose: true}) this.$message({ message: this.$t('cron.day_limit'), type: 'warning', showClose: true })
this.taskForm.extraData.simple_cron_value = 31 this.taskForm.extraData.simple_cron_value = 31
} }
this.taskForm.cron = '0 0 0 1/'+ this.taskForm.extraData.simple_cron_value + ' * ? *' this.taskForm.cron = '0 0 0 1/' + this.taskForm.extraData.simple_cron_value + ' * ? *'
return return
} }
}, },
...@@ -620,16 +618,16 @@ export default { ...@@ -620,16 +618,16 @@ export default {
this.taskForm.endTime = '' this.taskForm.endTime = ''
this.taskForm.cron = '' this.taskForm.cron = ''
} }
if (this.taskForm.rate === 'SIMPLE_CRON'){ if (this.taskForm.rate === 'SIMPLE_CRON') {
this.taskForm.cron = '0 0 0/1 * * ? *' this.taskForm.cron = '0 0 0/1 * * ? *'
} }
if (this.taskForm.rate === 'CRON'){ if (this.taskForm.rate === 'CRON') {
this.taskForm.cron = '00 00 * ? * * *' this.taskForm.cron = '00 00 * ? * * *'
} }
}, },
listTaskLog(loading = true) { listTaskLog(loading = true) {
const params = {"conditions":[{"field":"dataset_table_task_log.table_id","operator":"eq","value": this.table.id}],"orders":[]} const params = { 'conditions': [{ 'field': 'dataset_table_task_log.table_id', 'operator': 'eq', 'value': this.table.id }], 'orders': [] }
post('/dataset/taskLog/list/' + this.table.type + '/' + this.page.currentPage + '/' + this.page.pageSize, params, loading).then(response => { post('/dataset/taskLog/list/' + this.table.type + '/' + this.page.currentPage + '/' + this.page.pageSize, params, loading).then(response => {
this.taskLogData = response.data.listObject this.taskLogData = response.data.listObject
this.page.total = response.data.itemCount this.page.total = response.data.itemCount
}) })
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论