市场认证清单导入必填项校验和编号验证修改
This commit is contained in:
+49
-60
@@ -658,6 +658,43 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
|
||||
}
|
||||
}
|
||||
}
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEO.getCut())){
|
||||
for(int k = 0 ;k<rowList.size();k++){
|
||||
if("".equals(rowList.get("category")) ||
|
||||
"".equals(rowList.get("inspectionItem")) ||
|
||||
"".equals(rowList.get("configItem")) ||
|
||||
"".equals(rowList.get("wvtaId")) ||
|
||||
"".equals(rowList.get("serialNumber")) ||
|
||||
"".equals(rowList.get("dutyTerritoryName")) ||
|
||||
"".equals(rowList.get("deliverableTypeName")) ){
|
||||
//删除原上传文件
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEO.getCut())){
|
||||
throw new JeroBootException("请填写必填字段内容,带*的为必填");
|
||||
}else{
|
||||
throw new JeroBootException("Please fill in the required fields marked with *");
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
for(int k = 0 ;k<rowList.size();k++){
|
||||
if("".equals(rowList.get("category")) ||
|
||||
"".equals(rowList.get("inspectionItem")) ||
|
||||
"".equals(rowList.get("configItem")) ||
|
||||
"".equals(rowList.get("wvtaId")) ||
|
||||
"".equals(rowList.get("serialNumber")) ||
|
||||
"".equals(rowList.get("dutyTerritoryName")) ||
|
||||
"".equals(rowList.get("deliverableTypeNameEn")) ){
|
||||
//删除原上传文件
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEO.getCut())){
|
||||
throw new JeroBootException("请填写必填字段内容,带*的为必填");
|
||||
}else{
|
||||
throw new JeroBootException("Please fill in the required fields marked with *");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (i > 1) {
|
||||
dataList.add(rowList);
|
||||
}
|
||||
@@ -797,86 +834,54 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
|
||||
//WVTA ID
|
||||
|
||||
if(StringUtils.isNotBlank(wvtaId)){
|
||||
if(wvtaId.length() > 100){
|
||||
if(wvtaId.length() > 300){
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())){
|
||||
message = errorMsg + "WVTA ID不能超过100个字符, ";
|
||||
message = errorMsg + "WVTA ID不能超过300个字符, ";
|
||||
}else{
|
||||
message = errorMsg + " The WVTA ID cannot contain more than 100 characters, ";
|
||||
message = errorMsg + " The WVTA ID cannot contain more than 300 characters, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
} else {
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())){
|
||||
message = errorMsg + "WVTA ID不能为空, ";
|
||||
}else{
|
||||
message = errorMsg + " The WVTA ID cannot null, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
//类别
|
||||
|
||||
if(StringUtils.isNotBlank(category)){
|
||||
if(category.length() > 100){
|
||||
if(category.length() > 300){
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())){
|
||||
message = errorMsg + "类别不能超过100个字符, ";
|
||||
message = errorMsg + "类别不能超过300个字符, ";
|
||||
}else{
|
||||
message = errorMsg + " The Category cannot contain more than 100 characters, ";
|
||||
message = errorMsg + " The Category cannot contain more than 300 characters, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
}else {
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())){
|
||||
message = errorMsg + "类别不能为空, ";
|
||||
}else{
|
||||
message = errorMsg + " The Category cannot null, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
//检验项目
|
||||
|
||||
if(StringUtils.isNotBlank(inspectionItem)){
|
||||
if(inspectionItem.length() > 100){
|
||||
if(inspectionItem.length() > 300){
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())){
|
||||
message = errorMsg + "检验项目不能超过100个字符, ";
|
||||
message = errorMsg + "检验项目不能超过300个字符, ";
|
||||
}else{
|
||||
message = errorMsg + " The InspectionItem cannot contain more than 100 characters, ";
|
||||
message = errorMsg + " The InspectionItem cannot contain more than 300 characters, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
}else {
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())){
|
||||
message = errorMsg + "检验项目不能为空, ";
|
||||
}else{
|
||||
message = errorMsg + " The InspectionItem cannot null, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
//配置项
|
||||
|
||||
if(StringUtils.isNotBlank(configItem)){
|
||||
if(configItem.length() > 100){
|
||||
if(configItem.length() > 300){
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())){
|
||||
message = errorMsg + "配置项不能超过100个字符, ";
|
||||
message = errorMsg + "配置项不能超过300个字符, ";
|
||||
}else{
|
||||
message = errorMsg + " The ConfigItem cannot contain more than 100 characters, ";
|
||||
message = errorMsg + " The ConfigItem cannot contain more than 300 characters, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
}else {
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())){
|
||||
message = errorMsg + "配置项不能为空, ";
|
||||
}else{
|
||||
message = errorMsg + " The ConfigItem cannot null, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
//责任领域
|
||||
if(StringUtils.isNotBlank(dutyTerritory)){
|
||||
@@ -884,14 +889,6 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
authDummyInventoryInfoEO.setDutyTerritory(value);
|
||||
}
|
||||
}else {
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())){
|
||||
message = errorMsg + "责任领域不能为空, ";
|
||||
}else{
|
||||
message = errorMsg + " The Responsible Field cannot null, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
//交付物类型
|
||||
if(StringUtils.isNotEmpty(deliverableType)){
|
||||
@@ -900,14 +897,6 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
|
||||
String treeId = getTreeId(categoryList, authDummyInventoryInfoEOTemp, treeNameList, value);
|
||||
authDummyInventoryInfoEO.setDeliverableType(treeId);
|
||||
}
|
||||
}else{
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())){
|
||||
message = errorMsg + "交付物类型不能为空, ";
|
||||
}else{
|
||||
message = errorMsg + " The Deliverable Type cannot null, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
}
|
||||
return msgList;
|
||||
|
||||
+92
-83
@@ -3049,7 +3049,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
|
||||
|
||||
//编号必填
|
||||
flag = must(projectCertificationInventoryEO, errorMsg, msgList, serialNumber, "编号", "Standard No");
|
||||
// flag = must(projectCertificationInventoryEO, errorMsg, msgList, serialNumber, "编号", "Standard No");
|
||||
|
||||
//报告编号
|
||||
if(StringUtils.isNotBlank(reportNumber)){
|
||||
@@ -3099,15 +3099,16 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
} else {
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
|
||||
message = errorMsg + "WVTA ID不能为空, ";
|
||||
}else{
|
||||
message = errorMsg + " The WVTA ID cannot null, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
// else {
|
||||
// String message = "";
|
||||
// if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
|
||||
// message = errorMsg + "WVTA ID不能为空, ";
|
||||
// }else{
|
||||
// message = errorMsg + " The WVTA ID cannot null, ";
|
||||
// }
|
||||
// msgList.add(message);
|
||||
// }
|
||||
//类别
|
||||
|
||||
if(StringUtils.isNotBlank(category)){
|
||||
@@ -3120,15 +3121,16 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
}else {
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
|
||||
message = errorMsg + "类别不能为空, ";
|
||||
}else{
|
||||
message = errorMsg + " The Category cannot null, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
// else {
|
||||
// String message = "";
|
||||
// if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
|
||||
// message = errorMsg + "类别不能为空, ";
|
||||
// }else{
|
||||
// message = errorMsg + " The Category cannot null, ";
|
||||
// }
|
||||
// msgList.add(message);
|
||||
// }
|
||||
//检验项目
|
||||
|
||||
if(StringUtils.isNotBlank(inspectionItem)){
|
||||
@@ -3141,15 +3143,16 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
}else {
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
|
||||
message = errorMsg + "检验项目不能为空, ";
|
||||
}else{
|
||||
message = errorMsg + " The InspectionItem cannot null, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
// else {
|
||||
// String message = "";
|
||||
// if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
|
||||
// message = errorMsg + "检验项目不能为空, ";
|
||||
// }else{
|
||||
// message = errorMsg + " The InspectionItem cannot null, ";
|
||||
// }
|
||||
// msgList.add(message);
|
||||
// }
|
||||
//配置项
|
||||
|
||||
if(StringUtils.isNotBlank(configItem)){
|
||||
@@ -3162,15 +3165,16 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
}else {
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
|
||||
message = errorMsg + "配置项不能为空, ";
|
||||
}else{
|
||||
message = errorMsg + " The ConfigItem cannot null, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
// else {
|
||||
// String message = "";
|
||||
// if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
|
||||
// message = errorMsg + "配置项不能为空, ";
|
||||
// }else{
|
||||
// message = errorMsg + " The ConfigItem cannot null, ";
|
||||
// }
|
||||
// msgList.add(message);
|
||||
// }
|
||||
|
||||
//责任领域
|
||||
|
||||
@@ -3179,15 +3183,16 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
projectCertificationInventoryEO.setDutyTerritory(value);
|
||||
}
|
||||
}else {
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
|
||||
message = errorMsg + "责任领域不能为空, ";
|
||||
}else{
|
||||
message = errorMsg + " The Responsible Field cannot null, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
// else {
|
||||
// String message = "";
|
||||
// if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
|
||||
// message = errorMsg + "责任领域不能为空, ";
|
||||
// }else{
|
||||
// message = errorMsg + " The Responsible Field cannot null, ";
|
||||
// }
|
||||
// msgList.add(message);
|
||||
// }
|
||||
//工程接口人(责任领域下的工程接口人)
|
||||
Map<String, Object> objectMap = iProjectRelatedPersonnelService.queryPersonByProjectId(projectCertificationInventoryEOTemp.getProjectLibraryId(), value);
|
||||
|
||||
@@ -3209,30 +3214,32 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
nameEn = "Eng. Interface ";
|
||||
//验证人员是否存在
|
||||
personnelVerify(projectCertificationInventoryEO, errorMsg, msgList, sdt, mapPersonList,nameCn,nameEn, com.jero.modules.project.enums.ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue());
|
||||
}else {
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
|
||||
message = errorMsg + "工程接口人不能为空, ";
|
||||
}else{
|
||||
message = errorMsg + " The Eng. Interface cannot null, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
// else {
|
||||
// String message = "";
|
||||
// if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
|
||||
// message = errorMsg + "工程接口人不能为空, ";
|
||||
// }else{
|
||||
// message = errorMsg + " The Eng. Interface cannot null, ";
|
||||
// }
|
||||
// msgList.add(message);
|
||||
// }
|
||||
//责任人
|
||||
if(StringUtils.isNotBlank(dutyPerson)){
|
||||
nameCn = "责任人";
|
||||
nameEn = "Assignee";
|
||||
//验证人员是否存在
|
||||
personDutyPerson(projectCertificationInventoryEO, errorMsg, msgList, dutyPerson, listUserName,nameCn,nameEn);
|
||||
}else {
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
|
||||
message = errorMsg + "责任人不能为空, ";
|
||||
}else{
|
||||
message = errorMsg + " The Assignee cannot null, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
// else {
|
||||
// String message = "";
|
||||
// if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
|
||||
// message = errorMsg + "责任人不能为空, ";
|
||||
// }else{
|
||||
// message = errorMsg + " The Assignee cannot null, ";
|
||||
// }
|
||||
// msgList.add(message);
|
||||
// }
|
||||
//交付物类型
|
||||
if(StringUtils.isNotEmpty(deliverableType)){
|
||||
value = tree(categoryList,treeNameList, projectCertificationInventoryEO, errorMsg, deliverableType,msgList,"交付物类型","Deliverable Type","deliverable_template");
|
||||
@@ -3240,15 +3247,16 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
String treeId = getTreeId(categoryList, projectCertificationInventoryEOTemp, treeNameList, value);
|
||||
projectCertificationInventoryEO.setDeliverableType(treeId);
|
||||
}
|
||||
}else{
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
|
||||
message = errorMsg + "交付物类型不能为空, ";
|
||||
}else{
|
||||
message = errorMsg + " The Deliverable Type cannot null, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
// else{
|
||||
// String message = "";
|
||||
// if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
|
||||
// message = errorMsg + "交付物类型不能为空, ";
|
||||
// }else{
|
||||
// message = errorMsg + " The Deliverable Type cannot null, ";
|
||||
// }
|
||||
// msgList.add(message);
|
||||
// }
|
||||
|
||||
//交付物模板
|
||||
value = templateTransition(zipEntryName, projectCertificationInventoryEO, errorMsg, deliverableTemplate,msgList,"交付物模板","Deliverable Template");
|
||||
@@ -3270,15 +3278,16 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
}
|
||||
projectCertificationInventoryEO.setEndTime(date);
|
||||
}
|
||||
}else{
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
|
||||
message = errorMsg + "截止时间不能为空, ";
|
||||
}else{
|
||||
message = errorMsg + " The Due Date Type cannot null, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
// else{
|
||||
// String message = "";
|
||||
// if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
|
||||
// message = errorMsg + "截止时间不能为空, ";
|
||||
// }else{
|
||||
// message = errorMsg + " The Due Date Type cannot null, ";
|
||||
// }
|
||||
// msgList.add(message);
|
||||
// }
|
||||
|
||||
}
|
||||
return msgList;
|
||||
@@ -3314,9 +3323,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
if (!DateUtils.isValidDate(field)) {
|
||||
flag = false;
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
|
||||
errorMsg += nameCn + "格式不正确, 正确格式如:yyyy/m/d、yyyy-MM-dd、yyyy年MM月dd日";
|
||||
errorMsg += nameCn + "格式不正确, 正确格式如:yyyy/m/d、yyyy-MM-dd、yyyy年MM月dd日, ";
|
||||
}else{
|
||||
errorMsg += nameEn + " Incorrect format correct format is:yyyy/m/d、yyyy-MM-dd、yyyy年MM月dd日";
|
||||
errorMsg += nameEn + " Incorrect format correct format is:yyyy/m/d、yyyy-MM-dd、yyyy年MM月dd日, ";
|
||||
}
|
||||
msgList.add(errorMsg);
|
||||
}
|
||||
@@ -3329,9 +3338,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
if(longnow>longdate){
|
||||
flag = false;
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
|
||||
errorMsg += nameCn + "不能导入今天之前的日期";
|
||||
errorMsg += nameCn + "不能导入今天之前的日期, ";
|
||||
}else{
|
||||
errorMsg += nameEn + " Cannot import dates before today ";
|
||||
errorMsg += nameEn + " Cannot import dates before today, ";
|
||||
}
|
||||
msgList.add(errorMsg);
|
||||
}
|
||||
@@ -3476,9 +3485,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
}
|
||||
if(count==0){
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
|
||||
errorMsg += nameCn+regulationOwnerId+"与所有人员名单不匹配";
|
||||
errorMsg += nameCn+regulationOwnerId+"与所有人员名单不匹配, ";
|
||||
}else{
|
||||
errorMsg += nameEn+regulationOwnerId+"does not match a person with all person list";
|
||||
errorMsg += nameEn+regulationOwnerId+"does not match a person with all person list, ";
|
||||
}
|
||||
msgList.add(errorMsg);
|
||||
}
|
||||
@@ -3510,17 +3519,17 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
}
|
||||
if(count == 0){
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
|
||||
errorMsg += nameCn+regulationOwnerId+"与相关人员名单中责任领域下的人员不匹配";
|
||||
errorMsg += nameCn+regulationOwnerId+"与相关人员名单中责任领域下的人员不匹配, ";
|
||||
}else{
|
||||
errorMsg += nameEn+regulationOwnerId+"does not match a person under the Responsible Field in the relevant person list";
|
||||
errorMsg += nameEn+regulationOwnerId+"does not match a person under the Responsible Field in the relevant person list, ";
|
||||
}
|
||||
msgList.add(errorMsg);
|
||||
}
|
||||
}else{
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
|
||||
errorMsg += nameCn+regulationOwnerId+"与相关人员名单中责任领域下的人员不匹配";
|
||||
errorMsg += nameCn+regulationOwnerId+"与相关人员名单中责任领域下的人员不匹配, ";
|
||||
}else{
|
||||
errorMsg += nameEn+regulationOwnerId+"does not match a person under the Responsible Field in the relevant person list";
|
||||
errorMsg += nameEn+regulationOwnerId+"does not match a person under the Responsible Field in the relevant person list, ";
|
||||
}
|
||||
msgList.add(errorMsg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user