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
638fb867
Commit
638fb867
authored
Jan 23, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
6496103d
6eea5b45
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1275 additions
and
203 deletions
+1275
-203
attendance-performance-manager-ui/admin/src/components/FileUpload.vue
...erformance-manager-ui/admin/src/components/FileUpload.vue
+17
-3
attendance-performance-manager-ui/admin/src/views/attendance/leave/record/list.vue
...nager-ui/admin/src/views/attendance/leave/record/list.vue
+1
-1
attendance-performance-manager-ui/admin/src/views/check/window/perform/drawershow.vue
...er-ui/admin/src/views/check/window/perform/drawershow.vue
+318
-10
attendance-performance-manager-ui/admin/src/views/check/window/perform/list.vue
...-manager-ui/admin/src/views/check/window/perform/list.vue
+47
-25
attendance-performance-manager-ui/admin/src/views/check/window/workman/perform/drawershow.vue
...min/src/views/check/window/workman/perform/drawershow.vue
+521
-130
attendance-performance-manager-ui/admin/src/views/check/window/workman/perform/list.vue
...-ui/admin/src/views/check/window/workman/perform/list.vue
+65
-12
attendance-performance-manager/src/main/java/com/mortals/xhx/base/login/sms/SMSLoginController.java
...va/com/mortals/xhx/base/login/sms/SMSLoginController.java
+83
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/base/login/sms/SMSLoginPdu.java
...main/java/com/mortals/xhx/base/login/sms/SMSLoginPdu.java
+11
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/user/service/UserService.java
...com/mortals/xhx/base/system/user/service/UserService.java
+17
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/user/service/impl/UserServiceImpl.java
...ls/xhx/base/system/user/service/impl/UserServiceImpl.java
+85
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/model/CheckWindowPerformEntity.java
...tals/xhx/module/check/model/CheckWindowPerformEntity.java
+2
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowOwnerDetailServiceImpl.java
...ule/window/service/impl/WindowOwnerDetailServiceImpl.java
+14
-19
attendance-performance-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowPerformServiceImpl.java
.../module/window/service/impl/WindowPerformServiceImpl.java
+57
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowWorkmanPerformServiceImpl.java
.../window/service/impl/WindowWorkmanPerformServiceImpl.java
+32
-0
common-lib/src/main/java/com/mortals/xhx/common/pdu/window/WindowPdu.java
...ain/java/com/mortals/xhx/common/pdu/window/WindowPdu.java
+5
-0
No files found.
attendance-performance-manager-ui/admin/src/components/FileUpload.vue
View file @
638fb867
...
...
@@ -44,7 +44,13 @@
class=
"el-upload-list__item ele-upload-list__item-content"
v-for=
"(file, index) in list"
>
<el-link
:href=
"baseUrl + file.url"
:underline=
"false"
target=
"_blank"
>
<el-link
:href=
"
file.url[0].indexOf('https') == -1 ? baseUrl + file.url : file.url
"
:underline=
"false"
target=
"_blank"
>
<span
class=
"el-icon-document"
style=
"font-size: 12px"
>
{{ getFileName(file.name) }}
</span>
...
...
@@ -145,15 +151,23 @@ export default {
list
()
{
let
temp
=
1
;
if
(
this
.
value
)
{
console
.
log
(
"
value
"
,
this
.
value
);
// 首先将值转为数组
const
list
=
Array
.
isArray
(
this
.
value
)
?
this
.
value
:
[
this
.
value
];
list
&&
list
.
forEach
((
v
)
=>
{
v
.
url
.
indexOf
(
"
https
"
)
>=
0
?
(
v
.
url
=
JSON
.
parse
(
v
.
url
))
:
v
.
url
;
});
// 然后将数组转为对象数组
this
.
fileList
=
list
.
map
((
item
)
=>
{
item
=
{
name
:
item
.
name
,
url
:
item
.
url
};
item
=
{
name
:
item
.
name
,
url
:
item
.
url
.
indexOf
(
"
[`
\
`
"
)
>=
0
?
JSON
.
parse
(
item
.
url
)
:
item
.
url
,
};
item
.
uid
=
item
.
uid
||
new
Date
().
getTime
()
+
temp
++
;
return
item
;
});
return
this
.
fileList
;
}
else
{
this
.
fileList
=
[];
...
...
attendance-performance-manager-ui/admin/src/views/attendance/leave/record/list.vue
View file @
638fb867
...
...
@@ -164,7 +164,7 @@ export default {
prop
:
"
auditResult
"
,
formatter
:
this
.
formatter
,
},
{
label
:
"
审批负责人
"
,
prop
:
"
approver
"
},
//
{ label: "审批负责人", prop: "approver" },
{
label
:
"
创建用户
"
,
...
...
attendance-performance-manager-ui/admin/src/views/check/window/perform/drawershow.vue
View file @
638fb867
This diff is collapsed.
Click to expand it.
attendance-performance-manager-ui/admin/src/views/check/window/perform/list.vue
View file @
638fb867
<
template
>
<div
class=
"page"
>
<div
class=
"btn_box"
style=
"position: absolute;top: 5
2
px;left: 10px;"
>
<div
class=
"btn_box"
style=
"position: absolute;top: 5
4
px;left: 10px;"
>
<el-radio-group
v-model=
"radio1"
@
input=
"changeRadio"
>
<el-radio-button
label=
"1"
>
窗口考核
</el-radio-button>
<el-radio-button
label=
"2"
>
工作人员考核
</el-radio-button>
...
...
@@ -51,7 +51,7 @@ export default {
doExport
()
{
this
.
isExport
=
true
;
this
.
$download
(
"
/check/
review/record
/exportExcel
"
,
"
/check/
window/perform
/exportExcel
"
,
{
page
:
1
,
size
:
-
1
,
...
...
@@ -66,7 +66,6 @@ export default {
},
// 切换表格
changeRadio
()
{
console
.
log
(
this
.
radio1
);
this
.
radio1
==
2
?
this
.
$router
.
push
(
"
/check/window/workman/perform/list?page=1
"
)
:
""
;
...
...
@@ -80,49 +79,68 @@ export default {
isshowTabPane
:
true
,
search
:
[
{
name
:
"
year
"
,
type
:
"
tex
t
"
,
label
:
"
考核年度
"
,
fuzzy
:
tru
e
,
name
:
"
deptId
"
,
type
:
"
selec
t
"
,
label
:
"
所属部门
"
,
fuzzy
:
fals
e
,
},
{
name
:
"
windowId
"
,
type
:
"
text
"
,
label
:
"
窗口ID
"
,
fuzzy
:
true
,
name
:
"
checkStatus
"
,
type
:
"
select
"
,
label
:
"
核查状态
"
,
fuzzy
:
false
,
},
{
name
:
"
createTimeMonth
"
,
type
:
"
month
"
,
label
:
"
请选择月份
"
,
fuzzy
:
false
,
},
{
name
:
"
owner
Id
"
,
name
:
"
owner
Name
"
,
type
:
"
text
"
,
label
:
"
窗口负责人id
"
,
fuzzy
:
true
,
width
:
200
,
label
:
"
窗口负责人姓名搜索
"
,
fuzzy
:
false
,
},
],
columns
:
[
{
type
:
"
selection
"
,
width
:
60
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
{
label
:
"
窗口负责人
"
,
prop
:
"
ownerName
"
},
{
label
:
"
管理组核查时间
"
,
prop
:
"
manageCheckTime
"
,
formatter
:
this
.
formatterDate
,
label
:
"
登记年月
"
,
formatter
:
(
row
)
=>
{
return
`
${
row
.
year
?
row
.
year
:
"
--
"
}
-
${
row
.
month
?
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
].
includes
(
row
.
month
)
?
"
0
"
+
row
.
month
:
row
.
month
:
"
--
"
}
`
;
},
},
{
label
:
"
管理组核查说明
"
,
prop
:
"
manageCheckDesc
"
},
{
label
:
"
管理组核查结果
"
,
prop
:
"
manageCheckResult
"
},
{
label
:
"
所属大厅
"
,
prop
:
"
salaName
"
},
{
label
:
"
领导组核查时间
"
,
prop
:
"
leaderCheckTime
"
,
formatter
:
this
.
formatterDate
,
label
:
"
所属部门
"
,
prop
:
"
deptName
"
,
},
{
label
:
"
领导组核查说明
"
,
prop
:
"
leaderCheckDesc
"
},
{
label
:
"
考核窗口
"
,
prop
:
"
windowName
"
},
{
label
:
"
领导组核查结果
"
,
prop
:
"
leaderCheckResult
"
},
{
label
:
"
表单名称
"
,
prop
:
"
fromName
"
},
{
label
:
"
总分分值
"
,
prop
:
"
sumScore
"
,
formatter
:
this
.
formatter
},
{
label
:
"
提交时间
"
,
prop
:
"
submitDate
"
,
formatter
:
this
.
formatterDate
,
},
{
label
:
"
处理状态
"
,
prop
:
"
checkStatus
"
,
formatter
:
this
.
formatter
},
{
label
:
"
操作
"
,
width
:
240
,
...
...
@@ -130,6 +148,10 @@ export default {
return
(
<
table
-
buttons
noAdd
noDel
noEdit
reCheck
text
=
{
"
自评核查
"
}
row
=
{
row
}
onEdit
=
{
this
.
toEdit
}
onView
=
{
this
.
toView
}
...
...
attendance-performance-manager-ui/admin/src/views/check/window/workman/perform/drawershow.vue
View file @
638fb867
This diff is collapsed.
Click to expand it.
attendance-performance-manager-ui/admin/src/views/check/window/workman/perform/list.vue
View file @
638fb867
<
template
>
<div
class=
"page"
>
<div
class=
"btn_box"
style=
"position: absolute;top: 5
2
px;left: 10px;"
>
<div
class=
"btn_box"
style=
"position: absolute;top: 5
4
px;left: 10px;"
>
<el-radio-group
v-model=
"radio1"
@
input=
"changeRadio"
>
<el-radio-button
label=
"1"
>
窗口考核
</el-radio-button>
<el-radio-button
label=
"2"
>
工作人员考核
</el-radio-button>
...
...
@@ -33,8 +33,7 @@ export default {
},
mixins
:
[
table
],
created
()
{
console
.
log
(
123
);
this
.
getData
();
// this.getData();
},
methods
:
{
/** 重写新增方法 */
...
...
@@ -53,7 +52,7 @@ export default {
doExport
()
{
this
.
isExport
=
true
;
this
.
$download
(
"
/check/
review/record
/exportExcel
"
,
"
/check/
window/workman/perform
/exportExcel
"
,
{
page
:
1
,
size
:
-
1
,
...
...
@@ -81,25 +80,75 @@ export default {
isshowTabPane
:
true
,
search
:
[
{
name
:
"
year
"
,
name
:
"
deptId
"
,
type
:
"
select
"
,
label
:
"
所属部门
"
,
fuzzy
:
false
,
},
{
name
:
"
checkStatus
"
,
type
:
"
select
"
,
label
:
"
核查状态
"
,
fuzzy
:
false
,
},
{
name
:
"
createTimeMonth
"
,
type
:
"
month
"
,
label
:
"
请选择月份
"
,
fuzzy
:
false
,
},
{
name
:
"
ownerName
"
,
type
:
"
text
"
,
label
:
"
考核年度
"
,
fuzzy
:
true
,
width
:
200
,
label
:
"
窗口负责人姓名搜索
"
,
fuzzy
:
false
,
},
],
columns
:
[
{
type
:
"
selection
"
,
width
:
60
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
{
label
:
"
窗口负责人
"
,
prop
:
"
ownerName
"
},
{
label
:
"
管理组核查时间
"
,
prop
:
"
manageCheckTime
"
,
formatter
:
this
.
formatterDate
,
label
:
"
登记年月
"
,
formatter
:
(
row
)
=>
{
return
`
${
row
.
year
?
row
.
year
:
"
--
"
}
-
${
row
.
month
?
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
].
includes
(
row
.
month
)
?
"
0
"
+
row
.
month
:
row
.
month
:
"
--
"
}
`
;
},
},
{
label
:
"
管理组核查说明
"
,
prop
:
"
manageCheckDesc
"
},
{
label
:
"
所属大厅
"
,
prop
:
"
salaName
"
},
{
label
:
"
所属部门
"
,
prop
:
"
deptName
"
,
},
{
label
:
"
考核窗口
"
,
prop
:
"
windowName
"
},
{
label
:
"
表单名称
"
,
prop
:
"
fromName
"
},
{
label
:
"
总分分值
"
,
prop
:
"
sumScore
"
,
formatter
:
this
.
formatter
},
{
label
:
"
提交时间
"
,
prop
:
"
submitDate
"
,
width
:
110
,
formatter
:
this
.
formatterDate
,
},
{
label
:
"
最新核查时间
"
,
prop
:
"
updateTime
"
,
width
:
150
,
formatter
:
this
.
formatterDate
,
},
{
label
:
"
处理状态
"
,
prop
:
"
checkStatus
"
,
formatter
:
this
.
formatter
},
{
label
:
"
管理组核查结果
"
,
prop
:
"
manageCheckResult
"
},
{
label
:
"
操作
"
,
width
:
240
,
...
...
@@ -107,6 +156,10 @@ export default {
return
(
<
table
-
buttons
noAdd
noDel
noEdit
reCheck
text
=
{
"
自评核查
"
}
row
=
{
row
}
onEdit
=
{
this
.
toEdit
}
onView
=
{
this
.
toView
}
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/base/login/sms/SMSLoginController.java
0 → 100644
View file @
638fb867
package
com.mortals.xhx.base.login.sms
;
import
cn.hutool.core.util.IdUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.IAuthTokenService
;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.web.BaseJsonBodyController
;
import
com.mortals.xhx.base.system.user.model.UserEntity
;
import
com.mortals.xhx.base.system.user.service.UserService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.HashMap
;
import
java.util.Map
;
@RestController
@RequestMapping
(
"sms"
)
public
class
SMSLoginController
extends
BaseJsonBodyController
{
@Autowired
private
UserService
userService
;
@Autowired
private
IAuthTokenService
authTokenService
;
@PostMapping
({
"send"
})
@UnAuth
public
Rest
<
Object
>
sendSmsVerifyCode
(
@RequestBody
SMSLoginPdu
smsLoginPdu
){
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
Context
context
=
this
.
getContext
();
String
busiDesc
=
"发送手机验证码"
;
int
code
=
1
;
try
{
userService
.
sendSmsVerifyCode
(
smsLoginPdu
.
getMobileNumber
());
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var9
)
{
code
=
-
1
;
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var9
);
}
ret
.
setCode
(
code
);
ret
.
setData
(
model
);
ret
.
setDict
(
model
.
get
(
"dict"
));
ret
.
setMsg
(
model
.
get
(
"message_info"
)
==
null
?
""
:
model
.
remove
(
"message_info"
).
toString
());
return
ret
;
}
@PostMapping
(
"login"
)
@UnAuth
public
String
login
(
@RequestBody
SMSLoginPdu
smsLoginPdu
)
throws
Exception
{
JSONObject
ret
=
new
JSONObject
();
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
String
ip
=
super
.
getRequestIP
(
request
);
UserEntity
userEntity
=
null
;
try
{
userEntity
=
userService
.
doSmsLogin
(
smsLoginPdu
.
getMobileNumber
(),
smsLoginPdu
.
getVerifyCode
(),
ip
);
userEntity
.
setLastLoginAddress
(
ip
);
userEntity
.
setLoginTime
(
System
.
currentTimeMillis
());
userEntity
.
setToken
(
IdUtil
.
fastSimpleUUID
());
userEntity
.
setExpireTime
(
DateUtils
.
addCurrDate
(
7
).
getTime
());
String
token
=
authTokenService
.
createToken
(
userEntity
);
data
.
put
(
"token"
,
token
);
data
.
put
(
"customer"
,
userEntity
);
recordSysLog
(
request
,
userEntity
,
"登录系统成功!"
);
ret
.
put
(
KEY_RESULT_DATA
,
data
);
ret
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
ret
.
put
(
KEY_RESULT_MSG
,
"用户登录系统成功!"
);
return
ret
.
toJSONString
();
}
catch
(
Exception
e
)
{
log
.
error
(
"login error "
,
e
);
ret
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_FAILURE
);
ret
.
put
(
KEY_RESULT_MSG
,
super
.
convertException
(
e
));
return
ret
.
toJSONString
();
}
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/base/login/sms/SMSLoginPdu.java
0 → 100644
View file @
638fb867
package
com.mortals.xhx.base.login.sms
;
import
lombok.Data
;
@Data
public
class
SMSLoginPdu
{
/** 手机号码 */
private
String
mobileNumber
;
/** 验证码 */
private
String
verifyCode
;
}
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/user/service/UserService.java
View file @
638fb867
...
...
@@ -117,4 +117,21 @@ public interface UserService extends ICRUDCacheService<UserEntity,Long> {
UserDao
getUserDao
();
/**
* 发送手机验证码
* @param mobileNumber
* @throws AppException
*/
void
sendSmsVerifyCode
(
String
mobileNumber
)
throws
AppException
;
/**
* 手机验证码登录
* @param mobileNumber
* @param verifyCode
* @param loginIp
* @return
* @throws AppException
*/
UserEntity
doSmsLogin
(
String
mobileNumber
,
String
verifyCode
,
String
loginIp
)
throws
AppException
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/user/service/impl/UserServiceImpl.java
View file @
638fb867
...
...
@@ -8,6 +8,9 @@
package
com.mortals.xhx.base.system.user.service.impl
;
import
cn.hutool.core.util.PhoneUtil
;
import
cn.hutool.core.util.RandomUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.ap.SysConstains
;
import
com.mortals.framework.common.code.UserType
;
import
com.mortals.framework.exception.AppException
;
...
...
@@ -16,6 +19,7 @@ import com.mortals.framework.model.PageInfo;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl
;
import
com.mortals.framework.util.HttpUtil
;
import
com.mortals.framework.util.SecurityUtil
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.base.system.menu.model.MenuEntity
;
...
...
@@ -31,6 +35,7 @@ import com.mortals.xhx.base.system.user.model.UserQuery;
import
com.mortals.xhx.base.system.user.service.UserService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
...
...
@@ -55,6 +60,16 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
@Autowired
private
RoleUserDao
roleUserDao
;
@Value
(
"${sms.smsSendUrl:http://sms.wx3.com.cn/api/index/index}"
)
private
String
smsApiUrl
;
@Value
(
"${sms.apiId:ADsUXLrS81vZDU95}"
)
private
String
appid
;
/** 短信模板ID**/
private
static
String
SMS_TPYE
=
"30"
;
private
static
String
SMS_VERIFY_CODE_KEY
=
"login:sms:verify:"
;
@Override
protected
String
getExtKey
(
UserEntity
data
)
{
return
data
.
getLoginName
();
...
...
@@ -347,4 +362,74 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
return
this
.
getDao
();
}
@Override
public
void
sendSmsVerifyCode
(
String
mobileNumber
)
throws
AppException
{
if
(
StringUtils
.
isEmpty
(
mobileNumber
)){
throw
new
AppException
(
"手机号不能为空"
);
}
if
(!
PhoneUtil
.
isPhone
(
mobileNumber
)){
throw
new
AppException
(
"手机号码格式不正确"
);
}
UserEntity
user
=
this
.
selectOne
(
new
UserQuery
().
mobile
(
mobileNumber
));
if
(
user
==
null
){
throw
new
AppException
(
"手机号码:"
+
mobileNumber
+
"没有注册用户"
);
}
String
verifyCode
=
cacheService
.
get
(
SMS_VERIFY_CODE_KEY
+
mobileNumber
);
if
(
StringUtils
.
isNotEmpty
(
verifyCode
)){
throw
new
AppException
(
"当前手机号码已发送验证码,请稍后重试"
);
}
try
{
Map
<
String
,
String
>
params
=
new
HashMap
<>();
params
.
put
(
"appid"
,
appid
);
params
.
put
(
"phone"
,
mobileNumber
);
params
.
put
(
"type"
,
SMS_TPYE
);
String
[]
json
=
new
String
[
2
];
String
vCode
=
RandomUtil
.
randomNumbers
(
6
);
json
[
0
]
=
vCode
;
json
[
1
]
=
"1"
;
params
.
put
(
"json"
,
JSONObject
.
toJSON
(
json
).
toString
());
String
resp
=
HttpUtil
.
doPost
(
smsApiUrl
,
params
);
JSONObject
respJson
=
JSONObject
.
parseObject
(
resp
);
if
(
respJson
.
getIntValue
(
"code"
)==
0
){
throw
new
AppException
(
"短信发送失败:"
+
respJson
.
getString
(
"message"
));
}
//有效期60秒
cacheService
.
setnx
(
SMS_VERIFY_CODE_KEY
+
mobileNumber
,
vCode
,
60
);
}
catch
(
Exception
e
){
log
.
error
(
"短信发送异常"
,
e
);
throw
new
AppException
(
"短信发送异常"
);
}
}
@Override
public
UserEntity
doSmsLogin
(
String
mobileNumber
,
String
verifyCode
,
String
loginIp
)
throws
AppException
{
if
(
StringUtils
.
isEmpty
(
mobileNumber
)){
throw
new
AppException
(
"手机号不能为空"
);
}
if
(
StringUtils
.
isEmpty
(
verifyCode
)){
throw
new
AppException
(
"验证码不能为空"
);
}
if
(!
PhoneUtil
.
isPhone
(
mobileNumber
)){
throw
new
AppException
(
"手机号码格式不正确"
);
}
UserEntity
customer
=
this
.
selectOne
(
new
UserQuery
().
mobile
(
mobileNumber
));
if
(
customer
==
null
){
throw
new
AppException
(
"手机号码:"
+
mobileNumber
+
"没有注册用户"
);
}
String
vCode
=
cacheService
.
get
(
SMS_VERIFY_CODE_KEY
+
mobileNumber
);
if
(
StringUtils
.
isEmpty
(
vCode
)){
throw
new
AppException
(
"验证码已失效"
);
}
if
(!
verifyCode
.
equals
(
vCode
)){
throw
new
AppException
(
"验证码不正确"
);
}
UserEntity
update
=
new
UserEntity
();
update
.
setId
(
customer
.
getId
());
update
.
setLastLoginAddress
(
loginIp
);
update
.
setLastLoginTime
(
new
Date
());
this
.
update
(
update
);
return
customer
;
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/model/CheckWindowPerformEntity.java
View file @
638fb867
...
...
@@ -155,11 +155,11 @@ public class CheckWindowPerformEntity extends CheckWindowPerformVo {
this
.
sumScore
=
BigDecimal
.
ZERO
;
this
.
submitDate
=
new
Date
();
this
.
manageCheckPerson
=
""
;
this
.
manageCheckTime
=
n
ew
Date
()
;
this
.
manageCheckTime
=
n
ull
;
this
.
manageCheckDesc
=
""
;
this
.
manageCheckResult
=
""
;
this
.
leaderCheckPerson
=
""
;
this
.
leaderCheckTime
=
n
ew
Date
()
;
this
.
leaderCheckTime
=
n
ull
;
this
.
leaderCheckDesc
=
""
;
this
.
leaderCheckResult
=
""
;
this
.
checkStatus
=
1
;
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowOwnerDetailServiceImpl.java
View file @
638fb867
package
com.mortals.xhx.module.window.service.impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.pdu.RespData
;
...
...
@@ -15,10 +16,7 @@ import com.mortals.xhx.module.window.model.WindowOwnerDetailEntity;
import
com.mortals.xhx.module.window.service.WindowOwnerDetailService
;
import
lombok.extern.slf4j.Slf4j
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -38,21 +36,18 @@ public class WindowOwnerDetailServiceImpl extends AbstractCRUDServiceImpl<Window
@Override
public
List
<
WindowPdu
>
subWindowPduList
(
WindowPdu
pdu
)
{
List
<
WindowPdu
>
subList
=
new
ArrayList
<>();
if
(
pdu
.
getSiteId
()==
null
){
pdu
.
setSiteId
(
1
l
);
//默认只查宜宾市民中心
}
pdu
.
setSize
(-
1
);
Rest
<
RespData
<
List
<
WindowPdu
>>>
respDataRest
=
windowFeign
.
list
(
pdu
);
if
(
respDataRest
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
List
<
WindowOwnerDetailEntity
>
ownerDetail
=
this
.
getAllList
();
if
(!
CollectionUtils
.
isEmpty
(
ownerDetail
)){
Map
<
Long
,
List
<
WindowOwnerDetailEntity
>>
windowMap
=
ownerDetail
.
stream
().
collect
(
Collectors
.
groupingBy
(
WindowOwnerDetailEntity:
:
getWindowId
));
List
<
WindowPdu
>
allWindow
=
respDataRest
.
getData
().
getData
();
for
(
WindowPdu
item:
allWindow
){
if
(!
windowMap
.
containsKey
(
item
.
getId
())){
subList
.
add
(
item
);
}
}
List
<
WindowOwnerDetailEntity
>
ownerDetail
=
this
.
getAllList
();
if
(!
CollectionUtils
.
isEmpty
(
ownerDetail
)){
Long
[]
windows
=
ownerDetail
.
stream
().
map
(
WindowOwnerDetailEntity:
:
getWindowId
).
toArray
(
Long
[]::
new
);
pdu
.
setIdNotList
(
Arrays
.
asList
(
windows
));
if
(
pdu
.
getSiteId
()==
null
){
pdu
.
setSiteId
(
1
l
);
//默认只查宜宾市民中心
}
pdu
.
setSize
(-
1
);
Rest
<
RespData
<
List
<
WindowPdu
>>>
respDataRest
=
windowFeign
.
list
(
pdu
);
log
.
info
(
JSONObject
.
toJSONString
(
respDataRest
));
if
(
respDataRest
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
subList
=
respDataRest
.
getData
().
getData
();
}
}
return
subList
;
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowPerformServiceImpl.java
View file @
638fb867
package
com.mortals.xhx.module.window.service.impl
;
import
com.mortals.xhx.common.code.FillStatusEnum
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.model.CheckWindowPerformEntity
;
import
com.mortals.xhx.module.check.model.CheckWindowPerformQuery
;
import
com.mortals.xhx.module.check.model.CheckWindowWorkmanPerformEntity
;
import
com.mortals.xhx.module.check.model.CheckWindowWorkmanPerformQuery
;
import
com.mortals.xhx.module.check.service.CheckWindowPerformService
;
import
com.mortals.xhx.module.window.model.WindowWorkmanPerformDetailEntity
;
import
com.mortals.xhx.module.window.model.WindowWorkmanPerformDetailQuery
;
import
com.mortals.xhx.module.window.model.WindowWorkmanPerformEntity
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
...
...
@@ -7,6 +20,11 @@ import com.mortals.xhx.module.window.dao.WindowPerformDao;
import
com.mortals.xhx.module.window.model.WindowPerformEntity
;
import
com.mortals.xhx.module.window.service.WindowPerformService
;
import
lombok.extern.slf4j.Slf4j
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
/**
* WindowPerformService
* 大厅窗口信息 service实现
...
...
@@ -17,5 +35,43 @@ import lombok.extern.slf4j.Slf4j;
@Service
(
"windowPerformService"
)
@Slf4j
public
class
WindowPerformServiceImpl
extends
AbstractCRUDServiceImpl
<
WindowPerformDao
,
WindowPerformEntity
,
Long
>
implements
WindowPerformService
{
@Autowired
private
CheckWindowPerformService
checkWindowPerformService
;
@Override
protected
void
saveAfter
(
WindowPerformEntity
entity
,
Context
context
)
throws
AppException
{
if
(
entity
.
getFillStatus
()==
FillStatusEnum
.
提交
.
getValue
()){
saveToCheck
(
entity
);
}
super
.
saveAfter
(
entity
,
context
);
}
@Override
protected
void
updateAfter
(
WindowPerformEntity
entity
,
Context
context
)
throws
AppException
{
if
(
entity
.
getFillStatus
()==
FillStatusEnum
.
提交
.
getValue
()){
saveToCheck
(
entity
);
}
super
.
updateAfter
(
entity
,
context
);
}
@Override
protected
void
removeAfter
(
Long
[]
ids
,
Context
context
,
int
result
)
throws
AppException
{
List
<
CheckWindowPerformEntity
>
performEntitys
=
checkWindowPerformService
.
find
(
new
CheckWindowPerformQuery
().
recordIdList
(
Arrays
.
asList
(
ids
)));
checkWindowPerformService
.
removeList
(
performEntitys
,
context
);
super
.
removeAfter
(
ids
,
context
,
result
);
}
private
void
saveToCheck
(
WindowPerformEntity
entity
){
CheckWindowPerformEntity
perform
=
new
CheckWindowPerformEntity
();
perform
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
perform
,
BeanUtil
.
getNullPropertyNames
(
entity
));
perform
.
setId
(
null
);
perform
.
setRecordId
(
entity
.
getId
());
perform
.
setFromName
(
"市政务服务大厅窗口考核登记表"
);
perform
.
setSubmitDate
(
entity
.
getFillDate
());
perform
.
setUpdateTime
(
null
);
perform
.
setUpdateUserId
(
null
);
checkWindowPerformService
.
save
(
perform
);
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowWorkmanPerformServiceImpl.java
View file @
638fb867
package
com.mortals.xhx.module.window.service.impl
;
import
com.mortals.xhx.common.code.FillStatusEnum
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.model.CheckWindowPerformEntity
;
import
com.mortals.xhx.module.check.model.CheckWindowPerformQuery
;
import
com.mortals.xhx.module.check.model.CheckWindowWorkmanPerformEntity
;
import
com.mortals.xhx.module.check.model.CheckWindowWorkmanPerformQuery
;
import
com.mortals.xhx.module.check.service.CheckWindowPerformService
;
import
com.mortals.xhx.module.check.service.CheckWindowWorkmanPerformService
;
import
com.mortals.xhx.module.window.model.WindowWorkmanPerformDetailEntity
;
import
com.mortals.xhx.module.window.model.WindowWorkmanPerformDetailQuery
;
import
com.mortals.xhx.module.window.service.WindowWorkmanPerformDetailService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
...
...
@@ -30,6 +39,8 @@ public class WindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImpl<Win
@Autowired
private
WindowWorkmanPerformDetailService
windowWorkmanPerformDetailService
;
@Autowired
private
CheckWindowWorkmanPerformService
checkWindowWorkmanPerformService
;
@Override
...
...
@@ -42,6 +53,9 @@ public class WindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImpl<Win
});
windowWorkmanPerformDetailService
.
save
(
entity
.
getWorkmanPerformDetailList
());
}
if
(
entity
.
getFillStatus
()==
FillStatusEnum
.
提交
.
getValue
()){
saveToCheck
(
entity
);
}
super
.
saveAfter
(
entity
,
context
);
}
...
...
@@ -59,6 +73,9 @@ public class WindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImpl<Win
});
windowWorkmanPerformDetailService
.
save
(
entity
.
getWorkmanPerformDetailList
());
}
if
(
entity
.
getFillStatus
()==
FillStatusEnum
.
提交
.
getValue
()){
saveToCheck
(
entity
);
}
super
.
updateAfter
(
entity
,
context
);
}
...
...
@@ -66,6 +83,21 @@ public class WindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImpl<Win
protected
void
removeAfter
(
Long
[]
ids
,
Context
context
,
int
result
)
throws
AppException
{
List
<
WindowWorkmanPerformDetailEntity
>
detailEntities
=
windowWorkmanPerformDetailService
.
find
(
new
WindowWorkmanPerformDetailQuery
().
performIdList
(
Arrays
.
asList
(
ids
)));
windowWorkmanPerformDetailService
.
removeList
(
detailEntities
,
context
);
List
<
CheckWindowWorkmanPerformEntity
>
performEntitys
=
checkWindowWorkmanPerformService
.
find
(
new
CheckWindowWorkmanPerformQuery
().
recordIdList
(
Arrays
.
asList
(
ids
)));
checkWindowWorkmanPerformService
.
removeList
(
performEntitys
,
context
);
super
.
removeAfter
(
ids
,
context
,
result
);
}
private
void
saveToCheck
(
WindowWorkmanPerformEntity
entity
){
CheckWindowWorkmanPerformEntity
perform
=
new
CheckWindowWorkmanPerformEntity
();
perform
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
perform
,
BeanUtil
.
getNullPropertyNames
(
entity
));
perform
.
setId
(
null
);
perform
.
setRecordId
(
entity
.
getId
());
perform
.
setFromName
(
"市政务服务大厅窗口工作人员考核汇总表"
);
perform
.
setSubmitDate
(
entity
.
getFillDate
());
perform
.
setUpdateTime
(
null
);
perform
.
setUpdateUserId
(
null
);
checkWindowWorkmanPerformService
.
save
(
perform
);
}
}
\ No newline at end of file
common-lib/src/main/java/com/mortals/xhx/common/pdu/window/WindowPdu.java
View file @
638fb867
...
...
@@ -3,6 +3,8 @@ package com.mortals.xhx.common.pdu.window;
import
com.mortals.framework.model.BaseEntityLong
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
WindowPdu
extends
BaseEntityLong
{
/**
...
...
@@ -87,4 +89,7 @@ public class WindowPdu extends BaseEntityLong {
*/
private
String
hallName
;
/** 序号,主键,自增长排除列表 */
private
List
<
Long
>
idNotList
;
}
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