Compare commits

..

No commits in common. "c3479d7d8e13fc7ee7a74767d726bf732d10efa3" and "a5d392c2f631f470f0603f1d70f69e320d828157" have entirely different histories.

8 changed files with 56 additions and 88 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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