Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH

This commit is contained in:
cuijiaming
2023-03-23 21:36:41 +08:00
25 changed files with 1219 additions and 679 deletions
@@ -67,6 +67,15 @@ public enum OperatorTypeEnum {
CERTIFICATION_INVENTORY_DUTY_PERSON_SUBMIT_TASK("认证清单-责任人提交任务","certificationInventoryDutyPersonSubmitTask"), CERTIFICATION_INVENTORY_DUTY_PERSON_SUBMIT_TASK("认证清单-责任人提交任务","certificationInventoryDutyPersonSubmitTask"),
CERTIFICATION_INVENTORY_REVIEW_THROUGH("认证清单-认证工程师审核通过","certificationInventoryReviewThrough"), CERTIFICATION_INVENTORY_REVIEW_THROUGH("认证清单-认证工程师审核通过","certificationInventoryReviewThrough"),
CERTIFICATION_INVENTORY_REVIEW_RETURNED("认证清单-认证工程师审核退回","certificationInventoryReviewReturned"), CERTIFICATION_INVENTORY_REVIEW_RETURNED("认证清单-认证工程师审核退回","certificationInventoryReviewReturned"),
/**
* 项目库-法规清单
*/
LAWS_INVENTORY_DESIGN_EXPEDITING("法规清单-催办设计符合性流程","lawsInventoryDesignExpediting"),
LAWS_INVENTORY_VERIFY_EXPEDITING("法规清单-催办验证符合性流程","lawsInventoryVerifyExpediting"),
LAWS_INVENTORY_STUDIO_EXPEDITING("法规清单-studio催办","lawsInventoryStudioExpediting"),
LAWS_INVENTORY_REGULATION_OWNER_EXPEDITING("法规清单-法规工程师催办","lawsInventoryRegulationOwnerExpediting"),
LAWS_INVENTORY_ENGINEERING_INTERFACE_PERSON_EXPEDITING("法规清单-工程接口人催办","lawsInventoryEngineeringInterfacePersonExpediting"),
; ;
String name; String name;
@@ -24,6 +24,7 @@ import com.jero.modules.project.mapper.ProjectYearNameInfoEOMapper;
import com.jero.modules.project.service.IProjectLawsInventoryEOService; import com.jero.modules.project.service.IProjectLawsInventoryEOService;
import com.jero.modules.system.entity.SysUser; import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.service.ISysUserService; import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.wkflow.enums.FlowTypeEnum;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
@@ -109,7 +110,7 @@ public class TaskAffirmJob implements Job {
List<String> userIdList = Arrays.asList(designDutyId.split(",")); List<String> userIdList = Arrays.asList(designDutyId.split(","));
Map<String, Object> sendMsgDataListMap = this.disposeSendMsgDataList(designDutyDataList); Map<String, Object> sendMsgDataListMap = this.disposeSendMsgDataList(designDutyDataList, FlowTypeEnum.SJFHXSHLC.getValue());
// 三条后结束的 // 三条后结束的
List<ProjectLawsInventoryEO> threeDaysList = (List<ProjectLawsInventoryEO>) sendMsgDataListMap.get("threeDaysList"); List<ProjectLawsInventoryEO> threeDaysList = (List<ProjectLawsInventoryEO>) sendMsgDataListMap.get("threeDaysList");
@@ -187,7 +188,7 @@ public class TaskAffirmJob implements Job {
List<String> userIdList = Arrays.asList(verifyDutyId.split(",")); List<String> userIdList = Arrays.asList(verifyDutyId.split(","));
Map<String, Object> sendMsgDataListMap = this.disposeSendMsgDataList(verifyDutyDataList); Map<String, Object> sendMsgDataListMap = this.disposeSendMsgDataList(verifyDutyDataList,FlowTypeEnum.YZFHXSCLC.getValue());
// 三条后结束的 // 三条后结束的
List<ProjectLawsInventoryEO> threeDaysList = (List<ProjectLawsInventoryEO>) sendMsgDataListMap.get("threeDaysList"); List<ProjectLawsInventoryEO> threeDaysList = (List<ProjectLawsInventoryEO>) sendMsgDataListMap.get("threeDaysList");
@@ -482,7 +483,7 @@ public class TaskAffirmJob implements Job {
log.info("任务确认流程,定时任务结束 ====================================================="); log.info("任务确认流程,定时任务结束 =====================================================");
} }
private Map<String, Object> disposeSendMsgDataList(List<ProjectLawsInventoryEO> projectLawsInventoryEOList) { private Map<String, Object> disposeSendMsgDataList(List<ProjectLawsInventoryEO> projectLawsInventoryEOList,String flowType) {
Map<String,Object> result = new HashMap<>(); Map<String,Object> result = new HashMap<>();
Date currentDate = new Date(); Date currentDate = new Date();
String currentDateStr = sdf.format(currentDate); String currentDateStr = sdf.format(currentDate);
@@ -498,22 +499,38 @@ public class TaskAffirmJob implements Job {
List<ProjectLawsInventoryEO> currentDaysList = projectLawsInventoryEOList.stream().filter(data -> { List<ProjectLawsInventoryEO> currentDaysList = projectLawsInventoryEOList.stream().filter(data -> {
boolean flag = false; boolean flag = false;
//结束日期是当前日期 //结束日期是当前日期
if(data.getInventoryAffirmDueDate() != null){ if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){
if (StringUtils.equals(currentDateStr, sdf.format(data.getInventoryAffirmDueDate()))) { if(data.getDesignDueDate() != null){
if (StringUtils.equals(currentDateStr, sdf.format(data.getDesignDueDate()))) {
flag = true; flag = true;
} }
} }
}else if(StringUtils.equals(flowType,FlowTypeEnum.YZFHXSCLC.getValue())){
if(data.getVerifyDueDate() != null){
if (StringUtils.equals(currentDateStr, sdf.format(data.getVerifyDueDate()))) {
flag = true;
}
}
}
return flag; return flag;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
// 三天后结束的 // 三天后结束的
List<ProjectLawsInventoryEO> threeDaysList = projectLawsInventoryEOList.stream().filter(data -> { List<ProjectLawsInventoryEO> threeDaysList = projectLawsInventoryEOList.stream().filter(data -> {
boolean flag = false; boolean flag = false;
if(data.getInventoryAffirmDueDate() != null){ if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){
if (StringUtils.equals(threeDaysStr, sdf.format(data.getInventoryAffirmDueDate()))) { if(data.getDesignDueDate() != null){
if (StringUtils.equals(threeDaysStr, sdf.format(data.getDesignDueDate()))) {
flag = true; flag = true;
} }
} }
}else if(StringUtils.equals(flowType,FlowTypeEnum.YZFHXSCLC.getValue())){
if(data.getVerifyDueDate() != null){
if (StringUtils.equals(threeDaysStr, sdf.format(data.getVerifyDueDate()))) {
flag = true;
}
}
}
return flag; return flag;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
@@ -521,8 +538,14 @@ public class TaskAffirmJob implements Job {
List<ProjectLawsInventoryEO> overdueList = projectLawsInventoryEOList.stream().filter(data -> { List<ProjectLawsInventoryEO> overdueList = projectLawsInventoryEOList.stream().filter(data -> {
// 只要早于当前日期都算逾期 不算当天。 // 只要早于当前日期都算逾期 不算当天。
boolean flag = false; boolean flag = false;
if(data.getInventoryAffirmDueDate() != null){ if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){
flag = (data.getInventoryAffirmDueDate().before(currentDate) && !StringUtils.equals(currentDateStr, sdf.format(data.getInventoryAffirmDueDate()))); if(data.getDesignDueDate() != null){
flag = (data.getDesignDueDate().before(currentDate) && !StringUtils.equals(currentDateStr, sdf.format(data.getDesignDueDate())));
}
}else if(StringUtils.equals(flowType,FlowTypeEnum.YZFHXSCLC.getValue())){
if(data.getVerifyDueDate() != null){
flag = (data.getVerifyDueDate().before(currentDate) && !StringUtils.equals(currentDateStr, sdf.format(data.getVerifyDueDate())));
}
} }
return flag; return flag;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
@@ -4,12 +4,15 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.common.constant.enums.MessageType2Enum; import com.jero.common.constant.enums.MessageType2Enum;
import com.jero.common.constant.enums.MessageTypeEnum; import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.common.constant.enums.MsgColorEnum; import com.jero.common.constant.enums.MsgColorEnum;
import com.jero.common.util.DateUtils;
import com.jero.modules.document.entity.BussDocumentLibraryEO; import com.jero.modules.document.entity.BussDocumentLibraryEO;
import com.jero.modules.document.service.IBussDocumentLibraryEOService; import com.jero.modules.document.service.IBussDocumentLibraryEOService;
import com.jero.modules.feishu.enums.TemplateInfoEnum2;
import com.jero.modules.feishu.service.IFeishuService; import com.jero.modules.feishu.service.IFeishuService;
import com.jero.modules.feishu.vo.FeishuMsg2Vo; import com.jero.modules.feishu.vo.FeishuMsg2Vo;
import com.jero.modules.feishu.vo.FeishuMsgVo; import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.project.entity.*; import com.jero.modules.project.entity.*;
import com.jero.modules.project.enums.ComplianceFlowStatusEnum;
import com.jero.modules.project.enums.DesignComplianceStatusEnum; import com.jero.modules.project.enums.DesignComplianceStatusEnum;
import com.jero.modules.project.enums.JumpLinkEnum; import com.jero.modules.project.enums.JumpLinkEnum;
import com.jero.modules.project.enums.SendMsgFlagEnum; import com.jero.modules.project.enums.SendMsgFlagEnum;
@@ -68,12 +71,122 @@ public class VerifyComplianceJob implements Job {
private ISysUserService sysUserService; private ISysUserService sysUserService;
@Autowired @Autowired
private IFeishuService feishuService; private IFeishuService feishuService;
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@Override @Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
log.info("验证符合性流程,定时任务开启 ====================================================="); log.info("验证符合性流程,定时任务开启 =====================================================");
// 查询出 结果待提交的数据
QueryWrapper<ProjectLawsInventoryEO> lawsInventoryEOQueryWrap = new QueryWrapper<>();
lawsInventoryEOQueryWrap.lambda().eq(ProjectLawsInventoryEO::getVerifyFlowStatus, ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue());
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = this.projectLawsInventoryEOService.list(lawsInventoryEOQueryWrap);
if(CollectionUtils.isNotEmpty(projectLawsInventoryEOList)){
// 根据项目进行分组
Map<String, List<ProjectLawsInventoryEO>> lawsInventoryByProjectLibraryIdGroupMap = projectLawsInventoryEOList.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getProjectLibraryId));
for (Map.Entry<String, List<ProjectLawsInventoryEO>> lawsInventoryByProjectLibraryIdGroup : lawsInventoryByProjectLibraryIdGroupMap.entrySet()) {
String projectLibraryId = lawsInventoryByProjectLibraryIdGroup.getKey();
List<ProjectLawsInventoryEO> lawsInventoryListByProjectLibraryId = lawsInventoryByProjectLibraryIdGroup.getValue();
if(StringUtils.isEmpty(projectLibraryId) || CollectionUtils.isEmpty(lawsInventoryListByProjectLibraryId)){
continue;
}
Map<String, List<ProjectLawsInventoryEO>> lawsInventoryByVerifyDutyIdGroupMap = lawsInventoryListByProjectLibraryId.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getVerifyDutyId));
for (Map.Entry<String, List<ProjectLawsInventoryEO>> lawsInventoryByVerifyDutyIdGroup : lawsInventoryByVerifyDutyIdGroupMap.entrySet()) {
String verifyDutyId = lawsInventoryByVerifyDutyIdGroup.getKey();
List<ProjectLawsInventoryEO> verifyDutyDataList = lawsInventoryByVerifyDutyIdGroup.getValue();
if(StringUtils.isEmpty(verifyDutyId) || CollectionUtils.isEmpty(verifyDutyDataList)){
continue;
}
List<String> userIdList = Arrays.asList(verifyDutyId.split(","));
Map<String, Object> sendMsgDataListMap = this.disposeSendMsgDataList(verifyDutyDataList);
// 十四天后结束的
List<ProjectLawsInventoryEO> fourteenDaysList = (List<ProjectLawsInventoryEO>) sendMsgDataListMap.get("fourteenDaysList");
if(CollectionUtils.isNotEmpty(fourteenDaysList)){
Date verifyDueDate = fourteenDaysList.get(0).getVerifyDueDate();
String endTime = "";
if(verifyDueDate != null){
endTime = DateUtils.formatDate(verifyDueDate);
}
String serialNumbers = fourteenDaysList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
// 给责任人发消息
Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,您的任务将于14天后结束,请及时查看处理。");
params.put("contentEn","Hello! Your task will end in 14 days. Please check and address it in a timely manner. ");
params.put("projectLibraryId",projectLibraryId);
params.put("endTime",endTime);
params.put("userIdList",userIdList);
params.put("serialNumbers",serialNumbers);
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.VALIDATION_COMPLIANCE_CONFIRMATION1.getValue(),params);
}
// 七天后结束的
List<ProjectLawsInventoryEO> sevenDaysList = (List<ProjectLawsInventoryEO>) sendMsgDataListMap.get("sevenDaysList");
if(CollectionUtils.isNotEmpty(sevenDaysList)){
Date verifyDueDate = sevenDaysList.get(0).getVerifyDueDate();
String endTime = "";
if(verifyDueDate != null){
endTime = DateUtils.formatDate(verifyDueDate);
}
String serialNumbers = sevenDaysList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
// 给责任人发消息
Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,您的任务将于7天后结束,请及时查看处理。");
params.put("contentEn","Hello! Your task will end in 7 days. Please check and address it in a timely manner. ");
params.put("projectLibraryId",projectLibraryId);
params.put("endTime",endTime);
params.put("userIdList",userIdList);
params.put("serialNumbers",serialNumbers);
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.VALIDATION_COMPLIANCE_CONFIRMATION1.getValue(),params);
}
// 当天结束的
List<ProjectLawsInventoryEO> currentDaysList = (List<ProjectLawsInventoryEO>) sendMsgDataListMap.get("currentDaysList");
if(CollectionUtils.isNotEmpty(currentDaysList)){
Date verifyDueDate = currentDaysList.get(0).getVerifyDueDate();
String endTime = "";
if(verifyDueDate != null){
endTime = DateUtils.formatDate(verifyDueDate);
}
String serialNumbers = currentDaysList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
// 给法规工程师发消息
Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,您的任务将于今天到期,请尽快查看处理。");
params.put("contentEn","Hello! Your task will expire today. Please check and address it ASAP. ");
params.put("projectLibraryId",projectLibraryId);
params.put("endTime",endTime);
params.put("userIdList",userIdList);
params.put("serialNumbers",serialNumbers);
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.VALIDATION_COMPLIANCE_CONFIRMATION1.getValue(),params);
}
// 逾期的
List<ProjectLawsInventoryEO> overdueList = (List<ProjectLawsInventoryEO>) sendMsgDataListMap.get("overdueList");
if(CollectionUtils.isNotEmpty(overdueList)){
Date verifyDueDate = overdueList.get(0).getVerifyDueDate();
String endTime = "";
if(verifyDueDate != null){
endTime = DateUtils.formatDate(verifyDueDate);
}
String serialNumbers = overdueList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
// 给法规工程师发消息
Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,您的任务已逾期,请尽快查看处理。");
params.put("contentEn","Hello! Your task is overdue. Please check and address it ASAP. ");
params.put("projectLibraryId",projectLibraryId);
params.put("endTime",endTime);
params.put("userIdList",userIdList);
params.put("serialNumbers",serialNumbers);
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.VALIDATION_COMPLIANCE_CONFIRMATION3.getValue(),params);
}
}
}
}
//查询出已经启动了验证符合性流程的数据。 并且流程没有结束。 //查询出已经启动了验证符合性流程的数据。 并且流程没有结束。
QueryWrapper<ProjectTaskInventoryEO> queryProjectTaskInventoryWrapper = new QueryWrapper<>(); /*QueryWrapper<ProjectTaskInventoryEO> queryProjectTaskInventoryWrapper = new QueryWrapper<>();
queryProjectTaskInventoryWrapper.isNotNull("verify_p_id"); queryProjectTaskInventoryWrapper.isNotNull("verify_p_id");
List<String> status = new ArrayList<>(); List<String> status = new ArrayList<>();
status.add(DesignComplianceStatusEnum.TO_SUBMIT.getValue()); status.add(DesignComplianceStatusEnum.TO_SUBMIT.getValue());
@@ -364,7 +477,92 @@ public class VerifyComplianceJob implements Job {
} }
} }
} }
} }*/
log.info("验证符合性流程,定时任务结束 ====================================================="); log.info("验证符合性流程,定时任务结束 =====================================================");
} }
private Map<String, Object> disposeSendMsgDataList(List<ProjectLawsInventoryEO> projectLawsInventoryEOList) {
Map<String,Object> result = new HashMap<>();
Date currentDate = new Date();
String currentDateStr = sdf.format(currentDate);
//获取十四天后的时间
Calendar fourteenCalendar=new GregorianCalendar();
fourteenCalendar.setTime(new Date());
fourteenCalendar.add(Calendar.DATE,14);
Date fourteenDays = fourteenCalendar.getTime();
String fourteenDaysStr = sdf.format(fourteenDays);
//获取七天后的时间
Calendar sevenCalendar=new GregorianCalendar();
sevenCalendar.setTime(new Date());
sevenCalendar.add(Calendar.DATE,7);
Date sevenDays = sevenCalendar.getTime();
String sevenDaysStr = sdf.format(sevenDays);
// 十四天后结束的
List<ProjectLawsInventoryEO> fourteenDaysList = projectLawsInventoryEOList.stream().filter(data -> {
boolean flag = false;
if(data.getVerifyDueDate() != null){
if (StringUtils.equals(fourteenDaysStr, sdf.format(data.getVerifyDueDate()))) {
flag = true;
}
}
return flag;
}).collect(Collectors.toList());
// 七天后结束的
List<ProjectLawsInventoryEO> sevenDaysList = projectLawsInventoryEOList.stream().filter(data -> {
boolean flag = false;
if(data.getVerifyDueDate() != null){
if (StringUtils.equals(sevenDaysStr, sdf.format(data.getVerifyDueDate()))) {
flag = true;
}
}
return flag;
}).collect(Collectors.toList());
// 当天结束的
List<ProjectLawsInventoryEO> currentDaysList = projectLawsInventoryEOList.stream().filter(data -> {
boolean flag = false;
//结束日期是当前日期
if(data.getVerifyDueDate() != null){
if (StringUtils.equals(currentDateStr, sdf.format(data.getVerifyDueDate()))) {
flag = true;
}
}
return flag;
}).collect(Collectors.toList());
// 逾期的 3天 7天 14天
List<ProjectLawsInventoryEO> overdueList = projectLawsInventoryEOList.stream().filter(data -> {
Calendar day3Later = new GregorianCalendar();
day3Later.setTime(data.getVerifyDueDate());
day3Later.add(Calendar.DATE, 3);
Date overdue3Days = day3Later.getTime();
Calendar day7Later = new GregorianCalendar();
day7Later.setTime(data.getVerifyDueDate());
day7Later.add(Calendar.DATE, 7);
Date overdue7Days = day7Later.getTime();
Calendar day14Later = new GregorianCalendar();
day14Later.setTime(data.getVerifyDueDate());
day14Later.add(Calendar.DATE, 14);
Date overdue14Days = day14Later.getTime();
boolean flag = (
StringUtils.equals(sdf.format(overdue3Days), sdf.format(currentDate))
|| StringUtils.equals(sdf.format(overdue7Days), sdf.format(currentDate))
|| StringUtils.equals(sdf.format(overdue14Days), sdf.format(currentDate))
);
return flag;
}).collect(Collectors.toList());
result.put("currentDaysList",currentDaysList);
result.put("sevenDaysList",sevenDaysList);
result.put("overdueList",overdueList);
result.put("fourteenDaysList",fourteenDaysList);
return result;
}
} }
@@ -77,12 +77,9 @@ public class designComplianceJob implements Job {
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
log.info("设计符合性确认流程,定时任务开启 ====================================================="); log.info("设计符合性确认流程,定时任务开启 =====================================================");
// 查询出 任务待确认、结果待提交的数据 // 查询出 结果待提交的数据
List<String> designFlowStatusList = new ArrayList<>();
designFlowStatusList.add(ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue());
designFlowStatusList.add(ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue());
QueryWrapper<ProjectLawsInventoryEO> lawsInventoryEOQueryWrap = new QueryWrapper<>(); QueryWrapper<ProjectLawsInventoryEO> lawsInventoryEOQueryWrap = new QueryWrapper<>();
lawsInventoryEOQueryWrap.lambda().in(ProjectLawsInventoryEO::getDesignFlowStatus,designFlowStatusList); lawsInventoryEOQueryWrap.lambda().eq(ProjectLawsInventoryEO::getDesignFlowStatus,ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue());
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = this.projectLawsInventoryEOService.list(lawsInventoryEOQueryWrap); List<ProjectLawsInventoryEO> projectLawsInventoryEOList = this.projectLawsInventoryEOService.list(lawsInventoryEOQueryWrap);
if(CollectionUtils.isNotEmpty(projectLawsInventoryEOList)){ if(CollectionUtils.isNotEmpty(projectLawsInventoryEOList)){
// 根据项目进行分组 // 根据项目进行分组
@@ -94,7 +91,6 @@ public class designComplianceJob implements Job {
continue; continue;
} }
// 设计符合性
Map<String, List<ProjectLawsInventoryEO>> lawsInventoryByDesignDutyIdGroupMap = lawsInventoryListByProjectLibraryId.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getDesignDutyId)); Map<String, List<ProjectLawsInventoryEO>> lawsInventoryByDesignDutyIdGroupMap = lawsInventoryListByProjectLibraryId.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getDesignDutyId));
for (Map.Entry<String, List<ProjectLawsInventoryEO>> lawsInventoryByDesignDutyIdGroup : lawsInventoryByDesignDutyIdGroupMap.entrySet()) { for (Map.Entry<String, List<ProjectLawsInventoryEO>> lawsInventoryByDesignDutyIdGroup : lawsInventoryByDesignDutyIdGroupMap.entrySet()) {
String designDutyId = lawsInventoryByDesignDutyIdGroup.getKey(); String designDutyId = lawsInventoryByDesignDutyIdGroup.getKey();
@@ -107,27 +103,46 @@ public class designComplianceJob implements Job {
Map<String, Object> sendMsgDataListMap = this.disposeSendMsgDataList(designDutyDataList); Map<String, Object> sendMsgDataListMap = this.disposeSendMsgDataList(designDutyDataList);
// 三条后结束的 // 十四天后结束的
List<ProjectLawsInventoryEO> threeDaysList = (List<ProjectLawsInventoryEO>) sendMsgDataListMap.get("threeDaysList"); List<ProjectLawsInventoryEO> fourteenDaysList = (List<ProjectLawsInventoryEO>) sendMsgDataListMap.get("fourteenDaysList");
if(CollectionUtils.isNotEmpty(threeDaysList)){ if(CollectionUtils.isNotEmpty(fourteenDaysList)){
Date designDueDate = threeDaysList.get(0).getDesignDueDate(); Date designDueDate = fourteenDaysList.get(0).getDesignDueDate();
String endTime = ""; String endTime = "";
if(designDueDate != null){ if(designDueDate != null){
endTime = DateUtils.formatDate(designDueDate); endTime = DateUtils.formatDate(designDueDate);
} }
String serialNumbers = threeDaysList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(",")); String serialNumbers = fourteenDaysList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
// 给法规工程师发消息 // 给责任人发消息
Map<String,Object> params = new HashMap<>(); Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,以下待办任务距离截止日期仅剩3天,请及时查看处理。"); params.put("contentCn","您好,您的任务将于14天后结束,请及时查看处理。");
params.put("contentEn","Hello! This task will expire in 3 days. Please check and address it in a timely manner. Thank you!"); params.put("contentEn","Hello! Your task will end in 14 days. Please check and address it in a timely manner. ");
params.put("projectLibraryId",projectLibraryId); params.put("projectLibraryId",projectLibraryId);
params.put("endTime",endTime); params.put("endTime",endTime);
params.put("userIdList",userIdList); params.put("userIdList",userIdList);
params.put("serialNumbers",serialNumbers); params.put("serialNumbers",serialNumbers);
params.put("flowTypeCn","设计符合性流程"); this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.DESIGN_COMPLIANCE_CONFIRMATION1.getValue(),params);
params.put("flowTypeEn","Design Compliance Process");
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION4.getValue(),params);
} }
// 七天后结束的
List<ProjectLawsInventoryEO> sevenDaysList = (List<ProjectLawsInventoryEO>) sendMsgDataListMap.get("sevenDaysList");
if(CollectionUtils.isNotEmpty(sevenDaysList)){
Date designDueDate = sevenDaysList.get(0).getDesignDueDate();
String endTime = "";
if(designDueDate != null){
endTime = DateUtils.formatDate(designDueDate);
}
String serialNumbers = sevenDaysList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
// 给责任人发消息
Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,您的任务将于7天后结束,请及时查看处理。");
params.put("contentEn","Hello! Your task will end in 7 days. Please check and address it in a timely manner. ");
params.put("projectLibraryId",projectLibraryId);
params.put("endTime",endTime);
params.put("userIdList",userIdList);
params.put("serialNumbers",serialNumbers);
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.DESIGN_COMPLIANCE_CONFIRMATION1.getValue(),params);
}
// 当天结束的 // 当天结束的
List<ProjectLawsInventoryEO> currentDaysList = (List<ProjectLawsInventoryEO>) sendMsgDataListMap.get("currentDaysList"); List<ProjectLawsInventoryEO> currentDaysList = (List<ProjectLawsInventoryEO>) sendMsgDataListMap.get("currentDaysList");
if(CollectionUtils.isNotEmpty(currentDaysList)){ if(CollectionUtils.isNotEmpty(currentDaysList)){
@@ -139,15 +154,13 @@ public class designComplianceJob implements Job {
String serialNumbers = currentDaysList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(",")); String serialNumbers = currentDaysList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
// 给法规工程师发消息 // 给法规工程师发消息
Map<String,Object> params = new HashMap<>(); Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,以下待办任务已到截止日期,请尽快查看处理。"); params.put("contentCn","您好,您的任务将于今天到期,请尽快查看处理。");
params.put("contentEn","Hello! This task will expire today. Please check and address it ASAP. Thank you!"); params.put("contentEn","Hello! Your task will expire today. Please check and address it ASAP. ");
params.put("projectLibraryId",projectLibraryId); params.put("projectLibraryId",projectLibraryId);
params.put("endTime",endTime); params.put("endTime",endTime);
params.put("userIdList",userIdList); params.put("userIdList",userIdList);
params.put("serialNumbers",serialNumbers); params.put("serialNumbers",serialNumbers);
params.put("flowTypeCn","设计符合性流程"); this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.DESIGN_COMPLIANCE_CONFIRMATION1.getValue(),params);
params.put("flowTypeEn","Design Compliance Process");
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION4.getValue(),params);
} }
// 逾期的 // 逾期的
List<ProjectLawsInventoryEO> overdueList = (List<ProjectLawsInventoryEO>) sendMsgDataListMap.get("overdueList"); List<ProjectLawsInventoryEO> overdueList = (List<ProjectLawsInventoryEO>) sendMsgDataListMap.get("overdueList");
@@ -160,15 +173,13 @@ public class designComplianceJob implements Job {
String serialNumbers = overdueList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(",")); String serialNumbers = overdueList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
// 给法规工程师发消息 // 给法规工程师发消息
Map<String,Object> params = new HashMap<>(); Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,以下待办任务已逾期,请尽快处理。"); params.put("contentCn","您好,您的任务已逾期,请尽快查看处理。");
params.put("contentEn","Hello! This task is overdue. Please address it ASAP. Thank you!"); params.put("contentEn","Hello! Your task is overdue. Please check and address it ASAP. ");
params.put("projectLibraryId",projectLibraryId); params.put("projectLibraryId",projectLibraryId);
params.put("endTime",endTime); params.put("endTime",endTime);
params.put("userIdList",userIdList); params.put("userIdList",userIdList);
params.put("serialNumbers",serialNumbers); params.put("serialNumbers",serialNumbers);
params.put("flowTypeCn","设计符合性流程"); this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.DESIGN_COMPLIANCE_CONFIRMATION3.getValue(),params);
params.put("flowTypeEn","Design Compliance Process");
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION5.getValue(),params);
} }
} }
} }
@@ -516,7 +527,7 @@ public class designComplianceJob implements Job {
}).collect(Collectors.toList()); }).collect(Collectors.toList());
// 七天后结束的 // 七天后结束的
List<ProjectLawsInventoryEO> threeDaysList = projectLawsInventoryEOList.stream().filter(data -> { List<ProjectLawsInventoryEO> sevenDaysList = projectLawsInventoryEOList.stream().filter(data -> {
boolean flag = false; boolean flag = false;
if(data.getDesignDueDate() != null){ if(data.getDesignDueDate() != null){
if (StringUtils.equals(sevenDaysStr, sdf.format(data.getDesignDueDate()))) { if (StringUtils.equals(sevenDaysStr, sdf.format(data.getDesignDueDate()))) {
@@ -538,19 +549,35 @@ public class designComplianceJob implements Job {
return flag; return flag;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
// 逾期的 // 逾期的 3天 7天 14天
List<ProjectLawsInventoryEO> overdueList = projectLawsInventoryEOList.stream().filter(data -> { List<ProjectLawsInventoryEO> overdueList = projectLawsInventoryEOList.stream().filter(data -> {
// 只要早于当前日期都算逾期 不算当天。 Calendar day3Later = new GregorianCalendar();
boolean flag = false; day3Later.setTime(data.getDesignDueDate());
if(data.getDesignDueDate() != null){ day3Later.add(Calendar.DATE, 3);
flag = (data.getDesignDueDate().before(currentDate) && !StringUtils.equals(currentDateStr, sdf.format(data.getDesignDueDate()))); Date overdue3Days = day3Later.getTime();
}
Calendar day7Later = new GregorianCalendar();
day7Later.setTime(data.getDesignDueDate());
day7Later.add(Calendar.DATE, 7);
Date overdue7Days = day7Later.getTime();
Calendar day14Later = new GregorianCalendar();
day14Later.setTime(data.getDesignDueDate());
day14Later.add(Calendar.DATE, 14);
Date overdue14Days = day14Later.getTime();
boolean flag = (
StringUtils.equals(sdf.format(overdue3Days), sdf.format(currentDate))
|| StringUtils.equals(sdf.format(overdue7Days), sdf.format(currentDate))
|| StringUtils.equals(sdf.format(overdue14Days), sdf.format(currentDate))
);
return flag; return flag;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
result.put("currentDaysList",currentDaysList); result.put("currentDaysList",currentDaysList);
result.put("threeDaysList",threeDaysList); result.put("sevenDaysList",sevenDaysList);
result.put("overdueList",overdueList); result.put("overdueList",overdueList);
result.put("fourteenDaysList",fourteenDaysList);
return result; return result;
} }
} }
@@ -214,4 +214,16 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
* @param projectLawsInventoryEOS * @param projectLawsInventoryEOS
*/ */
void lawsInventoryEOListSortByInventoryAffirmDueDate(List<ProjectLawsInventoryEO> projectLawsInventoryEOS); void lawsInventoryEOListSortByInventoryAffirmDueDate(List<ProjectLawsInventoryEO> projectLawsInventoryEOS);
/**
* 法规清单根据设计符合性截至日期顺序排序
* @param projectLawsInventoryEOS
*/
void lawsInventoryEOListSortByDesignDueDate(List<ProjectLawsInventoryEO> projectLawsInventoryEOS);
/**
* 法规清单根据验证符合性截至日期顺序排序
* @param projectLawsInventoryEOS
*/
void lawsInventoryEOListSortByVerifyDueDate(List<ProjectLawsInventoryEO> projectLawsInventoryEOS);
} }
@@ -644,6 +644,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
* @param projectLawsInventoryEO * @param projectLawsInventoryEO
*/ */
private void updateProjectLawsInventorySendMessage(ProjectLawsInventoryEO projectLawsInventoryEO) { private void updateProjectLawsInventorySendMessage(ProjectLawsInventoryEO projectLawsInventoryEO) {
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
ProjectLawsInventoryEO projectLawsInventoryOld = this.queryById(projectLawsInventoryEO.getId()); ProjectLawsInventoryEO projectLawsInventoryOld = this.queryById(projectLawsInventoryEO.getId());
boolean toBeCheckedFlag = ( boolean toBeCheckedFlag = (
StringUtils.equals(projectLawsInventoryOld.getDesignFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue()) StringUtils.equals(projectLawsInventoryOld.getDesignFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
@@ -758,6 +760,57 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(),params); this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(),params);
} }
} }
// 如果编辑了法规工程师,给新的法规工程师发消息
if((StringUtils.isNotEmpty(projectLawsInventoryOld.getRegulationOwnerId()) && StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId()))){
if (!StringUtils.equals(projectLawsInventoryOld.getRegulationOwnerId(), projectLawsInventoryEO.getRegulationOwnerId())) {
String endTime = "";
String regulationOwnerId = "";
// 设计符合性 结果待审查、结果待提交 标识 判断法规工程师是否被修改了 如果被修改了,给新的法规工程师发消息
boolean toBeReviewedDesignFlag = (
StringUtils.equals(projectLawsInventoryOld.getDesignFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
|| StringUtils.equals(projectLawsInventoryOld.getDesignFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
);
if(toBeReviewedDesignFlag){
if(projectLawsInventoryEO.getDesignDueDate() != null){
endTime = DateUtils.formatDate(projectLawsInventoryEO.getDesignDueDate());
}
regulationOwnerId = projectLawsInventoryEO.getRegulationOwnerId();
// 给法规工程师发消息
Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,"+currentUser.getUsername()+"向您分发了该任务,请及时查看处理。");
params.put("contentEn","Hello! "+currentUser.getUsername()+" has assigned this task to you. Please check and address it in a timely manner.");
params.put("projectLibraryId", projectLawsInventoryEO.getProjectLibraryId());
params.put("endTime",endTime);
params.put("userIdList",Arrays.asList(regulationOwnerId.split(",")));
params.put("serialNumbers",projectLawsInventoryEO.getSerialNumber());
this.sendMessageByTemplateId(TemplateInfoEnum2.DESIGN_COMPLIANCE_CONFIRMATION1.getValue(),params);
}
// 验证符合性 结果待审查、结果待提交 标识 判断法规工程师是否被修改了 如果被修改了,给新的法规工程师发消息
boolean toBeReviewedVerifyFlag = (
StringUtils.equals(projectLawsInventoryOld.getDesignFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
|| StringUtils.equals(projectLawsInventoryOld.getDesignFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
);
if (toBeReviewedVerifyFlag) {
if(projectLawsInventoryEO.getVerifyDueDate() != null){
endTime = DateUtils.formatDate(projectLawsInventoryEO.getVerifyDueDate());
}
regulationOwnerId = projectLawsInventoryEO.getRegulationOwnerId();
// 给法规工程师发消息
Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,"+currentUser.getUsername()+"向您分发了该任务,请及时查看处理。");
params.put("contentEn","Hello! "+currentUser.getUsername()+" has assigned this task to you. Please check and address it in a timely manner.");
params.put("projectLibraryId", projectLawsInventoryEO.getProjectLibraryId());
params.put("endTime",endTime);
params.put("userIdList",Arrays.asList(regulationOwnerId.split(",")));
params.put("serialNumbers",projectLawsInventoryEO.getSerialNumber());
this.sendMessageByTemplateId(TemplateInfoEnum2.VALIDATION_COMPLIANCE_CONFIRMATION1.getValue(),params);
}
}
}
} }
private void setProjectLawsInventoryPermission(String userId, String projectId,String lawsInventoryId,Date now, List<ProjectUserPermission> adds, String belong) { private void setProjectLawsInventoryPermission(String userId, String projectId,String lawsInventoryId,Date now, List<ProjectUserPermission> adds, String belong) {
@@ -9405,6 +9458,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
String cut = json.getString("cut"); String cut = json.getString("cut");
String ids = json.getString("ids"); String ids = json.getString("ids");
String projectLibraryId = json.getString("projectLibraryId"); String projectLibraryId = json.getString("projectLibraryId");
String operateType = json.getString("operateType"); // 操作类型,判断是studio催办 还是法规工程师催办
if(StringUtils.isEmpty(ids)){ if(StringUtils.isEmpty(ids)){
if(StringUtils.equals(cut,CutEnum.CN.getValue())){ if(StringUtils.equals(cut,CutEnum.CN.getValue())){
throw new JeroBootException("请至少选择一条数据!"); throw new JeroBootException("请至少选择一条数据!");
@@ -9421,7 +9475,207 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
lawsInventoryEOQueryWrapper.lambda().in(ProjectLawsInventoryEO::getId,projectLawsInventoryIdList); lawsInventoryEOQueryWrapper.lambda().in(ProjectLawsInventoryEO::getId,projectLawsInventoryIdList);
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = this.baseMapper.selectList(lawsInventoryEOQueryWrapper); List<ProjectLawsInventoryEO> projectLawsInventoryEOList = this.baseMapper.selectList(lawsInventoryEOQueryWrapper);
//获取已经发起的 任务确认流程信息(当前处理人) // 只有studio催办的时候,才会给法规工程师发消息
if(StringUtils.equals(operateType,OperatorTypeEnum.LAWS_INVENTORY_STUDIO_EXPEDITING.getValue())){
// 如果设计符合性或验证符合性流程状态其中一个为 清单待校核,催办时就需要给这一条数据的法规工程师发消息
List<ProjectLawsInventoryEO> toBeCheckedLawsInventoryList = projectLawsInventoryEOList.stream().filter(lawsInventory -> {
boolean flag =false;
if (StringUtils.equals(lawsInventory.getDesignFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
|| StringUtils.equals(lawsInventory.getVerifyFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())){
flag = true;
}
return flag;
}).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(toBeCheckedLawsInventoryList)){
Map<String, List<ProjectLawsInventoryEO>> regulationOwnerGroupMap = toBeCheckedLawsInventoryList.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getRegulationOwnerId));
for (Map.Entry<String, List<ProjectLawsInventoryEO>> regulationOwnerMap : regulationOwnerGroupMap.entrySet()) {
String regulationOwnerId = regulationOwnerMap.getKey();
List<ProjectLawsInventoryEO> lawsInventoryEOList = regulationOwnerMap.getValue();
if(StringUtils.isEmpty(regulationOwnerId) || CollectionUtils.isEmpty(lawsInventoryEOList)){
continue;
}
this.lawsInventoryEOListSortByInventoryAffirmDueDate(lawsInventoryEOList);
Date inventoryAffirmDueDate = lawsInventoryEOList.get(0).getInventoryAffirmDueDate();
String endTime = "";
if(inventoryAffirmDueDate != null){
endTime = DateUtils.formatDate(inventoryAffirmDueDate);
}
String serialNumbers = lawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
List<String> userIdList = Arrays.asList(regulationOwnerId.split(","));
// 给法规工程师发消息
Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,请及时校核法规清单内容并发起符合性流程,谢谢!");
params.put("contentEn","Please check the content of the regulation list and initiate the compliance process in a timely manner. Thank you!");
params.put("projectLibraryId",projectLibraryId);
params.put("endTime",endTime);
params.put("userIdList",userIdList);
params.put("serialNumbers",serialNumbers);
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE1.getValue(),params);
}
}
}
// 催办类型 可以只催设计符合性 也可以只催验证符合性
String expeditingType = json.getString("expeditingType");
if(StringUtils.contains(expeditingType,OperatorTypeEnum.LAWS_INVENTORY_DESIGN_EXPEDITING.getValue())){
// 催办设计符合性流程状态为 清单待确认的 责任人
List<ProjectLawsInventoryEO> toBeConfirmedLawsInventoryList = projectLawsInventoryEOList.stream().filter(lawsInventory -> {
boolean flag =false;
if (StringUtils.equals(lawsInventory.getDesignFlowStatus(),ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())){
flag = true;
}
return flag;
}).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(toBeConfirmedLawsInventoryList)) {
Map<String, List<ProjectLawsInventoryEO>> designDutyGroupMap = toBeConfirmedLawsInventoryList.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getDesignDutyId));
for (Map.Entry<String, List<ProjectLawsInventoryEO>> designDutyMap : designDutyGroupMap.entrySet()) {
String designDutyId = designDutyMap.getKey();
List<ProjectLawsInventoryEO> lawsInventoryEOList = designDutyMap.getValue();
if(StringUtils.isEmpty(designDutyId) || CollectionUtils.isEmpty(lawsInventoryEOList)){
continue;
}
this.lawsInventoryEOListSortByDesignDueDate(lawsInventoryEOList);
Date designDueDate = lawsInventoryEOList.get(0).getDesignDueDate();
String endTime = "";
if(designDueDate != null){
endTime = DateUtils.formatDate(designDueDate);
}
String serialNumbers = lawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
List<String> userIdList = Arrays.asList(designDutyId.split(","));
// 给设计符合性流程责任人发消息
Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,请及时查看确认以下任务要求,谢谢!");
params.put("contentEn","Hello! Please check and confirm the following task requirement in a timely manner. Thank you!");
params.put("projectLibraryId",projectLibraryId);
params.put("endTime",endTime);
params.put("userIdList",userIdList);
params.put("serialNumbers",serialNumbers);
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE2.getValue(),params);
}
}
// 催办设计符合性流程状态为 结果待提交的 责任人
List<ProjectLawsInventoryEO> toBeSubmitLawsInventoryList = projectLawsInventoryEOList.stream().filter(lawsInventory -> {
boolean flag =false;
if (StringUtils.equals(lawsInventory.getDesignFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())){
flag = true;
}
return flag;
}).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(toBeSubmitLawsInventoryList)) {
Map<String, List<ProjectLawsInventoryEO>> designDutyGroupMap = toBeSubmitLawsInventoryList.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getVerifyDutyId));
for (Map.Entry<String, List<ProjectLawsInventoryEO>> designDutyMap : designDutyGroupMap.entrySet()) {
String designDutyId = designDutyMap.getKey();
List<ProjectLawsInventoryEO> lawsInventoryEOList = designDutyMap.getValue();
if(StringUtils.isEmpty(designDutyId) || CollectionUtils.isEmpty(lawsInventoryEOList)){
continue;
}
this.lawsInventoryEOListSortByVerifyDueDate(lawsInventoryEOList);
Date designDueDate = lawsInventoryEOList.get(0).getVerifyDueDate();
String endTime = "";
if(designDueDate != null){
endTime = DateUtils.formatDate(designDueDate);
}
String serialNumbers = lawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
List<String> userIdList = Arrays.asList(designDutyId.split(","));
// 给设计符合性流程责任人发消息
Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,请尽快查看处理此项任务,谢谢!");
params.put("contentEn","Hello! Please check and address the task ASAP. Thank you!");
params.put("projectLibraryId",projectLibraryId);
params.put("endTime",endTime);
params.put("userIdList",userIdList);
params.put("serialNumbers",serialNumbers);
this.sendMessageByTemplateId(TemplateInfoEnum2.DESIGN_COMPLIANCE_CONFIRMATION1.getValue(),params);
}
}
}
if(StringUtils.contains(expeditingType,OperatorTypeEnum.LAWS_INVENTORY_VERIFY_EXPEDITING.getValue())){
// 催办验证符合性流程状态为 清单待确认的 责任人
List<ProjectLawsInventoryEO> toBeConfirmedLawsInventoryList = projectLawsInventoryEOList.stream().filter(lawsInventory -> {
boolean flag =false;
if (StringUtils.equals(lawsInventory.getVerifyFlowStatus(),ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())){
flag = true;
}
return flag;
}).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(toBeConfirmedLawsInventoryList)) {
Map<String, List<ProjectLawsInventoryEO>> verifyDutyGroupMap = toBeConfirmedLawsInventoryList.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getVerifyDutyId));
for (Map.Entry<String, List<ProjectLawsInventoryEO>> verifyDutyMap : verifyDutyGroupMap.entrySet()) {
String verifyDutyId = verifyDutyMap.getKey();
List<ProjectLawsInventoryEO> lawsInventoryEOList = verifyDutyMap.getValue();
if(StringUtils.isEmpty(verifyDutyId) || CollectionUtils.isEmpty(lawsInventoryEOList)){
continue;
}
this.lawsInventoryEOListSortByVerifyDueDate(lawsInventoryEOList);
Date verifyDueDate = lawsInventoryEOList.get(0).getVerifyDueDate();
String endTime = "";
if(verifyDueDate != null){
endTime = DateUtils.formatDate(verifyDueDate);
}
String serialNumbers = lawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
List<String> userIdList = Arrays.asList(verifyDutyId.split(","));
// 给设计符合性流程责任人发消息
Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,请及时查看确认以下任务要求,谢谢!");
params.put("contentEn","Hello! Please check and confirm the following task requirement in a timely manner. Thank you!");
params.put("projectLibraryId",projectLibraryId);
params.put("endTime",endTime);
params.put("userIdList",userIdList);
params.put("serialNumbers",serialNumbers);
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE2.getValue(),params);
}
}
// 催办验证符合性流程状态为 结果待提交的 责任人
List<ProjectLawsInventoryEO> toBeSubmitLawsInventoryList = projectLawsInventoryEOList.stream().filter(lawsInventory -> {
boolean flag =false;
if (StringUtils.equals(lawsInventory.getVerifyFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())){
flag = true;
}
return flag;
}).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(toBeSubmitLawsInventoryList)) {
Map<String, List<ProjectLawsInventoryEO>> verifyDutyGroupMap = toBeSubmitLawsInventoryList.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getVerifyDutyId));
for (Map.Entry<String, List<ProjectLawsInventoryEO>> verifyDutyMap : verifyDutyGroupMap.entrySet()) {
String verifyDutyId = verifyDutyMap.getKey();
List<ProjectLawsInventoryEO> lawsInventoryEOList = verifyDutyMap.getValue();
if(StringUtils.isEmpty(verifyDutyId) || CollectionUtils.isEmpty(lawsInventoryEOList)){
continue;
}
this.lawsInventoryEOListSortByVerifyDueDate(lawsInventoryEOList);
Date verifyDueDate = lawsInventoryEOList.get(0).getVerifyDueDate();
String endTime = "";
if(verifyDueDate != null){
endTime = DateUtils.formatDate(verifyDueDate);
}
String serialNumbers = lawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
List<String> userIdList = Arrays.asList(verifyDutyId.split(","));
// 给设计符合性流程责任人发消息
Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,请尽快查看处理此项任务,谢谢!");
params.put("contentEn","Hello! Please check and address the task ASAP. Thank you!");
params.put("projectLibraryId",projectLibraryId);
params.put("endTime",endTime);
params.put("userIdList",userIdList);
params.put("serialNumbers",serialNumbers);
this.sendMessageByTemplateId(TemplateInfoEnum2.VALIDATION_COMPLIANCE_CONFIRMATION1.getValue(),params);
}
}
}
/*//获取已经发起的 任务确认流程信息(当前处理人)
JSONObject queryFlowCurrentTaskJson = new JSONObject(); JSONObject queryFlowCurrentTaskJson = new JSONObject();
queryFlowCurrentTaskJson.put("projectLawsInventoryIdList",projectLawsInventoryIdList); queryFlowCurrentTaskJson.put("projectLawsInventoryIdList",projectLawsInventoryIdList);
queryFlowCurrentTaskJson.put("flowType",FlowTypeEnum.RWQRLC.getValue()); queryFlowCurrentTaskJson.put("flowType",FlowTypeEnum.RWQRLC.getValue());
@@ -9628,7 +9882,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
} }
} }
}); });*/
return Result.OK(); return Result.OK();
} }
@@ -10530,5 +10784,31 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
}); });
} }
@Override
public void lawsInventoryEOListSortByDesignDueDate(List<ProjectLawsInventoryEO> projectLawsInventoryEOS) {
Collections.sort(projectLawsInventoryEOS, new Comparator<ProjectLawsInventoryEO>() {
@Override
public int compare(ProjectLawsInventoryEO p1, ProjectLawsInventoryEO p2) {
if(p1.getDesignDueDate() != null && p2.getDesignDueDate() != null){
return p1.getDesignDueDate().compareTo(p2.getDesignDueDate());
}
return 1;
}
});
}
@Override
public void lawsInventoryEOListSortByVerifyDueDate(List<ProjectLawsInventoryEO> projectLawsInventoryEOS) {
Collections.sort(projectLawsInventoryEOS, new Comparator<ProjectLawsInventoryEO>() {
@Override
public int compare(ProjectLawsInventoryEO p1, ProjectLawsInventoryEO p2) {
if(p1.getDesignDueDate() != null && p2.getDesignDueDate() != null){
return p1.getDesignDueDate().compareTo(p2.getDesignDueDate());
}
return 1;
}
});
}
} }
+7
View File
@@ -1701,5 +1701,12 @@ module.exports = {
returntofill:'Return to fill', returntofill:'Return to fill',
thereAreCurrentlyNoRegulationsToHandle:'There are currently no regulations to handle', thereAreCurrentlyNoRegulationsToHandle:'There are currently no regulations to handle',
certificationSubmission:'Certification Submission', certificationSubmission:'Certification Submission',
upgradecompletion:'Upgrade completion',
implementedupgrade:'Whether the implemented upgrade is consistent with the record',
numberofvehicles:'Number of vehicles that have completed upgrades',
vehicleshavenotcompletedonlineupgrade:'The reason why some vehicles have not completed online upgrade',
cause:'cause',
implementationrecords:'Fault handling measures and emergency response implementation records',
} }
+6
View File
@@ -1801,4 +1801,10 @@ module.exports = {
expeditionProcess:'催办流程', expeditionProcess:'催办流程',
thereAreCurrentlyNoRegulationsToHandle:'当前没有可处理的法规', thereAreCurrentlyNoRegulationsToHandle:'当前没有可处理的法规',
certificationSubmission:'认证提交', certificationSubmission:'认证提交',
upgradecompletion:'升级完成情况',
implementedupgrade:'实施的升级是否和备案一致',
numberofvehicles:'完成升级的车辆数',
vehicleshavenotcompletedonlineupgrade:'部分车辆未完在线升级的原因',
cause:'原因',
implementationrecords:'故障处置措施和应急响应实施记录',
} }
@@ -819,7 +819,7 @@
customRender: 'titleName' customRender: 'titleName'
} }
if (res.db_field_name == 'nioNumber') { if (res.db_field_name == 'nioNumber') {
this.columns[index].width = 100 this.columns[index].width = 120
} }
if (res.click1) { if (res.click1) {
this.columns[index].scopedSlots = { this.columns[index].scopedSlots = {
@@ -610,7 +610,7 @@
customRender: 'titleName' customRender: 'titleName'
} }
if (res.db_field_name == 'nioNumber') { if (res.db_field_name == 'nioNumber') {
this.columns[index].width = 100 this.columns[index].width = 120
} }
if (res.click) { if (res.click) {
// 工程接口人列表修改 // 工程接口人列表修改
@@ -19,7 +19,7 @@
{{$t('recordstatus')}}</span> {{$t('recordstatus')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="recordstatus"> <a-form-model-item class="itemModel" prop="recordstatus">
<j-dict-select-tag class="box-input" v-model="formInline.recordstatus" <j-dict-select-tag class="box-input" v-model="formInline.bazt"
:placeholder="$t('PleaseSelect')+$t('recordstatus')" :placeholder="$t('PleaseSelect')+$t('recordstatus')"
:type="'select'" :type="'select'"
:triggerChange="false" :dictCode="'recordstatus'"/> :triggerChange="false" :dictCode="'recordstatus'"/>
@@ -36,10 +36,10 @@
<a-form-model-item class="itemModel" prop="filingtime"> <a-form-model-item class="itemModel" prop="filingtime">
<a-date-picker class="box-input" <a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('filingtime')" :placeholder="$t('PleaseSelect')+$t('filingtime')"
@change="dateChange({db_field_name:'filingtime'})" @change="dateChange({db_field_name:'batjs'})"
format="YYYY-MM-DD" format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode" :getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.filingtime" v-model="formInline.batjs"
:disabled="false" :disabled="false"
style="width: 100%"/> style="width: 100%"/>
</a-form-model-item> </a-form-model-item>
@@ -54,7 +54,7 @@
</div> </div>
<a-form-model-item class="itemModel" prop="remarks"> <a-form-model-item class="itemModel" prop="remarks">
<a-textarea :placeholder="$t('pleaseEnter')+$t('remarks')" <a-textarea :placeholder="$t('pleaseEnter')+$t('remarks')"
v-model="formInline.remark" v-model="formInline.bz"
:rows="4"/> :rows="4"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -75,7 +75,9 @@ export default {
return { return {
visible: false, visible: false,
confirmLoading: false, confirmLoading: false,
formInline: {}, formInline: {
batjs:'',
},
rules: { rules: {
// listConfirmation: [ // listConfirmation: [
// { // {
@@ -134,7 +136,13 @@ export default {
}, },
methods: { methods: {
edit(row) { edit(row) {
console.log(row) if(row instanceof Array){
this.ids = row
}else{
this.formInline.bazt = row.bazt
this.formInline.batjs = row.batjs
this.formInline.bz = row.bz
}
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ruleForm.clearValidate() this.$refs.ruleForm.clearValidate()
@@ -145,14 +153,17 @@ export default {
if (valid) { if (valid) {
let query = { let query = {
...this.formInline, ...this.formInline,
id:this.ids.join(',')
} }
this.confirmLoading = true this.confirmLoading = true
postAction('', query).then((res) => { postAction('ota/otaBaSjList/batchRecord', {
recordList :query
}).then((res) => {
if (res.success) { if (res.success) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
this.visible = false this.visible = false
this.confirmLoading = false this.confirmLoading = false
this.$emit('settingListForm') this.$emit('getList')
} else { } else {
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false this.confirmLoading = false
@@ -162,7 +173,10 @@ export default {
}) })
}, },
handleCancel() { handleCancel() {
this.formInline = {} this.formInline = {
batjs:''
}
this.ids = []
this.visible = false this.visible = false
}, },
dateChange(item) { dateChange(item) {
@@ -163,7 +163,7 @@
/> />
</div> </div>
</div> </div>
<maintenance ref="maintenanceRef"/> <maintenance @getList="getList" ref="maintenanceRef"/>
<upgradecompletion ref="upgradecompletionRef"/> <upgradecompletion ref="upgradecompletionRef"/>
</a-card> </a-card>
</template> </template>
@@ -351,14 +351,14 @@ export default {
...queryParam ...queryParam
} }
this.loading = true this.loading = true
getAction('/ota/otaBaSjList/list', query).then((res) => { getAction('/ota/otaBaSjList/page', query).then((res) => {
if (res.success) { if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) { if (res.result.current > 1 && res.result.records.length == 0) {
this.pageNo = 1 this.pageNo = 1
this.getList() this.getList()
return return
} }
this.dataSource = res.result || [] this.dataSource = res.result.records || []
this.total = res.result.total this.total = res.result.total
this.loading = false this.loading = false
} else { } else {
@@ -437,7 +437,7 @@ export default {
if(this.selectedRowKeys.length < 1){ if(this.selectedRowKeys.length < 1){
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
}else{ }else{
this.$refs.maintenanceRef.edit() this.$refs.maintenanceRef.edit(this.selectedRowKeys)
} }
}, },
// 模板下载 // 模板下载
@@ -122,13 +122,26 @@
<div class="title-text-add"> <div class="title-text-add">
<span class="title-text-text" :title="$t('Vehicledynamictype')">{{$t('Vehicledynamictype')}}</span> <span class="title-text-text" :title="$t('Vehicledynamictype')">{{$t('Vehicledynamictype')}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel" style='width: 38%'>
<j-dict-select-tag class="box-input" <j-dict-select-tag class="box-input"
:disabled="disabled" :disabled="disabled"
@change="projectNameChange"
:placeholder="$t('PleaseSelect')" :placeholder="$t('PleaseSelect')"
:type="'select'" :type="'select'"
:triggerChange="false"/> :triggerChange="false"/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item class="itemModel" style='width: 40%;margin-left: 20px'>
<a-select class="box-input" :placeholder="$t('PleaseSelect')"
v-model="formInline.projectNameId">
<a-select-option v-for="(item, key) in projectNameList"
:key="key"
:value="item.id">
<span style="display: inline-block;width: 100%" :title=" item.projectName ">
{{ item.projectName}}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div> </div>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@@ -178,6 +191,8 @@
return { return {
confirmLoading: false, confirmLoading: false,
disabled: false, disabled: false,
formInline:{},
projectNameList:[],
} }
}, },
mounted() { mounted() {
@@ -36,11 +36,10 @@
<a-form-model-item class="itemModel" prop="filingtime"> <a-form-model-item class="itemModel" prop="filingtime">
<a-date-picker class="box-input" <a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('filingtime')" :placeholder="$t('PleaseSelect')+$t('filingtime')"
@change="dateChange({db_field_name:'filingtime'})" @change="dateChange({db_field_name:'batjs'})"
format="YYYY-MM-DD" format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode" :getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.batjs" v-model="formInline.batjs"
:disabled="false"
style="width: 100%"/> style="width: 100%"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -75,7 +74,9 @@ export default {
return { return {
visible: false, visible: false,
confirmLoading: false, confirmLoading: false,
formInline: {}, formInline: {
batjs:'',
},
rules: { rules: {
// listConfirmation: [ // listConfirmation: [
// { // {
@@ -134,8 +135,12 @@ export default {
}, },
methods: { methods: {
edit(row) { edit(row) {
if(row){ if(row instanceof Array){
this.formInline = {...row} this.ids = row
}else{
this.formInline.bazt = row.bazt
this.formInline.batjs = row.batjs
this.formInline.bz = row.bz
} }
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
@@ -147,14 +152,17 @@ export default {
if (valid) { if (valid) {
let query = { let query = {
...this.formInline, ...this.formInline,
id:this.ids.join(',')
} }
this.confirmLoading = true this.confirmLoading = true
postAction('', query).then((res) => { postAction('ota/otaBaCxList/batchRecord', {
recordList: query
}).then((res) => {
if (res.success) { if (res.success) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
this.visible = false this.visible = false
this.confirmLoading = false this.confirmLoading = false
this.$emit('settingListForm') this.$emit('getList')
} else { } else {
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false this.confirmLoading = false
@@ -164,7 +172,10 @@ export default {
}) })
}, },
handleCancel() { handleCancel() {
this.formInline = {} this.formInline = {
batjs:''
}
this.ids = []
this.visible = false this.visible = false
}, },
dateChange(item) { dateChange(item) {
@@ -161,7 +161,7 @@
/> />
</div> </div>
</div> </div>
<maintenance ref="maintenanceRef"/> <maintenance @getList="getList" ref="maintenanceRef"/>
</a-card> </a-card>
</template> </template>
@@ -346,14 +346,14 @@ export default {
...queryParam ...queryParam
} }
this.loading = true this.loading = true
getAction('/ota/otaBaCxList/list', query).then((res) => { getAction('/ota/otaBaCxList/page', query).then((res) => {
if (res.success) { if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) { if (res.result.current > 1 && res.result.records.length == 0) {
this.pageNo = 1 this.pageNo = 1
this.getList() this.getList()
return return
} }
this.dataSource = res.result || [] this.dataSource = res.result.records || []
this.total = res.result.total this.total = res.result.total
this.loading = false this.loading = false
} else { } else {
@@ -432,7 +432,7 @@ export default {
if(this.selectedRowKeys.length < 1){ if(this.selectedRowKeys.length < 1){
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
}else{ }else{
this.$refs.maintenanceRef.edit() this.$refs.maintenanceRef.edit(this.selectedRowKeys)
} }
}, },
// 模板下载 // 模板下载
@@ -143,6 +143,7 @@
<projectStatus @TaskListChange="TaskListChange" <projectStatus @TaskListChange="TaskListChange"
v-else-if="textTitle === $t('projectStatus')"/> v-else-if="textTitle === $t('projectStatus')"/>
<certificationList ref="certificationListRef" <certificationList ref="certificationListRef"
:isDisplayNum="isDisplayNum"
@getRoleSwitch="getRoleSwitch" @getRoleSwitch="getRoleSwitch"
v-else-if="textTitle === $t('certificationList')"/> v-else-if="textTitle === $t('certificationList')"/>
</div> </div>
@@ -206,7 +207,7 @@
'12': '系统管理员', '12': '系统管理员',
'13': 'Viewer', '13': 'Viewer',
'14': '品牌管理员', '14': '品牌管理员',
'20': '接口人', '20': '工程接口人',
'21': '责任人', '21': '责任人',
'30': '工程接口人', '30': '工程接口人',
'31': '责任人', '31': '责任人',
@@ -11,7 +11,8 @@
style="height: 100%;overflow: auto;padding-bottom: 53px;"> style="height: 100%;overflow: auto;padding-bottom: 53px;">
<div style="margin-bottom: 60px"> <div style="margin-bottom: 60px">
<div class="table-operator"> <div class="table-operator">
<div class="operator-text" v-if="isDisplayNum == 2" @click="addData"> <div class="operator-text" v-if="isDisplayNum == 2 && roleSwitchingCode == 2"
@click="addData">
<a-icon type="plus"/> <a-icon type="plus"/>
{{$t('add')}} {{$t('add')}}
</div> </div>
@@ -76,7 +77,7 @@
certificationDirectoryAdd, certificationDirectoryAdd,
viewFileModel viewFileModel
}, },
props: ['isDisplayNum'], props: ['isDisplayNum','roleSwitchingCode'],
mixins:[ResizeHeader, ResizeColumnProvide], mixins:[ResizeHeader, ResizeColumnProvide],
data() { data() {
return { return {
@@ -158,7 +159,8 @@
computed: { computed: {
columns() { columns() {
let columnResult = JSON.parse(JSON.stringify(this.columnsAll)) let columnResult = JSON.parse(JSON.stringify(this.columnsAll))
if (this.isDisplayNum != 2) { if (this.roleSwitchingCode == 2 && this.isDisplayNum == 2){
}else{
for (var i = 0; i < columnResult.length; i++) { for (var i = 0; i < columnResult.length; i++) {
if (columnResult[i].title === this.$t('operation')) { if (columnResult[i].title === this.$t('operation')) {
columnResult.splice(i, 1) columnResult.splice(i, 1)
@@ -15,10 +15,10 @@
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :md="12" :sm="8"> <a-col :md="12" :sm="8">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text" :title="$t('VirtualListName')"> <div class="title-text" :title="$t('CertificationListName')">
<span>{{$t('VirtualListName')}}</span> <span>{{$t('CertificationListName')}}</span>
</div> </div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('VirtualListName')" <j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('CertificationListName')"
v-model="queryParam.name"></j-input> v-model="queryParam.name"></j-input>
</div> </div>
</a-col> </a-col>
@@ -87,7 +87,7 @@
selectedRowKeys: [], selectedRowKeys: [],
columns: [ columns: [
{ {
title: this.$t('VirtualListName'), title: this.$t('CertificationListName'),
dataIndex: 'name', dataIndex: 'name',
align: 'left', align: 'left',
ellipsis: true, ellipsis: true,
@@ -155,11 +155,17 @@
let query = { let query = {
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
...this.queryParam ...this.queryParam,
state:'1',
} }
this.loading = true this.loading = true
getAction('/authDummy/authDummyInventoryBaseEO/page', query).then((res) => { getAction('/authDummy/authDummyInventoryBaseEO/page', query).then((res) => {
if (res.success) { if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.pageNo = 1
this.replacePage()
return
}
this.dataList = res.result.records || [] this.dataList = res.result.records || []
this.total = res.result.total this.total = res.result.total
this.loading = false this.loading = false
@@ -32,9 +32,9 @@
</a-col> </a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons"> <span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="12" :sm="24"> <a-col :md="12" :sm="24">
<globalAdvancedQuery ref="globalAdvancedQueryRef" <!-- <globalAdvancedQuery ref="globalAdvancedQueryRef"-->
@handleSuperQuery="handleSuperQuery" <!-- @handleSuperQuery="handleSuperQuery"-->
:fieldList="fieldList"/> <!-- :fieldList="fieldList"/>-->
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button> <a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button> <a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
</a-col> </a-col>
@@ -180,8 +180,8 @@ export default {
this.pageNo = 1 this.pageNo = 1
this.queryParam = {} this.queryParam = {}
this.replacePage() this.replacePage()
this.$refs.globalAdvancedQueryRef.resetLine() // this.$refs.globalAdvancedQueryRef.resetLine()
this.$refs.globalAdvancedQueryRef.emitCallback() // this.$refs.globalAdvancedQueryRef.emitCallback()
}, },
onChange(page, pageSize) { onChange(page, pageSize) {
this.pageNo = page this.pageNo = page
@@ -192,19 +192,19 @@ export default {
this.pageSize = pageSize this.pageSize = pageSize
this.replacePage() this.replacePage()
}, },
handleSuperQuery(params, matchType) { // handleSuperQuery(params, matchType) {
let sqp = {} // let sqp = {}
if (!params || (params && params.length == 0)) { // if (!params || (params && params.length == 0)) {
sqp['superQueryParams'] = '' // sqp['superQueryParams'] = ''
this.$refs.globalAdvancedQueryRef.superQueryFlag = false // this.$refs.globalAdvancedQueryRef.superQueryFlag = false
} else { // } else {
this.$refs.globalAdvancedQueryRef.superQueryFlag = true // this.$refs.globalAdvancedQueryRef.superQueryFlag = true
sqp['superQueryParams'] = encodeURI(JSON.stringify(params)) // sqp['superQueryParams'] = encodeURI(JSON.stringify(params))
sqp['superQueryMatchType'] = matchType // sqp['superQueryMatchType'] = matchType
} // }
this.queryParamQuery = sqp // this.queryParamQuery = sqp
this.replacePage() // this.replacePage()
}, // },
replacePage() { replacePage() {
let query = { let query = {
// pageNo: this.pageNo, // pageNo: this.pageNo,
@@ -96,7 +96,8 @@
</div> </div>
<!-- 认证目录--> <!-- 认证目录-->
<div @click="certificationClick" v-if="roleSwitchingCode == 0 || roleSwitchingCode == 2" class="operator-text"> <div @click="certificationClick" v-if="roleSwitchingCode == 0 || roleSwitchingCode == 1 ||
roleSwitchingCode == 2" class="operator-text">
<a-icon type="profile"/> <a-icon type="profile"/>
{{ $t('CertificationDirectory') }} {{ $t('CertificationDirectory') }}
</div> </div>
@@ -377,7 +378,8 @@
</div> </div>
</div> </div>
<transferList :url="url" @transferListForm="transferListForm" ref="transferListRef"/> <transferList :url="url" @transferListForm="transferListForm" ref="transferListRef"/>
<certificationDirectory :isDisplayNum="isDisplayNum" :url="url" ref="certificationDirectoryRef"/> <certificationDirectory :isDisplayNum="isDisplayNum" :roleSwitchingCode="roleSwitchingCode"
:url="url" ref="certificationDirectoryRef"/>
<batSetting :url="url" ref="batSettingRef" :roleSwitchingCode="roleSwitchingCode" @batSettingForm="batSettingForm"/> <batSetting :url="url" ref="batSettingRef" :roleSwitchingCode="roleSwitchingCode" @batSettingForm="batSettingForm"/>
<addModel ref="addModelRef" @addModelForm="addModelForm"/> <addModel ref="addModelRef" @addModelForm="addModelForm"/>
<modifyHistory ref="modifyHistoryRef"/> <modifyHistory ref="modifyHistoryRef"/>
@@ -477,6 +479,7 @@
export default { export default {
name: 'index', name: 'index',
props:['isDisplayNum'],
components: { components: {
globalAdvancedQuery, globalAdvancedQuery,
ImportFile, ImportFile,
@@ -601,14 +604,16 @@
align: 'left', align: 'left',
dataIndex: 'category', dataIndex: 'category',
width: 180, width: 180,
ellipsis: true ellipsis: true,
fixed: 'left',
}, },
{ {
title: this.$t('inspectionItems'), title: this.$t('inspectionItems'),
align: 'left', align: 'left',
dataIndex: 'inspectionItem', dataIndex: 'inspectionItem',
width: 180, width: 180,
ellipsis: true ellipsis: true,
fixed: 'left',
}, },
{ {
title: this.$t('configurationItem'), title: this.$t('configurationItem'),
@@ -723,7 +728,6 @@
], ],
selectedRowKeys: [], selectedRowKeys: [],
selectedRowKeysList: [], selectedRowKeysList: [],
isDisplayNum: 2,
long: '', long: '',
toDoIds: [], toDoIds: [],
toDoNotConditions: [], toDoNotConditions: [],
@@ -487,7 +487,7 @@
<a-select allowClear <a-select allowClear
:placeholder="$t('pleaseSelect')+$t('expeditionProcess')" :placeholder="$t('pleaseSelect')+$t('expeditionProcess')"
mode="multiple" mode="multiple"
v-model="formInlineQuestion.questionStatus"> v-model="formInlineQuestion.expeditingType">
<a-select-option :value="item.value" v-for="item in questionList"> <a-select-option :value="item.value" v-for="item in questionList">
<span class="itemOption-index" :title="item.name"> <span class="itemOption-index" :title="item.name">
{{ item.name }} {{ item.name }}
@@ -559,7 +559,7 @@
roleSwitchingList: [], roleSwitchingList: [],
formInlineQuestion: {}, formInlineQuestion: {},
rulesRoleQuestion: { rulesRoleQuestion: {
questionStatus: [ expeditingType: [
{ {
required: true, required: true,
message: this.$t('expeditionProcess') + this.$t('cannotEmpty'), message: this.$t('expeditionProcess') + this.$t('cannotEmpty'),
@@ -569,11 +569,11 @@
}, },
questionList: [ questionList: [
{ {
value: '1', value: 'lawsInventoryDesignExpediting',
name: this.$t('designComplianceProcess') name: this.$t('designComplianceProcess')
}, },
{ {
value: '2', value: 'lawsInventoryVerifyExpediting',
name: this.$t('validationComplianceProcess') name: this.$t('validationComplianceProcess')
} }
], ],
@@ -1524,13 +1524,22 @@
handleOkQuestion() { handleOkQuestion() {
this.$refs.ruleFormQuestion.validate(valid => { this.$refs.ruleFormQuestion.validate(valid => {
let formInlineQuestion = JSON.parse(JSON.stringify(this.formInlineQuestion)) let formInlineQuestion = JSON.parse(JSON.stringify(this.formInlineQuestion))
if (formInlineQuestion.questionStatus && formInlineQuestion.questionStatus.length > 0) { if (formInlineQuestion.expeditingType && formInlineQuestion.expeditingType.length > 0) {
formInlineQuestion.questionStatus = formInlineQuestion.questionStatus.join(',') formInlineQuestion.expeditingType = formInlineQuestion.expeditingType.join(',')
}
let operateType = ''
if (this.roleSwitchingCode == '0') {
operateType = 'lawsInventoryStudioExpediting'
} else if (this.roleSwitchingCode == '1') {
operateType = 'lawsInventoryRegulationOwnerExpediting'
} else if (this.roleSwitchingCode == '30') {
operateType = 'lawsInventoryEngineeringInterfacePersonExpediting'
} }
let query = { let query = {
ids: this.questionIdList.join(','), ids: this.questionIdList.join(','),
projectLibraryId: this.$route.query.id, projectLibraryId: this.$route.query.id,
questionStatus: formInlineQuestion.questionStatus expeditingType: formInlineQuestion.expeditingType,
operateType: operateType
} }
this.confirmLoadingQuestion = true this.confirmLoadingQuestion = true
postAction('project/projectLawsInventoryEO/expediting', query).then((res) => { postAction('project/projectLawsInventoryEO/expediting', query).then((res) => {
@@ -47,12 +47,20 @@
:triggerChange="false" :dictCode="'state'"/> :triggerChange="false" :dictCode="'state'"/>
</div> </div>
</a-col> </a-col>
<a-col :md="12" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('zoneOfApplication')">
<span>{{$t('zoneOfApplication')}}</span>
</div>
<j-multi-select-tag class="box-input" v-model="queryParam.region"
:placeholder="$t('PleaseSelect')+$t('zoneOfApplication')" :type="'select'"
:triggerChange="false" :dictCode="'region'"/>
</div>
</a-col>
</template> </template>
<span style="float: right;overflow: hidden;" class="table-page-search-submitButtons"> <span style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="12" :sm="24"> <a-col :md="12" :sm="24">
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button> <a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button> <a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px"> <a @click="handleToggleSearch" style="margin-left: 8px">
@@ -103,14 +111,10 @@
<script> <script>
import { getAction, postAction } from '@/api/manage' import { getAction, postAction } from '@/api/manage'
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header' import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
export default { export default {
name: 'codeNumber', name: 'codeNumber',
components: {
globalAdvancedQuery
},
mixins: [ResizeHeader, ResizeColumnProvide], mixins: [ResizeHeader, ResizeColumnProvide],
data() { data() {
return { return {
@@ -184,7 +188,6 @@ export default {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
fieldList: [],
queryParamQuery: {}, queryParamQuery: {},
queryConditionVOList: [] queryConditionVOList: []
} }
@@ -202,7 +205,6 @@ export default {
this.selectedRowKeys = [] this.selectedRowKeys = []
this.queryConditionVOList = [] this.queryConditionVOList = []
this.replacePage() this.replacePage()
this.queryConditionInventory()
}, },
// number() { // number() {
// this.regulation = '' // this.regulation = ''
@@ -214,9 +216,6 @@ export default {
searchReset() { searchReset() {
this.pageNo = 1 this.pageNo = 1
this.queryParam = {} this.queryParam = {}
this.queryConditionVOList = []
this.$refs.globalAdvancedQueryRef.resetLine()
this.$refs.globalAdvancedQueryRef.emitCallback()
this.replacePage() this.replacePage()
}, },
onChange(page, pageSize) { onChange(page, pageSize) {
@@ -228,18 +227,6 @@ export default {
this.pageSize = pageSize this.pageSize = pageSize
this.replacePage() this.replacePage()
}, },
queryConditionInventory() {
let query = {
flag: 1
}
getAction(this.url.queryConditionInventory, query).then((res) => {
if (res.success) {
this.fieldList = res.result || []
} else {
this.fieldList = []
}
})
},
replacePage() { replacePage() {
let queryConditionVOList = JSON.parse(JSON.stringify(this.queryConditionVOList)) let queryConditionVOList = JSON.parse(JSON.stringify(this.queryConditionVOList))
let query = { let query = {
@@ -268,20 +255,6 @@ export default {
handleCancel() { handleCancel() {
this.visible = false this.visible = false
}, },
handleSuperQuery(params, matchType) {
let sqp = {}
if (!params || (params && params.length == 0)) {
this.queryConditionVOList = []
this.$refs.globalAdvancedQueryRef.superQueryFlag = false
} else {
this.$refs.globalAdvancedQueryRef.superQueryFlag = true
this.queryConditionVOList = params
this.queryConditionVOList.forEach(res => {
res.type = matchType
})
}
this.replacePage()
},
handleSubmit() { handleSubmit() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.confirmLoading = true this.confirmLoading = true
@@ -56,7 +56,7 @@
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button> <a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit(undefined)" type="primary" :loading="confirmLoading">{{$t('determine')}}</a-button> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('determine')}}</a-button>
</div> </div>
</a-drawer> </a-drawer>
</template> </template>
@@ -144,6 +144,9 @@ export default {
// this.loading = false // this.loading = false
// } // }
// }) // })
},
handleSubmit(){
}, },
onSelectChange(value) { onSelectChange(value) {
this.selectedRowKeys = value this.selectedRowKeys = value
@@ -48,7 +48,7 @@
:components="drag(columns,'columns')" :components="drag(columns,'columns')"
:loading="loading" :loading="loading"
:pagination="false" :pagination="false"
:scroll="{x: '100%'}" :scroll="{x: '100%',y:'calc(100vh - 300px)'}"
rowKey="id" rowKey="id"
:data-source="dataSource" :data-source="dataSource"
:columns="columns" :columns="columns"
@@ -67,7 +67,7 @@
<a class="text-operation" <a class="text-operation"
v-has="'dummyInventoryBase:issue'" v-has="'dummyInventoryBase:issue'"
@click="withdraw(record)"> @click="withdraw(record)">
{{record.state == 2 ? $t('release') : $t('withdraw')}} {{!record.state || record.state == 2 ? $t('release') : $t('withdraw')}}
</a> </a>
<!-- v-if="record.createBy == userData.username || administrators"--> <!-- v-if="record.createBy == userData.username || administrators"-->
<a class="text-operation" :disabled="record.state == 1?true:false" <a class="text-operation" :disabled="record.state == 1?true:false"
@@ -309,7 +309,7 @@ export default {
withdraw(val) { withdraw(val) {
let item = {} let item = {}
let content = '' let content = ''
if (val.state == 2) { if (!val.state || val.state == 2) {
content = this.$t('confirmRelease') content = this.$t('confirmRelease')
item.state = 1 item.state = 1
} else { } else {
@@ -66,13 +66,29 @@
v-model="queryParam.serialNumber"></j-input> v-model="queryParam.serialNumber"></j-input>
</div> </div>
</a-col> </a-col>
<template v-if="toggleSearchStatus">
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('areaOfResponsibility')">
<span>{{$t('areaOfResponsibility')}}</span>
</div>
<j-dict-select-tag class="box-input"
v-model="queryParam.dutyTerritory"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</div>
</a-col>
</template>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons"> <span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24"> <a-col :md="6" :sm="24">
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button> <a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button> <a-button class="box-button" style="margin-left: 8px"
@click="searchReset">{{$t('reset')}}</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</a-col> </a-col>
</span> </span>
</a-row> </a-row>
@@ -107,13 +123,13 @@
</div> </div>
<!-- 调取--> <!-- 调取-->
<!-- v-if="isTrue"--> <!-- v-if="isTrue"-->
<!-- <div v-if="isTrue"--> <div v-if="isTrue"
<!-- @click="transferClick"--> @click="transferClick"
<!-- v-has="'dummyInventoryInfo:copyInfoByIds'"--> v-has="'dummyInventoryInfo:copyInfoByIds'"
<!-- class="operator-text" >--> class="operator-text">
<!-- <a-icon type="profile"/>--> <a-icon type="profile"/>
<!-- {{$t('Transfer')}}--> {{$t('Transfer')}}
<!-- </div>--> </div>
<!-- 添加--> <!-- 添加-->
<!-- v-if="isTrue"--> <!-- v-if="isTrue"-->
<div v-if="isTrue" <div v-if="isTrue"
@@ -254,10 +270,10 @@ export default {
isTrue: false, isTrue: false,
isFalse: false, isFalse: false,
isbutton: false, isbutton: false,
queryParamQuery: {}, toggleSearchStatus:false,
dataSource: [], dataSource: [],
url: { url: {
list: '/authDummy/authDummyInventoryInfoEO/page', list: '/authDummy/authDummyInventoryInfoEO/list',
logList: '/authDummy/authDummyLog/page',//更新log logList: '/authDummy/authDummyLog/page',//更新log
exportTemplate: '/authDummy/authDummyInventoryInfoEO/exportTemplate',//模板下载 exportTemplate: '/authDummy/authDummyInventoryInfoEO/exportTemplate',//模板下载
exportData: '/authDummy/authDummyInventoryInfoEO/exportData',//导出 exportData: '/authDummy/authDummyInventoryInfoEO/exportData',//导出
@@ -267,7 +283,7 @@ export default {
editModel: '/authDummy/authDummyInventoryInfoEO/edit',//编辑 editModel: '/authDummy/authDummyInventoryInfoEO/edit',//编辑
setBatch: '/authDummy/authDummyInventoryInfoEO/setBatch',//批量设置 setBatch: '/authDummy/authDummyInventoryInfoEO/setBatch',//批量设置
importZipUrl: '/authDummy/authDummyInventoryInfoEO/importData',//导入 importZipUrl: '/authDummy/authDummyInventoryInfoEO/importData',//导入
number: '/project/projectLawsInventoryEO/list', number: '/project/projectLawsInventoryEO/list'
}, },
queryParam: {}, queryParam: {},
orderByField: '', orderByField: '',
@@ -277,7 +293,8 @@ export default {
align: 'left', align: 'left',
dataIndex: 'category', dataIndex: 'category',
width: 150, width: 150,
ellipsis: true, fixed: 'left',
ellipsis: true
}, },
{ {
title: this.$t('inspectionItems'), title: this.$t('inspectionItems'),
@@ -285,6 +302,7 @@ export default {
dataIndex: 'inspectionItem', dataIndex: 'inspectionItem',
width: 150, width: 150,
ellipsis: true, ellipsis: true,
fixed: 'left',
scopedSlots: { customRender: 'inspectionItems' } scopedSlots: { customRender: 'inspectionItems' }
}, },
{ {
@@ -292,35 +310,35 @@ export default {
align: 'left', align: 'left',
dataIndex: 'configItem', dataIndex: 'configItem',
width: 150, width: 150,
ellipsis: true, ellipsis: true
}, },
{ {
title: 'WVTA ID', title: 'WVTA ID',
align: 'left', align: 'left',
dataIndex: 'wvtaId', dataIndex: 'wvtaId',
width: 150, width: 150,
ellipsis: true, ellipsis: true
}, },
{ {
title: this.$t('standard'), title: this.$t('standard'),
align: 'left', align: 'left',
dataIndex: 'serialNumber', dataIndex: 'serialNumber',
width: 150, width: 150,
ellipsis: true, ellipsis: true
}, },
{ {
title: this.$t('areaOfResponsibility'), title: this.$t('areaOfResponsibility'),
align: 'left', align: 'left',
dataIndex: 'dutyTerritoryName', dataIndex: 'dutyTerritoryName',
width: 200, width: 200,
ellipsis: true, ellipsis: true
}, },
{ {
title: this.$t('typeOfDeliverables'), title: this.$t('typeOfDeliverables'),
align: 'left', align: 'left',
dataIndex: 'deliverableTypeName', dataIndex: 'deliverableTypeName',
width: 200, width: 200,
ellipsis: true, ellipsis: true
}, },
{ {
title: this.$t('operation'), title: this.$t('operation'),
@@ -331,71 +349,7 @@ export default {
} }
], ],
selectedRowKeys: [], selectedRowKeys: [],
loading: false, loading: false
fieldList: [
{
type: '',
value: 'shi4Yong4Fan4Wei2',
text: this.$t('scopeOfApplication'),
dictCode: 'apply_scope'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: '',
value: 'state',
text: this.$t('status'),
dictCode: 'state'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: 'string',
value: 'correspondingStandard',
text: this.$t('correspondingStandard')
},
{
type: '',
value: 'region',
text: this.$t('zoneOfApplication'),
dictCode: 'region'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: '',
value: 'implementType',
text: this.$t('implementationCategory'),
dictCode: 'implement_type'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: 'date',
value: 'xin1Che1Xing2Shi2Shi1Ri4Qi1',
text: this.$t('ImplementationDate')
},
{
type: 'date',
value: 'implementTime',
text: this.$t('vehicleInProductionDate')
},
{
type: 'string',
value: 'wvtaId',
text: 'WVTA ID'
},
{
type: '',
value: 'attestationType',
text: this.$t('certificationType'),
dictCode: 'attestation_type'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: '',
value: 'attestationRank',
text: this.$t('certificationLevel'),
dictCode: 'attestation_rank'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: '',
value: 'dutyTerritory',
text: this.$t('areaOfResponsibility'),
dictCode: 'duty_territory'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
}
]
} }
}, },
created() { created() {
@@ -412,26 +366,15 @@ export default {
this.isFalse = this.$route.query.title == '虚拟认证清单详情' ? true : false this.isFalse = this.$route.query.title == '虚拟认证清单详情' ? true : false
this.getList() this.getList()
}, },
computed: { computed: {},
},
methods: { methods: {
...mapGetters(['userInfo']), ...mapGetters(['userInfo']),
handleSuperQuery(params, matchType) {
let sqp = {}
if (!params || (params && params.length == 0)) {
sqp['superQueryParams'] = ''
this.$refs.globalAdvancedQueryRef.superQueryFlag = false
} else {
this.$refs.globalAdvancedQueryRef.superQueryFlag = true
sqp['superQueryParams'] = encodeURI(JSON.stringify(params))
sqp['superQueryMatchType'] = matchType
}
this.queryParamQuery = sqp
this.getList()
},
onSelectChange(value) { onSelectChange(value) {
this.selectedRowKeys = value this.selectedRowKeys = value
}, },
handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus
},
UpdateLogClick() { UpdateLogClick() {
this.$refs.UpdateLogRef.getList({ dummyInventoryBaseId: this.$route.query.id }) this.$refs.UpdateLogRef.getList({ dummyInventoryBaseId: this.$route.query.id })
}, },
@@ -441,8 +384,6 @@ export default {
}, },
//清空 //清空
searchReset() { searchReset() {
this.$refs.globalAdvancedQueryRef.resetLine()
this.$refs.globalAdvancedQueryRef.emitCallback()
this.queryParam = {} this.queryParam = {}
this.getList() this.getList()
}, },
@@ -451,9 +392,9 @@ export default {
downloadFile(this.url.exportTemplate, this.$t('VirtualAuthenticationList') + this.$t('importTemplate') + '.xls', {}) downloadFile(this.url.exportTemplate, this.$t('VirtualAuthenticationList') + this.$t('importTemplate') + '.xls', {})
}, },
//调取 //调取
// transferClick() { transferClick() {
// this.$refs.transferListRef.transferModel() this.$refs.transferListRef.transferModel()
// }, },
//添加 //添加
handleAdd() { handleAdd() {
this.$refs.addModelRef.addModel() this.$refs.addModelRef.addModel()
@@ -463,7 +404,6 @@ export default {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let query = { let query = {
...this.queryParam, ...this.queryParam,
...this.queryParamQuery,
ids: selectedRowKeys.join(','), ids: selectedRowKeys.join(','),
authDummyInventoryBaseId: this.$route.query.id authDummyInventoryBaseId: this.$route.query.id
} }
@@ -557,7 +497,6 @@ export default {
getList() { getList() {
let query = { let query = {
...this.queryParam, ...this.queryParam,
...this.queryParamQuery,
orderBy: this.orderBy, orderBy: this.orderBy,
orderByField: this.orderByField, orderByField: this.orderByField,
authDummyInventoryBaseId: this.$route.query.id authDummyInventoryBaseId: this.$route.query.id
@@ -565,7 +504,7 @@ export default {
this.loading = true this.loading = true
getAction(this.url.list, query).then((res) => { getAction(this.url.list, query).then((res) => {
if (res.success) { if (res.success) {
this.dataSource = res.result.records || [] this.dataSource = res.result || []
this.loading = false this.loading = false
} else { } else {
this.loading = false this.loading = false
@@ -590,7 +529,7 @@ export default {
}) })
} }
}) })
}, }
} }
} }
@@ -632,6 +571,7 @@ export default {
display: flex; display: flex;
} }
} }
.Virtual-detail-content { .Virtual-detail-content {
padding: 0 32px 0 32px; padding: 0 32px 0 32px;
box-sizing: border-box; box-sizing: border-box;