Commit df89ca64 by ilal

提交

parent 508e6fc4
......@@ -119,7 +119,7 @@ public class AttendanceTaskTiming{
// @Scheduled(cron = "0 37 18 * * ?") // 测试:5秒执行一次 0 0 19 * * ?
// @Scheduled(cron = "0 */5 * * * ?")
// @Scheduled(cron = "0 30 19 * * ?")
@Scheduled(cron = "0 0 19 * * ?")
public void AttendanceTask() throws ParseException {
// boolean implement = false;
......
......@@ -63,13 +63,21 @@ public class Auth {
.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")
@ApiOperation(value = "新增子账号", httpMethod = "POST", notes = "接口发布说明")
@Log(title = "新增-子账号", businessType = BusinessType.INSERT)
public Result<Void> addChildAccount(@CurrentUser UserBean userBean, @RequestParam Integer childEmpNum) {
Integer orgCode = userBean.getOrgCode();
Integer empNum = userBean.getEmpNum();
QyzxEmpEntAsso qyzxEmpEntAsso = selectMain(orgCode, empNum);
// QyzxEmpEntAsso qyzxEmpEntAsso = selectMain(orgCode, empNum);
QyzxEmpEntAsso qyzxEmpEntAsso = selectMain_(orgCode, childEmpNum);
if (qyzxEmpEntAsso != null) {
if (qyzxEmpEntAsso.getUserType() == SysRoleType.U_TYPE_ADMIN.getType()
|| qyzxEmpEntAsso.getUserType() == SysRoleType.U_TYPE_C_ADMIN.getType())
......@@ -93,7 +101,8 @@ public class Auth {
public Result<Void> removeChildAccount(@CurrentUser UserBean userBean, @RequestParam Integer childEmpNum) {
Integer orgCode = userBean.getOrgCode();
Integer empNum = userBean.getEmpNum();
QyzxEmpEntAsso qyzxEmpEntAsso = selectMain(orgCode, empNum);
// QyzxEmpEntAsso qyzxEmpEntAsso = selectMain(orgCode, empNum);
QyzxEmpEntAsso qyzxEmpEntAsso = selectMain_(orgCode, childEmpNum);
if (qyzxEmpEntAsso != null) {
if (qyzxEmpEntAsso.getUserType() == SysRoleType.U_TYPE_ADMIN.getType())
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