This commit is contained in:
Rue Ji
2026-03-08 00:39:18 +08:00

View File

@ -1894,7 +1894,12 @@ public class EquipmentCardController {
//一些地方请求传参不一样 有pSectionId和processSectionId //一些地方请求传参不一样 有pSectionId和processSectionId
if (request.getParameter("pSectionId") != null && !request.getParameter("pSectionId").isEmpty()) { if (request.getParameter("pSectionId") != null && !request.getParameter("pSectionId").isEmpty()) {
List<ProcessSection> list = processSectionService.selectListByWhere("where code = '" + request.getParameter("pSectionId") + "' and unit_id = '" + request.getParameter("unitId") + "'"); // 优先使用unitId如果没有则使用companyId作为fallback
String unitIdParam = request.getParameter("unitId");
if (unitIdParam == null || unitIdParam.isEmpty()) {
unitIdParam = request.getParameter("companyId");
}
List<ProcessSection> list = processSectionService.selectListByWhere("where code = '" + request.getParameter("pSectionId") + "' and unit_id = '" + unitIdParam + "'");
if (list != null && list.size() > 0) { if (list != null && list.size() > 0) {
wherestr += " and processSectionId = '" + list.get(0).getId() + "' "; wherestr += " and processSectionId = '" + list.get(0).getId() + "' ";
} }