InsuBusiness.cs 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using PTMedicalInsurance.Common;
  7. using PTMedicalInsurance.Business;
  8. using System.Windows.Forms;
  9. using PTMedicalInsurance.Helper;
  10. using Newtonsoft.Json.Linq;
  11. using PTMedicalInsurance.Variables;
  12. using PTMedicalInsurance.Forms;
  13. using System.IO;
  14. using System.Reflection;
  15. using System.Data;
  16. namespace PTMedicalInsurance
  17. {
  18. public class InsuBusiness : IInsuBusiness
  19. {
  20. //定义相关的变量
  21. //private Patients patient;
  22. //private Fees fee;
  23. //private Settlements settlement;
  24. //json对象属性
  25. private JObject joInParam;
  26. private JArray jaSession ;
  27. private JArray jaParams;
  28. private JObject joParam;
  29. private JObject joInterface;
  30. //设置业务实例
  31. CenterBusiness cBus = new CenterBusiness();
  32. HisMainBusiness hBus = new HisMainBusiness();
  33. HisIrisServices hIS = new HisIrisServices();
  34. MIIrisServices mIS= new MIIrisServices();
  35. InvokeHelper invoker = new InvokeHelper();
  36. //
  37. private string businessType;
  38. private string operationType;
  39. public InsuBusiness()
  40. {
  41. Global.curEvt.path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
  42. ComputerInfo comp = new ComputerInfo();
  43. Global.curEvt.mac = comp.GetMAC();
  44. Global.curEvt.ip = comp.GetIP();
  45. Global.pat.insuplc_admdvs = ""; //如果是NULL中心会报错
  46. }
  47. private int parseInparam(string inParam,out string errMsg)
  48. {
  49. errMsg = "";
  50. try
  51. {
  52. joInParam = JObject.Parse(inParam);
  53. jaSession = JArray.Parse(JsonHelper.getDestValue(joInParam, "session"));
  54. Global.curEvt.jaSession = jaSession;
  55. jaParams = JArray.Parse(JsonHelper.getDestValue(joInParam, "params"));
  56. joParam = JObject.FromObject(jaParams[0]);
  57. joInterface = JObject.Parse(JsonHelper.getDestValue(joInParam, "interfaceinfo"));
  58. businessType = JsonHelper.getDestValue(joInParam, "businessType");
  59. operationType = JsonHelper.getDestValue(joInParam, "operationType");
  60. if ((businessType == "M6") || (businessType == "M6C") || (businessType == "M6Confirm"))
  61. {
  62. Environment.CurrentDirectory = @"D:\HttpServerAPI\bin";
  63. }
  64. return 0;
  65. }
  66. catch (Exception ex)
  67. {
  68. errMsg = "parseInparam 解析入参异常:" + errMsg;
  69. return -1;
  70. }
  71. }
  72. /// <summary>
  73. /// 签到
  74. /// </summary>
  75. /// <param name="InParam"></param>
  76. /// <returns></returns>
  77. public string Init(string InParam)
  78. {
  79. string errMsg, rtnResult ="";
  80. JObject joRtn = new JObject();
  81. try
  82. {
  83. if (hBus.initEnvironment(InParam, out errMsg) != 0)
  84. {
  85. return JsonHelper.setExceptionJson(-100, "initEnvironment 失败", errMsg).ToString();
  86. }
  87. else
  88. {
  89. if (mIS.isSigned(ref Global.curEvt.signno) != true)
  90. {
  91. if (businessType != "BasicData")//如果是打开数据对照界面不调用初始化
  92. {
  93. CallResult callResult = new SignInProcess().Process(joRtn);
  94. rtnResult = callResult.Data;
  95. }
  96. else
  97. {
  98. Global.curEvt.signno = "ABC123";
  99. rtnResult = JsonHelper.setIrisReturnValue(0, "初始化成功(医保对照不初始化)!", null).ToString();
  100. }
  101. }
  102. else
  103. {
  104. rtnResult = JsonHelper.setIrisReturnValue(0, "初始化成功!", null).ToString();
  105. }
  106. return rtnResult;
  107. }
  108. }
  109. catch (Exception ex)
  110. {
  111. rtnResult = JsonHelper.setExceptionJson(-100, "Init 异常", ex.Message).ToString();
  112. return rtnResult;
  113. }
  114. finally
  115. {
  116. Global.writeLog("初始化结果:" + rtnResult);
  117. }
  118. }
  119. /// <summary>
  120. /// 初始化
  121. /// </summary>
  122. /// <param name="inParam"></param>
  123. /// <param name="outParam"></param>
  124. /// <returns></returns>
  125. private int init(string inParam, out string outParam)
  126. {
  127. string errMsg;
  128. outParam = "";
  129. try
  130. {
  131. //BS架构调用方式问题,每次调用都需要重新初始化
  132. JObject joInitRtn = JObject.Parse(Init(inParam));
  133. if (JsonHelper.parseIrisRtnValue(joInitRtn, out errMsg) != 0)
  134. {
  135. outParam = JsonHelper.setExceptionJson(-100, "init(HIS医保环境初始化)", errMsg).ToString();
  136. return -1;
  137. }
  138. else
  139. {
  140. return 0;
  141. }
  142. }
  143. catch (Exception ex)
  144. {
  145. outParam = JsonHelper.setExceptionJson(-100, "init(HIS医保环境初始化)异常", ex.Message).ToString();
  146. return -1;
  147. }
  148. }
  149. /// <summary>
  150. /// 获取患者信息
  151. /// </summary>
  152. /// <param name="InParam"></param>
  153. /// <returns></returns>
  154. public string GetPatientInfo(string InParam)
  155. {
  156. Global.writeLog("GetPatientInfo入参:" + JsonHelper.Compress(InParam));
  157. //设置返回值,错误信息
  158. string rtnResult = "",outParam;
  159. //BS架构调用方式问题,每次调用都需要重新初始化
  160. if (init(InParam,out outParam)!= 0)
  161. {
  162. rtnResult = outParam;
  163. return rtnResult;
  164. }
  165. JObject joInParam = JObject.Parse(InParam);
  166. string businessType = JsonHelper.getDestValue(joInParam,"businessType");
  167. try
  168. {
  169. switch (businessType)
  170. {
  171. case "M1"://门诊读卡
  172. case "Z1"://住院读卡
  173. {
  174. //打开读卡窗口,操作员选择读卡类型后进行读卡器读卡,再进行1101获取参保信息
  175. PatientService patientService = new PatientService();
  176. patientService.readPatientInfo(out outParam);
  177. rtnResult = JsonHelper.setIrisReturnValue(0, "", JObject.Parse(outParam)).ToString();
  178. break;
  179. }
  180. }
  181. return rtnResult;
  182. }
  183. catch (Exception ex)
  184. {
  185. rtnResult = JsonHelper.setIrisReturnValue(-1 , "GetPatientInfo发生异常;" + ex.Message,null).ToString();
  186. return rtnResult;
  187. }
  188. finally
  189. {
  190. Global.writeLog("GetPatientInfo出参:" + JsonHelper.Compress(rtnResult));
  191. }
  192. }
  193. /// <summary>
  194. /// 登记
  195. /// </summary>
  196. /// <param name="InParam"></param>
  197. /// <returns></returns>
  198. public string Register(string InParam)
  199. {
  200. Global.writeLog("Register 入参:" + JsonHelper.Compress(InParam));
  201. //设置返回值,错误信息
  202. string errMsg, rtnResult = "", outParam;
  203. try
  204. {
  205. //解析入参
  206. if (parseInparam(InParam, out errMsg) != 0)
  207. {
  208. rtnResult = JsonHelper.setExceptionJson(-1, "", errMsg).ToString();
  209. return rtnResult;
  210. }
  211. //BS架构调用方式问题,每次调用都需要重新初始化
  212. if (init(InParam, out outParam) != 0)
  213. {
  214. rtnResult = outParam;
  215. return rtnResult;
  216. }
  217. //获取pat
  218. hBus.GetRegPatInfo(businessType, joInParam, out Global.pat);
  219. switch (businessType)
  220. {
  221. case "M2"://门诊登记
  222. {
  223. //string patInfo = "";
  224. //errMsg = showPatientInfo(out patInfo, out outParam);
  225. //if (!errMsg.Equals("0"))
  226. //{
  227. // return errMsg;
  228. //}
  229. //Global.writeLog("获取到病人信息:" + patInfo);
  230. //JObject reg = JObject.Parse(patInfo);
  231. //this.OutpatientReg(reg,patInfo);
  232. break;
  233. }
  234. case "M2C"://门诊登记撤销
  235. {
  236. break;
  237. }
  238. case "Z0"://住院修改
  239. {
  240. break;
  241. }
  242. case "Z2"://入院登记
  243. {
  244. Global.Set.clearingWay = "1"; //住院
  245. rtnResult = new InpatientRegistionProcess().Process(joParam).Data;
  246. break;
  247. }
  248. case "Z2C"://入院登记取消
  249. {
  250. rtnResult = new InpatientRegCancelProcess().Process(joParam).Data;
  251. break;
  252. }
  253. case "Z6"://出院登记
  254. {
  255. break;
  256. }
  257. case "Z6C"://出院登记取消
  258. {
  259. rtnResult = new InpatientExitCancelProcess().Process(joParam).Data;
  260. break;
  261. }
  262. default:
  263. {
  264. rtnResult = JsonHelper.setExceptionJson(-1, "Register 交易", "传入的业务编码不对!").ToString();
  265. return rtnResult;
  266. }
  267. }
  268. }
  269. catch (Exception ex)
  270. {
  271. rtnResult = JsonHelper.setIrisReturnValue(-1, "Register 发生异常;" + ex.Message, null).ToString();
  272. return rtnResult;
  273. }
  274. finally
  275. {
  276. Global.writeLog("Register 出参:" + JsonHelper.Compress(rtnResult));
  277. }
  278. return rtnResult;
  279. }
  280. /// <summary>
  281. /// 费用上传
  282. /// </summary>
  283. /// <param name="InParam"></param>
  284. /// <returns></returns>
  285. public string FeeUpload(string InParam)
  286. {
  287. Global.writeLog("FeeUpload 入参:" + JsonHelper.Compress(InParam));
  288. //设置返回值,错误信息
  289. string errMsg, rtnResult = "", outParam;
  290. try
  291. {
  292. //解析入参
  293. if (parseInparam(InParam, out errMsg) != 0)
  294. {
  295. rtnResult = JsonHelper.setExceptionJson(-1, "", errMsg).ToString();
  296. return rtnResult;
  297. }
  298. //BS架构调用方式问题,每次调用都需要重新初始化
  299. if (init(InParam, out outParam) != 0)
  300. {
  301. rtnResult = outParam;
  302. return rtnResult;
  303. }
  304. //获取pat
  305. hBus.GetFeeHisInfo(businessType, joInParam, out Global.pat);
  306. switch (businessType)
  307. {
  308. case "M3"://门诊费用上传
  309. {
  310. break;
  311. }
  312. case "M3C"://门诊费用撤销
  313. {
  314. break;
  315. }
  316. case "Z3"://入院费用上传
  317. {
  318. rtnResult = new InpatientFeeUploadProcess().Process(joParam).Data;
  319. break;
  320. }
  321. case "Z3C"://住院费用上传取消
  322. {
  323. rtnResult = new InpatientFeeUploadCancelProcess().Process(joParam).Data;
  324. break;
  325. }
  326. default:
  327. {
  328. rtnResult = JsonHelper.setExceptionJson(-1, "FeeUpload 交易", "传入的业务编码不对!").ToString();
  329. return rtnResult;
  330. }
  331. }
  332. return rtnResult;
  333. }
  334. catch (Exception ex)
  335. {
  336. rtnResult = JsonHelper.setExceptionJson(-1, "FeeUpload 交易", ex.Message).ToString();
  337. return rtnResult;
  338. }
  339. finally
  340. {
  341. Global.writeLog("FeeUpload 出参:" + JsonHelper.Compress(rtnResult));
  342. }
  343. }
  344. /// <summary>
  345. /// 结算
  346. /// </summary>
  347. /// <param name="InParam"></param>
  348. /// <returns></returns>
  349. public string Settlement(string InParam)
  350. {
  351. Global.writeLog("Settlement 入参:" + JsonHelper.Compress(InParam));
  352. //设置返回值,错误信息
  353. string errMsg, rtnResult = "", outParam;
  354. try
  355. {
  356. //解析入参
  357. if (parseInparam(InParam, out errMsg) != 0)
  358. {
  359. rtnResult = JsonHelper.setExceptionJson(-1, "", errMsg).ToString();
  360. return rtnResult;
  361. }
  362. //BS架构调用方式问题,每次调用都需要重新初始化
  363. if (init(InParam, out outParam) != 0)
  364. {
  365. rtnResult = outParam;
  366. return rtnResult;
  367. }
  368. //获取pat
  369. hBus.GetSettlementHisInfo(businessType, joInParam, out Global.pat);
  370. switch (businessType)
  371. {
  372. case "M4"://门诊预结算
  373. {
  374. // 没有做任何处理?是否必须???
  375. //OutpatientRegistration frmReg = new OutpatientRegistration();
  376. //if (frmReg.ShowDialog() == DialogResult.OK)
  377. //{
  378. // rtnResult = "调用结束";
  379. //}
  380. break;
  381. }
  382. case "M4C"://门诊预结算撤销
  383. {
  384. break;
  385. }
  386. case "M5"://门诊结算
  387. {
  388. Global.Set.clearingWay = "6"; //门诊
  389. OPSettlementService opService = new OPSettlementService();
  390. rtnResult = opService.Charge(operationType, joInParam);
  391. break;
  392. }
  393. case "M5C"://门诊结算撤销
  394. {
  395. OPSettlementService opService = new OPSettlementService();
  396. rtnResult = opService.DisCharge(joParam);
  397. break;
  398. }
  399. case "M6"://门诊移动支付结算
  400. {
  401. #region 移动支付
  402. //MobilePay mp = new MobilePay(InParam, out errMsg);
  403. //if (errMsg != "")
  404. //{
  405. // rtnResult = JsonHelper.setExceptionJson(-1, "Settlement 交易", errMsg).ToString();
  406. // return rtnResult;
  407. //}
  408. //if (mp.MobilePaySettlement(out outParam) != 0)
  409. // rtnResult = JsonHelper.setExceptionJson(-1, "Settlement 交易", outParam).ToString();
  410. //else
  411. // rtnResult = outParam;
  412. //return rtnResult;
  413. #endregion
  414. break;
  415. }
  416. case "M6C"://门诊移动支付结算撤销
  417. {
  418. #region 移动支付取消
  419. //MobilePay mp = new MobilePay(InParam, out errMsg);
  420. //if (errMsg != "")
  421. //{
  422. // rtnResult = JsonHelper.setExceptionJson(-1, "Settlement 交易", errMsg).ToString();
  423. // return rtnResult;
  424. //}
  425. //if (mp.MobilePayCancelSettlement(out outParam) != 0)
  426. // rtnResult = JsonHelper.setExceptionJson(-1, "Settlement 交易", outParam).ToString();
  427. //else
  428. // rtnResult = outParam;
  429. //return rtnResult;
  430. #endregion
  431. break;
  432. }
  433. case "M6Confirm"://门诊移动支付确认
  434. {
  435. #region 移动支付确认
  436. //MobilePay mp = new MobilePay(InParam, out errMsg);
  437. //if (errMsg != "")
  438. //{
  439. // rtnResult = JsonHelper.setExceptionJson(-1, "Settlement 交易", errMsg).ToString();
  440. // return rtnResult;
  441. //}
  442. //if (mp.MobilePayConfirmSettlement(out outParam) != 0)
  443. // rtnResult = JsonHelper.setExceptionJson(-1, "Settlement 交易", outParam).ToString();
  444. //else
  445. // rtnResult = outParam;
  446. //return rtnResult;
  447. #endregion
  448. break;
  449. }
  450. case "Z4"://住院预结算
  451. {
  452. #region 预结算
  453. Global.pat.RYorCY = "2";
  454. JObject joSettle = new JObject();
  455. CallResult result = new IPPreSettlementProcess().Process(joParam);
  456. if (result.Success)
  457. {
  458. rtnResult = JsonHelper.setExceptionJson(-1, "结算信息展示", result.Data).ToString();
  459. }
  460. else
  461. {
  462. rtnResult = JsonHelper.setIrisReturnValue(0, "预结算成功", null).ToString();
  463. }
  464. break;
  465. #endregion
  466. }
  467. case "Z4C"://住院预结算撤销
  468. {
  469. rtnResult = JsonHelper.setExceptionJson(-100, "该接口不支持预结算取消!", null).ToString();
  470. return rtnResult;
  471. }
  472. case "Z5"://住院结算
  473. {
  474. Global.Set.clearingWay = "1"; //住院
  475. IPSettlementService ipService = new IPSettlementService();
  476. rtnResult = ipService.Charge(operationType,joParam);
  477. break;
  478. }
  479. case "Z5C"://住院结算撤销
  480. {
  481. IPSettlementService ipService = new IPSettlementService();
  482. rtnResult = ipService.DisCharge(joParam);
  483. break;
  484. }
  485. default:
  486. {
  487. rtnResult = JsonHelper.setExceptionJson(-1, "Settlement 交易", "传入的业务编码不对!").ToString();
  488. return rtnResult;
  489. }
  490. }
  491. return rtnResult;
  492. }
  493. catch (Exception ex)
  494. {
  495. rtnResult = JsonHelper.setExceptionJson(-1, "Settlement 交易", ex.Message).ToString();
  496. return rtnResult;
  497. }
  498. finally
  499. {
  500. Global.writeLog("Settlement 出参:" + JsonHelper.Compress(rtnResult));
  501. }
  502. }
  503. /// <summary>
  504. /// 辅助交易
  505. /// </summary>
  506. /// <param name="InParam"></param>
  507. /// <returns></returns>
  508. public string AgentFun(string InParam)
  509. {
  510. Global.writeLog("AgentFun 入参:" + JsonHelper.Compress(InParam));
  511. //设置返回值,错误信息
  512. string errMsg, rtnResult = "", outParam;
  513. try
  514. {
  515. //解析入参
  516. if (parseInparam(InParam, out errMsg) != 0)
  517. {
  518. rtnResult = JsonHelper.setExceptionJson(-1, "", errMsg).ToString();
  519. return rtnResult;
  520. }
  521. //BS架构调用方式问题,每次调用都需要重新初始化
  522. if (init(InParam, out outParam) != 0)
  523. {
  524. Global.writeLog("初始化异常:"+outParam);
  525. rtnResult = outParam;
  526. // 基础数据没有初始化成功,也可以运行
  527. if (!businessType.Equals("BasicData")) {
  528. return rtnResult;
  529. }
  530. }
  531. //获取pat
  532. hBus.GetAgentFunHisInfo(businessType, joInParam, out Global.pat);
  533. switch (businessType)
  534. {
  535. case "BasicData"://基础数据维护
  536. {
  537. BasicData bd = new BasicData();
  538. bd.ShowDialog();
  539. break;
  540. }
  541. case "Exception"://异常处理
  542. {
  543. //显示异常处理界面
  544. HandleException frmEX = new HandleException();
  545. if (frmEX.ShowDialog() == DialogResult.OK)
  546. {
  547. }
  548. break;
  549. }
  550. case "CheckAndClearing"://对账清算
  551. {
  552. Clearing frmEX = new Clearing();
  553. if (frmEX.ShowDialog() == DialogResult.OK)
  554. {
  555. }
  556. break;
  557. }
  558. case "Print"://打印
  559. {
  560. printFastReport();
  561. return JsonHelper.setIrisReturnValue(0, "", null).ToString();
  562. }
  563. case "Log"://日志
  564. {
  565. MessageBox.Show(businessType);
  566. break;
  567. }
  568. case "RecordUpload"://上传记录
  569. {
  570. MessageBox.Show(businessType);
  571. break;
  572. }
  573. case "HospitalRegister"://备案
  574. {
  575. ToRecordChoose Referral = new ToRecordChoose();
  576. Referral.ShowDialog();
  577. break;
  578. }
  579. case "PreAndInProcessAnalysis"://事前分析 诊间只有住院的事前分析
  580. {
  581. Global.pat.adm_Dr = int.Parse(JsonHelper.getDestValue(joInParam, "params[0].admID"));
  582. JObject joResult = new JObject();
  583. joResult.Add("result", JObject.Parse(JsonHelper.getDestValue(joParam, "insuData")));
  584. //事前分析
  585. if (Global.curEvt.ext.isOpenAnalysis)
  586. {
  587. if (hBus.PreAnalysis("5", joResult.ToString(), out errMsg) != 0)
  588. {
  589. MessageBox.Show(errMsg);
  590. break;
  591. }
  592. }
  593. break;
  594. }
  595. default:
  596. {
  597. rtnResult = JsonHelper.setExceptionJson(-1, "AgentFun 交易", "传入的业务编码不对!").ToString();
  598. break;
  599. }
  600. }
  601. return rtnResult;
  602. }
  603. catch (Exception ex)
  604. {
  605. rtnResult = JsonHelper.setExceptionJson(-1, "AgentFun 交易", ex.Message).ToString();
  606. return rtnResult;
  607. }
  608. finally
  609. {
  610. Global.writeLog("AgentFun 出参:" + JsonHelper.Compress(rtnResult));
  611. }
  612. }
  613. private void printFastReport()
  614. {
  615. SettlementChecklist frmSettlList;
  616. string insuAdmObj = JsonHelper.getDestValue(joInParam, "insuAdmObj");
  617. if (insuAdmObj == "")
  618. {
  619. frmSettlList = new SettlementChecklist();
  620. frmSettlList.ShowDialog();
  621. }
  622. else
  623. {
  624. JObject joInsuAdmObj = JObject.Parse(insuAdmObj);
  625. frmSettlList = new SettlementChecklist(joInsuAdmObj);
  626. string groupID = JsonHelper.getDestValue((JObject)Global.curEvt.jaSession[0], "groupID");
  627. DataTable dt = (DataTable)frmSettlList.dgvSettlRecord.DataSource;
  628. frmSettlList.btnPrint_Click(null, null);
  629. }
  630. }
  631. public string PlatformDirectConnect(string InParam)
  632. {
  633. //设置返回值,错误信息
  634. string errMsg, rtnResult = "", outParam;
  635. try
  636. {
  637. Global.writeLog("PlatformDirectConnect 入参:" + JsonHelper.Compress(InParam));
  638. //解析入参
  639. if (parseInparam(InParam, out errMsg) != 0)
  640. {
  641. rtnResult = JsonHelper.setExceptionJson(-1, "", errMsg).ToString();
  642. return rtnResult;
  643. }
  644. Global.businessType = businessType;
  645. string funNO = JsonHelper.getDestValue(joInParam, "funNO");
  646. //BS架构调用方式问题,每次调用都需要重新初始化
  647. if (init(InParam, out outParam) != 0)
  648. {
  649. rtnResult = outParam;
  650. return rtnResult;
  651. }
  652. if (funNO=="4101")
  653. Global.pat.insuplc_admdvs = JsonHelper.getDestValue(joInParam, "insuplc_admdvs");
  654. TradeEnum trade = TradeEnum.DEFAULT.GetByCode(funNO);
  655. JObject joRtn = invoker.invokeCenterService(trade, joParam);
  656. if (JsonHelper.parseCenterRtnValue(joRtn, out errMsg) != 0)
  657. {
  658. rtnResult = JsonHelper.setExceptionJson(-1, "平台直连错误", errMsg).ToString();
  659. return rtnResult;
  660. }
  661. else
  662. {
  663. rtnResult = JsonHelper.setIrisReturnValue(0, "", joRtn).ToString();
  664. return rtnResult;
  665. }
  666. }
  667. catch (Exception ex)
  668. {
  669. rtnResult = JsonHelper.setExceptionJson(-1, "PlatformDirectConnect 交易", ex.Message).ToString();
  670. return rtnResult;
  671. }
  672. finally
  673. {
  674. Global.writeLog("PlatformDirectConnect 出参:" + JsonHelper.Compress(rtnResult));
  675. }
  676. }
  677. }
  678. }