|
@@ -23,6 +23,7 @@ import com.hb.proj.model.WellParamPO;
|
|
|
import com.hb.proj.utils.RespVO;
|
|
|
import com.hb.proj.utils.RespVOBuilder;
|
|
|
import com.hb.xframework.dao.util.PageModel;
|
|
|
+import com.hb.xframework.util.MapUtils;
|
|
|
|
|
|
import jakarta.validation.constraints.NotBlank;
|
|
|
|
|
@@ -134,5 +135,34 @@ public class MultiSortController {
|
|
|
return RespVOBuilder.ok(wpService.loadSortParamDisUnit(wids, paramCode));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 查询多井多参数的显示单位
|
|
|
+ * @param wellIds
|
|
|
+ * @param paramCodes
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping("/loadMultiParamUnit")
|
|
|
+ public RespVO<Object> loadMultiParamUnit(@NotBlank(message = "缺少井站记录号") String wellIds,
|
|
|
+ @NotBlank(message = "缺少参数编码") String paramCodes){
|
|
|
+ Set<String> wids=new HashSet<>(Arrays.asList(StringUtils.split(wellIds,",")));
|
|
|
+ Set<String> pms=new HashSet<>(Arrays.asList(StringUtils.split(paramCodes,",")));
|
|
|
+
|
|
|
+ List<WellParamPO> wps=wpService.loadMultiParamDisUnit(wids, pms);
|
|
|
+
|
|
|
+ if(wps==null||wps.size()==0) {
|
|
|
+ return RespVOBuilder.error("未找到数据");
|
|
|
+ }
|
|
|
+ Map<String,Map<String,Object>> rtn=new HashMap<>();
|
|
|
+ for(WellParamPO wp : wps) {
|
|
|
+ if(!rtn.containsKey(wp.getWellId())) {
|
|
|
+ rtn.put(wp.getWellId(),MapUtils.build(wp.getParamCode(),wp.getDisplayUnit()));
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ rtn.get(wp.getWellId()).put(wp.getParamCode(),wp.getDisplayUnit());
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ return RespVOBuilder.ok(rtn);
|
|
|
+ }
|
|
|
|
|
|
}
|