Commit 164073cd by 邓实川 Committed by chenzg

操作日志查询条件更新,注册企业id状态更新

parent 7a886d22
......@@ -535,10 +535,13 @@ public class LoginController {
return ResultUtil.error("注册企业失败2");
}
login = qyzxEmpLogin;
} else {
login.setOrgId(qyId);
login.updateById();
}
// 员工信息
boolean b4 = YgglMainEmp.builder().orgCode(qyId).empNum(login.getId()).rzTime(new Date())
.name(username).phone(phone).workEmail(email).jobType(YgJobType.QUANZHI.getType())
boolean b4 = YgglMainEmp.builder().orgCode(qyId).empNum(login.getId()).rzTime(new Date()).name(username)
.phone(phone).workEmail(email).jobType(YgJobType.QUANZHI.getType())
.jobStatus(YgEnumInterface.jobStatus.ZHENSHI.getType()).build().insert();
if (!b4) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
......
package cn.timer.api.controller.qyzx;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
......@@ -40,7 +38,6 @@ import cn.timer.api.bean.qyzx.QyzxLogBuy;
import cn.timer.api.bean.qyzx.QyzxOperLog;
import cn.timer.api.bean.qyzx.QyzxPayServe;
import cn.timer.api.bean.qyzx.QyzxSuggestionFeeback;
import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.bean.zzgl.ZzglAuth;
import cn.timer.api.bean.zzgl.ZzglBmgwM;
import cn.timer.api.config.annotation.CurrentUser;
......@@ -479,17 +476,17 @@ public class QyzxController {
// IPage<QyzxOperLog> pages = qyzxOperLogMapper.selectPageByQuery(page, qyzxOperLogQuaryDto);
if (qyzxOperLogQuaryDto.getEmpNums() == null) {
YgglMainEmp main = YgglMainEmp.builder().build()
.selectOne(new LambdaQueryWrapper<YgglMainEmp>().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode())
.eq(YgglMainEmp::getIsManager, 1)
.select(YgglMainEmp::getEmpNum, YgglMainEmp::getIsManager));
List<YgglMainEmp> child = YgglMainEmp.builder().build()
.selectList(new LambdaQueryWrapper<YgglMainEmp>().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode())
.eq(YgglMainEmp::getIsManager, 2)
.select(YgglMainEmp::getEmpNum, YgglMainEmp::getIsManager));
child.add(main);
Collections.sort(child, Comparator.comparing(YgglMainEmp::getIsManager));
List<Integer> empNums = child.stream().map(YgglMainEmp::getEmpNum).collect(Collectors.toList());
List<Integer> roles = new ArrayList<Integer>();
roles.add(SysRoleType.U_TYPE_ADMIN.getType());
roles.add(SysRoleType.U_TYPE_C_ADMIN.getType());
List<QyzxEmpEntAsso> list = QyzxEmpEntAsso.builder().build()
.selectList(new LambdaQueryWrapper<QyzxEmpEntAsso>()
.eq(QyzxEmpEntAsso::getOrgCode, userBean.getOrgCode())
.in(QyzxEmpEntAsso::getUserType, roles).select(QyzxEmpEntAsso::getEmpNum));
List<Integer> empNums = list.stream().map(QyzxEmpEntAsso::getEmpNum).collect(Collectors.toList());
qyzxOperLogQuaryDto.setEmpNums(empNums);
}
IPage<QyzxOperLog> pages = qyzxOperLogMapper.selectPageByQuery2(page, qyzxOperLogQuaryDto);
......
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