main
userName 2025-06-21 07:36:29 +08:00
parent 1bf7fbf19d
commit 6447e5a277
2 changed files with 6 additions and 4 deletions

View File

@ -226,9 +226,9 @@ return translator.getSQLString();
}else{ }else{
String param_str=parm.toString(); String param_str=parm.toString();
param_str=param_str.trim(); param_str=param_str.trim();
if(param_str.indexOf("%")==0){ // if(param_str.indexOf("%")==0){
param_str=param_str.substring(1); // param_str=param_str.substring(1);
} // }
hql=hql.replace("{"+ketstr+"}", param_str); hql=hql.replace("{"+ketstr+"}", param_str);
} }

View File

@ -3451,12 +3451,14 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
" left join WORKER w on w.id=t.WORKER1_ID\r\n" + " left join WORKER w on w.id=t.WORKER1_ID\r\n" +
" where t.agv_Status='1' and t.PLAN_QUANTITY>t.MOVED_QUANTITY_MU\r\n" + " where t.agv_Status='1' and t.PLAN_QUANTITY>t.MOVED_QUANTITY_MU\r\n" +
" and z.CARRIER_TYPE_ID=3 and t.agvTask_ID is null "; " and z.CARRIER_TYPE_ID=3 and t.agvTask_ID is null ";
if(z_id>0){
sql2+=" and z.id="+z_id+" ";
}
if(type.equals("0")){ if(type.equals("0")){
sql2+=" and w.id is null "; sql2+=" and w.id is null ";
}else if(type.equals("1")){ }else if(type.equals("1")){
sql2+=" and w.id="+userId+" "; sql2+=" and w.id="+userId+" ";
} }
sql2+=" GROUP BY t.BILLCODE,z.beBill,z.beStock " + sql2+=" GROUP BY t.BILLCODE,z.beBill,z.beStock " +
" ORDER BY max(pt.equated_Quantity) desc,max(t.dateBill1),t.BILLCODE"; " ORDER BY max(pt.equated_Quantity) desc,max(t.dateBill1),t.BILLCODE";
Query query = session.createSQLQuery(sql2); Query query = session.createSQLQuery(sql2);