Browse Source

修改根据来电号码查科室的接口

seimin 4 months ago
parent
commit
23d0314bfa
2 changed files with 24 additions and 27 deletions
  1. 9 4
      src/app/services/main.service.ts
  2. 15 23
      src/app/views/fuwutai/fuwutai.component.ts

+ 9 - 4
src/app/services/main.service.ts

@@ -929,21 +929,21 @@ export class MainService {
929
 	     headers: this.headers,
929
 	     headers: this.headers,
930
 	   });
930
 	   });
931
 	 }
931
 	 }
932
-	
932
+
933
 	//病理申请单追加打印/全量打印
933
 	//病理申请单追加打印/全量打印
934
 	 pathologyCheckPrint(type,businessId,data) {
934
 	 pathologyCheckPrint(type,businessId,data) {
935
 	   return this.http.post(host.host + `/pathology/check/${type}/${businessId}`, data, {
935
 	   return this.http.post(host.host + `/pathology/check/${type}/${businessId}`, data, {
936
 	     headers: this.headers,
936
 	     headers: this.headers,
937
 	   });
937
 	   });
938
 	 }
938
 	 }
939
-	
939
+
940
 	// 病例申请单暂存
940
 	// 病例申请单暂存
941
 	pathologyOperation(data,operation) {
941
 	pathologyOperation(data,operation) {
942
 	  return this.http.post(host.host + `/pathology/${operation}`, data, {
942
 	  return this.http.post(host.host + `/pathology/${operation}`, data, {
943
 	    headers: this.headers,
943
 	    headers: this.headers,
944
 	  });
944
 	  });
945
 	}
945
 	}
946
-	
946
+
947
 	// 病理查询标本条码
947
 	// 病理查询标本条码
948
 	pathologyScanCode(data) {
948
 	pathologyScanCode(data) {
949
 	  return this.http.post(host.host + `/pathology/scanCode`, data, {
949
 	  return this.http.post(host.host + `/pathology/scanCode`, data, {
@@ -1038,5 +1038,10 @@ export class MainService {
1038
 	    headers: this.headers,
1038
 	    headers: this.headers,
1039
 	  });
1039
 	  });
1040
 	}
1040
 	}
1041
-
1041
+  // 根据来电电话查科室
1042
+	findPhoneDept(data) {
1043
+	  return this.http.post(host.host + `/user/data/findPhoneDept`, data, {
1044
+	    headers: this.headers,
1045
+	  });
1046
+	}
1042
 }
1047
 }

+ 15 - 23
src/app/views/fuwutai/fuwutai.component.ts

