定版--历史版本(详情)
This commit is contained in:
+133
-40
@@ -1,21 +1,20 @@
|
||||
package com.jero.modules.project.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
@@ -41,6 +40,9 @@ public class ProjectVersionInfoEO implements Serializable {
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
@TableField(exist = false)
|
||||
private java.lang.String cut;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@@ -62,178 +64,269 @@ public class ProjectVersionInfoEO implements Serializable {
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**法规清单版本id*/
|
||||
@Excel(name = "法规清单版本id", width = 15)
|
||||
@ApiModelProperty(value = "法规清单版本id")
|
||||
private java.lang.String historyVersionsId;
|
||||
|
||||
/**项目库id*/
|
||||
@Excel(name = "项目库id", width = 15)
|
||||
@ApiModelProperty(value = "项目库id")
|
||||
private java.lang.String projectLibraryId;
|
||||
|
||||
/**编号*/
|
||||
@Excel(name = "编号", width = 15)
|
||||
@ApiModelProperty(value = "编号")
|
||||
private java.lang.String serialNumber;
|
||||
|
||||
/**标题*/
|
||||
@Excel(name = "标题", width = 15)
|
||||
@ApiModelProperty(value = "标题")
|
||||
private java.lang.String title;
|
||||
|
||||
/**子标题*/
|
||||
@Excel(name = "子标题", width = 15)
|
||||
@ApiModelProperty(value = "子标题")
|
||||
private java.lang.String subtitle;
|
||||
|
||||
/**对应标准*/
|
||||
@Excel(name = "对应标准", width = 15)
|
||||
@ApiModelProperty(value = "对应标准")
|
||||
private java.lang.String correspondingStandard;
|
||||
|
||||
/**实施类别*/
|
||||
@Excel(name = "实施类别", width = 15)
|
||||
@ApiModelProperty(value = "实施类别")
|
||||
@Dict(dicCode ="implement_type")
|
||||
private java.lang.String implementType;
|
||||
|
||||
/**新车型实施日期*/
|
||||
@Excel(name = "新车型实施日期", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "新车型实施日期")
|
||||
private java.util.Date xin1Che1Xing2Shi2Shi1Ri4Qi1;
|
||||
|
||||
/**在产车实施日期*/
|
||||
@Excel(name = "在产车实施日期", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "在产车实施日期")
|
||||
private java.util.Date implementTime;
|
||||
|
||||
/**认证类型*/
|
||||
@Excel(name = "认证类型", width = 15)
|
||||
@ApiModelProperty(value = "认证类型")
|
||||
@Dict(dicCode ="attestation_type")
|
||||
private java.lang.String attestationType;
|
||||
|
||||
/**认证级别*/
|
||||
@Excel(name = "认证级别", width = 15)
|
||||
@ApiModelProperty(value = "认证级别")
|
||||
@Dict(dicCode ="attestation_rank")
|
||||
private java.lang.String attestationRank;
|
||||
|
||||
/**WVTA ID*/
|
||||
@Excel(name = "WVTA ID", width = 15)
|
||||
@ApiModelProperty(value = "WVTA ID")
|
||||
private java.lang.String wvtaId;
|
||||
|
||||
/**责任领域*/
|
||||
@Excel(name = "责任领域", width = 15)
|
||||
@ApiModelProperty(value = "责任领域")
|
||||
@Dict(dicCode ="duty_territory")
|
||||
private java.lang.String dutyTerritory;
|
||||
|
||||
/**法规工程师*/
|
||||
@Excel(name = "法规工程师", width = 15)
|
||||
@ApiModelProperty(value = "法规工程师")
|
||||
private java.lang.String regulationOwnerId;
|
||||
|
||||
/**认证工程师*/
|
||||
@Excel(name = "认证工程师", width = 15)
|
||||
@ApiModelProperty(value = "认证工程师")
|
||||
private java.lang.String homologationEngineerId;
|
||||
|
||||
/**工程接口人*/
|
||||
@Excel(name = "工程接口人", width = 15)
|
||||
@ApiModelProperty(value = "工程接口人")
|
||||
private java.lang.String engineeringInterfacePerson;
|
||||
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
private java.lang.String remark;
|
||||
|
||||
/**设计符合性确认-交付物类型*/
|
||||
@Excel(name = "设计符合性确认-交付物类型", width = 15)
|
||||
@ApiModelProperty(value = "设计符合性确认-交付物类型")
|
||||
@Dict(dicCode ="deliverable_template")
|
||||
private java.lang.String designDeliverableType;
|
||||
|
||||
/**设计符合性确认-交付物模板*/
|
||||
@Excel(name = "设计符合性确认-交付物模板", width = 15)
|
||||
@ApiModelProperty(value = "设计符合性确认-交付物模板")
|
||||
private java.lang.String designDeliverableTemplate;
|
||||
|
||||
/**设计符合性确认-发起人*/
|
||||
@Excel(name = "设计符合性确认-发起人", width = 15)
|
||||
@ApiModelProperty(value = "设计符合性确认-发起人")
|
||||
@Dict(dicCode ="fa1_qi3_ren2")
|
||||
private java.lang.String designInitiator;
|
||||
|
||||
|
||||
/**设计符合性确认-责任人*/
|
||||
@Excel(name = "设计符合性确认-责任人", width = 15)
|
||||
@ApiModelProperty(value = "设计符合性确认-责任人")
|
||||
@Dict(dicCode ="ze2_ren4_ren2")
|
||||
private java.lang.String designDuty;
|
||||
|
||||
/**设计符合性确认-截止时间*/
|
||||
@Excel(name = "设计符合性确认-截止时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "设计符合性确认-截止时间")
|
||||
private java.util.Date designDueDate;
|
||||
|
||||
/**prehomo确认-交付物类型*/
|
||||
@Excel(name = "prehomo确认-交付物类型", width = 15)
|
||||
@ApiModelProperty(value = "prehomo确认-交付物类型")
|
||||
@Dict(dicCode ="deliverable_template")
|
||||
private java.lang.String prehomoDeliverableType;
|
||||
|
||||
/**prehomo确认-交付物模板*/
|
||||
@Excel(name = "prehomo确认-交付物模板", width = 15)
|
||||
@ApiModelProperty(value = "prehomo确认-交付物模板")
|
||||
private java.lang.String prehomoDeliverableTemplate;
|
||||
|
||||
/**prehomo确认-发起人*/
|
||||
@Excel(name = "prehomo确认-发起人", width = 15)
|
||||
@ApiModelProperty(value = "prehomo确认-发起人")
|
||||
@Dict(dicCode ="fa1_qi3_ren2")
|
||||
private java.lang.String prehomoInitiator;
|
||||
|
||||
/**prehomo确认-责任人*/
|
||||
@Excel(name = "prehomo确认-责任人", width = 15)
|
||||
@ApiModelProperty(value = "prehomo确认-责任人")
|
||||
@Dict(dicCode ="ze2_ren4_ren2")
|
||||
private java.lang.String prehomoDuty;
|
||||
|
||||
/**prehomo确认-截止时间*/
|
||||
@Excel(name = "prehomo确认-截止时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "prehomo确认-截止时间")
|
||||
private java.util.Date prehomoDueDate;
|
||||
|
||||
/**验证符合性确认-交付物类型*/
|
||||
@Excel(name = "验证符合性确认-交付物类型", width = 15)
|
||||
@ApiModelProperty(value = "验证符合性确认-交付物类型")
|
||||
@Dict(dicCode ="deliverable_template")
|
||||
private java.lang.String verifyDeliverableType;
|
||||
|
||||
/**验证符合性确认-交付物模板*/
|
||||
@Excel(name = "验证符合性确认-交付物模板", width = 15)
|
||||
@ApiModelProperty(value = "验证符合性确认-交付物模板")
|
||||
private java.lang.String verifyDeliverableTemplate;
|
||||
|
||||
/**验证符合性确认-发起人*/
|
||||
@Excel(name = "验证符合性确认-发起人", width = 15)
|
||||
@ApiModelProperty(value = "验证符合性确认-发起人")
|
||||
@Dict(dicCode ="fa1_qi3_ren2")
|
||||
private java.lang.String verifyInitiator;
|
||||
|
||||
/**验证符合性确认-责任人*/
|
||||
@Excel(name = "验证符合性确认-责任人", width = 15)
|
||||
@ApiModelProperty(value = "验证符合性确认-责任人")
|
||||
@Dict(dicCode ="ze2_ren4_ren2")
|
||||
private java.lang.String verifyDuty;
|
||||
|
||||
/**验证符合性确认-截止时间*/
|
||||
@Excel(name = "验证符合性确认-截止时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "验证符合性确认-截止时间")
|
||||
private java.util.Date verifyDueDate;
|
||||
|
||||
/**任务发布状态*/
|
||||
@Excel(name = "任务发布状态", width = 15)
|
||||
@ApiModelProperty(value = "任务发布状态")
|
||||
private java.lang.String taskReleaseStatus;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String designDeliverableTypeName;
|
||||
@TableField(exist = false)
|
||||
private String prehomoDeliverableTypeName;
|
||||
@TableField(exist = false)
|
||||
private String verifyDeliverableTypeName;
|
||||
|
||||
|
||||
/**设计符合性确认-发起人id*/
|
||||
@ApiModelProperty(value = "设计符合性确认-发起人id")
|
||||
private String designInitiatorId;
|
||||
|
||||
/**设计符合性确认-责任人id*/
|
||||
@ApiModelProperty(value = "设计符合性确认-责任人id")
|
||||
private String designDutyId;
|
||||
|
||||
|
||||
/**prehomo确认-发起人id*/
|
||||
@ApiModelProperty(value = "prehomo确认-发起人id")
|
||||
private String prehomoInitiatorId;
|
||||
|
||||
/**prehomo确认-责任人id*/
|
||||
@ApiModelProperty(value = "prehomo确认-责任人id")
|
||||
private String prehomoDutyId;
|
||||
|
||||
/**验证符合性确认-发起人id*/
|
||||
@ApiModelProperty(value = "验证符合性确认-发起人id")
|
||||
private String verifyInitiatorId;
|
||||
|
||||
/**验证符合性确认-责任人id*/
|
||||
@ApiModelProperty(value = "验证符合性确认-责任人id")
|
||||
private String verifyDutyId;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "认证工程师名称")
|
||||
private String homologationEngineerName;//认证工程师名称
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "法规工程师名称")
|
||||
private String regulationOwnerName;//法规工程师名称
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "工程接口人名称")
|
||||
private String engineeringInterfacePersonName;//工程接口人名称
|
||||
|
||||
/**设计符合性确认-发起人名称*/
|
||||
@TableField(exist = false)
|
||||
private String designInitiatorName;
|
||||
|
||||
/**设计符合性确认-责任人名称*/
|
||||
@TableField(exist = false)
|
||||
private String designDutyName;
|
||||
|
||||
|
||||
/**prehomo确认-发起人名称*/
|
||||
@TableField(exist = false)
|
||||
private String prehomoInitiatorName;
|
||||
|
||||
/**prehomo确认-责任人名称*/
|
||||
@TableField(exist = false)
|
||||
private String prehomoDutyName;
|
||||
|
||||
/**验证符合性确认-发起人名称*/
|
||||
@TableField(exist = false)
|
||||
private String verifyInitiatorName;
|
||||
|
||||
/**验证符合性确认-责任人名称*/
|
||||
@TableField(exist = false)
|
||||
private String verifyDutyName;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**清单确认状态*/
|
||||
@ApiModelProperty(value = "清单确认状态")
|
||||
private String inventoryAffirmStatus;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "清单确认状态名称")
|
||||
private String inventoryAffirmStatusName;//清单确认状态名称
|
||||
|
||||
|
||||
/**任务确认状态*/
|
||||
@ApiModelProperty(value = "任务确认状态")
|
||||
private String taskAffirmStatus;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "任务发布状态名称")
|
||||
private String taskAffirmStatusName;//任务发布状态名称
|
||||
|
||||
/**设计符合性确认-交付物模板名称*/
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "设计符合性确认-交付物模板", width = 20)
|
||||
private String designDeliverableTemplateName;
|
||||
|
||||
/**prehomo确认-交付物模板名称*/
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "prehomo确认-交付物模板", width = 20)
|
||||
private String prehomoDeliverableTemplateName;
|
||||
|
||||
/**验证符合性确认-交付物模板名称*/
|
||||
@Excel(name = "验证符合性确认-交付物模板", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String verifyDeliverableTemplateName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+9
@@ -41,5 +41,14 @@
|
||||
<result column="verify_duty" property="verifyDuty" />
|
||||
<result column="verify_due_date" property="verifyDueDate" />
|
||||
<result column="task_release_status" property="taskReleaseStatus" />
|
||||
|
||||
<result column="design_initiator_id" property="designInitiatorId" />
|
||||
<result column="design_duty_id" property="designDutyId" />
|
||||
<result column="prehomo_initiator_id" property="prehomoInitiatorId" />
|
||||
<result column="prehomo_duty_id" property="prehomoDutyId" />
|
||||
<result column="verify_initiator_id" property="verifyInitiatorId" />
|
||||
<result column="verify_duty_id" property="verifyDutyId" />
|
||||
<result column="task_affirm_status" property="taskAffirmStatus" />
|
||||
<result column="inventory_affirm_status" property="inventoryAffirmStatus" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
|
||||
+276
-3
@@ -1,16 +1,30 @@
|
||||
package com.jero.modules.project.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.project.entity.ProjectVersionInfoEO;
|
||||
import com.jero.modules.project.enums.InventoryAffirmStatusEnum;
|
||||
import com.jero.modules.project.mapper.ProjectVersionInfoEOMapper;
|
||||
import com.jero.modules.project.service.IProjectVersionInfoEOService;
|
||||
import com.jero.modules.system.entity.SysCategory;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.mapper.SysUserMapper;
|
||||
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 法规清单定板详情表
|
||||
@@ -21,6 +35,10 @@ import javax.servlet.http.HttpServletRequest;
|
||||
@Service
|
||||
public class ProjectVersionInfoEOServiceImpl extends ServiceImpl<ProjectVersionInfoEOMapper, ProjectVersionInfoEO> implements IProjectVersionInfoEOService {
|
||||
|
||||
@Autowired
|
||||
private SysCategoryServiceImpl sysCategoryService;
|
||||
@Autowired
|
||||
private SysUserMapper sysUserMapper;
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -35,6 +53,9 @@ public class ProjectVersionInfoEOServiceImpl extends ServiceImpl<ProjectVersionI
|
||||
save(projectVersionInfoEO);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private IOSSFileService iOSSFileService;
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
@@ -96,6 +117,258 @@ public class ProjectVersionInfoEOServiceImpl extends ServiceImpl<ProjectVersionI
|
||||
QueryWrapper<ProjectVersionInfoEO> queryWrapper = QueryGenerator.initQueryWrapper(projectVersionInfoEO, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
List<ProjectVersionInfoEO> projectVersionInfoEOS = this.list(queryWrapper);
|
||||
//数据转换
|
||||
if(projectVersionInfoEOS.size() != 0){
|
||||
dataDispose(projectVersionInfoEOS,projectVersionInfoEO.getCut());
|
||||
}
|
||||
return projectVersionInfoEOS;
|
||||
}
|
||||
|
||||
public void dataDispose(List<ProjectVersionInfoEO> projectVersionInfoEOS,String cut){
|
||||
//树形结构数据字典(技术领域)
|
||||
List<SysCategory> categoryList = sysCategoryService.list();
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
List<String> deliverableList = new ArrayList<>();
|
||||
for (ProjectVersionInfoEO projectVersionInfoEO : projectVersionInfoEOS) {
|
||||
//处理交付物类型
|
||||
String designDeliverableType = projectVersionInfoEO.getDesignDeliverableType();
|
||||
String prehomoDeliverableType = projectVersionInfoEO.getPrehomoDeliverableType();
|
||||
String verifyDeliverableType = projectVersionInfoEO.getVerifyDeliverableType();
|
||||
//设计交付物类型
|
||||
if(StringUtils.isNotBlank(designDeliverableType)){
|
||||
List<String> designDeliverableTypeList = Arrays.asList(designDeliverableType.split(","));
|
||||
String name = getTreeName(cut, categoryList, designDeliverableTypeList);
|
||||
projectVersionInfoEO.setDesignDeliverableTypeName(name);
|
||||
}
|
||||
//pre交付物类型
|
||||
if(StringUtils.isNotBlank(prehomoDeliverableType)){
|
||||
List<String> prehomoDeliverableTypeList = Arrays.asList(prehomoDeliverableType.split(","));
|
||||
String name = getTreeName(cut, categoryList, prehomoDeliverableTypeList);
|
||||
projectVersionInfoEO.setPrehomoDeliverableTypeName(name);
|
||||
}
|
||||
//验证交付物类型
|
||||
if(StringUtils.isNotBlank(verifyDeliverableType)){
|
||||
List<String> verifyDeliverableTypeList = Arrays.asList(verifyDeliverableType.split(","));
|
||||
String name = getTreeName(cut, categoryList, verifyDeliverableTypeList);
|
||||
projectVersionInfoEO.setVerifyDeliverableTypeName(name);
|
||||
}
|
||||
//认证工程师id
|
||||
if(StringUtils.isNotEmpty(projectVersionInfoEO.getHomologationEngineerId())){
|
||||
userIdList.add(projectVersionInfoEO.getHomologationEngineerId());
|
||||
}
|
||||
//法规工程师id
|
||||
if(StringUtils.isNotEmpty(projectVersionInfoEO.getRegulationOwnerId())){
|
||||
userIdList.add(projectVersionInfoEO.getRegulationOwnerId());
|
||||
}
|
||||
//工程接口人id
|
||||
if(StringUtils.isNotEmpty(projectVersionInfoEO.getEngineeringInterfacePerson())){
|
||||
userIdList.add(projectVersionInfoEO.getEngineeringInterfacePerson());
|
||||
}
|
||||
|
||||
//设计符合性确认
|
||||
//发起人
|
||||
if(StringUtils.isNotEmpty(projectVersionInfoEO.getDesignInitiatorId())){
|
||||
userIdList.add(projectVersionInfoEO.getDesignInitiatorId());
|
||||
}
|
||||
//责任人
|
||||
if(StringUtils.isNotEmpty(projectVersionInfoEO.getDesignDutyId())){
|
||||
userIdList.add(projectVersionInfoEO.getDesignDutyId());
|
||||
}
|
||||
|
||||
//prehomo确认
|
||||
//发起人
|
||||
if(StringUtils.isNotEmpty(projectVersionInfoEO.getPrehomoInitiatorId())){
|
||||
userIdList.add(projectVersionInfoEO.getPrehomoInitiatorId());
|
||||
}
|
||||
//责任人
|
||||
if(StringUtils.isNotEmpty(projectVersionInfoEO.getPrehomoDutyId())){
|
||||
userIdList.add(projectVersionInfoEO.getPrehomoDutyId());
|
||||
}
|
||||
|
||||
//验证符合性确认
|
||||
//发起人
|
||||
if(StringUtils.isNotEmpty(projectVersionInfoEO.getVerifyInitiatorId())){
|
||||
userIdList.add(projectVersionInfoEO.getVerifyInitiatorId());
|
||||
}
|
||||
//责任人
|
||||
if(StringUtils.isNotEmpty(projectVersionInfoEO.getVerifyDutyId())){
|
||||
userIdList.add(projectVersionInfoEO.getVerifyDutyId());
|
||||
}
|
||||
|
||||
//设计符合性确认交付物模板
|
||||
if(StringUtils.isNotBlank(projectVersionInfoEO.getDesignDeliverableTemplate())){
|
||||
deliverableList.addAll(Arrays.asList(projectVersionInfoEO.getDesignDeliverableTemplate().split(",")));
|
||||
}
|
||||
// Prehomo确认交付物模板
|
||||
if(StringUtils.isNotBlank(projectVersionInfoEO.getPrehomoDeliverableTemplate())){
|
||||
deliverableList.addAll(Arrays.asList(projectVersionInfoEO.getPrehomoDeliverableTemplate().split(",")));
|
||||
}
|
||||
// 验证符合性确认交付物模板
|
||||
if(StringUtils.isNotBlank(projectVersionInfoEO.getVerifyDeliverableTemplate())){
|
||||
deliverableList.addAll(Arrays.asList(projectVersionInfoEO.getVerifyDeliverableTemplate().split(",")));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
List<SysUser> sysUsers = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(userIdList)){
|
||||
userIdList = userIdList.stream().distinct().collect(Collectors.toList());
|
||||
QueryWrapper<SysUser> sysUserQueryWrapper = new QueryWrapper<>();
|
||||
sysUserQueryWrapper.lambda().in(SysUser::getId,userIdList);
|
||||
sysUsers = sysUserMapper.selectList(sysUserQueryWrapper);
|
||||
}
|
||||
|
||||
//文件
|
||||
List<OSSFile> fileInfos = new ArrayList<>();
|
||||
if(deliverableList.size() != 0){
|
||||
fileInfos = iOSSFileService.getFileInfos(org.apache.commons.lang3.StringUtils.join(deliverableList, ","));
|
||||
}
|
||||
|
||||
for (ProjectVersionInfoEO projectVersionInfoEO : projectVersionInfoEOS) {
|
||||
//处理人员展示名称
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
String homologationEngineerId = projectVersionInfoEO.getHomologationEngineerId();
|
||||
if(StringUtils.isNotEmpty(homologationEngineerId)){
|
||||
String homologationEngineerName = sysUsers.stream().filter(e -> homologationEngineerId.equals(e.getId())).
|
||||
map(SysUser::getUsername).collect(Collectors.joining(","));
|
||||
projectVersionInfoEO.setHomologationEngineerName(homologationEngineerName);
|
||||
}
|
||||
String regulationOwnerId = projectVersionInfoEO.getRegulationOwnerId();
|
||||
if(StringUtils.isNotEmpty(regulationOwnerId)){
|
||||
String regulationOwnerName = sysUsers.stream().filter(e -> regulationOwnerId.equals(e.getId())).
|
||||
map(SysUser::getUsername).collect(Collectors.joining(","));
|
||||
projectVersionInfoEO.setRegulationOwnerName(regulationOwnerName);
|
||||
}
|
||||
String engineeringInterfacePerson = projectVersionInfoEO.getEngineeringInterfacePerson();
|
||||
if(StringUtils.isNotEmpty(engineeringInterfacePerson)){
|
||||
String engineeringInterfacePersonName = sysUsers.stream().filter(e -> engineeringInterfacePerson.equals(e.getId())).
|
||||
map(SysUser::getUsername).collect(Collectors.joining(","));
|
||||
projectVersionInfoEO.setEngineeringInterfacePersonName(engineeringInterfacePersonName);
|
||||
}
|
||||
|
||||
//设计符合性确认
|
||||
//发起人
|
||||
String designInitiatorId = projectVersionInfoEO.getDesignInitiatorId();
|
||||
if(StringUtils.isNotEmpty(designInitiatorId)){
|
||||
String designInitiatorName = sysUsers.stream().filter(e -> designInitiatorId.equals(e.getId())).
|
||||
map(SysUser::getUsername).collect(Collectors.joining(","));
|
||||
projectVersionInfoEO.setDesignInitiatorName(designInitiatorName);
|
||||
}
|
||||
//责任人
|
||||
String designDutyId = projectVersionInfoEO.getDesignDutyId();
|
||||
if(StringUtils.isNotEmpty(designDutyId)){
|
||||
String designDutyName = sysUsers.stream().filter(e -> designDutyId.equals(e.getId())).
|
||||
map(SysUser::getUsername).collect(Collectors.joining(","));
|
||||
projectVersionInfoEO.setDesignDutyName(designDutyName);
|
||||
}
|
||||
|
||||
//prehomo确认
|
||||
//发起人
|
||||
String prehomoInitiatorId = projectVersionInfoEO.getPrehomoInitiatorId();
|
||||
if(StringUtils.isNotEmpty(prehomoInitiatorId)){
|
||||
String prehomoInitiatorName = sysUsers.stream().filter(e -> prehomoInitiatorId.equals(e.getId())).
|
||||
map(SysUser::getUsername).collect(Collectors.joining(","));
|
||||
projectVersionInfoEO.setPrehomoInitiatorName(prehomoInitiatorName);
|
||||
}
|
||||
//责任人
|
||||
String prehomoDutyId = projectVersionInfoEO.getPrehomoDutyId();
|
||||
if(StringUtils.isNotEmpty(prehomoDutyId)){
|
||||
String prehomoDutyName = sysUsers.stream().filter(e -> prehomoDutyId.equals(e.getId())).
|
||||
map(SysUser::getUsername).collect(Collectors.joining(","));
|
||||
projectVersionInfoEO.setPrehomoDutyName(prehomoDutyName);
|
||||
}
|
||||
|
||||
//验证符合性确认
|
||||
//发起人
|
||||
String verifyInitiatorId = projectVersionInfoEO.getVerifyInitiatorId();
|
||||
if(StringUtils.isNotEmpty(verifyInitiatorId)){
|
||||
String verifyInitiatorName = sysUsers.stream().filter(e -> verifyInitiatorId.equals(e.getId())).
|
||||
map(SysUser::getUsername).collect(Collectors.joining(","));
|
||||
projectVersionInfoEO.setVerifyInitiatorName(verifyInitiatorName);
|
||||
}
|
||||
//责任人
|
||||
String verifyDutyId = projectVersionInfoEO.getVerifyDutyId();
|
||||
if(StringUtils.isNotEmpty(verifyDutyId)){
|
||||
String verifyDutyName = sysUsers.stream().filter(e -> verifyDutyId.equals(e.getId())).
|
||||
map(SysUser::getUsername).collect(Collectors.joining(","));
|
||||
projectVersionInfoEO.setVerifyDutyName(verifyDutyName);
|
||||
}
|
||||
}
|
||||
|
||||
//清单确认状态
|
||||
String inventoryAffirmStatus = projectVersionInfoEO.getInventoryAffirmStatus();
|
||||
if(StringUtils.isNotEmpty(inventoryAffirmStatus)){
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
projectVersionInfoEO.setInventoryAffirmStatusName(InventoryAffirmStatusEnum.getTextByValue(inventoryAffirmStatus));
|
||||
}else {
|
||||
projectVersionInfoEO.setInventoryAffirmStatusName(inventoryAffirmStatus);
|
||||
}
|
||||
|
||||
}
|
||||
//任务确认状态
|
||||
String taskAffirmStatus = projectVersionInfoEO.getTaskAffirmStatus();
|
||||
if(StringUtils.isNotEmpty(taskAffirmStatus)){
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
projectVersionInfoEO.setTaskAffirmStatusName(InventoryAffirmStatusEnum.getTextByValue(taskAffirmStatus));
|
||||
}else {
|
||||
projectVersionInfoEO.setTaskAffirmStatusName(taskAffirmStatus);
|
||||
}
|
||||
}
|
||||
|
||||
//交付物类型模板
|
||||
if(fileInfos.size() != 0){
|
||||
if(StringUtils.isNotBlank(projectVersionInfoEO.getDesignDeliverableTemplate())){
|
||||
String fileName = getFileName(projectVersionInfoEO, fileInfos,projectVersionInfoEO.getDesignDeliverableTemplate());
|
||||
if(org.apache.commons.lang3.StringUtils.isNotBlank(fileName)){
|
||||
projectVersionInfoEO.setDesignDeliverableTemplateName(fileName);
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(projectVersionInfoEO.getPrehomoDeliverableTemplate())){
|
||||
String fileName = getFileName(projectVersionInfoEO, fileInfos,projectVersionInfoEO.getPrehomoDeliverableTemplate());
|
||||
if(org.apache.commons.lang3.StringUtils.isNotBlank(fileName)){
|
||||
projectVersionInfoEO.setPrehomoDeliverableTemplateName(fileName);
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(projectVersionInfoEO.getVerifyDeliverableTemplate())){
|
||||
String fileName = getFileName(projectVersionInfoEO, fileInfos,projectVersionInfoEO.getVerifyDeliverableTemplate());
|
||||
if(org.apache.commons.lang3.StringUtils.isNotBlank(fileName)){
|
||||
projectVersionInfoEO.setVerifyDeliverableTemplateName(fileName);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private String getTreeName(String cut, List<SysCategory> categoryList, List<String> technologyTerritoryList) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String technologyTerritory : technologyTerritoryList) {
|
||||
List<SysCategory> collect = categoryList.stream().filter(e -> technologyTerritory.equals(e.getId())).collect(Collectors.toList());
|
||||
if(collect.size() != 0){
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
sb.append(collect.get(0).getName() + ",");
|
||||
} else {
|
||||
sb.append(collect.get(0).getEnName()+ ",");
|
||||
}
|
||||
}
|
||||
}
|
||||
String technologyTerritoryName = "";
|
||||
if (StringUtils.isNotBlank(sb)) {
|
||||
technologyTerritoryName = sb.substring(0, sb.length() - 1);
|
||||
}
|
||||
return technologyTerritoryName;
|
||||
}
|
||||
private String getFileName(ProjectVersionInfoEO projectVersionInfoEO, List<OSSFile> fileInfos, String deliverableTemplate){
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String s : deliverableTemplate.split(",")) {
|
||||
List<OSSFile> collect = fileInfos.stream().filter(e -> s.equals(e.getId())).collect(Collectors.toList());
|
||||
if(collect.size() != 0){
|
||||
sb.append(collect.get(0).getFileName() + ",");
|
||||
}
|
||||
}
|
||||
String sbStr = "";
|
||||
if(org.apache.commons.lang3.StringUtils.isNotBlank(sb)){
|
||||
sbStr = sb.substring(0, sb.length() - 1);
|
||||
}
|
||||
return sbStr;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user