|  |  | 
 |  |  | package com.ruoyi.web.test; | 
 |  |  |  | 
 |  |  | import com.alibaba.fastjson2.JSONObject; | 
 |  |  | import com.ruoyi.common.config.RuoYiConfig; | 
 |  |  | import com.ruoyi.common.core.domain.AjaxResult; | 
 |  |  | import com.ruoyi.common.utils.RSAPublicKeyExample; | 
 |  |  | import com.ruoyi.common.utils.file.FileUploadUtils; | 
 |  |  | import com.ruoyi.common.utils.file.FileUtils; | 
 |  |  | import com.ruoyi.common.utils.http.HttpUtils; | 
 |  |  | import com.smartor.domain.ServiceSubtaskDetail; | 
 |  |  | import com.smartor.domain.ThiedInhospInfo; | 
 |  |  | import com.smartor.service.IHNGatherPatArchiveService; | 
 |  |  | import io.swagger.models.auth.In; | 
 |  |  | import org.junit.Test; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.mock.web.MockMultipartFile; | 
 |  |  | import org.springframework.web.multipart.MultipartFile; | 
 |  |  |  | 
 |  |  | import java.io.*; | 
 |  |  | import java.math.BigInteger; | 
 |  |  | import java.nio.file.Files; | 
 |  |  | import java.security.MessageDigest; | 
 |  |  | import java.util.ArrayList; | 
 |  |  | import java.util.HashMap; | 
 |  |  | import java.util.List; | 
 |  |  | import java.util.Map; | 
 |  |  | import java.util.concurrent.CompletableFuture; | 
 |  |  | import java.util.regex.Matcher; | 
 |  |  | import java.util.regex.Pattern; | 
 |  |  | import java.util.stream.Collectors; | 
 |  |  |  | 
 |  |  | import static cn.hutool.core.convert.Convert.toHex; | 
 |  |  | import static org.eclipse.jetty.http.HttpGenerator.CHUNK_SIZE; | 
 |  |  |  | 
 |  |  | //@SpringBootTest | 
 |  |  | //@RunWith(SpringRunner.class) | 
 |  |  | public class MQTest { | 
 |  |  |     @Autowired | 
 |  |  |     private IHNGatherPatArchiveService ihnGatherPatArchiveService; | 
 |  |  |  | 
 |  |  |     @Test | 
 |  |  |     public void testSend22() { | 
 |  |  | 
 |  |  |  | 
 |  |  |     @Test | 
 |  |  |     public void bb() { | 
 |  |  |         int i = 61 /60; | 
 |  |  |         System.out.println(i); | 
 |  |  |         Boolean aBoolean = ihnGatherPatArchiveService.hnDataGather(null); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @Test | 
 |  |  |     public void cc() { | 
 |  |  |         RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); | 
 |  |  |         String s = rsaPublicKeyExample.encryptedData("20250815001094", "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALQzqW1EIXBKGMu+2oEYSB5gM7Ox/ihyYTeeoE0yPX1qtt4++5yNOeTBVd6EEM4iKzVEzWj6REIWVwaSNPn/SvUCAwEAAQ=="); | 
 |  |  |         System.out.println("加密结果为:" + s); | 
 |  |  |         String s1 = rsaPublicKeyExample.decryptedData(s, "MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEAtDOpbUQhcEoYy77agRhIHmAzs7H+KHJhN56gTTI9fWq23j77nI055MFV3oQQziIrNUTNaPpEQhZXBpI0+f9K9QIDAQABAkB3n0fcWfrcoMN/FU3VnrnZOEF6CzFNxkgU9P8y36QECWKZ9JhYQkNpKrMC9oXlN3VSaRigV7B+L/I/a0Rs1W+tAiEA4jx7xcXJ4y4BNwAmVHt6NNiEkzIwWnwC/0qsEu8NsOsCIQDL6MMn1D2uznC6OuOWpxDCkBh1JL1NzZTZeH2G+hj7nwIgKGAC9tjFnvWm4dn0/T7MIIJDpsFeP8fCAS2iZ/6hwuECIAS/eLvWr1EAsZNEh8QcQ8GkBU3E+ztyjAK8UX/xFt/VAiBf79/1tDErX4/DChecM8w3c3DhbBcjuE3fHZn7p6/UKg=="); | 
 |  |  |         System.out.println("解密结果为:"+s1); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public void aa(MultipartFile file) throws IOException { | 
 |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     public static String encode(String arg) { | 
 |  |  |         if (arg == null) { | 
 |  |  |             arg = ""; | 
 |  |  |         } | 
 |  |  |         MessageDigest md5 = null; | 
 |  |  |         try { | 
 |  |  |             md5 = MessageDigest.getInstance("MD5"); | 
 |  |  |             md5.update(arg.getBytes("UTF-8")); | 
 |  |  |         } catch (Exception e) { | 
 |  |  |             e.printStackTrace(); | 
 |  |  |         } | 
 |  |  |         return toHex(md5.digest()); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | } | 
 |  |  |  | 
 |  |  |  |