保存进度!
This commit is contained in:
parent
b2ca0d946b
commit
21732f6bd2
@ -4,10 +4,11 @@ CREATE OR REPLACE PACKAGE telsale_archievement_pkg IS
|
|||||||
-- Created : 2023/3/10 15:13:34
|
-- Created : 2023/3/10 15:13:34
|
||||||
-- Purpose : 桌面霸屏项目基础数据生成包
|
-- Purpose : 桌面霸屏项目基础数据生成包
|
||||||
|
|
||||||
PROCEDURE department_attaching_rate
|
PROCEDURE department_archievement
|
||||||
(
|
(
|
||||||
department_code IN VARCHAR2,
|
a_department_code IN VARCHAR2,
|
||||||
attaching_rate OUT VARCHAR2
|
a_attaching_rate OUT VARCHAR2,
|
||||||
|
a_renewal_rate OUT VARCHAR2
|
||||||
);
|
);
|
||||||
|
|
||||||
END telsale_archievement_pkg;
|
END telsale_archievement_pkg;
|
||||||
@ -15,22 +16,41 @@ END telsale_archievement_pkg;
|
|||||||
CREATE OR REPLACE PACKAGE BODY telsale_archievement_pkg IS
|
CREATE OR REPLACE PACKAGE BODY telsale_archievement_pkg IS
|
||||||
|
|
||||||
-- 保费渗透率
|
-- 保费渗透率
|
||||||
PROCEDURE department_attaching_rate
|
PROCEDURE department_archievement
|
||||||
(
|
(
|
||||||
department_code IN VARCHAR2,
|
a_department_code IN VARCHAR2,
|
||||||
attaching_rate OUT VARCHAR2
|
a_attaching_rate OUT VARCHAR2,
|
||||||
|
a_renewal_rate OUT VARCHAR2
|
||||||
) IS
|
) IS
|
||||||
l_this_month VARCHAR2(4);
|
l_this_month VARCHAR2(4);
|
||||||
|
l_department_name VARCHAR2(100);
|
||||||
BEGIN
|
BEGIN
|
||||||
l_this_month := to_char(SYSDATE,
|
l_this_month := to_char(SYSDATE,
|
||||||
'mm') || '月';
|
'mm') || '月';
|
||||||
|
|
||||||
SELECT round((SUM(cf.车非融合保费) / SUM(cf.车险个人客户保费) * 100),
|
SELECT decode(SUM(cf.车险个人客户保费),
|
||||||
2) || '%'
|
0,
|
||||||
INTO attaching_rate
|
0,
|
||||||
|
round((SUM(cf.车非融合保费) / SUM(cf.车险个人客户保费) * 100),
|
||||||
|
2))
|
||||||
|
INTO a_attaching_rate
|
||||||
FROM 车非每日保费 cf
|
FROM 车非每日保费 cf
|
||||||
WHERE cf.月份 = l_this_month
|
WHERE cf.月份 = l_this_month
|
||||||
AND 部门代码 = department_code;
|
AND 部门代码 = a_department_code;
|
||||||
|
|
||||||
|
SELECT bm.department_name
|
||||||
|
INTO l_department_name
|
||||||
|
FROM idst0.bm_t bm
|
||||||
|
WHERE bm.department_code = a_department_code;
|
||||||
|
|
||||||
|
SELECT decode(SUM(到期数),
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
round(SUM(已续保累计) / SUM(到期数) * 100,
|
||||||
|
2))
|
||||||
|
INTO a_renewal_rate
|
||||||
|
FROM 坐席续保统计
|
||||||
|
WHERE 部门 = l_department_name;
|
||||||
END;
|
END;
|
||||||
|
|
||||||
BEGIN
|
BEGIN
|
||||||
|
26
code/web/task_schedule/package-lock.json
generated
26
code/web/task_schedule/package-lock.json
generated
@ -31,7 +31,6 @@
|
|||||||
"eslint-plugin-vue": "^9.12.0",
|
"eslint-plugin-vue": "^9.12.0",
|
||||||
"sass": "^1.62.1",
|
"sass": "^1.62.1",
|
||||||
"typescript": "^5.0.4",
|
"typescript": "^5.0.4",
|
||||||
"vite": "^4.3.5",
|
|
||||||
"vue-eslint-parser": "^9.3.0"
|
"vue-eslint-parser": "^9.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -426,6 +425,7 @@
|
|||||||
"os": [
|
"os": [
|
||||||
"android"
|
"android"
|
||||||
],
|
],
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@ -442,6 +442,7 @@
|
|||||||
"os": [
|
"os": [
|
||||||
"android"
|
"android"
|
||||||
],
|
],
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@ -458,6 +459,7 @@
|
|||||||
"os": [
|
"os": [
|
||||||
"android"
|
"android"
|
||||||
],
|
],
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@ -474,6 +476,7 @@
|
|||||||
"os": [
|
"os": [
|
||||||
"darwin"
|
"darwin"
|
||||||
],
|
],
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@ -490,6 +493,7 @@
|
|||||||
"os": [
|
"os": [
|
||||||
"darwin"
|
"darwin"
|
||||||
],
|
],
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@ -506,6 +510,7 @@
|
|||||||
"os": [
|
"os": [
|
||||||
"freebsd"
|
"freebsd"
|
||||||
],
|
],
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@ -522,6 +527,7 @@
|
|||||||
"os": [
|
"os": [
|
||||||
"freebsd"
|
"freebsd"
|
||||||
],
|
],
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@ -538,6 +544,7 @@
|
|||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
],
|
],
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@ -554,6 +561,7 @@
|
|||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
],
|
],
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@ -570,6 +578,7 @@
|
|||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
],
|
],
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@ -586,6 +595,7 @@
|
|||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
],
|
],
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@ -602,6 +612,7 @@
|
|||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
],
|
],
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@ -618,6 +629,7 @@
|
|||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
],
|
],
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@ -634,6 +646,7 @@
|
|||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
],
|
],
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@ -650,6 +663,7 @@
|
|||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
],
|
],
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@ -666,6 +680,7 @@
|
|||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
],
|
],
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@ -682,6 +697,7 @@
|
|||||||
"os": [
|
"os": [
|
||||||
"netbsd"
|
"netbsd"
|
||||||
],
|
],
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@ -698,6 +714,7 @@
|
|||||||
"os": [
|
"os": [
|
||||||
"openbsd"
|
"openbsd"
|
||||||
],
|
],
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@ -714,6 +731,7 @@
|
|||||||
"os": [
|
"os": [
|
||||||
"sunos"
|
"sunos"
|
||||||
],
|
],
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@ -730,6 +748,7 @@
|
|||||||
"os": [
|
"os": [
|
||||||
"win32"
|
"win32"
|
||||||
],
|
],
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@ -746,6 +765,7 @@
|
|||||||
"os": [
|
"os": [
|
||||||
"win32"
|
"win32"
|
||||||
],
|
],
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@ -762,6 +782,7 @@
|
|||||||
"os": [
|
"os": [
|
||||||
"win32"
|
"win32"
|
||||||
],
|
],
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@ -4379,6 +4400,7 @@
|
|||||||
"integrity": "sha512-vOO5XhmVj/1XQR9NQ1UPq6qvMYL7QFJU57J5fKBKBKxp17uDt5PgxFDb4A2nEiXhr1qQs4x0F5+66hVVw4ruNw==",
|
"integrity": "sha512-vOO5XhmVj/1XQR9NQ1UPq6qvMYL7QFJU57J5fKBKBKxp17uDt5PgxFDb4A2nEiXhr1qQs4x0F5+66hVVw4ruNw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
|
"peer": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"esbuild": "bin/esbuild"
|
"esbuild": "bin/esbuild"
|
||||||
},
|
},
|
||||||
@ -10795,6 +10817,7 @@
|
|||||||
"resolved": "https://registry.npmmirror.com/rollup/-/rollup-3.21.0.tgz",
|
"resolved": "https://registry.npmmirror.com/rollup/-/rollup-3.21.0.tgz",
|
||||||
"integrity": "sha512-ANPhVcyeHvYdQMUyCbczy33nbLzI7RzrBje4uvNiTDJGIMtlKoOStmympwr9OtS1LZxiDmE2wvxHyVhoLtf1KQ==",
|
"integrity": "sha512-ANPhVcyeHvYdQMUyCbczy33nbLzI7RzrBje4uvNiTDJGIMtlKoOStmympwr9OtS1LZxiDmE2wvxHyVhoLtf1KQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"rollup": "dist/bin/rollup"
|
"rollup": "dist/bin/rollup"
|
||||||
},
|
},
|
||||||
@ -12027,6 +12050,7 @@
|
|||||||
"resolved": "https://registry.npmmirror.com/vite/-/vite-4.3.5.tgz",
|
"resolved": "https://registry.npmmirror.com/vite/-/vite-4.3.5.tgz",
|
||||||
"integrity": "sha512-0gEnL9wiRFxgz40o/i/eTBwm+NEbpUeTWhzKrZDSdKm6nplj+z4lKz8ANDgildxHm47Vg8EUia0aicKbawUVVA==",
|
"integrity": "sha512-0gEnL9wiRFxgz40o/i/eTBwm+NEbpUeTWhzKrZDSdKm6nplj+z4lKz8ANDgildxHm47Vg8EUia0aicKbawUVVA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"esbuild": "^0.17.5",
|
"esbuild": "^0.17.5",
|
||||||
"postcss": "^8.4.23",
|
"postcss": "^8.4.23",
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
"eslint-plugin-vue": "^9.12.0",
|
"eslint-plugin-vue": "^9.12.0",
|
||||||
"sass": "^1.62.1",
|
"sass": "^1.62.1",
|
||||||
"typescript": "^5.0.4",
|
"typescript": "^5.0.4",
|
||||||
"vite": "^4.3.5",
|
|
||||||
"vue-eslint-parser": "^9.3.0"
|
"vue-eslint-parser": "^9.3.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
14
code/后端/desktop_archievement_backend/.vscode/launch.json
vendored
Normal file
14
code/后端/desktop_archievement_backend/.vscode/launch.json
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
// 使用 IntelliSense 了解相关属性。
|
||||||
|
// 悬停以查看现有属性的描述。
|
||||||
|
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"type": "java",
|
||||||
|
"name": "Current File",
|
||||||
|
"request": "launch",
|
||||||
|
"mainClass": "${file}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -18,10 +18,11 @@
|
|||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<!-- https://mvnrepository.com/artifact/junit/junit -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>4.13.2</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -29,7 +30,12 @@
|
|||||||
<artifactId>spring-context</artifactId>
|
<artifactId>spring-context</artifactId>
|
||||||
<version>${spring.version}</version>
|
<version>${spring.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-test</artifactId>
|
||||||
|
<version>${spring.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-web</artifactId>
|
<artifactId>spring-web</artifactId>
|
||||||
@ -103,16 +109,16 @@
|
|||||||
<skipTests>true</skipTests>
|
<skipTests>true</skipTests>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.8.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>17</source>
|
<source>17</source>
|
||||||
<target>17</target>
|
<target>17</target>
|
||||||
<encoding>UTF-8</encoding>
|
<encoding>UTF-8</encoding>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
@ -14,13 +14,23 @@ import java.sql.DriverManager;
|
|||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
import java.sql.CallableStatement;
|
||||||
|
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
public class DepartmentArchievement
|
public class DepartmentArchievement
|
||||||
{
|
{
|
||||||
public DepartmentArchievement()
|
|
||||||
|
// 以后要改
|
||||||
|
private static String jdbcURL = "jdbc:oracle:thin:@10.39.0.86:1521:xmcx1";
|
||||||
|
private static String userName = "desktop_archievement_admin";
|
||||||
|
private static String password = "Cpic123456";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 默认的构造函数,提供给json使用。
|
||||||
|
*/
|
||||||
|
public DepartmentArchievement()
|
||||||
{
|
{
|
||||||
this.totalArchievement = 0;
|
this.totalArchievement = 0;
|
||||||
this.mensualArchievementList = new Vector<>();
|
this.mensualArchievementList = new Vector<>();
|
||||||
@ -28,14 +38,48 @@ public class DepartmentArchievement
|
|||||||
this.attachingRate = "";
|
this.attachingRate = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 构造函数,提供所有成员对象的值。
|
||||||
|
* @param totalArchievement
|
||||||
|
* @param mensualArchievementList
|
||||||
|
* @param insuranceRenewalRate
|
||||||
|
* @param attachingRate
|
||||||
|
*/
|
||||||
|
public DepartmentArchievement( int totalArchievement, Vector<Integer> mensualArchievementList,
|
||||||
|
String insuranceRenewalRate, String attachingRate)
|
||||||
|
{
|
||||||
|
this.totalArchievement = totalArchievement;
|
||||||
|
this.mensualArchievementList = mensualArchievementList;
|
||||||
|
this.insuranceRenewalRate = insuranceRenewalRate;
|
||||||
|
this.attachingRate = attachingRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 静态方法,用于根据部门代码,查询部门业绩,生成一个 DepartmentArchievement 对象。
|
||||||
|
* @param departmentCode 部门代码
|
||||||
|
* @return
|
||||||
|
* @throws SQLException
|
||||||
|
* @throws ClassNotFoundException
|
||||||
|
*/
|
||||||
public static DepartmentArchievement queryDepartmentArchievement( String departmentCode )
|
public static DepartmentArchievement queryDepartmentArchievement( String departmentCode )
|
||||||
|
throws SQLException, ClassNotFoundException
|
||||||
{
|
{
|
||||||
DepartmentArchievement archievement = new DepartmentArchievement();
|
DepartmentArchievement archievement = new DepartmentArchievement();
|
||||||
|
|
||||||
String sql = """
|
String sql = "{call telsale_archievement_pkg.department_archievement(?,?,?)}";
|
||||||
|
|
||||||
|
Class.forName( "oracle.jdbc.driver.OracleDriver" );
|
||||||
""";
|
Connection connection = DriverManager.getConnection( jdbcURL, userName, password );
|
||||||
|
java.sql.CallableStatement statement = connection.prepareCall( sql );
|
||||||
|
|
||||||
|
statement.setString( 1, departmentCode );
|
||||||
|
statement.registerOutParameter( 2, java.sql.Types.VARCHAR );
|
||||||
|
statement.registerOutParameter( 3, java.sql.Types.VARCHAR );
|
||||||
|
|
||||||
|
statement.execute();
|
||||||
|
|
||||||
|
String attach_rate = statement.getString(2);
|
||||||
|
String renewal_rate = statement.getString( 3 );
|
||||||
|
|
||||||
return archievement;
|
return archievement;
|
||||||
}
|
}
|
||||||
@ -93,4 +137,4 @@ public class DepartmentArchievement
|
|||||||
|
|
||||||
@JsonProperty( "attaching_rate" )
|
@JsonProperty( "attaching_rate" )
|
||||||
private String attachingRate; // 车非渗透率
|
private String attachingRate; // 车非渗透率
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user