2024-01-25 17:54:14 +08:00
|
|
|
package com.gunshi.project.xyt.service;
|
|
|
|
|
|
|
|
|
|
import com.gunshi.project.xyt.Main;
|
2024-01-26 14:12:08 +08:00
|
|
|
import com.gunshi.project.xyt.entity.basedata.GeneralSearch;
|
2024-01-25 17:54:14 +08:00
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
|
|
|
import org.springframework.test.context.ContextConfiguration;
|
|
|
|
|
import ru.olegcherednik.jackson_utils.JacksonUtils;
|
|
|
|
|
|
|
|
|
|
@SpringBootTest
|
|
|
|
|
@ContextConfiguration(classes = Main.class)
|
|
|
|
|
@Slf4j
|
|
|
|
|
class StAdcdServiceTest {
|
|
|
|
|
@Autowired
|
|
|
|
|
private StAdcdService stAdcdService;
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
void queryBySearch() {
|
2024-01-26 14:12:08 +08:00
|
|
|
GeneralSearch addvcdSearch = new GeneralSearch();
|
2024-01-25 17:54:14 +08:00
|
|
|
addvcdSearch.setKeyword("麻城");
|
|
|
|
|
log.info("{}", JacksonUtils.writeValue(stAdcdService.queryBySearch(addvcdSearch)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
void test(){
|
2024-01-26 16:28:46 +08:00
|
|
|
log.info("{}",stAdcdService.getParentAddvcd("420000000000000"));
|
|
|
|
|
log.info("{}",stAdcdService.getParentAddvcd("421100000000000"));
|
|
|
|
|
log.info("{}",stAdcdService.getParentAddvcd("421212000000000"));
|
|
|
|
|
log.info("{}",stAdcdService.getParentAddvcd("421312101000000"));
|
|
|
|
|
log.info("{}",stAdcdService.getParentAddvcd("421413102101000"));
|
|
|
|
|
log.info("{}",stAdcdService.getParentAddvcd("421514112201123"));
|
2024-01-25 17:54:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
void queryTree() {
|
2024-01-26 17:23:42 +08:00
|
|
|
log.info("{}", JacksonUtils.writeValue(stAdcdService.queryTree("420116001")));
|
2024-01-25 17:54:14 +08:00
|
|
|
}
|
|
|
|
|
}
|