|
@@ -101,6 +101,9 @@ public class TEquipmentController {
|
|
|
@Autowired
|
|
|
TDiyFlowerService tDiyFlowerService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ TLabelService labelService;
|
|
|
+
|
|
|
TokenManager tokenManager;
|
|
|
|
|
|
private int j;
|
|
@@ -150,7 +153,7 @@ public class TEquipmentController {
|
|
|
@PostMapping("/findList")
|
|
|
public ResponseModel<IPage<?>> findList(Long id, String clientId, String adminName, String equipmentName,
|
|
|
String areaName, String eqeStatus, String machineType, String equimentType,
|
|
|
- String channel, String companyType, String todayDate, long current, long size) {
|
|
|
+ String channel, String companyType, String labelId, String todayDate, long current, long size) {
|
|
|
|
|
|
LambdaQueryWrapper<TEquipment> query = Wrappers.lambdaQuery();
|
|
|
TAdmin admin = tAdminService.getById(id);
|
|
@@ -219,6 +222,14 @@ public class TEquipmentController {
|
|
|
query.eq(TEquipment::getCompanyType, companyType);
|
|
|
}
|
|
|
}
|
|
|
+ // 分组ID
|
|
|
+ if (StringUtils.isNotEmpty(labelId)) {
|
|
|
+ TLabel label = labelService.getById(labelId);
|
|
|
+ String equipmentIds = label.getEquipmentIds();
|
|
|
+ equipmentIds = equipmentIds.replace("\"", "").replace("[","").replace("]","");
|
|
|
+ String[] split = equipmentIds.split(",");
|
|
|
+ query.in(TEquipment::getId, split);
|
|
|
+ }
|
|
|
query.orderByDesc(TEquipment::getCreateDate);
|
|
|
Page<TEquipment> page = new Page<>(current, size, true);
|
|
|
IPage<TEquipment> iPage = tEquipmentService.page(page, query);
|