Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
attendance-performance-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
attendance-performance-platform
Commits
8cdf50c4
Commit
8cdf50c4
authored
Jun 09, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改用户同步逻辑
parent
1239f3fd
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
285 additions
and
328 deletions
+285
-328
attendance-performance-manager-ui/admin/src/views/system/menu/list.vue
...rformance-manager-ui/admin/src/views/system/menu/list.vue
+0
-2
attendance-performance-manager-ui/admin/yarn.lock
attendance-performance-manager-ui/admin/yarn.lock
+69
-81
attendance-performance-manager/src/main/java/com/mortals/xhx/base/framework/aspect/WebLogAspect.java
...a/com/mortals/xhx/base/framework/aspect/WebLogAspect.java
+2
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/daemon/task/SyncDoorsEventTaskImpl.java
...a/com/mortals/xhx/daemon/task/SyncDoorsEventTaskImpl.java
+1
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/daemon/task/SyncUserTaskImpl.java
...in/java/com/mortals/xhx/daemon/task/SyncUserTaskImpl.java
+178
-223
attendance-performance-manager/src/main/java/com/mortals/xhx/module/job/web/JobController.java
...in/java/com/mortals/xhx/module/job/web/JobController.java
+3
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/dao/StaffDao.java
.../main/java/com/mortals/xhx/module/staff/dao/StaffDao.java
+1
-4
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/dao/ibatis/StaffDaoImpl.java
...com/mortals/xhx/module/staff/dao/ibatis/StaffDaoImpl.java
+0
-5
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/service/StaffService.java
...va/com/mortals/xhx/module/staff/service/StaffService.java
+0
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/service/impl/StaffServiceImpl.java
...rtals/xhx/module/staff/service/impl/StaffServiceImpl.java
+0
-6
attendance-performance-manager/src/main/resources/sqlmap/module/staff/StaffMapperExt.xml
...src/main/resources/sqlmap/module/staff/StaffMapperExt.xml
+31
-0
No files found.
attendance-performance-manager-ui/admin/src/views/system/menu/list.vue
View file @
8cdf50c4
...
...
@@ -165,7 +165,6 @@ export default {
width
:
100
,
formatter
:
row
=>
{
return
(
<
div
>
<
el
-
switch
value
=
{
row
.
status
+
""
}
active
-
color
=
"
#13ce66
"
...
...
@@ -177,7 +176,6 @@ export default {
}}
>
<
/el-switch
>
<
/div
>
);
}
...
...
attendance-performance-manager-ui/admin/yarn.lock
View file @
8cdf50c4
...
...
@@ -1093,10 +1093,10 @@
"resolved" "https://registry.nlark.com/@types/q/download/@types/q-1.5.5.tgz"
"version" "1.5.5"
"@vue/babel-helper-vue-jsx-merge-props@^1.
2.1
":
"integrity" "sha
1-MWJKelBfsU2h1YAjclpMXycOaoE
="
"resolved" "https://registry.n
lark.com/@vue/babel-helper-vue-jsx-merge-props/download/@vue/babel-helper-vue-jsx-merge-props-1.2.1
.tgz"
"version" "1.
2.1
"
"@vue/babel-helper-vue-jsx-merge-props@^1.
4.0
":
"integrity" "sha
512-JkqXfCkUDp4PIlFdDQ0TdXoIejMtTHP67/pvxlgeY+u5k3LEdKuWZ3LK6xkxo52uDoABIVyRwqVkfLQJhk7VBA=
="
"resolved" "https://registry.n
pmmirror.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.4.0
.tgz"
"version" "1.
4.0
"
"@vue/babel-helper-vue-transform-on@^1.0.2":
"integrity" "sha1-m5xpHNBvyFUiGiR1w8yDHXdLx9w="
...
...
@@ -1118,14 +1118,14 @@
"html-tags" "^3.1.0"
"svg-tags" "^1.0.0"
"@vue/babel-plugin-transform-vue-jsx@^1.
2.1
":
"integrity" "sha
1-ZGBGxlLC8CQnJ/NFGdkXsGQEHtc
="
"resolved" "https://registry.n
lark.com/@vue/babel-plugin-transform-vue-jsx/download/@vue/babel-plugin-transform-vue-jsx-1.2.1
.tgz"
"version" "1.
2.1
"
"@vue/babel-plugin-transform-vue-jsx@^1.
4.0
":
"integrity" "sha
512-Fmastxw4MMx0vlgLS4XBX0XiBbUFzoMGeVXuMV08wyOfXdikAFqBTuYPR0tlk+XskL19EzHc39SgjrPGY23JnA=
="
"resolved" "https://registry.n
pmmirror.com/@vue/babel-plugin-transform-vue-jsx/-/babel-plugin-transform-vue-jsx-1.4.0
.tgz"
"version" "1.
4.0
"
dependencies:
"@babel/helper-module-imports" "^7.0.0"
"@babel/plugin-syntax-jsx" "^7.2.0"
"@vue/babel-helper-vue-jsx-merge-props" "^1.
2.1
"
"@vue/babel-helper-vue-jsx-merge-props" "^1.
4.0
"
"html-tags" "^2.0.0"
"lodash.kebabcase" "^4.1.1"
"svg-tags" "^1.0.0"
...
...
@@ -1153,66 +1153,66 @@
"semver" "^6.1.0"
"@vue/babel-preset-jsx@^1.2.4":
"integrity" "sha
1-kv6nnbbxOwHoDToAmeKSS9y+Toc
="
"resolved" "https://registry.n
lark.com/@vue/babel-preset-jsx/download/@vue/babel-preset-jsx-1.2.4
.tgz"
"version" "1.
2.4
"
"integrity" "sha
512-QmfRpssBOPZWL5xw7fOuHNifCQcNQC1PrOo/4fu6xlhlKJJKSA3HqX92Nvgyx8fqHZTUGMPHmFA+IDqwXlqkSA=
="
"resolved" "https://registry.n
pmmirror.com/@vue/babel-preset-jsx/-/babel-preset-jsx-1.4.0
.tgz"
"version" "1.
4.0
"
dependencies:
"@vue/babel-helper-vue-jsx-merge-props" "^1.
2.1
"
"@vue/babel-plugin-transform-vue-jsx" "^1.
2.1
"
"@vue/babel-sugar-composition-api-inject-h" "^1.
2.1
"
"@vue/babel-sugar-composition-api-render-instance" "^1.
2.4
"
"@vue/babel-sugar-functional-vue" "^1.
2.2
"
"@vue/babel-sugar-inject-h" "^1.
2.2
"
"@vue/babel-sugar-v-model" "^1.
2.3
"
"@vue/babel-sugar-v-on" "^1.
2.3
"
"@vue/babel-sugar-composition-api-inject-h@^1.
2.1
":
"integrity" "sha
1-BdbgxDJxDjdYKyvppgSbaJtvA+s
="
"resolved" "https://registry.n
lark.com/@vue/babel-sugar-composition-api-inject-h/download/@vue/babel-sugar-composition-api-inject-h-1.2.1
.tgz"
"version" "1.
2.1
"
"@vue/babel-helper-vue-jsx-merge-props" "^1.
4.0
"
"@vue/babel-plugin-transform-vue-jsx" "^1.
4.0
"
"@vue/babel-sugar-composition-api-inject-h" "^1.
4.0
"
"@vue/babel-sugar-composition-api-render-instance" "^1.
4.0
"
"@vue/babel-sugar-functional-vue" "^1.
4.0
"
"@vue/babel-sugar-inject-h" "^1.
4.0
"
"@vue/babel-sugar-v-model" "^1.
4.0
"
"@vue/babel-sugar-v-on" "^1.
4.0
"
"@vue/babel-sugar-composition-api-inject-h@^1.
4.0
":
"integrity" "sha
512-VQq6zEddJHctnG4w3TfmlVp5FzDavUSut/DwR0xVoe/mJKXyMcsIibL42wPntozITEoY90aBV0/1d2KjxHU52g=
="
"resolved" "https://registry.n
pmmirror.com/@vue/babel-sugar-composition-api-inject-h/-/babel-sugar-composition-api-inject-h-1.4.0
.tgz"
"version" "1.
4.0
"
dependencies:
"@babel/plugin-syntax-jsx" "^7.2.0"
"@vue/babel-sugar-composition-api-render-instance@^1.
2.4
":
"integrity" "sha
1-5MvGmXw0T6wnF4WteikyXFHWjRk
="
"resolved" "https://registry.n
lark.com/@vue/babel-sugar-composition-api-render-instance/download/@vue/babel-sugar-composition-api-render-instance-1.2.4
.tgz"
"version" "1.
2.4
"
"@vue/babel-sugar-composition-api-render-instance@^1.
4.0
":
"integrity" "sha
512-6ZDAzcxvy7VcnCjNdHJ59mwK02ZFuP5CnucloidqlZwVQv5CQLijc3lGpR7MD3TWFi78J7+a8J56YxbCtHgT9Q=
="
"resolved" "https://registry.n
pmmirror.com/@vue/babel-sugar-composition-api-render-instance/-/babel-sugar-composition-api-render-instance-1.4.0
.tgz"
"version" "1.
4.0
"
dependencies:
"@babel/plugin-syntax-jsx" "^7.2.0"
"@vue/babel-sugar-functional-vue@^1.
2.2
":
"integrity" "sha
1-JnqayNeHyW7b8Dzj85LEnam9Jlg
="
"resolved" "https://registry.n
lark.com/@vue/babel-sugar-functional-vue/download/@vue/babel-sugar-functional-vue-1.2.2
.tgz"
"version" "1.
2.2
"
"@vue/babel-sugar-functional-vue@^1.
4.0
":
"integrity" "sha
512-lTEB4WUFNzYt2In6JsoF9sAYVTo84wC4e+PoZWSgM6FUtqRJz7wMylaEhSRgG71YF+wfLD6cc9nqVeXN2rwBvw=
="
"resolved" "https://registry.n
pmmirror.com/@vue/babel-sugar-functional-vue/-/babel-sugar-functional-vue-1.4.0
.tgz"
"version" "1.
4.0
"
dependencies:
"@babel/plugin-syntax-jsx" "^7.2.0"
"@vue/babel-sugar-inject-h@^1.
2.2
":
"integrity" "sha
1-1zjTyJM2fshJHcu2abAAkZKT46o
="
"resolved" "https://registry.n
lark.com/@vue/babel-sugar-inject-h/download/@vue/babel-sugar-inject-h-1.2.2
.tgz"
"version" "1.
2.2
"
"@vue/babel-sugar-inject-h@^1.
4.0
":
"integrity" "sha
512-muwWrPKli77uO2fFM7eA3G1lAGnERuSz2NgAxuOLzrsTlQl8W4G+wwbM4nB6iewlKbwKRae3nL03UaF5ffAPMA=
="
"resolved" "https://registry.n
pmmirror.com/@vue/babel-sugar-inject-h/-/babel-sugar-inject-h-1.4.0
.tgz"
"version" "1.
4.0
"
dependencies:
"@babel/plugin-syntax-jsx" "^7.2.0"
"@vue/babel-sugar-v-model@^1.
2.3
":
"integrity" "sha
1-+h8pulHr8KoabDX6ZtU5vEWaGPI
="
"resolved" "https://registry.n
lark.com/@vue/babel-sugar-v-model/download/@vue/babel-sugar-v-model-1.2.3
.tgz"
"version" "1.
2.3
"
"@vue/babel-sugar-v-model@^1.
4.0
":
"integrity" "sha
512-0t4HGgXb7WHYLBciZzN5s0Hzqan4Ue+p/3FdQdcaHAb7s5D9WZFGoSxEZHrR1TFVZlAPu1bejTKGeAzaaG3NCQ=
="
"resolved" "https://registry.n
pmmirror.com/@vue/babel-sugar-v-model/-/babel-sugar-v-model-1.4.0
.tgz"
"version" "1.
4.0
"
dependencies:
"@babel/plugin-syntax-jsx" "^7.2.0"
"@vue/babel-helper-vue-jsx-merge-props" "^1.
2.1
"
"@vue/babel-plugin-transform-vue-jsx" "^1.
2.1
"
"@vue/babel-helper-vue-jsx-merge-props" "^1.
4.0
"
"@vue/babel-plugin-transform-vue-jsx" "^1.
4.0
"
"camelcase" "^5.0.0"
"html-tags" "^2.0.0"
"svg-tags" "^1.0.0"
"@vue/babel-sugar-v-on@^1.
2.3
":
"integrity" "sha
1-NCNnF4WGpp85LwS/ujICHQKROto
="
"resolved" "https://registry.n
lark.com/@vue/babel-sugar-v-on/download/@vue/babel-sugar-v-on-1.2.3
.tgz"
"version" "1.
2.3
"
"@vue/babel-sugar-v-on@^1.
4.0
":
"integrity" "sha
512-m+zud4wKLzSKgQrWwhqRObWzmTuyzl6vOP7024lrpeJM4x2UhQtRDLgYjXAw9xBXjCwS0pP9kXjg91F9ZNo9JA=
="
"resolved" "https://registry.n
pmmirror.com/@vue/babel-sugar-v-on/-/babel-sugar-v-on-1.4.0
.tgz"
"version" "1.
4.0
"
dependencies:
"@babel/plugin-syntax-jsx" "^7.2.0"
"@vue/babel-plugin-transform-vue-jsx" "^1.
2.1
"
"@vue/babel-plugin-transform-vue-jsx" "^1.
4.0
"
"camelcase" "^5.0.0"
"@vue/cli-overlay@^4.4.6":
...
...
@@ -1868,8 +1868,8 @@
"resolve" "^1.12.0"
"babel-helper-vue-jsx-merge-props@^2.0.0", "babel-helper-vue-jsx-merge-props@^2.0.3":
"integrity" "sha
1-Iq69OzOQIyjlEyk6jkmSs4T58bY
="
"resolved" "https://registry.n
lark.com/babel-helper-vue-jsx-merge-props/download
/babel-helper-vue-jsx-merge-props-2.0.3.tgz"
"integrity" "sha
512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg=
="
"resolved" "https://registry.n
pmmirror.com/babel-helper-vue-jsx-merge-props/-
/babel-helper-vue-jsx-merge-props-2.0.3.tgz"
"version" "2.0.3"
"babel-loader@^8.1.0":
...
...
@@ -1889,6 +1889,15 @@
dependencies:
"object.assign" "^4.1.0"
"babel-plugin-jsx-v-model@^2.0.3":
"integrity" "sha512-SIx3Y3XxwGEz56Q1atwr5GaZsxJ2IRYmn5dl38LFkaTAvjnbNQxsZHO+ylJPsd+Hmv+ixJBYYFEekPBTHwiGfQ=="
"resolved" "https://registry.npmmirror.com/babel-plugin-jsx-v-model/-/babel-plugin-jsx-v-model-2.0.3.tgz"
"version" "2.0.3"
dependencies:
"babel-plugin-syntax-jsx" "^6.18.0"
"html-tags" "^2.0.0"
"svg-tags" "^1.0.0"
"babel-plugin-polyfill-corejs2@^0.2.2":
"integrity" "sha1-6RJHheb9lPlLYYp5VOVpMFO/Uyc="
"resolved" "https://registry.nlark.com/babel-plugin-polyfill-corejs2/download/babel-plugin-polyfill-corejs2-0.2.2.tgz?cache=0&sync_timestamp=1622024057197&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fbabel-plugin-polyfill-corejs2%2Fdownload%2Fbabel-plugin-polyfill-corejs2-0.2.2.tgz"
...
...
@@ -1913,6 +1922,11 @@
dependencies:
"@babel/helper-define-polyfill-provider" "^0.2.2"
"babel-plugin-syntax-jsx@^6.18.0":
"integrity" "sha512-qrPaCSo9c8RHNRHIotaufGbuOBN8rtdC4QrrFFc43vyWCCz7Kl7GL1PGaXtMGQZUXrkCjNEgxDfmAuAabr/rlw=="
"resolved" "https://registry.npmmirror.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz"
"version" "6.18.0"
"babel-runtime@6.x":
"integrity" "sha1-llxwWGaOgrVde/4E/yM3vItWR/4="
"resolved" "https://registry.nlark.com/babel-runtime/download/babel-runtime-6.26.0.tgz?cache=0&sync_timestamp=1618911095190&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fbabel-runtime%2Fdownload%2Fbabel-runtime-6.26.0.tgz"
...
...
@@ -2027,11 +2041,6 @@
"raw-body" "2.4.0"
"type-is" "~1.6.17"
"body-scroll-lock@^2.6.1":
"integrity" "sha512-hS53SQ8RhM0e4DsQ3PKz6Gr2O7Kpdh59TWU98GHjaQznL7y4dFycEPk7pFQAikqBaUSCArkc5E3pe7CWIt2fZA=="
"resolved" "https://registry.npmmirror.com/body-scroll-lock/-/body-scroll-lock-2.7.1.tgz"
"version" "2.7.1"
"bonjour@^3.5.0":
"integrity" "sha1-jokKGD2O6aI5OzhExpGkK897yfU="
"resolved" "https://registry.nlark.com/bonjour/download/bonjour-3.5.0.tgz"
...
...
@@ -3229,11 +3238,6 @@
dependencies:
"assert-plus" "^1.0.0"
"dayjs@^1.8.2":
"integrity" "sha512-xxwlswWOlGhzgQ4TKzASQkUhqERI3egRNqgV4ScR8wlANA/A9tZ7miXa44vTTKEq5l7vWoL5G57bG3zA+Kow0A=="
"resolved" "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.3.tgz"
"version" "1.11.3"
"de-indent@^1.0.2":
"integrity" "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0="
"resolved" "https://registry.nlark.com/de-indent/download/de-indent-1.0.2.tgz"
...
...
@@ -4838,8 +4842,8 @@
"uglify-js" "3.4.x"
"html-tags@^2.0.0":
"integrity" "sha
1-ELMKOGCF9Dzt41PMj6fLDe7qZos
="
"resolved" "https://registry.n
lark.com/html-tags/download
/html-tags-2.0.0.tgz"
"integrity" "sha
512-+Il6N8cCo2wB/Vd3gqy/8TZhTD3QvcVeQLCnZiGkGCH3JP28IgGAY41giccp2W4R3jfyJPAP318FQTa1yU7K7g=
="
"resolved" "https://registry.n
pmmirror.com/html-tags/-
/html-tags-2.0.0.tgz"
"version" "2.0.0"
"html-tags@^3.1.0":
...
...
@@ -5674,11 +5678,6 @@
"resolved" "https://registry.npmmirror.com/jwt-decode/-/jwt-decode-3.1.2.tgz"
"version" "3.1.2"
"keycode@^2.1.9":
"integrity" "sha512-Rdgz9Hl9Iv4QKi8b0OlCRQEzp4AgVxyCtz5S/+VIHezDmrDhkp2N2TqBWOLz0/gbeREXOOiI9/4b8BY9uw2vFg=="
"resolved" "https://registry.npmmirror.com/keycode/-/keycode-2.2.1.tgz"
"version" "2.2.1"
"killable@^1.0.1":
"integrity" "sha1-TIzkQRh6Bhx0dPuHygjipjgZSJI="
"resolved" "https://registry.nlark.com/killable/download/killable-1.0.1.tgz"
...
...
@@ -5863,8 +5862,8 @@
"version" "4.6.1"
"lodash.kebabcase@^4.1.1":
"integrity" "sha
1-hImxyw0p/4gZXM7KRI/21swpXDY
="
"resolved" "https://registry.n
lark.com/lodash.kebabcase/download
/lodash.kebabcase-4.1.1.tgz"
"integrity" "sha
512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g=
="
"resolved" "https://registry.n
pmmirror.com/lodash.kebabcase/-
/lodash.kebabcase-4.1.1.tgz"
"version" "4.1.1"
"lodash.mapvalues@^4.6.0":
...
...
@@ -6330,17 +6329,6 @@
"dns-packet" "^1.3.1"
"thunky" "^1.0.2"
"muse-ui@^3.0.2":
"integrity" "sha512-oIH8wEKQqXA6xbb3HzprxC2xoF7P8G01uvF+Jhs6VtbxQjO7VVkKKFu2Mb2NmhX3mMU2EBCgE8wlTU29ffjkPA=="
"resolved" "https://registry.npmmirror.com/muse-ui/-/muse-ui-3.0.2.tgz"
"version" "3.0.2"
dependencies:
"body-scroll-lock" "^2.6.1"
"dayjs" "^1.8.2"
"keycode" "^2.1.9"
"normalize-wheel" "^1.0.1"
"resize-observer-polyfill" "^1.5.0"
"mute-stream@0.0.8":
"integrity" "sha1-FjDEKyJR/4HiooPelqVJfqkuXg0="
"resolved" "https://registry.nlark.com/mute-stream/download/mute-stream-0.0.8.tgz"
...
...
@@ -9532,7 +9520,7 @@
"resolved" "https://registry.nlark.com/vue-template-es2015-compiler/download/vue-template-es2015-compiler-1.9.1.tgz"
"version" "1.9.1"
"vue@
^2 || ^3.0.0-0", "vue@^2.0.0", "vue@^2.2.0", "vue@^2.5
.0", "vue@^2.5.17", "vue@^2.5.4", "vue@^2.6.0", "vue@^2.6.14", "vue@>2.0.0":
"vue@
*", "vue@^2 || ^3.0.0-0", "vue@^2.0.0", "vue@^2.2
.0", "vue@^2.5.17", "vue@^2.5.4", "vue@^2.6.0", "vue@^2.6.14", "vue@>2.0.0":
"integrity" "sha1-5RqlJQJQ1Wmj+606ilpofWA24jU="
"resolved" "https://registry.nlark.com/vue/download/vue-2.6.14.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fvue%2Fdownload%2Fvue-2.6.14.tgz"
"version" "2.6.14"
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/base/framework/aspect/WebLogAspect.java
View file @
8cdf50c4
...
...
@@ -30,8 +30,8 @@ import java.util.Map;
* @author: zxfei
* @date: 2022/4/20 9:24
*/
@Aspect
@Component
//
@Aspect
//
@Component
@Slf4j
@Order
(
1
)
@Profile
({
"default"
,
"develop"
,
"test1"
})
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/daemon/task/SyncDoorsEventTaskImpl.java
View file @
8cdf50c4
...
...
@@ -138,7 +138,7 @@ public class SyncDoorsEventTaskImpl implements ITaskExcuteService {
log
.
info
(
"attRecords size:{}"
,
attRecords
.
size
());
List
<
String
>
eventIds
=
attRecords
.
parallelStream
().
map
(
i
->
i
.
getRemark
()).
collect
(
Collectors
.
toList
());
List
<
String
>
eventIds
=
attRecords
.
parallelStream
().
filter
(
f
->!
ObjectUtils
.
isEmpty
(
f
)&&!
ObjectUtils
.
isEmpty
(
f
.
getRemark
())).
map
(
i
->
i
.
getRemark
()).
collect
(
Collectors
.
toList
());
//查询当天考勤记录是否有重复的 有的 则不添加
AttendanceRecordHikQuery
recordHikQuery
=
new
AttendanceRecordHikQuery
();
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/daemon/task/SyncUserTaskImpl.java
View file @
8cdf50c4
...
...
@@ -2,6 +2,7 @@ package com.mortals.xhx.daemon.task;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.service.ITask
;
import
com.mortals.framework.service.ITaskExcuteService
;
...
...
@@ -9,23 +10,39 @@ import com.mortals.xhx.busiz.rsp.DeptHikData;
import
com.mortals.xhx.busiz.rsp.ListDept
;
import
com.mortals.xhx.busiz.rsp.ListItem
;
import
com.mortals.xhx.busiz.rsp.PersonHikData
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.module.attendance.dao.AttendanceStatDao
;
import
com.mortals.xhx.module.attendance.dao.AttendanceVacationBalanceDao
;
import
com.mortals.xhx.module.attendance.dao.ibatis.*
;
import
com.mortals.xhx.module.attendance.model.AttendanceStatEntity
;
import
com.mortals.xhx.module.attendance.model.AttendanceStatQuery
;
import
com.mortals.xhx.module.attendance.model.AttendanceVacationBalanceEntity
;
import
com.mortals.xhx.module.attendance.model.AttendanceVacationBalanceQuery
;
import
com.mortals.xhx.module.attendance.service.AttendanceStatService
;
import
com.mortals.xhx.module.attendance.service.AttendanceVacationBalanceService
;
import
com.mortals.xhx.module.dept.dao.DeptDao
;
import
com.mortals.xhx.module.dept.dao.ibatis.DeptDaoImpl
;
import
com.mortals.xhx.module.dept.model.DeptEntity
;
import
com.mortals.xhx.module.dept.model.DeptQuery
;
import
com.mortals.xhx.module.dept.service.DeptService
;
import
com.mortals.xhx.module.hik.person.model.req.org.OrgListReq
;
import
com.mortals.xhx.module.hik.person.model.req.person.PersonReq
;
import
com.mortals.xhx.module.hik.person.model.rsp.org.OrgDataInfo
;
import
com.mortals.xhx.module.hik.person.model.rsp.org.OrgInfo
;
import
com.mortals.xhx.module.hik.person.model.rsp.person.PersonDataInfo
;
import
com.mortals.xhx.module.hik.person.model.rsp.person.PersonInfo
;
import
com.mortals.xhx.module.hik.person.service.IHikPersonService
;
import
com.mortals.xhx.module.staff.dao.StaffDao
;
import
com.mortals.xhx.module.staff.dao.ibatis.StaffDaoImpl
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
/**
...
...
@@ -35,12 +52,14 @@ import java.util.Objects;
@Service
(
"SyncUserTask"
)
public
class
SyncUserTaskImpl
implements
ITaskExcuteService
{
@Autowired
private
StaffService
staffService
;
@Autowired
private
StaffDao
Impl
staffDao
;
private
StaffDao
staffDao
;
@Autowired
private
DeptDao
Impl
deptDao
;
private
DeptDao
deptDao
;
@Autowired
private
DeptService
deptService
;
...
...
@@ -49,10 +68,16 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
private
StaffService
service
;
@Autowired
private
AttendanceStatDaoImpl
attendanceStatDao
;
private
AttendanceStatDao
attendanceStatDao
;
@Autowired
private
AttendanceStatService
attendanceStatService
;
@Autowired
private
AttendanceVacationBalanceDaoImpl
balanceDao
;
private
AttendanceVacationBalanceDao
balanceDao
;
@Autowired
private
AttendanceVacationBalanceService
balanceService
;
@Autowired
private
IHikPersonService
hikPersonService
;
...
...
@@ -60,240 +85,170 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
public
void
excuteTask
(
ITask
task
)
throws
AppException
{
log
.
info
(
"同步用户--部门"
);
try
{
//部门同步
//String resultDept = ArtemisPostTest.callPostApiGetDeptList();
OrgListReq
orgListReq
=
new
OrgListReq
();
orgListReq
.
setPageNo
(
1
);
orgListReq
.
setPageSize
(
1000
);
String
resultDept
=
hikPersonService
.
getOrgListTrans
(
orgListReq
);
JSONObject
jsonObjectDept
=
JSON
.
parseObject
(
resultDept
);
JSONObject
jsonObjectDept1
=
jsonObjectDept
.
getJSONObject
(
"data"
);
DeptHikData
deptHikData
=
JSONObject
.
parseObject
(
jsonObjectDept1
.
toJSONString
(),
DeptHikData
.
class
);
if
(
Objects
.
nonNull
(
deptHikData
))
{
for
(
ListDept
listDept
:
deptHikData
.
getList
())
{
//查询数据库信息
DeptEntity
deptEntity
=
deptDao
.
queryDept
(
listDept
.
getOrgIndexCode
());
DeptEntity
deptEntityParent
=
deptDao
.
queryDeptParient
(
listDept
.
getParentOrgIndexCode
());
//新增
if
(
Objects
.
isNull
(
deptEntity
))
{
DeptEntity
deptEntity1
=
new
DeptEntity
();
deptEntity1
.
initAttrValue
();
if
(
Objects
.
nonNull
(
deptEntityParent
))
{
deptEntity1
.
setParentId
(
deptEntityParent
.
getId
());
}
deptEntity1
.
setDeptName
(
listDept
.
getOrgName
());
deptEntity1
.
setDeptCode
(
listDept
.
getOrgIndexCode
());
deptEntity1
.
setAncestors
(
listDept
.
getOrgPath
());
deptEntity1
.
setOrderNum
(
0
);
deptEntity1
.
setRemark
(
listDept
.
getParentOrgIndexCode
());
deptEntity1
.
setCreateTime
(
new
Date
());
deptEntity1
.
setCreateUserId
(
Long
.
valueOf
(
1
));
deptEntity1
.
setUpdateTime
(
new
Date
());
deptEntity1
.
setUpdateUserId
(
Long
.
valueOf
(
1
));
deptService
.
save
(
deptEntity1
);
}
else
{
//更新
deptEntity
.
initAttrValue
();
if
(
Objects
.
nonNull
(
deptEntityParent
))
{
deptEntity
.
setParentId
(
deptEntityParent
.
getId
());
}
deptEntity
.
setDeptName
(
listDept
.
getOrgName
());
deptEntity
.
setDeptCode
(
listDept
.
getOrgIndexCode
());
deptEntity
.
setAncestors
(
listDept
.
getOrgPath
());
deptEntity
.
setCreateTime
(
new
Date
());
deptEntity
.
setPersonNum
(
0
);
deptEntity
.
setCreateUserId
(
Long
.
valueOf
(
1
));
deptService
.
update
(
deptEntity
);
}
}
}
//同步部门
syncDepts
();
//同步员工
//String resultPerson = ArtemisPostTest.callPostApiGetPersonList();
PersonReq
personReq
=
new
PersonReq
();
personReq
.
setPageNo
(
1
);
personReq
.
setPageSize
(
1000
);
String
resultPerson
=
hikPersonService
.
getPersonListTrans
(
personReq
);
syncPersons
();
JSONObject
jsonObject
=
JSON
.
parseObject
(
resultPerson
);
JSONObject
jsonObject1
=
jsonObject
.
getJSONObject
(
"data"
);
PersonHikData
personHikData
=
JSONObject
.
parseObject
(
jsonObject1
.
toJSONString
(),
PersonHikData
.
class
);
if
(
Objects
.
nonNull
(
personHikData
))
{
for
(
ListItem
list
:
personHikData
.
getList
())
{
//根据id获取本地数据
StaffEntity
staffEntity1
=
staffDao
.
queryHik
(
list
.
getPersonId
());
DeptEntity
deptEntity
=
deptDao
.
queryDept
(
list
.
getOrgIndexCode
());
AttendanceVacationBalanceEntity
balanceEntity
=
balanceDao
.
queryEntity
(
staffEntity1
.
getId
());
AttendanceStatEntity
statEntity
=
attendanceStatDao
.
queryEntity
(
staffEntity1
.
getId
());
//同步人员的考勤汇总信息
// //通过员工id获取考勤数据
// AttendanceRecordEntity attendanceRecordEntity = attendanceRecordDao.get(staffEntity1.getId());
// //通过考勤id统计上班迟到次数
//// int goWorkCountDele = attendanceRecordDetailDao.goWorkCount(attendanceRecordEntity.getId());
//// //员工id获取异常打卡所有记录
//// int errorAttendaceCount = attendanceRecordErrorDao.errorAttendance(attendanceRecordEntity.getId());
//判断本地数据是否为空
if
(
Objects
.
isNull
(
staffEntity1
))
{
//新增员工信息
StaffEntity
staffEntity
=
new
StaffEntity
();
staffEntity
.
initAttrValue
();
if
(
Objects
.
nonNull
(
staffEntity1
))
{
staffEntity
.
setDeptId
(
deptEntity
.
getId
());
}
staffEntity
.
setName
(
list
.
getPersonName
());
staffEntity
.
setRemarkId
(
list
.
getPersonId
());
staffEntity
.
setPicUri
(
list
.
getPersonPhoto
().
getPicUri
());
staffEntity
.
setServerIndexCode
(
list
.
getPersonPhoto
().
getServerIndexCode
());
staffEntity
.
setDeptName
(
list
.
getOrgName
());
staffEntity
.
setSource
(
1
);
staffEntity
.
setStatus
(
1
);
staffEntity
.
setGender
(
list
.
getGender
());
staffEntity
.
setWorkNum
(
list
.
getJobNo
());
staffEntity
.
setCreateUserId
(
Long
.
valueOf
(
1
));
staffEntity
.
setCreateTime
(
new
Date
());
if
(
list
.
getBirthday
()
!=
null
)
{
staffEntity
.
setBirthday
((
Date
)
list
.
getBirthday
());
}
if
(
list
.
getPhoneNo
()
!=
null
)
{
staffEntity
.
setPhoneNumber
(
String
.
valueOf
(
list
.
getPhoneNo
()));
}
service
.
save
(
staffEntity
);
}
catch
(
Exception
e
)
{
log
.
error
(
"同步人事异常"
,
e
);
}
}
AttendanceStatEntity
attendanceStatEntity
=
new
AttendanceStatEntity
();
attendanceStatEntity
.
initAttrValue
();
attendanceStatEntity
.
setStaffId
(
staffEntity
.
getId
());
attendanceStatEntity
.
setStaffName
(
staffEntity
.
getName
());
attendanceStatEntity
.
setDeptId
(
staffEntity
.
getDeptId
());
attendanceStatEntity
.
setDeptName
(
staffEntity
.
getDeptName
());
attendanceStatEntity
.
setCreateTime
(
new
Date
());
attendanceStatEntity
.
setCreateUserId
(
Long
.
valueOf
(
1
));
//21假
attendanceStatEntity
.
setBackToUnit
(
balanceEntity
.
getBackToUnit
());
attendanceStatEntity
.
setOnDutyLeave
(
balanceEntity
.
getOnDutyLeave
());
attendanceStatEntity
.
setOutOfOffice
(
balanceEntity
.
getOutOfOffice
());
attendanceStatEntity
.
setShiftCompensation
(
balanceEntity
.
getShiftCompensation
());
attendanceStatEntity
.
setPhysicalExamination
(
balanceEntity
.
getPhysicalExamination
());
attendanceStatEntity
.
setQuarantine
(
balanceEntity
.
getQuarantine
());
attendanceStatEntity
.
setBusinessTrip
(
balanceEntity
.
getBusinessTrip
());
attendanceStatEntity
.
setPublicHoliday
(
balanceEntity
.
getPublicHoliday
());
attendanceStatEntity
.
setSickLeave
(
balanceEntity
.
getSickLeaveDays
());
attendanceStatEntity
.
setFuneralLeave
(
balanceEntity
.
getBereavementLeaveDays
());
attendanceStatEntity
.
setMarriageLeave
(
balanceEntity
.
getMarriageLeaveDays
());
attendanceStatEntity
.
setChildRearingLeave
(
balanceEntity
.
getChildRearingLeave
());
attendanceStatEntity
.
setBreastfeedingLeaveDays
(
balanceEntity
.
getBreastfeedingLeaveDays
());
attendanceStatEntity
.
setMenstrualLeaveDays
(
balanceEntity
.
getMenstrualLeaveDays
());
attendanceStatEntity
.
setAnnualLeaveDays
(
balanceEntity
.
getAnnualLeaveDays
());
attendanceStatEntity
.
setCompensatedLeaveDays
(
balanceEntity
.
getCompensatedLeaveDays
());
attendanceStatEntity
.
setPaternityLeaveDays
(
balanceEntity
.
getPaternityLeaveDays
());
attendanceStatEntity
.
setMaternityLeave
(
balanceEntity
.
getMaternityLeaveDays
());
attendanceStatEntity
.
setTransferBack
(
balanceEntity
.
getTransferBack
());
attendanceStatEntity
.
setHomeLeave
(
balanceEntity
.
getHomeLeave
());
attendanceStatEntity
.
setPersonalLeave
(
balanceEntity
.
getPersonalLeaveDays
());
// attendanceStatEntity.setLateTimes(goWorkCountDele);
// attendanceStatEntity.setNonCompliancePunch(BigDecimal.valueOf(errorAttendaceCount));
attendanceStatDao
.
insert
(
attendanceStatEntity
);
private
void
syncPersons
()
{
PersonReq
personReq
=
new
PersonReq
();
personReq
.
setPageNo
(
1
);
personReq
.
setPageSize
(
1000
);
Rest
<
PersonDataInfo
>
personRest
=
hikPersonService
.
getPersonList
(
personReq
);
if
(
personRest
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
List
<
PersonInfo
>
personInfoList
=
personRest
.
getData
().
getList
();
for
(
PersonInfo
personInfo
:
personInfoList
)
{
StaffEntity
staffEntity
=
staffService
.
getExtCache
(
personInfo
.
getJobNo
());
DeptEntity
deptEntity
=
deptService
.
selectOne
(
new
DeptQuery
().
deptCode
(
personInfo
.
getOrgIndexCode
()));
AttendanceVacationBalanceEntity
balanceEntity
=
balanceService
.
selectOne
(
new
AttendanceVacationBalanceQuery
().
staffId
(
staffEntity
.
getId
()));
AttendanceStatEntity
statEntity
=
attendanceStatService
.
selectOne
(
new
AttendanceStatQuery
().
staffId
(
staffEntity
.
getId
()));
//判断本地数据是否为空
if
(
ObjectUtils
.
isEmpty
(
staffEntity
))
{
//新增员工信息
staffEntity
=
new
StaffEntity
();
staffEntity
.
initAttrValue
();
if
(
ObjectUtils
.
isEmpty
(
deptEntity
))
{
staffEntity
.
setDeptId
(
deptEntity
.
getId
());
}
staffEntity
.
setName
(
personInfo
.
getPersonName
());
staffEntity
.
setRemarkId
(
personInfo
.
getPersonId
());
staffEntity
.
setPicUri
(
personInfo
.
getPersonPhoto
().
getPicUri
());
staffEntity
.
setServerIndexCode
(
personInfo
.
getPersonPhoto
().
getServerIndexCode
());
staffEntity
.
setDeptName
(
personInfo
.
getOrgPathName
());
staffEntity
.
setGender
(
personInfo
.
getGender
());
staffEntity
.
setWorkNum
(
personInfo
.
getJobNo
());
staffEntity
.
setPhoneNumber
(
personInfo
.
getPhoneNo
());
staffEntity
.
setCreateUserId
(
1L
);
staffEntity
.
setCreateTime
(
new
Date
());
service
.
save
(
staffEntity
);
AttendanceStatEntity
attendanceStatEntity
=
new
AttendanceStatEntity
();
attendanceStatEntity
.
initAttrValue
();
attendanceStatEntity
.
setStaffId
(
staffEntity
.
getId
());
attendanceStatEntity
.
setStaffName
(
staffEntity
.
getName
());
attendanceStatEntity
.
setDeptId
(
staffEntity
.
getDeptId
());
attendanceStatEntity
.
setDeptName
(
staffEntity
.
getDeptName
());
attendanceStatEntity
.
setCreateUserId
(
1L
);
attendanceStatEntity
.
setCreateTime
(
new
Date
());
//21假
attendanceStatEntity
.
setBackToUnit
(
balanceEntity
.
getBackToUnit
());
attendanceStatEntity
.
setOnDutyLeave
(
balanceEntity
.
getOnDutyLeave
());
attendanceStatEntity
.
setOutOfOffice
(
balanceEntity
.
getOutOfOffice
());
attendanceStatEntity
.
setShiftCompensation
(
balanceEntity
.
getShiftCompensation
());
attendanceStatEntity
.
setPhysicalExamination
(
balanceEntity
.
getPhysicalExamination
());
attendanceStatEntity
.
setQuarantine
(
balanceEntity
.
getQuarantine
());
attendanceStatEntity
.
setBusinessTrip
(
balanceEntity
.
getBusinessTrip
());
attendanceStatEntity
.
setPublicHoliday
(
balanceEntity
.
getPublicHoliday
());
attendanceStatEntity
.
setSickLeave
(
balanceEntity
.
getSickLeaveDays
());
attendanceStatEntity
.
setFuneralLeave
(
balanceEntity
.
getBereavementLeaveDays
());
attendanceStatEntity
.
setMarriageLeave
(
balanceEntity
.
getMarriageLeaveDays
());
attendanceStatEntity
.
setChildRearingLeave
(
balanceEntity
.
getChildRearingLeave
());
attendanceStatEntity
.
setBreastfeedingLeaveDays
(
balanceEntity
.
getBreastfeedingLeaveDays
());
attendanceStatEntity
.
setMenstrualLeaveDays
(
balanceEntity
.
getMenstrualLeaveDays
());
attendanceStatEntity
.
setAnnualLeaveDays
(
balanceEntity
.
getAnnualLeaveDays
());
attendanceStatEntity
.
setCompensatedLeaveDays
(
balanceEntity
.
getCompensatedLeaveDays
());
attendanceStatEntity
.
setPaternityLeaveDays
(
balanceEntity
.
getPaternityLeaveDays
());
attendanceStatEntity
.
setMaternityLeave
(
balanceEntity
.
getMaternityLeaveDays
());
attendanceStatEntity
.
setTransferBack
(
balanceEntity
.
getTransferBack
());
attendanceStatEntity
.
setHomeLeave
(
balanceEntity
.
getHomeLeave
());
attendanceStatEntity
.
setPersonalLeave
(
balanceEntity
.
getPersonalLeaveDays
());
attendanceStatService
.
save
(
attendanceStatEntity
);
AttendanceVacationBalanceEntity
attendanceVacationBalanceEntity
=
new
AttendanceVacationBalanceEntity
();
attendanceVacationBalanceEntity
.
initAttrValue
();
attendanceVacationBalanceEntity
.
setStaffId
(
staffEntity
.
getId
());
attendanceVacationBalanceEntity
.
setStaffName
(
staffEntity
.
getName
());
attendanceVacationBalanceEntity
.
setDeptId
(
deptEntity
.
getId
());
attendanceVacationBalanceEntity
.
setDeptName
(
deptEntity
.
getDeptName
());
balanceDao
.
insert
(
attendanceVacationBalanceEntity
);
//统计各级部门员工数量
String
ancestor
=
deptEntity
.
getAncestors
().
split
(
","
,
2
)[
1
];
String
[]
ancestors
=
ancestor
.
split
(
","
);
for
(
String
newAncestor
:
ancestors
)
{
DeptEntity
deptEntity2
=
deptService
.
get
(
Long
.
valueOf
(
newAncestor
));
if
(
Objects
.
nonNull
(
deptEntity2
))
{
deptEntity2
.
setPersonNum
(
deptEntity2
.
getPersonNum
()
+
1
);
deptService
.
update
(
deptEntity2
);
}
AttendanceVacationBalanceEntity
attendanceVacationBalanceEntity
=
new
AttendanceVacationBalanceEntity
();
attendanceVacationBalanceEntity
.
initAttrValue
();
attendanceVacationBalanceEntity
.
setStaffId
(
staffEntity
.
getId
());
attendanceVacationBalanceEntity
.
setStaffName
(
staffEntity
.
getName
());
attendanceVacationBalanceEntity
.
setDeptId
(
deptEntity
.
getId
());
attendanceVacationBalanceEntity
.
setDeptName
(
deptEntity
.
getDeptName
());
attendanceVacationBalanceEntity
.
setCreateTime
(
new
Date
());
attendanceVacationBalanceEntity
.
setCreateUserId
(
1L
);
balanceService
.
save
(
attendanceVacationBalanceEntity
);
//统计各级部门员工数量 todo 优化统计
String
ancestor
=
deptEntity
.
getAncestors
().
split
(
","
,
2
)[
1
];
String
[]
ancestors
=
ancestor
.
split
(
","
);
for
(
String
newAncestor
:
ancestors
)
{
DeptEntity
deptEntity2
=
deptService
.
get
(
Long
.
valueOf
(
newAncestor
));
if
(
Objects
.
nonNull
(
deptEntity2
))
{
deptEntity2
.
setPersonNum
(
deptEntity2
.
getPersonNum
()
+
1
);
deptService
.
update
(
deptEntity2
);
}
}
}
else
{
//更新
if
(
ObjectUtils
.
isEmpty
(
deptEntity
))
{
staffEntity
.
setDeptId
(
deptEntity
.
getId
());
}
//本地数据不为空
else
{
//更新员工信息
staffEntity1
.
initAttrValue
();
if
(
Objects
.
nonNull
(
deptEntity
))
{
staffEntity1
.
setDeptId
(
deptEntity
.
getId
());
}
staffEntity1
.
setName
(
list
.
getPersonName
());
staffEntity1
.
setRemarkId
(
list
.
getPersonId
());
staffEntity1
.
setPicUri
(
list
.
getPersonPhoto
().
getPicUri
());
staffEntity1
.
setServerIndexCode
(
list
.
getPersonPhoto
().
getServerIndexCode
());
staffEntity1
.
setDeptName
(
list
.
getOrgName
());
staffEntity1
.
setGender
(
list
.
getGender
());
staffEntity1
.
setWorkNum
(
list
.
getJobNo
());
staffEntity1
.
setCreateUserId
(
Long
.
valueOf
(
1
));
staffEntity1
.
setCreateTime
(
new
Date
());
if
(
list
.
getBirthday
()
!=
null
)
{
staffEntity1
.
setBirthday
((
Date
)
list
.
getBirthday
());
}
if
(
list
.
getPhoneNo
()
!=
null
)
{
staffEntity1
.
setPhoneNumber
(
String
.
valueOf
(
list
.
getPhoneNo
()));
}
service
.
update
(
staffEntity1
);
if
(
Objects
.
nonNull
(
statEntity
))
{
statEntity
.
initAttrValue
();
statEntity
.
setStaffId
(
staffEntity1
.
getId
());
statEntity
.
setStaffName
(
staffEntity1
.
getName
());
statEntity
.
setDeptId
(
staffEntity1
.
getDeptId
());
statEntity
.
setDeptName
(
staffEntity1
.
getDeptName
());
//21假
statEntity
.
setBackToUnit
(
balanceEntity
.
getBackToUnit
());
statEntity
.
setOnDutyLeave
(
balanceEntity
.
getOnDutyLeave
());
statEntity
.
setOutOfOffice
(
balanceEntity
.
getOutOfOffice
());
statEntity
.
setShiftCompensation
(
balanceEntity
.
getShiftCompensation
());
statEntity
.
setPhysicalExamination
(
balanceEntity
.
getPhysicalExamination
());
statEntity
.
setQuarantine
(
balanceEntity
.
getQuarantine
());
statEntity
.
setBusinessTrip
(
balanceEntity
.
getBusinessTrip
());
statEntity
.
setPublicHoliday
(
balanceEntity
.
getPublicHoliday
());
statEntity
.
setSickLeave
(
balanceEntity
.
getSickLeaveDays
());
statEntity
.
setFuneralLeave
(
balanceEntity
.
getBereavementLeaveDays
());
statEntity
.
setMarriageLeave
(
balanceEntity
.
getMarriageLeaveDays
());
statEntity
.
setChildRearingLeave
(
balanceEntity
.
getChildRearingLeave
());
statEntity
.
setBreastfeedingLeaveDays
(
balanceEntity
.
getBreastfeedingLeaveDays
());
statEntity
.
setMenstrualLeaveDays
(
balanceEntity
.
getMenstrualLeaveDays
());
statEntity
.
setAnnualLeaveDays
(
balanceEntity
.
getAnnualLeaveDays
());
statEntity
.
setCompensatedLeaveDays
(
balanceEntity
.
getCompensatedLeaveDays
());
statEntity
.
setPaternityLeaveDays
(
balanceEntity
.
getPaternityLeaveDays
());
statEntity
.
setMaternityLeave
(
balanceEntity
.
getMaternityLeaveDays
());
statEntity
.
setTransferBack
(
balanceEntity
.
getTransferBack
());
statEntity
.
setHomeLeave
(
balanceEntity
.
getHomeLeave
());
statEntity
.
setPersonalLeave
(
balanceEntity
.
getPersonalLeaveDays
());
// statEntity.setLateTimes(goWorkCountDele);
// statEntity.setNonCompliancePunch(BigDecimal.valueOf(errorAttendaceCount));
attendanceStatDao
.
update
(
statEntity
);
}
staffEntity
.
setName
(
personInfo
.
getPersonName
());
staffEntity
.
setRemarkId
(
personInfo
.
getPersonId
());
staffEntity
.
setPicUri
(
personInfo
.
getPersonPhoto
().
getPicUri
());
staffEntity
.
setServerIndexCode
(
personInfo
.
getPersonPhoto
().
getServerIndexCode
());
staffEntity
.
setDeptName
(
personInfo
.
getOrgPathName
());
staffEntity
.
setGender
(
personInfo
.
getGender
());
staffEntity
.
setWorkNum
(
personInfo
.
getJobNo
());
staffEntity
.
setPhoneNumber
(
personInfo
.
getPhoneNo
());
staffEntity
.
setUpdateUserId
(
1L
);
staffEntity
.
setUpdateTime
(
new
Date
());
service
.
update
(
staffEntity
);
AttendanceVacationBalanceEntity
attendanceVacationBalanceEntity
=
new
AttendanceVacationBalanceEntity
();
attendanceVacationBalanceEntity
.
initAttrValue
();
attendanceVacationBalanceEntity
.
setStaffId
(
staffEntity1
.
getId
());
attendanceVacationBalanceEntity
.
setStaffName
(
staffEntity1
.
getName
());
attendanceVacationBalanceEntity
.
setDeptId
(
deptEntity
.
getId
());
attendanceVacationBalanceEntity
.
setDeptName
(
deptEntity
.
getDeptName
());
balanceDao
.
update
(
attendanceVacationBalanceEntity
);
//统计各级部门员工数量
String
ancestor
=
deptEntity
.
getAncestors
().
split
(
","
,
2
)[
1
];
String
[]
ancestors
=
ancestor
.
split
(
","
);
for
(
String
newAncestor
:
ancestors
)
{
DeptEntity
deptEntity2
=
deptService
.
get
(
Long
.
valueOf
(
newAncestor
));
if
(
Objects
.
nonNull
(
deptEntity2
))
{
deptEntity2
.
setPersonNum
(
deptEntity2
.
getPersonNum
()
+
1
);
deptService
.
update
(
deptEntity2
);
}
//统计各级部门员工数量
String
ancestor
=
deptEntity
.
getAncestors
().
split
(
","
,
2
)[
1
];
String
[]
ancestors
=
ancestor
.
split
(
","
);
for
(
String
newAncestor
:
ancestors
)
{
DeptEntity
deptEntity2
=
deptService
.
get
(
Long
.
valueOf
(
newAncestor
));
if
(
Objects
.
nonNull
(
deptEntity2
))
{
deptEntity2
.
setPersonNum
(
deptEntity2
.
getPersonNum
()
+
1
);
deptService
.
update
(
deptEntity2
);
}
}
}
}
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
private
void
syncDepts
()
{
//部门同步
OrgListReq
orgListReq
=
new
OrgListReq
();
orgListReq
.
setPageNo
(
1
);
orgListReq
.
setPageSize
(
1000
);
Rest
<
OrgDataInfo
>
orgRest
=
hikPersonService
.
getOrgList
(
orgListReq
);
if
(
orgRest
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
List
<
OrgInfo
>
orgInfoList
=
orgRest
.
getData
().
getList
();
for
(
OrgInfo
orgInfo
:
orgInfoList
)
{
//查询数据库信息
DeptEntity
deptEntity
=
deptDao
.
queryDept
(
orgInfo
.
getOrgIndexCode
());
DeptEntity
deptEntityParent
=
deptDao
.
queryDeptParient
(
orgInfo
.
getParentOrgIndexCode
());
//新增
if
(
ObjectUtils
.
isEmpty
(
deptEntity
))
{
deptEntity
=
new
DeptEntity
();
deptEntity
.
initAttrValue
();
if
(
ObjectUtils
.
isEmpty
(
deptEntityParent
))
{
deptEntity
.
setParentId
(
deptEntityParent
.
getId
());
}
deptEntity
.
setDeptName
(
orgInfo
.
getOrgName
());
deptEntity
.
setDeptCode
(
orgInfo
.
getOrgIndexCode
());
deptEntity
.
setAncestors
(
orgInfo
.
getOrgPath
());
deptEntity
.
setRemark
(
orgInfo
.
getParentOrgIndexCode
());
deptEntity
.
setCreateTime
(
new
Date
());
deptEntity
.
setCreateUserId
(
1L
);
deptService
.
save
(
deptEntity
);
}
else
{
//更新
deptEntity
.
setDeptName
(
orgInfo
.
getOrgName
());
deptEntity
.
setDeptCode
(
orgInfo
.
getOrgIndexCode
());
deptEntity
.
setAncestors
(
orgInfo
.
getOrgPath
());
deptEntity
.
setUpdateTime
(
new
Date
());
deptEntity
.
setUpdateUserId
(
1L
);
deptService
.
update
(
deptEntity
);
}
}
}
}
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/job/web/JobController.java
View file @
8cdf50c4
...
...
@@ -8,6 +8,7 @@ import com.mortals.xhx.module.job.model.JobEntity;
import
com.mortals.xhx.module.job.model.JobQuery
;
import
com.mortals.xhx.module.job.service.JobService
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.model.StaffQuery
;
import
com.mortals.xhx.module.staff.service.impl.StaffServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -54,8 +55,8 @@ public class JobController extends BaseCRUDJsonBodyMappingController<JobService,
@Override
protected
int
infoAfter
(
Long
id
,
Map
<
String
,
Object
>
model
,
JobEntity
entity
,
Context
context
)
throws
AppException
{
List
<
StaffEntity
>
staffEntity
=
staffService
.
queryJob
(
id
);
entity
.
setStaffEntities
(
staffEntity
);
List
<
StaffEntity
>
staffEntity
List
=
this
.
staffService
.
find
(
new
StaffQuery
().
positionId
(
id
)
);
entity
.
setStaffEntities
(
staffEntity
List
);
return
super
.
infoAfter
(
id
,
model
,
entity
,
context
);
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/dao/StaffDao.java
View file @
8cdf50c4
...
...
@@ -58,8 +58,5 @@ public interface StaffDao extends ICRUDDao<StaffEntity,Long>{
* */
StaffEntity
queryHik
(
String
remarkId
);
/**
* 查询拥有职位的员工
* */
List
<
StaffEntity
>
queryJob
(
Long
positionId
);
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/dao/ibatis/StaffDaoImpl.java
View file @
8cdf50c4
...
...
@@ -59,10 +59,5 @@ public class StaffDaoImpl extends BaseCRUDDaoMybatis<StaffEntity,Long> implement
return
this
.
getSqlSession
().
selectOne
(
this
.
getSqlId
(
"queryHik"
),
remarkId
);
}
@Override
public
List
<
StaffEntity
>
queryJob
(
Long
positionId
){
return
getSqlSession
().
selectList
(
this
.
getSqlId
(
"queryJob"
),
positionId
);
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/service/StaffService.java
View file @
8cdf50c4
...
...
@@ -20,6 +20,4 @@ public interface StaffService extends ICRUDCacheService<StaffEntity,Long> {
StaffInfoVo
queryAll
();
//统计所有在职员工
int
queryAllPerson
();
//查询员工数据
List
<
StaffEntity
>
queryJob
(
Long
positionId
);
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/service/impl/StaffServiceImpl.java
View file @
8cdf50c4
...
...
@@ -62,10 +62,4 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
return
staffDao
.
queryInWork
();
}
@Override
public
List
<
StaffEntity
>
queryJob
(
Long
positionId
)
{
return
dao
.
queryJob
(
positionId
);
}
}
\ No newline at end of file
attendance-performance-manager/src/main/resources/sqlmap/module/staff/StaffMapperExt.xml
0 → 100644
View file @
8cdf50c4
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper
namespace=
"com.mortals.xhx.module.staff.dao.ibatis.StaffDaoImpl"
>
<select
id=
"queryFormal"
resultType=
"integer"
>
select count(1) formalStaff from mortals_xhx_staff where status = 1
</select>
<select
id=
"queryOnTrial"
resultType=
"integer"
>
select count(1) onTrialStaff from mortals_xhx_staff where status = 2
</select>
<select
id=
"queryInWork"
resultType=
"integer"
>
select count(1) inWorkStaff from mortals_xhx_staff where status
<![CDATA[<>]]>
3
</select>
<select
id=
"queryFull"
resultType=
"integer"
>
select count(1) fullStaff from mortals_xhx_staff where staffType = 1
</select>
<select
id=
"queryConcurrently"
resultType=
"integer"
>
select count(1) concurrentlyStaff from mortals_xhx_staff where staffType = 2
</select>
<select
id=
"queryPricate"
resultType=
"integer"
>
select count(1) pricateStaff from mortals_xhx_staff where staffType = 3
</select>
<select
id=
"queryHik"
resultType=
"com.mortals.xhx.module.staff.model.StaffEntity"
>
select * from mortals_xhx_staff where remarkId = #{remarkId}
</select>
<select
id=
"queryJob"
resultType=
"com.mortals.xhx.module.staff.model.StaffEntity"
>
select * from mortals_xhx_staff where positionId = #{positionId}
</select>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment