Commit 1790bf2b by lyy

修改生产驾驶舱service方法

parent a13c62ab
...@@ -292,8 +292,17 @@ public class ServiceHGSC007 extends ServiceEPBase { ...@@ -292,8 +292,17 @@ public class ServiceHGSC007 extends ServiceEPBase {
if (queryRow.containsKey("depositDate")) { if (queryRow.containsKey("depositDate")) {
queryRow.put("depositDate", DateUtils.formatShort(queryRow.get("depositDate"))); queryRow.put("depositDate", DateUtils.formatShort(queryRow.get("depositDate")));
} }
List result = DaoBase.getInstance().query("HGSC007.queryByWt", queryRow); List<HashMap<String, Object>> result = (List<HashMap<String, Object>>) DaoBase.getInstance().query("HGSC007.queryByWt", queryRow);
inInfo.set(EiConstant.resultBlock, result); List<String> processNameList = result.stream()
.map(item -> (String) item.get("processName"))
.collect(Collectors.toList());
List<String> totalWeightList = result.stream()
.map(item -> String.valueOf(item.get("totalWeight"))) // 使用 String.valueOf()
.collect(Collectors.toList());
EiBlock block = new EiBlock("result");
block.set("processNameList",processNameList);
block.set("totalWeightList",totalWeightList);
inInfo.setBlock(block);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
} }
...@@ -323,8 +332,17 @@ public class ServiceHGSC007 extends ServiceEPBase { ...@@ -323,8 +332,17 @@ public class ServiceHGSC007 extends ServiceEPBase {
if (queryRow.containsKey("depositDate")) { if (queryRow.containsKey("depositDate")) {
queryRow.put("depositDate", DateUtils.formatShort(queryRow.get("depositDate"))); queryRow.put("depositDate", DateUtils.formatShort(queryRow.get("depositDate")));
} }
List result = DaoBase.getInstance().query("HGSC007.queryByDayWt", queryRow); List<HashMap<String, Object>> result = (List<HashMap<String, Object>>)DaoBase.getInstance().query("HGSC007.queryByDayWt", queryRow);
inInfo.set(EiConstant.resultBlock, result); List<String> depositDateList = result.stream()
.map(item -> (String) item.get("depositDate"))
.collect(Collectors.toList());
List<String> totalWeightList = result.stream()
.map(item -> String.valueOf(item.get("totalWeight"))) // 使用 String.valueOf()
.collect(Collectors.toList());
EiBlock block = new EiBlock("result");
block.set("depositDateList",depositDateList);
block.set("totalWeightList",totalWeightList);
inInfo.setBlock(block);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
} }
......
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