Merge remote-tracking branch 'origin/master'

# Conflicts:
#	securitycontrol-model/securitycontrol-system/src/main/java/com/securitycontrol/system/base/service/impl/SelectServiceImpl.java
This commit is contained in:
haozq 2024-03-25 20:45:59 +08:00
commit 7b17d84a41
10 changed files with 71 additions and 10 deletions

7
.gitignore vendored Normal file
View File

@ -0,0 +1,7 @@
# Created by .ignore support plugin (hsz.mobi)
.idea
logs
.gitignore
out
*.iml
gen

View File

@ -58,8 +58,6 @@ public class DeviceBdChildVo {
private String deviceModel;
@ApiModelProperty(value = "边带ID")
@NotBlank(message = "设备所属边带不能为空", groups = {Query.class})
@Length(max = 100, message = "设备所属边带字符长度不能超过100", groups = {Query.class})
private String bdId;
@ApiModelProperty(value = "边带名称")
@ -70,8 +68,6 @@ public class DeviceBdChildVo {
private Integer type;
@ApiModelProperty(value = "区域ID")
@NotBlank(message = "检测区域不能为空", groups = {Query.class})
@Length(max = 100, message = "检测区域字符长度不能超过100", groups = {Query.class})
private String areaId;
@ApiModelProperty(value = "区域名称")

View File

@ -61,8 +61,6 @@ public class DeviceBdVo {
private String gtName;
@ApiModelProperty(value = "标段编码")
@NotBlank(message = "标段编码不能为空", groups = {Query.class})
@Length(max = 80, message = "标段编码字符长度不能超过80", groups = {Query.class})
private String bidCode;
@ApiModelProperty(value = "工程名称")

View File

@ -36,4 +36,12 @@ public class SelectVo {
@ApiModelProperty(value = "工程类型")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private String proType;
@ApiModelProperty(value = "标段编码")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private String bidCode;
@ApiModelProperty(value = "杆塔ID")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private String gtId;
}

View File

@ -180,7 +180,13 @@
LEFT JOIN sys_dict sd ON sd.dict_code = tbd.devic_type
LEFT JOIN sys_dict sd2 ON sd2.dict_code = tbd.status
LEFT JOIN sys_area sa ON tbd.area_id = sa.area_id
WHERE tbd.bd_id = #{id}
<where>
<if test="keyWord!=null and keyWord!=''">
AND (
INSTR(tpb.bd_name,#{keyWord}) > 0
)
</if>
</where>
</select>
<!--边带设备编码是否重复-->
<select id="isDeviceCodeExist" resultType="java.lang.Integer">

View File

@ -92,4 +92,9 @@ public class SelectController extends BaseController {
return service.getAreaLists(dto);
}
@ApiOperation(value = "边带下拉选")
@GetMapping("getBdLists")
public AjaxResult getBdLists(SelectDto dto){
return service.getBdLists(dto);
}
}

View File

@ -112,6 +112,7 @@ public interface ISelectMapper {
/**
* 区域下拉选
*
* @param dto
* @return List<SelectVo>
* @description
@ -119,4 +120,14 @@ public interface ISelectMapper {
* @date 2024/3/20 20:02
*/
List<SelectVo> getAreaLists(SelectDto dto);
/**
* 边带下拉选
* @param dto
* @return List<SelectVo>
* @description
* @author cwchen
* @date 2024/3/25 13:11
*/
List<SelectVo> getBdLists(SelectDto dto);
}

View File

@ -108,6 +108,7 @@ public interface ISelectService {
/**
* 区域下拉选
*
* @param dto
* @return AjaxResult
* @description
@ -115,4 +116,14 @@ public interface ISelectService {
* @date 2024/3/20 20:01
*/
AjaxResult getAreaLists(SelectDto dto);
/**
* 边带下拉选
* @param dto
* @return AjaxResult
* @description
* @author cwchen
* @date 2024/3/25 13:11
*/
AjaxResult getBdLists(SelectDto dto);
}

View File

@ -178,4 +178,15 @@ public class SelectServiceImpl implements ISelectService {
return AjaxResult.success(groupList);
}
@Override
public AjaxResult getBdLists(SelectDto dto) {
List<SelectVo> list = new ArrayList<>();
try {
list = mapper.getBdLists(dto);
} catch (Exception e) {
log.error("边带下拉选");
}
return AjaxResult.success(list);
}
}

View File

@ -93,12 +93,20 @@
area_name AS name
FROM sys_area
<where>
<if test="bidCode !=null and bidCode!=''">
AND bid_code = #{bidCode}
</if>
bid_code = #{bidCode}
<if test="gtId !=null and gtId!=''">
AND gt_id = #{gtId}
</if>
</where>
</select>
<!--边带下拉选-->
<select id="getBdLists" resultType="com.securitycontrol.entity.system.vo.SelectVo">
SELECT id,bd_name AS name,bid_code AS bidCode,gt_id AS gtId
FROM tb_pro_bd
<where>
<if test="bidCode!=null and bidCode !=''">
AND bid_code = #{bidCode}
</if>
</where>
</select>
</mapper>