Kaynağa Gözat

Merge remote-tracking branch 'origin/master'

jzh 1 yıl önce
ebeveyn
işleme
720fe2d1c6

+ 4 - 5
client/src/store/modules/tagsView.ts

@@ -71,7 +71,7 @@ export const useTagsViewStore = defineStore('tagsView', () => {
   // 更新某tag
   const updateVisitedView = (view: RouteLocationNormalizedLoaded): void => {
     for (let v of unref(visitedViews)) {
-      if (v.path === view.path) {
+      if (isSameRouteTag(v, view)) {
         v = Object.assign(v, view)
         break
       }
@@ -87,7 +87,7 @@ export const useTagsViewStore = defineStore('tagsView', () => {
   // 删除tag
   const delVisitedView = (view: RouteLocationNormalizedLoaded): void => {
     for (const [i, v] of unref(visitedViews).entries()) {
-      if (v.path === view.path) {
+      if (isSameRouteTag(v, view)) {
         visitedViews.value.splice(i, 1)
         break
       }
@@ -121,9 +121,8 @@ export const useTagsViewStore = defineStore('tagsView', () => {
     view: RouteLocationNormalizedLoaded,
     type: 'other' | 'left' | 'right'
   ): void => {
-    const index = findIndex<RouteLocationNormalizedLoaded>(
-      unref(visitedViews),
-      (v) => v.path === view.path
+    const index = findIndex<RouteLocationNormalizedLoaded>(unref(visitedViews), (v) =>
+      isSameRouteTag(v, view)
     )
     visitedViews.value = visitedViews.value.filter((v, i) => {
       return (

+ 8 - 11
client/src/views/OaSystem/personnelManagement/zpxqspPage/index.vue

@@ -10,22 +10,22 @@
         <DeptSelect v-model="queryParams.deptId" />
       </div>
 
-      <div class="form" v-if="(postDict?.length ?? 0) !== 0">
+      <div class="form">
         <span class="formSpan">申请岗位:</span>
         <el-select v-model="queryParams.post" placeholder="请选择岗位" clearable>
           <el-option
-            v-for="{ label, value } in postDict"
+            v-for="{ label, value } in getIntDictOptions('post_type')"
             :key="value"
             :label="label"
             :value="value"
           />
         </el-select>
       </div>
-      <div class="form" v-if="(recruitType?.length ?? 0) !== 0">
+      <div class="form">
         <span class="formSpan">所属类别:</span>
         <el-select v-model="queryParams.post" placeholder="请选择类别" clearable>
           <el-option
-            v-for="{ label, value } in recruitType"
+            v-for="{ label, value } in getIntDictOptions('RECRUIT_TYPE')"
             :key="value"
             :label="label"
             :value="value"
@@ -56,17 +56,17 @@
         <el-table-column show-overflow-tooltip align="center" prop="deptName" label="部门" />
         <el-table-column align="center" label="岗位">
           <template #default="scope">
-            <span>{{ getDictName(scope.row.post, postDict) }}</span>
+            <span>{{ getDictLabel('post_type', scope.row.post) }}</span>
           </template>
         </el-table-column>
         <el-table-column align="center" label="所属类别">
           <template #default="scope">
-            <span>{{ getDictName(scope.row.type, recruitType) }}</span>
+            <span>{{ getDictLabel('RECRUIT_TYPE', scope.row.post) }}</span>
           </template>
         </el-table-column>
         <el-table-column align="center" label="能力等级">
           <template #default="scope">
-            <span>{{ getDictName(scope.row.abilityLevel, abilityLevel) }}</span>
+            <span>{{ getDictLabel('ABILITY_LEVEL', scope.row.abilityLevel) }}</span>
           </template>
         </el-table-column>
         <el-table-column show-overflow-tooltip align="center" prop="jobRequest" label="任职要求" />
@@ -132,16 +132,13 @@ import { Recruit, RecruitListDTO } from '@/interface/demand'
 import { useMutation, useQuery } from '@tanstack/vue-query'
 import { deleteRecruit, getRecruitList, updateRecruit } from '@/service/demand'
 import DeptSelect from '@/components/DeptSelect/index.vue'
-import { useDict, getDictName } from '@/hooks/web/useDict'
+import { getIntDictOptions, getDictLabel } from '@/utils/dict'
 
 const infoList = [
   { label: '需求总数', value: 'requireSum' },
   { label: '招聘总数', value: 'recruitSum' }
 ]
 defineOptions({ name: 'TravelCost' })
-const [postDict] = useDict('post_type') //职位
-const [recruitType] = useDict('RECRUIT_TYPE') // 需求类别
-const [abilityLevel] = useDict('ABILITY_LEVEL') //能力等级
 
 const pageParams = ref({
   pageNo: 1,

+ 5 - 4
zjugis-business/src/main/java/com/zjugis/business/flow/usemoney/service/UseMoneyServiceImpl.java

@@ -183,11 +183,10 @@ public class UseMoneyServiceImpl implements UseMoneyService {
         Set<String> companyIds = convertSet(records, UseMoneyEarnestRespVO::getPaymentCompanyId);
         Map<String, CompanyRespDTO> companyMap = companyApi.getCompanyMap(companyIds);
         for (UseMoneyEarnestRespVO record : records) {
-            if (1 == record.getIWriteOff()) {
-                record.setStatus("已核销");
-            }
-            if (0 == record.getIWriteOff()) {
+            if (record.getIWriteOff()==null||0 == record.getIWriteOff()) {
                 record.setStatus("未核销");
+            }else if (1 == record.getIWriteOff()) {
+                record.setStatus("已核销");
             }
             CompanyRespDTO companyRespDTO = companyMap.get(record.getPaymentCompanyId());
             if (companyRespDTO != null) {
@@ -434,6 +433,8 @@ public class UseMoneyServiceImpl implements UseMoneyService {
                 detailDO.setUseMoneyId(updateObj.getId());
                 detailDO.setIsvalid(1);
                 detailDO.setCreateTime(LocalDateTime.now());
+                detailDO.setIWriteOff(0);
+                detailDO.setWriteOffAmount(new BigDecimal(0));
             });
             useMoneyDetailDao.insertBatch(detailDOS);
         }

+ 0 - 3
zjugis-business/src/main/resources/templates/ProjectStatus/index.ftl

@@ -59,9 +59,6 @@ styles=[ '/flow/css/formCommon.css' ,'/timeSelector/TimeSelector.css','/OwCommon
                     <input type="hidden" name="createReqVO$projectId" value="${formEntity.projectId!}">
                     <div class="z-comp-input" name="createReqVO$projectName">
                       <input type="text" value="${projectName!}">
-                      <div id="selectProject" style="width: 50px; float: right;">
-                        <div class="btn btn-sm btn-primary">选择</div>
-                      </div>
                     </div>
                   </div>
                 </div>

+ 11 - 0
zjugis-module-system/zjugis-module-system-api/src/main/java/com/zjugis/module/system/api/permission/dto/FlowPermissionRespDTO.java

@@ -2,6 +2,7 @@ package com.zjugis.module.system.api.permission.dto;
 
 import lombok.Data;
 
+import java.util.HashSet;
 import java.util.Set;
 
 /**
@@ -13,8 +14,18 @@ import java.util.Set;
 @Data
 public class FlowPermissionRespDTO {
 
+    /**
+     * 是否可查看全部数据
+     */
+    private Boolean all;
+
     /**
      * 可查看的流程数组
      */
     private Set<String> flowIds;
+
+    public FlowPermissionRespDTO() {
+        this.flowIds = new HashSet<>();
+        this.all = false;
+    }
 }

+ 6 - 0
zjugis-module-system/zjugis-module-system-biz/src/main/java/com/zjugis/module/system/service/permission/PermissionServiceImpl.java

@@ -334,6 +334,12 @@ public class PermissionServiceImpl implements PermissionService {
             result.setFlowIds(Collections.emptySet());
             return result;
         }
+        Set<Long> roleIds = convertSet(roles, RoleDO::getId);
+        //如果拥有超级管理员权限则可以查看所有流程
+        if (roleService.hasAnySuperAdmin(roleIds)) {
+            result.setAll(true);
+            return result;
+        }
         for (RoleDO role : roles) {
             CollUtil.addAll(result.getFlowIds(), role.getFlowIds());
         }

+ 5 - 2
zjugis-workflow/src/main/java/com/zjugis/z_workflow/service/TFlowTemplateService.java

@@ -235,8 +235,11 @@ public class TFlowTemplateService {
 		paramVo.setiFilterRight(iFilterRight);
 		if (iFilterRight) {
             CommonResult<FlowPermissionRespDTO> result = permissionApi.getFlowPermission(Constant.getUserId());
-            if(result.getCheckedData().getFlowIds() != null){
-                rightList =result.getCheckedData().getFlowIds();
+            FlowPermissionRespDTO resp = result.getCheckedData();
+            if(resp.getAll()){
+                paramVo.setiFilterRight(false);
+            } else if(resp.getFlowIds() != null){
+                rightList = resp.getFlowIds();
             }
 
         }