点检计划-设备列表
This commit is contained in:
parent
a3becd89f3
commit
67c9b42855
@ -51,7 +51,7 @@ public class DvCheckMachineryServiceImpl implements IDvCheckMachineryService
|
||||
public String checkMachineryUnique(DvCheckMachinery dvCheckMachinery) {
|
||||
DvCheckMachinery machinery = dvCheckMachineryMapper.checkMachineryUnique(dvCheckMachinery);
|
||||
Long recordId = dvCheckMachinery.getRecordId()==null?-1L:dvCheckMachinery.getRecordId();
|
||||
if(StringUtils.isNotNull(machinery) && machinery.getRecordId().longValue() == recordId.longValue()){
|
||||
if(StringUtils.isNotNull(machinery) && machinery.getRecordId().longValue() != recordId.longValue()){
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
|
@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="checkMachineryUnique" parameterType="DvCheckMachinery" resultMap="DvCheckMachineryResult">
|
||||
<include refid="selectDvCheckMachineryVo"/>
|
||||
where machinery_id = #{machineryId}
|
||||
where machinery_id = #{machineryId} limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertDvCheckMachinery" parameterType="DvCheckMachinery" useGeneratedKeys="true" keyProperty="recordId">
|
||||
|
Loading…
Reference in New Issue
Block a user