1、需要在javadsp\config\ScheduleTask.xml中增加如下配置:

    1. <?xml version="1.0" encoding="utf-8"?>
    2. <config>
    3. <!--DSP内置的计划任务设置,每一个pool开一个线程池-->
    4. <pool enable="true">
    5. <poolSize readme="线程数,list中的任务组共用">1</poolSize>
    6. <name>电子回单线程池</name>
    7. <group readme="任务组,一组内任务串行运行,多组间并发执行">
    8. <name>同步电子回单任务组</name>
    9. <timer readme="运行时间设置">
    10. <type>auto</type>
    11. <delaySecs readme="运行间隔时间:秒">10</delaySecs>
    12. </timer>
    13. <task readme="同步电子回单任务">
    14. <name readme="自定义任务名称">同步电子回单</name>
    15. <command readme="命令,固定值">syncReceipt</command>
    16. <paramList readme="参数,键值对方式">
    17. <bank readme="银行"></bank>
    18. <beginDayCount readme="开始天数,小于0代表以前">-20</beginDayCount>
    19. <endDayCount readme="结束天数,0表示今天">0</endDayCount>
    20. </paramList>
    21. </task>
    22. </group>
    23. </pool>
    24. </config>

    2、需要在javadsp\config\ReceiptPro.xml中配置回单推送的配置

    1. <?xml version="1.0" encoding="utf-8"?>
    2. <config readme="ReceiptProConfig">
    3. <!--电子回单相关配置-->
    4. <isTransmitReceiptReq readme="其它DSP提交过来的回单文件和回单数据,是否转发至远程DSP">false</isTransmitReceiptReq>
    5. <transmitDestServer readme="转发目的DSP地址">127.0.0.1:7979</transmitDestServer>
    6. <deleteAfterUploaded readme="文件上传成功后是否删除">false</deleteAfterUploaded>
    7. <setUpStateBySync readme="其它dsp同步过来时,重置的文件上传状态">1</setUpStateBySync>
    8. <setPushStateBySync readme="其它dsp同步过来时,重置的数据推送状态">1</setPushStateBySync>
    9. <setSttBizStateBySync readme="其它dsp同步过来时,重置的receiptStt业务状态">1</setSttBizStateBySync>
    10. <!--localSaveDir本地回单主目录-->
    11. <localSaveDir readme="回单文件下载保存主目录--本地">{$DSPHOME.Parent}\receipt</localSaveDir>
    12. <pushStepLen readme="推送数据分段笔数">200</pushStepLen>
    13. <!--rpa保存的回单ftp地址,接收到数据通知后,dsp从该ftp地址下载回单文件-->
    14. <receiptFtpSet for="RPA" readme="财小神电子回单ftp">
    15. <ftpType readme="如果是sftp,填sftp,普通ftp则置空"></ftpType>
    16. <ftpClinet>bizftp</ftpClinet>
    17. <serverIP des="ftp服务">10.60.44.106</serverIP>
    18. <port des="ftp服务端口">21</port>
    19. <userName des="ftp用户名">ftpuser</userName>
    20. <userPassword des="ftp用户密码">fingard1!</userPassword>
    21. <downDir des="下载目录">/test</downDir>
    22. <charset des="字符集">UTF-8</charset>
    23. </receiptFtpSet>
    24. <!--fileSaveSet,回单文件上传设置,通过设置enable属性为true进行开启,可配置多个上传<fileSaveSet>,需分别指定不同<id>-->
    25. <fileSaveSet enable="false" readme="回单文件上传至指定ftp服务器">
    26. <id>100</id>
    27. <saveType readme="回单文件保存方式:ftp">ftp</saveType>
    28. <filePathFormat readme="文件路径规则,默认为/日期/账号/回单文件名">1</filePathFormat>
    29. <ftpSet readme="ftp/sftp配置">
    30. <ftpType readme="ftp/sftp">ftp</ftpType>
    31. <serverIP des="ftp服务">127.0.0.1</serverIP>
    32. <port des="ftp服务端口">21</port>
    33. <userName des="ftp用户名">ftp</userName>
    34. <userPassword des="ftp用户密码">ftp123</userPassword>
    35. <downDir des="下载目录">/down</downDir>
    36. <upDir des="上传目录">/up/银行字母代码/年月/账号</upDir>
    37. <charset des="字符集">UTF-8</charset>
    38. <timeout des="超时时间">100000</timeout>
    39. </ftpSet>
    40. </fileSaveSet>
    41. <fileSaveSet enable="false" readme="">
    42. <id>102</id>
    43. <saveType readme="回单文件保存方式:shareDir,文件目录方式">shareDir</saveType>
    44. <filePathFormat readme="文件路径规则,默认为/日期/账号/回单文件名">1</filePathFormat>
    45. <charset des="字符集">gbk</charset>
    46. <!-- 配置回单文件上传路径:
    47. 1、上传至共享目录,格式:smb://用户:密码@共享目录路径;
    48. 2、上传至微服务,格式:Http://ip:port/..
    49. 3、上传至本地文件夹,配置为localhost,在其后加上本地地址,如localhost@D:\\receipt -->
    50. <shareDir readme="保存路径或目录">smb://user:password@127.0.0.1/shareDir/</shareDir>
    51. </fileSaveSet>
    52. <fileSaveSet enable="false" readme="">
    53. <id>103</id>
    54. <saveType readme="回单文件保存方式:remoteHost推送至远程DSP">remoteHost</saveType>
    55. <mainHostServer readme="远程DSP地址">127.0.0.1:6868</mainHostServer>
    56. <charset des="字符集">gbk</charset>
    57. </fileSaveSet>
    58. <fileSaveSet enable="false" readme="">
    59. <id>104</id>
    60. <saveType readme="回单文件保存方式:custom.fileServer,oss">custom.fileServer</saveType>
    61. <customCode readme="客户代码,如axatp,trustlife">hncx</customCode>
    62. <!--<customServerUrl readme="客制化服务地址,一般是ATS提交的地址">http://10.60.46.196:9091/getAndNotify</customServerUrl>-->
    63. <customServerIP readme="SunECM的主机IP">127.0.0.1</customServerIP>
    64. <customServerIP readme="SunECM的主机端口">6060</customServerIP>
    65. <charset des="字符集">utf-8</charset>
    66. <paramList>
    67. <systemID readme="接入系统ID">sunyard</systemID>
    68. <systemKey readme="接入系统授权密钥">licenseKey</systemKey>
    69. <busiType readme="业务类型">CL_D</busiType>
    70. <userCode readme="操作员代码">13000003</userCode>
    71. <userName readme="操作员姓名">浦明</userName>
    72. <orgCode readme="机构代码">13000000</orgCode>
    73. <comCode readme="缓存机构号">13000000</comCode>
    74. <orgName readme="机构名称">华农财产保险股份有限公司河北省分公司</orgName>
    75. <roleCode readme="操作员角色">C130001</roleCode>
    76. <appCode readme="业务类型代码">CL_13</appCode>
    77. <appName readme="业务类型名称">车险理赔</appName>
    78. </paramList>
    79. </fileSaveSet>
    80. <fileSaveSet enable="false" readme="">
    81. <id>105</id>
    82. <saveType readme="回单文件保存方式:custom.fileServer,oss">custom.fileServer</saveType>
    83. <customCode readme="客户代码,如axatp,trustlife">ejintai</customCode>
    84. <customServerUrl readme="客制化服务地址,一般是ATS提交的地址">http://filesrv.cps.dev.ejintai.com/cps_filesrv</customServerUrl>
    85. <charset des="字符集">utf-8</charset>
    86. <paramList>
    87. <systemID readme="资金系统编码,此编码需要提前在文件系统建立文件目录,应该是子系统编码,这里用的是测试系统TEST_SYSTEM">TEST_SYSTEM</systemID>
    88. </paramList>
    89. </fileSaveSet>
    90. <fileSaveSet enable="false" readme="">
    91. <id>105</id>
    92. <saveType readme="回单文件保存方式:custom.fileServer,oss">custom.fileServer</saveType>
    93. <customCode readme="客户代码,如axatp,trustlife">geniusauto</customCode>
    94. <customServerUrl readme="客制化服务地址,一般是ATS提交的地址"> https://ossproxy-dev.geniusafc.com/api/files</customServerUrl>
    95. <charset des="字符集">utf-8</charset>
    96. <paramList>
    97. <tokenUrl readme="登陆地址">https://ossproxy-dev.geniusafc.com/api/oauth2/token</tokenUrl>
    98. <clientId readme="客户号">aaron</clientId>
    99. <clientSecret readme="客户秘钥">aaron-Secret</clientSecret>
    100. <expire readme="设置token的有效期,单位:秒,默认1800秒">1800</expire>
    101. <scope readme="">all</scope>
    102. </paramList>
    103. </fileSaveSet>
    104. <!--dataPushSet,数据推送设置,通过设置enable属性为true进行开启,可配置多个数据推送<dataPushSet>,需分别指定不同<id>-->
    105. <dataPushSet enable="false" readme="推送ats">
    106. <id>201</id>
    107. <pushType readme="回单数据推送方式:nbGateway,ats">ats</pushType>
    108. <charset des="字符集">gbk</charset>
    109. <pushServerUrl readme="推送服务地址">http://127.0.0.1:8083/webservice/receive</pushServerUrl>
    110. </dataPushSet>
    111. <dataPushSet enable="false" readme="推送远程dsp">
    112. <id>202</id>
    113. <pushType readme="回单数据推送方式:remoteHost,远程dsp">remoteHost</pushType>
    114. <charset des="字符集">gbk</charset>
    115. <pushServerUrl readme="远程DSP地址">127.0.0.1:6868</pushServerUrl>
    116. </dataPushSet>
    117. <dataPushSet enable="false" readme="推送ats">
    118. <id>203</id>
    119. <pushType readme="">atsInsu</pushType>
    120. <charset des="字符集">utf-8</charset>
    121. <pushServerUrl readme="推送服务地址">http://10.60.46.196:9091/getAndNotify</pushServerUrl>
    122. </dataPushSet>
    123. <dataPushSet enable="false" readme="推送ats">
    124. <id>204</id>
    125. <pushType readme="">atsCheck</pushType>
    126. <charset des="字符集">utf-8</charset>
    127. <pushServerUrl readme="推送服务地址">http://10.60.46.196:9091/getAndNotify</pushServerUrl>
    128. <paramList>
    129. <chgRcptNoByBnkSeq for="BOCOM01">true</chgRcptNoByBnkSeq>
    130. </paramList>
    131. </dataPushSet>
    132. </config>

    3、以上配置都配置好后,DSP会自动开启异步任务,将DSP本地的回单文件和db数据推送给指定的服务。