Commit 8cdf50c4 authored by 赵啸非's avatar 赵啸非

修改用户同步逻辑

parent 1239f3fd
...@@ -165,7 +165,6 @@ export default { ...@@ -165,7 +165,6 @@ export default {
width: 100, width: 100,
formatter: row => { formatter: row => {
return ( return (
<div>
<el-switch <el-switch
value={row.status+""} value={row.status+""}
active-color="#13ce66" active-color="#13ce66"
...@@ -177,7 +176,6 @@ export default { ...@@ -177,7 +176,6 @@ export default {
}} }}
> >
</el-switch> </el-switch>
</div>
); );
} }
......
...@@ -1093,10 +1093,10 @@ ...@@ -1093,10 +1093,10 @@
"resolved" "https://registry.nlark.com/@types/q/download/@types/q-1.5.5.tgz" "resolved" "https://registry.nlark.com/@types/q/download/@types/q-1.5.5.tgz"
"version" "1.5.5" "version" "1.5.5"
"@vue/babel-helper-vue-jsx-merge-props@^1.2.1": "@vue/babel-helper-vue-jsx-merge-props@^1.4.0":
"integrity" "sha1-MWJKelBfsU2h1YAjclpMXycOaoE=" "integrity" "sha512-JkqXfCkUDp4PIlFdDQ0TdXoIejMtTHP67/pvxlgeY+u5k3LEdKuWZ3LK6xkxo52uDoABIVyRwqVkfLQJhk7VBA=="
"resolved" "https://registry.nlark.com/@vue/babel-helper-vue-jsx-merge-props/download/@vue/babel-helper-vue-jsx-merge-props-1.2.1.tgz" "resolved" "https://registry.npmmirror.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.4.0.tgz"
"version" "1.2.1" "version" "1.4.0"
"@vue/babel-helper-vue-transform-on@^1.0.2": "@vue/babel-helper-vue-transform-on@^1.0.2":
"integrity" "sha1-m5xpHNBvyFUiGiR1w8yDHXdLx9w=" "integrity" "sha1-m5xpHNBvyFUiGiR1w8yDHXdLx9w="
...@@ -1118,14 +1118,14 @@ ...@@ -1118,14 +1118,14 @@
"html-tags" "^3.1.0" "html-tags" "^3.1.0"
"svg-tags" "^1.0.0" "svg-tags" "^1.0.0"
"@vue/babel-plugin-transform-vue-jsx@^1.2.1": "@vue/babel-plugin-transform-vue-jsx@^1.4.0":
"integrity" "sha1-ZGBGxlLC8CQnJ/NFGdkXsGQEHtc=" "integrity" "sha512-Fmastxw4MMx0vlgLS4XBX0XiBbUFzoMGeVXuMV08wyOfXdikAFqBTuYPR0tlk+XskL19EzHc39SgjrPGY23JnA=="
"resolved" "https://registry.nlark.com/@vue/babel-plugin-transform-vue-jsx/download/@vue/babel-plugin-transform-vue-jsx-1.2.1.tgz" "resolved" "https://registry.npmmirror.com/@vue/babel-plugin-transform-vue-jsx/-/babel-plugin-transform-vue-jsx-1.4.0.tgz"
"version" "1.2.1" "version" "1.4.0"
dependencies: dependencies:
"@babel/helper-module-imports" "^7.0.0" "@babel/helper-module-imports" "^7.0.0"
"@babel/plugin-syntax-jsx" "^7.2.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" "html-tags" "^2.0.0"
"lodash.kebabcase" "^4.1.1" "lodash.kebabcase" "^4.1.1"
"svg-tags" "^1.0.0" "svg-tags" "^1.0.0"
...@@ -1153,66 +1153,66 @@ ...@@ -1153,66 +1153,66 @@
"semver" "^6.1.0" "semver" "^6.1.0"
"@vue/babel-preset-jsx@^1.2.4": "@vue/babel-preset-jsx@^1.2.4":
"integrity" "sha1-kv6nnbbxOwHoDToAmeKSS9y+Toc=" "integrity" "sha512-QmfRpssBOPZWL5xw7fOuHNifCQcNQC1PrOo/4fu6xlhlKJJKSA3HqX92Nvgyx8fqHZTUGMPHmFA+IDqwXlqkSA=="
"resolved" "https://registry.nlark.com/@vue/babel-preset-jsx/download/@vue/babel-preset-jsx-1.2.4.tgz" "resolved" "https://registry.npmmirror.com/@vue/babel-preset-jsx/-/babel-preset-jsx-1.4.0.tgz"
"version" "1.2.4" "version" "1.4.0"
dependencies: dependencies:
"@vue/babel-helper-vue-jsx-merge-props" "^1.2.1" "@vue/babel-helper-vue-jsx-merge-props" "^1.4.0"
"@vue/babel-plugin-transform-vue-jsx" "^1.2.1" "@vue/babel-plugin-transform-vue-jsx" "^1.4.0"
"@vue/babel-sugar-composition-api-inject-h" "^1.2.1" "@vue/babel-sugar-composition-api-inject-h" "^1.4.0"
"@vue/babel-sugar-composition-api-render-instance" "^1.2.4" "@vue/babel-sugar-composition-api-render-instance" "^1.4.0"
"@vue/babel-sugar-functional-vue" "^1.2.2" "@vue/babel-sugar-functional-vue" "^1.4.0"
"@vue/babel-sugar-inject-h" "^1.2.2" "@vue/babel-sugar-inject-h" "^1.4.0"
"@vue/babel-sugar-v-model" "^1.2.3" "@vue/babel-sugar-v-model" "^1.4.0"
"@vue/babel-sugar-v-on" "^1.2.3" "@vue/babel-sugar-v-on" "^1.4.0"
"@vue/babel-sugar-composition-api-inject-h@^1.2.1": "@vue/babel-sugar-composition-api-inject-h@^1.4.0":
"integrity" "sha1-BdbgxDJxDjdYKyvppgSbaJtvA+s=" "integrity" "sha512-VQq6zEddJHctnG4w3TfmlVp5FzDavUSut/DwR0xVoe/mJKXyMcsIibL42wPntozITEoY90aBV0/1d2KjxHU52g=="
"resolved" "https://registry.nlark.com/@vue/babel-sugar-composition-api-inject-h/download/@vue/babel-sugar-composition-api-inject-h-1.2.1.tgz" "resolved" "https://registry.npmmirror.com/@vue/babel-sugar-composition-api-inject-h/-/babel-sugar-composition-api-inject-h-1.4.0.tgz"
"version" "1.2.1" "version" "1.4.0"
dependencies: dependencies:
"@babel/plugin-syntax-jsx" "^7.2.0" "@babel/plugin-syntax-jsx" "^7.2.0"
"@vue/babel-sugar-composition-api-render-instance@^1.2.4": "@vue/babel-sugar-composition-api-render-instance@^1.4.0":
"integrity" "sha1-5MvGmXw0T6wnF4WteikyXFHWjRk=" "integrity" "sha512-6ZDAzcxvy7VcnCjNdHJ59mwK02ZFuP5CnucloidqlZwVQv5CQLijc3lGpR7MD3TWFi78J7+a8J56YxbCtHgT9Q=="
"resolved" "https://registry.nlark.com/@vue/babel-sugar-composition-api-render-instance/download/@vue/babel-sugar-composition-api-render-instance-1.2.4.tgz" "resolved" "https://registry.npmmirror.com/@vue/babel-sugar-composition-api-render-instance/-/babel-sugar-composition-api-render-instance-1.4.0.tgz"
"version" "1.2.4" "version" "1.4.0"
dependencies: dependencies:
"@babel/plugin-syntax-jsx" "^7.2.0" "@babel/plugin-syntax-jsx" "^7.2.0"
"@vue/babel-sugar-functional-vue@^1.2.2": "@vue/babel-sugar-functional-vue@^1.4.0":
"integrity" "sha1-JnqayNeHyW7b8Dzj85LEnam9Jlg=" "integrity" "sha512-lTEB4WUFNzYt2In6JsoF9sAYVTo84wC4e+PoZWSgM6FUtqRJz7wMylaEhSRgG71YF+wfLD6cc9nqVeXN2rwBvw=="
"resolved" "https://registry.nlark.com/@vue/babel-sugar-functional-vue/download/@vue/babel-sugar-functional-vue-1.2.2.tgz" "resolved" "https://registry.npmmirror.com/@vue/babel-sugar-functional-vue/-/babel-sugar-functional-vue-1.4.0.tgz"
"version" "1.2.2" "version" "1.4.0"
dependencies: dependencies:
"@babel/plugin-syntax-jsx" "^7.2.0" "@babel/plugin-syntax-jsx" "^7.2.0"
"@vue/babel-sugar-inject-h@^1.2.2": "@vue/babel-sugar-inject-h@^1.4.0":
"integrity" "sha1-1zjTyJM2fshJHcu2abAAkZKT46o=" "integrity" "sha512-muwWrPKli77uO2fFM7eA3G1lAGnERuSz2NgAxuOLzrsTlQl8W4G+wwbM4nB6iewlKbwKRae3nL03UaF5ffAPMA=="
"resolved" "https://registry.nlark.com/@vue/babel-sugar-inject-h/download/@vue/babel-sugar-inject-h-1.2.2.tgz" "resolved" "https://registry.npmmirror.com/@vue/babel-sugar-inject-h/-/babel-sugar-inject-h-1.4.0.tgz"
"version" "1.2.2" "version" "1.4.0"
dependencies: dependencies:
"@babel/plugin-syntax-jsx" "^7.2.0" "@babel/plugin-syntax-jsx" "^7.2.0"
"@vue/babel-sugar-v-model@^1.2.3": "@vue/babel-sugar-v-model@^1.4.0":
"integrity" "sha1-+h8pulHr8KoabDX6ZtU5vEWaGPI=" "integrity" "sha512-0t4HGgXb7WHYLBciZzN5s0Hzqan4Ue+p/3FdQdcaHAb7s5D9WZFGoSxEZHrR1TFVZlAPu1bejTKGeAzaaG3NCQ=="
"resolved" "https://registry.nlark.com/@vue/babel-sugar-v-model/download/@vue/babel-sugar-v-model-1.2.3.tgz" "resolved" "https://registry.npmmirror.com/@vue/babel-sugar-v-model/-/babel-sugar-v-model-1.4.0.tgz"
"version" "1.2.3" "version" "1.4.0"
dependencies: dependencies:
"@babel/plugin-syntax-jsx" "^7.2.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"
"@vue/babel-plugin-transform-vue-jsx" "^1.2.1" "@vue/babel-plugin-transform-vue-jsx" "^1.4.0"
"camelcase" "^5.0.0" "camelcase" "^5.0.0"
"html-tags" "^2.0.0" "html-tags" "^2.0.0"
"svg-tags" "^1.0.0" "svg-tags" "^1.0.0"
"@vue/babel-sugar-v-on@^1.2.3": "@vue/babel-sugar-v-on@^1.4.0":
"integrity" "sha1-NCNnF4WGpp85LwS/ujICHQKROto=" "integrity" "sha512-m+zud4wKLzSKgQrWwhqRObWzmTuyzl6vOP7024lrpeJM4x2UhQtRDLgYjXAw9xBXjCwS0pP9kXjg91F9ZNo9JA=="
"resolved" "https://registry.nlark.com/@vue/babel-sugar-v-on/download/@vue/babel-sugar-v-on-1.2.3.tgz" "resolved" "https://registry.npmmirror.com/@vue/babel-sugar-v-on/-/babel-sugar-v-on-1.4.0.tgz"
"version" "1.2.3" "version" "1.4.0"
dependencies: dependencies:
"@babel/plugin-syntax-jsx" "^7.2.0" "@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" "camelcase" "^5.0.0"
"@vue/cli-overlay@^4.4.6": "@vue/cli-overlay@^4.4.6":
...@@ -1868,8 +1868,8 @@ ...@@ -1868,8 +1868,8 @@
"resolve" "^1.12.0" "resolve" "^1.12.0"
"babel-helper-vue-jsx-merge-props@^2.0.0", "babel-helper-vue-jsx-merge-props@^2.0.3": "babel-helper-vue-jsx-merge-props@^2.0.0", "babel-helper-vue-jsx-merge-props@^2.0.3":
"integrity" "sha1-Iq69OzOQIyjlEyk6jkmSs4T58bY=" "integrity" "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg=="
"resolved" "https://registry.nlark.com/babel-helper-vue-jsx-merge-props/download/babel-helper-vue-jsx-merge-props-2.0.3.tgz" "resolved" "https://registry.npmmirror.com/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz"
"version" "2.0.3" "version" "2.0.3"
"babel-loader@^8.1.0": "babel-loader@^8.1.0":
...@@ -1889,6 +1889,15 @@ ...@@ -1889,6 +1889,15 @@
dependencies: dependencies:
"object.assign" "^4.1.0" "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": "babel-plugin-polyfill-corejs2@^0.2.2":
"integrity" "sha1-6RJHheb9lPlLYYp5VOVpMFO/Uyc=" "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" "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 @@ ...@@ -1913,6 +1922,11 @@
dependencies: dependencies:
"@babel/helper-define-polyfill-provider" "^0.2.2" "@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": "babel-runtime@6.x":
"integrity" "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=" "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" "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 @@ ...@@ -2027,11 +2041,6 @@
"raw-body" "2.4.0" "raw-body" "2.4.0"
"type-is" "~1.6.17" "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": "bonjour@^3.5.0":
"integrity" "sha1-jokKGD2O6aI5OzhExpGkK897yfU=" "integrity" "sha1-jokKGD2O6aI5OzhExpGkK897yfU="
"resolved" "https://registry.nlark.com/bonjour/download/bonjour-3.5.0.tgz" "resolved" "https://registry.nlark.com/bonjour/download/bonjour-3.5.0.tgz"
...@@ -3229,11 +3238,6 @@ ...@@ -3229,11 +3238,6 @@
dependencies: dependencies:
"assert-plus" "^1.0.0" "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": "de-indent@^1.0.2":
"integrity" "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=" "integrity" "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0="
"resolved" "https://registry.nlark.com/de-indent/download/de-indent-1.0.2.tgz" "resolved" "https://registry.nlark.com/de-indent/download/de-indent-1.0.2.tgz"
...@@ -4838,8 +4842,8 @@ ...@@ -4838,8 +4842,8 @@
"uglify-js" "3.4.x" "uglify-js" "3.4.x"
"html-tags@^2.0.0": "html-tags@^2.0.0":
"integrity" "sha1-ELMKOGCF9Dzt41PMj6fLDe7qZos=" "integrity" "sha512-+Il6N8cCo2wB/Vd3gqy/8TZhTD3QvcVeQLCnZiGkGCH3JP28IgGAY41giccp2W4R3jfyJPAP318FQTa1yU7K7g=="
"resolved" "https://registry.nlark.com/html-tags/download/html-tags-2.0.0.tgz" "resolved" "https://registry.npmmirror.com/html-tags/-/html-tags-2.0.0.tgz"
"version" "2.0.0" "version" "2.0.0"
"html-tags@^3.1.0": "html-tags@^3.1.0":
...@@ -5674,11 +5678,6 @@ ...@@ -5674,11 +5678,6 @@
"resolved" "https://registry.npmmirror.com/jwt-decode/-/jwt-decode-3.1.2.tgz" "resolved" "https://registry.npmmirror.com/jwt-decode/-/jwt-decode-3.1.2.tgz"
"version" "3.1.2" "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": "killable@^1.0.1":
"integrity" "sha1-TIzkQRh6Bhx0dPuHygjipjgZSJI=" "integrity" "sha1-TIzkQRh6Bhx0dPuHygjipjgZSJI="
"resolved" "https://registry.nlark.com/killable/download/killable-1.0.1.tgz" "resolved" "https://registry.nlark.com/killable/download/killable-1.0.1.tgz"
...@@ -5863,8 +5862,8 @@ ...@@ -5863,8 +5862,8 @@
"version" "4.6.1" "version" "4.6.1"
"lodash.kebabcase@^4.1.1": "lodash.kebabcase@^4.1.1":
"integrity" "sha1-hImxyw0p/4gZXM7KRI/21swpXDY=" "integrity" "sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g=="
"resolved" "https://registry.nlark.com/lodash.kebabcase/download/lodash.kebabcase-4.1.1.tgz" "resolved" "https://registry.npmmirror.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz"
"version" "4.1.1" "version" "4.1.1"
"lodash.mapvalues@^4.6.0": "lodash.mapvalues@^4.6.0":
...@@ -6330,17 +6329,6 @@ ...@@ -6330,17 +6329,6 @@
"dns-packet" "^1.3.1" "dns-packet" "^1.3.1"
"thunky" "^1.0.2" "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": "mute-stream@0.0.8":
"integrity" "sha1-FjDEKyJR/4HiooPelqVJfqkuXg0=" "integrity" "sha1-FjDEKyJR/4HiooPelqVJfqkuXg0="
"resolved" "https://registry.nlark.com/mute-stream/download/mute-stream-0.0.8.tgz" "resolved" "https://registry.nlark.com/mute-stream/download/mute-stream-0.0.8.tgz"
...@@ -9532,7 +9520,7 @@ ...@@ -9532,7 +9520,7 @@
"resolved" "https://registry.nlark.com/vue-template-es2015-compiler/download/vue-template-es2015-compiler-1.9.1.tgz" "resolved" "https://registry.nlark.com/vue-template-es2015-compiler/download/vue-template-es2015-compiler-1.9.1.tgz"
"version" "1.9.1" "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=" "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" "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" "version" "2.6.14"
......
...@@ -30,8 +30,8 @@ import java.util.Map; ...@@ -30,8 +30,8 @@ import java.util.Map;
* @author: zxfei * @author: zxfei
* @date: 2022/4/20 9:24 * @date: 2022/4/20 9:24
*/ */
@Aspect //@Aspect
@Component //@Component
@Slf4j @Slf4j
@Order(1) @Order(1)
@Profile({"default", "develop", "test1"}) @Profile({"default", "develop", "test1"})
......
...@@ -138,7 +138,7 @@ public class SyncDoorsEventTaskImpl implements ITaskExcuteService { ...@@ -138,7 +138,7 @@ public class SyncDoorsEventTaskImpl implements ITaskExcuteService {
log.info("attRecords size:{}", attRecords.size()); 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(); AttendanceRecordHikQuery recordHikQuery = new AttendanceRecordHikQuery();
......
...@@ -2,6 +2,7 @@ package com.mortals.xhx.daemon.task; ...@@ -2,6 +2,7 @@ package com.mortals.xhx.daemon.task;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ITask; import com.mortals.framework.service.ITask;
import com.mortals.framework.service.ITaskExcuteService; import com.mortals.framework.service.ITaskExcuteService;
...@@ -9,23 +10,39 @@ import com.mortals.xhx.busiz.rsp.DeptHikData; ...@@ -9,23 +10,39 @@ import com.mortals.xhx.busiz.rsp.DeptHikData;
import com.mortals.xhx.busiz.rsp.ListDept; import com.mortals.xhx.busiz.rsp.ListDept;
import com.mortals.xhx.busiz.rsp.ListItem; import com.mortals.xhx.busiz.rsp.ListItem;
import com.mortals.xhx.busiz.rsp.PersonHikData; 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.dao.ibatis.*;
import com.mortals.xhx.module.attendance.model.AttendanceStatEntity; 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.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.dao.ibatis.DeptDaoImpl;
import com.mortals.xhx.module.dept.model.DeptEntity; 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.dept.service.DeptService;
import com.mortals.xhx.module.hik.person.model.req.org.OrgListReq; 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.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.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.dao.ibatis.StaffDaoImpl;
import com.mortals.xhx.module.staff.model.StaffEntity; import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.service.StaffService; import com.mortals.xhx.module.staff.service.StaffService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import java.util.Date; import java.util.Date;
import java.util.List;
import java.util.Objects; import java.util.Objects;
/** /**
...@@ -35,12 +52,14 @@ import java.util.Objects; ...@@ -35,12 +52,14 @@ import java.util.Objects;
@Service("SyncUserTask") @Service("SyncUserTask")
public class SyncUserTaskImpl implements ITaskExcuteService { public class SyncUserTaskImpl implements ITaskExcuteService {
@Autowired
private StaffService staffService;
@Autowired @Autowired
private StaffDaoImpl staffDao; private StaffDao staffDao;
@Autowired @Autowired
private DeptDaoImpl deptDao; private DeptDao deptDao;
@Autowired @Autowired
private DeptService deptService; private DeptService deptService;
...@@ -49,10 +68,16 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -49,10 +68,16 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
private StaffService service; private StaffService service;
@Autowired @Autowired
private AttendanceStatDaoImpl attendanceStatDao; private AttendanceStatDao attendanceStatDao;
@Autowired
private AttendanceStatService attendanceStatService;
@Autowired @Autowired
private AttendanceVacationBalanceDaoImpl balanceDao; private AttendanceVacationBalanceDao balanceDao;
@Autowired
private AttendanceVacationBalanceService balanceService;
@Autowired @Autowired
private IHikPersonService hikPersonService; private IHikPersonService hikPersonService;
...@@ -60,240 +85,170 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -60,240 +85,170 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
public void excuteTask(ITask task) throws AppException { public void excuteTask(ITask task) throws AppException {
log.info("同步用户--部门"); log.info("同步用户--部门");
try { 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"); syncDepts();
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);
}
}
}
//同步员工 //同步员工
//String resultPerson = ArtemisPostTest.callPostApiGetPersonList(); syncPersons();
PersonReq personReq = new PersonReq();
personReq.setPageNo(1);
personReq.setPageSize(1000);
String resultPerson = hikPersonService.getPersonListTrans(personReq);
JSONObject jsonObject = JSON.parseObject(resultPerson); } catch (Exception e) {
JSONObject jsonObject1 = jsonObject.getJSONObject("data"); log.error("同步人事异常", e);
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);
AttendanceStatEntity attendanceStatEntity = new AttendanceStatEntity(); private void syncPersons() {
attendanceStatEntity.initAttrValue(); PersonReq personReq = new PersonReq();
attendanceStatEntity.setStaffId(staffEntity.getId()); personReq.setPageNo(1);
attendanceStatEntity.setStaffName(staffEntity.getName()); personReq.setPageSize(1000);
attendanceStatEntity.setDeptId(staffEntity.getDeptId()); Rest<PersonDataInfo> personRest = hikPersonService.getPersonList(personReq);
attendanceStatEntity.setDeptName(staffEntity.getDeptName()); if (personRest.getCode() == YesNoEnum.YES.getValue()) {
attendanceStatEntity.setCreateTime(new Date()); List<PersonInfo> personInfoList = personRest.getData().getList();
attendanceStatEntity.setCreateUserId(Long.valueOf(1)); for (PersonInfo personInfo : personInfoList) {
//21假 StaffEntity staffEntity = staffService.getExtCache(personInfo.getJobNo());
attendanceStatEntity.setBackToUnit(balanceEntity.getBackToUnit()); DeptEntity deptEntity = deptService.selectOne(new DeptQuery().deptCode(personInfo.getOrgIndexCode()));
attendanceStatEntity.setOnDutyLeave(balanceEntity.getOnDutyLeave()); AttendanceVacationBalanceEntity balanceEntity = balanceService.selectOne(new AttendanceVacationBalanceQuery().staffId(staffEntity.getId()));
attendanceStatEntity.setOutOfOffice(balanceEntity.getOutOfOffice()); AttendanceStatEntity statEntity = attendanceStatService.selectOne(new AttendanceStatQuery().staffId(staffEntity.getId()));
attendanceStatEntity.setShiftCompensation(balanceEntity.getShiftCompensation()); //判断本地数据是否为空
attendanceStatEntity.setPhysicalExamination(balanceEntity.getPhysicalExamination()); if (ObjectUtils.isEmpty(staffEntity)) {
attendanceStatEntity.setQuarantine(balanceEntity.getQuarantine()); //新增员工信息
attendanceStatEntity.setBusinessTrip(balanceEntity.getBusinessTrip()); staffEntity = new StaffEntity();
attendanceStatEntity.setPublicHoliday(balanceEntity.getPublicHoliday()); staffEntity.initAttrValue();
attendanceStatEntity.setSickLeave(balanceEntity.getSickLeaveDays()); if (ObjectUtils.isEmpty(deptEntity)) {
attendanceStatEntity.setFuneralLeave(balanceEntity.getBereavementLeaveDays()); staffEntity.setDeptId(deptEntity.getId());
attendanceStatEntity.setMarriageLeave(balanceEntity.getMarriageLeaveDays()); }
attendanceStatEntity.setChildRearingLeave(balanceEntity.getChildRearingLeave()); staffEntity.setName(personInfo.getPersonName());
attendanceStatEntity.setBreastfeedingLeaveDays(balanceEntity.getBreastfeedingLeaveDays()); staffEntity.setRemarkId(personInfo.getPersonId());
attendanceStatEntity.setMenstrualLeaveDays(balanceEntity.getMenstrualLeaveDays()); staffEntity.setPicUri(personInfo.getPersonPhoto().getPicUri());
attendanceStatEntity.setAnnualLeaveDays(balanceEntity.getAnnualLeaveDays()); staffEntity.setServerIndexCode(personInfo.getPersonPhoto().getServerIndexCode());
attendanceStatEntity.setCompensatedLeaveDays(balanceEntity.getCompensatedLeaveDays()); staffEntity.setDeptName(personInfo.getOrgPathName());
attendanceStatEntity.setPaternityLeaveDays(balanceEntity.getPaternityLeaveDays()); staffEntity.setGender(personInfo.getGender());
attendanceStatEntity.setMaternityLeave(balanceEntity.getMaternityLeaveDays()); staffEntity.setWorkNum(personInfo.getJobNo());
attendanceStatEntity.setTransferBack(balanceEntity.getTransferBack()); staffEntity.setPhoneNumber(personInfo.getPhoneNo());
attendanceStatEntity.setHomeLeave(balanceEntity.getHomeLeave()); staffEntity.setCreateUserId(1L);
attendanceStatEntity.setPersonalLeave(balanceEntity.getPersonalLeaveDays()); staffEntity.setCreateTime(new Date());
// attendanceStatEntity.setLateTimes(goWorkCountDele); service.save(staffEntity);
// attendanceStatEntity.setNonCompliancePunch(BigDecimal.valueOf(errorAttendaceCount));
attendanceStatDao.insert(attendanceStatEntity); 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 attendanceVacationBalanceEntity = new AttendanceVacationBalanceEntity();
attendanceVacationBalanceEntity.initAttrValue(); attendanceVacationBalanceEntity.initAttrValue();
attendanceVacationBalanceEntity.setStaffId(staffEntity.getId()); attendanceVacationBalanceEntity.setStaffId(staffEntity.getId());
attendanceVacationBalanceEntity.setStaffName(staffEntity.getName()); attendanceVacationBalanceEntity.setStaffName(staffEntity.getName());
attendanceVacationBalanceEntity.setDeptId(deptEntity.getId()); attendanceVacationBalanceEntity.setDeptId(deptEntity.getId());
attendanceVacationBalanceEntity.setDeptName(deptEntity.getDeptName()); attendanceVacationBalanceEntity.setDeptName(deptEntity.getDeptName());
balanceDao.insert(attendanceVacationBalanceEntity); attendanceVacationBalanceEntity.setCreateTime(new Date());
//统计各级部门员工数量 attendanceVacationBalanceEntity.setCreateUserId(1L);
String ancestor = deptEntity.getAncestors().split(",", 2)[1]; balanceService.save(attendanceVacationBalanceEntity);
String[] ancestors = ancestor.split(","); //统计各级部门员工数量 todo 优化统计
for (String newAncestor : ancestors) { String ancestor = deptEntity.getAncestors().split(",", 2)[1];
DeptEntity deptEntity2 = deptService.get(Long.valueOf(newAncestor)); String[] ancestors = ancestor.split(",");
if (Objects.nonNull(deptEntity2)) { for (String newAncestor : ancestors) {
deptEntity2.setPersonNum(deptEntity2.getPersonNum() + 1); DeptEntity deptEntity2 = deptService.get(Long.valueOf(newAncestor));
deptService.update(deptEntity2); if (Objects.nonNull(deptEntity2)) {
} deptEntity2.setPersonNum(deptEntity2.getPersonNum() + 1);
deptService.update(deptEntity2);
} }
}
} else {
//更新
if (ObjectUtils.isEmpty(deptEntity)) {
staffEntity.setDeptId(deptEntity.getId());
} }
//本地数据不为空 staffEntity.setName(personInfo.getPersonName());
else { staffEntity.setRemarkId(personInfo.getPersonId());
//更新员工信息 staffEntity.setPicUri(personInfo.getPersonPhoto().getPicUri());
staffEntity1.initAttrValue(); staffEntity.setServerIndexCode(personInfo.getPersonPhoto().getServerIndexCode());
if (Objects.nonNull(deptEntity)) { staffEntity.setDeptName(personInfo.getOrgPathName());
staffEntity1.setDeptId(deptEntity.getId()); staffEntity.setGender(personInfo.getGender());
} staffEntity.setWorkNum(personInfo.getJobNo());
staffEntity1.setName(list.getPersonName()); staffEntity.setPhoneNumber(personInfo.getPhoneNo());
staffEntity1.setRemarkId(list.getPersonId()); staffEntity.setUpdateUserId(1L);
staffEntity1.setPicUri(list.getPersonPhoto().getPicUri()); staffEntity.setUpdateTime(new Date());
staffEntity1.setServerIndexCode(list.getPersonPhoto().getServerIndexCode()); service.update(staffEntity);
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);
}
AttendanceVacationBalanceEntity attendanceVacationBalanceEntity = new AttendanceVacationBalanceEntity(); //统计各级部门员工数量
attendanceVacationBalanceEntity.initAttrValue(); String ancestor = deptEntity.getAncestors().split(",", 2)[1];
attendanceVacationBalanceEntity.setStaffId(staffEntity1.getId()); String[] ancestors = ancestor.split(",");
attendanceVacationBalanceEntity.setStaffName(staffEntity1.getName()); for (String newAncestor : ancestors) {
attendanceVacationBalanceEntity.setDeptId(deptEntity.getId()); DeptEntity deptEntity2 = deptService.get(Long.valueOf(newAncestor));
attendanceVacationBalanceEntity.setDeptName(deptEntity.getDeptName()); if (Objects.nonNull(deptEntity2)) {
balanceDao.update(attendanceVacationBalanceEntity); 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) { private void syncDepts() {
e.printStackTrace(); //部门同步
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);
}
}
} }
} }
......
...@@ -8,6 +8,7 @@ import com.mortals.xhx.module.job.model.JobEntity; ...@@ -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.model.JobQuery;
import com.mortals.xhx.module.job.service.JobService; import com.mortals.xhx.module.job.service.JobService;
import com.mortals.xhx.module.staff.model.StaffEntity; 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 com.mortals.xhx.module.staff.service.impl.StaffServiceImpl;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -54,8 +55,8 @@ public class JobController extends BaseCRUDJsonBodyMappingController<JobService, ...@@ -54,8 +55,8 @@ public class JobController extends BaseCRUDJsonBodyMappingController<JobService,
@Override @Override
protected int infoAfter(Long id, Map<String, Object> model, JobEntity entity, Context context) throws AppException { protected int infoAfter(Long id, Map<String, Object> model, JobEntity entity, Context context) throws AppException {
List<StaffEntity> staffEntity = staffService.queryJob(id); List<StaffEntity> staffEntityList = this.staffService.find(new StaffQuery().positionId(id));
entity.setStaffEntities(staffEntity); entity.setStaffEntities(staffEntityList);
return super.infoAfter(id, model, entity, context); return super.infoAfter(id, model, entity, context);
} }
} }
...@@ -58,8 +58,5 @@ public interface StaffDao extends ICRUDDao<StaffEntity,Long>{ ...@@ -58,8 +58,5 @@ public interface StaffDao extends ICRUDDao<StaffEntity,Long>{
* */ * */
StaffEntity queryHik(String remarkId); StaffEntity queryHik(String remarkId);
/**
* 查询拥有职位的员工
* */
List<StaffEntity> queryJob(Long positionId);
} }
...@@ -59,10 +59,5 @@ public class StaffDaoImpl extends BaseCRUDDaoMybatis<StaffEntity,Long> implement ...@@ -59,10 +59,5 @@ public class StaffDaoImpl extends BaseCRUDDaoMybatis<StaffEntity,Long> implement
return this.getSqlSession().selectOne(this.getSqlId("queryHik"),remarkId); return this.getSqlSession().selectOne(this.getSqlId("queryHik"),remarkId);
} }
@Override
public List<StaffEntity> queryJob(Long positionId){
return getSqlSession().selectList(this.getSqlId("queryJob"),positionId);
}
} }
...@@ -20,6 +20,4 @@ public interface StaffService extends ICRUDCacheService<StaffEntity,Long> { ...@@ -20,6 +20,4 @@ public interface StaffService extends ICRUDCacheService<StaffEntity,Long> {
StaffInfoVo queryAll(); StaffInfoVo queryAll();
//统计所有在职员工 //统计所有在职员工
int queryAllPerson(); int queryAllPerson();
//查询员工数据
List<StaffEntity> queryJob(Long positionId);
} }
\ No newline at end of file
...@@ -62,10 +62,4 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta ...@@ -62,10 +62,4 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
return staffDao.queryInWork(); return staffDao.queryInWork();
} }
@Override
public List<StaffEntity> queryJob(Long positionId) {
return dao.queryJob(positionId);
}
} }
\ No newline at end of file
<?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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment