| | |
| | | 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; |
| | |
| | | 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; |