Commit e0481d0d by yuquan.zhu

Merge branch 'develop' of develop-gitlab.youlingrc.com:8timerv2/8timerapiv200 into zyq_debug

parents 79240d9f b9d256d1
...@@ -347,6 +347,8 @@ public class LoginController { ...@@ -347,6 +347,8 @@ public class LoginController {
Integer type = entRegisterDto.getPwUpdateType();// 验证方式 Integer type = entRegisterDto.getPwUpdateType();// 验证方式
QyzxEmpLogin qyzxEmpLogin = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper) QyzxEmpLogin qyzxEmpLogin = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper)
.eq(!StrUtil.hasBlank(phone), QyzxEmpLogin::getPhone, phone).one();// 员工登录表 .eq(!StrUtil.hasBlank(phone), QyzxEmpLogin::getPhone, phone).one();// 员工登录表
if(qyzxEmpLogin != null) {
String dbPwd = qyzxEmpLogin.getPw();// 数据库原密码 String dbPwd = qyzxEmpLogin.getPw();// 数据库原密码
if (type == 1) { if (type == 1) {
if (!Md5.md5(oldPwd).equals(dbPwd)) { if (!Md5.md5(oldPwd).equals(dbPwd)) {
...@@ -367,6 +369,11 @@ public class LoginController { ...@@ -367,6 +369,11 @@ public class LoginController {
qyzxEmpLogin.setPw(Md5.md5(pw)); qyzxEmpLogin.setPw(Md5.md5(pw));
qyzxEmpLogin.updateById(); qyzxEmpLogin.updateById();
return ResultUtil.success("修改成功"); return ResultUtil.success("修改成功");
}else {
return ResultUtil.error("账号不存在");
}
} }
/** /**
...@@ -446,9 +453,29 @@ public class LoginController { ...@@ -446,9 +453,29 @@ public class LoginController {
// String codeRedis = redisTemplate.get(phone).toString(); // String codeRedis = redisTemplate.get(phone).toString();
String codeRedis = session.getAttribute(phone) != null ? session.getAttribute(phone).toString() : ""; String codeRedis = session.getAttribute(phone) != null ? session.getAttribute(phone).toString() : "";
if(authentication_code !=null && !("").equals(authentication_code)) {
if (authentication_code.equals(code)) {
QyzxEmpLogin qyzxEmpLogin1 = qyzxEmpLoginMapper.selectById(empNum);
if (qyzxEmpLogin1 != null) {
qyzxEmpLogin1.setPhone(phone);
qyzxEmpLogin1.setPw(Md5.md5(pwd));// 密码初始化
qyzxEmpLogin1.updateById();
// 员工信息 手机号修改
YgglMainEmp.builder().phone(phone).build().update(
new UpdateWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, qyzxEmpLogin1.getId()));
return ResultUtil.success("修改手机号/用户名成功");
}
}
}
if (code == null || !code.toString().equals(codeRedis)) { if (code == null || !code.toString().equals(codeRedis)) {
return ResultUtil.error("验证码不符/失效"); return ResultUtil.error("验证码不符/失效");
} }
QyzxEmpLogin qyzxEmpLogin1 = qyzxEmpLoginMapper.selectById(empNum); QyzxEmpLogin qyzxEmpLogin1 = qyzxEmpLoginMapper.selectById(empNum);
if (qyzxEmpLogin1 != null) { if (qyzxEmpLogin1 != null) {
...@@ -677,6 +704,15 @@ public class LoginController { ...@@ -677,6 +704,15 @@ public class LoginController {
String codeRedis = session.getAttribute(phone) != null ? session.getAttribute(phone).toString() : ""; String codeRedis = session.getAttribute(phone) != null ? session.getAttribute(phone).toString() : "";
if(authentication_code !=null && !("").equals(authentication_code)) {
if (authentication_code.equals(code)) {
QyzxEmpLogin qyzxEmpLogin1 = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper)
.eq(!StrUtil.hasBlank(phone), QyzxEmpLogin::getPhone, phone).one();
return loginhan(qyzxEmpLogin1, request);
}
}
if (codeRedis == null || !code.equals(codeRedis)) if (codeRedis == null || !code.equals(codeRedis))
return ResultUtil.error("验证码不符"); return ResultUtil.error("验证码不符");
......
...@@ -2671,17 +2671,29 @@ public class TimeCardController { ...@@ -2671,17 +2671,29 @@ public class TimeCardController {
@Autowired @Autowired
private KqglAssoRelationSummaryMapper kqglassorelationsummarymapper; private KqglAssoRelationSummaryMapper kqglassorelationsummarymapper;
@GetMapping(value = "/worktable_attendance_from") @GetMapping(value = "/worktable_attendance_from/{date}")
@ApiOperation(value = "999:工作台考勤表格", httpMethod = "GET", notes = "查询数据") @ApiOperation(value = "999:工作台考勤表格", httpMethod = "GET", notes = "查询数据")
public Result<Object> worktable_attendance_from(@CurrentUser UserBean userBean) throws ParseException { public Result<Object> worktable_attendance_from(@CurrentUser UserBean userBean,@PathVariable("date") String date) throws ParseException {
CalendarTableDataDto tabl = CalendarTableDataDto.builder().build(); CalendarTableDataDto tabl = CalendarTableDataDto.builder().build();
String belongyear = new SimpleDateFormat("yyyy").format(new Date()); String belongyear = null;
String belongmonth = new SimpleDateFormat("MM").format(new Date()); String belongmonth = null;
String ttstr = null;//
if(date == null || ("").equals(date)) {
belongyear = new SimpleDateFormat("yyyy").format(new Date());
belongmonth = new SimpleDateFormat("MM").format(new Date());
ttstr = new SimpleDateFormat("yyyy-MM").format(new Date()).toString();//
}else {
belongyear = date.substring(0, 4);
belongmonth = date.substring(5, 7);
ttstr = date;
}
String ttstr = new SimpleDateFormat("yyyy-MM").format(new Date()).toString();//
//1:加班 2:请假 3:出差 4:外出 5:补卡 //1:加班 2:请假 3:出差 4:外出 5:补卡
KqglAssoRelationSummary sums = kqglassorelationsummarymapper.selectTabledata(userBean.getEmpNum(), 1, ttstr); KqglAssoRelationSummary sums = kqglassorelationsummarymapper.selectTabledata(userBean.getEmpNum(), 1, ttstr);
......
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