Commit 1790bf2b by lyy

修改生产驾驶舱service方法

parent a13c62ab
......@@ -39,7 +39,7 @@ import java.util.stream.Collectors;
* @version 1.0 2024/5/24
*/
public class ServiceHGSC007 extends ServiceEPBase {
public static List<Map<String, Object>> getOrg() {
List<Map<String, Object>> list = new ArrayList<>();
List<Org> orgList = HGXSTools.XsOrg.queryByUser();
......@@ -62,11 +62,11 @@ public class ServiceHGSC007 extends ServiceEPBase {
}
list.add(objectMap);
}
}
return list;
}
/**
* 初始化
*
......@@ -84,7 +84,7 @@ public class ServiceHGSC007 extends ServiceEPBase {
}
return inInfo;
}
/**
* 查询
*
......@@ -107,7 +107,7 @@ public class ServiceHGSC007 extends ServiceEPBase {
}
return inInfo;
}
/**
* 统计
*
......@@ -131,13 +131,13 @@ public class ServiceHGSC007 extends ServiceEPBase {
}
return count;
}
@OperationLogAnnotation(operModul = "生产任务", operType = "APP查询公司", operDesc = "APP查询当前登陆用户角色所属公司")
public List<Company> getRoleCompany(EiInfo inInfo) {
List<Company> companyList = UserSessionUtils.getRoleCompany();
return companyList;
}
@OperationLogAnnotation(operModul = "生产任务", operType = "APP查询工厂", operDesc = "APP查询当前登录用户角色所属工厂")
public List<Factory> getRoleFactory(EiInfo inInfo) {
List<Org> factoryCodes = new ArrayList<>();
......@@ -161,7 +161,7 @@ public class ServiceHGSC007 extends ServiceEPBase {
m -> new ArrayList<>(m.values())
));
}
/**
* app查询工序累计产量
*/
......@@ -180,7 +180,7 @@ public class ServiceHGSC007 extends ServiceEPBase {
}
return inInfo;
}
/**
* app查询工序产量
*/
......@@ -199,7 +199,7 @@ public class ServiceHGSC007 extends ServiceEPBase {
}
return inInfo;
}
/**
* app查询工序日产量
*/
......@@ -223,7 +223,7 @@ public class ServiceHGSC007 extends ServiceEPBase {
}
return inInfo;
}
/**
* app查询工序日产量
*/
......@@ -247,7 +247,7 @@ public class ServiceHGSC007 extends ServiceEPBase {
}
return inInfo;
}
/**
* app查询工序产量
*/
......@@ -292,8 +292,17 @@ public class ServiceHGSC007 extends ServiceEPBase {
if (queryRow.containsKey("depositDate")) {
queryRow.put("depositDate", DateUtils.formatShort(queryRow.get("depositDate")));
}
List result = DaoBase.getInstance().query("HGSC007.queryByWt", queryRow);
inInfo.set(EiConstant.resultBlock, result);
List<HashMap<String, Object>> result = (List<HashMap<String, Object>>) DaoBase.getInstance().query("HGSC007.queryByWt", queryRow);
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) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
......@@ -323,8 +332,17 @@ public class ServiceHGSC007 extends ServiceEPBase {
if (queryRow.containsKey("depositDate")) {
queryRow.put("depositDate", DateUtils.formatShort(queryRow.get("depositDate")));
}
List result = DaoBase.getInstance().query("HGSC007.queryByDayWt", queryRow);
inInfo.set(EiConstant.resultBlock, result);
List<HashMap<String, Object>> result = (List<HashMap<String, Object>>)DaoBase.getInstance().query("HGSC007.queryByDayWt", queryRow);
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) {
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