|
|
@@ -1,5 +1,7 @@
|
|
|
select t.servicenum,convert(varchar,t.createdate,120)createdate,t.fsonum,t.fnotes,t.fstatus,t.fprovince,t.fcity,t.fcounty,t.faddress,
|
|
|
t.Afterserviceordeid ownerid,scenefname,scenephone,error_msg,t.appsystem,t.errcategory,t.backreason,
|
|
|
-t.servicetype,convert(varchar,t.servicebegindate,120)servicebegindate,convert(varchar,t.serviceenddate,120)serviceenddate
|
|
|
-from Afterserviceorder t
|
|
|
+t.servicetype,convert(varchar,t.servicebegindate,120)servicebegindate,convert(varchar,t.serviceenddate,120)serviceenddate,t1.displayname submitby,t2.fagentnum,t2.fagentname,t2.fagentshortname
|
|
|
+from Afterserviceorder t
|
|
|
+left join pp_hr t1 on t.submitby=t1.hrid and t.siteid=t1.siteid
|
|
|
+left join tagents t2 on t.fagentnum=t2.fagentnum and t.siteid=t2.siteid
|
|
|
where t.servicenum=$servicenum$
|