From 702ab2c4d1c720a3e96e581a38b7a15999b7b606 Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Tue, 25 Jul 2023 19:11:27 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E8=BF=9B=E5=BA=A6?= =?UTF-8?q?=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/web/task_schedule/package-lock.json | 437 +++++++++--------- code/web/task_schedule/package.json | 2 +- .../src/types/cpicxim/Department.ts | 2 +- .../src/types/cpicxim/RankingListItem.ts | 2 +- .../src/types/cpicxim/TelSaler.ts | 2 +- code/web/task_schedule/src/utils/ranking.ts | 4 +- .../src/views/DesktopArchievement.vue | 2 +- 7 files changed, 218 insertions(+), 233 deletions(-) diff --git a/code/web/task_schedule/package-lock.json b/code/web/task_schedule/package-lock.json index 1914d61..217c58d 100644 --- a/code/web/task_schedule/package-lock.json +++ b/code/web/task_schedule/package-lock.json @@ -22,7 +22,7 @@ }, "devDependencies": { "@babel/eslint-parser": "^7.22.9", - "@typescript-eslint/eslint-plugin": "^5.52.0", + "@typescript-eslint/eslint-plugin": "^6.2.0", "@vitejs/plugin-vue": "^4.2.3", "@vue/cli-plugin-eslint": "^5.0.8", "eslint-config-recommended": "^4.1.0", @@ -816,7 +816,6 @@ "resolved": "https://registry.npmmirror.com/@eslint-community/regexpp/-/regexpp-4.6.0.tgz", "integrity": "sha512-uiPeRISaglZnaZk8vwrjQZ1CxogZeY/4IYft6gBOTqu1WhVXWmCmZMWxUv2Q/pxSvPdp1JPaO62kLOcOkMqWrw==", "dev": true, - "peer": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } @@ -1527,28 +1526,30 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.52.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.52.0.tgz", - "integrity": "sha512-lHazYdvYVsBokwCdKOppvYJKaJ4S41CgKBcPvyd0xjZNbvQdhn/pnJlGtQksQ/NhInzdaeaSarlBjDXHuclEbg==", + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.2.0.tgz", + "integrity": "sha512-rClGrMuyS/3j0ETa1Ui7s6GkLhfZGKZL3ZrChLeAiACBE/tRc1wq8SNZESUuluxhLj9FkUefRs2l6bCIArWBiQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.52.0", - "@typescript-eslint/type-utils": "5.52.0", - "@typescript-eslint/utils": "5.52.0", + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.2.0", + "@typescript-eslint/type-utils": "6.2.0", + "@typescript-eslint/utils": "6.2.0", + "@typescript-eslint/visitor-keys": "6.2.0", "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", "natural-compare-lite": "^1.4.0", - "regexpp": "^3.2.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1556,6 +1557,50 @@ } } }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-6.2.0.tgz", + "integrity": "sha512-1ZMNVgm5nnHURU8ZSJ3snsHzpFeNK84rdZjluEVBGNu7jDymfqceB3kdIZ6A4xCfEFFhRIB6rF8q/JIqJd2R0Q==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.2.0", + "@typescript-eslint/visitor-keys": "6.2.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-6.2.0.tgz", + "integrity": "sha512-1nRRaDlp/XYJQLvkQJG5F3uBTno5SHPT7XVcJ5n1/k2WfNI28nJsvLakxwZRNY5spuatEKO7d5nZWsQpkqXwBA==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.2.0.tgz", + "integrity": "sha512-QbaYUQVKKo9bgCzpjz45llCfwakyoxHetIy8CAvYCtd16Zu1KrpzNHofwF8kGkpPOxZB2o6kz+0nqH8ZkIzuoQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.2.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/eslint-visitor-keys": { + "version": "3.4.1", + "resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz", @@ -1590,22 +1635,23 @@ "dev": true }, "node_modules/@typescript-eslint/parser": { - "version": "5.62.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/parser/-/parser-5.62.0.tgz", - "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", + "version": "6.1.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/parser/-/parser-6.1.0.tgz", + "integrity": "sha512-hIzCPvX4vDs4qL07SYzyomamcs2/tQYXg5DtdAfj35AyJ5PIUqhsLf4YrEIFzZcND7R2E8tpQIZKayxg8/6Wbw==", "dev": true, "peer": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", + "@typescript-eslint/scope-manager": "6.1.0", + "@typescript-eslint/types": "6.1.0", + "@typescript-eslint/typescript-estree": "6.1.0", + "@typescript-eslint/visitor-keys": "6.1.0", "debug": "^4.3.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1613,82 +1659,36 @@ } } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { - "version": "5.62.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", - "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", - "dev": true, - "peer": true, - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", - "dev": true, - "peer": true, - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/eslint-visitor-keys": { - "version": "3.4.1", - "resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", - "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", - "dev": true, - "peer": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.52.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-5.52.0.tgz", - "integrity": "sha512-AR7sxxfBKiNV0FWBSARxM8DmNxrwgnYMPwmpkC1Pl1n+eT8/I2NAUPuwDy/FmDcC6F8pBfmOcaxcxRHspgOBMw==", + "version": "6.1.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-6.1.0.tgz", + "integrity": "sha512-AxjgxDn27hgPpe2rQe19k0tXw84YCOsjDJ2r61cIebq1t+AIxbgiXKvD4999Wk49GVaAcdJ/d49FYel+Pp3jjw==", "dev": true, + "peer": true, "dependencies": { - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/visitor-keys": "5.52.0" + "@typescript-eslint/types": "6.1.0", + "@typescript-eslint/visitor-keys": "6.1.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@typescript-eslint/scope-manager/node_modules/@typescript-eslint/types": { - "version": "5.52.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-5.52.0.tgz", - "integrity": "sha512-oV7XU4CHYfBhk78fS7tkum+/Dpgsfi91IIDy7fjCyq2k6KB63M6gMC0YIvy+iABzmXThCRI6xpCEyVObBdWSDQ==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.52.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/type-utils/-/type-utils-5.52.0.tgz", - "integrity": "sha512-tEKuUHfDOv852QGlpPtB3lHOoig5pyFQN/cUiZtpw99D93nEBjexRLre5sQZlkMoHry/lZr8qDAt2oAHLKA6Jw==", + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/type-utils/-/type-utils-6.2.0.tgz", + "integrity": "sha512-DnGZuNU2JN3AYwddYIqrVkYW0uUQdv0AY+kz2M25euVNlujcN2u+rJgfJsBFlUEzBB6OQkUqSZPyuTLf2bP5mw==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.52.0", - "@typescript-eslint/utils": "5.52.0", + "@typescript-eslint/typescript-estree": "6.2.0", + "@typescript-eslint/utils": "6.2.0", "debug": "^4.3.4", - "tsutils": "^3.21.0" + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "peerDependencies": { - "eslint": "*" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1697,30 +1697,30 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { - "version": "5.52.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-5.52.0.tgz", - "integrity": "sha512-oV7XU4CHYfBhk78fS7tkum+/Dpgsfi91IIDy7fjCyq2k6KB63M6gMC0YIvy+iABzmXThCRI6xpCEyVObBdWSDQ==", + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-6.2.0.tgz", + "integrity": "sha512-1nRRaDlp/XYJQLvkQJG5F3uBTno5SHPT7XVcJ5n1/k2WfNI28nJsvLakxwZRNY5spuatEKO7d5nZWsQpkqXwBA==", "dev": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.52.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.52.0.tgz", - "integrity": "sha512-WeWnjanyEwt6+fVrSR0MYgEpUAuROxuAH516WPjUblIrClzYJj0kBbjdnbQXLpgAN8qbEuGywiQsXUVDiAoEuQ==", + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.2.0.tgz", + "integrity": "sha512-Mts6+3HQMSM+LZCglsc2yMIny37IhUgp1Qe8yJUYVyO6rHP7/vN0vajKu3JvHCBIy8TSiKddJ/Zwu80jhnGj1w==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/visitor-keys": "5.52.0", + "@typescript-eslint/types": "6.2.0", + "@typescript-eslint/visitor-keys": "6.2.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1728,6 +1728,28 @@ } } }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.2.0.tgz", + "integrity": "sha512-QbaYUQVKKo9bgCzpjz45llCfwakyoxHetIy8CAvYCtd16Zu1KrpzNHofwF8kGkpPOxZB2o6kz+0nqH8ZkIzuoQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.2.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.1", + "resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@typescript-eslint/type-utils/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz", @@ -1762,32 +1784,32 @@ "dev": true }, "node_modules/@typescript-eslint/types": { - "version": "5.62.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "version": "6.1.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-6.1.0.tgz", + "integrity": "sha512-+Gfd5NHCpDoHDOaU/yIF3WWRI2PcBRKKpP91ZcVbL0t5tQpqYWBs3z/GGhvU+EV1D0262g9XCnyqQh19prU0JQ==", "dev": true, "peer": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", - "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "version": "6.1.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.1.0.tgz", + "integrity": "sha512-nUKAPWOaP/tQjU1IQw9sOPCDavs/iU5iYLiY/6u7gxS7oKQoi4aUxXS1nrrVGTyBBaGesjkcwwHkbkiD5eBvcg==", "dev": true, "peer": true, "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", + "@typescript-eslint/types": "6.1.0", + "@typescript-eslint/visitor-keys": "6.1.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1795,30 +1817,6 @@ } } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", - "dev": true, - "peer": true, - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/eslint-visitor-keys": { - "version": "3.4.1", - "resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", - "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", - "dev": true, - "peer": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, "node_modules/@typescript-eslint/typescript-estree/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz", @@ -1856,52 +1854,64 @@ "peer": true }, "node_modules/@typescript-eslint/utils": { - "version": "5.52.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/utils/-/utils-5.52.0.tgz", - "integrity": "sha512-As3lChhrbwWQLNk2HC8Ree96hldKIqk98EYvypd3It8Q1f8d5zWyIoaZEp2va5667M4ZyE7X8UUR+azXrFl+NA==", + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/utils/-/utils-6.2.0.tgz", + "integrity": "sha512-RCFrC1lXiX1qEZN8LmLrxYRhOkElEsPKTVSNout8DMzf8PeWoQG7Rxz2SadpJa3VSh5oYKGwt7j7X/VRg+Y3OQ==", "dev": true, "dependencies": { - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.52.0", - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/typescript-estree": "5.52.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0", - "semver": "^7.3.7" + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.2.0", + "@typescript-eslint/types": "6.2.0", + "@typescript-eslint/typescript-estree": "6.2.0", + "semver": "^7.5.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-6.2.0.tgz", + "integrity": "sha512-1ZMNVgm5nnHURU8ZSJ3snsHzpFeNK84rdZjluEVBGNu7jDymfqceB3kdIZ6A4xCfEFFhRIB6rF8q/JIqJd2R0Q==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.2.0", + "@typescript-eslint/visitor-keys": "6.2.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" } }, "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { - "version": "5.52.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-5.52.0.tgz", - "integrity": "sha512-oV7XU4CHYfBhk78fS7tkum+/Dpgsfi91IIDy7fjCyq2k6KB63M6gMC0YIvy+iABzmXThCRI6xpCEyVObBdWSDQ==", + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-6.2.0.tgz", + "integrity": "sha512-1nRRaDlp/XYJQLvkQJG5F3uBTno5SHPT7XVcJ5n1/k2WfNI28nJsvLakxwZRNY5spuatEKO7d5nZWsQpkqXwBA==", "dev": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" } }, "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.52.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.52.0.tgz", - "integrity": "sha512-WeWnjanyEwt6+fVrSR0MYgEpUAuROxuAH516WPjUblIrClzYJj0kBbjdnbQXLpgAN8qbEuGywiQsXUVDiAoEuQ==", + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.2.0.tgz", + "integrity": "sha512-Mts6+3HQMSM+LZCglsc2yMIny37IhUgp1Qe8yJUYVyO6rHP7/vN0vajKu3JvHCBIy8TSiKddJ/Zwu80jhnGj1w==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.52.0", - "@typescript-eslint/visitor-keys": "5.52.0", + "@typescript-eslint/types": "6.2.0", + "@typescript-eslint/visitor-keys": "6.2.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1909,6 +1919,28 @@ } } }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.2.0.tgz", + "integrity": "sha512-QbaYUQVKKo9bgCzpjz45llCfwakyoxHetIy8CAvYCtd16Zu1KrpzNHofwF8kGkpPOxZB2o6kz+0nqH8ZkIzuoQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.2.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/eslint-visitor-keys": { + "version": "3.4.1", + "resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@typescript-eslint/utils/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz", @@ -1943,25 +1975,17 @@ "dev": true }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.52.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.52.0.tgz", - "integrity": "sha512-qMwpw6SU5VHCPr99y274xhbm+PRViK/NATY6qzt+Et7+mThGuFSl/ompj2/hrBlRP/kq+BFdgagnOSgw9TB0eA==", + "version": "6.1.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.1.0.tgz", + "integrity": "sha512-yQeh+EXhquh119Eis4k0kYhj9vmFzNpbhM3LftWQVwqVjipCkwHBQOZutcYW+JVkjtTG9k8nrZU1UoNedPDd1A==", "dev": true, + "peer": true, "dependencies": { - "@typescript-eslint/types": "5.52.0", - "eslint-visitor-keys": "^3.3.0" + "@typescript-eslint/types": "6.1.0", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys/node_modules/@typescript-eslint/types": { - "version": "5.52.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-5.52.0.tgz", - "integrity": "sha512-oV7XU4CHYfBhk78fS7tkum+/Dpgsfi91IIDy7fjCyq2k6KB63M6gMC0YIvy+iABzmXThCRI6xpCEyVObBdWSDQ==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" } }, "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { @@ -1969,6 +1993,7 @@ "resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", "dev": true, + "peer": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -6803,21 +6828,6 @@ "node": ">=4.0" } }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, "node_modules/eslint-visitor-keys": { "version": "2.1.0", "resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", @@ -7888,18 +7898,11 @@ "resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmmirror.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true - }, "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmmirror.com/graphemer/-/graphemer-1.4.0.tgz", "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true, - "peer": true + "dev": true }, "node_modules/gzip-size": { "version": "6.0.0", @@ -12034,15 +12037,6 @@ "node": ">= 0.4" } }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmmirror.com/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/relateurl": { "version": "0.2.7", "resolved": "https://registry.npmmirror.com/relateurl/-/relateurl-0.2.7.tgz", @@ -13435,6 +13429,18 @@ "integrity": "sha512-0z3j8R7MCjy10kc/g+qg7Ln3alJTodw9aDuVWZa3uiWqfuBMKeAeP2ocWcxoyM3D73yz3Jt/Pu4qPr4wHSdB/Q==", "devOptional": true }, + "node_modules/ts-api-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/ts-api-utils/-/ts-api-utils-1.0.1.tgz", + "integrity": "sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==", + "dev": true, + "engines": { + "node": ">=16.13.0" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, "node_modules/tsconfig-paths": { "version": "3.14.2", "resolved": "https://registry.npmmirror.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", @@ -13464,27 +13470,6 @@ "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz", "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmmirror.com/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "node_modules/tsutils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmmirror.com/type-check/-/type-check-0.4.0.tgz", diff --git a/code/web/task_schedule/package.json b/code/web/task_schedule/package.json index 18cd10a..80fb096 100644 --- a/code/web/task_schedule/package.json +++ b/code/web/task_schedule/package.json @@ -23,7 +23,7 @@ }, "devDependencies": { "@babel/eslint-parser": "^7.22.9", - "@typescript-eslint/eslint-plugin": "^6.1.0", + "@typescript-eslint/eslint-plugin": "^6.2.0", "@vitejs/plugin-vue": "^4.2.3", "@vue/cli-plugin-eslint": "^5.0.8", "eslint-config-recommended": "^4.1.0", diff --git a/code/web/task_schedule/src/types/cpicxim/Department.ts b/code/web/task_schedule/src/types/cpicxim/Department.ts index e3bc06b..e20de37 100644 --- a/code/web/task_schedule/src/types/cpicxim/Department.ts +++ b/code/web/task_schedule/src/types/cpicxim/Department.ts @@ -12,6 +12,6 @@ interface Department { departmentName: string; departmentCode: string; -}; +} export { type Department }; diff --git a/code/web/task_schedule/src/types/cpicxim/RankingListItem.ts b/code/web/task_schedule/src/types/cpicxim/RankingListItem.ts index bf331ea..fcf5a12 100644 --- a/code/web/task_schedule/src/types/cpicxim/RankingListItem.ts +++ b/code/web/task_schedule/src/types/cpicxim/RankingListItem.ts @@ -13,6 +13,6 @@ interface RankingListItem index: number; callerName: string; appraiseValue: string; -}; +} export { type RankingListItem }; diff --git a/code/web/task_schedule/src/types/cpicxim/TelSaler.ts b/code/web/task_schedule/src/types/cpicxim/TelSaler.ts index 9b061bb..03d7e37 100644 --- a/code/web/task_schedule/src/types/cpicxim/TelSaler.ts +++ b/code/web/task_schedule/src/types/cpicxim/TelSaler.ts @@ -16,6 +16,6 @@ interface TelSaler teamName: string; departmentCode: string; departmentName: string; -}; +} export { type TelSaler }; diff --git a/code/web/task_schedule/src/utils/ranking.ts b/code/web/task_schedule/src/utils/ranking.ts index 233a7f3..134b21b 100644 --- a/code/web/task_schedule/src/utils/ranking.ts +++ b/code/web/task_schedule/src/utils/ranking.ts @@ -19,7 +19,7 @@ interface RankingListRequest departmentCode: string; year: string; month: string; -}; +} interface RankingListResponse { @@ -30,7 +30,7 @@ interface RankingListResponse month: string; attachingRateRankingList: RankingListItem[]; renewalRateRankingList: RankingListItem[]; -}; +} /** * 请求坐席排行榜。 diff --git a/code/web/task_schedule/src/views/DesktopArchievement.vue b/code/web/task_schedule/src/views/DesktopArchievement.vue index d51e4d2..4740188 100644 --- a/code/web/task_schedule/src/views/DesktopArchievement.vue +++ b/code/web/task_schedule/src/views/DesktopArchievement.vue @@ -113,7 +113,7 @@ interface ui showUI: boolean; // 用来刷新页面的开关 attachingRankingList: RankingListItem[]; // 坐席车非渗透率榜单 renewalRankingList: RankingListItem[]; -}; +} export default { name: "DesktopArchievement", From 9111067e636fbbe38cc8c568448b1d3ffc8f70b9 Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Wed, 26 Jul 2023 20:31:10 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E7=94=9F=E6=88=90?= =?UTF-8?q?=E8=BD=A6=E9=9D=9E=E6=95=B0=E6=8D=AE=E7=9A=84bug=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/db/pkg/telsale_archievement_pkg.pck | 7 +- code/db/pkg/telsale_pkg.pck | 20 +- code/db/pkg/telsale_pkg_07-26.pck | 918 ++++++++++++++++++ code/db/车非基础数据.sql | 593 +++++------ .../desktop_archievement_backend/pom.xml | 11 +- .../src/main/resources/StaffMapper.xml | 37 + .../src/main/resources/log4j2.xml | 4 +- .../src/main/resources/mybatis-config.xml | 19 + .../main/resources/mybatis/jdbc.properties | 4 - .../src/main/resources/mybatis/mybatis.xml | 19 - .../test/DesktopArchievementTest.java | 18 +- 11 files changed, 1300 insertions(+), 350 deletions(-) create mode 100644 code/db/pkg/telsale_pkg_07-26.pck create mode 100644 code/后端/desktop_archievement_backend/src/main/resources/StaffMapper.xml create mode 100644 code/后端/desktop_archievement_backend/src/main/resources/mybatis-config.xml delete mode 100644 code/后端/desktop_archievement_backend/src/main/resources/mybatis/jdbc.properties delete mode 100644 code/后端/desktop_archievement_backend/src/main/resources/mybatis/mybatis.xml diff --git a/code/db/pkg/telsale_archievement_pkg.pck b/code/db/pkg/telsale_archievement_pkg.pck index a22ea8a..c34af9c 100644 --- a/code/db/pkg/telsale_archievement_pkg.pck +++ b/code/db/pkg/telsale_archievement_pkg.pck @@ -146,15 +146,16 @@ CREATE OR REPLACE PACKAGE BODY telsale_archievement_pkg IS -- ںа OPEN a_attaching_ranking_list FOR SELECT ϯ, - round(nvl(SUM(ںϱ) / SUM(ո˿ͻ), - 0) * 100, + round(decode(SUM(ո˿ͻ), + 0, + 0, + (SUM(ںϱ) / SUM(ո˿ͻ)) * 100), 2) ͸ FROM ϯÿձ WHERE · = a_month AND = a_year AND Ŵ = a_department_code GROUP BY ϯ - --HAVING · = '06' ORDER BY ͸ DESC; -- а diff --git a/code/db/pkg/telsale_pkg.pck b/code/db/pkg/telsale_pkg.pck index 109b899..3bcc477 100644 --- a/code/db/pkg/telsale_pkg.pck +++ b/code/db/pkg/telsale_pkg.pck @@ -37,28 +37,28 @@ CREATE OR REPLACE PACKAGE BODY telsale_pkg IS a_end_date); FOR caller_record IN (SELECT * - FROM desktop_archievement_admin.ÿձ_t) + FROM desktop_archievement_admin.ϯÿձ_t) LOOP BEGIN - DELETE desktop_archievement_admin.ÿձ cf + DELETE desktop_archievement_admin.ϯÿձ cf WHERE cf.ǩ = caller_record.ǩ AND cf. = caller_record. AND cf.n = caller_record.n AND cf.ϯ = caller_record.ϯ; EXCEPTION WHEN no_data_found THEN - NULL; + dbms_output.put_line(caller_record.ǩ || 'ظ'); END; - INSERT INTO desktop_archievement_admin.ÿձ + INSERT INTO desktop_archievement_admin.ϯÿձ VALUES caller_record; END LOOP; COMMIT; - EXCEPTION + /*EXCEPTION WHEN OTHERS THEN - NULL; + NULL;*/ END; /**********************************************************************/ @@ -359,10 +359,10 @@ CREATE OR REPLACE PACKAGE BODY telsale_pkg IS nvl(SUM(ںϱ), 0) ںϱ FROM ff - WHERE ff.ǩ >= to_char(a_start_date, - 'yyyy-mm-dd') - AND ff.ǩ <= to_char(a_end_date, - 'yyyy-mm-dd') + WHERE to_date(ff.ǩ, + 'yyyy-mm-dd') >= a_start_date + AND to_date(ff.ǩ, + 'yyyy-mm-dd') < a_end_date AND bm IN ('ҵ', '֧˾') GROUP BY ǩ, diff --git a/code/db/pkg/telsale_pkg_07-26.pck b/code/db/pkg/telsale_pkg_07-26.pck new file mode 100644 index 0000000..3bcc477 --- /dev/null +++ b/code/db/pkg/telsale_pkg_07-26.pck @@ -0,0 +1,918 @@ +CREATE OR REPLACE PACKAGE telsale_pkg IS + + -- Author : WANGWEI-202 + -- Created : 2023/3/10 15:13:34 + -- Purpose : Ŀɰ + + PROCEDURE ǻ + ( + a_start_date IN DATE, + a_end_date IN DATE + ); + + PROCEDURE gen_ʱ + ( + a_start_date IN DATE, + a_end_date IN DATE + ); + + PROCEDURE ; + + PROCEDURE chefei_daily_job; + PROCEDURE xubao_daily_job; + +END telsale_pkg; +/ +CREATE OR REPLACE PACKAGE BODY telsale_pkg IS + + PROCEDURE ǻ + ( + a_start_date IN DATE, + a_end_date IN DATE + ) IS + --l_count INTEGER; --м¼ + BEGIN + --ʱ + gen_ʱ(a_start_date, + a_end_date); + + FOR caller_record IN (SELECT * + FROM desktop_archievement_admin.ϯÿձ_t) + LOOP + BEGIN + DELETE desktop_archievement_admin.ϯÿձ cf + WHERE cf.ǩ = caller_record.ǩ + AND cf. = caller_record. + AND cf.n = caller_record.n + AND cf.ϯ = caller_record.ϯ; + EXCEPTION + WHEN no_data_found THEN + dbms_output.put_line(caller_record.ǩ || 'ظ'); + END; + + INSERT INTO desktop_archievement_admin.ϯÿձ + VALUES caller_record; + + END LOOP; + + COMMIT; + /*EXCEPTION + WHEN OTHERS THEN + NULL;*/ + END; + + /**********************************************************************/ + + PROCEDURE gen_ʱ + ( + a_start_date IN DATE, + a_end_date IN DATE + ) IS + BEGIN + desktop_archievement_admin.clean_temp_data; + + INSERT INTO desktop_archievement_admin.ϯÿձ_t + WITH aa AS + (SELECT to_char(t.signature_date, + 'yyyy-mm-dd') ǩ, + (to_char(T.signature_date, + 'yyyy')) the_year, + (to_char(T.signature_date, + 'mm')) the_month, + t.policy_no bdh, + t.endorsement_no pdh, + qt.t_cre tid, + QT.B_CRE BTID, -----ֶ + e.inception_date qbsj, + e.planned_end_date zzsj, + pt.premium_amount - nvl(pt.tax_amount, + 0) bf + --,qt.qdbf - nvl(qt.qdbf_tax_amount,0) bf + , + nt.ecompensation_rate * (pt.premium_amount - nvl(pt.tax_amount, + 0)) fxbf, + z.department_name bm, + z.department_code bmdm, + CASE + WHEN (et.telpartnercode LIKE '%HC%' OR + zx.workerno IN (SELECT code + FROM datacenter.dc_lsj_zx_hc)) THEN + '׷ῥ' + ELSE + '' + END Ƿῥ, + nvl(zx.workerno, + et.telpartnercode) ϯ, + (CASE + WHEN nvl(zx.workerno, + et.telpartnercode) = 'DX001' AND + xx.staff_name LIKE '%%' THEN + 'ΰ' + WHEN nvl(zx.workerno, + et.telpartnercode) = 'DX001' AND + xx.staff_name NOT LIKE '%%' THEN + '' + ELSE + to_char(ys.ϯ) + END) ϯ, + YS.Ŷ ϯŶ, + nvl(YS.Ŷ, + y.section_office_name) N, + nvl((CASE + WHEN nvl(zx.workerno, + et.telpartnercode) = 'DX001' AND + xx.staff_name LIKE '%%' THEN + 'ΰ' + WHEN nvl(zx.workerno, + et.telpartnercode) = 'DX001' AND + xx.staff_name NOT LIKE '%%' THEN + '' + ELSE + to_char(ys.ϯ) + END), + xx.staff_name) N + FROM idst0.auto_agreement_request_t t + LEFT JOIN idst0.auto_agreement_t e + ON e.policy_no = t.policy_no + LEFT JOIN idst0.motorised_vehicle_t v + ON v.policy_no = e.policy_no + LEFT JOIN idst0.auto_premium_t pt + ON pt.policy_no = t.policy_no + AND pt.endorsement_no = t.endorsement_no + LEFT JOIN ywglxt.w_dxbd_i i + ON e.policy_no = i.bdh + LEFT JOIN idst0.rydm_t xx + ON xx.staff_code = nvl(i.zhjywy, + e.operator_code) + LEFT JOIN idst0.ks_t y + ON y.section_office_code = nvl(xx.section_office_code, + e.section_office_code) + LEFT JOIN idst0.bm_t z + ON z.department_code = nvl(xx.department_code, + e.department_code) + --left join datacenter.dc_cx_csteam ct on ct.jbrcode = xx.staff_code + LEFT JOIN idst0.auto_new_product_info_t nt + ON nt.policy_no = t.policy_no + AND nt.endorsement_no = t.endorsement_no + --left join ywglxt.q_auto_agreement_extend_t qe on qe.policy_no = e.policy_no + LEFT JOIN ywglxt.q_auto_agreement_t qt + ON qt.policy_no = e.policy_no + LEFT JOIN datacenter.dc_yangg_qdcode qd + ON qd.code = e.selling_channel_type + LEFT JOIN datacenter.dc_tb_jc_c_tag cl + ON cl. = e.policy_no + LEFT JOIN datacenter.dc_yangg_basecode_teams fg + ON fg.bm = z.department_name + AND fg.ks = y.section_office_name + --left join idst0.t_sell_policy_autobase_t zx on zx.policy_no=e.policy_no + --left join idst0.auto_agreement_extend_t et on et.policy_no = e.policy_no + LEFT JOIN idst0.auto_agreement_extend_t et + ON et.policy_no = e.policy_no + LEFT JOIN idst0.t_sell_policy_autobase_t zx + ON zx.policy_no = e.policy_no + LEFT JOIN datacenter.dc_YZH_ZXYS YS + ON YS.ϯ = nvl(zx.workerno, + et.telpartnercode) + --left join v_lsj_dimian dm on dm.vin=v.vin and e.selling_channel_type='25' and dm.MEMO like'%%' + --left join datacenter.dc_lsj_zx_team zt on zt.name=coalesce(zc.name,zc1.name,bc.name,dm.JBRMC) + WHERE t.signature_date >= to_date('2023-01-01 00:00:00', + 'yyyy-mm-dd hh24:mi:ss') + AND t.signature_date < to_date(to_char(SYSDATE - 1, + 'yyyy-mm-dd') || ' 23:59:59', + 'yyyy-mm-dd hh24:mi:ss') + --and t.endorsement_no = '' + AND e.policy_status = '1' --Ч + AND qt.tflag = '0' --Ϊ + AND qt.usage_xm = 'ͥó' + --ᳵĦг + --and e.policy_no in ('AXIMC90Y1419B038594J','AXIMC90CTP19B039593R','AXIMC04CTP19B013473X') + AND e.planned_end_date - e.inception_date >= 360 + -- + ) + -----ֶ + , + dd2 AS + (SELECT ǩ, + the_year, + the_month, + bm, + bmdm, + ϯ, + ϯ, + ϯŶ, + N, + N, + CASE + WHEN pdh = '' THEN + tid + END tid, + to_number('1') ͻ, + COUNT(DISTINCT CASE + WHEN pdh = '' THEN + bdh + END) , + SUM(bf) + FROM (SELECT DISTINCT * + FROM aa) aa + GROUP BY bm, + bmdm, + CASE + WHEN pdh = '' THEN + tid + END, + the_year, + the_month, + BTID, + ϯ, + ϯ, + ϯŶ, + ǩ, + N, + N + UNION + SELECT ǩ, + the_year, + the_month, + bm, + bmdm, + ϯ, + ϯ, + ϯŶ, + N, + N, + CASE + WHEN btid = tid THEN + '' + ELSE + btid + END btid, + to_number('0') ͻ, + to_number('0') , + to_number('0') + FROM (SELECT DISTINCT * + FROM aa) aa), + DD AS + (SELECT * + FROM DD2 + WHERE TID IS NOT NULL) + --select * from dd + , + bb AS + (SELECT DISTINCT q.policy_no bdh, + q.endorsement_no pdh, + qna.t_cre tid, + to_number(to_char(q.signature_date, + 'yyyy')) || '' nf, + (to_char(q.signature_date, + 'mm')) mm_f, + to_char(q.signature_date, + 'dd') || '' dd, + q.signature_date sj, + round((pt.premium_amount - nvl(pt.taxamount, + 0)) * c.rate / 100, + 2) bf, + z.department_name bm + FROM idst0.nonauto_agreement_request_t q + LEFT JOIN idst0.nonauto_agreement_t e + ON e.policy_no = q.policy_no + LEFT JOIN idst0.nonauto_premium_t pt + ON pt.endorsement_no = q.endorsement_no + AND pt.policy_no = q.policy_no + LEFT JOIN idst0.reinsurance_t r + ON r.reinsurance_policy_no = e.policy_no + LEFT JOIN idst0.exrate_month_t c + ON pt.currency_code = c.bzh + AND to_char(q.signature_date, + 'YYYY') = c.theyear + AND to_char(q.signature_date, + 'fmmm') = c.themonth + + LEFT JOIN idst0.rydm_t x + ON x.staff_code = e.operator_code + LEFT JOIN idst0.ks_t y + ON y.section_office_code = x.section_office_code + LEFT JOIN idst0.bm_t z + ON z.department_code = x.department_code + LEFT JOIN ywglxt.q_nonauto_agreement_t qna + ON qna.policy_no = q.policy_no + LEFT JOIN datacenter.dc_yangg_gkxzh gk + ON gk.product_code = e.product_code --ɢ + --left join datacenter.dc_yangg_zbxzh zb on zb.product_code = e.product_code -- + LEFT JOIN dd + ON dd.tid = qna.t_cre + WHERE qna.tflag = '0' + AND (CASE + WHEN q.endorsement_no != '' AND + round((pt.premium_amount - nvl(pt.taxamount, + 0)) * c.rate / 100, + 2) != 0 THEN + '' + END) IS NULL + --and q.endorsement_no = '' + AND e.policy_status = '1' + AND gk.product_code IS NOT NULL + AND (e.product_code LIKE '2%' OR e.product_code LIKE '1106%' --⽡ -- + OR e.product_code LIKE '1107%' OR e.product_code LIKE '1108%' OR e.product_code LIKE '1307%' OR e.product_code LIKE '1304A400%' --Ҳ + + ) + --and e.product_code not in ('22KC9800') + AND q.signature_date >= to_date('2023-01-01 00:00:00', + 'yyyy-mm-dd hh24:mi:ss') + AND q.signature_date < to_date(to_char(SYSDATE - 1, + 'yyyy-mm-dd') || ' 23:59:59', + 'yyyy-mm-dd hh24:mi:ss') + AND e.planned_end_date - e.inception_date >= 90 + AND dd.tid IS NOT NULL + --ո˿ͻ) + ) + --SELECT * FROM BB + , + cc AS + (SELECT mm_f, + tid ں֤, + COUNT(DISTINCT bdh) ںϱ, + SUM(bf) ںϱ + FROM bb + GROUP BY tid, + mm_f), + ff AS + (SELECT dd.*, + cc.* + FROM dd + LEFT JOIN cc + ON cc.ں֤ = dd.tid + AND cc.mm_f = dd.the_month) --OR cc.ں֤ = dd.btid + --select * from ff + SELECT to_date(ǩ, + 'yyyy-mm-dd') ǩ, + the_year , + the_month ·, + bm , + bmdm Ŵ, + N, + N, + ϯ, + ϯ, + ϯŶ, + nvl(SUM(), + 0) ո˿ͻ, + nvl(SUM(ںϱ), + 0) ںϱ + FROM ff + WHERE to_date(ff.ǩ, + 'yyyy-mm-dd') >= a_start_date + AND to_date(ff.ǩ, + 'yyyy-mm-dd') < a_end_date + AND bm IN ('ҵ', + '֧˾') + GROUP BY ǩ, + the_year, + the_month, + bm, + bmdm, + ϯ, + ϯ, + ϯŶ, + N, + N + ORDER BY , + ϯ; + COMMIT; + END; + + /**********************************************************************/ + + PROCEDURE IS + BEGIN + -- + desktop_archievement_admin.clean_mensual_renewal; + + -- + INSERT INTO desktop_archievement_admin.ϯͳ + WITH cc AS + (SELECT pt.policy_no policy_no, + SUM(pt.premium_amount) premium_amount, + SUM(pt.tax_amount) tax_amount + FROM idst0.auto_premium_t pt + GROUP BY pt.policy_no) + + , + bb AS + (SELECT t.policy_no , + (CASE + WHEN e.product_code LIKE '1102%' AND + e.product_code NOT LIKE '110224%' AND + e.product_code != '11026000' THEN + 'ձ' + WHEN e.product_code LIKE '1101%' OR + e.product_code LIKE '1301%' OR + e.product_code LIKE '11110000%' THEN + 'Ʋ' + WHEN e.product_code LIKE '1107%' OR + e.product_code LIKE '1307%' OR + e.product_code LIKE '1304A400%' THEN + '' + WHEN e.product_code LIKE '1106%' OR + e.product_code LIKE '51015700' THEN + 'Ҳ' + WHEN (e.product_code LIKE '1104%' OR e.product_code LIKE '1204%' OR e.product_code LIKE '13040000%') AND + e.product_code NOT LIKE '120404%' THEN + '' + WHEN e.product_code LIKE '1203%' OR + e.product_code LIKE '1103%' OR + e.product_code LIKE '120404%' THEN + '' + WHEN e.product_code LIKE '1305%' THEN + '' + WHEN e.product_code LIKE '111%' AND + e.product_code NOT LIKE '11110000%' THEN + 'ũҵ' + WHEN e.product_code LIKE '1109%' OR + e.product_code LIKE '1309%' THEN + '֤' + WHEN e.product_code LIKE '1312%' THEN + '' + WHEN e.product_code LIKE '1308%' THEN + '' + WHEN e.product_code LIKE '23%' THEN + '' + WHEN e.product_code LIKE '22%' THEN + '' + WHEN e.product_code LIKE '110224%' OR + e.product_code = '11026000' THEN + 'ǿ' + ELSE + 'δ' + END) AS ִ + FROM idst0.auto_agreement_request_t t + LEFT JOIN idst0.auto_agreement_t e + ON e.policy_no = t.policy_no) + + , + aa1 AS + (SELECT a.policy_no ɱ, + a.selling_shop_code ̴, + a.planned_end_date ʱ, + CASE + WHEN to_number(to_char(a.planned_end_date, + 'yyyy')) = '2022' AND + a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN + 'רҵһ' + WHEN a.planned_end_date > to_date('2023-04-01 00:00:00', + 'yyyy-mm-dd hh24:mi:ss') AND + (a.selling_shop_code || a.tel_sale_4s_code IN ('00EA', + '00F1', + '00G9')) THEN + 'רҵһ' + ELSE + nvl(dt., + z.section_office_name) + END , + (CASE + WHEN to_number(to_char(a.planned_end_date, + 'yyyy')) = '2023' AND + nvl(dt., + y.department_name) NOT LIKE '֧˾' andcd.memo LIKE '%%' OR + cd.memo LIKE '%%' and v.vehicle_brand IN ('˹', + 'ε', + '', + 'С', + '', + '', + 'AITO', + 'ARCFOX', + '˹й', + '˹(й)') AND + v.vin NOT IN ('LJ1E6A2UXL7744108', + 'LW433B10XL1001411', + 'LJ1E6A3U2L7742089', + 'L1NSPGHB0MA002652') THEN + 'Դҵչŷ' + WHEN (CASE + WHEN to_number(to_char(a.planned_end_date, + 'yyyy')) = '2022' AND + a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN + '֧˾' + ELSE + nvl(dt., + y.department_name) + END) = '֧˾' THEN + (CASE + WHEN to_number(to_char(a.planned_end_date, + 'yyyy')) = '2022' AND + a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN + '֧˾' + ELSE + nvl(dt., + y.department_name) + END) + WHEN cd.memo LIKE '%%' OR + cd.memo LIKE '%%' THEN + 'ҵ' + WHEN a.planned_end_date > to_date('2023-04-01 00:00:00', + 'yyyy-mm-dd hh24:mi:ss') AND + (a.selling_shop_code || a.tel_sale_4s_code IN ('00EA', + '00F1', + '00G9')) THEN + '֧ͬ˾' + ELSE + (CASE + WHEN to_number(to_char(a.planned_end_date, + 'yyyy')) = '2022' AND + a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN + '֧˾' + ELSE + nvl(dt., + y.department_name) + END) + END) β, + qa.USAGE_XM ʹ, + decode(qa.bd_type, + '1', + 'ǿ', + '2', + 'ҵ', + '3', + '̹', + '') , + (CASE + WHEN (qa.bd_type = '1' AND nt.ecompensation_rate > 1) THEN + '' + END) Ԥ, + x.staff_name AS , + bb.ִ, + cc.signature_date ±ǩʱ, + (SELECT hmd.ܿ + FROM (SELECT DISTINCT * + FROM dc_lsj_xb_hmd) hmd + WHERE hmd.vin = v.vin) ܿ + + FROM idst0.auto_agreement_t a + LEFT JOIN bb + ON bb. = a.policy_no + LEFT JOIN ywglxt.w_dxbd_i i + ON a.policy_no = i.bdh + LEFT JOIN idst0.motorised_vehicle_t v + ON a.policy_no = v.policy_no + LEFT JOIN ywglxt.q_auto_agreement_t qa + ON qa.policy_no = a.policy_no + + LEFT JOIN idst0.auto_new_product_info_t nt + ON nt.policy_no = a.policy_no + AND nt.endorsement_no = '' + LEFT JOIN idst0.rydm_t x + ON x.staff_code = nvl(upper(i.zhjywy), + a.operator_code) + LEFT JOIN idst0.bm_t y + ON x.department_code = y.department_code + LEFT JOIN idst0.ks_t z + ON x.section_office_code = z.section_office_code + LEFT JOIN cc pt + ON pt.policy_no = a.policy_no + LEFT JOIN (SELECT DISTINCT aa.policy_no, + vv.vin, + aa.inception_date, + t.signature_date, + (pt.premium_amount - nvl(pt.tax_amount, + 0)) qdbf, + (CASE + WHEN aa.inception_date - aa.issue_date >= '30' THEN + vv.vin + END) if30, + bb.ִ + FROM idst0.auto_agreement_t aa + LEFT JOIN bb + ON bb. = aa.policy_no + LEFT JOIN idst0.motorised_vehicle_t vv + ON vv.policy_no = aa.policy_no + LEFT JOIN idst0.auto_agreement_request_t t + ON t.policy_no = aa.policy_no + AND t.endorsement_no = '' + LEFT JOIN idst0.auto_premium_t pt + ON pt.policy_no = aa.policy_no + AND pt.endorsement_no = '' + WHERE aa.policy_no = vv.policy_no + AND aa.policy_status = '1' --and aa.product_code not in ('11022400','11023900','11024000','11024600','11026000') + AND aa.branch_company_code = '3080100' + AND (pt.premium_amount - nvl(pt.tax_amount, + 0)) > 100 + AND aa.inception_date >= to_date('2022-12-01 00:00:00', + 'yyyy-mm-dd hh24:mi:ss') + AND aa.inception_date < to_date('2023-11-01 00:00:00', + 'yyyy-mm-dd hh24:mi:ss') + AND aa.branch_company_code = vv.branch_company_code) cc + ON (cc.vin = v.vin AND cc.ִ = bb.ִ) + AND cc.inception_date > a.planned_end_date - 30 --ʱƷſΪ30 + LEFT JOIN dc_yangg_cx_dianxiaodoudi cd + ON cd.policy_no = a.policy_no + LEFT JOIN dc_tb_jc_c_tag dt + ON dt. = a.policy_no + LEFT JOIN idst0.auto_agreement_t aa + ON aa.policy_no = cc.policy_no + LEFT JOIN cc pt1 + ON pt1.policy_no = aa.policy_no + WHERE a.policy_status = '1' + AND a.planned_end_date - a.inception_date > 270 + AND a.planned_end_date >= to_date('2023-01-01 00:00:00', + 'yyyy-mm-dd hh24:mi:ss') + AND a.planned_end_date < to_date('2023-10-01 00:00:00', + 'yyyy-mm-dd hh24:mi:ss')), + aa2 AS + (SELECT a.policy_no ɱ, + a.selling_shop_code ̴, + a.planned_end_date ʱ, + CASE + WHEN to_number(to_char(a.planned_end_date, + 'yyyy')) = '2022' AND + a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN + 'רҵһ' + WHEN a.planned_end_date > to_date('2023-04-01 00:00:00', + 'yyyy-mm-dd hh24:mi:ss') AND + (a.selling_shop_code || a.tel_sale_4s_code IN ('00EA', + '00F1', + '00G9')) THEN + 'רҵһ' + ELSE + nvl(dt., + z.section_office_name) + END , + (CASE + WHEN to_number(to_char(a.planned_end_date, + 'yyyy')) = '2023' AND + nvl(dt., + y.department_name) NOT LIKE '֧˾' andcd.memo LIKE '%%' OR + cd.memo LIKE '%%' and v.vehicle_brand IN ('˹', + 'ε', + '', + 'С', + '', + '', + 'AITO', + 'ARCFOX', + '˹й', + '˹(й)') AND + v.vin NOT IN ('LJ1E6A2UXL7744108', + 'LW433B10XL1001411', + 'LJ1E6A3U2L7742089', + 'L1NSPGHB0MA002652') THEN + 'Դҵչŷ' + WHEN (CASE + WHEN to_number(to_char(a.planned_end_date, + 'yyyy')) = '2022' AND + a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN + '֧˾' + ELSE + nvl(dt., + y.department_name) + END) = '֧˾' THEN + (CASE + WHEN to_number(to_char(a.planned_end_date, + 'yyyy')) = '2022' AND + a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN + '֧˾' + ELSE + nvl(dt., + y.department_name) + END) + WHEN cd.memo LIKE '%%' OR + cd.memo LIKE '%%' THEN + 'ҵ' + WHEN a.planned_end_date > to_date('2023-04-01 00:00:00', + 'yyyy-mm-dd hh24:mi:ss') AND + (a.selling_shop_code || a.tel_sale_4s_code IN ('00EA', + '00F1', + '00G9')) THEN + '֧ͬ˾' + ELSE + (CASE + WHEN to_number(to_char(a.planned_end_date, + 'yyyy')) = '2022' AND + a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN + '֧˾' + ELSE + nvl(dt., + y.department_name) + END) + END) β, + qa.USAGE_XM ʹ, + decode(qa.bd_type, + '1', + 'ǿ', + '2', + 'ҵ', + '3', + '̹', + '') , + (CASE + WHEN (qa.bd_type = '1' AND nt.ecompensation_rate > 1) THEN + '' + END) Ԥ, + x.staff_name AS , + bb.ִ, + cc.signature_date ±ǩʱ, + (SELECT hmd.ܿ + FROM (SELECT DISTINCT * + FROM dc_lsj_xb_hmd) hmd + WHERE hmd.vin = v.vin) ܿ + + FROM idst0.auto_agreement_t a + LEFT JOIN bb + ON bb. = a.policy_no + LEFT JOIN ywglxt.w_dxbd_i i + ON a.policy_no = i.bdh + LEFT JOIN idst0.motorised_vehicle_t v + ON a.policy_no = v.policy_no + LEFT JOIN ywglxt.q_auto_agreement_t qa + ON qa.policy_no = a.policy_no + LEFT JOIN idst0.auto_new_product_info_t nt + ON nt.policy_no = a.policy_no + AND nt.endorsement_no = '' + LEFT JOIN idst0.rydm_t x + ON x.staff_code = nvl(upper(i.zhjywy), + a.operator_code) + LEFT JOIN idst0.bm_t y + ON x.department_code = y.department_code + LEFT JOIN idst0.ks_t z + ON x.section_office_code = z.section_office_code + LEFT JOIN cc pt + ON pt.policy_no = a.policy_no + LEFT JOIN (SELECT DISTINCT aa.policy_no, + vv.vin, + aa.inception_date, + t.signature_date, + (pt.premium_amount - nvl(pt.tax_amount, + 0)) qdbf, + (CASE + WHEN aa.inception_date - aa.issue_date >= '30' THEN + vv.vin + END) if30, + bb.ִ + FROM idst0.auto_agreement_t aa + LEFT JOIN bb + ON bb. = aa.policy_no + LEFT JOIN idst0.motorised_vehicle_t vv + ON vv.policy_no = aa.policy_no + LEFT JOIN idst0.auto_agreement_request_t t + ON t.policy_no = aa.policy_no + AND t.endorsement_no = '' + LEFT JOIN idst0.auto_premium_t pt + ON pt.policy_no = aa.policy_no + AND pt.endorsement_no = '' + WHERE aa.policy_no = vv.policy_no + AND aa.policy_status = '1' --and aa.product_code not in ('11022400','11023900','11024000','11024600','11026000') + AND aa.branch_company_code = '3080100' + AND (pt.premium_amount - nvl(pt.tax_amount, + 0)) > 100 + AND aa.inception_date >= to_date('2022-12-01 00:00:00', + 'yyyy-mm-dd hh24:mi:ss') + AND aa.inception_date < to_date('2023-11-01 00:00:00', + 'yyyy-mm-dd hh24:mi:ss') + AND aa.branch_company_code = vv.branch_company_code) cc + ON (cc.vin = v.vin AND cc.ִ = bb.ִ) + AND cc.inception_date > a.planned_end_date - 30 --ʱƷſΪ30 + LEFT JOIN dc_yangg_cx_dianxiaodoudi cd + ON cd.policy_no = a.policy_no + LEFT JOIN dc_tb_jc_c_tag dt + ON dt. = a.policy_no + LEFT JOIN idst0.auto_agreement_t aa + ON aa.policy_no = cc.policy_no + LEFT JOIN cc pt1 + ON pt1.policy_no = aa.policy_no + WHERE a.policy_status = '1' + AND a.planned_end_date - a.inception_date > 270 + AND a.planned_end_date >= to_date('2023-10-01 00:00:00', + 'yyyy-mm-dd hh24:mi:ss') + AND a.planned_end_date < to_date('2024-01-01 00:00:00', + 'yyyy-mm-dd hh24:mi:ss')) + + , + aa3 AS + (SELECT DISTINCT * + FROM aa1 + UNION ALL (SELECT DISTINCT * + FROM aa2)) + + , + AA AS + (SELECT AA3.*, + nvlzx.workerno, + et.telpartnercode) ϯ, + (CASE WHEN nvlzx.workerno, + et.telpartnercode) = + 'DX001' AND aa3. LIKE + '%%' THEN + 'ΰ' WHEN nvlzx.workerno, + et.telpartnercode) = + 'DX001' AND aa3. NOT LIKE + '%%' THEN + '' ELSE to_char + (ys.ϯ) END) ϯ, + YS.Ŷ ϯŶ FROM AA3 LEFT JOIN idst0.auto_agreement_extend_t et ON et.policy_no = AA3.ɱ LEFT JOIN idst0.t_sell_policy_autobase_t zx ON zx.policy_no = AA3.ɱ LEFT JOIN dc_YZH_ZXYS YS ON YS.ϯ = nvlzx.workerno, + et.telpartnercode)) + + , + yxb AS + ( + --- + SELECT aa.β , + aa., + aa., + aa.ϯŶ, + aa.ϯ, + aa.ϯ, + --(case when a.ʶ=''and A.β='ҵ' then 'ҵ' else A. end) , + (CASE + WHEN COUNT(1) IS NULL THEN + 0 + ELSE + COUNT(1) + END) ۼ + FROM aa + WHERE aa.ʹ IN ('ͥó', + 'ҵͳ') + AND aa.Ԥ IS NULL + AND aa.ܿ IS NULL + AND aa. IN '̹', 'ǿ' + AND aa.ʱ >= to_date(to_char(SYSDATE, + 'yyyy-mm') || '-01 00:00:00', + 'yyyy-mm-dd hh24:mi:ss') + AND aa.ʱ < to_date(to_char(SYSDATE - 1, + 'yyyy-mm-dd') || ' 23:59:59', + 'yyyy-mm-dd hh24:mi:ss') + AND aa.±ǩʱ <= to_date(to_char(SYSDATE - 1, + 'yyyy-mm-dd') || ' 23:59:59', + 'yyyy-mm-dd hh24:mi:ss') + GROUP BY aa.β, + aa., + aa., + aa.ϯŶ, + aa.ϯ, + aa.ϯ) + --=-ۼ/-ۼ + , + dqs AS + ( + --- + SELECT aa.β , + aa., + aa., + aa.ϯŶ, + aa.ϯ, + aa.ϯ, + (CASE + WHEN COUNT(1) IS NULL THEN + 0 + ELSE + COUNT(1) + END) + FROM aa + WHERE aa.ʹ IN ('ͥó', + 'ҵͳ') + AND aa.Ԥ IS NULL + AND aa.ܿ IS NULL + AND aa. IN '̹', 'ǿ' + AND aa.ʱ >= to_date(to_char(SYSDATE, + 'yyyy-mm') || '-01 00:00:00', + 'yyyy-mm-dd hh24:mi:ss') + AND aa.ʱ < to_date(to_char(SYSDATE - 1, + 'yyyy-mm-dd') || ' 23:59:59', + 'yyyy-mm-dd hh24:mi:ss') + GROUP BY aa.β, + aa., + aa., + aa.ϯŶ, + aa.ϯ, + aa.ϯ) + SELECT dqs., + dqs., + dqs., + dqs.ϯŶ, + dqs.ϯ, + dqs.ϯ, + yxb.ۼ, + dqs. + FROM yxb, + dqs --,sdqs,syxs,cyxs,cdqs + WHERE dqs. = yxb. + AND dqs. = yxb. + AND dqs. = yxb. + AND dqs.ϯ = yxb.ϯ + AND dqs.ϯ = yxb.ϯ; + COMMIT; + END; + + PROCEDURE chefei_daily_job IS + BEGIN + ǻ(SYSDATE - 3, + SYSDATE); + END; + + PROCEDURE xubao_daily_job IS + BEGIN + ; + END; + +BEGIN + NULL; +END telsale_pkg; +/ diff --git a/code/db/车非基础数据.sql b/code/db/车非基础数据.sql index 8a137b1..3ca206c 100644 --- a/code/db/车非基础数据.sql +++ b/code/db/车非基础数据.sql @@ -1,36 +1,50 @@ -INSERT INTO desktop_archievement_admin.ϯÿձ - WITH aa AS - (SELECT to_char(t.signature_date, - 'yyyy-mm-dd') ǩ, - (to_char(T.signature_date, - 'yyyy')) the_year, - (to_char(T.signature_date, - 'mm')) the_month, - t.policy_no bdh, - t.endorsement_no pdh, - qt.t_cre tid, - QT.B_CRE BTID, -----ֶ - e.inception_date qbsj, - e.planned_end_date zzsj, - pt.premium_amount - nvl(pt.tax_amount, - 0) bf - --,qt.qdbf - nvl(qt.qdbf_tax_amount,0) bf - , - nt.ecompensation_rate * (pt.premium_amount - nvl(pt.tax_amount, - 0)) fxbf, - z.department_name bm, - z.department_code bmdm, - CASE - WHEN (et.telpartnercode LIKE '%HC%' OR - zx.workerno IN (SELECT code - FROM datacenter.dc_lsj_zx_hc)) THEN - '׷ῥ' - ELSE - '' - END Ƿῥ, - nvl(zx.workerno, - et.telpartnercode) ϯ, - (CASE +--INSERT INTO desktop_archievement_admin.ϯÿձ +WITH aa AS + (SELECT to_char(t.signature_date, + 'yyyy-mm-dd') ǩ, + (to_char(T.signature_date, + 'yyyy')) the_year, + (to_char(T.signature_date, + 'mm')) the_month, + t.policy_no bdh, + t.endorsement_no pdh, + qt.t_cre tid, + QT.B_CRE BTID, -----ֶ + e.inception_date qbsj, + e.planned_end_date zzsj, + pt.premium_amount - nvl(pt.tax_amount, + 0) bf + --,qt.qdbf - nvl(qt.qdbf_tax_amount,0) bf + , + nt.ecompensation_rate * (pt.premium_amount - nvl(pt.tax_amount, + 0)) fxbf, + z.department_name bm, + z.department_code bmdm, + CASE + WHEN (et.telpartnercode LIKE '%HC%' OR zx.workerno IN (SELECT code + FROM datacenter.dc_lsj_zx_hc)) THEN + '׷ῥ' + ELSE + '' + END Ƿῥ, + nvl(zx.workerno, + et.telpartnercode) ϯ, + (CASE + WHEN nvl(zx.workerno, + et.telpartnercode) = 'DX001' AND + xx.staff_name LIKE '%%' THEN + 'ΰ' + WHEN nvl(zx.workerno, + et.telpartnercode) = 'DX001' AND + xx.staff_name NOT LIKE '%%' THEN + '' + ELSE + to_char(ys.ϯ) + END) ϯ, + YS.Ŷ ϯŶ, + nvl(YS.Ŷ, + y.section_office_name) N, + nvl((CASE WHEN nvl(zx.workerno, et.telpartnercode) = 'DX001' AND xx.staff_name LIKE '%%' THEN @@ -41,269 +55,256 @@ INSERT INTO desktop_archievement_admin. '' ELSE to_char(ys.ϯ) - END) ϯ, - YS.Ŷ ϯŶ, - nvl(YS.Ŷ, - y.section_office_name) N, - nvl((CASE - WHEN nvl(zx.workerno, - et.telpartnercode) = 'DX001' AND - xx.staff_name LIKE '%%' THEN - 'ΰ' - WHEN nvl(zx.workerno, - et.telpartnercode) = 'DX001' AND - xx.staff_name NOT LIKE '%%' THEN - '' - ELSE - to_char(ys.ϯ) - END), - xx.staff_name) N - FROM idst0.auto_agreement_request_t t - LEFT JOIN idst0.auto_agreement_t e - ON e.policy_no = t.policy_no - LEFT JOIN idst0.motorised_vehicle_t v - ON v.policy_no = e.policy_no - LEFT JOIN idst0.auto_premium_t pt - ON pt.policy_no = t.policy_no - AND pt.endorsement_no = t.endorsement_no - LEFT JOIN ywglxt.w_dxbd_i i - ON e.policy_no = i.bdh - LEFT JOIN idst0.rydm_t xx - ON xx.staff_code = nvl(i.zhjywy, - e.operator_code) - LEFT JOIN idst0.ks_t y - ON y.section_office_code = nvl(xx.section_office_code, - e.section_office_code) - LEFT JOIN idst0.bm_t z - ON z.department_code = nvl(xx.department_code, - e.department_code) - --left join datacenter.dc_cx_csteam ct on ct.jbrcode = xx.staff_code - LEFT JOIN idst0.auto_new_product_info_t nt - ON nt.policy_no = t.policy_no - AND nt.endorsement_no = t.endorsement_no - --left join ywglxt.q_auto_agreement_extend_t qe on qe.policy_no = e.policy_no - LEFT JOIN ywglxt.q_auto_agreement_t qt - ON qt.policy_no = e.policy_no - LEFT JOIN datacenter.dc_yangg_qdcode qd - ON qd.code = e.selling_channel_type - LEFT JOIN datacenter.dc_tb_jc_c_tag cl - ON cl. = e.policy_no - LEFT JOIN datacenter.dc_yangg_basecode_teams fg - ON fg.bm = z.department_name - AND fg.ks = y.section_office_name - --left join idst0.t_sell_policy_autobase_t zx on zx.policy_no=e.policy_no - --left join idst0.auto_agreement_extend_t et on et.policy_no = e.policy_no - LEFT JOIN idst0.auto_agreement_extend_t et - ON et.policy_no = e.policy_no - LEFT JOIN idst0.t_sell_policy_autobase_t zx - ON zx.policy_no = e.policy_no - LEFT JOIN datacenter.dc_YZH_ZXYS YS - ON YS.ϯ = nvl(zx.workerno, - et.telpartnercode) - --left join v_lsj_dimian dm on dm.vin=v.vin and e.selling_channel_type='25' and dm.MEMO like'%%' - --left join datacenter.dc_lsj_zx_team zt on zt.name=coalesce(zc.name,zc1.name,bc.name,dm.JBRMC) - WHERE t.signature_date >= to_date('2023-01-01 00:00:00', - 'yyyy-mm-dd hh24:mi:ss') - AND t.signature_date < to_date(to_char(SYSDATE - 1, - 'yyyy-mm-dd') || ' 23:59:59', - 'yyyy-mm-dd hh24:mi:ss') - --and t.endorsement_no = '' - AND e.policy_status = '1' --Ч - AND qt.tflag = '0' --Ϊ - AND qt.usage_xm = 'ͥó' - --ᳵĦг - --and e.policy_no in ('AXIMC90Y1419B038594J','AXIMC90CTP19B039593R','AXIMC04CTP19B013473X') - AND e.planned_end_date - e.inception_date >= 360 - -- - ) - -----ֶ - , - dd2 AS - (SELECT ǩ, - the_year, - the_month, - bm, - bmdm, - ϯ, - ϯ, - ϯŶ, - N, - N, - CASE - WHEN pdh = '' THEN - tid - END tid, - to_number('1') ͻ, - COUNT(DISTINCT CASE - WHEN pdh = '' THEN - bdh - END) , - SUM(bf) - FROM (SELECT DISTINCT * - FROM aa) aa - GROUP BY bm, - bmdm, - CASE - WHEN pdh = '' THEN - tid - END, - the_year, - the_month, - BTID, - ϯ, - ϯ, - ϯŶ, - ǩ, - N, - N - UNION - SELECT ǩ, - the_year, - the_month, - bm, - bmdm, - ϯ, - ϯ, - ϯŶ, - N, - N, - CASE - WHEN btid = tid THEN - '' - ELSE - btid - END btid, - to_number('0') ͻ, - to_number('0') , - to_number('0') - FROM (SELECT DISTINCT * - FROM aa) aa), - DD AS - (SELECT * - FROM DD2 - WHERE TID IS NOT NULL) - --select * from dd - , - bb AS - (SELECT DISTINCT q.policy_no bdh, - q.endorsement_no pdh, - qna.t_cre tid, - to_number(to_char(q.signature_date, - 'yyyy')) || '' nf, - (to_char(q.signature_date, - 'mm')) mm_f, - to_char(q.signature_date, - 'dd') || '' dd, - q.signature_date sj, - round((pt.premium_amount - nvl(pt.taxamount, - 0)) * c.rate / 100, - 2) bf, - z.department_name bm - FROM idst0.nonauto_agreement_request_t q - LEFT JOIN idst0.nonauto_agreement_t e - ON e.policy_no = q.policy_no - LEFT JOIN idst0.nonauto_premium_t pt - ON pt.endorsement_no = q.endorsement_no - AND pt.policy_no = q.policy_no - LEFT JOIN idst0.reinsurance_t r - ON r.reinsurance_policy_no = e.policy_no - LEFT JOIN idst0.exrate_month_t c - ON pt.currency_code = c.bzh - AND to_char(q.signature_date, - 'YYYY') = c.theyear - AND to_char(q.signature_date, - 'fmmm') = c.themonth - - LEFT JOIN idst0.rydm_t x - ON x.staff_code = e.operator_code - LEFT JOIN idst0.ks_t y - ON y.section_office_code = x.section_office_code - LEFT JOIN idst0.bm_t z - ON z.department_code = x.department_code - LEFT JOIN ywglxt.q_nonauto_agreement_t qna - ON qna.policy_no = q.policy_no - LEFT JOIN datacenter.dc_yangg_gkxzh gk - ON gk.product_code = e.product_code --ɢ - --left join datacenter.dc_yangg_zbxzh zb on zb.product_code = e.product_code -- - LEFT JOIN dd - ON dd.tid = qna.t_cre - WHERE qna.tflag = '0' - AND (CASE - WHEN q.endorsement_no != '' AND - round((pt.premium_amount - nvl(pt.taxamount, - 0)) * c.rate / 100, - 2) != 0 THEN - '' - END) IS NULL - --and q.endorsement_no = '' - AND e.policy_status = '1' - AND gk.product_code IS NOT NULL - AND (e.product_code LIKE '2%' OR e.product_code LIKE '1106%' --⽡ -- - OR e.product_code LIKE '1107%' OR e.product_code LIKE '1108%' OR e.product_code LIKE '1307%' OR e.product_code LIKE '1304A400%' --Ҳ - - ) - --and e.product_code not in ('22KC9800') - AND q.signature_date >= to_date('2023-01-01 00:00:00', - 'yyyy-mm-dd hh24:mi:ss') - AND q.signature_date < to_date(to_char(SYSDATE - 1, - 'yyyy-mm-dd') || ' 23:59:59', - 'yyyy-mm-dd hh24:mi:ss') - AND e.planned_end_date - e.inception_date >= 90 - AND dd.tid IS NOT NULL - --ո˿ͻ) - ) - --SELECT * FROM BB - , - cc AS - (SELECT mm_f, - tid ں֤, - COUNT(DISTINCT bdh) ںϱ, - SUM(bf) ںϱ - FROM bb - GROUP BY tid, - mm_f), - ff AS - (SELECT dd.*, - cc.* - FROM dd - LEFT JOIN cc - ON cc.ں֤ = dd.tid - AND cc.mm_f = dd.the_month) --OR cc.ں֤ = dd.btid - --select * from ff - SELECT to_date(ǩ, - 'yyyy-mm-dd') ǩ, - the_year , - the_month ·, - bm , - bmdm Ŵ, - N, - N, - ϯ, - ϯ, - ϯŶ, - nvl(SUM(), - 0) ո˿ͻ, - nvl(SUM(ںϱ), - 0) ںϱ - FROM ff - WHERE to_date(ff.ǩ, - 'yyyy-mm-dd') >= DATE '2023-01-01' - AND to_date(ff.ǩ, - 'yyyy-mm-dd') <= SYSDATE - AND bm IN ('ҵ', - '֧˾') - GROUP BY ǩ, - the_year, - the_month, - bm, - bmdm, - ϯ, - ϯ, - ϯŶ, - N, - N - ORDER BY , - ϯ; + END), + xx.staff_name) N + FROM idst0.auto_agreement_request_t t + LEFT JOIN idst0.auto_agreement_t e + ON e.policy_no = t.policy_no + LEFT JOIN idst0.motorised_vehicle_t v + ON v.policy_no = e.policy_no + LEFT JOIN idst0.auto_premium_t pt + ON pt.policy_no = t.policy_no + AND pt.endorsement_no = t.endorsement_no + LEFT JOIN ywglxt.w_dxbd_i i + ON e.policy_no = i.bdh + LEFT JOIN idst0.rydm_t xx + ON xx.staff_code = nvl(i.zhjywy, + e.operator_code) + LEFT JOIN idst0.ks_t y + ON y.section_office_code = nvl(xx.section_office_code, + e.section_office_code) + LEFT JOIN idst0.bm_t z + ON z.department_code = nvl(xx.department_code, + e.department_code) + --left join datacenter.dc_cx_csteam ct on ct.jbrcode = xx.staff_code + LEFT JOIN idst0.auto_new_product_info_t nt + ON nt.policy_no = t.policy_no + AND nt.endorsement_no = t.endorsement_no + --left join ywglxt.q_auto_agreement_extend_t qe on qe.policy_no = e.policy_no + LEFT JOIN ywglxt.q_auto_agreement_t qt + ON qt.policy_no = e.policy_no + LEFT JOIN datacenter.dc_yangg_qdcode qd + ON qd.code = e.selling_channel_type + LEFT JOIN datacenter.dc_tb_jc_c_tag cl + ON cl. = e.policy_no + LEFT JOIN datacenter.dc_yangg_basecode_teams fg + ON fg.bm = z.department_name + AND fg.ks = y.section_office_name + --left join idst0.t_sell_policy_autobase_t zx on zx.policy_no=e.policy_no + --left join idst0.auto_agreement_extend_t et on et.policy_no = e.policy_no + LEFT JOIN idst0.auto_agreement_extend_t et + ON et.policy_no = e.policy_no + LEFT JOIN idst0.t_sell_policy_autobase_t zx + ON zx.policy_no = e.policy_no + LEFT JOIN datacenter.dc_YZH_ZXYS YS + ON YS.ϯ = nvl(zx.workerno, + et.telpartnercode) + --left join v_lsj_dimian dm on dm.vin=v.vin and e.selling_channel_type='25' and dm.MEMO like'%%' + --left join datacenter.dc_lsj_zx_team zt on zt.name=coalesce(zc.name,zc1.name,bc.name,dm.JBRMC) + WHERE t.signature_date >= to_date('2023-01-01 00:00:00', + 'yyyy-mm-dd hh24:mi:ss') + AND t.signature_date < to_date(to_char(SYSDATE - 1, + 'yyyy-mm-dd') || ' 23:59:59', + 'yyyy-mm-dd hh24:mi:ss') + --and t.endorsement_no = '' + AND e.policy_status = '1' --Ч + AND qt.tflag = '0' --Ϊ + AND qt.usage_xm = 'ͥó' + --ᳵĦг + --and e.policy_no in ('AXIMC90Y1419B038594J','AXIMC90CTP19B039593R','AXIMC04CTP19B013473X') + AND e.planned_end_date - e.inception_date >= 360 + -- + ) +-----ֶ +, +dd2 AS + (SELECT ǩ, + the_year, + the_month, + bm, + bmdm, + ϯ, + ϯ, + ϯŶ, + N, + N, + CASE + WHEN pdh = '' THEN + tid + END tid, + to_number('1') ͻ, + COUNT(DISTINCT CASE + WHEN pdh = '' THEN + bdh + END) , + SUM(bf) + FROM (SELECT DISTINCT * + FROM aa) aa + GROUP BY bm, + bmdm, + CASE + WHEN pdh = '' THEN + tid + END, + the_year, + the_month, + BTID, + ϯ, + ϯ, + ϯŶ, + ǩ, + N, + N + UNION + SELECT ǩ, + the_year, + the_month, + bm, + bmdm, + ϯ, + ϯ, + ϯŶ, + N, + N, + CASE + WHEN btid = tid THEN + '' + ELSE + btid + END btid, + to_number('0') ͻ, + to_number('0') , + to_number('0') + FROM (SELECT DISTINCT * + FROM aa) aa), +DD AS + (SELECT * + FROM DD2 + WHERE TID IS NOT NULL) +--select * from dd +, +bb AS + (SELECT DISTINCT q.policy_no bdh, + q.endorsement_no pdh, + qna.t_cre tid, + to_number(to_char(q.signature_date, + 'yyyy')) || '' nf, + (to_char(q.signature_date, + 'mm')) mm_f, + to_char(q.signature_date, + 'dd') || '' dd, + q.signature_date sj, + round((pt.premium_amount - nvl(pt.taxamount, + 0)) * c.rate / 100, + 2) bf, + z.department_name bm + FROM idst0.nonauto_agreement_request_t q + LEFT JOIN idst0.nonauto_agreement_t e + ON e.policy_no = q.policy_no + LEFT JOIN idst0.nonauto_premium_t pt + ON pt.endorsement_no = q.endorsement_no + AND pt.policy_no = q.policy_no + LEFT JOIN idst0.reinsurance_t r + ON r.reinsurance_policy_no = e.policy_no + LEFT JOIN idst0.exrate_month_t c + ON pt.currency_code = c.bzh + AND to_char(q.signature_date, + 'YYYY') = c.theyear + AND to_char(q.signature_date, + 'fmmm') = c.themonth + + LEFT JOIN idst0.rydm_t x + ON x.staff_code = e.operator_code + LEFT JOIN idst0.ks_t y + ON y.section_office_code = x.section_office_code + LEFT JOIN idst0.bm_t z + ON z.department_code = x.department_code + LEFT JOIN ywglxt.q_nonauto_agreement_t qna + ON qna.policy_no = q.policy_no + LEFT JOIN datacenter.dc_yangg_gkxzh gk + ON gk.product_code = e.product_code --ɢ + --left join datacenter.dc_yangg_zbxzh zb on zb.product_code = e.product_code -- + LEFT JOIN dd + ON dd.tid = qna.t_cre + WHERE qna.tflag = '0' + AND (CASE + WHEN q.endorsement_no != '' AND + round((pt.premium_amount - nvl(pt.taxamount, + 0)) * c.rate / 100, + 2) != 0 THEN + '' + END) IS NULL + --and q.endorsement_no = '' + AND e.policy_status = '1' + AND gk.product_code IS NOT NULL + AND (e.product_code LIKE '2%' OR e.product_code LIKE '1106%' --⽡ -- + OR e.product_code LIKE '1107%' OR e.product_code LIKE '1108%' OR e.product_code LIKE '1307%' OR e.product_code LIKE '1304A400%' --Ҳ + + ) + --and e.product_code not in ('22KC9800') + AND q.signature_date >= to_date('2023-01-01 00:00:00', + 'yyyy-mm-dd hh24:mi:ss') + AND q.signature_date < to_date(to_char(SYSDATE - 1, + 'yyyy-mm-dd') || ' 23:59:59', + 'yyyy-mm-dd hh24:mi:ss') + AND e.planned_end_date - e.inception_date >= 90 + AND dd.tid IS NOT NULL + --ո˿ͻ) + ) +--SELECT * FROM BB +, +cc AS + (SELECT mm_f, + tid ں֤, + COUNT(DISTINCT bdh) ںϱ, + SUM(bf) ںϱ + FROM bb + GROUP BY tid, + mm_f), +ff AS + (SELECT dd.*, + cc.* + FROM dd + LEFT JOIN cc + ON cc.ں֤ = dd.tid + AND cc.mm_f = dd.the_month) --OR cc.ں֤ = dd.btid +--select * from ff +SELECT to_date(ǩ, + 'yyyy-mm-dd') ǩ, + the_year , + the_month ·, + bm , + bmdm Ŵ, + N, + N, + ϯ, + ϯ, + ϯŶ, + nvl(SUM(), + 0) ո˿ͻ, + nvl(SUM(ںϱ), + 0) ںϱ + FROM ff + WHERE to_date(ff.ǩ, + 'yyyy-mm-dd') >= DATE '2023-06-01' + AND to_date(ff.ǩ, + 'yyyy-mm-dd') < DATE '2023-07-01' + AND bm IN ('ҵ', + '֧˾') + GROUP BY ǩ, + the_year, + the_month, + bm, + bmdm, + ϯ, + ϯ, + ϯŶ, + N, + N + ORDER BY , + ϯ; +/* SELECT * FROM desktop_archievement_admin.ϯÿձ; + */ diff --git a/code/后端/desktop_archievement_backend/pom.xml b/code/后端/desktop_archievement_backend/pom.xml index d7a35d6..35b18a5 100644 --- a/code/后端/desktop_archievement_backend/pom.xml +++ b/code/后端/desktop_archievement_backend/pom.xml @@ -14,7 +14,7 @@ 17 17 5.3.24 - + @@ -86,8 +86,8 @@ jackson-annotations 2.13.4 - diff --git a/code/后端/desktop_archievement_backend/src/main/resources/StaffMapper.xml b/code/后端/desktop_archievement_backend/src/main/resources/StaffMapper.xml new file mode 100644 index 0000000..e21c614 --- /dev/null +++ b/code/后端/desktop_archievement_backend/src/main/resources/StaffMapper.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/code/后端/desktop_archievement_backend/src/main/resources/log4j2.xml b/code/后端/desktop_archievement_backend/src/main/resources/log4j2.xml index 143e348..6817bea 100644 --- a/code/后端/desktop_archievement_backend/src/main/resources/log4j2.xml +++ b/code/后端/desktop_archievement_backend/src/main/resources/log4j2.xml @@ -4,8 +4,8 @@ - + [%t][%level][%d{HH:mm:ss.SSS}][%logger.%M{36}#%L] %msg%n diff --git a/code/后端/desktop_archievement_backend/src/main/resources/mybatis-config.xml b/code/后端/desktop_archievement_backend/src/main/resources/mybatis-config.xml new file mode 100644 index 0000000..403d4e7 --- /dev/null +++ b/code/后端/desktop_archievement_backend/src/main/resources/mybatis-config.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/code/后端/desktop_archievement_backend/src/main/resources/mybatis/jdbc.properties b/code/后端/desktop_archievement_backend/src/main/resources/mybatis/jdbc.properties deleted file mode 100644 index fe5e4da..0000000 --- a/code/后端/desktop_archievement_backend/src/main/resources/mybatis/jdbc.properties +++ /dev/null @@ -1,4 +0,0 @@ -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 \ No newline at end of file diff --git a/code/后端/desktop_archievement_backend/src/main/resources/mybatis/mybatis.xml b/code/后端/desktop_archievement_backend/src/main/resources/mybatis/mybatis.xml deleted file mode 100644 index f6cbdfb..0000000 --- a/code/后端/desktop_archievement_backend/src/main/resources/mybatis/mybatis.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/code/后端/desktop_archievement_backend/src/test/java/com/cpic/xim/DesktopArchievement/test/DesktopArchievementTest.java b/code/后端/desktop_archievement_backend/src/test/java/com/cpic/xim/DesktopArchievement/test/DesktopArchievementTest.java index ca5ec32..c6fd69d 100644 --- a/code/后端/desktop_archievement_backend/src/test/java/com/cpic/xim/DesktopArchievement/test/DesktopArchievementTest.java +++ b/code/后端/desktop_archievement_backend/src/test/java/com/cpic/xim/DesktopArchievement/test/DesktopArchievementTest.java @@ -11,6 +11,7 @@ package com.cpic.xim.DesktopArchievement.test; import java.sql.SQLException; import org.junit.Test; +import static org.junit.Assert.assertNotNull; import com.cpic.xim.utils.archievement.DepartmentArchievement; import com.cpic.xim.utils.ranking.CallerRankingList; @@ -37,10 +38,11 @@ public class DesktopArchievementTest @Test public void testCallerRankingList() { + CallerRankingList rankingList = null; + try { - CallerRankingList rankingList = - CallerRankingList.getCallerRankingList( "QDI", "2023", "05" ); + rankingList = CallerRankingList.getCallerRankingList( "QDI", "2023", "06" ); } catch ( SQLException error ) { @@ -50,17 +52,7 @@ public class DesktopArchievementTest { error.printStackTrace(); } - } - @Test - public void testArray() - { - int[] num = - { 12, 3, 4, 5, 4, 45654,}; - - for ( int item : num ) - { - - } + assertNotNull( rankingList ); } } From a9b6e887334e7b2dcf41bac9c3d239f02da1b249 Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Thu, 27 Jul 2023 16:34:59 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=94=B9=E7=94=A8mybatis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mybatis/mapper/ArchievementMapper.java | 17 ++++ .../mybatis/pojo/MensualArchievementItem.java | 93 +++++++++++++++++++ .../src/main/resources/mybatis-config.xml | 19 ---- .../main/resources/mybatis/jdbc.properties | 4 + .../mybatis/mapper/ArchievementMapper.xml | 16 ++++ .../{ => mybatis/mapper}/StaffMapper.xml | 0 .../main/resources/mybatis/mybatis-config.xml | 27 ++++++ .../test/DesktopArchievementTest.java | 46 ++++++++- 8 files changed, 200 insertions(+), 22 deletions(-) create mode 100644 code/后端/desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/mapper/ArchievementMapper.java create mode 100644 code/后端/desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/MensualArchievementItem.java delete mode 100644 code/后端/desktop_archievement_backend/src/main/resources/mybatis-config.xml create mode 100644 code/后端/desktop_archievement_backend/src/main/resources/mybatis/jdbc.properties create mode 100644 code/后端/desktop_archievement_backend/src/main/resources/mybatis/mapper/ArchievementMapper.xml rename code/后端/desktop_archievement_backend/src/main/resources/{ => mybatis/mapper}/StaffMapper.xml (100%) create mode 100644 code/后端/desktop_archievement_backend/src/main/resources/mybatis/mybatis-config.xml diff --git a/code/后端/desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/mapper/ArchievementMapper.java b/code/后端/desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/mapper/ArchievementMapper.java new file mode 100644 index 0000000..286a78f --- /dev/null +++ b/code/后端/desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/mapper/ArchievementMapper.java @@ -0,0 +1,17 @@ +/* + * @Author: Kane + * @Date: 2023-07-27 11:05:53 + * @LastEditors: Kane + * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/mapper/ArchivementMapper.java + * @Description: + * + * Copyright (c) ${2022} by Kane, All Rights Reserved. + */ +package com.cpic.xim.mybatis.mapper; + +import java.util.HashMap; + +public interface ArchievementMapper +{ + public void getDepartmentArchievement(HashMap params); +} \ No newline at end of file diff --git a/code/后端/desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/MensualArchievementItem.java b/code/后端/desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/MensualArchievementItem.java new file mode 100644 index 0000000..8e2e344 --- /dev/null +++ b/code/后端/desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/MensualArchievementItem.java @@ -0,0 +1,93 @@ +/* + * @Author: Kane + * @Date: 2023-07-27 11:12:19 + * @LastEditors: Kane + * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/MensualArchievementItem.java + * @Description: 每月业绩对象。 + * + * Copyright (c) ${2022} by Kane, All Rights Reserved. + */ +package com.cpic.xim.mybatis.pojo; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class MensualArchievementItem +{ + public MensualArchievementItem() + {} + + public MensualArchievementItem( String month, String premium) + { + this.month = month; + this.premium = premium; + } + + public String getMonth() + { + return month; + } + + public void setMonth( String month ) + { + this.month = month; + } + + public String getPremium() + { + return premium; + } + + public void setPremium( String premium ) + { + this.premium = premium; + } + + @Override + public String toString() + { + return "MensualArchievementItem [month=" + month + ", premium=" + premium + "]"; + } + + @Override + public int hashCode() + { + final int prime = 31; + int result = 1; + result = prime * result + ((month == null) ? 0 : month.hashCode()); + result = prime * result + ((premium == null) ? 0 : premium.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; + MensualArchievementItem other = (MensualArchievementItem) obj; + if ( month == null ) + { + if ( other.month != null ) + return false; + } else if ( !month.equals( other.month ) ) + return false; + if ( premium == null ) + { + if ( other.premium != null ) + return false; + } else if ( !premium.equals( other.premium ) ) + return false; + return true; + } + + // 月份 + @JsonProperty( "month" ) + private String month; + + // 月总保费 + @JsonProperty( "premium" ) + private String premium; +} diff --git a/code/后端/desktop_archievement_backend/src/main/resources/mybatis-config.xml b/code/后端/desktop_archievement_backend/src/main/resources/mybatis-config.xml deleted file mode 100644 index 403d4e7..0000000 --- a/code/后端/desktop_archievement_backend/src/main/resources/mybatis-config.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/code/后端/desktop_archievement_backend/src/main/resources/mybatis/jdbc.properties b/code/后端/desktop_archievement_backend/src/main/resources/mybatis/jdbc.properties new file mode 100644 index 0000000..fe5e4da --- /dev/null +++ b/code/后端/desktop_archievement_backend/src/main/resources/mybatis/jdbc.properties @@ -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 \ No newline at end of file diff --git a/code/后端/desktop_archievement_backend/src/main/resources/mybatis/mapper/ArchievementMapper.xml b/code/后端/desktop_archievement_backend/src/main/resources/mybatis/mapper/ArchievementMapper.xml new file mode 100644 index 0000000..c16ad05 --- /dev/null +++ b/code/后端/desktop_archievement_backend/src/main/resources/mybatis/mapper/ArchievementMapper.xml @@ -0,0 +1,16 @@ + + + + + + + + + \ No newline at end of file diff --git a/code/后端/desktop_archievement_backend/src/main/resources/StaffMapper.xml b/code/后端/desktop_archievement_backend/src/main/resources/mybatis/mapper/StaffMapper.xml similarity index 100% rename from code/后端/desktop_archievement_backend/src/main/resources/StaffMapper.xml rename to code/后端/desktop_archievement_backend/src/main/resources/mybatis/mapper/StaffMapper.xml diff --git a/code/后端/desktop_archievement_backend/src/main/resources/mybatis/mybatis-config.xml b/code/后端/desktop_archievement_backend/src/main/resources/mybatis/mybatis-config.xml new file mode 100644 index 0000000..5794368 --- /dev/null +++ b/code/后端/desktop_archievement_backend/src/main/resources/mybatis/mybatis-config.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/code/后端/desktop_archievement_backend/src/test/java/com/cpic/xim/DesktopArchievement/test/DesktopArchievementTest.java b/code/后端/desktop_archievement_backend/src/test/java/com/cpic/xim/DesktopArchievement/test/DesktopArchievementTest.java index c6fd69d..25cdbc5 100644 --- a/code/后端/desktop_archievement_backend/src/test/java/com/cpic/xim/DesktopArchievement/test/DesktopArchievementTest.java +++ b/code/后端/desktop_archievement_backend/src/test/java/com/cpic/xim/DesktopArchievement/test/DesktopArchievementTest.java @@ -9,15 +9,28 @@ */ package com.cpic.xim.DesktopArchievement.test; -import java.sql.SQLException; -import org.junit.Test; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import java.io.IOException; +import java.io.InputStream; +import java.sql.SQLException; +import java.util.HashMap; +import org.apache.ibatis.io.Resources; +import org.apache.ibatis.session.SqlSession; +import org.apache.ibatis.session.SqlSessionFactory; +import org.apache.ibatis.session.SqlSessionFactoryBuilder; +import org.junit.Test; +import com.cpic.xim.mybatis.mapper.ArchievementMapper; import com.cpic.xim.utils.archievement.DepartmentArchievement; import com.cpic.xim.utils.ranking.CallerRankingList; + + @SuppressWarnings( "all" ) public class DesktopArchievementTest { + private static String configFilePath = "mybatis/mybatis-config.xml"; + @Test public void testQueryArchievement() { @@ -39,7 +52,7 @@ public class DesktopArchievementTest public void testCallerRankingList() { CallerRankingList rankingList = null; - + try { rankingList = CallerRankingList.getCallerRankingList( "QDI", "2023", "06" ); @@ -55,4 +68,31 @@ public class DesktopArchievementTest assertNotNull( rankingList ); } + + @Test + public void testDepartmentArchievement() + { + try + { + InputStream configFile = Resources.getResourceAsStream( configFilePath ); + SqlSessionFactoryBuilder builder = new SqlSessionFactoryBuilder(); + SqlSessionFactory factory = builder.build( configFile ); + SqlSession session = factory.openSession(); + + ArchievementMapper mapper = session.getMapper( ArchievementMapper.class ); + + HashMap params = new HashMap<>(); + params.put("a_department_code", "QDI"); + + mapper.getDepartmentArchievement( params ); + + System.out.println(params.toString()); + + assertTrue( params.size() > 1 ); + } + catch (IOException error ) + { + assert( false ); + } + } } From ff487c3fb657217ff0f14982c9f71b0e62690e4f Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Thu, 27 Jul 2023 18:07:31 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E8=BF=9B=E5=BA=A6?= =?UTF-8?q?=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cpic/xim/mybatis/utils/MybatisUtils.java | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 code/后端/desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/utils/MybatisUtils.java diff --git a/code/后端/desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/utils/MybatisUtils.java b/code/后端/desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/utils/MybatisUtils.java new file mode 100644 index 0000000..18866cc --- /dev/null +++ b/code/后端/desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/utils/MybatisUtils.java @@ -0,0 +1,52 @@ +/* + * @Author: Kane + * @Date: 2023-07-27 17:22:55 + * @LastEditors: Kane + * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/utils/MybatisUtils.java + * @Description: mybatis的工具集合 + * + * Copyright (c) ${2022} by Kane, All Rights Reserved. + */ +package com.cpic.xim.mybatis.utils; + +import java.io.IOException; +import java.io.InputStream; +import java.util.HashMap; +import org.apache.ibatis.io.Resources; +import org.apache.ibatis.session.SqlSession; +import org.apache.ibatis.session.SqlSessionFactory; +import org.apache.ibatis.session.SqlSessionFactoryBuilder; + +public class MybatisUtils +{ + private static HashMap SessionMap = new HashMap<>(); + + /** + * + * @param configFile + * @return + * @throws IOException + */ + public static SqlSession getSqlSession(String configFile ) + throws IOException + { + // 根据配置文件的路径,查找是否已经创建了对应的session + SqlSession session = SessionMap.get(configFile); + + // 找到就直接返回 + if ( session != null ) + { + return session; + } + + // 没找到就创建一个 + InputStream configIS = Resources.getResourceAsStream(configFile); + SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(configIS); + session = factory.openSession(); + + // 保存 + SessionMap.put(configFile, session); + + return session; + } +} \ No newline at end of file