TestController.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <?php
  2. namespace App\Http\Controllers;
  3. use App\Authority;
  4. use App\Commodity;
  5. use App\CommodityMaterialBoxModel;
  6. use App\Components\AsyncResponse;
  7. use App\Components\ErrorPush;
  8. use App\ErrorTemp;
  9. use App\Feature;
  10. use App\Http\ApiControllers\LoginController;
  11. use App\Http\Requests\OrderDelivering;
  12. use App\Jobs\CacheShelfTaskJob;
  13. use App\Jobs\OrderCreateInstantBill;
  14. use App\Jobs\OrderCreateWaybill;
  15. use App\Jobs\SettlementBillReportTask;
  16. use App\Jobs\StoreCreateInstantBill;
  17. use App\Jobs\WeightUpdateInstantBill;
  18. use App\MaterialBox;
  19. use App\MaterialBoxModel;
  20. use App\Order;
  21. use App\OrderPackage;
  22. use App\Owner;
  23. use App\OwnerFeeDetail;
  24. use App\OwnerFeeDetailLogistic;
  25. use App\OwnerFeeExpress;
  26. use App\OwnerFeeLogistic;
  27. use App\OwnerFeeOperation;
  28. use App\OwnerFeeOperationDetail;
  29. use App\OwnerFeeStorage;
  30. use App\OwnerPriceOperation;
  31. use App\OrderPackageCountingRecord;
  32. use App\RejectedBill;
  33. use App\Services\CacheShelfService;
  34. use App\Services\ForeignHaiRoboticsService;
  35. use App\Services\OrderPackageReceivedSyncService;
  36. use App\Services\OrderService;
  37. use App\Services\OwnerFeeTotalService;
  38. use App\Services\OwnerLogisticFeeReportService;
  39. use App\Services\OwnerPriceOperationService;
  40. use App\Services\OwnerStoreFeeReportService;
  41. use App\Services\OwnerStoreOutFeeReportService;
  42. use App\Services\StationService;
  43. use App\Services\StorageService;
  44. use App\Station;
  45. use App\StationTask;
  46. use App\StationTaskMaterialBox;
  47. use App\Store;
  48. use App\TaskTransaction;
  49. use App\Unit;
  50. use App\User;
  51. use App\UserDetail;
  52. use App\UserDutyCheck;
  53. use App\ValueStore;
  54. use App\Waybill;
  55. use Carbon\Carbon;
  56. use Carbon\CarbonPeriod;
  57. use Firebase\JWT\JWT;
  58. use Illuminate\Database\Eloquent\Collection;
  59. use Illuminate\Foundation\Http\FormRequest;
  60. use Illuminate\Http\Request;
  61. use Illuminate\Support\Facades\Cache;
  62. use Illuminate\Support\Facades\Auth;
  63. use Illuminate\Support\Facades\Cookie;
  64. use Illuminate\Support\Facades\DB;
  65. use Illuminate\Support\Facades\Http;
  66. use Illuminate\Support\Facades\URL;
  67. use Illuminate\Support\Facades\Validator;
  68. use PhpOffice\PhpSpreadsheet\Calculation\Web\Service;
  69. class TestController extends Controller
  70. {
  71. use AsyncResponse, ErrorPush;
  72. const ASNREFERENCE_2 = 'ASNREFERENCE2';
  73. public function __construct()
  74. {
  75. $this->data["active_test"] = "active";
  76. }
  77. public function method(Request $request, $method)
  78. {
  79. return call_user_func([$this, $method], $request);
  80. }
  81. public function test4()
  82. {
  83. $a = '185****1058';
  84. dd(str_replace('*','0',$a));
  85. }
  86. public function OwnerStoreFeeReportService_recordReport()
  87. {
  88. /** @var OwnerStoreFeeReportService $service */
  89. $service = app('OwnerStoreFeeReportService');
  90. $service->recordReport('2021-08-01');
  91. }
  92. public function OwnerStoreOutFeeReportService_recordReport()
  93. {
  94. /** @var OwnerStoreOutFeeReportService $service */
  95. $service = app('OwnerStoreOutFeeReportService');
  96. $service->recordReport('2021-08-01');
  97. }
  98. public function OwnerFeeTotalService_record()
  99. {
  100. /** @var OwnerFeeTotalService $service */
  101. $service = app('OwnerFeeTotalService');
  102. $service->record('2021-08-01');
  103. }
  104. //快递
  105. public function OwnerLogisticFeeReportService_record()
  106. {
  107. ini_set('max_execution_time', -1);
  108. /** @var OwnerLogisticFeeReportService $service */
  109. $service = app('OwnerLogisticFeeReportService');
  110. $service->recordReport('2021-08-01');
  111. }
  112. public function order_packages_sync_routes_flag_init()
  113. {
  114. OrderPackage::query()->whereNotNull('transfer_status')->update(['sync_routes_flag' => true]);
  115. }
  116. public function SettlementBillReportTask()
  117. {
  118. SettlementBillReportTask::dispatchNow('2021-08-01');
  119. }
  120. public function init_order_packages_status()
  121. {
  122. OrderPackage::query()->whereNotNull('received_at')->update(['status' => 14]);
  123. }
  124. }