点检计划-设备列表

This commit is contained in:
JinLu.Yin 2022-06-18 13:53:22 +08:00
parent a3becd89f3
commit 67c9b42855
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ public class DvCheckMachineryServiceImpl implements IDvCheckMachineryService
public String checkMachineryUnique(DvCheckMachinery dvCheckMachinery) { public String checkMachineryUnique(DvCheckMachinery dvCheckMachinery) {
DvCheckMachinery machinery = dvCheckMachineryMapper.checkMachineryUnique(dvCheckMachinery); DvCheckMachinery machinery = dvCheckMachineryMapper.checkMachineryUnique(dvCheckMachinery);
Long recordId = dvCheckMachinery.getRecordId()==null?-1L:dvCheckMachinery.getRecordId(); 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.NOT_UNIQUE;
} }
return UserConstants.UNIQUE; return UserConstants.UNIQUE;

View File

@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="checkMachineryUnique" parameterType="DvCheckMachinery" resultMap="DvCheckMachineryResult"> <select id="checkMachineryUnique" parameterType="DvCheckMachinery" resultMap="DvCheckMachineryResult">
<include refid="selectDvCheckMachineryVo"/> <include refid="selectDvCheckMachineryVo"/>
where machinery_id = #{machineryId} where machinery_id = #{machineryId} limit 1
</select> </select>
<insert id="insertDvCheckMachinery" parameterType="DvCheckMachinery" useGeneratedKeys="true" keyProperty="recordId"> <insert id="insertDvCheckMachinery" parameterType="DvCheckMachinery" useGeneratedKeys="true" keyProperty="recordId">