修改中英文

This commit is contained in:
高嵩
2023-07-18 19:18:50 +08:00
parent 97370aec43
commit b26fa74ee3
7 changed files with 54 additions and 13 deletions
@@ -94,20 +94,21 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
String finalAllNumber = allNumber;
queryWrapper.eq("pi.params_template_id", paramsInfoEO.getParamsTemplateId());
if(StringUtils.isNotEmpty(allNumber)){
queryWrapper.and(wrapper->wrapper.eq("pi.nio_number", finalAllNumber));
// queryWrapper.and(wrapper->wrapper.eq("pi.nio_number", finalAllNumber));
QueryWrapper<CertCategoryParamsInfoEO> categoryParamsQueryWrap = new QueryWrapper<>();
categoryParamsQueryWrap.lambda().eq(CertCategoryParamsInfoEO::getParamsNumber,finalAllNumber);
List<CertCategoryParamsInfoEO> certCategoryParamsInfoEOList = this.certCategoryParamsInfoEOService.list(categoryParamsQueryWrap);
if(CollectionUtils.isNotEmpty(certCategoryParamsInfoEOList)){
List<String> nioNumberList = certCategoryParamsInfoEOList.stream().map(CertCategoryParamsInfoEO::getNioNumber).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(nioNumberList)){
queryWrapper.or(wrap -> {
wrap.in("pi.nio_number",nioNumberList);
});
queryWrapper.and(wrapper->{
wrapper.eq("pi.nio_number", finalAllNumber);
if(CollectionUtils.isNotEmpty(certCategoryParamsInfoEOList)){
List<String> nioNumberList = certCategoryParamsInfoEOList.stream().map(CertCategoryParamsInfoEO::getNioNumber).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(nioNumberList)){
wrapper.or(wrap -> {
wrap.in("pi.nio_number",nioNumberList);
});
}
}
}
});
}
queryWrapper.like(StringUtils.isNotEmpty(paramsInfoEO.getParamsName()), "pi.params_name", paramsInfoEO.getParamsName())
.eq(StringUtils.isNotEmpty(paramsInfoEO.getDutyTerritory()), "pi.duty_territory", paramsInfoEO.getDutyTerritory());
@@ -107,6 +107,8 @@ public interface IProjectRelatedPersonnelService extends IService<ProjectRelated
List<Map<String, Object>> queryEngineeringInterfacePersonByProjectId(Map<String, Object> params);
List<String> queryLawEngineerByProjectId(String projectLibraryId);
/**
* 获取用户的责任领域数组
* @param params
@@ -16,12 +16,18 @@ import com.jero.modules.project.mapper.ProjectCertificationDirectoryEOMapper;
import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper;
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
import com.jero.modules.project.service.IProjectCertificationDirectoryEOService;
import com.jero.modules.project.service.IProjectRelatedPersonnelService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Date;
import java.util.Map;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.servlet.http.HttpServletRequest;
@@ -41,6 +47,10 @@ public class ProjectCertificationDirectoryEOServiceImpl extends ServiceImpl<Proj
@Autowired
private ProjectLawsInventoryEOMapper projectLawsInventoryEOMapper;
@Autowired
private IProjectRelatedPersonnelService projectRelatedPersonnelService;
/**
* 保存
*
@@ -191,6 +201,12 @@ public class ProjectCertificationDirectoryEOServiceImpl extends ServiceImpl<Proj
result = Integer.parseInt(ProjectRoleEnum.REGULATI_ENGINEER.getValue());
return result;
}
List<String> resList = projectRelatedPersonnelService.queryLawEngineerByProjectId(projectLibraryId);
if (CollectionUtils.isNotEmpty(resList) && resList.contains(currentUser.getId())) {
result = Integer.parseInt(ProjectRoleEnum.REGULATI_ENGINEER.getValue());
return result;
}
}catch (Exception ex){
log.error("验证用户在该项目中的角色失败:" + ex.getMessage());
throw new JeroBootException("验证用户在该项目中的角色失败!");
@@ -1855,6 +1855,19 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
return resultList;
}
@Override
public List<String> queryLawEngineerByProjectId(String projectLibraryId) {
QueryWrapper<ProjectRelatedPersonnel> queryWrapper = new QueryWrapper<>();
List<ProjectRelatedPersonnel> prpEoList = this.list(queryWrapper.eq("project_id", projectLibraryId));
if (CollectionUtils.isNotEmpty(prpEoList)) {
String lawEngineerIds = prpEoList.stream().filter(e -> StringUtils.isNotEmpty(e.getLawEngineer()))
.map(ProjectRelatedPersonnel::getLawEngineer).collect(Collectors.joining(","));
List<String> lawEngineerList = Arrays.asList(lawEngineerIds.split(","));
return lawEngineerList;
}
return null;
}
@Override
public List<Map<String, Object>> queryEngineeringInterfacePersonByProjectId(Map<String, Object> params) {
List<Map<String, Object>> resultList = new ArrayList<>();
+3
View File
@@ -1909,4 +1909,7 @@ module.exports = {
replacedPerson:'Replaced person',
replacementPerson:'Replacement Person',
thereReplaceableData:'There is currently no replaceable data',
logOutOfLogin:'Logout',
tips:'Alert',
areYouLogout:'Are you sure to logout',
}
+3
View File
@@ -3865,4 +3865,7 @@ module.exports = {
replacedPerson:'被替换人',
replacementPerson:'替换人',
thereReplaceableData:'当前没有可替换的数据',
logOutOfLogin:'退出登录',
tips:'提示',
areYouLogout:'确认退出登录吗',
}
+6 -3
View File
@@ -102,7 +102,7 @@
<!-- </a-menu-item>-->
<a-menu-item key="6" @click="handleLogout">
<a-icon type="logout"/>
<span>退出登录</span>
<span>{{$t('logOutOfLogin')}}</span>
</a-menu-item>
<!-- <a-menu-item key="2" disabled>
<a-icon type="setting"/>
@@ -247,8 +247,8 @@ export default {
const that = this
this.$confirm({
title: '提示',
content: '真的要注销登录吗 ?',
title: this.$t('tips'),
content: this.$t('areYouLogout')+'?',
onOk() {
return that.Logout({}).then(() => {
// update-begin author:wangshuai date:20200601 for: 退出登录跳转登录页面
@@ -407,4 +407,7 @@ export default {
.action .avatar {
background: #ccc !important;
}
::v-deep .ant-dropdown-menu-item {
width: max-content!important;
}
</style>