feat: 请假
This commit is contained in:
parent
cf2cfa2bb6
commit
87a09f20d1
|
@ -210,7 +210,7 @@ public class NonWorkingDayDrinkingReportController extends BaseController {
|
||||||
.one();
|
.one();
|
||||||
one.setApprovalStatus(state);
|
one.setApprovalStatus(state);
|
||||||
boolean result2 = approvalsProcessService.updateById(one);
|
boolean result2 = approvalsProcessService.updateById(one);
|
||||||
gwglLog gwglLog = new gwglLog();
|
/*gwglLog gwglLog = new gwglLog();
|
||||||
gwglLog.setApplyNo(nonWorkingDayDrinkingReport.getApplyNo());
|
gwglLog.setApplyNo(nonWorkingDayDrinkingReport.getApplyNo());
|
||||||
gwglLog.setDeptId(nonWorkingDayDrinkingReport.getDeptId());
|
gwglLog.setDeptId(nonWorkingDayDrinkingReport.getDeptId());
|
||||||
gwglLog.setDeptName(nonWorkingDayDrinkingReport.getDeptName());
|
gwglLog.setDeptName(nonWorkingDayDrinkingReport.getDeptName());
|
||||||
|
@ -224,7 +224,15 @@ public class NonWorkingDayDrinkingReportController extends BaseController {
|
||||||
gwglLog.setChecker(user.getNickName());
|
gwglLog.setChecker(user.getNickName());
|
||||||
gwglLog.setCheckTime(System.currentTimeMillis());
|
gwglLog.setCheckTime(System.currentTimeMillis());
|
||||||
gwglLog.setCheckState(state);
|
gwglLog.setCheckState(state);
|
||||||
boolean result1 = gwglLogService.save(gwglLog);
|
boolean result1 = gwglLogService.save(gwglLog);*/
|
||||||
|
boolean result1 = gwglLogService.lambdaUpdate()
|
||||||
|
.eq(gwglLog::getApplyNo, nonWorkingDayDrinkingReport.getApplyNo())
|
||||||
|
.set(gwglLog::getResult, 1)
|
||||||
|
.set(gwglLog::getChecker, user.getNickName())
|
||||||
|
.set(gwglLog::getCheckTime, System.currentTimeMillis())
|
||||||
|
.set(gwglLog::getCheckState, state)
|
||||||
|
.update();
|
||||||
|
|
||||||
if (!result || !result1) {
|
if (!result || !result1) {
|
||||||
return AjaxResult.error("审批非工作日饮酒报备单失败");
|
return AjaxResult.error("审批非工作日饮酒报备单失败");
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ import com.ruoyi.system.service.ISysUserService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
@ -99,6 +100,7 @@ public class PoliceLeaveApprovalController extends BaseController {
|
||||||
|
|
||||||
@ApiOperation("新增或修改民警请(休)假审批表 传id为修改 不传id为新增")
|
@ApiOperation("新增或修改民警请(休)假审批表 传id为修改 不传id为新增")
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
|
@Transactional
|
||||||
public AjaxResult add(@RequestBody PoliceLeaveApproval policeLeaveApproval) {
|
public AjaxResult add(@RequestBody PoliceLeaveApproval policeLeaveApproval) {
|
||||||
List<SysDept> sysDepts = deptService.selectAllDeptList();
|
List<SysDept> sysDepts = deptService.selectAllDeptList();
|
||||||
// 部门领导
|
// 部门领导
|
||||||
|
@ -141,6 +143,16 @@ public class PoliceLeaveApprovalController extends BaseController {
|
||||||
approvalProcess.setCreateTime(new Date().getTime());
|
approvalProcess.setCreateTime(new Date().getTime());
|
||||||
approvalProcess.setUuid(uuids);
|
approvalProcess.setUuid(uuids);
|
||||||
approvalsProcessService.save(approvalProcess);
|
approvalsProcessService.save(approvalProcess);
|
||||||
|
gwglLog gwglLog = new gwglLog();
|
||||||
|
gwglLog.setApplyNo(s);
|
||||||
|
gwglLog.setResult(1);
|
||||||
|
gwglLog.setDeptId(user.getDeptId());
|
||||||
|
gwglLog.setDeptName(user.getDept().getDeptName());
|
||||||
|
gwglLog.setUserId(user.getUserId());
|
||||||
|
gwglLog.setChecker(user.getDept().getLeader());
|
||||||
|
gwglLog.setUserName(user.getNickName());
|
||||||
|
gwglLog.setCreateTime(new Date().getTime());
|
||||||
|
gwglLogService.save(gwglLog);
|
||||||
|
|
||||||
if (leader.contains(user.getNickName())) {
|
if (leader.contains(user.getNickName())) {
|
||||||
// 单位领导
|
// 单位领导
|
||||||
|
@ -216,7 +228,6 @@ public class PoliceLeaveApprovalController extends BaseController {
|
||||||
gwglLog.setCreateTime(policeLeaveApproval.getCreateTime());
|
gwglLog.setCreateTime(policeLeaveApproval.getCreateTime());
|
||||||
gwglLog.setReason(policeLeaveApproval.getReason());
|
gwglLog.setReason(policeLeaveApproval.getReason());
|
||||||
gwglLog.setResult(state);
|
gwglLog.setResult(state);
|
||||||
gwglLog.setApplyNo(policeLeaveApproval.getApplyNo());
|
|
||||||
gwglLog.setType(1);
|
gwglLog.setType(1);
|
||||||
gwglLog.setReason(policeLeaveApproval.getReason());
|
gwglLog.setReason(policeLeaveApproval.getReason());
|
||||||
gwglLog.setChecker(user.getNickName());
|
gwglLog.setChecker(user.getNickName());
|
||||||
|
@ -238,7 +249,6 @@ public class PoliceLeaveApprovalController extends BaseController {
|
||||||
gwglLog.setCreateTime(policeLeaveApproval.getCreateTime());
|
gwglLog.setCreateTime(policeLeaveApproval.getCreateTime());
|
||||||
gwglLog.setReason(policeLeaveApproval.getReason());
|
gwglLog.setReason(policeLeaveApproval.getReason());
|
||||||
gwglLog.setResult(state);
|
gwglLog.setResult(state);
|
||||||
gwglLog.setApplyNo(policeLeaveApproval.getApplyNo());
|
|
||||||
gwglLog.setType(policeLeaveApproval.getLeaveType());
|
gwglLog.setType(policeLeaveApproval.getLeaveType());
|
||||||
gwglLog.setReason(policeLeaveApproval.getReason());
|
gwglLog.setReason(policeLeaveApproval.getReason());
|
||||||
gwglLog.setChecker(user.getNickName());
|
gwglLog.setChecker(user.getNickName());
|
||||||
|
@ -260,7 +270,6 @@ public class PoliceLeaveApprovalController extends BaseController {
|
||||||
gwglLog.setCreateTime(policeLeaveApproval.getCreateTime());
|
gwglLog.setCreateTime(policeLeaveApproval.getCreateTime());
|
||||||
gwglLog.setReason(policeLeaveApproval.getReason());
|
gwglLog.setReason(policeLeaveApproval.getReason());
|
||||||
gwglLog.setResult(state);
|
gwglLog.setResult(state);
|
||||||
gwglLog.setApplyNo(policeLeaveApproval.getApplyNo());
|
|
||||||
gwglLog.setType(policeLeaveApproval.getLeaveType());
|
gwglLog.setType(policeLeaveApproval.getLeaveType());
|
||||||
gwglLog.setReason(policeLeaveApproval.getReason());
|
gwglLog.setReason(policeLeaveApproval.getReason());
|
||||||
gwglLog.setChecker(user.getNickName());
|
gwglLog.setChecker(user.getNickName());
|
||||||
|
@ -283,7 +292,6 @@ public class PoliceLeaveApprovalController extends BaseController {
|
||||||
gwglLog.setCreateTime(policeLeaveApproval.getCreateTime());
|
gwglLog.setCreateTime(policeLeaveApproval.getCreateTime());
|
||||||
gwglLog.setReason(policeLeaveApproval.getReason());
|
gwglLog.setReason(policeLeaveApproval.getReason());
|
||||||
gwglLog.setResult(state);
|
gwglLog.setResult(state);
|
||||||
gwglLog.setApplyNo(policeLeaveApproval.getApplyNo());
|
|
||||||
gwglLog.setType(policeLeaveApproval.getLeaveType());
|
gwglLog.setType(policeLeaveApproval.getLeaveType());
|
||||||
gwglLog.setReason(policeLeaveApproval.getReason());
|
gwglLog.setReason(policeLeaveApproval.getReason());
|
||||||
gwglLog.setChecker(user.getNickName());
|
gwglLog.setChecker(user.getNickName());
|
||||||
|
|
Loading…
Reference in New Issue