合并分支 'fix_uat_20230719' 到 'master'

Fix uat 20230719

查看合并请求 laws-nio/laws-weilai!353
This commit is contained in:
高嵩
2023-07-21 15:25:55 +08:00
15 changed files with 479 additions and 85 deletions
@@ -26,10 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
@@ -294,6 +291,7 @@ public class SysCategoryServiceImpl extends ServiceImpl<SysCategoryMapper, SysCa
if(CollectionUtils.isNotEmpty(list)){
tree = TreeUtils.getSysCategoryTree(list,cut);
}
Collections.sort(tree, Comparator.comparing(SysCategoryTreeVO::getTitle));
return tree;
}catch (Exception ex){
log.error("查询树形结构失败: " + ex.getMessage());
@@ -25,10 +25,12 @@ public enum CertificationFlowNodeEnum {
* 任务办理 -> 责任人接受之后,等待提交交付物
* 任务审查 -> 责任人提交交付物之后,认证工程师审查。
*/
LIST_CONFIRMATION("List Release","清单校核","List Release"),
CHECKLIST_VERIFICATION ("Task initiation","任务发起","Task Initiation"),
TASK_RESPONSIBILITY_CONFIRMATION ("Task responsibility confirmation","任务责任确认","Responsibilty Confirmation"),
TASK_HANDLING ("Task handling","任务办理","Task Handling"),
TASK_REVIEW ("Task Review","任务审查","Task Review"),
TASK_SS("Supplementary Submission","补充提交","Supplementary Submission"), // 责任人补充提交发起
;
String key;
@@ -55,6 +55,7 @@ import com.jero.modules.system.enums.SysCategoryValueTypeEnum;
import com.jero.modules.system.mapper.SysCategoryMapper;
import com.jero.modules.system.mapper.SysRoleMapper;
import com.jero.modules.system.mapper.SysUserMapper;
import com.jero.modules.system.service.IProjectUserDutyTerritoryService;
import com.jero.modules.system.service.ISysCategoryService;
import com.jero.modules.system.service.ISysDictItemService;
import com.jero.modules.system.service.ISysUserService;
@@ -65,6 +66,7 @@ import com.jero.modules.todoCenter.enums.TodoCenterStatusEnum;
import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService;
import com.jero.modules.todoCenter.service.IProcessInfoEOService;
import com.jero.modules.wkflow.enums.FlowTypeEnum;
import com.jero.modules.wkflow.service.IProcessHistoryEOService;
import lombok.SneakyThrows;
import org.apache.commons.io.FileUtils;
import org.apache.poi.hssf.usermodel.*;
@@ -143,6 +145,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
private IProjectCertificationInventoryLogEOService projectCertificationInventoryLogEOService;
@Autowired
private IProjectCertificationInventoryEOService projectCertificationInventoryEOService;
@Autowired
private IProjectUserDutyTerritoryService projectUserDutyTerritoryService;
@Autowired
private BussDocumentLibraryEOMapper bussDocumentLibraryEOMapper;
@@ -174,6 +178,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
private SysUserMapper sysUserMapper;
@Autowired
private IProjectLibraryRoleRelEOService projectLibraryRoleRelEOService;
@Autowired
private IProcessHistoryEOService processHistoryEOService;
/**
* 保存
@@ -842,6 +848,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
public Result<?> updateStatusBatch(JSONObject json) {
String ids = json.getString("ids");
String flowStatus = json.getString("flowStatus");
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
if(StringUtils.isNotEmpty(ids)){
QueryWrapper<ProjectCertificationInventoryEO> pciQueryWrap = new QueryWrapper<>();
pciQueryWrap.lambda().in(ProjectCertificationInventoryEO::getId,Arrays.asList(ids.split(",")));
@@ -849,6 +856,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
if(CollectionUtils.isNotEmpty(pciEoList)){
pciEoList.forEach(pciEo -> {
pciEo.setFlowStatus(flowStatus);
processHistoryEOService.add(pciEo.getId(),CertificationFlowNodeEnum.TASK_SS.getKey(),currentUser.getId(),null,null,null);
});
this.updateBatchById(pciEoList);
@@ -1146,11 +1154,12 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
}
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
// 将数据的状态更新为清单待校核更新截止时间等待认证工程师进行操作
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue());
projectCertificationInventoryEO.setInventoryVerifyEndTime(inventoryVerifyEndTime);
processHistoryEOService.add(projectCertificationInventoryEO.getId(),CertificationFlowNodeEnum.LIST_CONFIRMATION.getKey(),currentUser.getId(),null,null,null);
}
this.saveProjectCertificationInventoryLog(projectCertificationInventoryEOList,OperatorTypeEnum.CERTIFICATION_INVENTORY_STUDIO_ISSUE.getValue());
@@ -1443,12 +1452,12 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
sysRoles.addAll(admin);
}
if (Viewer.size() != 0) {
Viewer.get(0).setRoleCode(ProjectRoleEnum.VIEWER.getCode());
Viewer.get(0).setRoleCode(ProjectRoleEnum.VIEWER.getValue());
Viewer.get(0).setRoleName(ProjectRoleEnum.VIEWER.getCode());
sysRoles.addAll(Viewer);
}
if (brandAdministrator.size() != 0) {
brandAdministrator.get(0).setRoleCode(ProjectRoleEnum.BRAND_ADMINISTRATOR.getCode());
brandAdministrator.get(0).setRoleCode(ProjectRoleEnum.BRAND_ADMINISTRATOR.getValue());
brandAdministrator.get(0).setRoleName(ProjectRoleEnum.BRAND_ADMINISTRATOR.getCode());
sysRoles.addAll(brandAdministrator);
}
@@ -1522,6 +1531,21 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
}
});
}
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
int isProjectRole = Integer.parseInt(roleCode);
if (isProjectRole == Integer.parseInt(com.jero.modules.project.enums.ProjectRoleEnum.VIEWER.getValue())) {
//查当前用户Viewer对应责任领域
List<String> dutyTerritoryList = this.projectUserDutyTerritoryService.queryDutyTerritoryByUserId(currentUser.getId());
if (ObjectUtils.isNotEmpty(dutyTerritoryList)) {
queryWrapper.and(query -> {
for (String duty : dutyTerritoryList) {
query.or(q -> {
q.like("duty_territory", duty);
});
}
});
}
}
IPage<ProjectCertificationInventoryEO> pageList = this.page(page, queryWrapper);
this.disposeData(pageList.getRecords(),cut);
List<ProjectCertificationInventoryEO> records = this.hearSort(projectCertificationInventoryEO, pageList.getRecords());
@@ -1882,6 +1906,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.REVIEW_AND_RETURN.getValue());
projectCertificationInventoryEO.setReasonForReturn(reasonForReturn);
processHistoryEOService.add(projectCertificationInventoryEO.getId(),CertificationFlowNodeEnum.TASK_REVIEW.getKey(),currentUser.getId(),ReviewResultEnum.RETURNED.getValue(),reasonForReturn,null);
}
this.saveProjectCertificationInventoryLog(projectCertificationInventoryEOList,OperatorTypeEnum.CERTIFICATION_INVENTORY_REVIEW_RETURNED.getValue());
@@ -1968,6 +1993,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue());
processHistoryEOService.add(projectCertificationInventoryEO.getId(),CertificationFlowNodeEnum.TASK_REVIEW.getKey(),currentUser.getId(),null,null,null);
}
this.saveProjectCertificationInventoryLog(projectCertificationInventoryEOList,OperatorTypeEnum.CERTIFICATION_INVENTORY_REVIEW_THROUGH.getValue());
@@ -2154,6 +2181,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
// 数据更新为结果待审查
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue());
processHistoryEOService.add(projectCertificationInventoryEO.getId(),CertificationFlowNodeEnum.TASK_HANDLING.getKey(),currentUser.getId(),null,null,projectCertificationInventoryEO.getDeliveryResult());
}
this.saveProjectCertificationInventoryLog(projectCertificationInventoryEOList,OperatorTypeEnum.CERTIFICATION_INVENTORY_DUTY_PERSON_SUBMIT_TASK.getValue());
@@ -2236,6 +2265,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
processInfoDetailEO.setEndTime(projectCertificationInventoryEO.getEndTime());
processInfoDetailEO.setProjectLawsInventoryId(projectCertificationInventoryEO.getId());
processInfoDetailEOList.add(processInfoDetailEO);
processHistoryEOService.add(projectCertificationInventoryEO.getId(),CertificationFlowNodeEnum.TASK_RESPONSIBILITY_CONFIRMATION.getKey(),currentUser.getId(),ReviewResultEnum.ACCEPTED.getValue(),null,null);
}
this.saveProjectCertificationInventoryLog(projectCertificationInventoryEOList,OperatorTypeEnum.CERTIFICATION_INVENTORY_DUTY_PERSON_ACCEPT_TASK.getValue());
@@ -2356,6 +2387,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.REFUSAL_OF_RESPONSIBLE_PERSON.getValue());
projectCertificationInventoryEO.setReasonForReturn(reasonForReturn);
processHistoryEOService.add(projectCertificationInventoryEO.getId(),CertificationFlowNodeEnum.TASK_RESPONSIBILITY_CONFIRMATION.getKey(),currentUser.getId(),ReviewResultEnum.REJECTED.getValue(),reasonForReturn,null);
}
this.saveProjectCertificationInventoryLog(projectCertificationInventoryEOList,OperatorTypeEnum.CERTIFICATION_INVENTORY_DUTY_PERSON_REJECT_TASK.getValue());
@@ -2524,6 +2557,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
for (ProjectCertificationInventoryEO pciEo : projectCertificationInventoryEOList) {
pciEo.setReasonForReturn(reasonForReturn);
processHistoryEOService.add(pciEo.getId(),CertificationFlowNodeEnum.CHECKLIST_VERIFICATION.getKey(),currentUser.getId(),ReviewResultEnum.RETURNED.getValue(),reasonForReturn,null);
}
this.saveProjectCertificationInventoryLog(projectCertificationInventoryEOList,OperatorTypeEnum.CERTIFICATION_INVENTORY_RETURNED_STUDIO_TASK.getValue());
@@ -2647,6 +2682,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
processInfoDetailEO.setEndTime(taskConfirmEndTime);
processInfoDetailEO.setProjectLawsInventoryId(projectCertificationInventoryEO.getId());
processInfoDetailEOList.add(processInfoDetailEO);
processHistoryEOService.add(projectCertificationInventoryEO.getId(),CertificationFlowNodeEnum.CHECKLIST_VERIFICATION.getKey(),currentUser.getId(),null,null,null);
}
this.saveProjectCertificationInventoryLog(projectCertificationInventoryEOList,OperatorTypeEnum.CERTIFICATION_INVENTORY_INITIATING_TASK.getValue());
@@ -3187,7 +3225,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
updateWrap.eq(ProjectCertificationInventoryEO::getId,projectCertificationInventoryEO.getId());
this.update(updateWrap);
}
processHistoryEOService.deleteByPId(ids);
this.saveProjectCertificationInventoryLog(projectCertificationInventoryEOList,operatorType);
// 处理待办中心相关数据
@@ -3315,6 +3353,11 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
projectCertificationInventoryLogEO.setContentEn(contentEn);
projectCertificationInventoryLogEO.setOperatorType(OperatorTypeEnum.CERTIFICATION_INVENTORY_DUTY_PERSON_TRANSFER_TASK.getValue());
projectCertificationInventoryLogEOList.add(projectCertificationInventoryLogEO);
if(certificationInventory.getFlowStatus().equals(CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())){
processHistoryEOService.add(certificationInventory.getId(),CertificationFlowNodeEnum.TASK_RESPONSIBILITY_CONFIRMATION.getKey(),currentUser.getId(),ReviewResultEnum.TRANSFER.getValue(),null,null);
}else{
processHistoryEOService.add(certificationInventory.getId(),CertificationFlowNodeEnum.TASK_HANDLING.getKey(),currentUser.getId(),ReviewResultEnum.TRANSFER.getValue(),null,null);
}
});
if(CollectionUtils.isNotEmpty(projectCertificationInventoryLogEOList)){
@@ -11366,7 +11366,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
sysRoles.addAll(admin);
}
if (Viewer.size() != 0) {
Viewer.get(0).setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.VIEWER.getCode());
Viewer.get(0).setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.VIEWER.getValue());
Viewer.get(0).setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.VIEWER.getCode());
sysRoles.addAll(Viewer);
}
@@ -13584,6 +13584,22 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
}
});
}
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
int isProjectRole = Integer.parseInt(projectLawsInventoryEO.getRoleCode());
if (isProjectRole == Integer.parseInt(ProjectRoleEnum.VIEWER.getValue())) {
//查当前用户Viewer对应责任领域
List<String> dutyTerritoryList = this.projectUserDutyTerritoryService.queryDutyTerritoryByUserId(currentUser.getId());
if (ObjectUtils.isNotEmpty(dutyTerritoryList)) {
queryWrapper.and(query -> {
for (String duty : dutyTerritoryList) {
query.or(q -> {
q.like("duty_territory", duty);
});
}
});
}
}
if (StringUtils.isNotEmpty(designFlowStatusStr)) {
String finalDesignFlowStatusStr = designFlowStatusStr.replaceAll("\\*","");
queryWrapper.and(query -> {
@@ -13613,8 +13629,6 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
});
}
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
int isProjectRole = Integer.parseInt(projectLawsInventoryEO.getRoleCode());
if(isProjectRole != Integer.parseInt(ProjectRoleEnum.STUDIO_ENGINEER.getValue())
&& isProjectRole != Integer.parseInt(ProjectRoleEnum.MANAGER.getValue())
&& isProjectRole != Integer.parseInt(ProjectRoleEnum.ADMIN.getValue())
@@ -13626,15 +13640,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
Page<ProjectLawsInventoryEO> page = new Page<ProjectLawsInventoryEO>(pageNo, pageSize);
IPage<ProjectLawsInventoryEO> pageList = this.page(page, queryWrapper);
List<ProjectLawsInventoryEO> result = pageList.getRecords();
if (isProjectRole == Integer.parseInt(ProjectRoleEnum.VIEWER.getValue())) {
//查当前用户Viewer对应责任领域
List<String> dutyTerritoryList = this.projectUserDutyTerritoryService.queryDutyTerritoryByUserId(currentUser.getId());
if (ObjectUtils.isNotEmpty(dutyTerritoryList)) {
result = result.stream().filter(e -> dutyTerritoryList.contains(e.getDutyTerritory())).collect(Collectors.toList());
} else {
result = new ArrayList<>();
}
}
this.dataDispose(result,currentUser,isProjectRole,projectLawsInventoryEO.getCut());
this.dataDictDispose(result,projectLawsInventoryEO.getCut());
//表头排序
@@ -31,7 +31,7 @@ import java.util.Map;
* @Date: 2022-05-18
* @Version: V1.0
*/
@Api(tags="流程历史表")
@Api(tags="phone流程历史表")
@RestController
@RequestMapping("/phone/wkflow/processHistoryEO")
@Slf4j
@@ -195,4 +195,17 @@ public class PhoneProcessHistoryEOController extends JeroController<ProcessHisto
return Result.OK(list);
}
/**
* 认证清单历史列表查询
*
* @return
*/
@AutoLog(value = "流程历史表-认证清单-列表查询")
@ApiOperation(value="流程历史表-认证清单-列表查询", notes="流程历史表-认证清单列表查询")
@GetMapping(value = "/queryCertificationProcessHistoryList")
public Result<List<ProcessHistoryEO>> queryCertificationProcessHistoryList(@RequestParam String id,@RequestParam String cut) {
List<ProcessHistoryEO> list = processHistoryEOService.queryCertificationProcessHistoryList(id,cut);
return Result.OK(list);
}
}
@@ -23,6 +23,18 @@ public interface IProcessHistoryEOService extends IService<ProcessHistoryEO> {
*/
void add(ProcessHistoryEO processHistoryEO);
/**
* 添加历史记录
* @param pid 流程实例ID
* @param tdKey 操作节点
* @param opPersonId 操作人
* @param opResult 操作结果
* @param opinion 意见
* @param file 附件id,多个之间使用英文逗号分隔
*/
void add(String pid, String tdKey, String opPersonId, String opResult, String opinion, String file);
/**
* 更新
*
@@ -39,6 +51,8 @@ public interface IProcessHistoryEOService extends IService<ProcessHistoryEO> {
*/
void deleteById(String id);
void deleteByPId(String pids);
/**
* 批量删除
*
@@ -77,4 +91,6 @@ public interface IProcessHistoryEOService extends IService<ProcessHistoryEO> {
* @return
*/
List<ProcessHistoryEO> queryComplianceProcessHistoryList(Map<String, Object> params);
List<ProcessHistoryEO> queryCertificationProcessHistoryList(String id,String cut);
}
@@ -7,6 +7,7 @@ import com.jero.common.api.vo.Result;
import com.jero.common.exception.JeroBootException;
import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService;
import com.jero.modules.project.enums.CertificationFlowNodeEnum;
import com.jero.modules.project.enums.OperatorTypeEnum;
import com.jero.modules.project.enums.RequestSourceEnum;
import com.jero.modules.project.enums.ReviewResultEnum;
@@ -63,6 +64,27 @@ public class ProcessHistoryEOServiceImpl extends ServiceImpl<ProcessHistoryEOMap
processHistoryEO.setUpdateTime(now);
save(processHistoryEO);
}
/**
* 添加历史记录
* @param pid 流程实例ID
* @param tdKey 操作节点
* @param opPersonId 操作人
* @param opResult 操作结果
* @param opinion 意见
* @param file 附件id,多个之间使用英文逗号分隔
*/
@Override
public void add(String pid, String tdKey, String opPersonId, String opResult, String opinion, String file) {
ProcessHistoryEO ph = new ProcessHistoryEO();
ph.setActiProcInstId(pid);
ph.setTaskDefinitionKey(tdKey);
ph.setOperatorPersonId(opPersonId);
ph.setOperatorResult(opResult);
ph.setApprovalOpinion(opinion);
ph.setApprovalFile(file);
this.add(ph);
}
/**
* 更新
@@ -88,6 +110,15 @@ public class ProcessHistoryEOServiceImpl extends ServiceImpl<ProcessHistoryEOMap
removeById(id);
}
@Override
public void deleteByPId(String pids) {
if(StringUtils.isNotEmpty(pids)){
QueryWrapper<ProcessHistoryEO> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().in(ProcessHistoryEO::getActiProcInstId,pids.split(","));
this.baseMapper.delete(queryWrapper);
}
}
/**
* 批量删除
*
@@ -190,11 +221,13 @@ public class ProcessHistoryEOServiceImpl extends ServiceImpl<ProcessHistoryEOMap
data.setName(DesignComplianceFlowNodeKeyEnum.getTextByValue(data.getTaskDefinitionKey(), cut));
} else if (StringUtils.equals(flowType, FlowTypeEnum.YZFHXSCLC.getValue()) || StringUtils.equals(flowType, FlowTypeEnum.YZ_XGJFWLC.getValue())) {
data.setName(VerifyComplianceFlowNodeKeyEnum.getTextByValue(data.getTaskDefinitionKey(), cut));
} else if (StringUtils.equals(flowType, FlowTypeEnum.CERTIFICATION_LC.getValue())) {
data.setName(CertificationFlowNodeEnum.getTextByValue(data.getTaskDefinitionKey(), cut));
} else if (StringUtils.isNotEmpty(data.getTaskDefinitionKey())) {
data.setName(DesignComplianceNodeEnum.getTextByValue(data.getTaskDefinitionKey(), cut));
}
} else if (StringUtils.isNotEmpty(data.getTaskDefinitionKey())) {
data.setName(DesignComplianceNodeEnum.getTextByValue(data.getTaskDefinitionKey(), cut));
data.setName(CertificationFlowNodeEnum.getTextByValue(data.getTaskDefinitionKey(), cut));
}
if(StringUtils.isNotEmpty(data.getApprovalFile())){
@@ -283,4 +316,17 @@ public class ProcessHistoryEOServiceImpl extends ServiceImpl<ProcessHistoryEOMap
}
return processHistoryEOList;
}
public List<ProcessHistoryEO> queryCertificationProcessHistoryList(String id,String cut) {
List<ProcessHistoryEO> processHistoryEOList = null;
if(StringUtils.isNotEmpty(id)){
QueryWrapper<ProcessHistoryEO> queryWrapper = new QueryWrapper<>();
queryWrapper.orderByAsc("create_time");
queryWrapper.lambda().in(ProcessHistoryEO::getActiProcInstId, id);
processHistoryEOList = this.baseMapper.selectList(queryWrapper);
this.disposeData(processHistoryEOList, cut);
}
return processHistoryEOList;
}
}
+1 -1
View File
@@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1.0 ,user-scalable=yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0 ,user-scalable=no">
<title>蔚来全球法规平台</title>
<!--<link rel="icon" href="<%= BASE_URL %>logo.png">-->
<script src="<%= BASE_URL %>cdn/babel-polyfill/polyfill_7_2_5.js"></script>
@@ -110,8 +110,8 @@
@click="titleClick(record)"></span>
</span>
<span slot="titleName" slot-scope="text,record">
<span style="cursor: pointer" class="textName" v-html="record.title"
:title="record.title"
<span style="cursor: pointer" class="textName" v-html="language == 'en-us'?record.title_en:record.title"
:title="language == 'en-us'?record.title_en:record.title"
@click="titleClick(record)"></span>
</span>
<span slot="file_name" slot-scope="text,record">
@@ -148,9 +148,9 @@
</a-tooltip>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">
<template slot="title">
<span v-html="item.title"></span>
<span v-html="language == 'en-us'?item.title_en:item.title"></span>
</template>
<span style="cursor: pointer" v-html="item.title"></span>
<span style="cursor: pointer" v-html="language == 'en-us'?item.title_en:item.title"></span>
</a-tooltip>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">
<template slot="title">
@@ -362,7 +362,8 @@
queryParamOne: {},
searchQueryOne: {},
orderBy: '1',
orderByField: ''
orderByField: '',
language:localStorage.getItem('language'),
}
},
watch: {
@@ -28,9 +28,12 @@
</a-tooltip>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">
<template slot="title">
<span v-html="item.title"></span>
<span v-html="language == 'zh-cn'?item.title:item.title_en ? item.title_en : item.title"></span>
</template>
<span class="text-header-text" v-if="item.title" style="cursor: pointer" v-html="item.title"></span>
<span class="text-header-text"
v-if="item.title"
style="cursor: pointer"
v-html="language == 'zh-cn'?item.title:item.title_en ? item.title_en : item.title"></span>
</a-tooltip>
<a-tooltip placement="topLeft" overlayClassName="tooltip-index" :mouseEnterDelay="0.5">
<template slot="title">
@@ -125,7 +128,8 @@ export default {
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
pageNo: 1,
queryParam: {}
queryParam: {},
language:localStorage.getItem('language'),
}
},
watch: {
@@ -92,8 +92,45 @@
<!-- {{queryProject[queryData.remarks] || '&#45;&#45;'}}-->
<!-- </div>-->
</van-collapse-item>
<van-collapse-item :title="$t('Processhistory')" name="3">
<van-steps inactive-icon="passed"
active-icon="passed"
active-color="#00BEBE"
direction="vertical" :active="dataSource.length">
<van-step v-for="(item,index) in dataSource" :key="index">
<div class="vanStepBox">
<div class="van-text">
{{item.name}}
</div>
<div class="van-text-status">
<span class="van-text-color" :class="statusClass[item.operatorResult]"
v-if="statusName[item.operatorResult]">
{{statusName[item.operatorResult]}}
</span>
</div>
<div class="van-time">
<span class="van-name">
{{item.assignee}}
</span>
|
<span class="van-name-time">
{{item.createTime}}
</span>
</div>
<div class="van-desgin">
{{item.approvalOpinion}}
</div>
<div class="van-file" @click="approvalFileClick(item,index1)"
v-if="item.approvalFileName && item.approvalFileName.length > 0"
v-for="(val,index1) in item.approvalFileName" :key="index1">
{{val}}
</div>
</div>
</van-step>
</van-steps>
</van-collapse-item>
<van-collapse-item v-if="queryForm.deliveryResult"
:title="$t('DeliverablesResult')" name="3">
:title="$t('DeliverablesResult')" name="4">
<!-- v-for="item in deliverablesResultFile"-->
<!-- {{item.fileName}}-->
<div class="content-box-type-text-one"
@@ -111,7 +148,7 @@
{{queryForm.deliveryResult}}
</div>
</van-collapse-item>
<van-collapse-item :title="$route.query.TaskKeyName" v-if="!isDisplay" name="4">
<van-collapse-item :title="$route.query.TaskKeyName" v-if="!isDisplay" name="5">
<van-form @submit="onSubmit" ref="form">
<div class="resultofhandlingClass"
v-if="$route.query.taskDefinitionKey == 'Task Review' ||
@@ -285,9 +322,31 @@
name: 'phonePreHomoMangement',
data() {
return {
activeNames: ['1', '2', '3', '4'],
activeNames: ['1', '2', '3', '4', '5'],
fileList: [],
show: false,
statusClass: {
'Accepted': 'AcceptedClass',
'Rejected': 'RejectedClass',
'Transfer': 'TransferClass',
'Returned': 'ReturnedClass',
'Adopt': 'AdoptClass',
'Compliance': 'ComplianceClass',
'Non-Compliance': 'NonComplianceClass',
'To be tracked': 'trackedClass',
'NA': 'NAClass'
},
statusName: {
'Accepted': this.$t('accept'),
'Rejected': this.$t('refuse'),
'Transfer': this.$t('turnToDo'),
'Returned': this.$t('sendBack'),
'Adopt': this.$t('adopt'),
'Compliance': this.$t('compliance'),
'Non-Compliance': this.$t('nonCompliance'),
'To be tracked': this.$t('toBeTracked'),
'NA': this.$t('NA')
},
textLoading: this.$t('loading'),
queryForm: {},
queryData: {},
@@ -299,6 +358,7 @@
deliveryResultList: [],
isDisplay: false,
certificationEngineerName: [],
dataSource: [],
url: {
queryProjectCertificationInventoryById: '/phone/toDoCenter/queryProjectCertificationInventoryById',
saveBatch: '/project/projectCertificationInventoryEO/saveBatch'
@@ -309,8 +369,45 @@
document.title = 'NIO GRP'
this.isDisplay = JSON.parse(this.$route.query.isDisplay)
this.getData()
},
methods: {
approvalFileClick(item, index) {
if (!this.isBrowser()) {
Dialog.alert({
message: '未授权用户 <br> Unauthorized User',
theme: 'round-button'
}).then(() => {
// on close
})
return
}
let url = kkFileView(item.approvalFileName[index], item.approvalFile[index])
if (url) {
this.$router.push({
path: '/phoneProblemKnowledgeBaseFile',
query: {
fileName: item.approvalFileName[index],
fileId: item.approvalFile[index]
}
})
}
},
getHistoryList() {
getAction('/wkflow/processHistoryEO/queryCertificationProcessHistoryList', { id: this.queryForm.id }).then((res) => {
if (res.success) {
this.dataSource = res.result || []
this.dataSource.forEach(val => {
if (val.approvalFileName) {
val.approvalFileName = val.approvalFileName.split(',')
val.approvalFile = val.approvalFile.split(',')
}
})
} else {
this.dataSource = []
}
})
},
iconClick() {
this.$router.go(-1)
},
@@ -469,6 +566,7 @@
}
this.queryForm = { ...this.queryForm }
this.getForm()
this.getHistoryList()
} else {
this.queryForm = {}
}
@@ -24,7 +24,7 @@
</div>
</div>
<div class="content" v-html="queryForm.content">
<div class="content" id="contentId" v-html="queryForm.content">
</div>
@@ -139,7 +139,7 @@
import { mapGetters } from 'vuex'
import { kkFileView } from '@/utils/kkfileView'
import { deleteAction } from '../../api/manage'
import { Dialog, Toast } from 'vant'
import { Dialog, ImagePreview, Toast } from 'vant'
export default {
name: 'phoneProblemKnowledgeBase',
@@ -172,6 +172,14 @@
}
})
}
this.$nextTick(() => {
let contentId = document.getElementById('contentId')
contentId.onclick = function(e) {
if (e.target.localName == 'img') {
ImagePreview([e.target.currentSrc])
}
}
})
window.addEventListener('scroll', this.scrolling)
window.addEventListener('mousedown', this.handleonmousedown)
this.getQueryBy()
+2 -2
View File
@@ -57,7 +57,7 @@
<span class="content-box-left"
:class="{'content-box-left-En-WDK':language == 'en-us' ? true : false}"
>{{$t('title')}}</span>
<span class="content-box-text" v-html="item.title || '--'"></span>
<span class="content-box-text" v-html="language == 'zh-cn'?item.title:item.title_en ? item.title_en : item.title"></span>
</div>
<div class="content-box-type">
<span class="content-box-left"
@@ -129,7 +129,7 @@
<div class="content-box-type">
<span class="content-box-left"
:class="{'content-box-left-En':language == 'en-us' ? true : false}">{{$t('title')}}</span>
<span class="content-box-text" v-html="item.title || '--'"></span>
<span class="content-box-text" v-html="language == 'en-us'?item.title_en:item.title"></span>
</div>
<div class="content-box-type">
<span class="content-box-left"
@@ -11,12 +11,12 @@
</span>
</div>
<div class="Virtual-detail-text-right">
<div class="operator-text"
v-has="'projectComment:list'"
@click="globalReplacementClick">
<a-icon type="qrcode"/>
{{ $t('globalReplacement') }}
</div>
<!-- <div class="operator-text"-->
<!-- v-has="'projectComment:list'"-->
<!-- @click="globalReplacementClick">-->
<!-- <a-icon type="qrcode"/>-->
<!-- {{ $t('globalReplacement') }}-->
<!-- </div>-->
<!-- <div class="operator-text"-->
<!-- v-if="textTitle === $t('listOfRegulations')"-->
<!-- v-has="'projectComment:list'"-->
@@ -184,45 +184,45 @@
<historicalVersionList ref="historicalVersionListRef"/>
<commentList ref="commentListRef"/>
<JLoading :loading="loading"></JLoading>
<SelectedBy ref="SelectedByRef"
:isSingleChoice="true"
:title="$t('PersonnelSelection')"
@SelectedByForm="SelectedByForm"/>
<a-drawer
:title="$t('globalReplacement')"
:maskClosable="false"
:width="900"
placement="right"
:closable="true"
@close="handleCancel"
:visible="selectVisible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-spin :spinning="submitLoading">
<a-table
ref="table"
:loading="selectLoading"
:pagination="false"
:scroll="{x: '100%',y:'calc(100vh - 300px)'}"
rowKey="id"
:data-source="dataSource"
:columns="columns"
>
<span slot="replacementPerson"
slot-scope="text,record,index"
:title="text">
<PersonnelSelection :query="{db_field_name:'newUserId',db_field_txt:$t('personLiable'),subscript:index}"
:isSingleChoice="true"
:personneQuery="record"
@change="PersonnelSelectionChange"
v-model="record.newUserIdName"/>
</span>
</a-table>
</a-spin>
<div class="drawer-bootom-button">
<a-button @click="handleCancel" style="margin-right: 16px">{{ $t('cancel') }}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="submitLoading">{{ $t('submit') }}</a-button>
</div>
</a-drawer>
<!-- <SelectedBy ref="SelectedByRef"-->
<!-- :isSingleChoice="true"-->
<!-- :title="$t('PersonnelSelection')"-->
<!-- @SelectedByForm="SelectedByForm"/>-->
<!-- <a-drawer-->
<!-- :title="$t('globalReplacement')"-->
<!-- :maskClosable="false"-->
<!-- :width="900"-->
<!-- placement="right"-->
<!-- :closable="true"-->
<!-- @close="handleCancel"-->
<!-- :visible="selectVisible"-->
<!-- style="height: 100%;overflow: auto;padding-bottom: 53px;">-->
<!-- <a-spin :spinning="submitLoading">-->
<!-- <a-table-->
<!-- ref="table"-->
<!-- :loading="selectLoading"-->
<!-- :pagination="false"-->
<!-- :scroll="{x: '100%',y:'calc(100vh - 300px)'}"-->
<!-- rowKey="id"-->
<!-- :data-source="dataSource"-->
<!-- :columns="columns"-->
<!-- >-->
<!-- <span slot="replacementPerson"-->
<!-- slot-scope="text,record,index"-->
<!-- :title="text">-->
<!-- <PersonnelSelection :query="{db_field_name:'newUserId',db_field_txt:$t('personLiable'),subscript:index}"-->
<!-- :isSingleChoice="true"-->
<!-- :personneQuery="record"-->
<!-- @change="PersonnelSelectionChange"-->
<!-- v-model="record.newUserIdName"/>-->
<!-- </span>-->
<!-- </a-table>-->
<!-- </a-spin>-->
<!-- <div class="drawer-bootom-button">-->
<!-- <a-button @click="handleCancel" style="margin-right: 16px">{{ $t('cancel') }}</a-button>-->
<!-- <a-button @click="handleSubmit" type="primary" :loading="submitLoading">{{ $t('submit') }}</a-button>-->
<!-- </div>-->
<!-- </a-drawer>-->
</div>
</template>
@@ -79,6 +79,10 @@
</a-row>
</a-form>
<div class="table-operator">
<div @click="globalReplacementClick" v-has="'projectRelatedPersonnel:globalReplacement'" class="operator-text">
<a-icon type="qrcode"/>
{{$t('globalReplacement')}}
</div>
<div @click="handleModule" v-has="'projectRelatedPersonnel:exportTemplate'" class="operator-text">
<a-icon type="download"/>
{{$t('templateDownload')}}
@@ -269,12 +273,52 @@
</a-spin>
</a-modal>
<personBatting ref="personBattingRef" @personBattingTable="personBattingTable"/>
<SelectedBy ref="SelectedByRef"
:isSingleChoice="true"
:title="$t('PersonnelSelection')"
@SelectedByForm="SelectedByForm"/>
<a-drawer
:title="$t('globalReplacement')"
:maskClosable="false"
:width="900"
placement="right"
:closable="true"
@close="selecthandleCancel"
:visible="selectVisible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-spin :spinning="submitLoading">
<a-table
ref="table"
:loading="selectLoading"
:pagination="false"
:scroll="{x: '100%',y:'calc(100vh - 300px)'}"
rowKey="id"
:data-source="selectDataSource"
:columns="selectColumns"
>
<span slot="replacementPerson"
slot-scope="text,record,index"
:title="text">
<PersonnelSelection :query="{db_field_name:'newUserId',db_field_txt:$t('personLiable'),subscript:index}"
:isSingleChoice="true"
:personneQuery="record"
@change="PersonnelSelectionOneChange"
v-model="record.newUserIdName"/>
</span>
</a-table>
</a-spin>
<div class="drawer-bootom-button">
<a-button @click="selecthandleCancel" style="margin-right: 16px">{{ $t('cancel') }}</a-button>
<a-button @click="selecthandleSubmit" type="primary" :loading="submitLoading">{{ $t('submit') }}</a-button>
</div>
</a-drawer>
</div>
</template>
<script>
import PersonnelSelection from '@/components/PersonnelSelection/index'
import SelectedBy from '@/components/SelectedBy/index'
import personBatting from './personBatting'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import ImportFile from '@/components/ImportFile/index'
@@ -286,7 +330,8 @@
components: {
PersonnelSelection,
ImportFile,
personBatting
personBatting,
SelectedBy
},
mixins: [ResizeHeader, ResizeColumnProvide],
data() {
@@ -294,6 +339,9 @@
toggleSearchStatus: false,
visible: false,
queryParam: {},
selectVisible: false,
submitLoading: false,
selectLoading: false,
columnsAll: [
{
title: this.$t('statisticalNodes'),
@@ -359,7 +407,41 @@
scopedSlots: { customRender: 'operation' }
}
],
selectColumns: [
{
title: this.$t('replacedPerson'),
align: 'left',
dataIndex: 'userName',
width: 180,
customRender: (value, row, index) => {
const obj = {
children: value,
attrs: {}
}
if (index === 0) {
obj.attrs.rowSpan = row.maxLength
} else {
obj.attrs.rowSpan = 0
}
return obj
}
},
{
title: this.$t('areaOfResponsibility'),
align: 'left',
dataIndex: 'title',
width: 180
},
{
title: this.$t('replacementPerson'),
align: 'left',
dataIndex: 'replacementPerson',
width: 180,
scopedSlots: {customRender: 'replacementPerson'}
}
],
dataSource: [],
selectDataSource:[],
loading: false,
editVisible: false,
confirmLoading: false,
@@ -433,7 +515,9 @@
},
selectedRowKeys: [],
dictOptionsValue: [],
administrators: false
administrators: false,
userIds:'',
userName:'',
}
},
computed: {
@@ -465,6 +549,81 @@
}
})
},
PersonnelSelectionOneChange(value, id, index){
this.selectDataSource[index][value] = id
this.selectDataSource = [...this.selectDataSource]
},
selecthandleCancel(){
this.selectVisible = false
},
selecthandleSubmit(){
if (this.selectDataSource.length > 0) {
let replacementUserList = []
this.selectDataSource.forEach(res => {
replacementUserList.push({
dutyTerritory: res.value,
newUserId: res.newUserId || '',
newUserName: res.newUserIdName || ''
})
})
let query = {
userId: this.userIds,
projectLibraryId: this.$route.query.id,
userName: this.userName,
replacementUserList: replacementUserList
}
this.submitLoading = true
postAction('/project/projectLibraryBase/overallReplacementUser', query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.submitLoading = false
this.selectVisible = false
this.selectDataSource = []
this.userName = ''
this.userIds = ''
this.getList()
} else {
this.$message.warning(this.$t('operationFailed'))
this.submitLoading = false
}
})
} else {
this.$message.warning(this.$t('thereReplaceableData'))
}
},
globalReplacementClick() {
this.$refs.SelectedByRef.getPush()
},
SelectedByForm(userIds, userName) {
this.userIds = userIds
this.userName = userName
this.selectVisible = true
this.$refs.SelectedByRef.visible = false
this.$refs.SelectedByRef.submitLoading = false
this.getUserAllDutyTerritoryList()
},
getUserAllDutyTerritoryList() {
let query = {
projectLibraryId: this.$route.query.id,
userName: this.userName,
userId: this.userIds
}
this.selectLoading = true
getAction('/project/projectLibraryBase/getUserAllDutyTerritoryList', query).then((res) => {
if (res.success) {
this.selectDataSource = res.result || []
this.selectDataSource.forEach(val => {
val.newUserId = ''
val.userName = this.userName
val.maxLength = this.selectDataSource.length
})
this.selectLoading = false
} else {
this.selectDataSource = []
this.selectLoading = false
}
})
},
personBattingTable() {
this.selectedRowKeys = []
this.getList()