|
|
|
@ -66,14 +66,17 @@ public class TtPouringEquipController extends JeecgController<TtPouringEquip, IT
|
|
|
|
|
IPage<TtPouringEquip> pageList = ttPouringEquipService.page(page, queryWrapper);
|
|
|
|
|
List<TtPouringEquip> list = pageList.getRecords();
|
|
|
|
|
if (list.size() > 0) {
|
|
|
|
|
// 查询所有浇注设备,按ip标注
|
|
|
|
|
LambdaQueryWrapper<TtEqtBase> lwq = new LambdaQueryWrapper<>();
|
|
|
|
|
lwq.eq(TtEqtBase::getEqtStatus, 1);
|
|
|
|
|
lwq.eq(TtEqtBase::getEqtType, 2);
|
|
|
|
|
List<TtEqtBase> deviceList = ttEqtBaseService.list(lwq);
|
|
|
|
|
Map<String, TtEqtBase> deviceMap = deviceList.stream().collect(Collectors.toMap(TtEqtBase::getEqtIp, v -> v));
|
|
|
|
|
for (TtPouringEquip pouring : list) {
|
|
|
|
|
QueryWrapper<TtEqtBase> eqtBase = new QueryWrapper<>();
|
|
|
|
|
eqtBase.eq("eqt_no", pouring.getEqtNo());
|
|
|
|
|
eqtBase.eq("eqt_type", 2);
|
|
|
|
|
TtEqtBase ttEqtBase = ttEqtBaseService.getOne(eqtBase);
|
|
|
|
|
// if (ttEqtBase != null) {
|
|
|
|
|
// pouring.setEqtSupplier(ttEqtBase.getEqtSupplier());
|
|
|
|
|
// }
|
|
|
|
|
TtEqtBase eqtBase = deviceMap.get(pouring.getEqtIp());
|
|
|
|
|
if(eqtBase != null) {
|
|
|
|
|
pouring.setDescr(eqtBase.getDescr());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return Result.OK(pageList);
|
|
|
|
@ -94,6 +97,7 @@ public class TtPouringEquipController extends JeecgController<TtPouringEquip, IT
|
|
|
|
|
lwq.eq(TtEqtBase::getEqtStatus, 1);
|
|
|
|
|
lwq.eq(TtEqtBase::getEqtType, 2);
|
|
|
|
|
List<TtEqtBase> JZ_DeviceList = ttEqtBaseService.list(lwq);
|
|
|
|
|
|
|
|
|
|
long timestamp = System.currentTimeMillis();
|
|
|
|
|
Map<String,PouringModel> pouringModelMap = new HashMap<>();
|
|
|
|
|
PouringModel model;
|
|
|
|
|