TestCommand.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <?php
  2. namespace App\Console\Commands;
  3. use App\Mail\ExampleEmail;
  4. use App\Models\Factoring;
  5. use App\Models\FactoringContract;
  6. use App\Models\FactoringContractFile;
  7. use App\Models\FactoringProperty;
  8. use App\Models\Firm;
  9. use App\Models\IndentNum;
  10. use App\Models\Member;
  11. use App\Models\MemberSeal;
  12. use App\Models\SignMember;
  13. use App\Models\SignSeal;
  14. use App\Models\SignSealAuth;
  15. use App\Servers\ESign\comm\EsignLogHelper;
  16. use App\Servers\ESign\ESignContractServer;
  17. use App\Servers\ESign\ESignFirmServer;
  18. use App\Servers\ESign\ESignServer;
  19. use App\Servers\Financing\ContractServer;
  20. use App\Servers\Financing\FinancingServer;
  21. use App\Servers\Firm\FirmServer;
  22. use App\Servers\System\EmailServer;
  23. use App\Servers\System\JobServer;
  24. use App\Servers\System\RedisDataServer;
  25. use App\Servers\System\SmsServer;
  26. use App\Servers\Wps\ExcelServer;
  27. use App\Servers\Wps\WordServer;
  28. use App\Servers\Wps\WpsServer;
  29. use Illuminate\Console\Command;
  30. use Illuminate\Support\Facades\Log;
  31. use Illuminate\Support\Facades\Storage;
  32. class TestCommand extends Command
  33. {
  34. /**
  35. * The name and signature of the console command.
  36. *
  37. * @var string
  38. */
  39. protected $signature = 'test';
  40. /**
  41. * The console command description.
  42. *
  43. * @var string
  44. */
  45. protected $description = '测试命令';
  46. /**
  47. * Create a new command instance.
  48. *
  49. * @return void
  50. */
  51. public function __construct()
  52. {
  53. parent::__construct();
  54. }
  55. /**
  56. * Execute the console command.
  57. *
  58. * @return int
  59. */
  60. public function handle()
  61. {
  62. // $file_id = '0a1feb9ddf3f4da198ec0bb7d0c3225a';
  63. // $file_status = ESignContractServer::creatServer()->getFileStatus($file_id);
  64. // dd($file_status);
  65. $psnId= 'd1bca85014164a88b896159c799223f9';
  66. //获取企业内部使用签章列表
  67. // ESignServer::creatServer()->internalAuthInfo(1,$psnId);
  68. // ESignServer::creatServer()->psnsealListInfo(1,$psnId);
  69. ESignServer::creatServer()->createOrgsealsbyTemplate(1,$psnId);
  70. dd(11111);
  71. //查询是否有合同章
  72. $sealItem=MemberSeal::where('m_id',1)->first();
  73. if(empty($sealItem)){
  74. //无合同印章执行创建流程
  75. ESignServer::creatServer()->createOrgsealsbyTemplate(1,$psnId);
  76. }
  77. dd(11111);
  78. JobServer::creatServer()->createMemberSealJob($psnId);
  79. dd(111);
  80. // dd(11111);
  81. // $file_path = 'storage/contract/测试.docx';
  82. $file_path = 'storage/contract/20250520/测试模板.docx';
  83. $json = '{"name": "江雨","text":"测试一下","phone":"13012341234"}';
  84. $file = WordServer::creatServer()->replaceWordText($file_path,'123.docx',$json);
  85. dd($file);
  86. // ESignContractServer::creatServer()->setContractContract(111,11);
  87. // dd(111);
  88. $content='尊敬的,您有待认证信息,点击认证 ';
  89. $r = SmsServer::creatServer()->sendContent('18323851679',$content);
  90. dd($r);
  91. $Res = ESignServer::creatServer()->personsidentityinfo(1,18323851679,'江雨',500221200002194310);
  92. dd($Res);
  93. }
  94. }