@@ -1465,24 +1465,20 @@ export class FuwutaiComponent implements OnInit {
1465
   // 呼叫中心---start
1465
   // 呼叫中心---start
1466
   searchBxDept(){
1466
   searchBxDept(){
1467
     let dataObj = {
1467
     let dataObj = {
1468
-      idx: 0,
1469
-      sum: 10,
1470
-      department: {
1471
-        searchType: 2,
1472
-        phone: this.incidentModel.incomingPhone,
1473
-      },
1468
+      hosId: this.tool.getCurrentUserDept().id,
1469
+      phone: this.incidentModel.incomingPhone,
1474
     };
1470
     };
1475
     this.mainService
1471
     this.mainService
1476
-      .getFetchDataList("data", "department", dataObj)
1477
-      .subscribe((result) => {
1478
-        if (result.status == 200) {
1472
+      .findPhoneDept(dataObj)
1473
+      .subscribe((result:any) => {
1474
+        if (result.state == 200) {
1479
           console.log(result);
1475
           console.log(result);
1480
-          if (result.list.length > 0) {
1476
+          if (result.data.length > 0) {
1481
             //绑定了科室
1477
             //绑定了科室
1482
             // if (!this.newOrderShow && !this.newOrderShowOpen) {
1478
             // if (!this.newOrderShow && !this.newOrderShowOpen) {
1483
               let incidentModel:any = Object.assign({}, this.incidentModel);
1479
               let incidentModel:any = Object.assign({}, this.incidentModel);
1484
               let incidentMsg:any = Object.assign({}, this.incidentMsg);
1480
               let incidentMsg:any = Object.assign({}, this.incidentMsg);
1485
-              incidentModel.department = result.list[0];
1481
+              incidentModel.department = result.data[0];
1486
               incidentModel.department && incidentModel.department.hospital && (incidentModel.hosId = incidentModel.department.hospital.parent ? incidentModel.department.hospital.parent.id : incidentModel.department.hospital.id);
1482
               incidentModel.department && incidentModel.department.hospital && (incidentModel.hosId = incidentModel.department.hospital.parent ? incidentModel.department.hospital.parent.id : incidentModel.department.hospital.id);
1487
               incidentModel.department && incidentModel.department.building && (incidentModel.area = incidentModel.department.building.id);
1483
               incidentModel.department && incidentModel.department.building && (incidentModel.area = incidentModel.department.building.id);
1488
               incidentModel.department && incidentModel.department.floor && (incidentModel.place = incidentModel.department.floor.id);
1484
               incidentModel.department && incidentModel.department.floor && (incidentModel.place = incidentModel.department.floor.id);
@@ -1495,7 +1491,7 @@ export class FuwutaiComponent implements OnInit {
1495
               this.incidentModel = incidentModel;
1491
               this.incidentModel = incidentModel;
1496
               this.incidentMsg = incidentMsg;
1492
               this.incidentMsg = incidentMsg;
1497
               this.searchApplicationRequester();
1493
               this.searchApplicationRequester();
1498
-              this.applyDeptMiddle = result.list[0];
1494
+              this.applyDeptMiddle = result.data[0];
1499
               this.showNewOrder("yes", this.incidentModel.incomingPhone, true, '来电弹屏');
1495
               this.showNewOrder("yes", this.incidentModel.incomingPhone, true, '来电弹屏');
1500
             // }
1496
             // }
1501
           } else {
1497
           } else {
@@ -5237,23 +5233,19 @@ export class FuwutaiComponent implements OnInit {
5237
     if(e.data){
5233
     if(e.data){
5238
       // 留言创建工单
5234
       // 留言创建工单
5239
       let postData = {
5235
       let postData = {
5240
-        idx: 0,
5241
-        sum: 10,
5242
-        department: {
5243
-          searchType: 2,
5244
-          phone: e.data.ano,
5245
-        },
5236
+        hosId: this.tool.getCurrentUserDept().id,
5237
+        phone: e.data.ano,
5246
       };
5238
       };
5247
       this.maskFlag = this.msg.loading("正在加载中..", {
5239
       this.maskFlag = this.msg.loading("正在加载中..", {
5248
         nzDuration: 0,
5240
         nzDuration: 0,
5249
       }).messageId;
5241
       }).messageId;
5250
 
5242
 
5251
       this.mainService
5243
       this.mainService
5252
-        .getFetchDataList("data", "department", postData)
5253
-        .subscribe((result) => {
5244
+        .findPhoneDept(postData)
5245
+        .subscribe((result:any) => {
5254
           this.msg.remove(this.maskFlag);
5246
           this.msg.remove(this.maskFlag);
5255
           this.maskFlag = false;
5247
           this.maskFlag = false;
5256
-          if (result.status == 200) {
5248
+          if (result.state == 200) {
5257
             this.mainService.getDictionary("list", "incident_source").subscribe((res) => {
5249
             this.mainService.getDictionary("list", "incident_source").subscribe((res) => {
5258
               let sourceList = res || [];
5250
               let sourceList = res || [];
5259
               let incidentModel:any = {
5251
               let incidentModel:any = {
@@ -5263,9 +5255,9 @@ export class FuwutaiComponent implements OnInit {
5263
               let incidentMsg:any = {};
5255
               let incidentMsg:any = {};
5264
               let source = sourceList.find(v => v.value === 'record');
5256
               let source = sourceList.find(v => v.value === 'record');
5265
               source && (incidentModel.source = source.id);
5257
               source && (incidentModel.source = source.id);
5266
-              if (result.list.length > 0) {
5258
+              if (result.data.length > 0) {
5267
                 //绑定了科室
5259
                 //绑定了科室
5268
-                incidentModel.department = result.list[0];
5260
+                incidentModel.department = result.data[0];
5269
                 incidentModel.department && incidentModel.department.hospital && (incidentModel.hosId = incidentModel.department.hospital.parent ? incidentModel.department.hospital.parent.id : incidentModel.department.hospital.id);
5261
                 incidentModel.department && incidentModel.department.hospital && (incidentModel.hosId = incidentModel.department.hospital.parent ? incidentModel.department.hospital.parent.id : incidentModel.department.hospital.id);
5270
                 incidentModel.department && incidentModel.department.building && (incidentModel.area = incidentModel.department.building.id);
5262
                 incidentModel.department && incidentModel.department.building && (incidentModel.area = incidentModel.department.building.id);
5271
                 incidentModel.department && incidentModel.department.floor && (incidentModel.place = incidentModel.department.floor.id);
5263
                 incidentModel.department && incidentModel.department.floor && (incidentModel.place = incidentModel.department.floor.id);