feat:审批

This commit is contained in:
李京通 2025-06-09 15:50:24 +08:00
parent 546cf13f34
commit bb94fcc4d4
4 changed files with 11 additions and 15 deletions

View File

@ -17,17 +17,13 @@ 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.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.time.Instant; import java.time.Instant;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.ZoneId; import java.time.ZoneId;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.List; import java.util.List;
/** /**
@ -50,7 +46,7 @@ public class ApprovalProcessController extends BaseController {
@PostMapping("/list") @PostMapping("/list")
@ApiOperation("查询列表") @ApiOperation("查询列表")
public TableDataInfo list(ApprovalProcess approvalProcess) { public TableDataInfo list(@RequestBody ApprovalProcess approvalProcess) {
startPage(); startPage();
QueryWrapper<ApprovalProcess> queryWrapper = new QueryWrapper<>(approvalProcess); QueryWrapper<ApprovalProcess> queryWrapper = new QueryWrapper<>(approvalProcess);
queryWrapper.orderByDesc("create_time"); queryWrapper.orderByDesc("create_time");

View File

@ -48,7 +48,7 @@ public class NonWorkingDayDrinkingReportController extends BaseController {
@ApiOperation("查询非工作日饮酒报备单") @ApiOperation("查询非工作日饮酒报备单")
@PostMapping("/list") @PostMapping("/list")
public TableDataInfo query(NonWorkingDayDrinkingReport nonWorkingDayDrinkingReport) { public TableDataInfo query(@RequestBody NonWorkingDayDrinkingReport nonWorkingDayDrinkingReport) {
List<SysDept> sysDepts = deptService.selectAllDeptList(); List<SysDept> sysDepts = deptService.selectAllDeptList();
// 部门领导 // 部门领导
List<String> leader = sysDepts.stream().map(SysDept::getLeader).collect(Collectors.toList()); List<String> leader = sysDepts.stream().map(SysDept::getLeader).collect(Collectors.toList());
@ -206,7 +206,7 @@ public class NonWorkingDayDrinkingReportController extends BaseController {
gwglLog.setReason(dto.getReason()); gwglLog.setReason(dto.getReason());
gwglLog.setApplyNo(nonWorkingDayDrinkingReport.getApplyNo()); gwglLog.setApplyNo(nonWorkingDayDrinkingReport.getApplyNo());
gwglLog.setChecker(user.getNickName()); gwglLog.setChecker(user.getNickName());
gwglLog.setCheckTime(LocalDateTime.now()); gwglLog.setCheckTime(System.currentTimeMillis());
gwglLog.setCheckState(state); gwglLog.setCheckState(state);
boolean result1 = gwglLogService.save(gwglLog); boolean result1 = gwglLogService.save(gwglLog);
if (!result || !result1) { if (!result || !result1) {

View File

@ -206,7 +206,7 @@ public class PoliceLeaveApprovalController extends BaseController {
gwglLog.setType(1); gwglLog.setType(1);
gwglLog.setReason(policeLeaveApproval.getReason()); gwglLog.setReason(policeLeaveApproval.getReason());
gwglLog.setChecker(user.getNickName()); gwglLog.setChecker(user.getNickName());
gwglLog.setCheckTime(LocalDateTime.now()); gwglLog.setCheckTime(System.currentTimeMillis());
gwglLog.setCheckState(state); gwglLog.setCheckState(state);
boolean result1 = gwglLogService.save(gwglLog); boolean result1 = gwglLogService.save(gwglLog);
if (!result || !result1) { if (!result || !result1) {

View File

@ -1,13 +1,11 @@
package com.ruoyi.database.domain; package com.ruoyi.database.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime;
/** /**
* @Description DwglLog * @Description DwglLog
* @Author lijingtong * @Author lijingtong
@ -43,8 +41,9 @@ public class gwglLog {
private String userName; private String userName;
@ApiModelProperty("申请时间") @ApiModelProperty("申请时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Long createTime; private Long createTime;
@TableField(exist = false)
private String createTimeCn;
@ApiModelProperty("申请类型") @ApiModelProperty("申请类型")
private Integer type; private Integer type;
@ -53,8 +52,9 @@ public class gwglLog {
private String checker; private String checker;
@ApiModelProperty("审核时间") @ApiModelProperty("审核时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Long checkTime;
private LocalDateTime checkTime; @TableField(exist = false)
private String checkTimeCn;
@ApiModelProperty("审核状态") @ApiModelProperty("审核状态")
private Integer checkState; private Integer checkState;