bug67836 和bug67160
This commit is contained in:
+219
@@ -0,0 +1,219 @@
|
||||
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: 2023-03-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("project_certification_inventory")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="project_certification_inventory对象", description="项目库-认证清单表")
|
||||
public class ProjectCertificationInventoryDutyEnginnerEO 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;
|
||||
|
||||
/**类别*/
|
||||
@Excel(name = "类别", width = 20)
|
||||
@ApiModelProperty(value = "类别")
|
||||
private String category;
|
||||
|
||||
/**检验项目*/
|
||||
@Excel(name = "检验项目", width = 20)
|
||||
@ApiModelProperty(value = "检验项目")
|
||||
private String inspectionItem;
|
||||
|
||||
/**配置项*/
|
||||
@Excel(name = "配置项", width = 20)
|
||||
@ApiModelProperty(value = "配置项")
|
||||
@Dict(dicCode = "ren4_zheng4_qing1_dan1_-_pei4_zhi4_xiang4")
|
||||
private String configItem;
|
||||
|
||||
/**WVTA ID*/
|
||||
@Excel(name = "WVTA ID", width = 20)
|
||||
@ApiModelProperty(value = "WVTA ID")
|
||||
private String wvtaId;
|
||||
|
||||
/**标准编号*/
|
||||
@Excel(name = "标准编号", width = 20)
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
private String serialNumber;
|
||||
|
||||
/**责任领域*/
|
||||
@ApiModelProperty(value = "责任领域")
|
||||
private String dutyTerritory;
|
||||
/**责任领域名称**/
|
||||
@Excel(name = "责任领域", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String dutyTerritoryName;
|
||||
/**责任领域名称-英文**/
|
||||
@TableField(exist = false)
|
||||
private String dutyTerritoryNameEn;
|
||||
|
||||
/**工程接口人*/
|
||||
@ApiModelProperty(value = "工程接口人")
|
||||
private String sdt;
|
||||
/**工程接口人名称**/
|
||||
@Excel(name = "工程接口人", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String sdtName;
|
||||
|
||||
/**责任人*/
|
||||
@ApiModelProperty(value = "责任人")
|
||||
private String dutyPerson;
|
||||
/**责任人名称**/
|
||||
@Excel(name = "责任人", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String dutyPersonName;
|
||||
|
||||
/**交付物模板*/
|
||||
@ApiModelProperty(value = "交付物模板")
|
||||
private String deliverableTemplate;
|
||||
/**交付物模板名称**/
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "交付物模板", width = 20)
|
||||
private String deliverableTemplateName;
|
||||
|
||||
/**交付物类型*/
|
||||
@ApiModelProperty(value = "交付物类型")
|
||||
private String deliverableType;
|
||||
// 交付物类型名称
|
||||
@Excel(name = "交付物类型", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String deliverableTypeName;
|
||||
// 交付物类型名称-英文
|
||||
@TableField(exist = false)
|
||||
private String deliverableTypeNameEn;
|
||||
|
||||
/**交付物*/
|
||||
// @Excel(name = "交付物", width = 15)
|
||||
@ApiModelProperty(value = "交付物")
|
||||
private String deliverable;
|
||||
|
||||
/**文档库id*/
|
||||
// @Excel(name = "文档库id", width = 15)
|
||||
@ApiModelProperty(value = "文档库id")
|
||||
private String bussDocumentLibraryId;
|
||||
|
||||
|
||||
|
||||
/**交付结果*/
|
||||
@Excel(name = "交付结果", width = 20)
|
||||
@ApiModelProperty(value = "交付结果")
|
||||
private String deliveryResult;
|
||||
|
||||
/**截止日期*/
|
||||
@Excel(name = "截止日期", width = 20, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "截止日期")
|
||||
private Date endTime;
|
||||
/**流程状态*/
|
||||
@ApiModelProperty(value = "流程状态")
|
||||
private String flowStatus;
|
||||
// 流程状态展示名称
|
||||
@Excel(name = "流程状态", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String flowStatusName;
|
||||
|
||||
/**报告编号*/
|
||||
// @Excel(name = "报告编号", width = 20)
|
||||
@ApiModelProperty(value = "报告编号")
|
||||
private String reportNumber;
|
||||
|
||||
/**产品型号*/
|
||||
// @Excel(name = "产品型号", width = 20)
|
||||
@ApiModelProperty(value = "产品型号")
|
||||
private String productModel;
|
||||
|
||||
/**生产企业名称*/
|
||||
// @Excel(name = "生产企业名称", width = 20)
|
||||
@ApiModelProperty(value = "生产企业名称")
|
||||
private String productionEnterpriseName;
|
||||
|
||||
/**认证进度*/
|
||||
|
||||
@ApiModelProperty(value = "认证进度")
|
||||
private String certificationProgress;
|
||||
|
||||
/**认证进度展示名称**/
|
||||
// @Excel(name = "认证进度", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String certificationProgress_dictText;
|
||||
|
||||
// @Excel(name = "认证进度备注", width = 15)
|
||||
@ApiModelProperty(value = "认证进度备注")
|
||||
private String certificationProgressRemark;
|
||||
|
||||
/**项目库id*/
|
||||
@ApiModelProperty(value = "项目库id")
|
||||
private String projectLibraryId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String cut;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String ids;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String roleCode;
|
||||
|
||||
/**值类型,对应SysCategoryValueTypeEnum中value**/
|
||||
@TableField(exist = false)
|
||||
private String valueType;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String excelName;
|
||||
|
||||
// @Excel(name = "*截止日期", width = 20, format = "yyyy-MM-dd")
|
||||
@TableField(exist = false)
|
||||
private String endTimeStr;
|
||||
}
|
||||
+219
@@ -0,0 +1,219 @@
|
||||
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;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 认证清单工程接口人和责任人导出类
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-03-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("project_certification_inventory")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="project_certification_inventory对象", description="项目库-认证清单表")
|
||||
public class ProjectCertificationInventoryDutyEnginnerEOEn 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 java.util.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 java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
/**类别*/
|
||||
@Excel(name = "Category", width = 20)
|
||||
@ApiModelProperty(value = "类别")
|
||||
private String category;
|
||||
|
||||
/**检验项目*/
|
||||
@Excel(name = "Inspection Items", width = 20)
|
||||
@ApiModelProperty(value = "检验项目")
|
||||
private String inspectionItem;
|
||||
|
||||
/**配置项*/
|
||||
@Excel(name = "Configuration Item", width = 20)
|
||||
@ApiModelProperty(value = "配置项")
|
||||
@Dict(dicCode = "ren4_zheng4_qing1_dan1_-_pei4_zhi4_xiang4")
|
||||
private String configItem;
|
||||
|
||||
/**WVTA ID*/
|
||||
@Excel(name = "WVTA ID", width = 20)
|
||||
@ApiModelProperty(value = "WVTA ID")
|
||||
private String wvtaId;
|
||||
|
||||
/**标准编号*/
|
||||
@Excel(name = "Standard No", width = 20)
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
private String serialNumber;
|
||||
|
||||
/**责任领域*/
|
||||
@ApiModelProperty(value = "责任领域")
|
||||
private String dutyTerritory;
|
||||
/**责任领域名称**/
|
||||
@Excel(name = "Responsible Field", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String dutyTerritoryName;
|
||||
/**责任领域名称-英文**/
|
||||
@TableField(exist = false)
|
||||
private String dutyTerritoryNameEn;
|
||||
|
||||
/**工程接口人*/
|
||||
@ApiModelProperty(value = "工程接口人")
|
||||
private String sdt;
|
||||
/**工程接口人名称**/
|
||||
@Excel(name = "Eng. Interface", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String sdtName;
|
||||
|
||||
/**责任人*/
|
||||
@ApiModelProperty(value = "责任人")
|
||||
private String dutyPerson;
|
||||
/**责任人名称**/
|
||||
@Excel(name = "Assignee", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String dutyPersonName;
|
||||
|
||||
/**交付物模板*/
|
||||
@ApiModelProperty(value = "交付物模板")
|
||||
private String deliverableTemplate;
|
||||
/**交付物模板名称**/
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "Deliverable Template", width = 40)
|
||||
private String deliverableTemplateName;
|
||||
|
||||
/**交付物类型*/
|
||||
@ApiModelProperty(value = "交付物类型")
|
||||
private String deliverableType;
|
||||
// 交付物类型名称
|
||||
@Excel(name = "Deliverable Type", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String deliverableTypeName;
|
||||
// 交付物类型名称-英文
|
||||
@TableField(exist = false)
|
||||
private String deliverableTypeNameEn;
|
||||
|
||||
/**交付物*/
|
||||
// @Excel(name = "交付物", width = 15)
|
||||
@ApiModelProperty(value = "交付物")
|
||||
private String deliverable;
|
||||
|
||||
/**文档库id*/
|
||||
// @Excel(name = "文档库id", width = 15)
|
||||
@ApiModelProperty(value = "文档库id")
|
||||
private String bussDocumentLibraryId;
|
||||
|
||||
|
||||
|
||||
/**交付结果*/
|
||||
@Excel(name = "Deliverables Result", width = 20)
|
||||
@ApiModelProperty(value = "交付结果")
|
||||
private String deliveryResult;
|
||||
|
||||
/**截止日期*/
|
||||
@Excel(name = "Due Date", width = 20, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "截止日期")
|
||||
private java.util.Date endTime;
|
||||
|
||||
/**流程状态*/
|
||||
@ApiModelProperty(value = "流程状态")
|
||||
private String flowStatus;
|
||||
// 流程状态展示名称
|
||||
@Excel(name = "Process Status", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String flowStatusName;
|
||||
|
||||
/**报告编号*/
|
||||
// @Excel(name = "Report No", width = 20)
|
||||
@ApiModelProperty(value = "报告编号")
|
||||
private String reportNumber;
|
||||
|
||||
/**产品型号*/
|
||||
// @Excel(name = "Product Model", width = 20)
|
||||
@ApiModelProperty(value = "产品型号")
|
||||
private String productModel;
|
||||
|
||||
/**生产企业名称*/
|
||||
// @Excel(name = "Name Of Manufacturer", width = 40)
|
||||
@ApiModelProperty(value = "生产企业名称")
|
||||
private String productionEnterpriseName;
|
||||
|
||||
/**认证进度*/
|
||||
|
||||
@ApiModelProperty(value = "认证进度")
|
||||
private String certificationProgress;
|
||||
|
||||
/**认证进度展示名称**/
|
||||
@TableField(exist = false)
|
||||
// @Excel(name = "Homologation Progress", width = 40)
|
||||
private String certificationProgress_dictText;
|
||||
|
||||
// @Excel(name = "认证进度备注", width = 15)
|
||||
@ApiModelProperty(value = "认证进度备注")
|
||||
private String certificationProgressRemark;
|
||||
|
||||
/**项目库id*/
|
||||
@ApiModelProperty(value = "项目库id")
|
||||
private String projectLibraryId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String cut;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String ids;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String roleCode;
|
||||
|
||||
/**值类型,对应SysCategoryValueTypeEnum中value**/
|
||||
@TableField(exist = false)
|
||||
private String valueType;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String excelName;
|
||||
|
||||
// @Excel(name = "截止日期", width = 20, format = "yyyy-MM-dd")
|
||||
@TableField(exist = false)
|
||||
private String endTimeStr;
|
||||
}
|
||||
+46
-10
@@ -3760,6 +3760,12 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
}
|
||||
|
||||
}
|
||||
public static <T> List<ProjectCertificationInventoryDutyEnginnerEO> copy(List<ProjectCertificationInventoryEO> list,
|
||||
Class<ProjectCertificationInventoryDutyEnginnerEO> clazz) {
|
||||
String oldOb = JSON.toJSONString(list);
|
||||
return JSON.parseArray(oldOb, clazz);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
@@ -3776,6 +3782,18 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
queryWrapper.in("id",Arrays.asList(projectCertificationInventoryEO.getIds().split(",")));
|
||||
}
|
||||
queryWrapper.orderByDesc("create_time","serial_number");
|
||||
//获取当前的projectId
|
||||
String projectId = projectCertificationInventoryEO.getProjectLibraryId();
|
||||
//获取当前用户
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("projectLibraryId",projectId);
|
||||
params.put("userId",currentUser.getId());
|
||||
params.put("modelType",RoleRelModelTypeEnum.CERTIFICATION_INVENTORY.getValue());
|
||||
ProjectLibraryRoleRelEO projectLibraryRoleRelEO = projectLibraryRoleRelEOService.queryByProjectLibraryIdAndUserId(params);
|
||||
String roleCode = projectLibraryRoleRelEO.getRoleCode();
|
||||
// 创建查询权限
|
||||
this.createQueryPermission(queryWrapper,roleCode);
|
||||
//导出的数据
|
||||
dataList = this.list(queryWrapper);
|
||||
//文件
|
||||
@@ -3791,6 +3809,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
}
|
||||
String cut = projectCertificationInventoryEO.getCut();
|
||||
disposeData(dataList,cut);
|
||||
List<ProjectCertificationInventoryDutyEnginnerEO> copy = copy(dataList,ProjectCertificationInventoryDutyEnginnerEO.class);
|
||||
|
||||
|
||||
|
||||
OutputStream os = null;
|
||||
try {
|
||||
@@ -3851,19 +3872,34 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
|
||||
workbook = ExcelExportUtil.exportExcel(exportParams, ProjectCertificationInventoryEO.class, dataList);
|
||||
}else{
|
||||
List<ProjectCertificationInventoryEOEn> dataListEn = new ArrayList<>();
|
||||
for (ProjectCertificationInventoryEO projectCertificationInventoryEOTemp : dataList) {
|
||||
ProjectCertificationInventoryEOEn projectCertificationInventoryEOEn = new ProjectCertificationInventoryEOEn();
|
||||
BeanUtils.copyProperties(projectCertificationInventoryEOTemp,projectCertificationInventoryEOEn);
|
||||
dataListEn.add(projectCertificationInventoryEOEn);
|
||||
if(ProjectRoleEnum.INTERFACE_PERSON.getValue().equals(roleCode) ||
|
||||
ProjectRoleEnum.PERSON_LIABLE.getValue().equals(roleCode)){
|
||||
workbook = ExcelExportUtil.exportExcel(exportParams, ProjectCertificationInventoryDutyEnginnerEO.class, copy);
|
||||
}else{
|
||||
workbook = ExcelExportUtil.exportExcel(exportParams, ProjectCertificationInventoryEO.class, dataList);
|
||||
}
|
||||
//下拉选中英文转换
|
||||
}else{
|
||||
if(ProjectRoleEnum.INTERFACE_PERSON.getValue().equals(roleCode) ||
|
||||
ProjectRoleEnum.PERSON_LIABLE.getValue().equals(roleCode)){
|
||||
List<ProjectCertificationInventoryDutyEnginnerEOEn> copyEn = new ArrayList<>();
|
||||
for (ProjectCertificationInventoryDutyEnginnerEO projectCertificationInventoryDutyEnginnerEOTemp : copy) {
|
||||
ProjectCertificationInventoryDutyEnginnerEOEn projectCertificationInventoryDutyEnginnerEOEn = new ProjectCertificationInventoryDutyEnginnerEOEn();
|
||||
BeanUtils.copyProperties(projectCertificationInventoryDutyEnginnerEOTemp,projectCertificationInventoryDutyEnginnerEOEn);
|
||||
copyEn.add(projectCertificationInventoryDutyEnginnerEOEn);
|
||||
}
|
||||
workbook = ExcelExportUtil.exportExcel(exportParams, ProjectCertificationInventoryDutyEnginnerEOEn.class, copyEn);
|
||||
}else{
|
||||
List<ProjectCertificationInventoryEOEn> dataListEn = new ArrayList<>();
|
||||
for (ProjectCertificationInventoryEO projectCertificationInventoryEOTemp : dataList) {
|
||||
ProjectCertificationInventoryEOEn projectCertificationInventoryEOEn = new ProjectCertificationInventoryEOEn();
|
||||
BeanUtils.copyProperties(projectCertificationInventoryEOTemp,projectCertificationInventoryEOEn);
|
||||
dataListEn.add(projectCertificationInventoryEOEn);
|
||||
}
|
||||
//下拉选中英文转换
|
||||
// transition(dataListEn,projectCertificationInventoryEO);
|
||||
workbook = ExcelExportUtil.exportExcel(exportParams, ProjectCertificationInventoryEOEn.class, dataListEn);
|
||||
workbook = ExcelExportUtil.exportExcel(exportParams, ProjectCertificationInventoryEOEn.class, dataListEn);
|
||||
}
|
||||
}
|
||||
|
||||
workbook.write(excelOS);
|
||||
excelOS.flush();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user