| | |
| | | |
| | | import cn.flightfeather.supervision.lightshare.service.CommitmentService |
| | | import cn.flightfeather.supervision.lightshare.vo.CommitmentVo |
| | | import com.google.gson.Gson |
| | | import jdk.nashorn.internal.parser.JSONParser |
| | | import org.apache.http.entity.ContentType |
| | | import org.junit.Test |
| | | import org.junit.jupiter.api.extension.ExtendWith |
| | |
| | | import org.springframework.web.multipart.MultipartFile |
| | | import org.springframework.web.multipart.MultipartRequest |
| | | import org.springframework.web.multipart.commons.CommonsMultipartFile |
| | | import springfox.documentation.spring.web.json.Json |
| | | import java.io.ByteArrayInputStream |
| | | import java.io.File |
| | | import java.io.FileInputStream |
| | |
| | | // }) |
| | | //汽修 |
| | | |
| | | val signImg = File("target/test-file/car_stop.png") |
| | | val signImg = File("C:\\work\\vs\\ff-ai-ep\\asset\\mipmap\\boat_driving.png") |
| | | val sign = MockMultipartFile("sign.png", FileInputStream(signImg)) |
| | | val r = commitmentService.createLetterOfCommitment( |
| | | "ClOghpi60ZNUjb3f", CommitmentVo( |
| | | "QNhKL9lWOefS5iWn", Gson().toJson(CommitmentVo( |
| | | "上海市", |
| | | "徐汇区", |
| | | "某某企业", |
| | |
| | | "2022", |
| | | "06", |
| | | "29", |
| | | ), sign, null |
| | | )), sign, null |
| | | ) |
| | | println(r) |
| | | } |