refactor:代码格式化

This commit is contained in:
wangjiahao 2021-07-28 14:40:22 +08:00
parent 343ea39385
commit 594d20eb4d
13 changed files with 51 additions and 74 deletions

View File

@ -1,6 +1,5 @@
package io.dataease.base.mapper.ext;
import io.dataease.base.domain.PanelView;
import io.dataease.dto.panel.PanelViewDto;
import io.dataease.dto.panel.po.PanelViewInsertDTO;
import org.apache.ibatis.annotations.Param;

View File

@ -2,7 +2,6 @@ package io.dataease.base.mapper.ext;
import io.dataease.base.domain.SysMsgExample;
import io.dataease.base.domain.SysMsgSetting;
import io.dataease.controller.message.dto.BatchSettingRequest;
import io.dataease.controller.message.dto.MsgGridDto;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

View File

@ -4,9 +4,7 @@ import io.dataease.datasource.dto.TableFiled;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class ExcelReaderUtil {
//excel2003扩展名

View File

@ -1,19 +1,16 @@
package io.dataease.commons.utils;
import com.google.gson.Gson;
import io.dataease.datasource.dto.TableFiled;
import io.dataease.dto.dataset.ExcelSheetData;
import io.dataease.i18n.Translator;
import org.apache.poi.hssf.eventusermodel.*;
import org.apache.poi.hssf.eventusermodel.dummyrecord.LastCellOfRowDummyRecord;
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.usermodel.HSSFDataFormatter;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
@ -309,7 +306,7 @@ public class ExcelXlsReader implements HSSFListener {
excelSheetData.setFields(new ArrayList<>());
totalSheets.add(excelSheetData);
}
if(curRow == 0){
for (String s : cellList) {
TableFiled tableFiled = new TableFiled();
@ -387,4 +384,4 @@ public class ExcelXlsReader implements HSSFListener {
return type;
}
}
}

View File

@ -1,13 +1,9 @@
package io.dataease.commons.utils;
import com.google.gson.Gson;
import io.dataease.datasource.dto.TableFiled;
import io.dataease.dto.dataset.ExcelSheetData;
import io.dataease.i18n.Translator;
import io.dataease.service.message.MsgAop;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
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.xssf.eventusermodel.XSSFReader;
import org.apache.poi.xssf.model.SharedStringsTable;
@ -471,4 +467,4 @@ public class ExcelXlsxReader extends DefaultHandler {
return str;
}
}
}

View File

@ -1,6 +1,5 @@
package io.dataease.dto.chart;
import io.dataease.base.domain.DatasetTableField;
import lombok.Getter;
import lombok.Setter;

View File

@ -1,7 +1,6 @@
package io.dataease.dto.dataset;
import io.dataease.base.domain.DatasetTableTask;
import io.dataease.base.domain.DatasetTableTaskLog;
import lombok.Getter;
import lombok.Setter;

View File

