姚云青 3 سال پیش
والد
کامیت
e1eba6641d

+ 4 - 1
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionReadyCenter/service/impl/BomProcedureVersionServiceImpl.java

@@ -155,7 +155,10 @@ public class BomProcedureVersionServiceImpl extends SuperServiceImpl<BomProcedur
                     //替换一下,避免字段名称重复
                     condition = custService.getCondBytablePri(" jtable"+j+".",condition);
 
-                    String joinSql = " left join "+prefix+joinTableName+" jtable"+j+" on a."+bean.getIdentifier() +" =jtable"+j+"."+field1 +" and "+condition;
+                    String joinSql = " left join "+prefix+joinTableName+" jtable"+j+" on a."+bean.getIdentifier() +" =jtable"+j+"."+field1;
+                    if(StringUtils.isNotEmpty(condition)){
+                        joinSql+=" and "+condition;
+                    }
                     joinSqlMap.put(bean.getIdentifier(),joinSql);
 
                     fields += "jtable"+j+"."+field2 +" as "+ bean.getIdentifier()+",";