main.service.ts 34 KB

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