Merge remote-tracking branch 'origin/master'

This commit is contained in:
haozq 2024-04-19 14:06:47 +08:00
commit 32aa795b31
3 changed files with 4 additions and 9 deletions

View File

@ -31,12 +31,10 @@ public class DeviceBdDetailVo {
@ApiModelProperty("最大阈值") @ApiModelProperty("最大阈值")
@Length(max = 50, message = "最大阈值字符长度不能超过50", groups = {Query.class}) @Length(max = 50, message = "最大阈值字符长度不能超过50", groups = {Query.class})
@Pattern(regexp = "(([0-9]+\\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\\.[0-9]+)|([0-9]*[1-9][0-9]*))",message = "最大阈值为大于0的数字",groups = {Query.class})
private String maxValueData; private String maxValueData;
@ApiModelProperty("最小阈值") @ApiModelProperty("最小阈值")
@Length(max = 50, message = "最小阈值长字符度不能超过50", groups = {Query.class}) @Length(max = 50, message = "最小阈值长字符度不能超过50", groups = {Query.class})
@Pattern(regexp = "(([0-9]+\\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\\.[0-9]+)|([0-9]*[1-9][0-9]*))",message = "最小阈值为大于0的数字",groups = {Query.class})
private String minValueData; private String minValueData;
@ApiModelProperty("采集值类型") @ApiModelProperty("采集值类型")
@ -48,7 +46,6 @@ public class DeviceBdDetailVo {
private String deviceCode; private String deviceCode;
@ApiModelProperty("采集数据单位") @ApiModelProperty("采集数据单位")
@NotBlank(message = "采集数据单位不能为空", groups = {Query.class})
@Length(max = 255, message = "采集数据单位字符长度不能超过50", groups = {Query.class}) @Length(max = 255, message = "采集数据单位字符长度不能超过50", groups = {Query.class})
private String unit; private String unit;

View File

@ -218,7 +218,7 @@ public class DeviceOfBdServiceImpl implements IDeviceOfBdService {
} }
int result = mapper.isBdDeviceDetailExist(vo); int result = mapper.isBdDeviceDetailExist(vo);
if (result > 0) { if (result > 0) {
return AjaxResult.error("检测不能重复"); return AjaxResult.error("检测名称不能重复");
} }
if (StringUtils.isEmpty(vo.getId())) { if (StringUtils.isEmpty(vo.getId())) {
String id = IdUtils.getuid(); String id = IdUtils.getuid();

View File

@ -169,11 +169,7 @@
</trim> </trim>
</if> </if>
<if test="type == 2"> <if test="type == 2">
UPDATE tb_device_value UPDATE tb_device_value SET unit = #{unit} WHERE attribute_id = #{id}
<set>
<if test="unit != null and unit != ''">unit = #{unit},</if>
</set>
WHERE attribute_id = #{id}
</if> </if>
</insert> </insert>
<!--删除边带设备--> <!--删除边带设备-->
@ -222,6 +218,7 @@
) )
</if> </if>
</where> </where>
ORDER BY tpb.bind_time DESC,tpb.create_time DESC
</select> </select>
<!--边带编码是否重复--> <!--边带编码是否重复-->
<select id="isBdCodeExist" resultType="java.lang.Integer"> <select id="isBdCodeExist" resultType="java.lang.Integer">
@ -274,6 +271,7 @@
) )
</if> </if>
</where> </where>
ORDER BY tbd.create_time DESC
</select> </select>
<!--边带设备编码是否重复--> <!--边带设备编码是否重复-->
<select id="isDeviceCodeExist" resultType="java.lang.Integer"> <select id="isDeviceCodeExist" resultType="java.lang.Integer">