项目列表品牌中英文切换+法规技术评估/法规意见收集viewer去掉按钮
This commit is contained in:
+12
@@ -52,4 +52,16 @@ public class ProjectUserPermissionController extends JeroController<ProjectUserP
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断当前用户是否拥有法规技术评估/法规意见收集中结束流程或发起补充流程的操作按钮
|
||||||
|
* @param type
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/hasProcessControlButton")
|
||||||
|
public boolean hasProcessControlButton(@RequestParam(name="type",required=true)String type,
|
||||||
|
@RequestParam(name="id",required=true)String id){
|
||||||
|
return projectUserPermissionService.hasProcessControlButton(type,id);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -140,6 +140,8 @@ public class ProjectLibraryBase implements Comparable<ProjectLibraryBase> {
|
|||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String brandText;
|
private String brandText;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String brandTextEn;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compareTo(ProjectLibraryBase o) {
|
public int compareTo(ProjectLibraryBase o) {
|
||||||
|
|||||||
+34
@@ -0,0 +1,34 @@
|
|||||||
|
package com.jero.modules.project.enums;
|
||||||
|
|
||||||
|
public enum ProcessControlButtonTypeEnum {
|
||||||
|
|
||||||
|
LawsOpinionGather("法规意见收集","LawsOpinionGather"),
|
||||||
|
LawsTechnologyEvaluation("法规技术评估","LawsTechnologyEvaluation");
|
||||||
|
|
||||||
|
String label;
|
||||||
|
String value;
|
||||||
|
|
||||||
|
ProcessControlButtonTypeEnum() {
|
||||||
|
}
|
||||||
|
|
||||||
|
ProcessControlButtonTypeEnum(String label, String value) {
|
||||||
|
this.label = label;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLabel() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLabel(String label) {
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
+7
-1
@@ -52,7 +52,8 @@
|
|||||||
plb.sort,
|
plb.sort,
|
||||||
plb.flag,
|
plb.flag,
|
||||||
plb.brand,
|
plb.brand,
|
||||||
sdi.item_text brandText
|
sdi.item_text brandText,
|
||||||
|
sdi.en_name brandTextEn
|
||||||
from project_library_base as plb
|
from project_library_base as plb
|
||||||
left join project_name_info as pni on plb.project_name_id=pni.id
|
left join project_name_info as pni on plb.project_name_id=pni.id
|
||||||
left join sys_user as studiouser on plb.studio_engineer=studiouser.id
|
left join sys_user as studiouser on plb.studio_engineer=studiouser.id
|
||||||
@@ -227,6 +228,11 @@
|
|||||||
and plb.project_status like concat('%',#{projectLibraryBase.projectStatus},'%')
|
and plb.project_status like concat('%',#{projectLibraryBase.projectStatus},'%')
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
<!--搜索条件:品牌-->
|
||||||
|
<if test="projectLibraryBase.brand != null and projectLibraryBase.brand != '' ">
|
||||||
|
and plb.brand = #{projectLibraryBase.brand}
|
||||||
|
</if>
|
||||||
|
|
||||||
<if test="projectLibraryBase.studioEngineer != null and projectLibraryBase.studioEngineer != ''">
|
<if test="projectLibraryBase.studioEngineer != null and projectLibraryBase.studioEngineer != ''">
|
||||||
<!--搜索条件:studio工程师,包含%,单独搜索-->
|
<!--搜索条件:studio工程师,包含%,单独搜索-->
|
||||||
<choose>
|
<choose>
|
||||||
|
|||||||
+7
@@ -73,4 +73,11 @@ public interface IProjectUserPermissionService extends IService<ProjectUserPermi
|
|||||||
*/
|
*/
|
||||||
void sync();
|
void sync();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断当前用户是否拥有法规技术评估/法规意见收集中结束流程或发起补充流程的操作按钮
|
||||||
|
* @param type
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
boolean hasProcessControlButton(String type, String id);
|
||||||
}
|
}
|
||||||
|
|||||||
+76
-1
@@ -3,10 +3,18 @@ package com.jero.modules.project.service.impl;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.system.vo.LoginUser;
|
||||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
|
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
|
||||||
import com.jero.modules.cert.collect.mapper.ParamsCollectManifestEOMapper;
|
import com.jero.modules.cert.collect.mapper.ParamsCollectManifestEOMapper;
|
||||||
|
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO;
|
||||||
|
import com.jero.modules.lawsOpinionGather.service.ILawsOpinionGatherEOService;
|
||||||
|
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationEO;
|
||||||
|
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationFlowDetailEO;
|
||||||
|
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationEOService;
|
||||||
|
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationFlowDetailEOService;
|
||||||
import com.jero.modules.project.entity.*;
|
import com.jero.modules.project.entity.*;
|
||||||
import com.jero.modules.project.enums.PermissionDescriptionEnum;
|
import com.jero.modules.project.enums.PermissionDescriptionEnum;
|
||||||
|
import com.jero.modules.project.enums.ProcessControlButtonTypeEnum;
|
||||||
import com.jero.modules.project.enums.ProjectUserLocationEnum;
|
import com.jero.modules.project.enums.ProjectUserLocationEnum;
|
||||||
import com.jero.modules.project.mapper.ProjectUserPermissionMapper;
|
import com.jero.modules.project.mapper.ProjectUserPermissionMapper;
|
||||||
import com.jero.modules.project.service.*;
|
import com.jero.modules.project.service.*;
|
||||||
@@ -16,6 +24,7 @@ import com.jero.modules.wkflow.enums.DesignComplianceNodeEnum;
|
|||||||
import com.jero.modules.wkflow.enums.FlowTypeEnum;
|
import com.jero.modules.wkflow.enums.FlowTypeEnum;
|
||||||
import com.jero.modules.wkflow.feginClient.WorkFlowFeignClient;
|
import com.jero.modules.wkflow.feginClient.WorkFlowFeignClient;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -49,7 +58,12 @@ public class ProjectUserPermissionServiceImpl extends ServiceImpl<ProjectUserPer
|
|||||||
private IProjectTaskInventoryDetailEOService projectTaskInventoryDetailEOService;
|
private IProjectTaskInventoryDetailEOService projectTaskInventoryDetailEOService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private WorkFlowFeignClient workFlowFeignClient;
|
private WorkFlowFeignClient workFlowFeignClient;
|
||||||
|
@Autowired
|
||||||
|
private ILawsOpinionGatherEOService lawsOpinionGatherEOService;
|
||||||
|
@Autowired
|
||||||
|
private ILawsTechnologyEvaluationEOService lawsTechnologyEvaluationEOService;
|
||||||
|
@Autowired
|
||||||
|
private ILawsTechnologyEvaluationFlowDetailEOService lawsTechnologyEvaluationFlowDetailEOService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
@@ -309,4 +323,65 @@ public class ProjectUserPermissionServiceImpl extends ServiceImpl<ProjectUserPer
|
|||||||
permissionList.add(permission);
|
permissionList.add(permission);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断当前用户是否拥有法规技术评估/法规意见收集中结束流程或发起补充流程的操作按钮
|
||||||
|
* @param type
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean hasProcessControlButton(String type, String id) {
|
||||||
|
boolean hasProcessControlButton = true;
|
||||||
|
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
//是否是管理员
|
||||||
|
boolean administrator = sysUserService.isAdministrator();
|
||||||
|
//是否是viewer
|
||||||
|
boolean viewer = sysUserService.isViewer(currentUser.getId());
|
||||||
|
if (administrator || !viewer) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (ProcessControlButtonTypeEnum.LawsOpinionGather.getValue().equals(type)) {
|
||||||
|
//法规意见收集
|
||||||
|
LawsOpinionGatherEO lawsOpinionGatherEO = lawsOpinionGatherEOService.queryById(id);
|
||||||
|
if (ObjectUtils.isEmpty(lawsOpinionGatherEO)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
boolean eva = true;
|
||||||
|
if (ObjectUtils.isEmpty(lawsOpinionGatherEO.getEvaluatorIds()) || (ObjectUtils.isNotEmpty(lawsOpinionGatherEO.getEvaluatorIds()) && !lawsOpinionGatherEO.getEvaluatorIds().contains(currentUser.getId()))) {
|
||||||
|
eva = false;
|
||||||
|
}
|
||||||
|
if (!lawsOpinionGatherEO.getCreateBy().equals(currentUser.getUsername())
|
||||||
|
&& !eva
|
||||||
|
&& viewer) {
|
||||||
|
hasProcessControlButton = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (ProcessControlButtonTypeEnum.LawsTechnologyEvaluation.getValue().equals(type)) {
|
||||||
|
//法规技术评估
|
||||||
|
LawsTechnologyEvaluationEO lawsTechnologyEvaluationEO = lawsTechnologyEvaluationEOService.queryById(id);
|
||||||
|
if (ObjectUtils.isEmpty(lawsTechnologyEvaluationEO)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
QueryWrapper<LawsTechnologyEvaluationFlowDetailEO> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("laws_technology_evaluation_id", id);
|
||||||
|
List<LawsTechnologyEvaluationFlowDetailEO> flowDetailEOS = lawsTechnologyEvaluationFlowDetailEOService.list(queryWrapper);
|
||||||
|
if (ObjectUtils.isEmpty(flowDetailEOS)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
boolean eva = true;
|
||||||
|
if (ObjectUtils.isEmpty(flowDetailEOS.get(0).getEvaluatorId()) || (ObjectUtils.isNotEmpty(flowDetailEOS.get(0).getEvaluatorId()) && !flowDetailEOS.get(0).getEvaluatorId().contains(currentUser.getId()))) {
|
||||||
|
eva = false;
|
||||||
|
}
|
||||||
|
if (!lawsTechnologyEvaluationEO.getCreateBy().equals(currentUser.getUsername())
|
||||||
|
&& !eva
|
||||||
|
&& viewer) {
|
||||||
|
hasProcessControlButton = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
hasProcessControlButton = false;
|
||||||
|
}
|
||||||
|
return hasProcessControlButton;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-5
@@ -8,7 +8,7 @@
|
|||||||
<!-- </span>-->
|
<!-- </span>-->
|
||||||
{{$route.query.serialNumber +' '+$t('evaluationResults')}}
|
{{$route.query.serialNumber +' '+$t('evaluationResults')}}
|
||||||
</div>
|
</div>
|
||||||
<div class="doc-detail-right" v-if='!this.flag'>
|
<div class="doc-detail-right" v-if='flag'>
|
||||||
<div @click="endProcessClick"
|
<div @click="endProcessClick"
|
||||||
v-if="(formInline.createBy == this.userInfoQuery.username || administrators) && formInline.gatherResult == 'Underway'"
|
v-if="(formInline.createBy == this.userInfoQuery.username || administrators) && formInline.gatherResult == 'Underway'"
|
||||||
class="operator-text-text" :title="$t('endProcess')">
|
class="operator-text-text" :title="$t('endProcess')">
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
total: 0,
|
total: 0,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
flag:'',
|
flag:false,
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
formInline: {},
|
formInline: {},
|
||||||
administrators:false,
|
administrators:false,
|
||||||
@@ -163,10 +163,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
getAction('/project/projectUserPermission/hasProcessControlButton', {type: 'LawsOpinionGather',id : this.$route.query.id}).then((res) => {
|
getAction('/project/projectUserPermission/hasProcessControlButton', {type: 'LawsOpinionGather',id : this.$route.query.id}).then((res) => {
|
||||||
if (res.success) {
|
|
||||||
this.flag = res
|
this.flag = res
|
||||||
} else {
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
+2
-5
@@ -8,7 +8,7 @@
|
|||||||
<!-- </span>-->
|
<!-- </span>-->
|
||||||
{{$route.query.serialNumber +' '+$t('regulatoryTechnicalEvaluationResults')}}
|
{{$route.query.serialNumber +' '+$t('regulatoryTechnicalEvaluationResults')}}
|
||||||
</div>
|
</div>
|
||||||
<div class="doc-detail-right" v-if='!this.flag'>
|
<div class="doc-detail-right" v-if='flag'>
|
||||||
<div @click="CurrentStandard" class="operator-text-text" :title="$t('initiateSupplementaryProcess')">
|
<div @click="CurrentStandard" class="operator-text-text" :title="$t('initiateSupplementaryProcess')">
|
||||||
<a-icon type="profile"/>
|
<a-icon type="profile"/>
|
||||||
{{$t('initiateSupplementaryProcess')}}
|
{{$t('initiateSupplementaryProcess')}}
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
return {
|
return {
|
||||||
queryParam: {},
|
queryParam: {},
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
flag:'',
|
flag:false,
|
||||||
userInfoQuery: {},
|
userInfoQuery: {},
|
||||||
administrators: false,
|
administrators: false,
|
||||||
url: {
|
url: {
|
||||||
@@ -182,10 +182,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
getAction('/project/projectUserPermission/hasProcessControlButton', {type: 'LawsTechnologyEvaluation',id : this.$route.query.id}).then((res) => {
|
getAction('/project/projectUserPermission/hasProcessControlButton', {type: 'LawsTechnologyEvaluation',id : this.$route.query.id}).then((res) => {
|
||||||
if (res.success) {
|
|
||||||
this.flag = res
|
this.flag = res
|
||||||
} else {
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
Reference in New Issue
Block a user