边带设备属性配置
This commit is contained in:
parent
4549c553e1
commit
06c42e5df8
|
|
@ -167,7 +167,7 @@ public interface IDeviceOfBdMapper {
|
|||
List<DeviceBdDetailVo> getDeviceBdChildDetailList(DeviceBdDto dto);
|
||||
|
||||
/**
|
||||
* 设备级联编码 是否存在
|
||||
* 检测名称 是否存在
|
||||
*
|
||||
* @param vo
|
||||
* @return int
|
||||
|
|
|
|||
|
|
@ -216,6 +216,10 @@ public class DeviceOfBdServiceImpl implements IDeviceOfBdService {
|
|||
if (StringUtils.isNotBlank(validResult)) {
|
||||
return AjaxResult.error(validResult);
|
||||
}
|
||||
int result = mapper.isBdDeviceDetailExist(vo);
|
||||
if (result > 0) {
|
||||
return AjaxResult.error("检测不能重复");
|
||||
}
|
||||
if (StringUtils.isEmpty(vo.getId())) {
|
||||
String id = IdUtils.getUUId();
|
||||
vo.setId(id);
|
||||
|
|
|
|||
|
|
@ -321,10 +321,10 @@
|
|||
<!--设备级联编码 是否存在-->
|
||||
<select id="isBdDeviceDetailExist" resultType="java.lang.Integer">
|
||||
<if test="id == null or id == ''">
|
||||
SELECT COUNT(*) FROM tb_device_detail tdd WHERE device_id = #{deviceId} AND device_code = #{deviceCode} AND del_flag = 0
|
||||
SELECT COUNT(*) FROM tb_device_detail tdd WHERE device_id = #{deviceId} AND mode_name = #{modeName} AND del_flag = 0
|
||||
</if>
|
||||
<if test="id != null and id != ''">
|
||||
SELECT COUNT(*) FROM tb_device_detail tdd WHERE device_id = #{deviceId} AND device_code = #{deviceCode} AND id != #{id} AND del_flag = 0
|
||||
SELECT COUNT(*) FROM tb_device_detail tdd WHERE device_id = #{deviceId} AND mode_name = #{modeName} AND id != #{id} AND del_flag = 0
|
||||
</if>
|
||||
</select>
|
||||
<!--边带子设备详情数据-->
|
||||
|
|
|
|||
Loading…
Reference in New Issue