Ver Fonte

班管家服务单及工单添加查询条件及字段(客户手机号)

hu há 3 anos atrás
pai
commit
b4603b7c59

+ 1 - 1
src/rest/openapi/restcontroller/housekeeper/workorder/SQL/工单列表查询.sql

@@ -1,4 +1,4 @@
-select t.fworknum,convert(char(24),t.createdate,120)createdate,t.ftype,(isnull(t.FPROVINCE,'')+isnull(t.FCITY,'')+isnull(t.FCOUNTY,0)) fcounty,t.faddress,t1.fname projectleader,t.fstatus,t.progress,t.customername,
+select t.customephone,t.fworknum,convert(char(24),t.createdate,120)createdate,t.ftype,(isnull(t.FPROVINCE,'')+isnull(t.FCITY,'')+isnull(t.FCOUNTY,0)) fcounty,t.faddress,t1.fname projectleader,t.fstatus,t.progress,t.customername,
        (
            select count(1) from ordernode t2 where t2.fparentid=t.Workorderid and ischilden=0 and isconfirm=1
        ) confirmcount,

+ 1 - 1
src/rest/openapi/restcontroller/housekeeper/workorder/SQL/服务预约单列表查询.sql

@@ -1,2 +1,2 @@
-select t.fservernum,convert(varchar,t.createdate,120)createdate,t.customername,(isnull(t.FPROVINCE,'')+isnull(t.FCITY,'')+isnull(t.FCOUNTY,0)) fcounty,t.faddress,t.ftype,t.fstatus from Serviceform t
+select t.fservernum,convert(varchar,t.createdate,120)createdate,t.customername,t.customerphone,(isnull(t.FPROVINCE,'')+isnull(t.FCITY,'')+isnull(t.FCOUNTY,0)) fcounty,t.faddress,t.ftype,t.fstatus from Serviceform t
 where t.siteid=$siteid$  and t.fagentnum=$fagentnum$ and t.fstatus<>'´ýÖ¸ÅÉ' and $where$

+ 5 - 0
src/rest/openapi/restcontroller/housekeeper/workorder/Serviceform.java

@@ -73,6 +73,11 @@ public class Serviceform extends Controller {
             if (where.containsKey("enddate") && !StringUtils.isBlank(where.getString("enddate"))) {
                 wherestr += " and t.createdate <= '" + where.getString("enddate") + "'";
             }
+            if (where.containsKey("condtion") && !StringUtils.isBlank(where.getString("condtion"))) {
+            	wherestr += " and (t.customername like '%" + where.getString("condtion") + "%' " + "or t.customerphone like '%"
+						+ where.getString("condtion") + "%' " + "or t.faddress like '%" + where.getString("condtion")
+						+ "%')";
+            }
             SQLFactory factory = new SQLFactory(this, "服务预约单列表查询", pageSize, pageNumber, "case when t.fstatus='待处理' then 1\n" +
             		"when t.fstatus='待验收' then 2\n" +
                     "when t.fstatus='进行中' then 3\n" +

+ 5 - 0
src/rest/openapi/restcontroller/housekeeper/workorder/WorkOrder.java

@@ -50,6 +50,11 @@ public class WorkOrder extends Controller {
             if(where.containsKey("fworknum")&&!StringUtils.isBlank(where.getString("fworknum"))){
                 wherestr+=" and t.fworknum like '%"+where.getString("fworknum")+"%'";
             }
+            if (where.containsKey("condtion") && !StringUtils.isBlank(where.getString("condtion"))) {
+            	wherestr += " and (t.customername like '%" + where.getString("condtion") + "%' " + "or t.customephone like '%"
+						+ where.getString("condtion") + "%' " + "or t.faddress like '%" + where.getString("condtion")
+						+ "%')";
+            }
             SQLFactory factory=new SQLFactory(this,"工单列表查询",pageSize,pageNumber,"case when t.fstatus='待开始' then 1\n" +
                     "when t.fstatus='质保卡审批' then 2\n" +
                     "when t.fstatus='进行中' then 3\n" +