日期验证和责任人
This commit is contained in:
+2
@@ -153,4 +153,6 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
|
||||
List<SysUser> getPPEmployeeList(@Param("thirdType") String thirdType);
|
||||
|
||||
void updateByIdPP (SysUser sysUser);
|
||||
|
||||
List<SysUser> getListUserName();
|
||||
}
|
||||
|
||||
+4
@@ -222,4 +222,8 @@
|
||||
id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="getListUserName" resultType="com.jero.modules.system.entity.SysUser">
|
||||
select * from sys_user
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
+21
-20
@@ -65,28 +65,28 @@ public class ProjectCertificationInventoryEO implements Serializable {
|
||||
private String sysOrgCode;
|
||||
|
||||
/**类别*/
|
||||
@Excel(name = "类别", width = 15)
|
||||
@Excel(name = "类别", width = 20)
|
||||
@ApiModelProperty(value = "类别")
|
||||
private String category;
|
||||
|
||||
/**检验项目*/
|
||||
@Excel(name = "检验项目", width = 15)
|
||||
@Excel(name = "检验项目", width = 20)
|
||||
@ApiModelProperty(value = "检验项目")
|
||||
private String inspectionItem;
|
||||
|
||||
/**配置项*/
|
||||
@Excel(name = "配置项", width = 15)
|
||||
@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 = 15)
|
||||
@Excel(name = "WVTA ID", width = 20)
|
||||
@ApiModelProperty(value = "WVTA ID")
|
||||
private String wvtaId;
|
||||
|
||||
/**标准编号*/
|
||||
@Excel(name = "*标准编号", width = 15)
|
||||
@Excel(name = "*标准编号", width = 20)
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
private String serialNumber;
|
||||
|
||||
@@ -94,7 +94,7 @@ public class ProjectCertificationInventoryEO implements Serializable {
|
||||
@ApiModelProperty(value = "责任领域")
|
||||
private String dutyTerritory;
|
||||
/**责任领域名称**/
|
||||
@Excel(name = "*责任领域", width = 15)
|
||||
@Excel(name = "*责任领域", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String dutyTerritoryName;
|
||||
/**责任领域名称-英文**/
|
||||
@@ -105,7 +105,7 @@ public class ProjectCertificationInventoryEO implements Serializable {
|
||||
@ApiModelProperty(value = "工程接口人")
|
||||
private String sdt;
|
||||
/**工程接口人名称**/
|
||||
@Excel(name = "工程接口人", width = 15)
|
||||
@Excel(name = "工程接口人", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String sdtName;
|
||||
|
||||
@@ -113,7 +113,7 @@ public class ProjectCertificationInventoryEO implements Serializable {
|
||||
@ApiModelProperty(value = "责任人")
|
||||
private String dutyPerson;
|
||||
/**责任人名称**/
|
||||
@Excel(name = "责任人", width = 15)
|
||||
@Excel(name = "责任人", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String dutyPersonName;
|
||||
|
||||
@@ -121,7 +121,7 @@ public class ProjectCertificationInventoryEO implements Serializable {
|
||||
@ApiModelProperty(value = "交付物类型")
|
||||
private String deliverableType;
|
||||
// 交付物类型名称
|
||||
@Excel(name = "交付物类型", width = 15)
|
||||
@Excel(name = "交付物类型", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String deliverableTypeName;
|
||||
// 交付物类型名称-英文
|
||||
@@ -144,16 +144,16 @@ public class ProjectCertificationInventoryEO implements Serializable {
|
||||
private String deliverableTemplate;
|
||||
/**交付物模板名称**/
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "交付物模板", width = 15)
|
||||
@Excel(name = "交付物模板", width = 20)
|
||||
private String deliverableTemplateName;
|
||||
|
||||
/**交付结果*/
|
||||
@Excel(name = "交付结果", width = 15)
|
||||
@Excel(name = "交付结果", width = 20)
|
||||
@ApiModelProperty(value = "交付结果")
|
||||
private String deliveryResult;
|
||||
|
||||
/**截止日期*/
|
||||
@Excel(name = "截止日期", width = 15, format = "yyyy-MM-dd")
|
||||
@Excel(name = "截止日期", width = 20, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "截止日期")
|
||||
@@ -162,31 +162,32 @@ public class ProjectCertificationInventoryEO implements Serializable {
|
||||
@ApiModelProperty(value = "流程状态")
|
||||
private String flowStatus;
|
||||
// 流程状态展示名称
|
||||
@Excel(name = "流程状态", width = 15)
|
||||
@Excel(name = "流程状态", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String flowStatusName;
|
||||
|
||||
/**报告编号*/
|
||||
@Excel(name = "报告编号", width = 15)
|
||||
@Excel(name = "报告编号", width = 20)
|
||||
@ApiModelProperty(value = "报告编号")
|
||||
private String reportNumber;
|
||||
|
||||
/**产品型号*/
|
||||
@Excel(name = "产品型号", width = 15)
|
||||
@Excel(name = "产品型号", width = 20)
|
||||
@ApiModelProperty(value = "产品型号")
|
||||
private String productModel;
|
||||
|
||||
/**生产企业名称*/
|
||||
@Excel(name = "生产企业名称", width = 15)
|
||||
@Excel(name = "生产企业名称", width = 20)
|
||||
@ApiModelProperty(value = "生产企业名称")
|
||||
private String productionEnterpriseName;
|
||||
|
||||
/**认证进度*/
|
||||
@Excel(name = "认证进度", width = 15)
|
||||
|
||||
@ApiModelProperty(value = "认证进度")
|
||||
private String certificationProgress;
|
||||
|
||||
/**认证进度展示名称**/
|
||||
@Excel(name = "认证进度", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String certificationProgress_dictText;
|
||||
|
||||
@@ -214,7 +215,7 @@ public class ProjectCertificationInventoryEO implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private String excelName;
|
||||
|
||||
// @Excel(name = "截止日期", width = 15, format = "yyyy-MM-dd")
|
||||
// @TableField(exist = false)
|
||||
// private String endTimeStr;
|
||||
// @Excel(name = "截止日期", width = 20, format = "yyyy-MM-dd")
|
||||
@TableField(exist = false)
|
||||
private String endTimeStr;
|
||||
}
|
||||
|
||||
+29
-17
@@ -63,28 +63,28 @@ public class ProjectCertificationInventoryEOEn implements Serializable {
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**类别*/
|
||||
@Excel(name = "Category", width = 15)
|
||||
@Excel(name = "Category", width = 20)
|
||||
@ApiModelProperty(value = "类别")
|
||||
private java.lang.String category;
|
||||
|
||||
/**检验项目*/
|
||||
@Excel(name = "Inspection Items", width = 15)
|
||||
@Excel(name = "Inspection Items", width = 20)
|
||||
@ApiModelProperty(value = "检验项目")
|
||||
private java.lang.String inspectionItem;
|
||||
|
||||
/**配置项*/
|
||||
@Excel(name = "Configuration Item", width = 15)
|
||||
@Excel(name = "Configuration Item", width = 20)
|
||||
@ApiModelProperty(value = "配置项")
|
||||
@Dict(dicCode = "ren4_zheng4_qing1_dan1_-_pei4_zhi4_xiang4")
|
||||
private java.lang.String configItem;
|
||||
|
||||
/**WVTA ID*/
|
||||
@Excel(name = "WVTA ID", width = 15)
|
||||
@Excel(name = "WVTA ID", width = 20)
|
||||
@ApiModelProperty(value = "WVTA ID")
|
||||
private java.lang.String wvtaId;
|
||||
|
||||
/**标准编号*/
|
||||
@Excel(name = "*Standard No", width = 15)
|
||||
@Excel(name = "*Standard No", width = 20)
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
private java.lang.String serialNumber;
|
||||
|
||||
@@ -92,7 +92,7 @@ public class ProjectCertificationInventoryEOEn implements Serializable {
|
||||
@ApiModelProperty(value = "责任领域")
|
||||
private java.lang.String dutyTerritory;
|
||||
/**责任领域名称**/
|
||||
@Excel(name = "*Responsible Field", width = 15)
|
||||
@Excel(name = "*Responsible Field", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String dutyTerritoryName;
|
||||
/**责任领域名称-英文**/
|
||||
@@ -103,7 +103,7 @@ public class ProjectCertificationInventoryEOEn implements Serializable {
|
||||
@ApiModelProperty(value = "工程接口人")
|
||||
private java.lang.String sdt;
|
||||
/**工程接口人名称**/
|
||||
@Excel(name = "Eng. Interface", width = 15)
|
||||
@Excel(name = "Eng. Interface", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String sdtName;
|
||||
|
||||
@@ -111,7 +111,7 @@ public class ProjectCertificationInventoryEOEn implements Serializable {
|
||||
@ApiModelProperty(value = "责任人")
|
||||
private java.lang.String dutyPerson;
|
||||
/**责任人名称**/
|
||||
@Excel(name = "Assignee", width = 15)
|
||||
@Excel(name = "Assignee", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String dutyPersonName;
|
||||
|
||||
@@ -119,7 +119,7 @@ public class ProjectCertificationInventoryEOEn implements Serializable {
|
||||
@ApiModelProperty(value = "交付物类型")
|
||||
private java.lang.String deliverableType;
|
||||
// 交付物类型名称
|
||||
@Excel(name = "Deliverable Type", width = 15)
|
||||
@Excel(name = "Deliverable Type", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String deliverableTypeName;
|
||||
// 交付物类型名称-英文
|
||||
@@ -142,16 +142,16 @@ public class ProjectCertificationInventoryEOEn implements Serializable {
|
||||
private java.lang.String deliverableTemplate;
|
||||
/**交付物模板名称**/
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "交付物模板", width = 15)
|
||||
@Excel(name = "交付物模板", width = 20)
|
||||
private String deliverableTemplateName;
|
||||
|
||||
/**交付结果*/
|
||||
@Excel(name = "Deliverables Result", width = 15)
|
||||
@Excel(name = "Deliverables Result", width = 20)
|
||||
@ApiModelProperty(value = "交付结果")
|
||||
private java.lang.String deliveryResult;
|
||||
|
||||
/**截止日期*/
|
||||
@Excel(name = "Due Date", width = 15, format = "yyyy-MM-dd")
|
||||
@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 = "截止日期")
|
||||
@@ -161,32 +161,33 @@ public class ProjectCertificationInventoryEOEn implements Serializable {
|
||||
@ApiModelProperty(value = "流程状态")
|
||||
private java.lang.String flowStatus;
|
||||
// 流程状态展示名称
|
||||
@Excel(name = "Process Status", width = 15)
|
||||
@Excel(name = "Process Status", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String flowStatusName;
|
||||
|
||||
/**报告编号*/
|
||||
@Excel(name = "Report No", width = 15)
|
||||
@Excel(name = "Report No", width = 20)
|
||||
@ApiModelProperty(value = "报告编号")
|
||||
private java.lang.String reportNumber;
|
||||
|
||||
/**产品型号*/
|
||||
@Excel(name = "Product Model", width = 15)
|
||||
@Excel(name = "Product Model", width = 20)
|
||||
@ApiModelProperty(value = "产品型号")
|
||||
private java.lang.String productModel;
|
||||
|
||||
/**生产企业名称*/
|
||||
@Excel(name = "Name Of Manufacturer", width = 15)
|
||||
@Excel(name = "Name Of Manufacturer", width = 40)
|
||||
@ApiModelProperty(value = "生产企业名称")
|
||||
private java.lang.String productionEnterpriseName;
|
||||
|
||||
/**认证进度*/
|
||||
@Excel(name = "Homologation Progress", width = 15)
|
||||
|
||||
@ApiModelProperty(value = "认证进度")
|
||||
private java.lang.String certificationProgress;
|
||||
|
||||
/**认证进度展示名称**/
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "Homologation Progress", width = 40)
|
||||
private String certificationProgress_dictText;
|
||||
|
||||
// @Excel(name = "认证进度备注", width = 15)
|
||||
@@ -205,4 +206,15 @@ public class ProjectCertificationInventoryEOEn implements Serializable {
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
-1
@@ -21,7 +21,6 @@ public enum ProjectRoleEnum {
|
||||
MANAGER("manage","11",""),
|
||||
ADMIN("系统管理员","12",""),
|
||||
VIEWER("Viewer","13",""),
|
||||
DUTYPERSON("责任人","14","")
|
||||
;
|
||||
|
||||
String name;
|
||||
|
||||
+133
-24
@@ -45,6 +45,7 @@ import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.enums.SysCategoryValueTypeEnum;
|
||||
import com.jero.modules.system.mapper.SysCategoryMapper;
|
||||
import com.jero.modules.system.mapper.SysRoleMapper;
|
||||
import com.jero.modules.system.mapper.SysUserMapper;
|
||||
import com.jero.modules.system.service.ISysCategoryService;
|
||||
import com.jero.modules.system.service.ISysDictItemService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
@@ -155,6 +156,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
private IProjectRelatedPersonnelService iProjectRelatedPersonnelService;
|
||||
@Autowired
|
||||
private IOSSFileService iOSSFileService;
|
||||
@Autowired
|
||||
private SysUserMapper sysUserMapper;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -740,6 +743,16 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
}
|
||||
data.setCertificationProgress_dictText(certificationProgress_dictText);
|
||||
}
|
||||
// String GetEndTime = String.valueOf(data.getEndTime());
|
||||
// if(StringUtils.isNotEmpty(GetEndTime)){
|
||||
// Date endTime = new Date();
|
||||
// if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
// endTime = data.getEndTime();
|
||||
// }else {
|
||||
// endTime = data.getEndTime();
|
||||
// }
|
||||
// data.setEndTimeStr(String.valueOf(endTime));
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2965,11 +2978,17 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
//工程接口人engineeringInterfacePerson
|
||||
String sdt = projectCertificationInventoryEO.getSdtName();
|
||||
//责任人
|
||||
String dutyPerson = projectCertificationInventoryEO.getDutyPersonName();
|
||||
String dutyPerson = projectCertificationInventoryEO.getDutyPersonName();;
|
||||
//交付物类型
|
||||
String deliverableType = projectCertificationInventoryEO.getDeliverableTypeName();
|
||||
String deliverableType = "";
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
|
||||
deliverableType = projectCertificationInventoryEO.getDeliverableTypeName();
|
||||
}else {
|
||||
deliverableType = projectCertificationInventoryEO.getDeliverableTypeNameEn();
|
||||
}
|
||||
|
||||
//截止时间
|
||||
Date endTime = projectCertificationInventoryEO.getEndTime();
|
||||
String endTime = projectCertificationInventoryEO.getEndTimeStr();
|
||||
|
||||
//文件
|
||||
//交付物模板
|
||||
@@ -3089,7 +3108,12 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
//工程接口人
|
||||
List<Map<String, String>> mapPersonList = (List<Map<String, String>>) objectMap.get("engineeringInterfacePersonList");
|
||||
//所有人
|
||||
List<Map<String, String>> allPersonList = (List<Map<String, String>>) objectMap.get("allPersonList");
|
||||
// List<Map<String, String>> allPersonList = (List<Map<String, String>>) objectMap.get("allPersonList");
|
||||
|
||||
List<SysUser> listUserName = new ArrayList<>();
|
||||
listUserName = sysUserMapper.getListUserName();
|
||||
listUserName = listUserName.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
|
||||
String nameCn = "";
|
||||
String nameEn = "";
|
||||
@@ -3113,7 +3137,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
nameCn = "责任人";
|
||||
nameEn = "Assignee";
|
||||
//验证人员是否存在
|
||||
personnelVerify(projectCertificationInventoryEO, errorMsg, msgList, dutyPerson, allPersonList,nameCn,nameEn, com.jero.modules.project.enums.ProjectRoleEnum.DUTYPERSON.getValue());
|
||||
personDutyPerson(projectCertificationInventoryEO, errorMsg, msgList, dutyPerson, listUserName,nameCn,nameEn);
|
||||
}else {
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
|
||||
@@ -3146,12 +3170,19 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
projectCertificationInventoryEO.setDeliverableTemplate(value);
|
||||
}
|
||||
//截止时间
|
||||
SimpleDateFormat sd = new SimpleDateFormat();
|
||||
String endTimeStr = sd.format(endTime);
|
||||
if(StringUtils.isNotBlank(endTimeStr)){
|
||||
// SimpleDateFormat sd = new SimpleDateFormat();
|
||||
// String endTimeStr = sd.format(endTime);
|
||||
if(StringUtils.isNotBlank(endTime)){
|
||||
flag = dateVerify(projectCertificationInventoryEO, errorMsg, endTime,msgList,"截止时间","Due Date");
|
||||
if(flag){
|
||||
projectCertificationInventoryEO.setEndTime(projectCertificationInventoryEO.getEndTime());
|
||||
SimpleDateFormat sd = new SimpleDateFormat();
|
||||
Date date = null;
|
||||
try {
|
||||
date = sd.parse(endTime);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
projectCertificationInventoryEO.setEndTime(date);
|
||||
}
|
||||
}else{
|
||||
String message = "";
|
||||
@@ -3187,14 +3218,14 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
}
|
||||
|
||||
private boolean dateVerify(ProjectCertificationInventoryEO projectCertificationInventoryEO,
|
||||
String errorMsg, Date field, List<String> msgList, String nameCn, String nameEn) {
|
||||
String errorMsg, String field, List<String> msgList, String nameCn, String nameEn) {
|
||||
|
||||
//判断格式是否正确
|
||||
boolean flag = true;
|
||||
if(ObjectUtils.isNotEmpty(field)){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String format = sdf.format(field);
|
||||
if (!DateUtils.isValidDate(format)) {
|
||||
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
// String format = sdf.format(field);
|
||||
if (!DateUtils.isValidDate(field)) {
|
||||
flag = false;
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
|
||||
errorMsg += nameCn + "格式不正确, 正确格式如:yyyy/m/d、yyyy-MM-dd、yyyy年MM月dd日";
|
||||
@@ -3203,6 +3234,24 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
}
|
||||
msgList.add(errorMsg);
|
||||
}
|
||||
Date now = new Date();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
long longnow = now.getTime();
|
||||
try {
|
||||
Date date = sdf.parse(field);
|
||||
long longdate = date.getTime();
|
||||
if(longnow>longdate){
|
||||
flag = false;
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
|
||||
errorMsg += nameCn + "不能导入今天之前的日期";
|
||||
}else{
|
||||
errorMsg += nameEn + " Cannot import dates before today ";
|
||||
}
|
||||
msgList.add(errorMsg);
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
@@ -3315,7 +3364,39 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
}
|
||||
return null;
|
||||
}
|
||||
private void personDutyPerson(ProjectCertificationInventoryEO projectCertificationInventoryEO,
|
||||
String errorMsg, List<String> msgList, String regulationOwnerId,
|
||||
List<SysUser> listUserName ,String nameCn, String nameEn){
|
||||
//单选
|
||||
if(regulationOwnerId.contains(",")){
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
|
||||
errorMsg += nameCn + "导入只能填写一个用户名, ";
|
||||
}else{
|
||||
errorMsg += "Only one user name can be entered for"+ nameEn +"import, ";
|
||||
}
|
||||
msgList.add(errorMsg);
|
||||
}
|
||||
|
||||
int count =0;
|
||||
for(SysUser name : listUserName){
|
||||
if(StringUtils.isNotEmpty(name.getUsername())){
|
||||
if(name.getUsername().equals(regulationOwnerId)){
|
||||
count++;
|
||||
String id = name.getId();
|
||||
projectCertificationInventoryEO.setDutyPerson(id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(count==0){
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
|
||||
errorMsg += nameCn+regulationOwnerId+"与所有人员名单不匹配";
|
||||
}else{
|
||||
errorMsg += nameEn+regulationOwnerId+"does not match a person with all person list";
|
||||
}
|
||||
msgList.add(errorMsg);
|
||||
}
|
||||
}
|
||||
private void personnelVerify(ProjectCertificationInventoryEO projectCertificationInventoryEO,
|
||||
String errorMsg, List<String> msgList, String regulationOwnerId,
|
||||
List<Map<String, String>> mapList, String nameCn, String nameEn, String fieldNumber) {
|
||||
@@ -3337,8 +3418,6 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
count ++;
|
||||
if(com.jero.modules.project.enums.ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue().equals(fieldNumber)){
|
||||
projectCertificationInventoryEO.setSdt(stringStringMap.get("value"));
|
||||
}else if(com.jero.modules.project.enums.ProjectRoleEnum.DUTYPERSON.getValue().equals(fieldNumber)){
|
||||
projectCertificationInventoryEO.setDutyPerson(stringStringMap.get("value"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -3456,12 +3535,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
List<OSSFile> fileInfos = getOssFiles(dataList);
|
||||
//处理文件名称
|
||||
|
||||
String fileName = "";
|
||||
for (int i = 0; i < dataList.size(); i++) {
|
||||
if(StringUtils.isNotEmpty(dataList.get(i).getDeliveryResult())){
|
||||
String fileName = ossFileService.getFileInfos(dataList.get(i).getDeliveryResult()).stream().map(OSSFile::getFileName).distinct().collect(Collectors.joining(","));
|
||||
dataList.get(i).setDeliveryResult(fileName);
|
||||
|
||||
}
|
||||
if(StringUtils.isNotEmpty(dataList.get(i).getDeliverableTemplate())){
|
||||
String deliverableTemplateName = template(fileInfos, dataList.get(i).getDeliverableTemplate());
|
||||
dataList.get(i).setDeliverableTemplateName(deliverableTemplateName);
|
||||
@@ -3482,6 +3557,30 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
fileTemp.mkdirs();
|
||||
//文件
|
||||
exportFile(dataList,fileInfos);
|
||||
|
||||
for(int i =0 ;i<dataList.size();i++){
|
||||
if(dataList.get(i).getValueType().equals(SysCategoryValueTypeEnum.FILE.getValue())){
|
||||
if(StringUtils.isNotEmpty(dataList.get(i).getDeliveryResult())){
|
||||
fileName = ossFileService.getFileInfos(dataList.get(i).getDeliveryResult()).stream().map(OSSFile::getFileName).distinct().collect(Collectors.joining(","));
|
||||
dataList.get(i).setDeliveryResult(fileName);
|
||||
|
||||
}
|
||||
}else if(dataList.get(i).getValueType().equals(SysCategoryValueTypeEnum.TEXT.getValue())){
|
||||
if(StringUtils.isNotEmpty(dataList.get(i).getDeliveryResult())){
|
||||
fileName = dataList.get(i).getDeliveryResult();
|
||||
dataList.get(i).setDeliveryResult(fileName);
|
||||
}
|
||||
}else if(dataList.get(i).getValueType().equals(SysCategoryValueTypeEnum.NA.getValue())){
|
||||
fileName = "";
|
||||
dataList.get(i).setDeliveryResult(fileName);
|
||||
}else if(dataList.get(i).getValueType().equals(SysCategoryValueTypeEnum.SELECT.getValue())) {
|
||||
if (StringUtils.isNotEmpty(dataList.get(i).getDeliveryResult())) {
|
||||
fileName = dataList.get(i).getDeliveryResult();
|
||||
dataList.get(i).setDeliveryResult(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String excelName = projectCertificationInventoryEO.getExcelName()+".xlsx";
|
||||
// String excelName = "";
|
||||
// if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
|
||||
@@ -3540,15 +3639,22 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
for(ProjectCertificationInventoryEO projectCertificationInventoryEO : dataList){
|
||||
String deliverableTemplate = projectCertificationInventoryEO.getDeliverableTemplate();
|
||||
String serialNumber = projectCertificationInventoryEO.getSerialNumber();
|
||||
String deliveryResult = projectCertificationInventoryEO.getDeliveryResult();
|
||||
if(StringUtils.isBlank(serialNumber)){
|
||||
continue;
|
||||
}
|
||||
List<OSSFile> deliverableTemplateFileList = new ArrayList<>();
|
||||
List<OSSFile> deliveryResultList = new ArrayList<>();
|
||||
List<OSSFile> oSSFileList = new ArrayList<>();
|
||||
if(StringUtils.isNotBlank(deliverableTemplate)){
|
||||
deliverableTemplateFileList = fileInfos.stream().filter(e -> deliverableTemplate.contains(e.getId())).collect(Collectors.toList());
|
||||
oSSFileList.addAll(deliverableTemplateFileList);
|
||||
}
|
||||
if(StringUtils.isNotBlank(deliveryResult) && projectCertificationInventoryEO.getValueType().equals(SysCategoryValueTypeEnum.FILE.getValue())){
|
||||
deliveryResultList = fileInfos.stream().filter(e -> deliveryResult.contains(e.getId())).collect(Collectors.toList());
|
||||
oSSFileList.addAll(deliveryResultList);
|
||||
|
||||
}
|
||||
if(oSSFileList.size() != 0){
|
||||
String fileNowPath = uploadpath + "/tempZip/" + serialNumber;
|
||||
File file = new File(fileNowPath);
|
||||
@@ -3594,6 +3700,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
if(StringUtils.isNotBlank(projectCertificationInventoryEO.getDeliverableTemplate())){
|
||||
fileIdList.add(projectCertificationInventoryEO.getDeliverableTemplate());
|
||||
}
|
||||
if(StringUtils.isNotBlank(projectCertificationInventoryEO.getDeliveryResult())){
|
||||
fileIdList.add(projectCertificationInventoryEO.getDeliveryResult());
|
||||
}
|
||||
}
|
||||
//查询所有的文件
|
||||
List<OSSFile> fileInfos = new ArrayList<>();
|
||||
@@ -3679,8 +3788,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
case "*交付物类型": return "deliverableTypeName";
|
||||
case "交付物模板": return "deliverableTemplateName";
|
||||
case "交付结果": return "deliveryResult";
|
||||
case "*截止日期": return "endTime";
|
||||
// case "*截止日期": return "endTimeStr";
|
||||
case "截止日期": return "endTime";
|
||||
case "*截止日期": return "endTimeStr";
|
||||
case "流程状态": return "flowStatus";
|
||||
case "报告编号": return "reportNumber";
|
||||
case "产品型号": return "productModel";
|
||||
@@ -3697,8 +3806,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
case "*Deliverable Type": return "deliverableTypeNameEn";
|
||||
case "Deliverable Template": return "deliverableTemplateName";
|
||||
case "Deliverables Result": return "deliveryResult";
|
||||
case "*Due Date": return "endTime";
|
||||
// case "*Due Date": return "endTimeStr";
|
||||
case "Due Date": return "endTime";
|
||||
case "*Due Date": return "endTimeStr";
|
||||
case "Process Status": return "flowStatus";
|
||||
case "Report No": return "reportNumber";
|
||||
case "Product Model": return "productModel";
|
||||
|
||||
Reference in New Issue
Block a user