Merge remote-tracking branch 'origin/master'
This commit is contained in:
+7
@@ -243,4 +243,11 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
List<SysUser> queryByDepIds(List<String> departIds, String username);
|
||||
|
||||
List<SysUser> queryByWorkNo(String workNo);
|
||||
|
||||
/**
|
||||
* 根据用户idList 查询用户信息
|
||||
* @param userIdList
|
||||
* @return
|
||||
*/
|
||||
List<SysUser> querySysUserListByIdList(List<String> userIdList);
|
||||
}
|
||||
|
||||
+9
@@ -472,4 +472,13 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysUser> querySysUserListByIdList(List<String> userIdList) {
|
||||
userIdList = userIdList.stream().distinct().collect(Collectors.toList());
|
||||
QueryWrapper<SysUser> sysUserQueryWrapper = new QueryWrapper<>();
|
||||
sysUserQueryWrapper.lambda().in(SysUser::getId,userIdList);
|
||||
List<SysUser> sysUsers = this.baseMapper.selectList(sysUserQueryWrapper);
|
||||
return sysUsers;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+12
@@ -180,4 +180,16 @@ public class ProjectLawsInventoryEOController extends JeroController<ProjectLaws
|
||||
return this.projectLawsInventoryEOService.updateStatusBatch(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 匹配相关人员
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-匹配相关人员")
|
||||
@ApiOperation(value="项目库-法规清单表-匹配相关人员", notes="项目库-法规清单表-匹配相关人员")
|
||||
@GetMapping(value = "/matchRelevantPeople")
|
||||
public Result<?> matchRelevantPeople(@RequestParam Map<String,Object> params){
|
||||
return this.projectLawsInventoryEOService.matchRelevantPeople(params);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+13
-1
@@ -34,7 +34,7 @@ import java.util.Map;
|
||||
public class ProjectRelatedPersonnelController extends JeroController<ProjectRelatedPersonnel, IProjectRelatedPersonnelService> {
|
||||
@Autowired
|
||||
private IProjectRelatedPersonnelService projectRelatedPersonnelService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
* @return
|
||||
@@ -160,4 +160,16 @@ public class ProjectRelatedPersonnelController extends JeroController<ProjectRel
|
||||
return super.importExcel(request, response, ProjectRelatedPersonnel.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过projectId查询
|
||||
*
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-相关人员维护表-根据projectId查询编辑时下拉数据")
|
||||
@ApiOperation(value="项目库-相关人员维护表-根据projectId查询编辑时下拉数据", notes="项目库-相关人员维护表-根据projectId查询编辑时下拉数据")
|
||||
@GetMapping(value = "/queryPersonByProjectId")
|
||||
public Result<?> queryPersonByProjectId(@RequestParam(name="projectId",required=true) String projectId,@RequestParam(name="dutyTerritory",required=true) String dutyTerritory) {
|
||||
return this.projectRelatedPersonnelService.queryPersonByProjectId(projectId,dutyTerritory);
|
||||
}
|
||||
}
|
||||
|
||||
+7
@@ -309,4 +309,11 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "任务确认-截止时间")
|
||||
private Date taskAffirmDueDate;
|
||||
|
||||
/**任务确认-截止时间*/
|
||||
@Excel(name = "任务确认-截止时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "任务确认-截止时间")
|
||||
private String sendMsgFlag;
|
||||
}
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.jero.modules.project.enums;
|
||||
|
||||
public enum SendMsgFlagEnum {
|
||||
TRUE("未发","0"),
|
||||
FALSE("已发","1");
|
||||
|
||||
String name;
|
||||
String value;
|
||||
|
||||
private SendMsgFlagEnum(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static String getTextByValue(String value) {
|
||||
SendMsgFlagEnum[] values = values();
|
||||
for (SendMsgFlagEnum sendMsgFlagEnum : values) {
|
||||
if (sendMsgFlagEnum.value.equals(value)) {
|
||||
return sendMsgFlagEnum.name;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+7
@@ -69,4 +69,11 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
|
||||
* @return
|
||||
*/
|
||||
Result<?> updateStatusBatch(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 匹配相关人员
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
Result<?> matchRelevantPeople(Map<String, Object> params);
|
||||
}
|
||||
|
||||
+3
@@ -1,6 +1,7 @@
|
||||
package com.jero.modules.project.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
@@ -62,4 +63,6 @@ public interface IProjectRelatedPersonnelService extends IService<ProjectRelated
|
||||
List<ProjectRelatedPersonnel> queryList();
|
||||
|
||||
IPage<ProjectRelatedPersonnel> queryPageList(Map<String, Object> params);
|
||||
|
||||
Result<?> queryPersonByProjectId(String projectId,String dutyTerritory);
|
||||
}
|
||||
|
||||
+176
-1
@@ -1,31 +1,45 @@
|
||||
package com.jero.modules.project.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.common.constant.WebsocketConst;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.message.websocket.WebSocket;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
|
||||
import com.jero.modules.project.enums.*;
|
||||
import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper;
|
||||
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
|
||||
import com.jero.modules.project.mapper.ProjectRelatedPersonnelMapper;
|
||||
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
||||
import com.jero.modules.project.service.IProjectRelatedPersonnelService;
|
||||
import com.jero.modules.system.entity.SysAnnouncement;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.mapper.SysUserMapper;
|
||||
import com.jero.modules.system.service.ISysAnnouncementService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -55,6 +69,21 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
@Autowired
|
||||
private IOSSFileService iOSSFileService;
|
||||
|
||||
@Autowired
|
||||
private IFeishuService iFeishuService;
|
||||
|
||||
@Autowired
|
||||
private ISysAnnouncementService sysAnnouncementService;
|
||||
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
@Autowired
|
||||
private WebSocket webSocket;
|
||||
|
||||
@Autowired
|
||||
private ProjectRelatedPersonnelMapper projectRelatedPersonnelMapper;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -416,6 +445,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
}
|
||||
queryWrapper.lambda().eq(ProjectLawsInventoryEO::getProjectLibraryId,projectLibraryId);
|
||||
List<ProjectLawsInventoryEO> projectLawsInventoryEOS = this.baseMapper.selectList(queryWrapper);
|
||||
ProjectLibraryBase projectLibraryBase = projectLibraryBaseMapper.selectOne(new QueryWrapper<ProjectLibraryBase>()
|
||||
.lambda().eq(ProjectLibraryBase::getId, projectLibraryId));
|
||||
for (ProjectLawsInventoryEO projectLawsInventoryEO : projectLawsInventoryEOS) {
|
||||
|
||||
//如果该数据的状态为 未发起或拒绝 可以发起清单确认
|
||||
@@ -433,8 +464,14 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
updateWrapper.set(ProjectLawsInventoryEO::getHomologationEngineerSubmitStatus,null);
|
||||
updateWrapper.eq(ProjectLawsInventoryEO::getId,projectLawsInventoryEO.getId());
|
||||
super.update(projectLawsInventoryEO, updateWrapper);
|
||||
//消息内容
|
||||
// String msgContentCN = currentUser.getRealname() + "发起了 " + projectLibraryBase.getProjectName()
|
||||
// + " (项目名称)法规的清单确认,截止时间为:" +inventoryAffirmDueDate+ ", 请及时查看处理。";
|
||||
String msgContentEN = currentUser.getRealname() + "发起了 " + projectLibraryBase.getProjectName()
|
||||
+ " (项目名称)法规的清单确认,截止时间为:" +inventoryAffirmDueDate+ ", 请及时查看处理。";
|
||||
//发送消息
|
||||
String sendMessage = "XXX" + "发起了" + " XXX " + "(项目名称)法规的清单确认,截止时间为:" +inventoryAffirmDueDate+ ", 请及时查看处理。";
|
||||
sendMessage(msgContentEN,projectLawsInventoryEO);
|
||||
|
||||
}
|
||||
}
|
||||
result = "发起清单确认";
|
||||
@@ -493,4 +530,142 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
}
|
||||
return new Result<>().success(result + "成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送消息
|
||||
* @param msgContent
|
||||
* @param projectLawsInventoryEO
|
||||
*/
|
||||
public void sendMessage(String msgContent,ProjectLawsInventoryEO projectLawsInventoryEO){
|
||||
|
||||
String idTemp = projectLawsInventoryEO.getProjectLibraryId();
|
||||
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
String homologationEngineerId = projectLawsInventoryEO.getHomologationEngineerId();
|
||||
String regulationOwnerId = projectLawsInventoryEO.getRegulationOwnerId();
|
||||
if(StringUtils.isNotEmpty(homologationEngineerId)){
|
||||
userIdList.add(homologationEngineerId);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(regulationOwnerId)){
|
||||
userIdList.add(regulationOwnerId);
|
||||
}
|
||||
userIdList = userIdList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
|
||||
}
|
||||
|
||||
//系统消息
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgContent, "");
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket(idTemp, idTemp);
|
||||
|
||||
//飞书消息
|
||||
try {
|
||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), msgContent, MessageTypeEnum.PUSH.getName(), "");
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private SysAnnouncement getSysAnnouncement(List<String> userIdList, String content, String contentInfo) {
|
||||
SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
||||
sysAnnouncement.setDelFlag("0");
|
||||
sysAnnouncement.setSendStatus("0");
|
||||
sysAnnouncement.setSendTime(new Date());
|
||||
sysAnnouncement.setMsgCategory(MessageTypeEnum.READ.getValue());//消息类型
|
||||
sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_UESR);//指定用户
|
||||
sysAnnouncement.setMsgContent(content);
|
||||
sysAnnouncement.setMsgContentInfo(contentInfo);
|
||||
sysAnnouncement.setUserIds(StringUtils.join(userIdList, ","));
|
||||
return sysAnnouncement;
|
||||
}
|
||||
|
||||
private void sendWebsocket(String msgId, String msgTet) {
|
||||
JSONObject obj = new JSONObject();
|
||||
obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC);
|
||||
obj.put(WebsocketConst.MSG_ID, msgId);
|
||||
obj.put(WebsocketConst.MSG_TXT, msgTet);
|
||||
webSocket.sendMessage(obj.toJSONString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 匹配相关人员
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Result<?> matchRelevantPeople(Map<String, Object> params) {
|
||||
String projectLibraryId = (String) params.get("projectLibraryId");//项目id
|
||||
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
int isProjectRole = checkUserRole(projectLibraryId, currentUser.getId(), "");
|
||||
//验证用户是否是该项目的studio工程师,只有studio工程师才能匹配相关人员
|
||||
if(isProjectRole == Integer.parseInt(ProjectRoleEnum.STUDIO_ENGINEER.getValue())){
|
||||
//获取当前项目中的相关人员信息
|
||||
QueryWrapper<ProjectRelatedPersonnel> queryProjectPerson = new QueryWrapper<>();
|
||||
queryProjectPerson.lambda().eq(ProjectRelatedPersonnel::getProjectId,projectLibraryId);
|
||||
List<ProjectRelatedPersonnel> projectRelatedPersonnels = this.projectRelatedPersonnelMapper.selectList(queryProjectPerson);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(projectRelatedPersonnels)){
|
||||
QueryWrapper<ProjectLawsInventoryEO> queryWrapper = new QueryWrapper<>();
|
||||
List<String> inventoryAffirmStatusList = new ArrayList<>();
|
||||
inventoryAffirmStatusList.add(InventoryAffirmStatusEnum.NOT_STARTED.getValue());
|
||||
inventoryAffirmStatusList.add(InventoryAffirmStatusEnum.REJECTED.getValue());
|
||||
queryWrapper.lambda().in(ProjectLawsInventoryEO::getInventoryAffirmStatus,inventoryAffirmStatusList);
|
||||
queryWrapper.lambda().eq(ProjectLawsInventoryEO::getProjectLibraryId,projectLibraryId);
|
||||
//查询当前项目下,清单状态为 未发起、拒绝状态的法规清单。
|
||||
List<ProjectLawsInventoryEO> projectLawsInventoryEOS = this.baseMapper.selectList(queryWrapper);
|
||||
|
||||
for (ProjectLawsInventoryEO projectLawsInventoryEO : projectLawsInventoryEOS) {
|
||||
for (ProjectRelatedPersonnel projectRelatedPersonnel : projectRelatedPersonnels) {
|
||||
if(StringUtils.equals(projectRelatedPersonnel.getDutyTerritory(),projectLawsInventoryEO.getDutyTerritory())){
|
||||
//法规工程师
|
||||
if (StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerId())) {
|
||||
String lawEngineer = projectRelatedPersonnel.getLawEngineer();
|
||||
if(StringUtils.isNotEmpty(lawEngineer)){
|
||||
String[] lawEngineerArr = lawEngineer.split(",");
|
||||
if(lawEngineerArr.length == 1){
|
||||
projectLawsInventoryEO.setRegulationOwnerId(lawEngineer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//认证工程师
|
||||
if (StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerId())) {
|
||||
String certificationEngineer = projectRelatedPersonnel.getCertificationEngineer();
|
||||
if(StringUtils.isNotEmpty(certificationEngineer)){
|
||||
String[] certificationEngineerArr = certificationEngineer.split(",");
|
||||
if(certificationEngineerArr.length == 1){
|
||||
projectLawsInventoryEO.setHomologationEngineerId(certificationEngineer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//项目接口人
|
||||
if (StringUtils.isEmpty(projectLawsInventoryEO.getEngineeringInterfacePerson())) {
|
||||
String engineeringInterfacePerson = projectRelatedPersonnel.getEngineeringInterfacePerson();
|
||||
if(StringUtils.isNotEmpty(engineeringInterfacePerson)){
|
||||
String[] engineeringInterfacePersonArr = engineeringInterfacePerson.split(",");
|
||||
if(engineeringInterfacePersonArr.length == 1){
|
||||
projectLawsInventoryEO.setEngineeringInterfacePerson(engineeringInterfacePerson);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.baseMapper.updateById(projectLawsInventoryEO);
|
||||
}
|
||||
}else {
|
||||
throw new JeroBootException("当前项目中,未找到相关维护人员信息");
|
||||
}
|
||||
}else {
|
||||
throw new JeroBootException("当前操作用户不是该项目的studio工程师,没有权限操作!");
|
||||
}
|
||||
return new Result<>().success("带入成功!");
|
||||
}
|
||||
}
|
||||
|
||||
+95
@@ -1,15 +1,18 @@
|
||||
package com.jero.modules.project.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
|
||||
import com.jero.modules.project.mapper.ProjectRelatedPersonnelMapper;
|
||||
import com.jero.modules.project.service.IProjectRelatedPersonnelService;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.mapper.SysUserMapper;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
@@ -33,6 +36,9 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
@Autowired
|
||||
private SysUserMapper sysUserMapper;
|
||||
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -219,4 +225,93 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Result<?> queryPersonByProjectId(String projectId,String dutyTerritory) {
|
||||
JSONObject result = new JSONObject();
|
||||
List<Map<String,Object>> lawEngineerList = new ArrayList<>();
|
||||
List<Map<String,Object>> certificationEngineerList = new ArrayList<>();
|
||||
List<Map<String,Object>> engineeringInterfacePersonList = new ArrayList<>();
|
||||
|
||||
QueryWrapper<ProjectRelatedPersonnel> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(ProjectRelatedPersonnel::getProjectId,projectId);
|
||||
queryWrapper.lambda().eq(ProjectRelatedPersonnel::getDutyTerritory,dutyTerritory);
|
||||
List<ProjectRelatedPersonnel> projectRelatedPersonnels = this.baseMapper.selectList(queryWrapper);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(projectRelatedPersonnels)){
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
for (ProjectRelatedPersonnel projectRelatedPersonnel : projectRelatedPersonnels) {
|
||||
if(StringUtils.isNotBlank(projectRelatedPersonnel.getLawEngineer())){
|
||||
String[] lawEngineerArr = projectRelatedPersonnel.getLawEngineer().split(",");
|
||||
for (String lawEngineer : lawEngineerArr) {
|
||||
userIdList.add(lawEngineer);
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(projectRelatedPersonnel.getCertificationEngineer())){
|
||||
String[] certificationEngineerArr = projectRelatedPersonnel.getCertificationEngineer().split(",");
|
||||
for (String certificationEngineer : certificationEngineerArr) {
|
||||
userIdList.add(certificationEngineer);
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(projectRelatedPersonnel.getEngineeringInterfacePerson())){
|
||||
String[] engineeringInterfacePersonArr = projectRelatedPersonnel.getEngineeringInterfacePerson().split(",");
|
||||
for (String engineeringInterfacePerson : engineeringInterfacePersonArr) {
|
||||
userIdList.add(engineeringInterfacePerson);
|
||||
}
|
||||
}
|
||||
}
|
||||
List<SysUser> sysUserList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(userIdList)){
|
||||
sysUserList = sysUserService.querySysUserListByIdList(userIdList);
|
||||
}
|
||||
for (ProjectRelatedPersonnel projectRelatedPersonnel : projectRelatedPersonnels) {
|
||||
if(StringUtils.isNotBlank(projectRelatedPersonnel.getLawEngineer())){
|
||||
String[] lawEngineerArr = projectRelatedPersonnel.getLawEngineer().split(",");
|
||||
for (String lawEngineer : lawEngineerArr) {
|
||||
for (SysUser sysUser : sysUserList) {
|
||||
if(StringUtils.equals(lawEngineer,sysUser.getId())){
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("name",sysUser.getRealname());
|
||||
map.put("value",sysUser.getId());
|
||||
lawEngineerList.add(map);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if(StringUtils.isNotBlank(projectRelatedPersonnel.getCertificationEngineer())){
|
||||
String[] certificationEngineerArr = projectRelatedPersonnel.getCertificationEngineer().split(",");
|
||||
for (String certificationEngineer : certificationEngineerArr) {
|
||||
for (SysUser sysUser : sysUserList) {
|
||||
if(StringUtils.equals(certificationEngineer,sysUser.getId())){
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("name",sysUser.getRealname());
|
||||
map.put("value",sysUser.getId());
|
||||
certificationEngineerList.add(map);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(projectRelatedPersonnel.getEngineeringInterfacePerson())){
|
||||
String[] engineeringInterfacePersonArr = projectRelatedPersonnel.getEngineeringInterfacePerson().split(",");
|
||||
for (String engineeringInterfacePerson : engineeringInterfacePersonArr) {
|
||||
for (SysUser sysUser : sysUserList) {
|
||||
if(StringUtils.equals(engineeringInterfacePerson,sysUser.getId())){
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("name",sysUser.getRealname());
|
||||
map.put("value",sysUser.getId());
|
||||
engineeringInterfacePersonList.add(map);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
result.put("lawEngineerList",lawEngineerList);
|
||||
result.put("certificationEngineerList",certificationEngineerList);
|
||||
result.put("engineeringInterfacePersonList",engineeringInterfacePersonList);
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -675,5 +675,11 @@ module.exports = {
|
||||
basicInformationOfParameters:'Basic information of parameters',
|
||||
regulatoryCertificationTaskPlan:'Regulatory / certification task plan',
|
||||
bringInRelevantPersonnel:'Bring in relevant personnel',
|
||||
confirmBringInRelevantPersonnel:'confirm Bring in relevant personnel'
|
||||
confirmBringInRelevantPersonnel:'confirm Bring in relevant personnel',
|
||||
problemType:'Problem type',
|
||||
projectDetails:'Project details',
|
||||
listOfRegulations:'List of regulations',
|
||||
taskList:'Task list',
|
||||
TaskParameterCollection:'Task parameter collection',
|
||||
nonConformance:'Non conformance',
|
||||
}
|
||||
@@ -680,5 +680,10 @@ module.exports = {
|
||||
regulatoryCertificationTaskPlan:'法规/认证任务计划',
|
||||
bringInRelevantPersonnel:'带入相关人员',
|
||||
confirmBringInRelevantPersonnel:'确认带入相关人员?',
|
||||
|
||||
problemType:'问题类型',
|
||||
projectDetails:'项目详情',
|
||||
listOfRegulations:'法规清单',
|
||||
taskList:'任务清单',
|
||||
TaskParameterCollection:'任务参数收集',
|
||||
nonConformance:'未符合项',
|
||||
}
|
||||
@@ -10,28 +10,28 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 67px 0 0 0;background: #fff;height:100%">
|
||||
<div style="padding: 67px 0 0 0;background: #ffffff;height:100%">
|
||||
<div class="detail-content" style="height: 100%">
|
||||
<div class="Virtual-detail-left">
|
||||
<div class="Virtual-detail-left-text" @click="textClick(0,'项目详情')">
|
||||
<div class="Virtual-detail-left-text" :title="$t('projectDetails')" @click="textClick(0,'项目详情')">
|
||||
<a-icon type="container"/>
|
||||
项目详情
|
||||
{{$t('projectDetails')}}
|
||||
</div>
|
||||
<div class="Virtual-detail-left-text" @click="textClick(1,'法规清单')">
|
||||
<div class="Virtual-detail-left-text" :title="$t('listOfRegulations')" @click="textClick(1,'法规清单')">
|
||||
<a-icon type="container"/>
|
||||
法规清单
|
||||
{{$t('listOfRegulations')}}
|
||||
</div>
|
||||
<div class="Virtual-detail-left-text" @click="textClick(2,'任务清单')">
|
||||
<div class="Virtual-detail-left-text" :title="$t('taskList')" @click="textClick(2,'任务清单')">
|
||||
<a-icon type="container"/>
|
||||
任务清单
|
||||
{{$t('taskList')}}
|
||||
</div>
|
||||
<div class="Virtual-detail-left-text" @click="textClick(3,'任务参数收集')">
|
||||
<div class="Virtual-detail-left-text" :title="$t('TaskParameterCollection')" @click="textClick(3,'任务参数收集')">
|
||||
<a-icon type="container"/>
|
||||
任务参数收集
|
||||
{{$t('TaskParameterCollection')}}
|
||||
</div>
|
||||
<div class="Virtual-detail-left-text" @click="textClick(4,'未符合项')">
|
||||
<div class="Virtual-detail-left-text" :title="$t('nonConformance')" @click="textClick(4,'未符合项')">
|
||||
<a-icon type="container"/>
|
||||
未符合项
|
||||
{{$t('nonConformance')}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="Virtual-detail-right">
|
||||
@@ -39,6 +39,7 @@
|
||||
<listOfRegulations v-else-if="textTitle === '法规清单'"/>
|
||||
<TaskList v-else-if="textTitle === '任务清单'"/>
|
||||
<TaskParameterCollection v-else-if="textTitle === '任务参数收集'"/>
|
||||
<nonConformance v-else-if="textTitle === '未符合项'"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -50,6 +51,7 @@
|
||||
import listOfRegulations from '../components/listOfRegulations'
|
||||
import ProjectDetailsName from '../components/ProjectDetails'
|
||||
import TaskParameterCollection from '../components/TaskParameterCollection'
|
||||
import nonConformance from '../components/nonConformance'
|
||||
|
||||
export default {
|
||||
name: 'ProjectDetails',
|
||||
@@ -57,11 +59,12 @@
|
||||
TaskList,
|
||||
listOfRegulations,
|
||||
ProjectDetailsName,
|
||||
TaskParameterCollection
|
||||
TaskParameterCollection,
|
||||
nonConformance
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '项目详情',
|
||||
title: this.$t('projectDetails'),
|
||||
textTitle: '项目详情'
|
||||
}
|
||||
},
|
||||
@@ -139,6 +142,9 @@
|
||||
.Virtual-detail-left-text {
|
||||
padding: 2px 12px;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,192 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('standard')">
|
||||
<span>{{$t('standard')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
||||
v-model="queryParam.serialNumber"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('title')">
|
||||
<span>{{$t('title')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
||||
v-model="queryParam.title"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" style="width: 64px" :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="'region'"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
<a-col :md="6" :sm="24">
|
||||
<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-col>
|
||||
</span>
|
||||
</a-row>
|
||||
</div>
|
||||
<div>
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
:loading="loading"
|
||||
:pagination="false"
|
||||
:scroll="{x: true}"
|
||||
:data-source="dataSource"
|
||||
:columns="columns"
|
||||
>
|
||||
</a-table>
|
||||
</div>
|
||||
<div class="page">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
:total="total"
|
||||
@change="pageOnChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'nonConformance',
|
||||
data() {
|
||||
return {
|
||||
queryParam: {},
|
||||
loading: false,
|
||||
dataSource: [],
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('standard'),
|
||||
align: 'center',
|
||||
dataIndex: 'serialNumber'
|
||||
},
|
||||
{
|
||||
title: this.$t('title'),
|
||||
align: 'center',
|
||||
dataIndex: 'title'
|
||||
},
|
||||
{
|
||||
title: this.$t('ProcessType'),
|
||||
align: 'center',
|
||||
dataIndex: 'ProcessType'
|
||||
},
|
||||
{
|
||||
title: this.$t('areaOfResponsibility'),
|
||||
align: 'center',
|
||||
dataIndex: 'dutyTerritory_dictText'
|
||||
},
|
||||
{
|
||||
title: this.$t('problemType'),
|
||||
align: 'center',
|
||||
dataIndex: 'problemType'
|
||||
},
|
||||
{
|
||||
title: this.$t('problemType'),
|
||||
align: 'center',
|
||||
dataIndex: 'problemType'
|
||||
},
|
||||
{
|
||||
title: this.$t('Sponsor'),
|
||||
align: 'center',
|
||||
dataIndex: 'Sponsor'
|
||||
},
|
||||
{
|
||||
title: this.$t('personLiable'),
|
||||
align: 'center',
|
||||
dataIndex: 'personLiable'
|
||||
}
|
||||
],
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
url: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
searchReset() {
|
||||
this.pageNo = 1
|
||||
this.queryParam = {}
|
||||
this.getList()
|
||||
},
|
||||
pageOnChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.getList()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 32px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
margin-top: 3px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
width: 70%;
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.box-button {
|
||||
height: 38px;
|
||||
/*margin-top: 2px;*/
|
||||
}
|
||||
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user