diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/ProProcessServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/ProProcessServiceImpl.java index 69d2b510..e2e470e8 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/ProProcessServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/ProProcessServiceImpl.java @@ -73,7 +73,7 @@ public class ProProcessServiceImpl implements IProProcessService @Override public Boolean checkProcessCodeUnique(ProProcess proProcess) { ProProcess process = proProcessMapper.checkProcessCodeUnique(proProcess); - if(StringUtils.isNotNull(process) && process.getProcessId().equals(proProcess.getProcessId())){ + if(StringUtils.isNotNull(process) && !process.getProcessId().equals(proProcess.getProcessId())){ return UserConstants.NOT_UNIQUE; } return UserConstants.UNIQUE; @@ -89,7 +89,7 @@ public class ProProcessServiceImpl implements IProProcessService public Boolean checkProcessNameUnique(ProProcess proProcess) { ProProcess process = proProcessMapper.checkProcessNameUnique(proProcess); - if(StringUtils.isNotNull(process) && process.getProcessId().equals(proProcess.getProcessId())){ + if(StringUtils.isNotNull(process) && !process.getProcessId().equals(proProcess.getProcessId())){ return UserConstants.NOT_UNIQUE; } return UserConstants.UNIQUE; diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/ProRouteServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/ProRouteServiceImpl.java index 08c4d8a0..958bff26 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/ProRouteServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/ProRouteServiceImpl.java @@ -74,7 +74,7 @@ public class ProRouteServiceImpl implements IProRouteService public Boolean checkRouteCodeUnique(ProRoute proRoute) { ProRoute route = proRouteMapper.checkRouteCodeUnique(proRoute); String routeId = proRoute.getRouteId(); - if(StringUtils.isNotNull(route) && route.getRouteId().equals(routeId)){ + if(StringUtils.isNotNull(route) && !route.getRouteId().equals(routeId)){ return UserConstants.NOT_UNIQUE; } return UserConstants.UNIQUE; diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/ProRouteMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/ProRouteMapper.xml index e2b790b0..0aed06d7 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/ProRouteMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/ProRouteMapper.xml @@ -59,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" enable_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from pro_route - where route_code = #{routeCode} and route_id not in(#{routeId}) + where route_code = #{routeCode}