|  |  |  | 
|---|
|  |  |  | import java.util.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson.JSONArray; | 
|---|
|  |  |  | import com.alibaba.fastjson.JSONObject; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.*; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.WarehouseAreasService; | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiModelProperty(value= "备注") | 
|---|
|  |  |  | private String memo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiModelProperty(value= "是否删除 1: 是  0: 否  ") | 
|---|
|  |  |  | @TableLogic | 
|---|
|  |  |  | private Integer deleted; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 创建人 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | 
|---|
|  |  |  | private Long tenantId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @TableField(exist = false) | 
|---|
|  |  |  | private Long[] areaIds; | 
|---|
|  |  |  | private List<Long> areaIds; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @TableField(exist = false) | 
|---|
|  |  |  | private Long[] containerTypes; | 
|---|
|  |  |  | private List<Long> containerTypes; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public BasStation() {} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | DictDataService service = SpringUtils.getBean(DictDataService.class); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String content = this.getContainerType().substring(1, this.getContainerType().length() - 1); | 
|---|
|  |  |  | String[] parts = content.split(","); | 
|---|
|  |  |  | Long[] longArray = new Long[parts.length]; | 
|---|
|  |  |  | for (int i = 0; i < parts.length; i++) { | 
|---|
|  |  |  | longArray[i] = Long.parseLong(parts[i].trim()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Object parse = JSONArray.parse(this.getContainerType()); | 
|---|
|  |  |  | List<Long> longs1 = JSONObject.parseArray(parse.toString(), Long.class); | 
|---|
|  |  |  | List<DictData> dictData = service.list(new LambdaQueryWrapper<DictData>() | 
|---|
|  |  |  | .eq(DictData::getDictTypeCode, "sys_container_type") | 
|---|
|  |  |  | .in(DictData::getValue, longArray) | 
|---|
|  |  |  | .in(DictData::getValue, longs1) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | List<Long> longs = dictData.stream().map(DictData::getId).collect(Collectors.toList()); | 
|---|
|  |  |  | return longs; | 
|---|