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

This commit is contained in:
zyx.net
2023-03-23 09:59:00 +08:00
17 changed files with 812 additions and 249 deletions
@@ -18,7 +18,7 @@ public enum TemplateInfoEnum2 {
CERTIFICATION_MESSAGE10("认证工程师发起流程,责任人收到消息","ctp_AAuePL6rUK1L"),
CERTIFICATION_MESSAGE11("责任人拒绝,认证工程师收到消息","ctp_AAu2ZrSEiB1V"),
CERTIFICATION_MESSAGE12("责任人接受,认证工程师收到消息","ctp_AAuePL6r3B0I"),
CERTIFICATION_MESSAGE13("studio修改认证工程师,被修改人收到消息",""),
CERTIFICATION_MESSAGE13("studio修改认证工程师,被修改人收到消息","ctp_AAuLRr2QhG9J"),
CERTIFICATION_MESSAGE14("studio修改符合性截止时间,认证工程师收到消息","ctp_AAuePL6r3XqN"),
CERTIFICATION_MESSAGE15("认证工程师修改责任人,被修改人收到消息","ctp_AAu2ZrSE1z3f"),
CERTIFICATION_MESSAGE16("认证工程师催办,责任人收到消息","ctp_AAuPfn0M0H6i"),
@@ -41,6 +41,32 @@ public enum TemplateInfoEnum2 {
REGULATION_LIST_RELEASE2("法规清单发布-公用消息-绿色","ctp_AAuPKJ9Cj9w5"),
REGULATION_LIST_RELEASE3("法规清单发布-公用消息-红色","ctp_AAu2lBIgaB79"),
REGULATION_LIST_RELEASE4("法规清单发布-公用消息-黄色","ctp_AAuPh3LJWg1x"),
/**
* 法规任务确认消息
*/
REGULATION_TASK_CONFIRMATION1("法规任务确认-公用消息-绿色-无流程类型","ctp_AAuLRr2QIbMb"),
REGULATION_TASK_CONFIRMATION2("法规任务确认-公用消息-红色-无流程类型","ctp_AAuL6mDxffmu"),
REGULATION_TASK_CONFIRMATION3("法规任务确认-公用消息-黄色-无流程类型","ctp_AAuLRr2Qzyj0"),
REGULATION_TASK_CONFIRMATION4("法规任务确认-公用消息-绿色-有流程类型","ctp_AAuL6mDxf8l1"),
REGULATION_TASK_CONFIRMATION5("法规任务确认-公用消息-红色-有流程类型","ctp_AAuPWTSU2Fg2"),
REGULATION_TASK_CONFIRMATION6("法规任务确认-公用消息-黄色-有流程类型","ctp_AAuLRr2Qzkbo"),
/**
* 设计符合性流程
*/
DESIGN_COMPLIANCE_CONFIRMATION1("设计符合性流程-公用消息-绿色","ctp_AAuPIdaoms57"),
DESIGN_COMPLIANCE_CONFIRMATION2("设计符合性流程-公用消息-红色","ctp_AAuLRr2QX8xb"),
DESIGN_COMPLIANCE_CONFIRMATION3("设计符合性流程-公用消息-黄色","ctp_AAuLdvF0lUtu"),
/**
* 验证符合性流程
*/
VALIDATION_COMPLIANCE_CONFIRMATION1("验证符合性流程-公用消息-绿色","ctp_AAuLdvF0lS41"),
VALIDATION_COMPLIANCE_CONFIRMATION2("验证符合性流程-公用消息-红色","ctp_AAu2lBI6MV0i"),
VALIDATION_COMPLIANCE_CONFIRMATION3("验证符合性流程-公用消息-黄色","ctp_AAupcD3RBbUV"),
;
String name;
@@ -1,28 +1,29 @@
package com.jero.modules.ota.controller;
import java.util.Arrays;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.jero.common.api.vo.Result;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.ota.entity.OtaBaCxList;
import com.jero.modules.ota.service.IOtaBaCxListService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.ota.entity.OtaBaCxList;
import com.jero.modules.ota.service.IOtaBaCxListService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.jero.common.aspect.annotation.AutoLog;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
/**
/**
* @Description: 车型及功能备案列表
* @Author: jero-boot
* @Date: 2023-03-17
@@ -167,4 +168,17 @@ public class OtaBaCxListController extends JeroController<OtaBaCxList, IOtaBaCxL
return super.importExcel(request, response, OtaBaCxList.class);
}
}
/**
* 备案维护
*
*/
@AutoLog(value = "车型及功能备案列表-备案维护")
@ApiOperation(value="车型及功能备案列表-备案维护", notes="车型及功能备案列表-备案维护")
@PutMapping(value = "/batchRecord")
public Result<?> batchRecord(@RequestBody List<OtaBaCxList> recordList) {
otaBaCxListService.batchRecord(recordList);
return Result.OK("备案维护成功!");
}
}
@@ -1,28 +1,29 @@
package com.jero.modules.ota.controller;
import java.util.Arrays;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.jero.common.api.vo.Result;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.ota.entity.OtaBaSjList;
import com.jero.modules.ota.service.IOtaBaSjListService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.ota.entity.OtaBaSjList;
import com.jero.modules.ota.service.IOtaBaSjListService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.jero.common.aspect.annotation.AutoLog;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
/**
/**
* @Description: 升级备案-升级活动备案列表
* @Author: jero-boot
* @Date: 2023-03-17
@@ -167,4 +168,16 @@ public class OtaBaSjListController extends JeroController<OtaBaSjList, IOtaBaSjL
return super.importExcel(request, response, OtaBaSjList.class);
}
/**
* 备案维护
*
*/
@AutoLog(value = "升级备案-备案维护")
@ApiOperation(value="升级备案-备案维护", notes="升级备案-备案维护")
@PutMapping(value = "/batchRecord")
public Result<?> batchRecord(@RequestBody List<OtaBaSjList> recordList) {
otaBaSjListService.batchRecord(recordList);
return Result.OK("备案维护成功!");
}
}
@@ -1,7 +1,8 @@
package com.jero.modules.ota.service;
import com.jero.modules.ota.entity.OtaBaCxList;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.modules.ota.entity.OtaBaCxList;
import java.util.List;
/**
@@ -58,4 +59,10 @@ public interface IOtaBaCxListService extends IService<OtaBaCxList> {
* @return
*/
List<OtaBaCxList> queryList();
/**
* 备案维护
*
*/
void batchRecord(List<OtaBaCxList> recordList);
}
@@ -1,7 +1,8 @@
package com.jero.modules.ota.service;
import com.jero.modules.ota.entity.OtaBaSjList;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.modules.ota.entity.OtaBaSjList;
import java.util.List;
/**
@@ -58,4 +59,10 @@ public interface IOtaBaSjListService extends IService<OtaBaSjList> {
* @return
*/
List<OtaBaSjList> queryList();
/**
* 备案维护
*
*/
void batchRecord(List<OtaBaSjList> recordList);
}
@@ -1,29 +1,40 @@
package com.jero.modules.ota.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.common.exception.JeroBootException;
import com.jero.modules.ota.entity.OtaBaCxList;
import com.jero.modules.ota.entity.OtaBaCxLsjl;
import com.jero.modules.ota.mapper.OtaBaCxListMapper;
import com.jero.modules.ota.service.IOtaBaCxListService;
import com.jero.modules.ota.service.IOtaBaCxLsjlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
/**
* @Description: 车型及功能备案列表
* @Author: jero-boot
* @Date: 2023-03-17
* @Date: 2023-03-17
* @Version: V1.0
*/
@Service
public class OtaBaCxListServiceImpl extends ServiceImpl<OtaBaCxListMapper, OtaBaCxList> implements IOtaBaCxListService {
/**
* 保存
*
* @param otaBaCxList
* @return
*/
@Override
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@Autowired
private IOtaBaCxLsjlService otaBaCxLsjlService;
/**
* 保存
*
* @param otaBaCxList
* @return
*/
@Override
public void add(OtaBaCxList otaBaCxList) {
Date now = new Date();
otaBaCxList.setCreateTime(now);
@@ -31,59 +42,85 @@ public class OtaBaCxListServiceImpl extends ServiceImpl<OtaBaCxListMapper, OtaBa
save(otaBaCxList);
}
/**
* 更新
*
* @param otaBaCxList
* @return
*/
@Override
/**
* 更新
*
* @param otaBaCxList
* @return
*/
@Override
public void editById(OtaBaCxList otaBaCxList) {
Date now = new Date();
Date now = new Date();
otaBaCxList.setUpdateTime(now);
saveOrUpdate(otaBaCxList);
saveOrUpdate(otaBaCxList);
}
/**
* 通过id删除
*
* @param id
* @return
*/
@Override
/**
* 通过id删除
*
* @param id
* @return
*/
@Override
public void deleteById(String id) {
removeById(id);
}
/**
* 批量删除
*
* @param ids
* @return
*/
@Override
/**
* 批量删除
*
* @param ids
* @return
*/
@Override
public void deleteByIds(List<String> ids) {
removeByIds(ids);
}
/**
* 通过id查询
*
* @param id
* @return
*/
@Override
/**
* 通过id查询
*
* @param id
* @return
*/
@Override
public OtaBaCxList queryById(String id) {
return getById(id);
}
/**
* 列表查询
*
* @return
*/
@Override
* 列表查询
*
* @return
*/
@Override
public List<OtaBaCxList> queryList() {
return list();
}
/**
* 备案维护
*/
@Override
public void batchRecord(List<OtaBaCxList> recordList) {
try {
if (null != recordList && recordList.size() > 0) {
for (OtaBaCxList obc : recordList) {
String id = obc.getId();
OtaBaCxList otaBaCxList = this.queryById(id);
otaBaCxList.setBatjsj(obc.getBatjsj());
otaBaCxList.setBz(obc.getBz());
this.saveOrUpdate(otaBaCxList);
//添加历史记录数据
OtaBaCxLsjl lsjl = new OtaBaCxLsjl();
lsjl.setOtaId(id);
lsjl.setSjzt(obc.getBz());
otaBaCxLsjlService.add(lsjl);
}
}
} catch (Exception ex) {
ex.printStackTrace();
throw new JeroBootException(ex.getMessage());
}
}
}
@@ -1,29 +1,40 @@
package com.jero.modules.ota.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.common.exception.JeroBootException;
import com.jero.modules.ota.entity.OtaBaSjList;
import com.jero.modules.ota.entity.OtaBaSjLsjl;
import com.jero.modules.ota.mapper.OtaBaSjListMapper;
import com.jero.modules.ota.service.IOtaBaSjListService;
import com.jero.modules.ota.service.IOtaBaSjLsjlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
/**
* @Description: 升级备案-升级活动备案列表
* @Author: jero-boot
* @Date: 2023-03-17
* @Date: 2023-03-17
* @Version: V1.0
*/
@Service
public class OtaBaSjListServiceImpl extends ServiceImpl<OtaBaSjListMapper, OtaBaSjList> implements IOtaBaSjListService {
/**
* 保存
*
* @param otaBaSjList
* @return
*/
@Override
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@Autowired
private IOtaBaSjLsjlService otaBaSjLsjlService;
/**
* 保存
*
* @param otaBaSjList
* @return
*/
@Override
public void add(OtaBaSjList otaBaSjList) {
Date now = new Date();
otaBaSjList.setCreateTime(now);
@@ -31,59 +42,85 @@ public class OtaBaSjListServiceImpl extends ServiceImpl<OtaBaSjListMapper, OtaBa
save(otaBaSjList);
}
/**
* 更新
*
* @param otaBaSjList
* @return
*/
@Override
/**
* 更新
*
* @param otaBaSjList
* @return
*/
@Override
public void editById(OtaBaSjList otaBaSjList) {
Date now = new Date();
Date now = new Date();
otaBaSjList.setUpdateTime(now);
saveOrUpdate(otaBaSjList);
saveOrUpdate(otaBaSjList);
}
/**
* 通过id删除
*
* @param id
* @return
*/
@Override
/**
* 通过id删除
*
* @param id
* @return
*/
@Override
public void deleteById(String id) {
removeById(id);
}
/**
* 批量删除
*
* @param ids
* @return
*/
@Override
/**
* 批量删除
*
* @param ids
* @return
*/
@Override
public void deleteByIds(List<String> ids) {
removeByIds(ids);
}
/**
* 通过id查询
*
* @param id
* @return
*/
@Override
/**
* 通过id查询
*
* @param id
* @return
*/
@Override
public OtaBaSjList queryById(String id) {
return getById(id);
}
/**
* 列表查询
*
* @return
*/
@Override
* 列表查询
*
* @return
*/
@Override
public List<OtaBaSjList> queryList() {
return list();
}
/**
* 备案维护
*/
@Override
public void batchRecord(List<OtaBaSjList> recordList) {
try {
if (null != recordList && recordList.size() > 0) {
for (OtaBaSjList obs : recordList) {
String id = obs.getId();
OtaBaSjList otaBaSjList = this.queryById(id);
otaBaSjList.setBatjsj(obs.getBatjsj());
otaBaSjList.setBz(obs.getBz());
this.saveOrUpdate(otaBaSjList);
//添加历史记录数据
OtaBaSjLsjl lsjl = new OtaBaSjLsjl();
lsjl.setOtaId(id);
lsjl.setSjzt(obs.getBz());
otaBaSjLsjlService.add(lsjl);
}
}
} catch (Exception ex) {
ex.printStackTrace();
throw new JeroBootException(ex.getMessage());
}
}
}
@@ -254,13 +254,13 @@ public class CertificationInventoryJob implements Job {
Calendar sevenCalendar=new GregorianCalendar();
sevenCalendar.setTime(new Date());
sevenCalendar.add(Calendar.DATE,7);
Date sevenDays = sevenCalendar.getTime(); //fourteen
Date sevenDays = sevenCalendar.getTime();
//获取后十四天后的时间
Calendar fourteenCalendar=new GregorianCalendar();
fourteenCalendar.setTime(new Date());
fourteenCalendar.add(Calendar.DATE,14);
Date fourteenDays = fourteenCalendar.getTime(); //fourteen
Date fourteenDays = fourteenCalendar.getTime();
String threeDaysStr = sdf.format(threeDays);
String sevenDaysStr = sdf.format(sevenDays);
@@ -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.MessageTypeEnum;
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.service.IBussDocumentLibraryEOService;
import com.jero.modules.feishu.enums.TemplateInfoEnum2;
import com.jero.modules.feishu.service.IFeishuService;
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
import com.jero.modules.feishu.vo.FeishuMsgVo;
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.JumpLinkEnum;
import com.jero.modules.project.enums.SendMsgFlagEnum;
@@ -68,12 +71,112 @@ public class designComplianceJob implements Job {
private ISysUserService sysUserService;
@Autowired
private IFeishuService feishuService;
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
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<>();
lawsInventoryEOQueryWrap.lambda().in(ProjectLawsInventoryEO::getDesignFlowStatus,designFlowStatusList);
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>> lawsInventoryByDesignDutyIdGroupMap = lawsInventoryListByProjectLibraryId.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getDesignDutyId));
for (Map.Entry<String, List<ProjectLawsInventoryEO>> lawsInventoryByDesignDutyIdGroup : lawsInventoryByDesignDutyIdGroupMap.entrySet()) {
String designDutyId = lawsInventoryByDesignDutyIdGroup.getKey();
List<ProjectLawsInventoryEO> designDutyDataList = lawsInventoryByDesignDutyIdGroup.getValue();
if(StringUtils.isEmpty(designDutyId) || CollectionUtils.isEmpty(designDutyDataList)){
continue;
}
List<String> userIdList = Arrays.asList(designDutyId.split(","));
Map<String, Object> sendMsgDataListMap = this.disposeSendMsgDataList(designDutyDataList);
// 三条后结束的
List<ProjectLawsInventoryEO> threeDaysList = (List<ProjectLawsInventoryEO>) sendMsgDataListMap.get("threeDaysList");
if(CollectionUtils.isNotEmpty(threeDaysList)){
Date designDueDate = threeDaysList.get(0).getDesignDueDate();
String endTime = "";
if(designDueDate != null){
endTime = DateUtils.formatDate(designDueDate);
}
String serialNumbers = threeDaysList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
// 给法规工程师发消息
Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,以下待办任务距离截止日期仅剩3天,请及时查看处理。");
params.put("contentEn","Hello! This task will expire in 3 days. Please check and address it in a timely manner. Thank you!");
params.put("projectLibraryId",projectLibraryId);
params.put("endTime",endTime);
params.put("userIdList",userIdList);
params.put("serialNumbers",serialNumbers);
params.put("flowTypeCn","设计符合性流程");
params.put("flowTypeEn","Design Compliance Process");
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION4.getValue(),params);
}
// 当天结束的
List<ProjectLawsInventoryEO> currentDaysList = (List<ProjectLawsInventoryEO>) sendMsgDataListMap.get("currentDaysList");
if(CollectionUtils.isNotEmpty(currentDaysList)){
Date designDueDate = currentDaysList.get(0).getDesignDueDate();
String endTime = "";
if(designDueDate != null){
endTime = DateUtils.formatDate(designDueDate);
}
String serialNumbers = currentDaysList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
// 给法规工程师发消息
Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,以下待办任务已到截止日期,请尽快查看处理。");
params.put("contentEn","Hello! This task will expire today. Please check and address it ASAP. Thank you!");
params.put("projectLibraryId",projectLibraryId);
params.put("endTime",endTime);
params.put("userIdList",userIdList);
params.put("serialNumbers",serialNumbers);
params.put("flowTypeCn","设计符合性流程");
params.put("flowTypeEn","Design Compliance Process");
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION4.getValue(),params);
}
// 逾期的
List<ProjectLawsInventoryEO> overdueList = (List<ProjectLawsInventoryEO>) sendMsgDataListMap.get("overdueList");
if(CollectionUtils.isNotEmpty(overdueList)){
Date designDueDate = overdueList.get(0).getDesignDueDate();
String endTime = "";
if(designDueDate != null){
endTime = DateUtils.formatDate(designDueDate);
}
String serialNumbers = overdueList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
// 给法规工程师发消息
Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,以下待办任务已逾期,请尽快处理。");
params.put("contentEn","Hello! This task is overdue. Please address it ASAP. Thank you!");
params.put("projectLibraryId",projectLibraryId);
params.put("endTime",endTime);
params.put("userIdList",userIdList);
params.put("serialNumbers",serialNumbers);
params.put("flowTypeCn","设计符合性流程");
params.put("flowTypeEn","Design Compliance Process");
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION5.getValue(),params);
}
}
}
}
//查询出已经启动了设计符合性流程的数据。 并且流程没有结束。
QueryWrapper<ProjectTaskInventoryEO> queryProjectTaskInventoryWrapper = new QueryWrapper<>();
/*QueryWrapper<ProjectTaskInventoryEO> queryProjectTaskInventoryWrapper = new QueryWrapper<>();
queryProjectTaskInventoryWrapper.isNotNull("design_p_id");
List<String> status = new ArrayList<>();
status.add(DesignComplianceStatusEnum.TO_SUBMIT.getValue());
@@ -378,7 +481,76 @@ public class designComplianceJob implements Job {
}
}
}
}
}*/
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.getDesignDueDate() != null){
if (StringUtils.equals(fourteenDaysStr, sdf.format(data.getDesignDueDate()))) {
flag = true;
}
}
return flag;
}).collect(Collectors.toList());
// 七天后结束的
List<ProjectLawsInventoryEO> threeDaysList = projectLawsInventoryEOList.stream().filter(data -> {
boolean flag = false;
if(data.getDesignDueDate() != null){
if (StringUtils.equals(sevenDaysStr, sdf.format(data.getDesignDueDate()))) {
flag = true;
}
}
return flag;
}).collect(Collectors.toList());
// 当天结束的
List<ProjectLawsInventoryEO> currentDaysList = projectLawsInventoryEOList.stream().filter(data -> {
boolean flag = false;
//结束日期是当前日期
if(data.getDesignDueDate() != null){
if (StringUtils.equals(currentDateStr, sdf.format(data.getDesignDueDate()))) {
flag = true;
}
}
return flag;
}).collect(Collectors.toList());
// 逾期的
List<ProjectLawsInventoryEO> overdueList = projectLawsInventoryEOList.stream().filter(data -> {
// 只要早于当前日期都算逾期 不算当天。
boolean flag = false;
if(data.getDesignDueDate() != null){
flag = (data.getDesignDueDate().before(currentDate) && !StringUtils.equals(currentDateStr, sdf.format(data.getDesignDueDate())));
}
return flag;
}).collect(Collectors.toList());
result.put("currentDaysList",currentDaysList);
result.put("threeDaysList",threeDaysList);
result.put("overdueList",overdueList);
return result;
}
}
@@ -477,6 +477,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
boolean checkResult = checkData(projectLawsInventoryEO.getProjectLibraryId(), currentUser.getId(), projectLawsInventoryEO.getId());
if(checkResult){
this.updateProjectLawsInventorySendMessage(projectLawsInventoryEO);
projectLawsInventoryEO.setUpdateTime(now);
ProjectLawsInventoryEO projectLawsInventoryEOCopy = SerializationUtils.clone(projectLawsInventoryEO);//复制
@@ -564,6 +567,127 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
}
}
/**
* 编辑法规清单发送消息
* @param projectLawsInventoryEO
*/
private void updateProjectLawsInventorySendMessage(ProjectLawsInventoryEO projectLawsInventoryEO) {
ProjectLawsInventoryEO projectLawsInventoryOld = this.queryById(projectLawsInventoryEO.getId());
boolean toBeCheckedFlag = (
StringUtils.equals(projectLawsInventoryOld.getDesignFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
|| StringUtils.equals(projectLawsInventoryOld.getVerifyFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
);
if((StringUtils.isNotEmpty(projectLawsInventoryOld.getRegulationOwnerId()) && StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId())) && toBeCheckedFlag){
// 如果编辑了法规工程师给之前的法规工程师发消息
if (!StringUtils.equals(projectLawsInventoryOld.getRegulationOwnerId(), projectLawsInventoryEO.getRegulationOwnerId())) {
String endTime = "";
if(projectLawsInventoryOld.getInventoryAffirmDueDate() != null){
endTime = DateUtils.formatDate(projectLawsInventoryOld.getInventoryAffirmDueDate());
}
String regulationOwnerId = projectLawsInventoryOld.getRegulationOwnerId();
// 给法规工程师发消息
Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,您以下任务已被发起人撤回。");
params.put("contentEn","Hello! Your task has been withdrawn by the initiator.");
params.put("projectLibraryId", projectLawsInventoryEO.getProjectLibraryId());
params.put("endTime",endTime);
params.put("userIdList",Arrays.asList(regulationOwnerId.split(",")));
params.put("serialNumbers",projectLawsInventoryOld.getSerialNumber());
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(),params);
}
}
if((projectLawsInventoryOld.getDesignDueDate() != null && projectLawsInventoryEO.getDesignDueDate() != null) && toBeCheckedFlag){
if(!projectLawsInventoryOld.getDesignDueDate().equals(projectLawsInventoryEO.getDesignDueDate())){
String endTime = "";
if(projectLawsInventoryOld.getInventoryAffirmDueDate() != null){
endTime = DateUtils.formatDate(projectLawsInventoryOld.getInventoryAffirmDueDate());
}
String regulationOwnerId = projectLawsInventoryOld.getRegulationOwnerId();
// 给法规工程师发消息
Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,以下符合性任务的截止时间已被发起人修改。");
params.put("contentEn","Hello! The due date of the compliance task has been modified by the initiator.");
params.put("projectLibraryId", projectLawsInventoryEO.getProjectLibraryId());
params.put("endTime",endTime);
params.put("userIdList",Arrays.asList(regulationOwnerId.split(",")));
params.put("serialNumbers",projectLawsInventoryOld.getSerialNumber());
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(),params);
}
}
if((projectLawsInventoryOld.getVerifyDueDate() != null && projectLawsInventoryEO.getVerifyDueDate() != null) && toBeCheckedFlag){
if(!projectLawsInventoryOld.getVerifyDueDate().equals(projectLawsInventoryEO.getVerifyDueDate())){
String endTime = "";
if(projectLawsInventoryOld.getInventoryAffirmDueDate() != null){
endTime = DateUtils.formatDate(projectLawsInventoryOld.getInventoryAffirmDueDate());
}
String regulationOwnerId = projectLawsInventoryOld.getRegulationOwnerId();
// 给法规工程师发消息
Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,以下符合性任务的截止时间已被发起人修改。");
params.put("contentEn","Hello! The due date of the compliance task has been modified by the initiator.");
params.put("projectLibraryId", projectLawsInventoryEO.getProjectLibraryId());
params.put("endTime",endTime);
params.put("userIdList",Arrays.asList(regulationOwnerId.split(",")));
params.put("serialNumbers",projectLawsInventoryOld.getSerialNumber());
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(),params);
}
}
// 设计符合性 任务待确认消息 标识
boolean toBeConfirmedDesignFlag = (
StringUtils.equals(projectLawsInventoryOld.getDesignFlowStatus(),ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())
|| StringUtils.equals(projectLawsInventoryOld.getDesignFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
);
if((projectLawsInventoryOld.getDesignDutyId() != null && projectLawsInventoryEO.getDesignDutyId() != null) && toBeConfirmedDesignFlag){
if(!projectLawsInventoryOld.getDesignDutyId().equals(projectLawsInventoryEO.getDesignDutyId())){
String endTime = "";
if(projectLawsInventoryOld.getDesignDueDate() != null){
endTime = DateUtils.formatDate(projectLawsInventoryOld.getDesignDueDate());
}
String regulationOwnerId = projectLawsInventoryOld.getRegulationOwnerId();
// 给法规工程师发消息
Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,您以下任务已被发起人撤回。");
params.put("contentEn","Hello! Your task has been withdrawn by the initiator.");
params.put("projectLibraryId", projectLawsInventoryEO.getProjectLibraryId());
params.put("endTime",endTime);
params.put("userIdList",Arrays.asList(projectLawsInventoryOld.getDesignDutyId().split(",")));
params.put("serialNumbers",projectLawsInventoryOld.getSerialNumber());
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(),params);
}
}
// 验证符合性 任务待确认消息 标识
boolean toBeConfirmedVerifyFlag = (
StringUtils.equals(projectLawsInventoryOld.getVerifyFlowStatus(),ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())
|| StringUtils.equals(projectLawsInventoryOld.getVerifyFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
);
if((projectLawsInventoryOld.getVerifyDutyId() != null && projectLawsInventoryEO.getVerifyDutyId() != null) && toBeConfirmedVerifyFlag){
if(!projectLawsInventoryOld.getVerifyDutyId().equals(projectLawsInventoryEO.getVerifyDutyId())){
String endTime = "";
if(projectLawsInventoryOld.getVerifyDueDate() != null){
endTime = DateUtils.formatDate(projectLawsInventoryOld.getVerifyDueDate());
}
String regulationOwnerId = projectLawsInventoryOld.getRegulationOwnerId();
// 给法规工程师发消息
Map<String,Object> params = new HashMap<>();
params.put("contentCn","您好,您以下任务已被发起人撤回。");
params.put("contentEn","Hello! Your task has been withdrawn by the initiator.");
params.put("projectLibraryId", projectLawsInventoryEO.getProjectLibraryId());
params.put("endTime",endTime);
params.put("userIdList",Arrays.asList(projectLawsInventoryOld.getDesignDutyId().split(",")));
params.put("serialNumbers",projectLawsInventoryOld.getSerialNumber());
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(),params);
}
}
}
private void setProjectLawsInventoryPermission(String userId, String projectId,String lawsInventoryId,Date now, List<ProjectUserPermission> adds, String belong) {
QueryWrapper<ProjectUserPermission> del = new QueryWrapper<>();
del.eq("project_id", projectId)
@@ -1676,6 +1800,28 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
String verifyFlowStatusName = ComplianceFlowStatusEnum.getTextByValue(projectLawsInventoryEO.getVerifyFlowStatus(), cut);
projectLawsInventoryEO.setVerifyFlowStatusName(verifyFlowStatusName);
}
// 返回符合性流程的流程实例id
if(!StringUtils.equals(projectLawsInventoryEO.getVerifyFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
||!StringUtils.equals(projectLawsInventoryEO.getVerifyFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())){
QueryWrapper<ProcessInfoDetailEO> processInfoDetailEOQueryWrapper = new QueryWrapper<>();
processInfoDetailEOQueryWrapper.lambda().eq(ProcessInfoDetailEO::getProjectLawsInventoryId,projectLawsInventoryEO.getId());
processInfoDetailEOQueryWrapper.lambda().eq(ProcessInfoDetailEO::getFlowType,FlowTypeEnum.YZFHXSCLC.getValue());
List<ProcessInfoDetailEO> processInfoDetailEOS = this.processInfoDetailEOService.list(processInfoDetailEOQueryWrapper);
if(CollectionUtils.isNotEmpty(processInfoDetailEOS)){
projectLawsInventoryEO.setVerifyPId(processInfoDetailEOS.get(0).getActiProcInstId());
}
}
if(!StringUtils.equals(projectLawsInventoryEO.getDesignFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
||!StringUtils.equals(projectLawsInventoryEO.getDesignFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())){
QueryWrapper<ProcessInfoDetailEO> processInfoDetailEOQueryWrapper = new QueryWrapper<>();
processInfoDetailEOQueryWrapper.lambda().eq(ProcessInfoDetailEO::getProjectLawsInventoryId,projectLawsInventoryEO.getId());
processInfoDetailEOQueryWrapper.lambda().eq(ProcessInfoDetailEO::getFlowType,FlowTypeEnum.SJFHXSHLC.getValue());
List<ProcessInfoDetailEO> processInfoDetailEOS = this.processInfoDetailEOService.list(processInfoDetailEOQueryWrapper);
if(CollectionUtils.isNotEmpty(processInfoDetailEOS)){
projectLawsInventoryEO.setDesignPId(processInfoDetailEOS.get(0).getActiProcInstId());
}
}
}
}
}
@@ -2790,7 +2936,10 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
return objectResult;
}
if(StringUtils.equals(operatorType,OperatorTypeEnum.SEND_MSG.getValue())){
workFlowSendMsg(jsonObject);
// workFlowSendMsg(jsonObject);
Map<String,Object> prarams = (Map<String, Object>) jsonObject.get("params");
String templateId = jsonObject.getString("templateId");
this.sendMessageByTemplateId(templateId,prarams);
}
return new Result<>().success("调用成功!");
@@ -10227,6 +10376,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
String serialNumbers = (String) params.get("serialNumbers");
String contentCn = (String) params.get("contentCn");
String contentEn = (String) params.get("contentEn");
String flowTypeCn = (String) params.get("flowTypeCn");
String flowTypeEn = (String) params.get("flowTypeEn");
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
@@ -10259,6 +10410,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
templateVariableMap.put("operateUserName",ObjectUtils.isNotEmpty(currentUser) ? currentUser.getUsername() : projectLibraryBase.getStudioEngineerName());
templateVariableMap.put("standName",serialNumbers);
templateVariableMap.put("flowTypeCn",flowTypeCn);
templateVariableMap.put("flowTypeEn",flowTypeEn);
larkMesJson.put("templateVariableMap",templateVariableMap);
this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson);
@@ -12,15 +12,8 @@ import com.jero.common.system.vo.LoginUser;
import com.jero.modules.cert.collect.service.IParamsManifestEOService;
import com.jero.modules.dummy.enums.OrderEnum;
import com.jero.modules.enums.DictCodeEnum;
import com.jero.modules.project.entity.ConditionAssessmentEO;
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
import com.jero.modules.project.entity.ProjectLawsInventoryLogEO;
import com.jero.modules.project.entity.ProjectLibraryBase;
import com.jero.modules.project.entity.ProjectLibraryRoleRelEO;
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
import com.jero.modules.project.entity.ProjectTaskInventoryEO;
import com.jero.modules.project.entity.ProjectTaskPlanning;
import com.jero.modules.project.entity.ProjectUserPermission;
import com.jero.modules.feishu.enums.TemplateInfoEnum2;
import com.jero.modules.project.entity.*;
import com.jero.modules.project.enums.*;
import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper;
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
@@ -28,10 +21,7 @@ import com.jero.modules.project.mapper.ProjectNameInfoEOMapper;
import com.jero.modules.project.mapper.ProjectRelatedPersonnelMapper;
import com.jero.modules.project.mapper.ProjectTaskInventoryEOMapper;
import com.jero.modules.project.mapper.ProjectUserPermissionMapper;
import com.jero.modules.project.service.IConditionAssessmentEOService;
import com.jero.modules.project.service.IProjectLibraryBaseService;
import com.jero.modules.project.service.IProjectLibraryRoleRelEOService;
import com.jero.modules.project.service.IProjectUserPermissionService;
import com.jero.modules.project.service.*;
import com.jero.modules.system.entity.SysDictItem;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.enums.DicCodeEnum;
@@ -154,6 +144,9 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
@Autowired
private ITopProjectEOService iTopProjectEOService;
@Autowired
private IProjectCertificationInventoryEOService projectCertificationInventoryEOService;
/**
* 保存
*
@@ -379,6 +372,44 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
ProjectLibraryBase original = baseMapper.selectById(projectLibraryBase.getId());
// 如果studio编辑了认证工程师,需要给旧的认证工程师发送认证清单任务消息
if(StringUtils.isNotEmpty(projectLibraryBase.getCertificationEngineer()) && StringUtils.isNotEmpty(original.getCertificationEngineer())){
List<String> originalCertificationEngineerIdList = Arrays.asList(original.getCertificationEngineer().split(","));
List<String> newCertificationEngineerIdList = Arrays.asList(projectLibraryBase.getCertificationEngineer().split(","));
originalCertificationEngineerIdList = originalCertificationEngineerIdList.stream().filter(originalCertificationEngineerId -> {
boolean flag = true;
for (String newCertificationEngineerId : newCertificationEngineerIdList) {
// 如果新传进来的 认证工程师id跟现有的认证工程师id一致,不用发消息
if(StringUtils.equals(newCertificationEngineerId,originalCertificationEngineerId)){
flag = false;
break;
}
}
return flag;
}).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(originalCertificationEngineerIdList)){
// 判断当前项目下是否还有需要认证工程师操作的数据 只有清单待校核、结果待审查 这两个状态的数据由认证工程师操作。
List<String> flowStatusList = new ArrayList<>();
flowStatusList.add(CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue());
flowStatusList.add(CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue());
QueryWrapper<ProjectCertificationInventoryEO> certificationInventoryEOQueryWrapper = new QueryWrapper<>();
certificationInventoryEOQueryWrapper.lambda().eq(ProjectCertificationInventoryEO::getProjectLibraryId,projectLibraryBase.getId());
certificationInventoryEOQueryWrapper.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList);
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = this.projectCertificationInventoryEOService.list(certificationInventoryEOQueryWrapper);
if(CollectionUtils.isNotEmpty(projectCertificationInventoryEOList)){
List<SysUser> userInfoList = this.sysUserService.querySysUserListByIdList(originalCertificationEngineerIdList);
this.projectCertificationInventoryEOService.sendMessageByTemplateId(
projectCertificationInventoryEOList,
TemplateInfoEnum2.CERTIFICATION_MESSAGE13.getValue(),
originalCertificationEngineerIdList,
userInfoList
);
}
}
}
checkExitData(projectLibraryBase);
saveOrUpdate(projectLibraryBase);
+4
View File
@@ -1690,6 +1690,10 @@ module.exports = {
taskTypeMismatch:'Task Type Mismatch',
taskNodeMismatch:'Task Node Mismatch',
ifNot:'If not, fill in "none" or "not involved"',
designComplianceProcess:'Design Compliance Process',
validationComplianceProcess:'Validation Compliance Process',
onlyDataInTheReminderProcessBanBeProcessed:'Only data in the reminder process can be processed',
expeditionProcess:'Expedition Process',
addfunction:'Add function',
controllername:'Controller name',
hardwaremanufacturer:'Hardware manufacturer',
+4
View File
@@ -1767,6 +1767,8 @@ module.exports = {
theDataYouSelectedContainsSkip:'您所勾选的数据中包含交付物类型为空的数据请确认是否跳过',
designComplianceProcessFor:'的设计符合性流程',
validationComplianceProcessFor:'的验证符合性流程',
designComplianceProcess:'设计符合性流程',
validationComplianceProcess:'验证符合性流程',
thePersonResponsibleForVerifyingEmpty:'验证符合性流程的责任人不能为空',
theDeadlineComplianceProcessCannotEmpty:'验证符合性流程的截止时间不能为空',
theDeadlineForTheDesignCannotBeEmpty:'设计符合性流程的截止时间不能为空',
@@ -1795,4 +1797,6 @@ module.exports = {
hardwaremanufacturer:'硬件生产企业',
softwareversion:'软件版本',
returntofill:'返回填写',
onlyDataInTheReminderProcessBanBeProcessed:'只能催办流程中的数据',
expeditionProcess:'催办流程',
}
@@ -100,13 +100,26 @@
:title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
</div>
<a-form-model-item class="itemModel" prop="designDutyId">
<PersonnelSelection
:query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}"
:isSingleChoice="true"
:personneQuery="formInline"
v-if="visible"
@change="PersonnelSelectionChange"
v-model="formInline.engineeringInterfacePersonName"/>
<a-select :placeholder="$t('PleaseSelect')+$t('engineeringInterfacePerson')"
class="box-input"
allowClear
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.engineeringInterfacePerson">
<a-select-option v-for="(item, key) in engineeringInterfacePersonList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name ">
{{ item.name }}
</span>
</a-select-option>
</a-select>
<!-- <PersonnelSelection-->
<!-- :query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}"-->
<!-- :isSingleChoice="true"-->
<!-- :personneQuery="formInline"-->
<!-- v-if="visible"-->
<!-- @change="PersonnelSelectionChange"-->
<!-- v-model="formInline.engineeringInterfacePersonName"/>-->
<!-- <j-dict-select-tag class="box-input" v-model="formInline.designDuty"-->
<!-- :disabled="formInline.roleCode == 0 ? false : true"-->
<!-- @input="handleInput('designDuty')"-->
@@ -347,7 +360,8 @@
rules: {},
ids: [],
code: '',
regulatoryEngineerList: []
regulatoryEngineerList: [],
engineeringInterfacePersonList:[],
}
},
mounted() {
@@ -355,6 +369,7 @@
methods: {
dutyTerritoryChange(event) {
this.formInline.regulationOwnerId = undefined
this.formInline.engineeringInterfacePerson = undefined
this.formInline = {...this.formInline}
this.queryPersonByProject(event)
},
@@ -366,6 +381,7 @@
getAction('/project/projectRelatedPersonnel/queryPersonByProjectId', query).then((res) => {
if (res.success) {
this.regulatoryEngineerList = res.result.lawEngineerList //法规工程师
this.engineeringInterfacePersonList = res.result.engineeringInterfacePersonList //工程接口人
}
})
},
@@ -375,6 +391,8 @@
},
edit(data, code) {
this.visible = true
this.regulatoryEngineerList = []
this.engineeringInterfacePersonList = []
this.getDeliverableTree()
this.code = code
this.$nextTick(() => {
@@ -632,7 +632,7 @@
})
},
editModel(value) {
// this.formInline = {}
this.formInline = {}
this.visible = true
this.formInline = JSON.parse(JSON.stringify(value))
// if (this.formInline.deliverableType) {
@@ -644,7 +644,7 @@
this.getRegulationNo()
this.title = this.$t('edit')
this.$nextTick(() => {
this.formInline = {...this.formInline}
this.formInline = { ...this.formInline }
this.$refs.ruleForm.clearValidate()
})
},
@@ -773,7 +773,7 @@
},
dutyHandleChange(index) {
this.formInline.dataList[index].sdt = undefined
this.formInline = {... this.formInline}
this.formInline = { ...this.formInline }
this.queryPersonByProject(this.formInline.dataList[index].dutyTerritory, index)
},
queryPersonByProject(row, index) {
@@ -785,10 +785,18 @@
if (res.success) {
if (this.formInline.id) {
this.engineeringInterfacePersonList = res.result.engineeringInterfacePersonList || [] //工程接口人
if (res.result.engineeringInterfacePersonList && res.result.engineeringInterfacePersonList.length == 1){
this.formInline.sdt = res.result.engineeringInterfacePersonList[0].value
}else if(this.engineeringInterfacePersonList.length == 0){
this.formInline.sdt = undefined
}
} else {
this.$nextTick(()=>{
this.$nextTick(() => {
this.formInline.dataList[index].engineeringInterfacePersonList = res.result.engineeringInterfacePersonList || []
this.formInline = {...this.formInline}
if (res.result.engineeringInterfacePersonList && res.result.engineeringInterfacePersonList.length == 1) {
this.formInline.dataList[index].sdt = res.result.engineeringInterfacePersonList[0].value
}
this.formInline = { ...this.formInline }
})
}
}
@@ -252,26 +252,26 @@
<span class="title-text-text" :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'engineeringInterfacePerson'">
<PersonnelSelection
:query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}"
:isSingleChoice="true"
:personneQuery="formInline"
v-if="visible"
@change="PersonnelSelectionChange"
v-model="formInline.engineeringInterfacePersonName"/>
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('engineeringInterfacePerson')"-->
<!-- class="box-input"-->
<!-- allowClear-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- v-model="formInline.engineeringInterfacePerson">-->
<!-- <a-select-option v-for="(item, key) in engineeringInterfacePersonList"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
<!-- {{ item.name }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- <PersonnelSelection-->
<!-- :query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}"-->
<!-- :isSingleChoice="true"-->
<!-- :personneQuery="formInline"-->
<!-- v-if="visible"-->
<!-- @change="PersonnelSelectionChange"-->
<!-- v-model="formInline.engineeringInterfacePersonName"/>-->
<a-select :placeholder="$t('PleaseSelect')+$t('engineeringInterfacePerson')"
class="box-input"
allowClear
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.engineeringInterfacePerson">
<a-select-option v-for="(item, key) in engineeringInterfacePersonList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name ">
{{ item.name }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
@@ -1022,11 +1022,11 @@
this.formInline.engineeringInterfacePerson = undefined
this.formInline.homologationEngineerId = undefined
this.formInline.designInitiatorId = undefined
this.formInline.designDutyId = undefined
// this.formInline.designDutyId = undefined
this.formInline.prehomoInitiatorId = undefined
this.formInline.prehomoDutyId = undefined
this.formInline.verifyInitiatorId = undefined
this.formInline.verifyDutyId = undefined
// this.formInline.verifyDutyId = undefined
this.queryPersonByProject(event)
},
@@ -1158,9 +1158,9 @@
if (!(this.designInitiatorList.some(val => val.value == row.designInitiatorId))) {
row.designInitiatorId = undefined
}
if (!(this.designDutyList.some(val => val.value == row.designDutyId))) {
row.designDutyId = undefined
}
// if (!(this.designDutyList.some(val => val.value == row.designDutyId))) {
// row.designDutyId = undefined
// }
if (!(this.prehomoInitiatorList.some(val => val.value == row.prehomoInitiatorId))) {
row.prehomoInitiatorId = undefined
}
@@ -1170,9 +1170,9 @@
if (!(this.verifyInitiatorList.some(val => val.value == row.verifyInitiatorId))) {
row.verifyInitiatorId = undefined
}
if (!(this.verifyDutyList.some(val => val.value == row.verifyDutyId))) {
row.verifyDutyId = undefined
}
// if (!(this.verifyDutyList.some(val => val.value == row.verifyDutyId))) {
// row.verifyDutyId = undefined
// }
if (!(this.regulatoryEngineerList.some(val => val.value == row.regulationOwnerId))) {
row.regulationOwnerId = undefined
}
@@ -1389,7 +1389,7 @@
this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : ''
},
PersonnelSelectionChange(value, id) {
this.formInline[value + '_id'] = id
this.formInline[value] = id
this.formInline = { ...this.formInline }
}
}
@@ -472,15 +472,16 @@
<div class="box-title-text-index">
<div class="title-text-Comment">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('roleSwitching')">{{ $t('roleSwitching') }}</span>
<span class="title-text-text" :title="$t('expeditionProcess')">{{ $t('expeditionProcess') }}</span>
</div>
<a-form-model-item class="itemModelComment" :prop="'roleSwitchingCode'">
<a-select allowClear :placeholder="$t('pleaseSelect')+$t('roleSwitching')"
v-model="formInlineRoleSwitching.question">
<!-- <a-select-option :value="null">{{$t('pleaseSelect')}}</a-select-option>-->
<a-select-option :value="item.roleCode" v-for="item in questionList">
<span class="itemOption-index" :title="item.roleName">
{{ item.roleName }}
<a-form-model-item class="itemModelComment" :prop="'questionStatus'">
<a-select allowClear
:placeholder="$t('pleaseSelect')+$t('expeditionProcess')"
mode="multiple"
v-model="formInlineQuestion.questionStatus">
<a-select-option :value="item.value" v-for="item in questionList">
<span class="itemOption-index" :title="item.name">
{{ item.name }}
</span>
</a-select-option>
</a-select>
@@ -547,6 +548,26 @@
visibleQuestion: false,
confirmLoadingQuestion: false,
roleSwitchingList: [],
formInlineQuestion: {},
rulesRoleQuestion: {
questionStatus: [
{
required: true,
message: this.$t('expeditionProcess') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
},
questionList: [
{
value: '1',
name: this.$t('designComplianceProcess')
},
{
value: '2',
name: this.$t('validationComplianceProcess')
}
],
listTitle: '',
orderBy: '1',
orderByField: '',
@@ -632,7 +653,7 @@
children: [
{
title: this.$t('personLiable'),
dataIndex: 'designDutyName',
dataIndex: 'designDutyIdName',
align: 'left',
width: 180,
ellipsis: true
@@ -667,7 +688,7 @@
children: [
{
title: this.$t('personLiable'),
dataIndex: 'verifyDutyName',
dataIndex: 'verifyDutyIdName',
align: 'left',
width: 180,
ellipsis: true
@@ -1132,7 +1153,9 @@
dataWarningList: [],
completeTaskList: [],
requestsNum: 0,
JTextLoading: false
JTextLoading: false,
questionIdList: [],
questionWarning: []
}
},
@@ -1481,14 +1504,46 @@
})
},
handleOkQuestion() {
this.$refs.ruleFormQuestion.validate(valid => {
let formInlineQuestion = JSON.parse(JSON.stringify(this.formInlineQuestion))
if (formInlineQuestion.questionStatus && formInlineQuestion.questionStatus.length > 0) {
formInlineQuestion.questionStatus = formInlineQuestion.questionStatus.join(',')
}
let query = {
ids: this.questionIdList.join(','),
projectLibraryId: this.$route.query.id,
questionStatus: formInlineQuestion.questionStatus
}
this.confirmLoadingQuestion = true
postAction('project/projectLawsInventoryEO/expediting', query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.selectedRowKeys = []
this.getList()
this.visibleQuestion = false
this.confirmLoadingQuestion = false
if (this.questionWarning && this.questionWarning.length > 0) {
this.promptInformation(this.questionWarning)
}
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
})
},
handleCancelQuestion() {
this.visibleQuestion = false
},
//催办
questionClick() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let isTrue
let content = []
let idList = []
this.questionIdList = []
let detailedWarningList = []
this.questionWarning = []
for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < selectedRowKeys.length; j++) {
if (this.dataSource[i].id == selectedRowKeys[j]) {
@@ -1497,72 +1552,40 @@
}
}
for (let i = 0; i < content.length > 0; i++) {
if (this.roleSwitchingCode == '0') {
//为studio角色时在通过判断流程状态是否为清单待校核
if (content[i].verifyFlowStatus == 'List to be checked' ||
content[i].designFlowStatus == 'List to be checked') {
idList.push(content[i].id)
} else {
detailedWarningList.push(
< div > { content[i].serialNumber + this.$t('pleaseSelectTheDataverificationVerified') } < /div>
)
}
} else if (this.roleSwitchingCode == '1') {
if (content[i].verifyFlowStatus == 'Task to be confirmed' ||
content[i].designFlowStatus == 'Task to be confirmed') {
idList.push(content[i].id)
} else {
detailedWarningList.push(
< div > { content[i].serialNumber + this.$t('pleaseSelectTheDataverificationVerified') } < /div>
)
}
} else if (this.roleSwitchingCode == '30') {
if (content[i].verifyFlowStatus == 'List to be checked' ||
content[i].designFlowStatus == 'List to be checked') {
idList.push(content[i].id)
} else {
detailedWarningList.push(
< div > { content[i].serialNumber + this.$t('pleaseSelectTheDataverificationVerified') } < /div>
)
}
if (content[i].verifyFlowStatus == 'List to be checked' ||
content[i].designFlowStatus == 'List to be checked' ||
content[i].verifyFlowStatus == 'Task to be confirmed' ||
content[i].designFlowStatus == 'Task to be confirmed' ||
content[i].verifyFlowStatus == 'Results to be submitted' ||
content[i].designFlowStatus == 'Results to be submitted' ||
content[i].verifyFlowStatus == 'Results to be reviewed' ||
content[i].designFlowStatus == 'Results to be reviewed') {
this.questionIdList.push(content[i].id)
} else {
detailedWarningList.push(content[i].serialNumber)
}
}
if (idList && idList.length > 0) {
this.questionAction(idList, detailedWarningList)
if (detailedWarningList && detailedWarningList.length > 0) {
this.questionWarning.push(
< div > {
detailedWarningList
.join(',') + this.$t('conditionsNotMet') + this.$t('onlyDataInTheReminderProcessBanBeProcessed')
} < /div>)
}
if (this.questionIdList && this.questionIdList.length > 0) {
this.visibleQuestion = true
this.$nextTick(() => {
this.formInlineQuestion = {}
this.$refs.ruleFormQuestion.clearValidate()
})
} else {
this.promptInformation(detailedWarningList)
this.promptInformation(this.questionWarning)
}
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
//催办的接口
questionAction(selectedRowKeys, detailedWarningList) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmQuestion'),
onOk() {
let query = {
ids: selectedRowKeys.join(','),
projectLibraryId: _this.$route.query.id
}
postAction('project/projectLawsInventoryEO/expediting', query).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
if (detailedWarningList && detailedWarningList.length > 0) {
_this.promptInformation(detailedWarningList)
}
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
},
//定版
fixedPlateClick() {
if (this.dataSource && this.dataSource.length > 0) {
@@ -1885,6 +1908,7 @@
}
})
},
getList() {
let roleCode = this.roleSwitchingCode
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
@@ -1940,6 +1964,7 @@
}
})
},
onCheckAllChange(e) {
this.checkedList = e.target.checked ? this.customizeList.map(item => item.field) : []
this.selectedValue = this.checkedList
@@ -1985,6 +2010,7 @@
}
})
},
getPersonnelList() {
this.getList()
},
@@ -2174,6 +2200,7 @@
this.$message.warning(this.$t('selectLeastOne'))
}
},
submitClick(dataList, num) {
let content = []
let designList = []
@@ -2236,6 +2263,7 @@
_this.submitAdmin(dataList)
}
},
submitAdmin(dataList) {
let _this = this
this.requestsNum = 0
@@ -2333,6 +2361,7 @@
postAction('/project/projectCommentEO/add', query).then((res) => {
})
},
rejectCauseAdd(rejectCause, ids) {
let rejectTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
let query = {
@@ -2346,6 +2375,7 @@
})
},
handleCancelComment() {
this.visibleComment = false
},
@@ -2385,9 +2415,11 @@
}
})
},
customizeClick() {
this.$refs.customizeListRef.transferModel(this.columnsAll)
},
bringInRelevantPersonnelClick() {
let _this = this
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {