法规清单--导出(英文)
This commit is contained in:
+414
@@ -0,0 +1,414 @@
|
||||
package com.jero.modules.project.entity;
|
||||
|
||||
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 com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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 org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 项目库-法规清单表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-04-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("project_laws_inventory")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="project_laws_inventory对象", description="项目库-法规清单表")
|
||||
public class ProjectLawsInventoryEOEn implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
/**项目库id*/
|
||||
@ApiModelProperty(value = "项目库id")
|
||||
private String projectLibraryId;
|
||||
|
||||
/**编号*/
|
||||
@Excel(name = "Number", width = 20)
|
||||
@ApiModelProperty(value = "编号")
|
||||
private String serialNumber;
|
||||
|
||||
/**标题*/
|
||||
@Excel(name = "title", width = 20)
|
||||
@ApiModelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
/**子标题*/
|
||||
@Excel(name = "Sub-Title", width = 20)
|
||||
@ApiModelProperty(value = "子标题")
|
||||
private String subtitle;
|
||||
|
||||
/**清单确认状态*/
|
||||
@ApiModelProperty(value = "清单确认状态")
|
||||
private String inventoryAffirmStatus;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "List Confirmation Status", width = 30)
|
||||
@ApiModelProperty(value = "清单确认状态名称")
|
||||
private String inventoryAffirmStatusName;//清单确认状态名称
|
||||
|
||||
/**任务确认状态*/
|
||||
@ApiModelProperty(value = "任务确认状态")
|
||||
private String taskAffirmStatus;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "任务发布状态名称")
|
||||
@Excel(name = "Task Confirmation Status", width = 30)
|
||||
private String taskAffirmStatusName;//任务发布状态名称
|
||||
|
||||
/**适用地区*/
|
||||
@ApiModelProperty(value = "适用地区")
|
||||
@Dict(dicCode ="Area")
|
||||
@Excel(name = "Area", width = 15, dicCode = "region")
|
||||
private String region;
|
||||
|
||||
/**对应标准*/
|
||||
@Excel(name = "Compare EU/CN", width = 20)
|
||||
@ApiModelProperty(value = "对应标准")
|
||||
private String correspondingStandard;
|
||||
|
||||
/**实施类别*/
|
||||
@Excel(name = "Usage", width = 20,dicCode ="implement_type")
|
||||
@ApiModelProperty(value = "实施类别")
|
||||
@Dict(dicCode ="implement_type")
|
||||
private String implementType;
|
||||
|
||||
/**新车型实施日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "新车型实施日期")
|
||||
private Date xin1Che1Xing2Shi2Shi1Ri4Qi1;
|
||||
|
||||
/**在产车实施日期*/
|
||||
@Excel(name = "New Vehicle Execute Date", width = 30, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "在产车实施日期")
|
||||
private Date implementTime;
|
||||
|
||||
/**认证类型*/
|
||||
@Excel(name = "Certification Type", width = 25,dicCode ="attestation_type")
|
||||
@ApiModelProperty(value = "认证类型")
|
||||
@Dict(dicCode ="attestation_type")
|
||||
private String attestationType;
|
||||
|
||||
/**认证级别*/
|
||||
@Excel(name = "Certification Level", width = 25,dicCode ="attestation_rank")
|
||||
@ApiModelProperty(value = "认证级别")
|
||||
@Dict(dicCode ="attestation_rank")
|
||||
private String attestationRank;
|
||||
|
||||
//适用增补件
|
||||
@Excel(name = "Applicable Supplement", width = 25)
|
||||
private String applicableSupplement;
|
||||
|
||||
/**WVTA ID*/
|
||||
@Excel(name = "WVTA ID", width = 20)
|
||||
@ApiModelProperty(value = "WVTA ID")
|
||||
private String wvtaId;
|
||||
|
||||
/**责任领域*/
|
||||
@Excel(name = "Responsible Field", width = 25,dicCode ="duty_territory")
|
||||
@ApiModelProperty(value = "责任领域")
|
||||
@Dict(dicCode ="duty_territory")
|
||||
private String dutyTerritory;
|
||||
|
||||
/**法规工程师id*/
|
||||
@ApiModelProperty(value = "法规工程师id")
|
||||
private String regulationOwnerId;
|
||||
|
||||
@Excel(name = "Regulation Engineer", width = 25)
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "法规工程师名称")
|
||||
private String regulationOwnerName;//法规工程师名称
|
||||
|
||||
/**认证工程师id*/
|
||||
@ApiModelProperty(value = "认证工程师id")
|
||||
private String homologationEngineerId;
|
||||
|
||||
@Excel(name = "Homologation Engineer", width = 25)
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "认证工程师名称")
|
||||
private String homologationEngineerName;//认证工程师名称
|
||||
|
||||
/**工程接口人id*/
|
||||
@ApiModelProperty(value = "工程接口人id")
|
||||
private String engineeringInterfacePerson;
|
||||
|
||||
@Excel(name = "Engineering Interface", width = 25)
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "工程接口人名称")
|
||||
private String engineeringInterfacePersonName;//工程接口人名称
|
||||
|
||||
/**备注*/
|
||||
@Excel(name = "Comments", width = 20)
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**设计符合性确认-交付物类型*/
|
||||
@Excel(name = "Design Compliance Check Deliverable Type", width = 50,dicCode ="deliverable_template")
|
||||
@ApiModelProperty(value = "设计符合性确认-交付物类型")
|
||||
@Dict(dicCode ="deliverable_template")
|
||||
private String designDeliverableType;
|
||||
|
||||
/**设计符合性确认-交付物模板*/
|
||||
@ApiModelProperty(value = "设计符合性确认-交付物模板")
|
||||
private String designDeliverableTemplate;
|
||||
|
||||
/**设计符合性确认-交付物模板名称*/
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "Design Compliance Check Deliverable Template", width = 50)
|
||||
private String designDeliverableTemplateName;
|
||||
|
||||
/**设计符合性确认-发起人角色*/
|
||||
@ApiModelProperty(value = "设计符合性确认-发起人角色")
|
||||
@Dict(dicCode ="fa1_qi3_ren2")
|
||||
private String designInitiator;
|
||||
|
||||
/**设计符合性确认-发起人id*/
|
||||
@ApiModelProperty(value = "设计符合性确认-发起人id")
|
||||
private String designInitiatorId;
|
||||
|
||||
/**设计符合性确认-发起人名称*/
|
||||
@Excel(name = "Design Compliance Check Initiator", width = 50)
|
||||
@TableField(exist = false)
|
||||
private String designInitiatorName;
|
||||
|
||||
/**设计符合性确认-责任人角色*/
|
||||
@ApiModelProperty(value = "设计符合性确认-责任人角色")
|
||||
@Dict(dicCode ="ze2_ren4_ren2")
|
||||
private String designDuty;
|
||||
|
||||
/**设计符合性确认-责任人id*/
|
||||
@ApiModelProperty(value = "设计符合性确认-责任人id")
|
||||
private String designDutyId;
|
||||
|
||||
/**设计符合性确认-责任人名称*/
|
||||
@Excel(name = "Design Compliance Check Assignee", width = 50)
|
||||
@TableField(exist = false)
|
||||
private String designDutyName;
|
||||
|
||||
/**设计符合性确认-截止时间*/
|
||||
@Excel(name = "Design Compliance Check Due Date", width = 50, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "设计符合性确认-截止时间")
|
||||
private Date designDueDate;
|
||||
@TableField(exist = false)
|
||||
private String designDueDateString;
|
||||
|
||||
//交付物说明
|
||||
@Excel(name = "Design Compliance Check Deliverable Description", width = 50)
|
||||
private String designRemark;
|
||||
|
||||
/**prehomo确认-交付物类型*/
|
||||
@Excel(name = "Pre-homo Check Deliverable Type", width = 50,dicCode ="deliverable_template")
|
||||
@ApiModelProperty(value = "prehomo确认-1")
|
||||
@Dict(dicCode ="deliverable_template")
|
||||
private String prehomoDeliverableType;
|
||||
|
||||
/**prehomo确认-交付物模板*/
|
||||
@ApiModelProperty(value = "prehomo确认-交付物模板")
|
||||
private String prehomoDeliverableTemplate;
|
||||
|
||||
/**prehomo确认-交付物模板名称*/
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "Pre-homo Check Deliverable Template", width = 50)
|
||||
private String prehomoDeliverableTemplateName;
|
||||
|
||||
/**prehomo确认-发起人角色*/
|
||||
@ApiModelProperty(value = "prehomo确认-发起人角色")
|
||||
@Dict(dicCode ="fa1_qi3_ren2")
|
||||
private String prehomoInitiator;
|
||||
|
||||
/**prehomo确认-发起人id*/
|
||||
@ApiModelProperty(value = "prehomo确认-发起人id")
|
||||
private String prehomoInitiatorId;
|
||||
|
||||
/**prehomo确认-发起人名称*/
|
||||
@Excel(name = "Pre-homo Check Initiator", width = 50)
|
||||
@TableField(exist = false)
|
||||
private String prehomoInitiatorName;
|
||||
|
||||
/**prehomo确认-责任人角色*/
|
||||
@ApiModelProperty(value = "prehomo确认-责任人角色")
|
||||
@Dict(dicCode ="ze2_ren4_ren2")
|
||||
private String prehomoDuty;
|
||||
|
||||
/**prehomo确认-责任人id*/
|
||||
@ApiModelProperty(value = "prehomo确认-责任人id")
|
||||
private String prehomoDutyId;
|
||||
|
||||
/**prehomo确认-责任人名称*/
|
||||
@Excel(name = "Pre-homo Check Assignee", width = 50)
|
||||
@TableField(exist = false)
|
||||
private String prehomoDutyName;
|
||||
|
||||
/**prehomo确认-截止时间*/
|
||||
@Excel(name = "Pre-homo Check Due Date", width = 50, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "prehomo确认-截止时间")
|
||||
private Date prehomoDueDate;
|
||||
@TableField(exist = false)
|
||||
private String prehomoDueDateString;
|
||||
|
||||
//prehomo确认-交付物说明
|
||||
@Excel(name = "Pre-homo Check Deliverable Description", width = 50)
|
||||
private String prehomoRemark;
|
||||
|
||||
/**验证符合性确认-交付物类型*/
|
||||
@Excel(name = "Validation Compliance Check Deliverable Type", width = 50,dicCode ="deliverable_template")
|
||||
@ApiModelProperty(value = "验证符合性确认-交付物类型")
|
||||
@Dict(dicCode ="deliverable_template")
|
||||
private String verifyDeliverableType;
|
||||
|
||||
/**验证符合性确认-交付物模板*/
|
||||
@ApiModelProperty(value = "验证符合性确认-交付物模板")
|
||||
private String verifyDeliverableTemplate;
|
||||
|
||||
/**验证符合性确认-交付物模板名称*/
|
||||
@Excel(name = "Validation Compliance Check Deliverable Template", width = 50)
|
||||
@TableField(exist = false)
|
||||
private String verifyDeliverableTemplateName;
|
||||
|
||||
/**验证符合性确认-发起人角色*/
|
||||
@ApiModelProperty(value = "验证符合性确认-发起人角色")
|
||||
@Dict(dicCode ="fa1_qi3_ren2")
|
||||
private String verifyInitiator;
|
||||
|
||||
/**验证符合性确认-发起人id*/
|
||||
@ApiModelProperty(value = "验证符合性确认-发起人id")
|
||||
private String verifyInitiatorId;
|
||||
|
||||
/**验证符合性确认-发起人名称*/
|
||||
@Excel(name = "Validation Compliance Check Initiator", width = 50)
|
||||
@TableField(exist = false)
|
||||
private String verifyInitiatorName;
|
||||
|
||||
/**验证符合性确认-责任人角色*/
|
||||
@ApiModelProperty(value = "验证符合性确认-责任人角色")
|
||||
@Dict(dicCode ="ze2_ren4_ren2")
|
||||
private String verifyDuty;
|
||||
|
||||
/**验证符合性确认-责任人id*/
|
||||
@ApiModelProperty(value = "验证符合性确认-责任人id")
|
||||
private String verifyDutyId;
|
||||
|
||||
/**验证符合性确认-责任人名称*/
|
||||
@Excel(name = "Validation Compliance Check Assignee", width = 50)
|
||||
@TableField(exist = false)
|
||||
private String verifyDutyName;
|
||||
|
||||
/**验证符合性确认-截止时间*/
|
||||
@Excel(name = "Validation Compliance Check Due Date", width = 50, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "验证符合性确认-截止时间")
|
||||
private Date verifyDueDate;
|
||||
@TableField(exist = false)
|
||||
private String verifyDueDateString;
|
||||
|
||||
//验证备注
|
||||
@Excel(name = "Validation Compliance Check Deliverable Description", width = 60)
|
||||
private String verifyRemark;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "角色代码")
|
||||
private String roleCode;//角色代码
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "角色名称")
|
||||
private String roleName;//角色名称
|
||||
|
||||
|
||||
/**法规工程师提交状态 :0通过 1驳回 */
|
||||
@ApiModelProperty(value = "法规工程师提交状态")
|
||||
// @TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private String regulationOwnerSubmitStatus;
|
||||
//这两个只要有一个是拒绝 那么该数据的清单确认状态就为拒绝
|
||||
/**认证工程师提交状态 :0通过 1驳回 */
|
||||
@ApiModelProperty(value = "认证工程师提交状态")
|
||||
// @TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private String homologationEngineerSubmitStatus;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "文档库id")
|
||||
private String ids;//文档库id 多个之间用英文逗号拼接
|
||||
|
||||
/**清单确认-截止时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "清单确认-截止时间")
|
||||
private Date inventoryAffirmDueDate;
|
||||
|
||||
/**任务确认-截止时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "任务确认-截止时间")
|
||||
private Date taskAffirmDueDate;
|
||||
|
||||
/**发送消息标识 三天*/
|
||||
@ApiModelProperty(value = "发送消息标识 三天")
|
||||
private String sendMsgFlag;
|
||||
|
||||
/**发送消息标识 结束当天*/
|
||||
@ApiModelProperty(value = "发送消息标识 结束当天")
|
||||
private String sendMsgCurrentFlag;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "中英文切换标识")
|
||||
private String cut;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "虚拟清单iD")
|
||||
private String dummyInventoryBaseId;
|
||||
|
||||
//flag为空时第一次调取,flag不为空时,为二次确认
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "调取虚拟清单,虚拟清单中维护数据为空时,进行二次确认")
|
||||
private String flag;
|
||||
|
||||
|
||||
}
|
||||
+107
-1
@@ -1,6 +1,10 @@
|
||||
package com.jero.modules.project.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ZipUtil;
|
||||
import com.jero.modules.dummy.entity.DummyInventoryBaseEO;
|
||||
import com.jero.modules.dummy.entity.DummyInventoryInfoEOEn;
|
||||
import com.jero.modules.dummy.enums.DummyInventoryBaseFieldEnum;
|
||||
import com.jero.modules.dummy.service.impl.DummyInventoryBaseEOServiceImpl;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.aliyuncs.utils.IOUtils;
|
||||
@@ -38,6 +42,7 @@ import com.jero.modules.project.mapper.ProjectRelatedPersonnelMapper;
|
||||
import com.jero.modules.project.service.*;
|
||||
import com.jero.modules.split.common.FileUnZip;
|
||||
import com.jero.modules.system.entity.SysAnnouncement;
|
||||
import com.jero.modules.system.entity.SysCategory;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.mapper.SysDictItemMapper;
|
||||
@@ -1991,7 +1996,20 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
OutputStream excelOS = new FileOutputStream(path + File.separator + "虚拟清单.xlsx");
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
workbook = ExcelExportUtil.exportExcel(exportParams, ProjectLawsInventoryEO.class, dataList);
|
||||
if(CutEnum.CN.getValue().equals(projectLawsInventoryEO.getCut())){
|
||||
workbook = ExcelExportUtil.exportExcel(exportParams, ProjectLawsInventoryEO.class, dataList);
|
||||
}else{
|
||||
List<ProjectLawsInventoryEOEn> dataListEn = new ArrayList<>();
|
||||
for (ProjectLawsInventoryEO projectLawsInventoryEOTemp : dataList) {
|
||||
ProjectLawsInventoryEOEn ProjectLawsInventoryEOEn = new ProjectLawsInventoryEOEn();
|
||||
BeanUtils.copyProperties(projectLawsInventoryEOTemp,ProjectLawsInventoryEOEn);
|
||||
dataListEn.add(ProjectLawsInventoryEOEn);
|
||||
}
|
||||
//下拉选中英文转换
|
||||
transition(dataListEn);
|
||||
workbook = ExcelExportUtil.exportExcel(exportParams, ProjectLawsInventoryEOEn.class, dataListEn);
|
||||
}
|
||||
|
||||
workbook.write(excelOS);
|
||||
excelOS.flush();
|
||||
|
||||
@@ -2020,6 +2038,94 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void transition(List<ProjectLawsInventoryEOEn> dataListEn){
|
||||
//下拉选数据字典
|
||||
List<SysCategory> sysCategoryList = sysCategoryService.list();
|
||||
|
||||
//技术领域数据字典
|
||||
List<SysDictItem> sysDictItems = sysDictItemServiceImpl.selectItemsAll();
|
||||
for (ProjectLawsInventoryEOEn projectLawsInventoryEOEn : dataListEn) {
|
||||
//适用地区
|
||||
String region = projectLawsInventoryEOEn.getRegion();
|
||||
String pullRegion = pull(sysDictItems, region,"region");
|
||||
if(StringUtils.isNotBlank(pullRegion)){
|
||||
projectLawsInventoryEOEn.setRegion(pullRegion);
|
||||
}
|
||||
//适用范围shi4Yong4Fan4Wei2
|
||||
// St
|
||||
|
||||
//状态state
|
||||
// String state = projectLawsInventoryEOEn.getState();
|
||||
// String pullState = pull(sysDictItems, state,"state");
|
||||
// if(StringUtils.isNotBlank(pullState)){
|
||||
// projectLawsInventoryEOEn.setState(pullState);
|
||||
// }
|
||||
///认证类型attestationType
|
||||
String attestationType = projectLawsInventoryEOEn.getAttestationType();
|
||||
String pullAttestationType = pull(sysDictItems, attestationType,"attestation_type");
|
||||
if(StringUtils.isNotBlank(pullAttestationType)){
|
||||
projectLawsInventoryEOEn.setAttestationType(pullAttestationType);
|
||||
}
|
||||
//责任领域dutyTerritory
|
||||
String dutyTerritory = projectLawsInventoryEOEn.getDutyTerritory();
|
||||
String pullDutyTerritory = pull(sysDictItems, dutyTerritory,"duty_territory");
|
||||
if(StringUtils.isNotBlank(pullDutyTerritory)){
|
||||
projectLawsInventoryEOEn.setDutyTerritory(pullDutyTerritory);
|
||||
}
|
||||
//认证级别attestationRank
|
||||
String attestationRank = projectLawsInventoryEOEn.getAttestationRank();
|
||||
String pullAttestationRank = pull(sysDictItems, attestationRank,"attestation_rank");
|
||||
if(StringUtils.isNotBlank(pullAttestationRank)){
|
||||
projectLawsInventoryEOEn.setAttestationRank(pullAttestationRank);
|
||||
}
|
||||
//实施类别implementType
|
||||
String implementType = projectLawsInventoryEOEn.getImplementType();
|
||||
String pullImplementType = pull(sysDictItems, implementType,"implement_type");
|
||||
if(StringUtils.isNotBlank(pullImplementType)){
|
||||
projectLawsInventoryEOEn.setImplementType(pullImplementType);
|
||||
}
|
||||
//设计交付物类型designDeliverableType
|
||||
String designDeliverableType = projectLawsInventoryEOEn.getDesignDeliverableType();
|
||||
String pullDesignDeliverableType = pull(sysDictItems, designDeliverableType,"deliverable_template");
|
||||
if(StringUtils.isNotBlank(pullDesignDeliverableType)){
|
||||
projectLawsInventoryEOEn.setDesignDeliverableType(pullDesignDeliverableType);
|
||||
}
|
||||
|
||||
//pre交付物类型prehomoDeliverableType
|
||||
String prehomoDeliverableType = projectLawsInventoryEOEn.getPrehomoDeliverableType();
|
||||
String pullPrehomoDeliverableType = pull(sysDictItems, prehomoDeliverableType,"deliverable_template");
|
||||
if(StringUtils.isNotBlank(pullPrehomoDeliverableType)){
|
||||
projectLawsInventoryEOEn.setPrehomoDeliverableType(pullPrehomoDeliverableType);
|
||||
}
|
||||
|
||||
//验证交付物类型verifyDeliverableType
|
||||
String verifyDeliverableType = projectLawsInventoryEOEn.getVerifyDeliverableType();
|
||||
String pullVerifyDeliverableType = pull(sysDictItems, verifyDeliverableType,"deliverable_template");
|
||||
if(StringUtils.isNotBlank(pullVerifyDeliverableType)){
|
||||
projectLawsInventoryEOEn.setVerifyDeliverableType(pullVerifyDeliverableType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String pull(List<SysDictItem> sysDictItems, String field,String dictCode) {
|
||||
if(StringUtils.isBlank(field)){
|
||||
return null;
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String s : field.split(",")) {
|
||||
List<SysDictItem> collect = sysDictItems.stream().filter(e -> dictCode.equals(e.getDictCode()) && s.equals(e.getItemValue())).collect(Collectors.toList());
|
||||
if(collect.size() != 0){
|
||||
sb.append(collect.get(0).getEnName() + ",");
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(sb)){
|
||||
String substring = sb.substring(0, sb.length() - 1);
|
||||
return substring;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
@Override
|
||||
public void importData(MultipartFile file, ProjectLawsInventoryEO projectLawsInventoryEO) {
|
||||
|
||||
Reference in New Issue
Block a user