Compare commits
8 Commits
87a023fff7
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 74c4389c9f | |||
| 2eaedf52fe | |||
| 6cae285034 | |||
| 5a3a854160 | |||
| ca17efb5fa | |||
| 364753a64d | |||
| 8459896ae5 | |||
| 80386c533f |
25
code/backend/RegulatoryManagementBackend/.vscode/.editorconfig
vendored
Normal file
25
code/backend/RegulatoryManagementBackend/.vscode/.editorconfig
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# top-most EditorConfig file
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.js]
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[*.ts]
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[*.py]
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[*.java]
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[*.xml]
|
||||||
|
indent_size = 2
|
||||||
78
code/backend/RegulatoryManagementBackend/.vscode/fileheader.template.js
vendored
Normal file
78
code/backend/RegulatoryManagementBackend/.vscode/fileheader.template.js
vendored
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
/**
|
||||||
|
* This file is generated by VSCode extension: Fileheader Pro
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* These comments can help you write your own template with type hint
|
||||||
|
* @typedef {Object} FileheaderVariable Fileheader variables
|
||||||
|
* @property {string} birthtime file birth time. will get it from VCS or fallback to filesystem when it is not available
|
||||||
|
* @property {string} mtime file modification time. will get it from VCS or fallback to filesystem when it is not available
|
||||||
|
* @property {string} authorName if the file is tracked by VCS, it will get the author name from VCS. else it will get it from current user name
|
||||||
|
* @property {string} authorEmail if the file is tracked by VCS, it will get the author email from VCS. else it will get it from current user email
|
||||||
|
* @property {string} userName else it will get it from current user name
|
||||||
|
* @property {string} userEmail user email is from VSCode config, and fallback to VCS config
|
||||||
|
* @property {string} companyName
|
||||||
|
* @property {string} projectName name of current project
|
||||||
|
* @property {string} filePath the file path, relative to project root with POSIX path separator
|
||||||
|
* @property {string} dirPath the directory path, relative to project root with POSIX path separator
|
||||||
|
* @property {string} fileName filename with extension
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {string | number | null | undefined | Template | boolean} TemplateInterpolation NOTE: boolean or falsy value will render empty string
|
||||||
|
*
|
||||||
|
* @typedef {{ strings: TemplateStringsArray; interpolations: TemplateInterpolation[]; }} Template
|
||||||
|
* @typedef {(strings: TemplateStringsArray, ...values: any[]) => string} ITemplateFunction
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Please confirm your provider extends from globalThis.FileheaderLanguageProvider
|
||||||
|
*/
|
||||||
|
class CustomLanguageProvider extends globalThis.FileheaderLanguageProvider {
|
||||||
|
/**
|
||||||
|
* @type {string[]}
|
||||||
|
*/
|
||||||
|
languages = [
|
||||||
|
"java",
|
||||||
|
"javascript",
|
||||||
|
"typescript",
|
||||||
|
"javascriptreact",
|
||||||
|
"typescriptreact",
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {string=} the language block comment start string.
|
||||||
|
* this is for future feature: support detect old custom template when custom template changes
|
||||||
|
*/
|
||||||
|
blockCommentStart = "/**";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {string=}
|
||||||
|
*/
|
||||||
|
blockCommentEnd = "*/";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get your template when document language matched
|
||||||
|
* @param {ITemplateFunction} tpl template function, it is a tagged function, support nested interpolation
|
||||||
|
* @param {FileheaderVariable} variables template variables
|
||||||
|
* @returns {Template}
|
||||||
|
*/
|
||||||
|
getTemplate(tpl, variables) {
|
||||||
|
// prettier-ignore
|
||||||
|
return tpl
|
||||||
|
`/**
|
||||||
|
* @Author: ${variables.authorName} <${variables.authorEmail}>
|
||||||
|
* @Date: ${variables.birthtime}
|
||||||
|
* @LastEditors: ${variables.userName}
|
||||||
|
* @LastModified: ${variables.mtime}
|
||||||
|
* @FilePath: ${variables.filePath}
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2025} by Kane All rights reserved
|
||||||
|
*/`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// export your provider classes
|
||||||
|
module.exports = [CustomLanguageProvider];
|
||||||
4
code/backend/RegulatoryManagementBackend/.vscode/settings.json
vendored
Normal file
4
code/backend/RegulatoryManagementBackend/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"java.configuration.updateBuildConfiguration": "interactive",
|
||||||
|
"java.compile.nullAnalysis.mode": "automatic"
|
||||||
|
}
|
||||||
153
code/backend/RegulatoryManagementBackend/pom.xml
Normal file
153
code/backend/RegulatoryManagementBackend/pom.xml
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>com.cpic.xim</groupId>
|
||||||
|
<artifactId>RegulatoryManagementBackend</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>war</packaging>
|
||||||
|
|
||||||
|
<name>RegulatoryManagementBackend Maven Webapp</name>
|
||||||
|
<!-- FIXME change it to the project's website -->
|
||||||
|
<url>http://www.example.com</url>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<maven.compiler.source>18</maven.compiler.source>
|
||||||
|
<maven.compiler.target>18</maven.compiler.target>
|
||||||
|
<spring.version>6.2.11</spring.version>
|
||||||
|
<log4j.version>2.24.3</log4j.version>
|
||||||
|
<jackson.version>2.18.3</jackson.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>4.13.1</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- springmvc -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-context</artifactId>
|
||||||
|
<version>${spring.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-test</artifactId>
|
||||||
|
<version>${spring.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-web</artifactId>
|
||||||
|
<version>${spring.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-webmvc</artifactId>
|
||||||
|
<version>${spring.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.servlet</groupId>
|
||||||
|
<artifactId>jakarta.servlet-api</artifactId>
|
||||||
|
<version>6.1.0</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- log4j -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-core</artifactId>
|
||||||
|
<version>${log4j.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-slf4j2-impl</artifactId>
|
||||||
|
<version>${log4j.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-api</artifactId>
|
||||||
|
<version>${log4j.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- jackson -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-databind</artifactId>
|
||||||
|
<version>${jackson.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-core</artifactId>
|
||||||
|
<version>${jackson.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-annotations</artifactId>
|
||||||
|
<version>${jackson.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
|
<version>9.2.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-fileupload2-jakarta-servlet6</artifactId>
|
||||||
|
<version>2.0.0-M2</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-io</groupId>
|
||||||
|
<artifactId>commons-io</artifactId>
|
||||||
|
<version>2.18.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>RegulatoryManagementBackend</finalName>
|
||||||
|
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be
|
||||||
|
moved to parent pom) -->
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-clean-plugin</artifactId>
|
||||||
|
<version>3.4.0</version>
|
||||||
|
</plugin>
|
||||||
|
<!-- see
|
||||||
|
http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>3.3.1</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.13.0</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>3.3.0</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<version>3.4.0</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-install-plugin</artifactId>
|
||||||
|
<version>3.1.2</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
|
<version>3.1.2</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
*
|
||||||
|
* @Date: 2023-04-05 22:34:36
|
||||||
|
*
|
||||||
|
* @LastEditors: Kane
|
||||||
|
*
|
||||||
|
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/QueryResponse.java
|
||||||
|
*
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package com.cpic.xim.web.controllers;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
public class QueryResponse
|
||||||
|
{
|
||||||
|
@JsonProperty( "success" )
|
||||||
|
private boolean success;
|
||||||
|
|
||||||
|
@JsonProperty( "message" )
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
public QueryResponse( boolean success, String message )
|
||||||
|
{
|
||||||
|
this.success = success;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public QueryResponse()
|
||||||
|
{
|
||||||
|
this.success = false;
|
||||||
|
this.message = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSuccess()
|
||||||
|
{
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuccess( boolean success )
|
||||||
|
{
|
||||||
|
this.success = success;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage()
|
||||||
|
{
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessage( String message )
|
||||||
|
{
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
final int prime = 31;
|
||||||
|
int result = 1;
|
||||||
|
result = prime * result + (success ? 1231 : 1237);
|
||||||
|
result = prime * result + ((message == null) ? 0 : message.hashCode());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals( Object obj )
|
||||||
|
{
|
||||||
|
if ( this == obj )
|
||||||
|
return true;
|
||||||
|
if ( obj == null )
|
||||||
|
return false;
|
||||||
|
if ( getClass() != obj.getClass() )
|
||||||
|
return false;
|
||||||
|
QueryResponse other = ( QueryResponse ) obj;
|
||||||
|
if ( success != other.success )
|
||||||
|
return false;
|
||||||
|
if ( message == null )
|
||||||
|
{
|
||||||
|
if ( other.message != null )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if ( !message.equals( other.message ) )
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return "QueryResult [success=" + success + ", message=" + message + "]";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
/**
|
||||||
|
* @Author: Kane Wang <wangkane@qq.com>
|
||||||
|
* @Date: 2025-10-15 11:42:56
|
||||||
|
* @LastEditors: Kane Wang
|
||||||
|
* @LastModified: 2025-10-15 17:48:52
|
||||||
|
* @FilePath: src/main/java/com/cpic/xim/web/controllers/fileupload/FileUpload.java
|
||||||
|
* @Description: 用于接受上传文件的Controller。
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 by Kane All rights reserved
|
||||||
|
*/
|
||||||
|
package com.cpic.xim.web.controllers.fileupload;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.ZoneOffset;
|
||||||
|
import java.util.Vector;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
|
||||||
|
|
||||||
|
// @SuppressWarnings( "unused" )
|
||||||
|
@Controller
|
||||||
|
@RequestMapping( path = "/file" )
|
||||||
|
public class FileUpload
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 接收上传文件,并保存到临时目录:
|
||||||
|
* 1、临时目录下再用sessionID作为子目录保存文件。
|
||||||
|
* 2、保存时不更改文件名,会覆盖同名文件。
|
||||||
|
* 3、MultipartFile参数形参名称必须和请求form中file标签的name属性一致,否则值为null。
|
||||||
|
* 4、返回值为接收结果和文件保存绝对路径。
|
||||||
|
*
|
||||||
|
* @param taskName 任务名称字符串
|
||||||
|
* @param files MultipartFile结构的文件对象
|
||||||
|
* @param request HttpServletRequest对象实例
|
||||||
|
* @return 返回一个FileUploadResult对象,包含上传结果。
|
||||||
|
*/
|
||||||
|
// @RequestMapping( path = "/file-upload.do" )
|
||||||
|
// @ResponseBody
|
||||||
|
public FileUploadResult getUploadFile(
|
||||||
|
@RequestParam( "task-name" ) String taskName,
|
||||||
|
@RequestParam( "files" ) MultipartFile file,
|
||||||
|
HttpServletRequest request
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// session id用来创建临时目录,避免重复
|
||||||
|
String sessionID = request.getSession().getId();
|
||||||
|
FileUploadResult result = new FileUploadResult();
|
||||||
|
Vector<String> fileNames = new Vector<String>();
|
||||||
|
|
||||||
|
result.setSuccess( true );
|
||||||
|
result.setMessage( "上传成功!" );
|
||||||
|
|
||||||
|
String filePath = request.getServletContext().getRealPath( "/temp/upload/" + sessionID );
|
||||||
|
File dir = new File( filePath );
|
||||||
|
|
||||||
|
if ( !dir.mkdirs() )
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查文件长度,如果为0则跳过
|
||||||
|
if ( file.isEmpty() )
|
||||||
|
{
|
||||||
|
result.setSuccess( false );
|
||||||
|
result.setMessage( "不允许上传空文件。" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 保存文件到临时目录
|
||||||
|
Long milliSecond = LocalDateTime.now().toInstant( ZoneOffset.of( "+8" ) ).toEpochMilli();
|
||||||
|
String fileName = String.valueOf( milliSecond ) + file.getOriginalFilename();
|
||||||
|
File destFile = new File( filePath, fileName );
|
||||||
|
// String fileName = file.getOriginalFilename();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
file.transferTo( destFile );
|
||||||
|
// 把上传文件的绝对路径保存,返回给前端
|
||||||
|
fileNames.add( destFile.getAbsolutePath() );
|
||||||
|
|
||||||
|
result.setSuccess( true );
|
||||||
|
result.setMessage( "上传成功" );
|
||||||
|
result.setFileList( fileNames );
|
||||||
|
}
|
||||||
|
catch ( IOException error )
|
||||||
|
{
|
||||||
|
result.setSuccess( false );
|
||||||
|
result.setMessage( "上传失败,原因:" + error.getMessage() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping( path = "/file-upload.do" )
|
||||||
|
@ResponseBody
|
||||||
|
public FileUploadResult saveUploadFile(
|
||||||
|
@RequestParam( "file-name" ) String fileName,
|
||||||
|
@RequestParam( "files" ) MultipartFile file,
|
||||||
|
HttpServletRequest request
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// session id用来创建临时目录,避免重复
|
||||||
|
String sessionID = request.getSession().getId();
|
||||||
|
FileUploadResult result = new FileUploadResult();
|
||||||
|
MultipartFile[] files = new MultipartFile[1];
|
||||||
|
|
||||||
|
result.setSuccess( true );
|
||||||
|
result.setMessage( "上传成功!" );
|
||||||
|
|
||||||
|
String filePath = request.getServletContext().getRealPath( "/temp/upload/" + sessionID );
|
||||||
|
File dir = new File( filePath );
|
||||||
|
|
||||||
|
// 创建临时目录
|
||||||
|
if ( (!dir.exists()) && (!dir.mkdirs()) )
|
||||||
|
{
|
||||||
|
result.setSuccess( false );
|
||||||
|
result.setMessage( "创建临时目录失败:" + filePath );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
files[0] = file;
|
||||||
|
|
||||||
|
SaveUploadFile.saveUploadFile( files, filePath );
|
||||||
|
}
|
||||||
|
catch ( ProcessUploadedFileException error )
|
||||||
|
{
|
||||||
|
result.setSuccess( false );
|
||||||
|
result.setMessage( error.getMessage() );
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
*
|
||||||
|
* @Date: 2023-01-23 22:56:17
|
||||||
|
*
|
||||||
|
* @LastEditors: Kane
|
||||||
|
*
|
||||||
|
* @LastEditTime: 2023-10-06 00:32:47
|
||||||
|
*
|
||||||
|
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/FileUpload/FileUploadResult.java
|
||||||
|
*
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.cpic.xim.web.controllers.fileupload;
|
||||||
|
|
||||||
|
import java.util.Vector;
|
||||||
|
import com.cpic.xim.web.controllers.QueryResponse;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
@SuppressWarnings( "unused" )
|
||||||
|
public class FileUploadResult extends QueryResponse
|
||||||
|
{
|
||||||
|
public FileUploadResult()
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造函数
|
||||||
|
*
|
||||||
|
* @param success 是否上传成功
|
||||||
|
* @param message 消息字符串
|
||||||
|
* @param fileList 文件绝对路径字符串数组
|
||||||
|
*/
|
||||||
|
public FileUploadResult(
|
||||||
|
boolean success,
|
||||||
|
String message,
|
||||||
|
Vector<String> fileList
|
||||||
|
)
|
||||||
|
{
|
||||||
|
super( success, message );
|
||||||
|
|
||||||
|
this.fileList = fileList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vector<String> getFileList()
|
||||||
|
{
|
||||||
|
return fileList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileList( Vector<String> fileList )
|
||||||
|
{
|
||||||
|
this.fileList = fileList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonProperty( "fileList" )
|
||||||
|
private Vector<String> fileList;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
/**
|
||||||
|
* @Author: Kane Wang <wangkane@qq.com>
|
||||||
|
* @Date: 2025-10-15 12:06:26
|
||||||
|
* @LastEditors: Kane Wang
|
||||||
|
* @LastModified: 2025-10-16 09:59:39
|
||||||
|
* @FilePath: src/main/java/com/cpic/xim/web/controllers/fileupload/ProcessUploadedFileException.java
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 by Kane All rights reserved
|
||||||
|
*/
|
||||||
|
package com.cpic.xim.web.controllers.fileupload;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
public class ProcessUploadedFileException extends IOException
|
||||||
|
{
|
||||||
|
ProcessUploadedFileException()
|
||||||
|
{
|
||||||
|
super("上传文件失败!");
|
||||||
|
}
|
||||||
|
|
||||||
|
ProcessUploadedFileException( String message )
|
||||||
|
{
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
/**
|
||||||
|
* @Author: Kane Wang <wangkane@qq.com>
|
||||||
|
* @Date: 2025-10-16 09:46:42
|
||||||
|
* @LastEditors: Kane Wang
|
||||||
|
* @LastModified: 2025-10-16 15:16:57
|
||||||
|
* @FilePath: src/main/java/com/cpic/xim/web/controllers/fileupload/SaveUploadFile.java
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 by Kane All rights reserved
|
||||||
|
*/
|
||||||
|
package com.cpic.xim.web.controllers.fileupload;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.ZoneOffset;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
|
||||||
|
public class SaveUploadFile
|
||||||
|
{
|
||||||
|
public static HashMap<String, String> saveUploadFile(
|
||||||
|
MultipartFile[] files,
|
||||||
|
String tempFilePath
|
||||||
|
)
|
||||||
|
throws ProcessUploadedFileException
|
||||||
|
{
|
||||||
|
HashMap<String, String> savedFiles = new HashMap<>();
|
||||||
|
// File dir = new File( tempFilePath );
|
||||||
|
String fileName = "";
|
||||||
|
String fullPath;
|
||||||
|
|
||||||
|
if ( !(tempFilePath.endsWith( "/" ) || tempFilePath.endsWith( "\\" )) )
|
||||||
|
{
|
||||||
|
fullPath = tempFilePath + "/";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fullPath = tempFilePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
for ( MultipartFile file : files )
|
||||||
|
{
|
||||||
|
// 空文件跳过
|
||||||
|
if ( file.isEmpty() )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 文件名前加上时间戳,避免覆盖
|
||||||
|
Long milliSecond = LocalDateTime.now().toInstant( ZoneOffset.of( "+8" ) ).toEpochMilli();
|
||||||
|
|
||||||
|
fileName = String.valueOf( milliSecond ) + " - " + file.getOriginalFilename();
|
||||||
|
File destFile = new File( tempFilePath, fileName );
|
||||||
|
|
||||||
|
file.transferTo( destFile );
|
||||||
|
|
||||||
|
savedFiles.put( fileName, fullPath + fileName );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch ( IOException error )
|
||||||
|
{
|
||||||
|
throw new ProcessUploadedFileException( "临时目录" + tempFilePath + "保存文件" + fileName + "失败!" );
|
||||||
|
}
|
||||||
|
|
||||||
|
return savedFiles;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
/**
|
||||||
|
* @Author: Kane Wang <wangkane@qq.com>
|
||||||
|
* @Date: 2025-03-15 18:40:54
|
||||||
|
* @LastEditors: Kane Wang
|
||||||
|
* @LastModified: 2025-03-16 08:56:20
|
||||||
|
* @FilePath: src/main/java/com/cpic/xim/web/filters/cros/CrosFilter.java
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 by Kane All rights reserved
|
||||||
|
*/
|
||||||
|
package com.cpic.xim.web.filters.cros;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import jakarta.servlet.Filter;
|
||||||
|
import jakarta.servlet.FilterChain;
|
||||||
|
import jakarta.servlet.ServletException;
|
||||||
|
import jakarta.servlet.ServletRequest;
|
||||||
|
import jakarta.servlet.ServletResponse;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.http.HttpMethod;
|
||||||
|
|
||||||
|
public class CrosFilter implements Filter
|
||||||
|
{
|
||||||
|
private static Logger logger = LoggerFactory.getLogger( CrosFilter.class );
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @param resp
|
||||||
|
* @param chain
|
||||||
|
* @throws ServletException
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void doFilter(
|
||||||
|
ServletRequest req,
|
||||||
|
ServletResponse resp,
|
||||||
|
FilterChain chain
|
||||||
|
)
|
||||||
|
throws ServletException,
|
||||||
|
IOException
|
||||||
|
{
|
||||||
|
HttpServletRequest request = ( HttpServletRequest ) req;
|
||||||
|
HttpServletResponse response = ( HttpServletResponse ) resp;
|
||||||
|
String method = request.getMethod();
|
||||||
|
String originHeader = request.getHeader( "Origin" );
|
||||||
|
|
||||||
|
logger.info( "收到" + method + "请求,来自" + originHeader );
|
||||||
|
|
||||||
|
// 如果是Options请求
|
||||||
|
if ( method.equals( HttpMethod.OPTIONS.toString() ) )
|
||||||
|
{
|
||||||
|
originHeader = "*";
|
||||||
|
}
|
||||||
|
|
||||||
|
response.setHeader( "Access-Control-Allow-Origin", originHeader );
|
||||||
|
response.setHeader( "Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE, PUT" );
|
||||||
|
response.setHeader( "Access-Control-Max-Age", "0" );
|
||||||
|
response.setHeader( "Access-Control-Allow-Headers",
|
||||||
|
"Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With,userId,token" );
|
||||||
|
response.setHeader( "Access-Control-Allow-Credentials", "true" );
|
||||||
|
response.setHeader( "XDomainRequestAllowed", "1" );
|
||||||
|
response.setHeader( "XDomainRequestAllowed", "1" );
|
||||||
|
|
||||||
|
chain.doFilter( request, response );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<Configuration status="WARN" monitorInterval="300">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} ### %msg%n" />
|
||||||
|
<ThresholdFilter level="trace" onMatch="ACCEPT" onMismatch="DENY" />
|
||||||
|
</Console>
|
||||||
|
<RollingFile name="rolling_file_win"
|
||||||
|
filePattern="./logs/制度管理/$${date:yyyy-MM}/huixiabao-%d{MM-dd-yyyy}-%i.log.gz">
|
||||||
|
<PatternLayout>
|
||||||
|
<Pattern>[%t][%level][%d{HH:mm:ss.SSS}][%logger.%M{36}#%L] %msg%n</Pattern>
|
||||||
|
</PatternLayout>
|
||||||
|
<Policies>
|
||||||
|
<TimeBasedTriggeringPolicy interval="1" />
|
||||||
|
<SizeBasedTriggeringPolicy size="20MB" />
|
||||||
|
<DefaultRolloverStrategy max="20" />
|
||||||
|
</Policies>
|
||||||
|
</RollingFile>
|
||||||
|
<RollingFile name="rolling_file_linux"
|
||||||
|
filePattern="/logs/制度管理/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz">
|
||||||
|
<PatternLayout>
|
||||||
|
<Pattern>[%t][%level][%d{HH:mm:ss.SSS}][%logger.%M{36}#%L] %msg%n</Pattern>
|
||||||
|
</PatternLayout>
|
||||||
|
<Policies>
|
||||||
|
<TimeBasedTriggeringPolicy interval="1" />
|
||||||
|
<SizeBasedTriggeringPolicy size="20MB" />
|
||||||
|
<DefaultRolloverStrategy max="20" />
|
||||||
|
</Policies>
|
||||||
|
</RollingFile>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<!-- <Logger name="mylog" level="info">
|
||||||
|
<AppenderRef ref="rolling_file" />
|
||||||
|
</Logger> -->
|
||||||
|
<Root level="debug">
|
||||||
|
<AppenderRef ref="rolling_file_linux" />
|
||||||
|
<AppenderRef ref="rolling_file_win" />
|
||||||
|
<AppenderRef ref="Console" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
jdbc.oracle.driver=oracle.jdbc.driver.OracleDriver
|
||||||
|
jdbc.oracle.xmcx1.url=jdbc:oracle:thin:@10.39.0.86:1521:xmcx1
|
||||||
|
jdbc.oracle.xmcx1.username=desktop_archievement_admin
|
||||||
|
jdbc.oracle.xmcx1.password=Cpic123456
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cpic.xim.mybatis.mapper.ArchievementMapper">
|
||||||
|
<select id="getDepartmentArchievement" useCache="false" flushCache="true" statementType="CALLABLE" parameterType="java.util.HashMap">
|
||||||
|
call telsale_archievement_pkg.department_archievement(
|
||||||
|
#{a_department_code, mode=IN, jdbcType=VARCHAR},
|
||||||
|
#{a_attaching_rate, mode=OUT, jdbcType=VARCHAR},
|
||||||
|
#{a_attaching_rate_target, mode=OUT, jdbcType=VARCHAR},
|
||||||
|
#{a_renewal_rate, mode=OUT, jdbcType=VARCHAR},
|
||||||
|
#{a_renewal_rate_target, mode=OUT, jdbcType=VARCHAR},
|
||||||
|
#{a_total, mode=OUT, jdbcType=INTEGER, javaType=Integer},
|
||||||
|
#{a_mensual_cur, mode=OUT, jdbcType=CURSOR, resultMap=MensualArchievementMapper})
|
||||||
|
</select>
|
||||||
|
<select id="getCallerArchievement" useCache="false" flushCache="true" statementType="CALLABLE" parameterType="java.util.HashMap">
|
||||||
|
call telsale_archievement_pkg.caller_archievement(
|
||||||
|
#{a_caller_code, mode=IN, jdbcType=VARCHAR},
|
||||||
|
#{a_attaching_rate, mode=OUT, jdbcType=VARCHAR},
|
||||||
|
#{a_renewal_rate, mode=OUT, jdbcType=VARCHAR},
|
||||||
|
#{a_total, mode=OUT, jdbcType=INTEGER, javaType=Integer},
|
||||||
|
#{a_present_month, mode=OUT, jdbcType=DOUBLE, javaType=Double},
|
||||||
|
#{a_mensual_cur, mode=OUT, jdbcType=CURSOR, resultMap=MensualArchievementMapper})
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<resultMap id="MensualArchievementMapper" type="MensualArchievementItem">
|
||||||
|
<id property="month" column="mm" javaType="INT"/>
|
||||||
|
<result property="premium" column="bf" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cpic.xim.mybatis.mapper.ImportBIArchievementDataMapper">
|
||||||
|
<insert id="insertTelsalerAttachingRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BITelsalerAttachingRateRecord">
|
||||||
|
insert into BI电销坐席车非渗透率跟踪表 ( "部门","经办","车险保费(万)","车险保费占比","非车保费(万)",
|
||||||
|
"当月保费渗透率","保费渗透率环比上月","当月客户渗透率","客户渗透率环比上月",
|
||||||
|
"当月车非客均保费","客均保费环比上月" )
|
||||||
|
values ( #{departmentName}, #{telsalerName}, #{motoPremium}, #{motoPremiumProportion}, #{nomotoPremium},
|
||||||
|
#{attachingRate}, #{attachingRateChange}, #{customerHandleRate},
|
||||||
|
#{customerHandleRateChange}, #{noMotoPremiumPerCustomer}, #{noMotoPremiumPerCustomerChange} )
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertTelsalerRenewalRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BITelsalerRenewalRateRecord">
|
||||||
|
insert into "BI电销坐席续保率跟踪表-24年" ("责任部门","责任人","机构目标值1(%)","到期数-全月",
|
||||||
|
"序时到期数占比(%)","个车续保率(序时)(%)","个车续保率(全月)(%)",
|
||||||
|
"环比昨日(%)","环比上月(%)")
|
||||||
|
values (#{责任部门},#{责任人},#{机构目标值},#{到期数全月},#{序时到期数占比},
|
||||||
|
#{个车续保率序时},#{个车续保率全月},#{环比昨日},#{环比上月} )
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertDepartmentAttachingRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BIDepartmentAttachingRateRecord">
|
||||||
|
insert into BI机构渗透率跟踪表 ( 部门,"目标值-机构",目标差距,"车险保费",
|
||||||
|
车险保费占比,"非车保费",当月保费渗透率,保费渗透率环比上月,当月客户渗透率,
|
||||||
|
客户渗透率环比上月,当月车非客均保费,客均保费环比上月,车险客户数)
|
||||||
|
values (#{departmentName},#{departmentObject},#{objectGap},#{motoPremium},
|
||||||
|
#{motoPremiumProPortion},#{nomotoPremium},#{attachingRate},#{attachingRateChange},
|
||||||
|
#{customerHandleRate},#{customerHandleRateChange},#{premiumPerCustomer},#{premiumPerCustomerChange},
|
||||||
|
#{motoInsuranceCustomerCount} )
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertDepartmentRenewalRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BIDepartmentRenewalRateRecord" >
|
||||||
|
insert into "BI机构续保率跟踪表-24年"( "责任部门","机构目标值1(%)","到期数-全月" ,"序时到期数占比(%)","个车续保率(序时)(%)",
|
||||||
|
"个车续保率(全月)(%)","环比昨日(%)","环比上月(%)")
|
||||||
|
values (#{责任部门},#{机构目标值},#{到期数全月},#{序时到期数占比},
|
||||||
|
#{个车续保率序时},#{个车续保率全月},#{环比昨日},#{环比上月} )
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<select id="cleanTelsalerAttachingRateData" statementType="CALLABLE">
|
||||||
|
call TELSALE_BI_UTILS.清理BI电销坐席车非渗透率跟踪表()
|
||||||
|
</select>
|
||||||
|
<select id="cleanTelsalerRenewalRateData" statementType="CALLABLE">
|
||||||
|
call TELSALE_BI_UTILS.清理BI电销坐席续保率跟踪表()
|
||||||
|
</select>
|
||||||
|
<select id="cleanDepartmentAttachingRateData" statementType="CALLABLE">
|
||||||
|
call TELSALE_BI_UTILS.清理BI部门渗透率跟踪表()
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="cleanDepartmentRenewalRateData" statementType="CALLABLE">
|
||||||
|
call TELSALE_BI_UTILS.清理BI部门续保率跟踪表()
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cpic.xim.mybatis.mapper.QueryBIArchievementDataMapper">
|
||||||
|
|
||||||
|
<!-- 查询坐席车非渗透率报表 -->
|
||||||
|
<select id="queryBITelsalerAttachingRate" statementType="STATEMENT" resultMap="BITelsalerAttachingRate" useCache="false" flushCache="true">
|
||||||
|
SELECT t.部门,
|
||||||
|
t.经办,
|
||||||
|
t."车险保费(万)" as 车险保费,
|
||||||
|
t.车险保费占比,
|
||||||
|
t."非车保费(万)" as 非车保费,
|
||||||
|
t.当月保费渗透率,
|
||||||
|
t.保费渗透率环比上月,
|
||||||
|
t.当月客户渗透率,
|
||||||
|
t.客户渗透率环比上月,
|
||||||
|
t.当月车非客均保费,
|
||||||
|
t.客均保费环比上月
|
||||||
|
FROM BI电销坐席车非渗透率跟踪表 t
|
||||||
|
ORDER BY t.部门
|
||||||
|
</select>
|
||||||
|
<!-- 坐席车非渗透率报表记录 -->
|
||||||
|
<resultMap id="BITelsalerAttachingRate" type="com.cpic.xim.mybatis.pojo.BITelsalerAttachingRateRecord">
|
||||||
|
<result property="departmentName" column="部门" javaType="String" jdbcType="VARCHAR" />
|
||||||
|
<result property="telsalerName" column="经办" javaType="String" jdbcType="VARCHAR" />
|
||||||
|
<result property="motoPremium" column="车险保费" javaType="double" jdbcType="DOUBLE" />
|
||||||
|
<result property="motoPremiumProportion" column="车险保费占比" javaType="double" jdbcType="DOUBLE" />
|
||||||
|
<result property="nomotoPremium" column="非车保费" javaType="double" jdbcType="DOUBLE" />
|
||||||
|
<result property="attachingRate" column="当月保费渗透率" javaType="double" jdbcType="DOUBLE" />
|
||||||
|
<result property="attachingRateChange" column="保费渗透率环比上月" javaType="double" jdbcType="DOUBLE" />
|
||||||
|
<result property="customerHandleRate" column="当月客户渗透率" javaType="double" jdbcType="DOUBLE" />
|
||||||
|
<result property="customerHandleRateChange" column="客户渗透率环比上月" javaType="double" jdbcType="DOUBLE" />
|
||||||
|
<result property="noMotoPremiumPerCustomer" column="当月车非客均保费" javaType="double" jdbcType="DOUBLE" />
|
||||||
|
<result property="noMotoPremiumPerCustomerChange" column="客均保费环比上月" javaType="double" jdbcType="DOUBLE" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 坐席续保率 -->
|
||||||
|
<select id="queryBITesalerRenewalRate" statementType="STATEMENT" resultMap="BITelsalerRenewalRate" useCache="false" flushCache="true">
|
||||||
|
select t.责任部门,
|
||||||
|
t.责任人,
|
||||||
|
t."机构目标值1(%)" as 机构目标值,
|
||||||
|
t."到期数-全月" as 到期数全月,
|
||||||
|
t."序时到期数占比(%)" as 序时到期数占比,
|
||||||
|
t."个车续保率(序时)(%)" as 个车续保率序时,
|
||||||
|
t."个车续保率(全月)(%)" as 个车续保率全月,
|
||||||
|
t."环比昨日(%)" as 环比昨日,
|
||||||
|
t."环比上月(%)" as 环比上月
|
||||||
|
from "BI电销坐席续保率跟踪表-24年" t
|
||||||
|
</select>
|
||||||
|
<resultMap id="BITelsalerRenewalRate" type="com.cpic.xim.mybatis.pojo.BITelsalerRenewalRateRecord">
|
||||||
|
<result property="责任部门" column="责任部门" javaType="String" jdbcType="VARCHAR" />
|
||||||
|
<result property="责任人" column="责任人" javaType="String" jdbcType="VARCHAR" />
|
||||||
|
<result property="机构目标值" column="机构目标值" javaType="double" jdbcType="DOUBLE" />
|
||||||
|
<result property="到期数全月" column="到期数全月" javaType="double" jdbcType="DOUBLE" />
|
||||||
|
<result property="序时到期数占比" column="序时到期数占比" javaType="double" jdbcType="DOUBLE" />
|
||||||
|
<result property="个车续保率序时" column="个车续保率序时" javaType="double" jdbcType="DOUBLE" />
|
||||||
|
<result property="个车续保率全月" column="个车续保率全月" javaType="double" jdbcType="DOUBLE" />
|
||||||
|
<result property="环比昨日" column="环比昨日" javaType="double" jdbcType="DOUBLE" />
|
||||||
|
<result property="环比上月" column="环比上月" javaType="double" jdbcType="DOUBLE" />
|
||||||
|
<!-- <result property="平均提前签单天数" column="平均提前签单天数" javaType="int" jdbcType="DOUBLE" /> -->
|
||||||
|
<!-- <result property="环比" column="环比" javaType="int" jdbcType="DOUBLE" /> -->
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 机构渗透率 -->
|
||||||
|
<select id="queryBIDepartmentAttachingRate" statementType="STATEMENT" resultMap="BIDepartmentAttachingRate" useCache="false" flushCache="true">
|
||||||
|
select t.部门,
|
||||||
|
t."目标值-机构" as 目标值机构,
|
||||||
|
t.目标差距,
|
||||||
|
t.车险保费,
|
||||||
|
t.车险保费占比,
|
||||||
|
t.非车保费,
|
||||||
|
t.当月保费渗透率,
|
||||||
|
t.保费渗透率环比上月,
|
||||||
|
t.当月客户渗透率,
|
||||||
|
t.客户渗透率环比上月,
|
||||||
|
t.当月车非客均保费,
|
||||||
|
t.客均保费环比上月,
|
||||||
|
t.车险客户数
|
||||||
|
from BI机构渗透率跟踪表 t
|
||||||
|
</select>
|
||||||
|
<resultMap id="BIDepartmentAttachingRate" type="com.cpic.xim.mybatis.pojo.BIDepartmentAttachingRateRecord">
|
||||||
|
<result column="部门" property="departmentName" jdbcType="VARCHAR" javaType="String" />
|
||||||
|
<result column="目标值机构" property="departmentObject" jdbcType="DOUBLE" javaType="double" />
|
||||||
|
<result column="目标差距" property="objectGap" jdbcType="DOUBLE" javaType="double" />
|
||||||
|
<result column="车险保费" property="motoPremium" jdbcType="DOUBLE" javaType="double" />
|
||||||
|
<result column="车险保费占比" property="motoPremiumProPortion" jdbcType="DOUBLE" javaType="double" />
|
||||||
|
<result column="非车保费" property="nomotoPremium" jdbcType="DOUBLE" javaType="double" />
|
||||||
|
<result column="当月保费渗透率" property="attachingRate" jdbcType="DOUBLE" javaType="double" />
|
||||||
|
<result column="保费渗透率环比上月" property="attachingRateChange" jdbcType="DOUBLE" javaType="double" />
|
||||||
|
<result column="当月客户渗透率" property="customerHandleRate" jdbcType="DOUBLE" javaType="double" />
|
||||||
|
<result column="客户渗透率环比上月" property="customerHandleRateChange" jdbcType="DOUBLE" javaType="double" />
|
||||||
|
<result column="当月车非客均保费" property="premiumPerCustomer" jdbcType="DOUBLE" javaType="double" />
|
||||||
|
<result column="客均保费环比上月" property="premiumPerCustomerChange" jdbcType="DOUBLE" javaType="double" />
|
||||||
|
<result column="车险客户数" property="motoInsuranceCustomerCount" jdbcType="INTEGER" javaType="int" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 机构续保率 -->
|
||||||
|
<select id="queryBIDepartmentRenewalRate" statementType="STATEMENT" resultMap="BIDepartmentRenewalRate" useCache="false" flushCache="true">
|
||||||
|
select t.责任部门,
|
||||||
|
t."机构目标值1(%)" as 机构目标值,
|
||||||
|
t."到期数-全月" as 到期数全月,
|
||||||
|
t."序时到期数占比(%)" as 序时到期数占比,
|
||||||
|
t."个车续保率(序时)(%)" as 个车续保率序时,
|
||||||
|
t."个车续保率(全月)(%)" as 个车续保率全月,
|
||||||
|
t."环比昨日(%)" as 环比昨日,
|
||||||
|
t."环比上月(%)" as 环比上月
|
||||||
|
from "BI机构续保率跟踪表-24年" t
|
||||||
|
</select>
|
||||||
|
<resultMap id="BIDepartmentRenewalRate" type="com.cpic.xim.mybatis.pojo.BIDepartmentRenewalRateRecord">
|
||||||
|
<result column="责任部门" property="责任部门" jdbcType="VARCHAR" javaType="String" />
|
||||||
|
<result column="机构目标值" property="机构目标值" jdbcType="DOUBLE" javaType="double" />
|
||||||
|
<result column="到期数全月" property="到期数全月" jdbcType="INTEGER" javaType="int" />
|
||||||
|
<result column="序时到期数占比" property="序时到期数占比" jdbcType="DOUBLE" javaType="double" />
|
||||||
|
<result column="个车续保率序时" property="个车续保率序时" jdbcType="DOUBLE" javaType="double" />
|
||||||
|
<result column="个车续保率全月" property="个车续保率全月" jdbcType="DOUBLE" javaType="double" />
|
||||||
|
<result column="环比昨日" property="环比昨日" jdbcType="DOUBLE" javaType="double" />
|
||||||
|
<result column="环比上月" property="环比上月" jdbcType="DOUBLE" javaType="double" />
|
||||||
|
<!-- <result column="平均提前签单天数" property="平均提前签单天数" jdbcType="INTEGER" javaType="int" /> -->
|
||||||
|
<!-- <result column="环比" property="环比" jdbcType="DOUBLE" javaType="double" /> -->
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cpic.xim.mybatis.mapper.RankingListMapper">
|
||||||
|
<select id="getRankingList" flushCache="true" statementType="CALLABLE" parameterType="java.util.HashMap">
|
||||||
|
call telsale_archievement_pkg.caller_arch_ranking_list(
|
||||||
|
#{a_department_code,mode=IN,jdbcType=VARCHAR},
|
||||||
|
#{a_year,mode=IN,jdbcType=VARCHAR},
|
||||||
|
#{a_month,mode=IN,jdbcType=VARCHAR},
|
||||||
|
#{a_attaching_ranking_list,mode=OUT,jdbcType=CURSOR, resultMap=AttachingRateRankingMap},
|
||||||
|
#{a_renewal_ranking_list,mode=OUT,jdbcType=CURSOR, resultMap=RenewalRateRankingMap})
|
||||||
|
</select>
|
||||||
|
<resultMap id="AttachingRateRankingMap" type="CallerRankingItem">
|
||||||
|
<id property="index" column="rownum" jdbcType="INTEGER" javaType="int"/>
|
||||||
|
<result property="callerName" column="caller_name" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result property="appraiseValue" column="attaching_rate" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
</resultMap>
|
||||||
|
<resultMap id="RenewalRateRankingMap" type="CallerRankingItem">
|
||||||
|
<id property="index" column="rownum" jdbcType="INTEGER" javaType="int"/>
|
||||||
|
<result property="callerName" column="caller_name" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result property="appraiseValue" column="renewal_rate" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cpic.xim.mybatis.mapper.RewardsMapper">
|
||||||
|
<select id="queryRewardProjects" statementType="STATEMENT" resultMap="RewardProjectMap" useCache="false" flushCache="true">
|
||||||
|
select reward_index, reward_name from reward_projects order by reward_index desc
|
||||||
|
</select>
|
||||||
|
<resultMap id="RewardProjectMap" type="com.cpic.xim.mybatis.pojo.RewardProject">
|
||||||
|
<id property="rewardCode" column="reward_index" />
|
||||||
|
<result property="rewardName" column="reward_name" javaType="String"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="queryRewardTelsaler" statementType="STATEMENT" resultMap="RewardGainerMapper" useCache="false" flushCache="true">
|
||||||
|
SELECT hjr.rec_id rec_id,
|
||||||
|
hjr.telsaler_name telsaler_name,
|
||||||
|
hjr.telsaler_code telsaler_code,
|
||||||
|
xm.reward_name reward_name,
|
||||||
|
xm.reward_index reward_index
|
||||||
|
FROM telsaler_reward hjr,
|
||||||
|
reward_projects xm
|
||||||
|
WHERE hjr.reward_index = xm.reward_index
|
||||||
|
order by xm.reward_index desc
|
||||||
|
</select>
|
||||||
|
<resultMap id="RewardGainerMapper" type="com.cpic.xim.mybatis.pojo.RewardGainer">
|
||||||
|
<id column="rec_id" property="recID" />
|
||||||
|
<result column="telsaler_name" property="callerName" />
|
||||||
|
<result column="telsaler_code" property="callerCode" />
|
||||||
|
<result column="reward_name" property="rewardProjectName" />
|
||||||
|
<result column="reward_index" property="rewardProjectCode" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="addRewardTelSaler" statementType="CALLABLE" parameterType="java.util.HashMap" useCache="false" flushCache="true" >
|
||||||
|
call telsaler_reward_pkg.add_telsaler_reward(
|
||||||
|
#{a_reward_index,mode=IN,jdbcType=VARCHAR},
|
||||||
|
#{a_telsaler_name,mode=IN,jdbcType=VARCHAR})
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 删除获奖坐席记录 -->
|
||||||
|
<select id="deleteRewardTelSaler" statementType="CALLABLE" parameterType="java.util.HashMap" useCache="false" flushCache="true" >
|
||||||
|
call telsaler_reward_pkg.delete_telsaler_reward(
|
||||||
|
#{a_rec_id,mode=IN,jdbcType=INTEGER})
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 更新获奖坐席 -->
|
||||||
|
<select id="updateRewardTelSaler" statementType="CALLABLE" parameterType="java.util.HashMap" useCache="false" flushCache="true" >
|
||||||
|
call telsaler_reward_pkg.update_telsaler_reward(
|
||||||
|
#{a_rec_id,mode=IN,jdbcType=INTEGER},
|
||||||
|
#{a_telsaler_name,mode=IN,jdbcType=VARCHAR},
|
||||||
|
#{a_reward_index,mode=IN,jdbcType=VARCHAR})
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cpic.xim.mybatis.mapper.StaffMapper">
|
||||||
|
<select id="queryCpicStaff" resultMap="CpicXIMStaff" >
|
||||||
|
SELECT ry.p13uid,
|
||||||
|
ry.staff_code,
|
||||||
|
ry.staff_name,
|
||||||
|
bm.department_code,
|
||||||
|
bm.department_name,
|
||||||
|
ksh.section_office_code,
|
||||||
|
ksh.section_office_name
|
||||||
|
FROM idst0.rydm_t ry,
|
||||||
|
idst0.ks_t ksh,
|
||||||
|
idst0.bm_t bm
|
||||||
|
WHERE ry.staff_code = #{staffCode,mode=IN}
|
||||||
|
AND ry.department_code = bm.department_code
|
||||||
|
AND ry.section_office_code = ksh.section_office_code
|
||||||
|
</select>
|
||||||
|
<resultMap id="CpicXIMStaff" type="com.cpic.xim.mybatis.pojo.CpicStaff">
|
||||||
|
<!-- <constructor>
|
||||||
|
<arg column="p13uid" name="p13uid"/>
|
||||||
|
<arg column="staff_code" name="staffCode"/>
|
||||||
|
<arg column="staff_name" name="staffName"/>
|
||||||
|
<arg column="department_code" name="departmentCode"/>
|
||||||
|
<arg column="department_name" name="departmentName"/>
|
||||||
|
<arg column="section_office_code" name="sectionOfficeCode"/>
|
||||||
|
<arg column="section_office_name" name="sectionOfficeName"/>
|
||||||
|
</constructor> -->
|
||||||
|
<id property="staffCode" column="staff_code"/>
|
||||||
|
<result property="staffName" column="staff_name"/>
|
||||||
|
<result property="p13UID" column="p13uid"/>
|
||||||
|
<result property="departmentCode" column="department_code"/>
|
||||||
|
<result property="departmentName" column="department_name"/>
|
||||||
|
<result property="sectionOfficeCode" column="section_office_code"/>
|
||||||
|
<result property="sectionOfficeName" column="section_office_name"/>
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,164 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cpic.xim.mybatis.mapper.TWrTelsalerMapper">
|
||||||
|
<select id="queryTWrTelsalerInfo" resultMap="TWrTelsaler">
|
||||||
|
select t.人员姓名,
|
||||||
|
t.人员工号,
|
||||||
|
t.籍贯,
|
||||||
|
t.参加工作时间,
|
||||||
|
t.入职日期,
|
||||||
|
t.入司日期,
|
||||||
|
t.业务类型,
|
||||||
|
t.办公地省,
|
||||||
|
t.办公地市,
|
||||||
|
t.人员类别,
|
||||||
|
t.现任岗位,
|
||||||
|
t.现任职级,
|
||||||
|
t.机构名称,
|
||||||
|
t.职场分类,
|
||||||
|
t.片区名称,
|
||||||
|
t.团队名称,
|
||||||
|
t.对口分公司,
|
||||||
|
t.展业地区,
|
||||||
|
t.招聘渠道,
|
||||||
|
t.渠道明细,
|
||||||
|
t.全日制最高学历,
|
||||||
|
t.学历类型,
|
||||||
|
t.用工性质名称,
|
||||||
|
t.合同种类,
|
||||||
|
t.合同类型,
|
||||||
|
t.合同性质,
|
||||||
|
t.合同签订次数,
|
||||||
|
t.合同生效日期,
|
||||||
|
t.合同到期日期,
|
||||||
|
t.人员属性,
|
||||||
|
t.保代员工号,
|
||||||
|
t.职场属性,
|
||||||
|
t.办公性质,
|
||||||
|
t.保代人员属性,
|
||||||
|
t.人员状态
|
||||||
|
from telsaler t
|
||||||
|
where t.人员姓名 = #{telsaler} or t.人员工号 = #{telsaler}
|
||||||
|
</select>
|
||||||
|
<resultMap id="TWrTelsaler" type="TWrTelsalerRecord">
|
||||||
|
<result column="人员姓名" property="人员姓名" jdbcType="VARCHAR" javaType="String" />
|
||||||
|
<result column="人员工号" property="人员工号" jdbcType="VARCHAR" javaType="String" />
|
||||||
|
<result column="籍贯" property="籍贯" jdbcType="VARCHAR" javaType="String" />
|
||||||
|
<result column="参加工作时间" property="参加工作时间" jdbcType="VARCHAR" javaType="String" />
|
||||||
|
<result column="入职日期" property="入职日期" jdbcType="VARCHAR" javaType="String" />
|
||||||
|
<result column="入司日期" property="入司日期" jdbcType="VARCHAR" javaType="String" />
|
||||||
|
<result column="业务类型" property="业务类型" jdbcType="VARCHAR" javaType="String" />
|
||||||
|
<result column="办公地省" property="办公地省" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="办公地市" property="办公地市" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="人员类别" property="人员类别" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="现任岗位" property="现任岗位" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="现任职级" property="现任职级" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="机构名称" property="机构名称" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="职场分类" property="职场分类" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="片区名称" property="片区名称" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="团队名称" property="团队名称" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="对口分公司" property="对口分公司" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="展业地区" property="展业地区" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="招聘渠道" property="招聘渠道" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="渠道明细" property="渠道明细" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="全日制最高学历" property="全日制最高学历" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="学历类型" property="学历类型" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="用工性质名称" property="用工性质名称" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="合同种类" property="合同种类" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="合同类型" property="合同类型" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="合同性质" property="合同性质" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="合同签订次数" property="合同签订次数" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="合同生效日期" property="合同生效日期" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="合同到期日期" property="合同到期日期" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="人员属性" property="人员属性" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="保代员工号" property="保代员工号" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="职场属性" property="职场属性" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="办公性质" property="办公性质" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="保代人员属性" property="保代人员属性" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
<result column="人员状态" property="人员状态" jdbcType="VARCHAR" javaType="String"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- insertTWrTelsalerRecordToDB -->
|
||||||
|
<insert id="insertTWrTelsalerRecordToDB" parameterType="TWrTelsalerRecord">
|
||||||
|
insert into TWR_TELSALER_DEV(
|
||||||
|
人员姓名,
|
||||||
|
人员工号,
|
||||||
|
籍贯,
|
||||||
|
参加工作时间,
|
||||||
|
入职日期,
|
||||||
|
入司日期,
|
||||||
|
业务类型,
|
||||||
|
办公地省,
|
||||||
|
办公地市,
|
||||||
|
人员类别,
|
||||||
|
现任岗位,
|
||||||
|
现任职级,
|
||||||
|
机构名称,
|
||||||
|
职场分类,
|
||||||
|
片区名称,
|
||||||
|
团队名称,
|
||||||
|
对口分公司,
|
||||||
|
展业地区,
|
||||||
|
招聘渠道,
|
||||||
|
渠道明细,
|
||||||
|
全日制最高学历,
|
||||||
|
学历类型,
|
||||||
|
用工性质名称,
|
||||||
|
合同种类,
|
||||||
|
合同类型,
|
||||||
|
合同性质,
|
||||||
|
合同签订次数,
|
||||||
|
合同生效日期,
|
||||||
|
合同到期日期,
|
||||||
|
人员属性,
|
||||||
|
保代员工号,
|
||||||
|
职场属性,
|
||||||
|
办公性质,
|
||||||
|
保代人员属性,
|
||||||
|
人员状态)
|
||||||
|
values (
|
||||||
|
#{人员姓名},
|
||||||
|
#{人员工号},
|
||||||
|
#{籍贯},
|
||||||
|
#{参加工作时间},
|
||||||
|
#{入职日期},
|
||||||
|
#{入司日期},
|
||||||
|
#{业务类型},
|
||||||
|
#{办公地省},
|
||||||
|
#{办公地市},
|
||||||
|
#{人员类别},
|
||||||
|
#{现任岗位},
|
||||||
|
#{现任职级},
|
||||||
|
#{机构名称},
|
||||||
|
#{职场分类},
|
||||||
|
#{片区名称},
|
||||||
|
#{团队名称},
|
||||||
|
#{对口分公司},
|
||||||
|
#{展业地区},
|
||||||
|
#{招聘渠道},
|
||||||
|
#{渠道明细},
|
||||||
|
#{全日制最高学历},
|
||||||
|
#{学历类型},
|
||||||
|
#{用工性质名称},
|
||||||
|
#{合同种类},
|
||||||
|
#{合同类型},
|
||||||
|
#{合同性质},
|
||||||
|
#{合同签订次数},
|
||||||
|
#{合同生效日期},
|
||||||
|
#{合同到期日期},
|
||||||
|
#{人员属性},
|
||||||
|
#{保代员工号},
|
||||||
|
#{职场属性},
|
||||||
|
#{办公性质},
|
||||||
|
#{保代人员属性},
|
||||||
|
#{人员状态} )
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<select id="cleanTWrTelsalerRecord" statementType="CALLABLE">
|
||||||
|
call TELSALER_TWR_UTILS.清理TWR坐席清单()
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="cleanTWrTelsalerTeamRecord" statementType="CALLABLE">
|
||||||
|
call TELSALER_TWR_UTILS.清理TWR团队清单()
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "https://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||||
|
<configuration>
|
||||||
|
<properties resource="mybatis/jdbc.properties" />
|
||||||
|
|
||||||
|
<settings>
|
||||||
|
<!-- 二级缓存开启 -->
|
||||||
|
<setting name="cacheEnabled" value="false" />
|
||||||
|
</settings>
|
||||||
|
|
||||||
|
<!-- 类型别名 -->
|
||||||
|
<typeAliases>
|
||||||
|
<package name="com.cpic.xim.mybatis.pojo" />
|
||||||
|
<package name="com.cpic.xim.utils.ranking" />
|
||||||
|
</typeAliases>
|
||||||
|
|
||||||
|
<environments default="development">
|
||||||
|
<environment id="development">
|
||||||
|
<transactionManager type="JDBC" />
|
||||||
|
<dataSource type="POOLED">
|
||||||
|
<property name="driver" value="${jdbc.oracle.driver}" />
|
||||||
|
<property name="url" value="${jdbc.oracle.xmcx1.url}" />
|
||||||
|
<property name="username" value="${jdbc.oracle.xmcx1.username}" />
|
||||||
|
<property name="password" value="${jdbc.oracle.xmcx1.password}" />
|
||||||
|
</dataSource>
|
||||||
|
</environment>
|
||||||
|
</environments>
|
||||||
|
|
||||||
|
<mappers>
|
||||||
|
<!-- <mapper resource="mybatis/mapper/StaffMapper.xml" /> -->
|
||||||
|
<mapper resource="mybatis/mapper/ArchievementMapper.xml" />
|
||||||
|
<mapper resource="mybatis/mapper/RankingListMapper.xml" />
|
||||||
|
<mapper resource="mybatis/mapper/RewardsMapper.xml" />
|
||||||
|
<mapper resource="mybatis/mapper/ImportBIArchievementDataMapper.xml" />
|
||||||
|
<mapper resource="mybatis/mapper/QueryBIArchievementDataMapper.xml" />
|
||||||
|
<mapper resource="mybatis/mapper/TWrTelsalerMapper.xml" />
|
||||||
|
</mappers>
|
||||||
|
|
||||||
|
</configuration>
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns:context="http://www.springframework.org/schema/context"
|
||||||
|
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
|
||||||
|
xmlns:jee="http://www.springframework.org/schema/jee"
|
||||||
|
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||||
|
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||||
|
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||||
|
xmlns:util="http://www.springframework.org/schema/util"
|
||||||
|
xmlns:jpa="http://www.springframework.org/schema/data/jpa"
|
||||||
|
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
|
||||||
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
|
||||||
|
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd
|
||||||
|
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.2.xsd
|
||||||
|
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
|
||||||
|
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
|
||||||
|
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
|
||||||
|
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
|
||||||
|
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd">
|
||||||
|
|
||||||
|
<context:component-scan base-package="com.cpic.xim" />
|
||||||
|
<mvc:annotation-driven />
|
||||||
|
<mvc:default-servlet-handler />
|
||||||
|
|
||||||
|
<!-- <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||||||
|
<property
|
||||||
|
name="prefix" value="/WEB-INF/jsp/" />
|
||||||
|
<property name="suffix" value=".jsp" />
|
||||||
|
</bean> -->
|
||||||
|
|
||||||
|
<bean id="multipartResolver"
|
||||||
|
class="org.springframework.web.multipart.support.StandardServletMultipartResolver">
|
||||||
|
<!-- <property name="defaultEncoding" value="UTF-8" /> -->
|
||||||
|
<!-- <property name="maxUploadSize" value="-1" /> -->
|
||||||
|
<!-- <property name="maxFileSize" value="10485760" /> -->
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
</beans>
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<web-app
|
||||||
|
version="4.0"
|
||||||
|
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||||
|
xmlns:javaee="http://xmlns.jcp.org/xml/ns/javaee"
|
||||||
|
xmlns:xml="http://www.w3.org/XML/1998/namespace"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
|
||||||
|
|
||||||
|
<display-name>Archetype Created Web Application</display-name>
|
||||||
|
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>springmvc</servlet-name>
|
||||||
|
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
||||||
|
<init-param>
|
||||||
|
<param-name>contextConfigLocation</param-name>
|
||||||
|
<param-value>classpath:spring.xml</param-value>
|
||||||
|
</init-param>
|
||||||
|
<load-on-startup>1</load-on-startup>
|
||||||
|
<multipart-config>
|
||||||
|
<!-- 上传文件最大为多少 -->
|
||||||
|
<max-file-size>10485760</max-file-size>
|
||||||
|
<!-- 最大的请求大小 -->
|
||||||
|
<max-request-size>10485760</max-request-size>
|
||||||
|
<!-- 多大以上的文件可以上传 -->
|
||||||
|
<file-size-threshold>0</file-size-threshold>
|
||||||
|
</multipart-config>
|
||||||
|
</servlet>
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>springmvc</servlet-name>
|
||||||
|
<url-pattern>*.do</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>springmvc</servlet-name>
|
||||||
|
<url-pattern>/account/p13_account_check</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<filter>
|
||||||
|
<filter-name>CrosFilter</filter-name>
|
||||||
|
<filter-class>com.cpic.xim.web.filters.cros.CrosFilter</filter-class>
|
||||||
|
</filter>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>CrosFilter</filter-name>
|
||||||
|
<url-pattern>*</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
|
||||||
|
</web-app>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<h2><%= "Hello World!" %></h2>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
1529
code/web/regulatory-management-util/package-lock.json
generated
1529
code/web/regulatory-management-util/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -9,28 +9,21 @@
|
|||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"vue": "^3.5.18"
|
"vue": "^3.5.22",
|
||||||
|
"vue-router": "^4.5.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@stylistic/eslint-plugin": "^5.2.2",
|
"@stylistic/eslint-plugin": "^5.4.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.39.0",
|
"@typescript-eslint/eslint-plugin": "^8.46.0",
|
||||||
"@typescript-eslint/parser": "^8.39.0",
|
"@typescript-eslint/parser": "^8.46.0",
|
||||||
"@vitejs/plugin-vue": "^6.0.1",
|
"@vitejs/plugin-vue": "^6.0.1",
|
||||||
"@vue-office/docx": "^1.6.3",
|
"@vue/tsconfig": "^0.8.1",
|
||||||
"@vue-office/excel": "^1.7.14",
|
"element-plus": "^2.11.4",
|
||||||
"@vue-office/pdf": "^2.0.10",
|
"eslint": "^9.37.0",
|
||||||
"@vue/tsconfig": "^0.7.0",
|
"eslint-plugin-vue": "^10.5.0",
|
||||||
"axios": "^1.11.0",
|
"typescript": "~5.9.3",
|
||||||
"element-plus": "^2.10.5",
|
"vite": "^7.1.9",
|
||||||
"eslint": "^9.32.0",
|
|
||||||
"eslint-plugin-vue": "^10.4.0",
|
|
||||||
"sass": "^1.90.0",
|
|
||||||
"sass-loader": "^16.0.5",
|
|
||||||
"typescript": "~5.9.2",
|
|
||||||
"vite": "^7.1.0",
|
|
||||||
"vue-demi": "^0.14.10",
|
|
||||||
"vue-eslint-parser": "^10.2.0",
|
"vue-eslint-parser": "^10.2.0",
|
||||||
"vue-router": "^4.5.1",
|
"vue-tsc": "^3.1.1"
|
||||||
"vue-tsc": "^3.0.5"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
17
code/web/regulatory-management-util/src/AppMain.vue
Normal file
17
code/web/regulatory-management-util/src/AppMain.vue
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<!--
|
||||||
|
author: Kane Wang <wangkane@qq.com>
|
||||||
|
date: 2025-10-14 15:57:34
|
||||||
|
component: AppMain
|
||||||
|
Copyright © CPIC All rights reserved
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<router-view />
|
||||||
|
</template>
|
||||||
|
<script lang="ts">
|
||||||
|
export default {
|
||||||
|
name: "AppMain",
|
||||||
|
components: [],
|
||||||
|
setup() {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="sass" scoped></style>
|
||||||
@@ -1,15 +1,17 @@
|
|||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
import { createApp, VueElement } from "vue";
|
import { createApp, VueElement } from "vue";
|
||||||
import "./style.css";
|
import "./style.css";
|
||||||
import App from "./App.vue";
|
// import App from "./App.vue";
|
||||||
|
import AppMain from "./AppMain.vue";
|
||||||
|
|
||||||
import ElementPlus from "element-plus";
|
import ElementPlus from "element-plus";
|
||||||
import "element-plus/dist/index.css";
|
import "element-plus/dist/index.css";
|
||||||
|
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
const app = createApp( App );
|
const app = createApp( AppMain );
|
||||||
|
|
||||||
app.use( ElementPlus );
|
app.use( ElementPlus );
|
||||||
|
app.mount( "#app" );
|
||||||
|
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
createApp( App ).mount( "#app" );
|
// createApp( App ).mount( "#app" );
|
||||||
|
|||||||
18
code/web/regulatory-management-util/src/router/index.ts
Normal file
18
code/web/regulatory-management-util/src/router/index.ts
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* @Author: Kane Wang <wangkane@qq.com>
|
||||||
|
* @Date: 2025-10-13 15:31:41
|
||||||
|
* @LastEditors: Kane Wang
|
||||||
|
* @LastModified: 2025-10-13 15:37:20
|
||||||
|
* @FilePath: src/router/index.ts
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 by Kane All rights reserved
|
||||||
|
*/
|
||||||
|
import { createRouter, createWebHashHistory } from "vue-router";
|
||||||
|
|
||||||
|
const router = createRouter({
|
||||||
|
history: createWebHashHistory(),
|
||||||
|
routes:[],
|
||||||
|
});
|
||||||
|
|
||||||
|
export default router;
|
||||||
Reference in New Issue
Block a user