Commit da8f6bbb34ef9c829083605e0775725ed078d5a4

Authored by chenjunyu_1481036421
1 parent 70d24132

feat:看板改版

... ... @@ -44,7 +44,8 @@ public class TkDataBoardController extends BaseController {
44 44 @RequestParam(value = ORDER_FILED, required = false) String orderBy,
45 45 @RequestParam(value = ORDER_TYPE, required = false) OrderTypeEnum orderType,
46 46 @RequestParam(value = "organizationId", required = false) String organizationId,
47   - @RequestParam(value = "name", required = false) String name)
  47 + @RequestParam(value = "name", required = false) String name,
  48 + @RequestParam(value = "platform", required = false) String platform)
48 49 throws ThingsboardException {
49 50 Map<String, Object> queryMap = new HashMap<>();
50 51 queryMap.put(PAGE_SIZE, pageSize);
... ... @@ -58,6 +59,9 @@ public class TkDataBoardController extends BaseController {
58 59 if (StringUtils.isNotBlank(name)) {
59 60 queryMap.put("name", name);
60 61 }
  62 + if (StringUtils.isNotBlank(platform)) {
  63 + queryMap.put("platform", platform);
  64 + }
61 65 queryMap.put("userId", getCurrentUser().getCurrentUserId());
62 66 TkPageData<DataBoardDTO> pageData =
63 67 tkDataBoardService.dataBoardPage(queryMap, getCurrentUser().isTenantAdmin());
... ...
... ... @@ -37,6 +37,7 @@ public class TkDataComponentController extends BaseController {
37 37 private final TkDataComponentService ytDataComponentService;
38 38 private final TkDataBoardService ytDataBoardService;
39 39
  40 +
40 41 @GetMapping("/{boardId}")
41 42 @ApiOperation(value = "查询看板下的所有组件信息")
42 43 @PreAuthorize(
... ... @@ -50,6 +51,8 @@ public class TkDataComponentController extends BaseController {
50 51 getCurrentUser().getCurrentTenantId(), boardId);
51 52 moreDataComponentInfoDTO.setComponentLayout(dataBoardDTO.getLayout());
52 53 moreDataComponentInfoDTO.setComponentData(data);
  54 + DataBoardDTO dataDto = ytDataBoardService.findDataBoardInfoById(boardId,getCurrentUser().getCurrentTenantId());
  55 + moreDataComponentInfoDTO.setPhoneModel(StringUtils.isEmpty(dataDto.getPhoneModel())?null:dataDto.getPhoneModel());
53 56 return ResponseResult.success(moreDataComponentInfoDTO);
54 57 }
55 58
... ...
... ... @@ -28,4 +28,10 @@ public class DataBoardDTO extends PublicCustomerDTO {
28 28
29 29 @ApiModelProperty(value = "组件数")
30 30 private Integer componentNum;
  31 +
  32 + @ApiModelProperty(value = "适用终端")
  33 + private String platform;
  34 + @ApiModelProperty(value = "手机型号")
  35 + private String phoneModel;
  36 +
31 37 }
... ...
... ... @@ -17,4 +17,8 @@ public class MoreDataComponentInfoDTO implements Serializable {
17 17
18 18 @ApiModelProperty("组件布局信息")
19 19 private List<ComponentLayoutDTO> componentLayout;
  20 +
  21 + @ApiModelProperty("设备型号")
  22 + private String phoneModel;
  23 +
20 24 }
... ...
... ... @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
5 5 import com.baomidou.mybatisplus.annotation.TableName;
6 6 import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
7 7 import com.fasterxml.jackson.databind.JsonNode;
  8 +import io.swagger.annotations.ApiModelProperty;
8 9 import lombok.Data;
9 10 import lombok.EqualsAndHashCode;
10 11 import org.apache.ibatis.type.EnumTypeHandler;
... ... @@ -34,4 +35,8 @@ public class TkDataBoardEntity extends TenantBaseEntity {
34 35
35 36 @TableField(updateStrategy = FieldStrategy.IGNORED)
36 37 private String accessCredentials;
  38 +
  39 + private String platform;
  40 +
  41 + private String phoneModel;
37 42 }
... ...
... ... @@ -39,6 +39,7 @@ public class TkDataBoardServiceImpl extends AbstractBaseService<DataBoardMapper,
39 39 public TkPageData<DataBoardDTO> dataBoardPage(Map<String, Object> queryMap, boolean tenantAdmin) {
40 40 int zero = FastIotConstants.MagicNumber.ZERO;
41 41 String name = null != queryMap.get("name") ? queryMap.get("name").toString() : null;
  42 + String platform = null != queryMap.get("platform") ? queryMap.get("platform").toString() : null;
42 43 String tenantId =
43 44 Optional.ofNullable(queryMap.get("tenantId"))
44 45 .map(Object::toString)
... ... @@ -69,6 +70,7 @@ public class TkDataBoardServiceImpl extends AbstractBaseService<DataBoardMapper,
69 70 getPage(queryMap, FastIotConstants.DefaultOrder.CREATE_TIME, false),
70 71 new LambdaQueryWrapper<TkDataBoardEntity>()
71 72 .eq(TkDataBoardEntity::getTenantId, tenantId)
  73 + .eq(StringUtils.isNotEmpty(platform), TkDataBoardEntity::getPlatform, platform)
72 74 .like(StringUtils.isNotEmpty(name), TkDataBoardEntity::getName, name)
73 75 .in(
74 76 null != organizationIds && organizationIds.size() > zero,
... ...