工艺V1.1

highway
zhaoxiaolin 1 year ago
parent f7cd042705
commit 49e1a80e02

@ -73,7 +73,7 @@ public class ProProcessServiceImpl implements IProProcessService
@Override @Override
public Boolean checkProcessCodeUnique(ProProcess proProcess) { public Boolean checkProcessCodeUnique(ProProcess proProcess) {
ProProcess process = proProcessMapper.checkProcessCodeUnique(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.NOT_UNIQUE;
} }
return UserConstants.UNIQUE; return UserConstants.UNIQUE;
@ -89,7 +89,7 @@ public class ProProcessServiceImpl implements IProProcessService
public Boolean checkProcessNameUnique(ProProcess proProcess) { public Boolean checkProcessNameUnique(ProProcess proProcess) {
ProProcess process = proProcessMapper.checkProcessNameUnique(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.NOT_UNIQUE;
} }
return UserConstants.UNIQUE; return UserConstants.UNIQUE;

@ -74,7 +74,7 @@ public class ProRouteServiceImpl implements IProRouteService
public Boolean checkRouteCodeUnique(ProRoute proRoute) { public Boolean checkRouteCodeUnique(ProRoute proRoute) {
ProRoute route = proRouteMapper.checkRouteCodeUnique(proRoute); ProRoute route = proRouteMapper.checkRouteCodeUnique(proRoute);
String routeId = proRoute.getRouteId(); 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.NOT_UNIQUE;
} }
return UserConstants.UNIQUE; return UserConstants.UNIQUE;

@ -59,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
enable_flag, remark, attr1, attr2, attr3, attr4, enable_flag, remark, attr1, attr2, attr3, attr4,
create_by, create_time, update_by, update_time create_by, create_time, update_by, update_time
from pro_route from pro_route
where route_code = #{routeCode} and route_id not in(#{routeId}) where route_code = #{routeCode}
</select> </select>
<insert id="insertProRoute" parameterType="ProRoute" useGeneratedKeys="true" keyProperty="routeId"> <insert id="insertProRoute" parameterType="ProRoute" useGeneratedKeys="true" keyProperty="routeId">

Loading…
Cancel
Save