|
@@ -4,7 +4,6 @@ package com.jeeplus.modules.projectmaterialstorage.service;
|
|
|
import com.jeeplus.common.persistence.Page;
|
|
|
import com.jeeplus.common.service.CrudService;
|
|
|
import com.jeeplus.common.utils.IdGen;
|
|
|
-import com.jeeplus.common.utils.StringUtils;
|
|
|
import com.jeeplus.modules.projectmaterialstorage.dao.ProjectMaterialStorageDao;
|
|
|
import com.jeeplus.modules.projectmaterialstorage.entity.ProjectMaterialStorage;
|
|
|
import com.jeeplus.modules.projectmaterialstorage.entity.ProjectMaterialStorageImport;
|
|
@@ -88,17 +87,8 @@ public class ProjectMaterialStorageService extends CrudService<ProjectMaterialSt
|
|
|
}
|
|
|
// 如果列表长度和set长度不符合,代表有不符合条件的参数
|
|
|
if(projectMaterialStorageImports.size() != set.size()){
|
|
|
- if(list.size()>0){
|
|
|
- for(int k =0;k< list.size();k++){
|
|
|
- for(int j =0;j<list.size();j++){
|
|
|
- if(list.get(k).toString().equals(list.get(j).toString())){
|
|
|
-
|
|
|
- stringBuilder.append(" 在第"+i+"行的材料名、价格或单位重复");
|
|
|
- map.put("failure",stringBuilder);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ stringBuilder.append(" 数据中存在重复材料,无法进行添加");
|
|
|
+ map.put("failure",stringBuilder);
|
|
|
return map;
|
|
|
}
|
|
|
// 数据库判断
|
|
@@ -106,7 +96,7 @@ public class ProjectMaterialStorageService extends CrudService<ProjectMaterialSt
|
|
|
//材料列表数据库重复判断
|
|
|
ProjectMaterialStorageImport projectMaterialStorageImport = projectMaterialStorageImports.get(j);
|
|
|
if(projectMaterialStorageDao.selectCountAboutProjectMaterialStorage(projectMaterialStorageImport)!=0){
|
|
|
- stringBuilder.append("第"+j+"行的材料名、价格、单位重复,请重新添加");
|
|
|
+ stringBuilder.append("第"+j+"行的材料已存在,请勿重复添加");
|
|
|
flag = true;
|
|
|
}
|
|
|
}
|