Commit 25f5cb16 authored by 林洋洋's avatar 林洋洋

修改DCS模板

parent 846aed0e
...@@ -124,7 +124,7 @@ public class ExcelTools { ...@@ -124,7 +124,7 @@ public class ExcelTools {
return jsonObject.toString(); return jsonObject.toString();
} }
@Tool(description = "获取天津智深DCS卡件日报") @Tool(description = "获取天津智深DCS卡件日报", returnDirect = true)
public String getDcsFile(@ToolParam(description = "时间(yyyy-M-d)") String dateStr) { public String getDcsFile(@ToolParam(description = "时间(yyyy-M-d)") String dateStr) {
var ref = new Object() { var ref = new Object() {
...@@ -132,15 +132,15 @@ public class ExcelTools { ...@@ -132,15 +132,15 @@ public class ExcelTools {
"\n" + "\n" +
"| 产线 | 计划产量 | 实际产量 | 成品率 |\n" + "| 产线 | 计划产量 | 实际产量 | 成品率 |\n" +
"| --- | --- | --- | --- |\n" + "| --- | --- | --- | --- |\n" +
"| iICTS | @天津智深数据.iICTS_MoQty | @天津智深数据.iICTS_CompletionQty | @天津智深数据.iICTS_OKRate |\n" + "| iICTS | iICTS_MoQty | iICTS_CompletionQty | iICTS_OKRate |\n" +
"| iAS | @天津智深数据.日iAS计划数量 | @天津智深数据.iAS_CompletionQty | @天津智深数据.iAS_OKRate |\n" + "| iAS | 日iAS计划数量 | iAS_CompletionQty | iAS_OKRate |\n" +
"| iSMTS | @天津智深数据.iSMTS_MoQty | @天津智深数据.iSMTS_CompletionQty | @天津智深数据.iSMTS_OKRate |\n" + "| iSMTS | iSMTS_MoQty | iSMTS_CompletionQty | iSMTS_OKRate |\n" +
"| iDIPS | @天津智深数据.iDIPS_MoQty | @天津智深数据.iDIPS_CompletionQty | @天津智深数据.iDIPS_OKRate |\n" + "| iDIPS | iDIPS_MoQty | iDIPS_CompletionQty | iDIPS_OKRate |\n" +
"| iFCTS | @天津智深数据.iFCTS_MoQty | @天津智深数据.iFCTS_CompletionQty | @天津智深数据.iFCTS_OKRate |\n" + "| iFCTS | iFCTS_MoQty | iFCTS_CompletionQty | iFCTS_OKRate |\n" +
"| iCCS | @天津智深数据.iCCS_MoQty | @天津智深数据.iCCS_CompletionQty | @天津智深数据.iDIPS_OKRate |\n" + "| iCCS | iCCS_MoQty | iCCS_CompletionQty | iDIPS_OKRate |\n" +
"| iPS | @天津智深数据.iPS_MoQty | @天津智深数据.iPS_CompletionQty | \\- |\n" + "| iPS | iPS_MoQty | iPS_CompletionQty | \\- |\n" +
"| iBS | @天津智深数据.iBS_MoQty | @天津智深数据.iBS_CompletionQty | @天津智深数据.iBS_OKRate |\n" + "| iBS | iBS_MoQty | iBS_CompletionQty | iBS_OKRate |\n" +
"| **总计** | @天津智深数据.今日_PlanQty | @天津智深数据.今日生产成品 | \\- |\n" + "| **总计** | 今日_PlanQty | 今日生产成品 | \\- |\n" +
"\n" + "\n" +
"下载连接:[@fileName](@fileUrl)"; "下载连接:[@fileName](@fileUrl)";
}; };
...@@ -253,17 +253,11 @@ public class ExcelTools { ...@@ -253,17 +253,11 @@ public class ExcelTools {
Map<String, Double> result = askHistoryCollectDataList.stream() Map<String, Double> result = askHistoryCollectDataList.stream()
.collect(Collectors.toMap( .collect(Collectors.toMap(
AskHistoryCollectData::getPath, // 获取 path 作为键 data -> data.getPath().replace("@天津智深数据.", ""), // 去掉 @
AskHistoryCollectData::getValue, // 获取 value 作为值 AskHistoryCollectData::getValue,
(existingValue, newValue) -> existingValue // 如果有重复的键,这里决定如何处理。这里选择保留现有的值。 (existingValue, newValue) -> existingValue // 保留第一个值
)); ));
params.forEach(param -> { paramMap.putAll(result);
paramMap.put(param, "");
if (result.containsKey(param)) {
paramMap.put(param, result.get(param));
}
});
return paramMap; return paramMap;
} }
......
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