@ -1,6 +1,5 @@
package io.dataease.service.dataset;
import com.google.gson.Gson;
import io.dataease.base.domain.*;
import io.dataease.base.mapper.DatasetTableMapper;
import io.dataease.base.mapper.DatasetTableTaskMapper;
@ -14,8 +13,6 @@ import io.dataease.commons.constants.TriggerType;
import io.dataease.controller.request.dataset.DataSetTaskRequest;
import io.dataease.controller.sys.base.BaseGridRequest;
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.exception.DataEaseException;
import io.dataease.i18n.Translator;
@ -32,7 +29,6 @@ import javax.annotation.Resource;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
import java.util.stream.Collectors;
/**
* @Author gin

View File

@ -3,9 +3,7 @@ package io.dataease.service.panel;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import io.dataease.base.domain.PanelGroup;
import io.dataease.base.domain.PanelGroupWithBLOBs;
import io.dataease.base.mapper.PanelViewMapper;
import io.dataease.base.mapper.ext.ExtPanelViewMapper;
import io.dataease.commons.utils.AuthUtils;
import io.dataease.commons.utils.BeanUtils;
@ -21,7 +19,6 @@ import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

View File

@ -30,7 +30,6 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
@Service

View File

@ -22,7 +22,7 @@ module.exports = {
}
}],
"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/no-v-html": "off",
'accessor-pairs': 2,

View File

@ -3,9 +3,9 @@
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#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.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.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.svg?t=1545807318834#iconfont') format('svg');
}
.logo {
@ -215,35 +215,35 @@
margin: 1em 0;
}
.markdown>p,
.markdown>blockquote,
.markdown>.highlight,
.markdown>ol,
.markdown>ul {
.markdown > p,
.markdown > blockquote,
.markdown > .highlight,
.markdown > ol,
.markdown > ul {
width: 80%;
}
.markdown ul>li {
.markdown ul > li {
list-style: circle;
}
.markdown>ul li,
.markdown blockquote ul>li {
.markdown > ul li,
.markdown blockquote ul > li {
margin-left: 20px;
padding-left: 4px;
}
.markdown>ul li p,
.markdown>ol li p {
.markdown > ul li p,
.markdown > ol li p {
margin: 0.6em 0;
}
.markdown ol>li {
.markdown ol > li {
list-style: decimal;
}
.markdown>ol li,
.markdown blockquote ol>li {
.markdown > ol li,
.markdown blockquote ol > li {
margin-left: 20px;
padding-left: 4px;
}
@ -260,7 +260,7 @@
font-weight: 600;
}
.markdown>table {
.markdown > table {
border-collapse: collapse;
border-spacing: 0px;
empty-cells: show;
@ -269,20 +269,20 @@
margin-bottom: 24px;
}
.markdown>table th {
.markdown > table th {
white-space: nowrap;
color: #333;
font-weight: 600;
}
.markdown>table th,
.markdown>table td {
.markdown > table th,
.markdown > table td {
border: 1px solid #e9e9e9;
padding: 8px 16px;
text-align: left;
}
.markdown>table th {
.markdown > table th {
background: #F7F7F7;
}
@ -318,8 +318,8 @@
display: inline-block;
}
.markdown>br,
.markdown>p>br {
.markdown > br,
.markdown > p > br {
clear: both;
}
@ -453,13 +453,13 @@ pre[class*="language-"] {
overflow: auto;
}
:not(pre)>code[class*="language-"],
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}
/* Inline code */
:not(pre)>code[class*="language-"] {
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;

View File

@ -96,7 +96,7 @@
append-to-body
>
<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-input
v-model="taskForm.name"
@ -143,19 +143,18 @@
<el-form-item v-if="taskForm.rate === 'SIMPLE_CRON'" label="">
<el-form :inline="true">
<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-form-item :label="$t('cron.every')">
<el-input v-model="taskForm.extraData.simple_cron_value" size="mini" type="number" min="1" @change="onSimpleCronChange()" />
</el-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.hour')" value="hour" />
<el-option :label="$t('cron.day')" value="day" />
<el-option :label="$t('cron.hour')" value="hour" />
<el-option :label="$t('cron.day')" value="day" />
</el-select>
</el-form-item>
<el-form-item class="form-item" :label="$t('cron.every_exec')">
</el-form-item>
<el-form-item class="form-item" :label="$t('cron.every_exec')" />
</el-form>
</el-form-item>
@ -535,7 +534,7 @@ export default {
}
this.incrementalConfig.tableId = this.table.id
let startTime = new Date(task.startTime).getTime()
if(startTime < new Date().getTime()){
if (startTime < new Date().getTime()) {
startTime = new Date().getTime()
}
task.startTime = startTime
@ -559,10 +558,9 @@ export default {
this.listTask()
this.listTaskLog()
})
}else {
} else {
return false
}
})
},
deleteTask(task) {
@ -590,27 +588,27 @@ export default {
},
onSimpleCronChange() {
if (this.taskForm.extraData.simple_cron_type === 'minute') {
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})
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.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
}
if (this.taskForm.extraData.simple_cron_type === 'hour') {
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})
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.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
}
if (this.taskForm.extraData.simple_cron_type === 'day') {
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})
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.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
}
},
@ -620,16 +618,16 @@ export default {
this.taskForm.endTime = ''
this.taskForm.cron = ''
}
if (this.taskForm.rate === 'SIMPLE_CRON'){
if (this.taskForm.rate === 'SIMPLE_CRON') {
this.taskForm.cron = '0 0 0/1 * * ? *'
}
if (this.taskForm.rate === 'CRON'){
if (this.taskForm.rate === 'CRON') {
this.taskForm.cron = '00 00 * ? * * *'
}
},
listTaskLog(loading = true) {
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 => {
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 => {
this.taskLogData = response.data.listObject
this.page.total = response.data.itemCount
})