main.service.ts 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062
  1. import { Injectable } from "@angular/core";
  2. import { HttpClient, HttpHeaders } from "@angular/common/http";
  3. import host from "../../assets/js/http";
  4. import { Observable } from "rxjs";
  5. import { AES, mode, pad, enc } from "crypto-js";
  6. import { MarkingService } from './marking.service';
  7. @Injectable({
  8. providedIn: "root",
  9. })
  10. export class MainService {
  11. constructor(private http: HttpClient, private markingService: MarkingService) {}
  12. headers = new HttpHeaders({
  13. "Content-Type": "application/json",
  14. "Cache-Control": "no-cache",
  15. });
  16. exportHeader = new HttpHeaders().set("Accept", "*/*"); //导出excel表使用
  17. // 单点登录
  18. singleSignOnLogin(data): any {
  19. return this.http.post(host.host + "/auth/portalLogin", data, {
  20. headers: this.headers,
  21. });
  22. }
  23. //aes加密
  24. encryptByEnAES(data: string): string {
  25. data = enc.Utf8.parse(data);
  26. let Key = enc.Utf8.parse('Aes2Util666AQWER');
  27. let tmpAES = AES.encrypt(data, Key, {
  28. mode: mode.ECB,
  29. padding: pad.Pkcs7,
  30. });
  31. return tmpAES.toString();
  32. }
  33. // 登录
  34. login(name: string, pwd: string): any {
  35. let data:any = {
  36. username: name,
  37. password: pwd,
  38. type: "PC",
  39. };
  40. data = {
  41. k: this.encryptByEnAES(JSON.stringify(data))
  42. };
  43. return this.http.post(host.host + "/auth/login", data, {
  44. headers: this.headers,
  45. });
  46. }
  47. // 登出
  48. logOut(): any {
  49. return this.http.delete(host.host + "/auth/logout2", {
  50. headers: this.headers,
  51. });
  52. }
  53. // 修改密码
  54. upPwd(data): any {
  55. return this.http.post(host.host + "/auth/uppwd", data, {
  56. headers: this.headers,
  57. });
  58. }
  59. // 字典表
  60. cachedDictionary = {}; //缓存到内存的字典
  61. getDictionary(type, key, flag = false): any {
  62. const data = {
  63. type: type,
  64. key: key,
  65. };
  66. console.log(this.cachedDictionary, "------------db");
  67. if (flag) {
  68. //特殊情况下处理,flag是true
  69. return this.http.post(host.host + "/common/common/getDictionary", data, {
  70. headers: this.headers,
  71. });
  72. } else if (this.cachedDictionary[key]) {
  73. return new Observable((observer) => {
  74. observer.next(this.cachedDictionary[key]);
  75. });
  76. } else {
  77. return new Observable((observer) => {
  78. this.http
  79. .post(host.host + "/common/common/getDictionary", data, {
  80. headers: this.headers,
  81. })
  82. .subscribe((result) => {
  83. this.cachedDictionary[key] = result;
  84. observer.next(result);
  85. });
  86. });
  87. }
  88. }
  89. //清除字典表缓存
  90. clearDictionary() {
  91. this.cachedDictionary = {};
  92. console.log(this.cachedDictionary, "------clearDb");
  93. }
  94. // 列表搜索(通用)
  95. getFetchDataList(type, target, data): any {
  96. return this.http.post(
  97. host.host + "/" + type + "/fetchDataList/" + target,
  98. data,
  99. { headers: this.headers }
  100. );
  101. }
  102. // 调度台 获取配送人员信息
  103. getSerInfo(type, data): any {
  104. return this.http.post(host.host + "/ser/" + type, data, {
  105. headers: this.headers,
  106. });
  107. }
  108. // 通用操作data信息(新增/更新/删除)//coop:操作类型addData:新增,updData更新,rmvData删除
  109. coopData(coop, type, data): any {
  110. return this.http.post(host.host + "/data/" + coop + "/" + type, data, {
  111. headers: this.headers,
  112. });
  113. }
  114. // 清空药品
  115. coopDataM(coop, data): any {
  116. return this.http.post(host.host + "/" + coop, data, {
  117. headers: this.headers,
  118. });
  119. }
  120. // 通用操作user data信息(新增/更新/删除)//coop:操作类型addData:新增,updData更新,rmvData删除
  121. coopUserData(coop, type, data): any {
  122. return this.http.post(host.host + "/user/data/" + coop + "/" + type, data, {
  123. headers: this.headers,
  124. });
  125. }
  126. // 获取院区user信息
  127. getHosUser(type, id): any {
  128. return this.http.get(host.host + "/user/data/" + type + "/" + id, {});
  129. }
  130. // 通用操作configuration信息 有操作类型(新增/更新/删除)//coop:操作类型addData:新增,updData更新,rmvData删除
  131. coopTypeConfig(coop, type, data): any {
  132. return this.http.post(
  133. host.host + "/configuration/" + coop + "/" + type,
  134. data,
  135. { headers: this.headers }
  136. );
  137. }
  138. // 通用操作configuration信息(新增/更新/删除)
  139. coopConfig(type, data): any {
  140. return this.http.post(host.host + "/configuration/" + type, data, {
  141. headers: this.headers,
  142. });
  143. }
  144. // 权限相关
  145. getPermission(type): any {
  146. return this.http.get(host.host + "/permission/roleMenu/" + type, {
  147. headers: this.headers,
  148. });
  149. }
  150. // fetchData查看详情
  151. getFetchData(type, info, id): any {
  152. return this.http.get(
  153. host.host + "/" + type + "/fetchData/" + info + "/" + id,
  154. { headers: this.headers }
  155. );
  156. }
  157. // 自定义请求 post
  158. postCustom(type, info, data): any {
  159. return this.http.post(host.host + "/" + type + "/" + info, data, {
  160. headers: this.headers,
  161. });
  162. }
  163. // 科室二维码打印flag=1
  164. postCustomCode(type, info, data): any {
  165. return this.http.post(host.host + "/" + type + "/" + info + "/1", data, {
  166. headers: this.headers,
  167. });
  168. }
  169. // 自定义请求 get
  170. getCustom(type, info): any {
  171. return this.http.get(host.host + "/" + type + "/" + info, {
  172. headers: this.headers,
  173. });
  174. }
  175. // 调度台-分派工单
  176. assignWorker(data, type): any {
  177. return this.http.post(host.host + "/workerOrder/" + type, data, {
  178. headers: this.headers,
  179. });
  180. }
  181. // 调度台-删除工单
  182. delOrder(id): any {
  183. return this.http.get(host.host + "/workerOrder/delWorkOrder/" + id, {
  184. headers: this.headers,
  185. });
  186. }
  187. // 工单列表-删除工单
  188. delOrders(ids): any {
  189. return this.http.post(
  190. host.host + "/workerOrder/delWorkOrders",
  191. { ids },
  192. { headers: this.headers }
  193. );
  194. }
  195. // 调度台工单相关
  196. coopWorkerOrder(type, data): any {
  197. return this.http.post(host.host + "/workerOrder/" + type, data, {
  198. headers: this.headers,
  199. });
  200. }
  201. // 调度台-工单历史记录
  202. getWorkOrderLog(id): any {
  203. return this.http.get(host.host + "/ser/fetchWorkOrderLog/" + id, {
  204. headers: this.headers,
  205. });
  206. }
  207. // 综合报表
  208. postReportCount(type, data): any {
  209. return this.http.post(host.host + "/report/orderCount/" + type, data, {
  210. headers: this.headers,
  211. });
  212. }
  213. // 报表导出
  214. exportReport(type, data): any {
  215. return this.http.post(host.host + "/report/export/" + type, data, {
  216. headers: this.exportHeader,
  217. responseType: "arraybuffer",
  218. });
  219. }
  220. dataExport(type, data): any {
  221. return this.http.post(host.host + "/data/export/" + type, data, {
  222. headers: this.exportHeader,
  223. responseType: "arraybuffer",
  224. });
  225. }
  226. //新增/编辑轮巡计划
  227. addRoundRobin(type: string, data: any): any {
  228. return this.http.post(host.host + "/orderPlan/" + type, data, {
  229. headers: this.headers,
  230. });
  231. }
  232. //删除轮巡计划
  233. delRoundRobin(id): any {
  234. return this.http.get(host.host + "/orderPlan/deletePlan/" + id, {
  235. headers: this.headers,
  236. });
  237. }
  238. //启用/停用轮巡计划
  239. switchRoundRobin(isSwitch, id): any {
  240. return this.http.get(
  241. `${host.host}/orderPlan/activePlan/${isSwitch}/${id}`,
  242. { headers: this.headers }
  243. );
  244. }
  245. //新增/编辑快捷建单
  246. addShortcutBuildOrders(type: string, data: any): any {
  247. return this.http.post(host.host + "/api/" + type + "/quickOrder", data, {
  248. headers: this.headers,
  249. });
  250. }
  251. //删除快捷建单
  252. delShortcutBuildOrders(id): any {
  253. return this.http.post(host.host + "/api/rmvData/quickOrder", [id], {
  254. headers: this.headers,
  255. });
  256. }
  257. // 快捷建单二维码批量打印
  258. printShortcutBuildOrders(idArr): any {
  259. return this.http.post(host.host + "/api/orderCodes", idArr, {
  260. headers: this.headers,
  261. });
  262. }
  263. //护士端返回二维码信息,flag=0,动态二维码
  264. getDeptCode(idArr) {
  265. return this.http.post(host.host + "/dept/deptCodes/0", idArr, {
  266. headers: this.headers,
  267. });
  268. }
  269. //药房端打印二维码的接口
  270. printRequisition(idArr) {
  271. return this.http.post(host.host + "/drugsBag/printRequisition", idArr, {
  272. headers: this.headers,
  273. });
  274. }
  275. //药房端待打印变为待配药接口
  276. changeToDispensing(idArr, name) {
  277. return this.http.post(
  278. host.host + "/drugsBag/changeToDispensing/" + name,
  279. idArr,
  280. { headers: this.headers }
  281. );
  282. }
  283. //新建工单->获取新建类型
  284. getAutoWorkTypes(hosId) {
  285. return this.http.get(host.host + "/ser/getAutoWorkTypes/" + hosId, {
  286. headers: this.headers,
  287. });
  288. }
  289. //服务台新建工单—调度台建单获取起点科室或者终点科室列表
  290. getdeptList(taskTypeId, patientCode = undefined, startTime, endTime) {
  291. return this.http.post(
  292. host.host + "/ser/getdeptList",
  293. { taskTypeId, patientCode: patientCode || undefined, startTime, endTime },
  294. { headers: this.headers }
  295. );
  296. }
  297. //服务台新建工单—调度台建单获取患者
  298. getPatientList(data) {
  299. return this.http.post(host.host + "/ser/getPatientInfo", data, {
  300. headers: this.headers,
  301. });
  302. }
  303. //服务台新建工单—调度台建单获取起点科室或者终点科室列表
  304. buildOrder(data) {
  305. return this.http.post(host.host + "/ser/buildOrder", data, {
  306. headers: this.headers,
  307. });
  308. }
  309. //获取当前用户信息
  310. getCurrentUser1() {
  311. return this.http.get(host.host + "/user/data/getCurrentUser", {
  312. headers: this.headers,
  313. });
  314. }
  315. //获取通话记录音频地址
  316. getCallLogPath(data) {
  317. return this.http.post(host.host + "/callLog/getRecordByPath", data, {
  318. headers: this.headers,
  319. });
  320. }
  321. //根据工作分配和人员id获取科室信息
  322. getDeptByUser(data) {
  323. return this.http.post(host.host + "/api/getDeptByUser", data, {
  324. headers: this.headers,
  325. });
  326. }
  327. //根据工作分配和分组id获取科室信息
  328. getDeptByGroup(data) {
  329. return this.http.post(host.host + "/api/getDeptByGroup", data, {
  330. headers: this.headers,
  331. });
  332. }
  333. //微信配置修改
  334. changeWechatConfig(data) {
  335. return this.http.post(
  336. host.host + "/simple/data/addData/wechatConfig",
  337. data,
  338. { headers: this.headers }
  339. );
  340. }
  341. //系统配置修改
  342. changeSysConfig(data) {
  343. return this.http.post(
  344. host.host + "/simple/data/addListData/systemConfiguration",
  345. data,
  346. { headers: this.headers }
  347. );
  348. }
  349. //数据字典楼栋保存接口
  350. saveBuildingList(data) {
  351. return this.http.post(
  352. host.host + "/simple/data/addListData/building",
  353. data,
  354. { headers: this.headers }
  355. );
  356. }
  357. //数据字典楼栋删除接口
  358. delBuildingList(data) {
  359. return this.http.post(host.host + "/simple/data/rmvData/building", data, {
  360. headers: this.headers,
  361. });
  362. }
  363. //数据字典楼层保存接口
  364. saveFloorList(data) {
  365. return this.http.post(host.host + "/simple/data/addListData/floor", data, {
  366. headers: this.headers,
  367. });
  368. }
  369. //数据字典楼层保存接口
  370. delFloorList(data) {
  371. return this.http.post(host.host + "/simple/data/rmvData/floor", data, {
  372. headers: this.headers,
  373. });
  374. }
  375. //simple增删改查,addData新增,addListData批量新增
  376. simplePost(coop, type, data): any {
  377. return this.http.post(
  378. host.host + "/simple/data/" + coop + "/" + type,
  379. data,
  380. { headers: this.headers }
  381. );
  382. }
  383. //api增删改查
  384. apiPost(coop, type, data): any {
  385. return this.http.post(
  386. host.host + "/api/" + coop + "/" + type,
  387. data,
  388. { headers: this.headers }
  389. );
  390. }
  391. //获取工单详情里的历史记录
  392. getWorkOrderRecord(data): any {
  393. return this.http.post(host.host + "/workerOrder/getWorkOrderRecord", data, {
  394. headers: this.headers,
  395. });
  396. }
  397. //刷新字典缓存
  398. refreshDic(): any {
  399. return this.http.post(
  400. host.host + "/common/common/refreshCache",
  401. {},
  402. { headers: this.headers }
  403. );
  404. }
  405. //调度台建单获取可搜索的任务类型列表
  406. getTaskTypeBySearchKey(data): any {
  407. return this.http.post(host.host + "/ser/getTaskTypeBySearchKey", data, {
  408. headers: this.headers,
  409. });
  410. }
  411. //调度台建单获取可搜索的任务类型列表-统计备注
  412. getTaskTypeCountRemarkList(data): any {
  413. return this.http.post(host.host + "/ser/getTaskTypeCountRemarkList", data, {
  414. headers: this.headers,
  415. });
  416. }
  417. //切换院区
  418. changeHospital(data): any {
  419. return this.http.post(host.host + "/auth/changeHospital", data, {
  420. headers: this.headers,
  421. });
  422. }
  423. //刷新缓存
  424. refreshTaskType(): any {
  425. return this.http.get(host.host + "/ser/refreshTaskType", {
  426. headers: this.headers,
  427. });
  428. }
  429. //楼栋配置保存接口
  430. saveBuildings(data) {
  431. return this.http.post(
  432. host.host + "/simple/data/addListData/workOrderGradeBuilding",
  433. data,
  434. { headers: this.headers }
  435. );
  436. }
  437. //删除接口
  438. delBuildings(data) {
  439. return this.http.post(
  440. host.host + "/simple/data/rmvData/workOrderGradeBuilding",
  441. data,
  442. { headers: this.headers }
  443. );
  444. }
  445. //检查信息,患者信息
  446. listMsgByMain(type, data) {
  447. return this.http.post(host.host + "/nurse/" + type, data, {
  448. headers: this.headers,
  449. });
  450. }
  451. //院区系统配置修改
  452. changeHospitalSysConfig(data) {
  453. return this.http.post(
  454. host.host + "/simple/data/addListData/hospitalConfig",
  455. data,
  456. { headers: this.headers }
  457. );
  458. }
  459. //删除用户(包含企业微信用户)
  460. rmvDataAndWeChatNum(data, flag) {
  461. return this.http.post(
  462. host.host + "/user/data/rmvDataAndWeChatNum/" + flag,
  463. data,
  464. {
  465. headers: this.headers,
  466. }
  467. );
  468. }
  469. //数据核对
  470. infoSearch(type, id) {
  471. return this.http.get(host.host + "/testData/view/" + type + "/" + id, {
  472. headers: this.headers,
  473. });
  474. }
  475. // 更新,新增,删除检查类型设置
  476. upDictionary(data) {
  477. return this.http.post(host.host + "/common/common/upDictionary", data, {
  478. headers: this.headers,
  479. });
  480. }
  481. // 护士端定时预约工单立即执行
  482. executeNow(id) {
  483. return this.http.get(host.host + "/api/directStartOrder/" + id, {
  484. headers: this.headers,
  485. });
  486. }
  487. //定时下班列表立即执行
  488. executeNowClassesJob(data) {
  489. return this.http.post(host.host + "/configuration/directOffDuty", data, {
  490. headers: this.headers,
  491. });
  492. }
  493. //轮巡计划列表立即执行
  494. executeNowOrderPlan(id) {
  495. return this.http.get(host.host + "/orderPlan/directOrderPlan/" + id, {
  496. headers: this.headers,
  497. });
  498. }
  499. //查报修列表
  500. listWxIncident(data) {
  501. return this.http.post(host.host + "/itsm/fetchDataList/incident", data, {
  502. headers: this.headers,
  503. });
  504. }
  505. //获取附件图片
  506. listAttachment(type, id) {
  507. return this.http.get(host.host + "/itsm/common/listAttachment/" + type + "/" + id, {
  508. headers: this.headers,
  509. });
  510. }
  511. //查列表
  512. fetchListBx(type, data) {
  513. return this.http.post(host.host + "/itsm/fetchDataList/" + type, data, {
  514. headers: this.headers,
  515. });
  516. }
  517. //查单个
  518. fetchDataBx(target, id) {
  519. return this.http.post(host.host + "/itsm/fetchData/" + target + "/" + id,{}, {
  520. headers: this.headers,
  521. });
  522. }
  523. //提交报修
  524. addWxIncident(data) {
  525. return this.http.post(host.host + "/itsm/addWxIncident", data, {
  526. headers: this.headers,
  527. });
  528. }
  529. //获取工单单号
  530. wxbx(data) {
  531. return this.http.post(host.host + "/itsm/restful/sj", data, {
  532. headers: this.headers,
  533. });
  534. }
  535. //获取ITSM字典
  536. getDictionaryByITSM(data) {
  537. return this.http.post(host.host + "/itsm/common/getDictionary", data, {
  538. headers: this.headers,
  539. });
  540. }
  541. //报修评价
  542. degree(data) {
  543. return this.http.post(host.host + "/itsm/bpm/degree", data, {
  544. headers: this.headers,
  545. });
  546. }
  547. //汇总单
  548. querySummaryDoc(data) {
  549. return this.http.post(host.host + "/itsm/bpm/querySummaryDoc", data, {
  550. headers: this.headers,
  551. });
  552. }
  553. //修改用户
  554. saveUser(data) {
  555. return this.http.post(host.host + "/itsm/user/saveUser", data, {
  556. headers: this.headers,
  557. });
  558. }
  559. //复制院区
  560. copyHosTaskType(data) {
  561. return this.http.post(host.host + "/api/copyHosTaskType", data, {
  562. headers: this.headers,
  563. });
  564. }
  565. //药房端2统计数据
  566. getDrugsBagStateCount(data) {
  567. return this.http.post(host.host + "/ser/getDrugsBagStateCount", data, {
  568. headers: this.headers,
  569. });
  570. }
  571. // 标本视图查询列表接口
  572. specimenView2(data): any {
  573. return this.http.post(
  574. host.host + "/nurse/specimenView2",
  575. data,
  576. { headers: this.headers }
  577. );
  578. }
  579. //问卷发布
  580. managerQuestionnaire(data) {
  581. return this.http.post(
  582. host.host + "/user/data/managerQuestionnaire",
  583. data,
  584. {
  585. headers: this.headers,
  586. }
  587. );
  588. }
  589. //问卷预览
  590. managerQuestionnairePreview(data,token) {
  591. return this.http.post(
  592. host.host + "/api/survey/" + token,
  593. data,
  594. {
  595. headers: this.headers,
  596. }
  597. );
  598. }
  599. //问卷提交答案
  600. surveyCommit(data) {
  601. return this.http.post(
  602. host.host + "/api/survey/commit",
  603. data,
  604. {
  605. headers: this.headers,
  606. }
  607. );
  608. }
  609. //查询回收数据
  610. listQuestionnaire(data) {
  611. return this.http.post(
  612. host.host + "/user/data/listQuestionnaire",
  613. data,
  614. {
  615. headers: this.headers,
  616. }
  617. );
  618. }
  619. //查询楼栋核酸
  620. getNucleicAcidBuildingSummary(data) {
  621. return this.http.post(
  622. host.host + "/workerOrder/nucleicAcidBuildingSummary",
  623. data,
  624. {
  625. headers: this.headers,
  626. }
  627. );
  628. }
  629. //打印楼栋核酸
  630. printNucleicAcid(data) {
  631. return this.http.post(
  632. host.host + "/api/printNucleicAcid",
  633. data,
  634. {
  635. headers: this.headers,
  636. }
  637. );
  638. }
  639. //获取附件-通用
  640. getPreviewImage(type, id) {
  641. return this.http.get(host.host + "/common/common/listAttachment/"+ type +"/" + id, {
  642. headers: this.headers,
  643. });
  644. }
  645. //补充打印楼栋核酸
  646. supplementPrintNucleicAcid(data) {
  647. return this.http.post(
  648. host.host + "/api/supplementPrintNucleicAcid",
  649. data,
  650. {
  651. headers: this.headers,
  652. }
  653. );
  654. }
  655. //查看工单里的血制品信息
  656. checkData(data) {
  657. return this.http.post(
  658. host.host + "/transflow/checkData",
  659. data,
  660. {
  661. headers: this.headers,
  662. }
  663. );
  664. }
  665. //陪检配置保存接口
  666. saveInspections(data) {
  667. return this.http.post(
  668. host.host + "/simple/data/addListData/workOrderInspectScore",
  669. data,
  670. { headers: this.headers }
  671. );
  672. }
  673. // 重置密码
  674. resetpwd(id): any {
  675. return this.http.get(host.host + "/auth/resetpwd/" + id, {});
  676. }
  677. // api接口
  678. apiPostAll(type, data) {
  679. return this.http.post(
  680. host.host + "/api/" + type,
  681. data,
  682. { headers: this.headers }
  683. );
  684. }
  685. //手动创建手术工单
  686. createOrTakeOrder(data) {
  687. return this.http.post(
  688. host.host + "/transflow/createOrTakeOrder",
  689. data,
  690. {
  691. headers: this.headers,
  692. }
  693. );
  694. }
  695. //手动创建手术工单-送回病房
  696. createRemandOrder(data) {
  697. return this.http.post(
  698. host.host + "/transflow/createRemandOrder",
  699. data,
  700. {
  701. headers: this.headers,
  702. }
  703. );
  704. }
  705. // 获取logo和title
  706. getSysNameAndLogo(hosId): any {
  707. return this.http.get(host.host + "/auth/getSysNameAndLogo" + (hosId ? '?hosId=' + hosId : ''), {});
  708. }
  709. //获取启动中的工作分配方案
  710. getUserWorkDept(data) {
  711. return this.http.post(
  712. host.host + "/auth/getUserWorkDept",
  713. data,
  714. {
  715. headers: this.headers,
  716. }
  717. );
  718. }
  719. //上下班
  720. onOrOffLine(data) {
  721. return this.http.post(
  722. host.host + "/auth/onOrOffLine",
  723. data,
  724. {
  725. headers: this.headers,
  726. }
  727. );
  728. }
  729. // 科室检查率统计
  730. postReportDept(type, data): any {
  731. return this.http.post(host.host + "/report/dept/" + type, data, {
  732. headers: this.headers,
  733. });
  734. }
  735. // 楼栋检查率统计
  736. postReportBuilding(type, data): any {
  737. return this.http.post(host.host + "/report/building/" + type, data, {
  738. headers: this.headers,
  739. });
  740. }
  741. // 楼栋检查统计
  742. postReportBuild(type, data): any {
  743. return this.http.post(host.host + "/report/build/" + type, data, {
  744. headers: this.headers,
  745. });
  746. }
  747. // 获取检验项目列表
  748. specimenCount(data): any {
  749. return this.http.post(host.host + "/api/specimenDesc/specimenCount", data, {
  750. headers: this.headers,
  751. });
  752. }
  753. // 被服洗涤-视图
  754. clothesWashing(data, type): any {
  755. return this.http.post(host.host + "/clothesWashing/" + type, data, {
  756. headers: this.headers,
  757. });
  758. }
  759. // transflow
  760. transflow(data, type): any {
  761. return this.http.post(host.host + "/transflow/" + type, data, {
  762. headers: this.headers,
  763. });
  764. }
  765. // 打印门诊服务点二维码
  766. qrcodeCardNo(data): any {
  767. return this.http.post(host.host + "/patient/qrCode", data, {
  768. headers: this.headers,
  769. });
  770. }
  771. // 医废-获取重量和袋数
  772. getWeightAndCount(data): any {
  773. return this.http.post(host.host + "/medicalWaste/getWeightAndCount", data, {
  774. headers: this.headers,
  775. });
  776. }
  777. // 医废-出库
  778. medicalWasteComplete(data): any {
  779. return this.http.post(host.host + "/medicalWaste/complete", data, {
  780. headers: this.headers,
  781. });
  782. }
  783. // 模板导出
  784. exportExcel(model, data): any {
  785. return this.http.post(host.host + "/user/data/exportExcel/" + model, data, {
  786. headers: this.exportHeader,
  787. responseType: "arraybuffer",
  788. });
  789. }
  790. // 巡检相关接口
  791. inspectionPost(type, data): any {
  792. return this.http.post(host.host + "/inspection/" + type, data, {
  793. headers: this.headers,
  794. });
  795. }
  796. // 验证工单问卷二维码是否过期
  797. verifyPastApi(data): any {
  798. return this.http.post(host.host + "/questionnaire/check", data, {
  799. headers: this.headers,
  800. });
  801. }
  802. // 科室发药单打印
  803. transfusionPrint(model, id): any {
  804. return this.http.get(host.host + `/simple/data/fetchData/${model}/${id}`);
  805. }
  806. // 科室发药配送建单
  807. transfusionBuildOrder(data): any {
  808. return this.http.post(host.host + "/infusion/solutions/createOrTakeOrder", data, {
  809. headers: this.headers,
  810. });
  811. }
  812. // 发药批次-配置科室删除
  813. transfusionConfigDeptDel(data): any {
  814. return this.http.post(host.host + "/infusion/solutions/remove", data, {
  815. headers: this.headers,
  816. });
  817. }
  818. // 配置中心
  819. incidentPost(type, data): any {
  820. return this.http.post(host.host + "/incident/" + type, data, {
  821. headers: this.headers,
  822. });
  823. }
  824. // 发药批次-配置科室数据
  825. getConsumeDept(data): any {
  826. return this.http.post(host.host + "/infusion/solutions/getConsumeDept", data, {
  827. headers: this.headers,
  828. });
  829. }
  830. //删除附件图片
  831. removeAttachment(token) {
  832. return this.http.post(host.host + `/common/common/removeAttachment/${token}`,{}, {
  833. headers: this.headers,
  834. });
  835. }
  836. // wechat相关-重置token
  837. refreshToken(type, data): any {
  838. return this.http.post(host.host + "/wechat/" + type, data, {
  839. headers: this.headers,
  840. });
  841. }
  842. // 故障工单-获取数量
  843. getCount(data): any {
  844. return this.http.post(host.host + "/flow/incident/list/count", data, {
  845. headers: this.headers,
  846. });
  847. }
  848. // 故障工单-导出
  849. downDataModel(data): any {
  850. return this.http.post(host.host + "/incident/data/downDataModel/incident/3", data, {
  851. headers: this.exportHeader,
  852. responseType: "arraybuffer",
  853. });
  854. }
  855. // 故障工单-流程操作
  856. flowPost(type, data): any {
  857. return this.http.post(host.host + "/flow/" + type, data, {
  858. headers: this.headers,
  859. });
  860. }
  861. // 查询汇总单
  862. querySummaryDocNew(data): any {
  863. return this.http.post(host.host + "/incident/data/querySummaryDoc", data, {
  864. headers: this.headers,
  865. });
  866. }
  867. // 新增汇总单
  868. addSummaryDoc(data): any {
  869. return this.http.post(host.host + "/incident/data/addSummaryDoc", data, {
  870. headers: this.headers,
  871. });
  872. }
  873. // 返回附件上传url
  874. returnUploadUrl(type, id): string {
  875. return `${host.host}/common/common/uploadAttachment/${type}/${id}/${id}`;
  876. }
  877. // 返回excel导入url
  878. returnImportExcelUrl(type): string {
  879. return `${host.host}/user/data/importExcel/${type}`
  880. }
  881. // 设置责任部门
  882. changeIncidentDuty(data): any {
  883. return this.http.post(host.host + "/incident/data/changeIncidentDuty", data, {
  884. headers: this.headers,
  885. });
  886. }
  887. // 下载附件
  888. downloadAttachment(token): any {
  889. return host.host + "/common/common/downloadAttachment/" + token;
  890. }
  891. //病理申请单打印
  892. pathologyPrint(data) {
  893. return this.http.post(host.host + `/pathology/print`, data, {
  894. headers: this.headers,
  895. });
  896. }
  897. //病理申请单追加打印/全量打印
  898. pathologyCheckPrint(type,businessId,data) {
  899. return this.http.post(host.host + `/pathology/check/${type}/${businessId}`, data, {
  900. headers: this.headers,
  901. });
  902. }
  903. // 病例申请单暂存
  904. pathologyOperation(data,operation) {
  905. return this.http.post(host.host + `/pathology/${operation}`, data, {
  906. headers: this.headers,
  907. });
  908. }
  909. // 病理查询标本条码
  910. pathologyScanCode(data) {
  911. return this.http.post(host.host + `/pathology/scanCode`, data, {
  912. headers: this.headers,
  913. });
  914. }
  915. // 工号搜索
  916. jobSearch(data) {
  917. return this.http.post(host.host + `/data/isRepeat`, data, {
  918. headers: this.headers,
  919. });
  920. }
  921. // 标本间获取批次号
  922. generateBatchNumber() {
  923. return this.http.post(host.host + `/pathology/generateBatchNumber/blbatch`, {}, {
  924. headers: this.headers,
  925. });
  926. }
  927. // 标本间获取标本接收信息
  928. getSpecimenInfo(batchNo,deptId,data) {
  929. return this.http.post(host.host + `/pathology/getInfo/${batchNo}/${deptId}`, data, {
  930. headers: this.headers,
  931. });
  932. }
  933. // 标本间标本接收-交接完成
  934. handoverCompleted(data) {
  935. return this.http.post(host.host + `/pathology/handoverCompleted`, data, {
  936. headers: this.headers,
  937. });
  938. }
  939. // 病理科打包
  940. pathologyPack(data) {
  941. return this.http.post(host.host + `/pathology/pack`, data, {
  942. headers: this.headers,
  943. });
  944. }
  945. // 病理科今日接收汇总
  946. pathologyToday(data) {
  947. return this.http.post(host.host + `/pathology/receiveToday`, data, {
  948. headers: this.headers,
  949. });
  950. }
  951. // 大输液-发药批次-发药总量
  952. drugsGross(batchId) {
  953. return this.http.get(host.host + `/infusion/solutions/drugsNum/${batchId}`, {
  954. headers: this.headers,
  955. });
  956. }
  957. // 大输液-发药批次-发药信息
  958. drugsInfo(data) {
  959. return this.http.post(host.host + `/infusion/solutions/dispensing/medicine/details`,data, {
  960. headers: this.headers,
  961. });
  962. }
  963. // 统计分析-陪检统计
  964. inspectionStatistics(data) {
  965. return this.http.post(host.host + `/report/accompanied/inspection`,data, {
  966. headers: this.headers,
  967. });
  968. }
  969. // 调度台工单列表
  970. orderList(data) {
  971. return this.http.post(host.host + `/ser/merge/orderList`,data, {
  972. headers: this.headers,
  973. });
  974. }
  975. // 调度台头部运维分组
  976. incidentUserTaskCount(data) {
  977. return this.http.post(host.host + `/incident/incidentUserTaskCount`,data, {
  978. headers: this.headers,
  979. });
  980. }
  981. // 大输液-科室汇总统计
  982. summaryData(data) {
  983. return this.http.post(host.host + `/infusion/solutions/dept/summary`,data, {
  984. headers: this.headers,
  985. });
  986. }
  987. // 获取动态密钥
  988. getSecretKey(deptId) {
  989. return this.http.post(host.host + `/dept/secretKey/${deptId}`,{}, {
  990. headers: this.headers,
  991. });
  992. }
  993. // 根据来电电话查科室
  994. findPhoneDept(data) {
  995. return this.http.post(host.host + `/user/data/findPhoneDept`, data, {
  996. headers: this.headers,
  997. });
  998. }
  999. // 获取细胞学标本
  1000. getCellDictionary(data) {
  1001. return this.http.post(host.host + `/common/common/getDictionary`,data, {
  1002. headers: this.headers,
  1003. });
  1004. }
  1005. // 删除故障现象
  1006. deleteIncidentCategory(data) {
  1007. return this.http.post(host.host + `/incident/deleteIncidentCategory`, data, {
  1008. headers: this.headers,
  1009. });
  1010. }
  1011. }