mirror of
https://github.com/FatttSnake/Pinnacle-OA.git
synced 2026-04-05 23:11:24 +08:00
Fuzzy query optimized more
This commit is contained in:
@@ -58,9 +58,8 @@ public class AffairController {
|
|||||||
@GetMapping("/personal_affairs_fuzzy_queries")
|
@GetMapping("/personal_affairs_fuzzy_queries")
|
||||||
@PreAuthorize("hasAuthority('affair:self:get')")
|
@PreAuthorize("hasAuthority('affair:self:get')")
|
||||||
public ResponseResult getPersonalAffairsByTitle(String title,Long typeId,Integer status) {
|
public ResponseResult getPersonalAffairsByTitle(String title,Long typeId,Integer status) {
|
||||||
System.out.println(title);
|
|
||||||
Long applicantId =WebUtil.getLoginUser().getUser().getId();
|
Long applicantId =WebUtil.getLoginUser().getUser().getId();
|
||||||
return ResponseResult.build(ResponseCode.DATABASE_SELECT_OK,"success",affairService.getFuzzyQueriesByAffairTitle(title,typeId,status,applicantId));
|
return ResponseResult.build(ResponseCode.DATABASE_SELECT_OK,"success",affairService.getFuzzyQueriesByAffairTitle(title.trim(),typeId,status,applicantId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/not_approved")
|
@GetMapping("/not_approved")
|
||||||
@@ -74,8 +73,8 @@ public class AffairController {
|
|||||||
|
|
||||||
@GetMapping("/not_approved_FuzzyQueries")
|
@GetMapping("/not_approved_FuzzyQueries")
|
||||||
@PreAuthorize("hasAuthority('affair:manage:get')")
|
@PreAuthorize("hasAuthority('affair:manage:get')")
|
||||||
public ResponseResult<List<Affair>> selectNotApprovedByFuzzyQueries(String title,Long typeId,Integer status,Long applicantId) {
|
public ResponseResult<List<Affair>> selectNotApprovedByFuzzyQueries(String title,Long typeId,Integer status,Long applicantId,LocalDateTime startTime,LocalDateTime endTime ) {
|
||||||
return ResponseResult.build(ResponseCode.DATABASE_SELECT_OK,"success",affairService.getNotApprovedByFuzzyQueries(title,typeId,status,applicantId));
|
return ResponseResult.build(ResponseCode.DATABASE_SELECT_OK,"success",affairService.getNotApprovedByFuzzyQueries(title,typeId,status,applicantId,startTime,endTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public interface AffairMapper extends BaseMapper<Affair> {
|
|||||||
|
|
||||||
List<Affair> getFuzzyQueriesByAffairTitle(String title, Long typeId, Integer status,Long applicantId);
|
List<Affair> getFuzzyQueriesByAffairTitle(String title, Long typeId, Integer status,Long applicantId);
|
||||||
|
|
||||||
List<Affair> getNotApprovedByFuzzyQueries(String title, Long typeId, Integer status,Long applicantId);
|
List<Affair> getNotApprovedByFuzzyQueries(String title, Long typeId, Integer status,Long applicantId ,LocalDateTime startTime,LocalDateTime endTime);
|
||||||
|
|
||||||
//
|
//
|
||||||
// @Select("SELECT t_affair.applicant_id,t_affair.inspector_id,t_user.id,t_user.username from t_affair,t_user ")
|
// @Select("SELECT t_affair.applicant_id,t_affair.inspector_id,t_user.id,t_user.username from t_affair,t_user ")
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ public interface IAffairService extends IService<Affair> {
|
|||||||
List<User> getSameDepartmentUser (long id);
|
List<User> getSameDepartmentUser (long id);
|
||||||
List<Affair> getFuzzyQueriesByAffairTitle(String title,Long typeId,Integer status,Long applicantId);
|
List<Affair> getFuzzyQueriesByAffairTitle(String title,Long typeId,Integer status,Long applicantId);
|
||||||
|
|
||||||
List<Affair> getNotApprovedByFuzzyQueries(String title,Long typeId,Integer status,Long applicantId);
|
List<Affair> getNotApprovedByFuzzyQueries(String title,Long typeId,Integer status,Long applicantId,LocalDateTime startTime,LocalDateTime endTime);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,8 @@ public class AffairServiceImpl extends ServiceImpl<AffairMapper, Affair> impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<Affair> getNotApprovedByFuzzyQueries(String title, Long typeId, Integer status, Long applicantId) {
|
public List<Affair> getNotApprovedByFuzzyQueries(String title, Long typeId, Integer status, Long applicantId, LocalDateTime startTime ,LocalDateTime endTime) {
|
||||||
return null;
|
List<Affair> affairList =affairMapper.getNotApprovedByFuzzyQueries(title,typeId,status,applicantId,startTime,endTime);
|
||||||
|
return affairList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,11 @@
|
|||||||
<el-form :model="form" label-width="120px">
|
<el-form :model="form" label-width="120px">
|
||||||
<el-form-item label="事务标题:">
|
<el-form-item label="事务标题:">
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-input v-model="form.title" placeholder="请输入事务标题" class="longInput" />
|
<el-input
|
||||||
|
v-model.trim="form.title"
|
||||||
|
placeholder="请输入事务标题"
|
||||||
|
class="longInput"
|
||||||
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@@ -78,7 +82,13 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="具体内容:">
|
<el-form-item label="具体内容:">
|
||||||
<el-input v-model="form.content" type="textarea" class="textarea" rows="15" cols="20" />
|
<el-input
|
||||||
|
v-model.trim="form.content"
|
||||||
|
type="textarea"
|
||||||
|
class="textarea"
|
||||||
|
rows="15"
|
||||||
|
cols="20"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@@ -122,7 +132,8 @@ export default {
|
|||||||
department_id: ''
|
department_id: ''
|
||||||
},
|
},
|
||||||
sameDepartmentUsers: [],
|
sameDepartmentUsers: [],
|
||||||
grant: true
|
grant: true,
|
||||||
|
formView: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -148,7 +159,7 @@ export default {
|
|||||||
console.log(reportError)
|
console.log(reportError)
|
||||||
})
|
})
|
||||||
this.getPersonalAffair()
|
this.getPersonalAffair()
|
||||||
this.$router.go()
|
this.$router.go(-1)
|
||||||
} else {
|
} else {
|
||||||
if (_.isEmpty(form.title)) {
|
if (_.isEmpty(form.title)) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-table :data="tableData" style="width: 100%">
|
<el-table :data="tableData" style="width: 100%">
|
||||||
<el-table-column label="事务编号" prop="id" />
|
<!-- <el-table-column label="事务编号" prop="id" />-->
|
||||||
|
|
||||||
<el-table-column label="事务名称" prop="title" />
|
<el-table-column label="事务名称" prop="title" />
|
||||||
|
|
||||||
@@ -19,7 +19,21 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="申请者" prop="applicantId">
|
<el-table-column label="申请者" prop="applicantId">
|
||||||
<el-text v-for="(user, index) in users" :key="index" :content="user.username" />
|
<template #default="scope">
|
||||||
|
{{
|
||||||
|
scope.row.applicantId === 1652714496280469506
|
||||||
|
? 'cyb'
|
||||||
|
: scope.row.applicantId === 1654151146072145921
|
||||||
|
? 'syf'
|
||||||
|
: scope.row.applicantId === 1654151877520973826
|
||||||
|
? 'gzw'
|
||||||
|
: scope.row.applicantId === 1654151930402746370
|
||||||
|
? 'yrm'
|
||||||
|
: scope.row.applicantId === 1
|
||||||
|
? 'admin'
|
||||||
|
: 'ggb'
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="提交日期" prop="createTime">
|
<el-table-column label="提交日期" prop="createTime">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@@ -74,20 +88,6 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-divider>
|
|
||||||
<div class="block">
|
|
||||||
<el-pagination
|
|
||||||
style="color: #888888"
|
|
||||||
@size-change="handleSizeChange"
|
|
||||||
@current-change="handleCurrentChange"
|
|
||||||
:page-size="100"
|
|
||||||
layout="prev, pager, next, jumper"
|
|
||||||
:total="1000"
|
|
||||||
>
|
|
||||||
</el-pagination>
|
|
||||||
</div>
|
|
||||||
</el-divider>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
@@ -165,12 +165,6 @@ export default {
|
|||||||
console.log(reportError)
|
console.log(reportError)
|
||||||
}) // 数据库中获取用户
|
}) // 数据库中获取用户
|
||||||
},
|
},
|
||||||
handleSizeChange(val) {
|
|
||||||
console.log(`每页 ${val} 条`)
|
|
||||||
},
|
|
||||||
handleCurrentChange(val) {
|
|
||||||
console.log(`当前页: ${val}`)
|
|
||||||
},
|
|
||||||
getApproved() {
|
getApproved() {
|
||||||
request
|
request
|
||||||
.get('/affair/approved')
|
.get('/affair/approved')
|
||||||
@@ -194,7 +188,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
console.log('approved created')
|
|
||||||
this.getApproved()
|
this.getApproved()
|
||||||
this.dialogFalse()
|
this.dialogFalse()
|
||||||
this.getUser()
|
this.getUser()
|
||||||
@@ -202,6 +195,7 @@ export default {
|
|||||||
props: ['DataToRouterView'],
|
props: ['DataToRouterView'],
|
||||||
watch: {
|
watch: {
|
||||||
DataToRouterView: function (val) {
|
DataToRouterView: function (val) {
|
||||||
|
this.getUser()
|
||||||
this.tableData = val
|
this.tableData = val
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-table :data="tableData" style="width: 100%">
|
<el-table :data="tableData" style="width: 100%">
|
||||||
<el-table-column label="事务编号" prop="id" />
|
<!-- <el-table-column label="事务编号" prop="id" />-->
|
||||||
|
|
||||||
<el-table-column label="事务名称" prop="title" />
|
<el-table-column label="事务名称" prop="title" />
|
||||||
|
|
||||||
@@ -80,20 +80,6 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-divider>
|
|
||||||
<div class="block">
|
|
||||||
<el-pagination
|
|
||||||
style="color: #888888"
|
|
||||||
@size-change="handleSizeChange"
|
|
||||||
@current-change="handleCurrentChange"
|
|
||||||
:page-size="100"
|
|
||||||
layout="prev, pager, next, jumper"
|
|
||||||
:total="1000"
|
|
||||||
>
|
|
||||||
</el-pagination>
|
|
||||||
</div>
|
|
||||||
</el-divider>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
@@ -150,13 +136,6 @@ export default {
|
|||||||
console.log(reportError)
|
console.log(reportError)
|
||||||
}) // 审批驳回
|
}) // 审批驳回
|
||||||
},
|
},
|
||||||
|
|
||||||
handleSizeChange(val) {
|
|
||||||
console.log(`每页 ${val} 条`)
|
|
||||||
},
|
|
||||||
handleCurrentChange(val) {
|
|
||||||
console.log(`当前页: ${val}`)
|
|
||||||
}, // 标签页
|
|
||||||
getApproved() {
|
getApproved() {
|
||||||
request
|
request
|
||||||
.get('/affair/not_approved')
|
.get('/affair/not_approved')
|
||||||
@@ -180,7 +159,6 @@ export default {
|
|||||||
} // 关闭弹出框
|
} // 关闭弹出框
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
console.log('not approved created')
|
|
||||||
this.getApproved()
|
this.getApproved()
|
||||||
this.dialogFalse()
|
this.dialogFalse()
|
||||||
}, // 获取事务信息
|
}, // 获取事务信息
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-table :data="tableData" style="width: 100%">
|
<el-table :data="tableData" style="width: 100%">
|
||||||
<el-table-column label="事务编号" prop="id" />
|
<!-- <el-table-column label="事务编号" prop="id" />-->
|
||||||
|
|
||||||
<el-table-column label="事务名称" prop="title" />
|
<el-table-column label="事务名称" prop="title" />
|
||||||
|
|
||||||
@@ -18,16 +18,16 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="审批者" prop="applicantId">
|
<el-table-column label="审批者" prop="inspectorId">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{
|
{{
|
||||||
scope.row.applicantId === 1
|
scope.row.inspectorId === 1
|
||||||
? 'ggb'
|
? 'ggb'
|
||||||
: scope.row.applicantId === 1652714496280469506
|
: scope.row.inspectorId === 1652714496280469506
|
||||||
? 'cyb'
|
? 'cyb'
|
||||||
: scope.row.applicantId === 1654151146072145921
|
: scope.row.inspectorId === 1654151146072145921
|
||||||
? 'syf'
|
? 'syf'
|
||||||
: scope.row.applicantId === 1654151877520973826
|
: scope.row.inspectorId === 1654151877520973826
|
||||||
? 'gzw'
|
? 'gzw'
|
||||||
: 'yrm'
|
: 'yrm'
|
||||||
}}
|
}}
|
||||||
@@ -86,18 +86,6 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-divider>
|
|
||||||
<div class="block">
|
|
||||||
<el-pagination
|
|
||||||
style="color: #888888"
|
|
||||||
:page-size="100"
|
|
||||||
layout="prev, pager, next, jumper"
|
|
||||||
:total="1000"
|
|
||||||
>
|
|
||||||
</el-pagination>
|
|
||||||
</div>
|
|
||||||
</el-divider>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<el-col :span="1"></el-col>
|
<el-col :span="1"></el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-form-item label="事务类型:"
|
<el-form-item label="事务类型:"
|
||||||
><el-select v-model="formData.typeId">
|
><el-select v-model="formData.typeId" clearable>
|
||||||
<el-option label="事假" name="type1" value="1"></el-option>
|
<el-option label="事假" name="type1" value="1"></el-option>
|
||||||
<el-option label="病假" name="type2" value="2"></el-option>
|
<el-option label="病假" name="type2" value="2"></el-option>
|
||||||
<el-option label="财务报销" name="type3" value="3"></el-option>
|
<el-option label="财务报销" name="type3" value="3"></el-option>
|
||||||
@@ -35,14 +35,19 @@
|
|||||||
</el-select> </el-form-item
|
</el-select> </el-form-item
|
||||||
></el-col>
|
></el-col>
|
||||||
<el-col :span="1"></el-col>
|
<el-col :span="1"></el-col>
|
||||||
<el-col :span="4"
|
<!-- <el-col :xs="6" :sm="6" :md="5" :lg="8" :xl="10">-->
|
||||||
><el-form-item label="审批进度:">
|
<!-- <el-form-item label="日期:" prop="timeRang">-->
|
||||||
<el-select v-model="formData.status">
|
<!-- <el-date-picker-->
|
||||||
<el-option label="未审批" value="0"></el-option>
|
<!-- v-model="forTime"-->
|
||||||
<el-option label="同意" value="1"></el-option>
|
<!-- type="datetimerange"-->
|
||||||
<el-option label="驳回" value="2"></el-option>
|
<!-- range-separator="至"-->
|
||||||
</el-select> </el-form-item
|
<!-- start-placeholder="开始日期"-->
|
||||||
></el-col>
|
<!-- end-placeholder="结束日期"-->
|
||||||
|
<!-- style="width: auto"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- </el-date-picker>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
<el-col :span="1"></el-col>
|
<el-col :span="1"></el-col>
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
<el-button type="primary" @click="onSubmit">查询</el-button>
|
<el-button type="primary" @click="onSubmit">查询</el-button>
|
||||||
@@ -67,7 +72,9 @@ export default {
|
|||||||
formData: {
|
formData: {
|
||||||
title: '',
|
title: '',
|
||||||
typeId: '',
|
typeId: '',
|
||||||
status: ''
|
status: '',
|
||||||
|
startTime: '',
|
||||||
|
endTime: ''
|
||||||
},
|
},
|
||||||
DataToRouterView: {}
|
DataToRouterView: {}
|
||||||
}
|
}
|
||||||
@@ -81,7 +88,7 @@ export default {
|
|||||||
},
|
},
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
request
|
request
|
||||||
.get('/affair/personal_affairs_fuzzy_queries', this.formData)
|
.get('/affair/not_approved_FuzzyQueries', this.formData)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
this.DataToRouterView = response.data.data
|
this.DataToRouterView = response.data.data
|
||||||
console.log(response.data)
|
console.log(response.data)
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
<el-col :span="1"></el-col>
|
<el-col :span="1"></el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-form-item label="事务类型:"
|
<el-form-item label="事务类型:"
|
||||||
><el-select v-model="formData.typeId">
|
><el-select v-model="formData.typeId" clearable>
|
||||||
<el-option label="事假" name="type1" value="1"></el-option>
|
<el-option label="事假" name="type1" value="1"></el-option>
|
||||||
<el-option label="病假" name="type2" value="2"></el-option>
|
<el-option label="病假" name="type2" value="2"></el-option>
|
||||||
<el-option label="财务报销" name="type3" value="3"></el-option>
|
<el-option label="财务报销" name="type3" value="3"></el-option>
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
<el-col :span="1"></el-col>
|
<el-col :span="1"></el-col>
|
||||||
<el-col :span="4"
|
<el-col :span="4"
|
||||||
><el-form-item label="审批进度:">
|
><el-form-item label="审批进度:">
|
||||||
<el-select v-model="formData.status">
|
<el-select v-model="formData.status" clearable>
|
||||||
<el-option label="未审批" value="0"></el-option>
|
<el-option label="未审批" value="0"></el-option>
|
||||||
<el-option label="同意" value="1"></el-option>
|
<el-option label="同意" value="1"></el-option>
|
||||||
<el-option label="驳回" value="2"></el-option>
|
<el-option label="驳回" value="2"></el-option>
|
||||||
|
|||||||
Reference in New Issue
Block a user