Commit d7e0008e by 江和松

校验项目重复问题

parent 6d02b731
...@@ -140,13 +140,13 @@ public class ServiceHGSC004 extends ServiceBase { ...@@ -140,13 +140,13 @@ public class ServiceHGSC004 extends ServiceBase {
AssertUtils.isTrue(hgsc003.getBlueprintStatus().compareTo(HGConstant.EnablingStatus.TY) == 0,"蓝图已停用不可修改!"); AssertUtils.isTrue(hgsc003.getBlueprintStatus().compareTo(HGConstant.EnablingStatus.TY) == 0,"蓝图已停用不可修改!");
} }
Map<String,Object> map = new HashMap<>(); Map<String,Object> map = new HashMap<>();
map.put("blueprintId",hgsc004.getBlueprintId()); map.put("projCode",hgsc004.getProjCode());
List<HGSC004> hgsc004List = this.dao.query(HGSC004.QUERY,map); List<HGSC004> hgsc004List = this.dao.query(HGSC004.QUERY,map);
for(HGSC004 o : hgsc004List){ for(HGSC004 o : hgsc004List){
if(Objects.nonNull(hgsc004.getId())&&hgsc004.getId()>0){ if(Objects.nonNull(hgsc004.getId())&&hgsc004.getId()>0){
AssertUtils.isTrue(!(o.getId().intValue() == hgsc004.getId().intValue()),"当前蓝图已存在!"); AssertUtils.isTrue(!(o.getId().intValue() == hgsc004.getId().intValue()),"当前项目已存在!");
}else{ }else{
AssertUtils.isTrue(Objects.nonNull(o),"当前蓝图已存在!"); AssertUtils.isTrue(Objects.nonNull(o),"当前项目已存在!");
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment