Commit 913a8613 by tangzhaoqian Committed by chenzg

操作日志

parent 5c9d3577
......@@ -23,6 +23,11 @@ public enum BusinessType
UPDATE,
/**
* 新增/修改
*/
INSERT_UPDATE,
/**
* 删除
*/
DELETE,
......
......@@ -28,6 +28,8 @@ import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.timer.api.aspect.lang.annotation.Log;
import cn.timer.api.aspect.lang.enums.BusinessType;
import cn.timer.api.bean.qyzx.auth.QyzxAuthAccount;
import cn.timer.api.bean.qyzx.auth.QyzxAuthChild;
import cn.timer.api.bean.yggl.YgglMainEmp;
......@@ -59,6 +61,7 @@ public class QyzxAuthController {
@Transactional
@PostMapping(value = "/addChildAccount")
@ApiOperation(value = "新增子账号", httpMethod = "POST", notes = "接口发布说明")
@Log(title = "新增-子账号", businessType = BusinessType.INSERT)
public Result<QyzxAuthChild> addChildAccount(@CurrentUser UserBean userBean, @RequestParam Integer childEmpNum) {
Integer orgCode = userBean.getOrgCode();
Integer empNum = userBean.getEmpNum();
......@@ -115,6 +118,7 @@ public class QyzxAuthController {
@Transactional
@DeleteMapping(value = "/delChildAccount/{childEmpNum}")
@ApiOperation(value = "删除子账号", httpMethod = "DELETE", notes = "接口发布说明")
@Log(title = "删除-子账号", businessType = BusinessType.DELETE)
public Result<String> delChildAccount(@CurrentUser UserBean userBean, @PathVariable Integer childEmpNum) {
Integer empNum = userBean.getEmpNum();
QyzxAuthAccount qyzxAuthAccount = QyzxAuthAccount.builder().build().selectOne(
......@@ -136,6 +140,7 @@ public class QyzxAuthController {
@PostMapping(value = "/modifyMaxChild")
@ApiOperation(value = "修改子账号最大数量", httpMethod = "POST", notes = "接口发布说明")
@Log(title = "修改-子账号最大数量", businessType = BusinessType.UPDATE)
public Result<QyzxAuthChild> modifyMaxChild(@CurrentUser UserBean userBean, @RequestParam Integer maxNum) {
if (QyzxAuthAccount.builder().maxChildAccount(maxNum).build().update(
new QueryWrapper<QyzxAuthAccount>().lambda().eq(QyzxAuthAccount::getOrgCode, userBean.getOrgCode())))
......
......@@ -26,6 +26,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.timer.api.aspect.lang.annotation.Log;
import cn.timer.api.aspect.lang.enums.BusinessType;
import cn.timer.api.bean.qyzx.QyzxAttaFwjsb;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
import cn.timer.api.bean.qyzx.QyzxEmpLogin;
......@@ -113,6 +115,7 @@ public class QyzxController {
*/
@PostMapping(value = "/ent")
@ApiOperation(value = "添加/修改企业信息", httpMethod = "POST", notes = "接口发布说明")
@Log(title = "修改-企业信息", businessType = BusinessType.UPDATE)
public Result<QyzxEntInfoM> addent(@CurrentUser UserBean userBean, @RequestBody QyzxEntInfoM qyzxEntInfoM) {
qyzxEntInfoM.setId(userBean.getOrgCode());
......@@ -133,6 +136,7 @@ public class QyzxController {
*/
@PostMapping(value = "/entauth")
@ApiOperation(value = "企业认证", httpMethod = "POST", notes = "接口发布说明")
@Log(title = "企业认证", businessType = BusinessType.INSERT)
public Result<QyzxEntInfoM> entauth(@CurrentUser UserBean userBean, @RequestBody QyzxEntInfoM qyzxEntInfoM) {
// 设置审核状态
qyzxEntInfoM.setAttestStatus(CommonEnum.AUTH_TYPE_UNDEREVIEW.getType());
......
......@@ -1254,7 +1254,8 @@ public class YgglController {
Integer empNum = lzygQueryDto.getEmpNum();
YgglMainEmp ygglMainEmp = ygglMainEmpMapper.selectOne(new QueryWrapper<YgglMainEmp>().lambda()
.eq(YgglMainEmp::getEmpNum, empNum).eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()));
.eq(YgglMainEmp::getEmpNum, empNum)
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()));
YgglMainLzb ygglMainLzb = YgglMainLzb.builder().empNum(lzygQueryDto.getEmpNum()).build();
// 移动员工表数据到离职表
BeanUtil.copyProperties(ygglMainEmp, ygglMainLzb, "before_leaving_sts");
......@@ -1262,10 +1263,15 @@ public class YgglController {
YgglMainEmp.builder().empNum(lzygQueryDto.getEmpNum()).jobStatus(jobStatus.LIZHIZHONG.getType())
.beforeLeavingSts(ygglMainEmp.getJobStatus()).build()
.update(new UpdateWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, empNum));
.update(new UpdateWrapper<YgglMainEmp>().lambda()
.eq(YgglMainEmp::getEmpNum, empNum)
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()));
YgglMainLzb.builder().jobStatus(jobStatus.LIZHIZHONG.getType()).lzTime(lzygQueryDto.getLzTime())
.lzyy(lzygQueryDto.getLzyy()).lzbz(lzygQueryDto.getLzbz()).build()
.update(new UpdateWrapper<YgglMainLzb>().lambda().eq(YgglMainLzb::getEmpNum, empNum));
.update(new UpdateWrapper<YgglMainLzb>().lambda()
.eq(YgglMainLzb::getEmpNum, empNum)
.eq(YgglMainLzb::getOrgCode, userBean.getOrgCode()));
return ResultUtil.data(ygglMainLzb, "添加待离职员工成功");
}
......@@ -1282,20 +1288,28 @@ public class YgglController {
public Result<Void> addlzb(@CurrentUser UserBean userBean, @RequestBody LzygQueryDto lzygQueryDto) {
Integer empNum = lzygQueryDto.getEmpNum();
// 删除员工档案表
ygglMainEmpMapper.delete(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, empNum));
ygglMainEmpMapper.delete(new QueryWrapper<YgglMainEmp>().lambda()
.eq(YgglMainEmp::getEmpNum, empNum)
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()));
YgglMainLzb.builder().empNum(empNum).jobStatus(YgEnumInterface.jobStatus.YILIZHI.getType()).sjlzTime(new Date())
.build().update(new UpdateWrapper<YgglMainLzb>().lambda().eq(YgglMainLzb::getEmpNum, empNum));
.build().update(new UpdateWrapper<YgglMainLzb>().lambda()
.eq(YgglMainLzb::getEmpNum, empNum)
.eq(YgglMainLzb::getOrgCode, userBean.getOrgCode()));
LambdaQueryWrapper<QyzxEmpEntAsso> queryWrapper = new QueryWrapper<QyzxEmpEntAsso>().lambda()
.eq(QyzxEmpEntAsso::getEmpNum, empNum);
.eq(QyzxEmpEntAsso::getEmpNum, empNum)
.eq(QyzxEmpEntAsso::getOrgCode, userBean.getOrgCode())
;
// 确认离职 删除员工关联表
qyzxEmpEntAssoMapper.delete(queryWrapper);
// 初始化 部门主管
zzglBmgwMMapper.update(ZzglBmgwM.builder().leader(null).build(),
new UpdateWrapper<ZzglBmgwM>().lambda().eq(ZzglBmgwM::getLeader, empNum));
new UpdateWrapper<ZzglBmgwM>().lambda()
.eq(ZzglBmgwM::getOrgCode, userBean.getOrgCode())
.eq(ZzglBmgwM::getLeader, empNum));
// 更新当前企业
List<QyzxEmpEntAsso> listEEA = qyzxEmpEntAssoMapper.selectList(queryWrapper);
......
......@@ -235,13 +235,14 @@ public class ZzglController {
}
/**
* 添加/修改部门
* 添加/修改部门岗位
*
* @param
* @return
*/
@PostMapping(value = "/dept")
@ApiOperation(value = "添加/修改部门", httpMethod = "POST", notes = "接口发布说明")
@ApiOperation(value = "添加/修改部门岗位", httpMethod = "POST", notes = "接口发布说明")
@Log(title = "添加/修改-部门岗位", businessType = BusinessType.INSERT_UPDATE)
public Result<ZzglBmgwM> adddept(@CurrentUser UserBean userBean, @RequestBody ZzglBmgwM zzglBmgwM) {
Integer count = zzglBmgwMMapper.selectCount(new QueryWrapper<ZzglBmgwM>().lambda()
......@@ -272,7 +273,7 @@ public class ZzglController {
*/
@DeleteMapping(value = "/dept")
@ApiOperation(value = "删除部门岗位", httpMethod = "DELETE", notes = "接口发布说明")
@Log(title = "删除岗位", businessType = BusinessType.DELETE)
@Log(title = "删除-部门岗位", businessType = BusinessType.DELETE)
public Result<Integer> deldepts(@CurrentUser UserBean userBean, @RequestBody List<Integer> ids) {
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build();
......
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