保存进度!

This commit is contained in:
Kane Wang 2023-11-21 19:21:01 +08:00
parent 84b2e906f3
commit 0c89df8c34
8 changed files with 88 additions and 56 deletions

View File

@ -22,13 +22,13 @@
"@babel/eslint-parser": "^7.23.3",
"@rushstack/eslint-patch": "^1.5.1",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@vitejs/plugin-vue": "^4.4.1",
"@vitejs/plugin-vue": "^4.5.0",
"@vue/cli-plugin-eslint": "^5.0.8",
"@vue/eslint-config-typescript": "^12.0.0",
"axios": "^1.6.1",
"axios": "^1.6.2",
"babel": "^6.23.0",
"eslint-config-recommended": "^4.1.0",
"eslint-config-standard-with-typescript": "^39.1.1",
"eslint-config-standard-with-typescript": "^40.0.0",
"eslint-plugin-vue": "^9.18.1",
"node-sass": "^9.0.0",
"sass": "^1.69.5",
@ -2041,15 +2041,15 @@
}
},
"node_modules/@vitejs/plugin-vue": {
"version": "4.4.1",
"resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-4.4.1.tgz",
"integrity": "sha512-HCQG8VDFDM7YDAdcj5QI5DvUi+r6xvo9LgvYdk7LSkUNwdpempdB5horkMSZsbdey9Ywsf5aaU8kEPw9M5kREA==",
"version": "4.5.0",
"resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-4.5.0.tgz",
"integrity": "sha512-a2WSpP8X8HTEww/U00bU4mX1QpLINNuz/2KMNpLsdu3BzOpak3AGI1CJYBTXcc4SPhaD0eNRUp7IyQK405L5dQ==",
"dev": true,
"engines": {
"node": "^14.18.0 || >=16.0.0"
},
"peerDependencies": {
"vite": "^4.0.0",
"vite": "^4.0.0 || ^5.0.0",
"vue": "^3.2.25"
}
},
@ -3248,9 +3248,9 @@
}
},
"node_modules/axios": {
"version": "1.6.1",
"resolved": "https://registry.npmmirror.com/axios/-/axios-1.6.1.tgz",
"integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==",
"version": "1.6.2",
"resolved": "https://registry.npmmirror.com/axios/-/axios-1.6.2.tgz",
"integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==",
"dev": true,
"dependencies": {
"follow-redirects": "^1.15.0",
@ -6777,9 +6777,9 @@
}
},
"node_modules/eslint-config-standard-with-typescript": {
"version": "39.1.1",
"resolved": "https://registry.npmmirror.com/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-39.1.1.tgz",
"integrity": "sha512-t6B5Ep8E4I18uuoYeYxINyqcXb2UbC0SOOTxRtBSt2JUs+EzeXbfe2oaiPs71AIdnoWhXDO2fYOHz8df3kV84A==",
"version": "40.0.0",
"resolved": "https://registry.npmmirror.com/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-40.0.0.tgz",
"integrity": "sha512-GXUJcwIXiTQaS3H4etv8a1lejVVdZYaxZNz3g7vt6GoJosQqMTurbmSC4FVGyHiGT/d1TjFr3+47A3xsHhsG+Q==",
"dev": true,
"dependencies": {
"@typescript-eslint/parser": "^6.4.0",

View File

@ -23,13 +23,13 @@
"@babel/eslint-parser": "^7.23.3",
"@rushstack/eslint-patch": "^1.5.1",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@vitejs/plugin-vue": "^4.4.1",
"@vitejs/plugin-vue": "^4.5.0",
"@vue/cli-plugin-eslint": "^5.0.8",
"@vue/eslint-config-typescript": "^12.0.0",
"axios": "^1.6.1",
"axios": "^1.6.2",
"babel": "^6.23.0",
"eslint-config-recommended": "^4.1.0",
"eslint-config-standard-with-typescript": "^39.1.1",
"eslint-config-standard-with-typescript": "^40.0.0",
"eslint-plugin-vue": "^9.18.1",
"node-sass": "^9.0.0",
"sass": "^1.69.5",

View File

@ -46,7 +46,7 @@
</div>
<el-upload
drag
action="http://222.76.244.118:11101/desktop_archievement_backend/file/file-upload.do"
:action="ui.urlFileUpload"
name="files"
:show-file-list="false"
:data="ui.uploadParameters"
@ -62,7 +62,7 @@
</div>
</template>
<script lang="ts">
import { reactive, ref, onBeforeMount } from "vue";
import { reactive, onBeforeMount } from "vue";
import {
type BIReportType,
type ImportBIReportRequest,
@ -70,6 +70,7 @@ import {
type ImportBIReportResponseHandler,
importBIReport
} from "@/utils/BIReport.js";
import { API_URL } from "@/utils/api/config.js";
import { type FileUploadResponse } from "@/utils/fileUpload.js";
// import { UploadFilled } from "@element-plus/icons-vue";
import { type UploadProps, type UploadFile, type UploadFiles, ElMessage, ElMessageBox } from "element-plus";
@ -84,6 +85,7 @@ interface UI
hasCaption: boolean,
uploadParameters: any,
showFileList: boolean,
urlFileUpload: string,
}
export default {
@ -118,12 +120,13 @@ export default {
reportTypeName: "当月个车续保率跟踪报表【机构】",
},],
sheetIndex: 0,
firstRow: 2,
firstRow: 1,
hasCaption: true,
uploadParameters: {
"task-name": "1234",
},
showFileList: false,
urlFileUpload: API_URL.URL_UPLOAD_FILE,
});
/**

View File

@ -14,6 +14,7 @@
<el-button
type="warning"
icon="upload"
@click="showUploadFileDialog"
>
上传
</el-button>
@ -96,6 +97,20 @@
@size-change="onTablePageSizeChange"
/>
</div>
<div
class="upload-dialog-wrapper"
>
<el-dialog
v-model="ui.showUploadDialog"
title="上传报表"
width="600px"
:close-on-click-modal="false"
:close-on-press-escape="false"
:show-close="true"
>
<BiDataUploadView :report-type="3" />
</el-dialog>
</div>
</div>
</template>
<script lang="ts">
@ -107,11 +122,12 @@ import {
queryDepartmentRenewalRateData
} from "@/utils/BIReport.js";
import { ElMessageBox, ElMessage } from "element-plus";
import BiDataUploadView from "@/views/data/bi/BiDataUploadView.vue";
interface UI
{
showUI: boolean;
showUploadFileDialog: boolean;
showUploadDialog: boolean;
tablePageSize: number;
tableCurrentPageIndex: number;
BIDepartmentRenewalRateData: BIDepartmentRenewalRateRecord[];
@ -119,11 +135,12 @@ interface UI
export default {
name: "DepartmentRenewalRateView",
components: { BiDataUploadView, },
setup()
{
const ui: UI = reactive({
showUI: true,
showUploadFileDialog: false,
showUploadDialog: false,
tablePageSize: 10,
tableCurrentPageIndex: 1,
BIDepartmentRenewalRateData: [],
@ -183,6 +200,11 @@ export default {
}
};
const showUploadFileDialog = (): void =>
{
ui.showUploadDialog = true;
};
onBeforeMount((): void =>
{
refresh();
@ -197,6 +219,7 @@ export default {
ui,
onCurrentPageIndexChange,
onTablePageSizeChange,
showUploadFileDialog,
//
tableData,
refresh,

View File

@ -13,7 +13,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<spring.version>5.3.30</spring.version>
<spring.version>5.3.24</spring.version>
<log4j2.version>2.20.0</log4j2.version>
<!-- <spring.version>6.0.11</spring.version> -->
</properties>

View File

@ -20,8 +20,10 @@ import org.apache.ibatis.session.SqlSessionFactoryBuilder;
public class MybatisUtils
{
private static HashMap<String, SqlSession> SessionMap = new HashMap<>(5);
private static HashMap<String, SqlSession> SessionMapBatch = new HashMap<>(5);
private static HashMap<String, SqlSession> SessionMap = new HashMap<>( 5 );
private static HashMap<String, SqlSession> SessionMapBatch = new HashMap<>( 5 );
private static HashMap<String, SqlSessionFactory> SessionFactoryMap = new HashMap<>( 5 );
private static HashMap<String, SqlSessionFactory> SessionFactoryMapBatch = new HashMap<>( 5 );
private static String DEFAULT_CONFIGFILE = "mybatis/mybatis-config.xml";
/**
@ -33,43 +35,45 @@ public class MybatisUtils
public static SqlSession getSqlSession( String configFile ) throws IOException
{
// 根据配置文件的路径查找是否已经创建了对应的session
SqlSession session = SessionMap.get( configFile );
SqlSessionFactory factory = SessionFactoryMap.get( configFile );
// 找到就直接返回
if ( session != null )
if ( factory != null )
{
return session;
return factory.openSession();
}
// 没找到就创建一个
InputStream configIS = Resources.getResourceAsStream( configFile );
SqlSessionFactory factory = new SqlSessionFactoryBuilder().build( configIS );
session = factory.openSession();
factory = new SqlSessionFactoryBuilder().build( configIS );
SqlSession session = factory.openSession();
// 保存
SessionMap.put( configFile, session );
SessionFactoryMap.put( configFile, factory );
return session;
}
public static SqlSession getSqlSessionBatch( String configFile ) throws IOException
{
SqlSession sessionBatch = SessionMapBatch.get( configFile );
// 根据配置文件的路径查找是否已经创建了对应的session
SqlSessionFactory factory = SessionFactoryMap.get( configFile );
if ( sessionBatch != null )
// 找到就直接返回
if ( factory != null )
{
return sessionBatch;
return factory.openSession();
}
// 有缓存的就创建一个新的
// 找到就创建一个
InputStream configIS = Resources.getResourceAsStream( configFile );
SqlSessionFactory factory = new SqlSessionFactoryBuilder().build( configIS );
sessionBatch = factory.openSession(ExecutorType.BATCH, false );
factory = new SqlSessionFactoryBuilder().build( configIS );
SqlSession session = factory.openSession( ExecutorType.BATCH, false );
//保存
SessionMapBatch.put( configFile, sessionBatch );
// 保存
SessionFactoryMap.put( configFile, factory );
return sessionBatch;
return session;
}
/**
@ -80,21 +84,21 @@ public class MybatisUtils
public static SqlSession getSqlSession() throws IOException
{
// 根据配置文件的路径查找是否已经创建了对应的session
SqlSession session = SessionMap.get( DEFAULT_CONFIGFILE );
SqlSessionFactory factory = SessionFactoryMap.get( DEFAULT_CONFIGFILE );
// 找到就直接返回
if ( session != null )
if ( factory != null )
{
return session;
return factory.openSession();
}
// 没找到就创建一个
InputStream configIS = Resources.getResourceAsStream( DEFAULT_CONFIGFILE );
SqlSessionFactory factory = new SqlSessionFactoryBuilder().build( configIS );
session = factory.openSession();
factory = new SqlSessionFactoryBuilder().build( configIS );
SqlSession session = factory.openSession();
// 保存
SessionMap.put( DEFAULT_CONFIGFILE, session );
SessionFactoryMap.put( DEFAULT_CONFIGFILE, factory );
return session;
}
@ -108,21 +112,23 @@ public class MybatisUtils
*/
public static SqlSession getSqlSessionBatch() throws IOException
{
SqlSession sessionBatch = SessionMapBatch.get( DEFAULT_CONFIGFILE );
// 根据配置文件的路径查找是否已经创建了对应的session
SqlSessionFactory factory = SessionFactoryMap.get( DEFAULT_CONFIGFILE );
if ( sessionBatch != null )
// 找到就直接返回
if ( factory != null )
{
return sessionBatch;
return factory.openSession();
}
// 有缓存的就创建一个新的
// 找到就创建一个
InputStream configIS = Resources.getResourceAsStream( DEFAULT_CONFIGFILE );
SqlSessionFactory factory = new SqlSessionFactoryBuilder().build( configIS );
sessionBatch = factory.openSession(ExecutorType.BATCH, false );
factory = new SqlSessionFactoryBuilder().build( configIS );
SqlSession session = factory.openSession( ExecutorType.BATCH, false );
//保存
SessionMapBatch.put( DEFAULT_CONFIGFILE, sessionBatch );
// 保存
SessionFactoryMap.put( DEFAULT_CONFIGFILE, factory );
return sessionBatch;
return session;
}
}

View File

@ -61,7 +61,7 @@ public class CallerArchievement
params.put( "a_caller_code", callerCode );
session.clearCache();
// session.clearCache();
mapper.getCallerArchievement( params );
// 总业绩

View File

@ -38,7 +38,7 @@
</insert>
<select id="cleanTelsalerAttachingRateData" statementType="CALLABLE">
call telsale_bi_utils.清理BI电销坐席车非渗透跟踪表()
call telsale_bi_utils.清理BI电销坐席车非渗透跟踪表()
</select>
<select id="cleanTelsalerRenewalRateData" statementType="CALLABLE">
call telsale_bi_utils.清理BI电销坐席续保率跟踪表()