Commit df27e20a authored by H2T's avatar H2T

bug修改,管控形式字典匹配

parent cabb850f
...@@ -791,10 +791,10 @@ public class InputItemController extends AbstractBaseController { ...@@ -791,10 +791,10 @@ public class InputItemController extends AbstractBaseController {
map.put("ValidDown",param.getValidDown()!=null?param.getValidDown():""); map.put("ValidDown",param.getValidDown()!=null?param.getValidDown():"");
map.put("OkUp",param.getOkUp()!=null?param.getOkUp():""); map.put("OkUp",param.getOkUp()!=null?param.getOkUp():"");
map.put("OkDown",param.getOkDown()!=null?param.getOkDown():""); map.put("OkDown",param.getOkDown()!=null?param.getOkDown():"");
map.put("CheckValidUp",param.getCheckValidUp().equals("")?false:true); map.put("CheckValidUp",param.getCheckValidUp().equals("false")?false:true);
map.put("CheckValidDown",param.getCheckValidDown().equals("")?false:true); map.put("CheckValidDown",param.getCheckValidDown().equals("false")?false:true);
map.put("CheckOkUp",param.getCheckOkUp().equals("")?false:true); map.put("CheckOkUp",param.getCheckOkUp().equals("false")?false:true);
map.put("CheckOkDown",param.getCheckOkDown().equals("")?false:true); map.put("CheckOkDown",param.getCheckOkDown().equals("false")?false:true);
map.put("Precision",param.getPrecision()!=null?param.getPrecision():0); map.put("Precision",param.getPrecision()!=null?param.getPrecision():0);
inputItem.setDataJson(JSONObject.toJSONString(map)); inputItem.setDataJson(JSONObject.toJSONString(map));
} }
......
...@@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.google.common.base.Joiner; import com.google.common.base.Joiner;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
import com.yeejoin.amos.patrol.business.constants.XJConstant; import com.yeejoin.amos.patrol.business.constants.XJConstant;
import com.yeejoin.amos.patrol.business.dao.mapper.InputItemMapper; import com.yeejoin.amos.patrol.business.dao.mapper.InputItemMapper;
import com.yeejoin.amos.patrol.business.dao.mapper.PointMapper; import com.yeejoin.amos.patrol.business.dao.mapper.PointMapper;
...@@ -113,6 +115,9 @@ public class PointServiceImpl implements IPointService { ...@@ -113,6 +115,9 @@ public class PointServiceImpl implements IPointService {
@Autowired @Autowired
private IPatrolDataSyncService patrolDataSyncService; private IPatrolDataSyncService patrolDataSyncService;
//管控形式 字典
private static final String formOfManagementAndControl= "riskForm";
@Override @Override
@Transactional @Transactional
public Point addPoint(PointParam pointParam) { public Point addPoint(PointParam pointParam) {
...@@ -926,7 +931,15 @@ public class PointServiceImpl implements IPointService { ...@@ -926,7 +931,15 @@ public class PointServiceImpl implements IPointService {
throw new RuntimeException("查询条件有误"); throw new RuntimeException("查询条件有误");
} }
List<Map<String, Object>> resList = pointMapper.queryItemList4RoutePoint(pointId, classifyId); List<Map<String, Object>> resList = pointMapper.queryItemList4RoutePoint(pointId, classifyId);
//查询管控字典值,并替换到返回值
HashMap<String, String> dictMap = new HashMap<>();
List<DictionarieValueModel> result = Systemctl.dictionarieClient.dictValues(formOfManagementAndControl).getResult();
result.forEach(x-> dictMap.put(x.getDictDataKey(),x.getDictDataValue()));
resList.stream().peek(item->{
if (item.containsKey("input_classify")){
item.put("input_classify",dictMap.getOrDefault(item.get("input_classify").toString(),"其他"));
}
}).collect(Collectors.toList());
//给前端返回是否绑定标识 //给前端返回是否绑定标识
Long[] longs = new Long[]{pointId}; Long[] longs = new Long[]{pointId};
List<RoutePoint> list = iRoutePointDao.queryRoutePoint(routeId, longs); List<RoutePoint> list = iRoutePointDao.queryRoutePoint(routeId, longs);
...@@ -940,14 +953,6 @@ public class PointServiceImpl implements IPointService { ...@@ -940,14 +953,6 @@ public class PointServiceImpl implements IPointService {
e.put("input_classify", "功能测试"); e.put("input_classify", "功能测试");
} else if ("HJJC".equals(e.get("input_classify").toString())) { } else if ("HJJC".equals(e.get("input_classify").toString())) {
e.put("input_classify", "环境检查"); e.put("input_classify", "环境检查");
} else if ("dayControl".equals(e.get("input_classify").toString())) {
e.put("input_classify", "日管控");
} else if ("monthlyScheduling".equals(e.get("input_classify").toString())) {
e.put("input_classify", "月调度");
} else if ("weeklySurvey".equals(e.get("input_classify").toString())) {
e.put("input_classify", "周排查");
} else {
e.put("input_classify", "其他");
} }
} }
if (excludeItems.contains(e.get("itemId").toString())){ if (excludeItems.contains(e.get("itemId").toString())){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment