1
0
mirror of https://github.com/FatttSnake/Pinnacle-OA.git synced 2026-04-05 06:51:23 +08:00

Gets the userID of the current login, and the transaction now committed is visible only to the approved object it is committed to. Fixed a bug where the transaction id was too long for approval.

This commit is contained in:
assina045
2023-05-15 10:33:42 +08:00
parent f4a5391fad
commit d2a7c7faa8
5 changed files with 52 additions and 8 deletions

View File

@@ -5,6 +5,7 @@ import com.cfive.pinnacle.entity.Affair;
import com.cfive.pinnacle.entity.common.ResponseCode;
import com.cfive.pinnacle.entity.common.ResponseResult;
import com.cfive.pinnacle.service.IAffairService;
import com.cfive.pinnacle.utils.WebUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -32,7 +33,7 @@ public class AffairController {
@GetMapping("/NotApproved")
public ResponseResult select_NotApproved() {
LambdaQueryWrapper<Affair> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(Affair::getStatus, 0);
wrapper.eq(Affair::getStatus, 0).eq(Affair::getInspectorId,WebUtil.getLoginUser().getUser().getId());
return ResponseResult.build(ResponseCode.DATABASE_SELECT_OK, "success", affairService.list(wrapper));
}

View File

@@ -11,6 +11,8 @@ import java.io.Serializable;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.experimental.Accessors;
@@ -30,6 +32,8 @@ public class Affair implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@JsonSerialize(using = ToStringSerializer.class)
@TableId("id")
private Long id;

View File

@@ -17,6 +17,9 @@
<el-select v-model="form.inspectorId" placeholder="请选择审批者">
<el-option value="1" label="ggb" />
<el-option value="1652714496280469506" label="cyb" />
<el-option value="1654151146072145921" label="syf" />
<el-option value="1654151877520973826" label="gzw" />
<el-option value="1654151930402746370" label="yrm" />
</el-select>
</el-col>
</el-form-item>

View File

@@ -30,13 +30,31 @@
<el-table-column label="事务类型" prop="typeId">
<template #default="scope">
{{ scope.row.typeId === 1 ? '病假' : '事假' }}
{{
scope.row.typeId === 1
? '事假'
: scope.row.typeId === 2
? '病假'
: scope.row.typeId === 3
? '财务报销'
: '调休'
}}
</template>
</el-table-column>
<el-table-column label="申请者" prop="applicantId">
<template #default="scope">
{{ scope.row.applicantId === 1 ? 'ggb' : 'gzw' }}
{{
scope.row.applicantId === 1
? 'ggb'
: scope.row.applicantId === 1652714496280469506
? 'cyb'
: scope.row.applicantId === 1654151146072145921
? 'syf'
: scope.row.applicantId === 1654151877520973826
? 'gzw'
: 'yrm'
}}
</template>
</el-table-column>
<el-table-column label="提交日期" prop="createTime">
@@ -73,7 +91,7 @@
<el-row>
<el-col :span="3"></el-col>
<el-col :span="4">事务标题:</el-col>
<el-col :span="1">{{ dialogData.title }}</el-col>
<el-col :span="17">{{ dialogData.title }}</el-col>
</el-row>
<el-row>
<el-col :span="3"></el-col>
@@ -81,7 +99,7 @@
</el-row>
<el-row>
<el-col :span="7"></el-col>
<el-col :span="1">{{ dialogData.content }}</el-col>
<el-col :span="17">{{ dialogData.content }}</el-col>
</el-row>
<el-row>
<el-col :span="11"></el-col>

View File

@@ -30,17 +30,35 @@
<el-table-column label="事务类型" prop="typeId">
<template #default="scope">
{{ scope.row.typeId === 1 ? '病假' : '事假' }}
{{
scope.row.typeId === 1
? '事假'
: scope.row.typeId === 2
? '病假'
: scope.row.typeId === 3
? '财务报销'
: '调休'
}}
</template>
</el-table-column>
<el-table-column label="申请者" prop="applicantId">
<template #default="scope">
{{ scope.row.applicantId === 1 ? 'ggb' : 'gzw' }}
{{
scope.row.applicantId === 1
? 'ggb'
: scope.row.applicantId === 1652714496280469506
? 'cyb'
: scope.row.applicantId === 1654151146072145921
? 'syf'
: scope.row.applicantId === 1654151877520973826
? 'gzw'
: 'yrm'
}}
</template>
</el-table-column>
<el-table-column label="日期" prop="createTime">
<el-table-column label="提交时间" prop="createTime">
<template #default="scope">
{{ format(scope.row.createTime) }}
</template>