@@ -75,10 +75,10 @@ public class Afterserviceorder extends Controller {
if(where!=null){
DBConnect dbConnect=new DBConnect();
if(where.containsKey("fstatus")&&!StringUtils.isBlank(where.getString("fstatus"))){
- wherestr+=" and fstatus = '"+where.getString("fstatus")+"'";
+ wherestr+=" and t.fstatus = '"+where.getString("fstatus")+"'";
}
if(where.containsKey("ftype")&&!StringUtils.isBlank(where.getString("ftype"))){
- wherestr+=" and ftype = '"+where.getString("ftype")+"'";
+ wherestr+=" and t.ftype = '"+where.getString("ftype")+"'";
if(where.containsKey("startdate")&&!StringUtils.isBlank(where.getString("startdate"))){
wherestr+=" and t.createdate >= '"+where.getString("startdate")+"'";
@@ -5,7 +5,9 @@ select t.servicenum,convert(varchar,t.createdate,120)createdate,t.fsonum,t.fnote
t.faddress,
t.backreason,
t.servicetype,
+ t2.fstatus fworkstatus,
convert(varchar,t.servicebegindate,120)servicebegindate,
convert(varchar,t.serviceenddate,120)serviceenddate
from Afterserviceorder t
+ left join hyworkorder t2 on t.servicenum=t2.servernum
where t.siteid=$siteid$ and $where$