|
@@ -80,6 +80,7 @@ public class EnvWarningThresholdServiceImpl extends ServiceImpl<EnvWarningThresh
|
|
|
|
|
|
@Override
|
|
|
public Result add(HttpServletRequest httpServletRequest, Map<String, String> paramsMap) {
|
|
|
+ String userIds = paramsMap.get("userIds");
|
|
|
String farmId = paramsMap.get("farmId");
|
|
|
String maxTem = paramsMap.get("maxTem");
|
|
|
String minTem = paramsMap.get("minTem");
|
|
@@ -87,6 +88,13 @@ public class EnvWarningThresholdServiceImpl extends ServiceImpl<EnvWarningThresh
|
|
|
String minHum = paramsMap.get("minHum");*/
|
|
|
String maxNh3= paramsMap.get("maxNh3");
|
|
|
String maxCo = paramsMap.get("maxCo");
|
|
|
+ //去掉
|
|
|
+ /* Integer userId = TokenSign.getMemberIdByJwtToken(httpServletRequest);
|
|
|
+ QueryWrapper<SysAccountMultilevel> wrapper = new QueryWrapper<>();
|
|
|
+ wrapper.like("pids",userId);
|
|
|
+ wrapper.like("farm_ids",farmId);
|
|
|
+ List<SysAccountMultilevel> page = accountMultilevelService.list( wrapper);
|
|
|
+ List<Integer> userIds = page.stream().map(SysAccountMultilevel::getId).collect(Collectors.toList());*/
|
|
|
|
|
|
EnvWarningThreshold threshold = new EnvWarningThreshold();
|
|
|
/* threshold.setMaxHum(maxHum);
|
|
@@ -95,7 +103,7 @@ public class EnvWarningThresholdServiceImpl extends ServiceImpl<EnvWarningThresh
|
|
|
threshold.setMinTem(minTem);
|
|
|
threshold.setMaxNh3(maxNh3);
|
|
|
threshold.setMaxCo(maxCo);
|
|
|
- threshold.setUserIds(paramsMap.get("userIds"));
|
|
|
+ threshold.setUserIds(userIds);
|
|
|
threshold.setFarmId(Integer.parseInt(farmId));
|
|
|
|
|
|
if (Integer.parseInt(maxTem) < Integer.parseInt(minTem)) {
|