Commit df89ca64 by ilal

提交

parent 508e6fc4
...@@ -119,7 +119,7 @@ public class AttendanceTaskTiming{ ...@@ -119,7 +119,7 @@ public class AttendanceTaskTiming{
// @Scheduled(cron = "0 37 18 * * ?") // 测试:5秒执行一次 0 0 19 * * ? // @Scheduled(cron = "0 37 18 * * ?") // 测试:5秒执行一次 0 0 19 * * ?
// @Scheduled(cron = "0 */5 * * * ?") // @Scheduled(cron = "0 */5 * * * ?")
// @Scheduled(cron = "0 30 19 * * ?") @Scheduled(cron = "0 0 19 * * ?")
public void AttendanceTask() throws ParseException { public void AttendanceTask() throws ParseException {
// boolean implement = false; // boolean implement = false;
......
...@@ -62,6 +62,12 @@ public class Auth { ...@@ -62,6 +62,12 @@ public class Auth {
.eq(QyzxEmpEntAsso::getEmpNum, empNum) .eq(QyzxEmpEntAsso::getEmpNum, empNum)
.eq(QyzxEmpEntAsso::getUserType, SysRoleType.U_TYPE_ADMIN.getType())); .eq(QyzxEmpEntAsso::getUserType, SysRoleType.U_TYPE_ADMIN.getType()));
} }
private QyzxEmpEntAsso selectMain_(Integer orgCode, Integer empNum) {
return QyzxEmpEntAsso.builder().build()
.selectOne(new LambdaQueryWrapper<QyzxEmpEntAsso>().eq(QyzxEmpEntAsso::getOrgCode, orgCode)
.eq(QyzxEmpEntAsso::getEmpNum, empNum));
}
@PostMapping(value = "/addChildAccount") @PostMapping(value = "/addChildAccount")
@ApiOperation(value = "新增子账号", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "新增子账号", httpMethod = "POST", notes = "接口发布说明")
...@@ -69,7 +75,9 @@ public class Auth { ...@@ -69,7 +75,9 @@ public class Auth {
public Result<Void> addChildAccount(@CurrentUser UserBean userBean, @RequestParam Integer childEmpNum) { public Result<Void> addChildAccount(@CurrentUser UserBean userBean, @RequestParam Integer childEmpNum) {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
Integer empNum = userBean.getEmpNum(); Integer empNum = userBean.getEmpNum();
QyzxEmpEntAsso qyzxEmpEntAsso = selectMain(orgCode, empNum);
// QyzxEmpEntAsso qyzxEmpEntAsso = selectMain(orgCode, empNum);
QyzxEmpEntAsso qyzxEmpEntAsso = selectMain_(orgCode, childEmpNum);
if (qyzxEmpEntAsso != null) { if (qyzxEmpEntAsso != null) {
if (qyzxEmpEntAsso.getUserType() == SysRoleType.U_TYPE_ADMIN.getType() if (qyzxEmpEntAsso.getUserType() == SysRoleType.U_TYPE_ADMIN.getType()
|| qyzxEmpEntAsso.getUserType() == SysRoleType.U_TYPE_C_ADMIN.getType()) || qyzxEmpEntAsso.getUserType() == SysRoleType.U_TYPE_C_ADMIN.getType())
...@@ -93,7 +101,8 @@ public class Auth { ...@@ -93,7 +101,8 @@ public class Auth {
public Result<Void> removeChildAccount(@CurrentUser UserBean userBean, @RequestParam Integer childEmpNum) { public Result<Void> removeChildAccount(@CurrentUser UserBean userBean, @RequestParam Integer childEmpNum) {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
Integer empNum = userBean.getEmpNum(); Integer empNum = userBean.getEmpNum();
QyzxEmpEntAsso qyzxEmpEntAsso = selectMain(orgCode, empNum); // QyzxEmpEntAsso qyzxEmpEntAsso = selectMain(orgCode, empNum);
QyzxEmpEntAsso qyzxEmpEntAsso = selectMain_(orgCode, childEmpNum);
if (qyzxEmpEntAsso != null) { if (qyzxEmpEntAsso != null) {
if (qyzxEmpEntAsso.getUserType() == SysRoleType.U_TYPE_ADMIN.getType()) if (qyzxEmpEntAsso.getUserType() == SysRoleType.U_TYPE_ADMIN.getType())
return ResultUtil.error("主账号暂时不能删除"); return ResultUtil.error("主账号暂时不能删除");
......
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