From 7d74f3fd087d4a8192ed556a6c2e3a2ea3c81cff Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期五, 28 三月 2025 17:43:48 +0800 Subject: [PATCH] 1. 新增扬尘监测数据上传功能 --- src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DomaincatalogServiceImpl.kt | 80 +++++++++++++++ src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ProblemtypeService.kt | 1 src/main/resources/mapper/ds1/DustDataResultMapper.xml | 29 +++++ src/main/kotlin/cn/flightfeather/supervision/business/autooutput/AopOutput.kt | 3 src/main/kotlin/cn/flightfeather/supervision/lightshare/service/MonitorDataService.kt | 16 +++ src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DustDataResultMapper.kt | 6 + src/main/kotlin/cn/flightfeather/supervision/lightshare/service/DomaincatalogService.kt | 12 ++ src/test/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DomaincatalogServiceImplTest.kt | 41 ++++++++ src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/MonitorDataRep.kt | 24 ++++ src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MonitorDataController.kt | 33 ++++++ src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemtypeServiceImpl.kt | 4 src/main/kotlin/cn/flightfeather/supervision/lightshare/web/BaseResPack.kt | 4 src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MonitorDataServiceImpl.kt | 31 ++++++ src/main/resources/mapper/ds1/ScenseMapper.xml | 7 + src/main/kotlin/cn/flightfeather/supervision/common/utils/Constant.kt | 1 15 files changed, 288 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/AopOutput.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/AopOutput.kt index a285f4b..396b6bc 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/AopOutput.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/AopOutput.kt @@ -8,6 +8,7 @@ import cn.flightfeather.supervision.domain.ds1.mapper.EvaluationMapper import cn.flightfeather.supervision.domain.ds1.mapper.ItemevaluationMapper import org.springframework.stereotype.Component +import org.springframework.transaction.annotation.Transactional import tk.mybatis.mapper.entity.Example /** @@ -23,6 +24,7 @@ /** * 灏嗚瘎鍒嗚褰曡緭鍑鸿嚦鏁版嵁搴� */ + @Transactional fun toDbEvaluation(evaluationScene: AopDataSource.EvaluationScene, p: Pair<Evaluation, List<Itemevaluation>>) { //鍘婚櫎宸叉湁璁板綍 evaluationMapper.deleteByExample(Example(Evaluation::class.java).apply { @@ -40,6 +42,7 @@ /** * 灏嗚瘎鍒嗚褰曟洿鏂拌嚦鏁版嵁搴� */ + @Transactional fun updateDbEvaluation(evaluationScene: AopDataSource.EvaluationScene, p: Pair<Evaluation, List<Itemevaluation>>) { evaluationMapper.updateByPrimaryKey(p.first) p.second.forEach { il -> itemevaluationMapper.updateByPrimaryKey(il) } diff --git a/src/main/kotlin/cn/flightfeather/supervision/common/utils/Constant.kt b/src/main/kotlin/cn/flightfeather/supervision/common/utils/Constant.kt index deb1ae8..42de868 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/common/utils/Constant.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/common/utils/Constant.kt @@ -39,6 +39,7 @@ TYPE9("9","閬撹矾鎵皹鐩戞祴鐐�"), TYPE10("10","閬撹矾"), TYPE11("11","娌虫祦鏂潰"), TYPE12("12","宸ヤ笟鍥尯"), TYPE13("13","鏃犲浐瀹氬満鏅�"),TYPE14("14","鍫嗗満"), + TYPE15("15","绮惧搧灏忓尯"), TYPE99("99","鍏朵粬"); companion object { diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DustDataResultMapper.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DustDataResultMapper.kt index 8a33ec6..e51c7b0 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DustDataResultMapper.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DustDataResultMapper.kt @@ -2,7 +2,11 @@ import cn.flightfeather.supervision.domain.ds1.entity.DustDataResult import cn.flightfeather.supervision.domain.util.MyMapper +import cn.flightfeather.supervision.lightshare.vo.AreaVo import org.apache.ibatis.annotations.Mapper @Mapper -interface DustDataResultMapper : MyMapper<DustDataResult?> \ No newline at end of file +interface DustDataResultMapper : MyMapper<DustDataResult?> { + + fun selectByArea(areaVo: AreaVo): List<DustDataResult?> +} \ No newline at end of file diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/MonitorDataRep.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/MonitorDataRep.kt new file mode 100644 index 0000000..8845f15 --- /dev/null +++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/MonitorDataRep.kt @@ -0,0 +1,24 @@ +package cn.flightfeather.supervision.domain.ds1.repository + +import cn.flightfeather.supervision.domain.ds1.entity.DustDataResult +import cn.flightfeather.supervision.domain.ds1.mapper.DustDataResultMapper +import cn.flightfeather.supervision.lightshare.vo.AreaVo +import org.springframework.stereotype.Repository + +/** + * 鐩戞祴鏁版嵁鏁版嵁搴撴煡璇� + * @date 2025/3/19 + * @author feiyu02 + */ +@Repository +class MonitorDataRep( + private val dataResultMapper: DustDataResultMapper, +) { + + /** + * 鏍规嵁琛屾斂鍖哄煙銆佹椂闂淬�佷互鍙婂満鏅被鍨嬫煡璇㈢粨鏋� + */ + fun fetchDustDataResult(areaVo: AreaVo): List<DustDataResult?> { + return dataResultMapper.selectByArea(areaVo) + } +} \ No newline at end of file diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/DomaincatalogService.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/DomaincatalogService.kt index 09b4810..193d7d5 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/DomaincatalogService.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/DomaincatalogService.kt @@ -1,6 +1,8 @@ package cn.flightfeather.supervision.lightshare.service +import cn.flightfeather.supervision.common.utils.Constant import cn.flightfeather.supervision.domain.ds1.entity.Domaincatalog +import cn.flightfeather.supervision.lightshare.vo.AreaVo import cn.flightfeather.supervision.lightshare.vo.DomaincatalogVo @@ -16,4 +18,14 @@ fun update(domaincatalog: Domaincatalog): Int fun delete(id: String): Int + + /** + * 蹇嵎閰嶇疆 + * 閽堝涓�绉嶆柊鐨勫満鏅被鍨嬶紝杩涜蹇�熼厤缃� + */ + fun quickConfiguration( + target: Constant.SceneType, targetArea: AreaVo, source: Constant.SceneType, + sourceArea: AreaVo, + ): Boolean + } \ No newline at end of file diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/MonitorDataService.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/MonitorDataService.kt new file mode 100644 index 0000000..faddaeb --- /dev/null +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/MonitorDataService.kt @@ -0,0 +1,16 @@ +package cn.flightfeather.supervision.lightshare.service + +import cn.flightfeather.supervision.domain.ds1.entity.DustDataResult +import cn.flightfeather.supervision.lightshare.vo.AreaVo + +/** + * 鐩戞祴鏁版嵁锛堝寘鍚壃灏樼洃娴嬨�佹补鐑熺洃娴嬬瓑绛夋墍鏈夌洃娴嬫暟鎹級鏈嶅姟 + * @date 2025/3/19 + * @author feiyu02 + */ +interface MonitorDataService { + + fun uploadDustDataResult(dataList: List<DustDataResult>): Boolean + + fun fetchDustDataResult(areaVo: AreaVo): List<DustDataResult?> +} \ No newline at end of file diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ProblemtypeService.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ProblemtypeService.kt index c069a66..2df308a 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ProblemtypeService.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ProblemtypeService.kt @@ -1,5 +1,6 @@ package cn.flightfeather.supervision.lightshare.service +import cn.flightfeather.supervision.common.utils.Constant import cn.flightfeather.supervision.domain.ds1.entity.Problemtype import cn.flightfeather.supervision.lightshare.vo.ProblemDetailVo import cn.flightfeather.supervision.lightshare.vo.ProblemtypeVo diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DomaincatalogServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DomaincatalogServiceImpl.kt index 34c5a2e..94b7445 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DomaincatalogServiceImpl.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DomaincatalogServiceImpl.kt @@ -1,14 +1,26 @@ package cn.flightfeather.supervision.lightshare.service.impl -import cn.flightfeather.supervision.domain.ds1.entity.Domaincatalog -import cn.flightfeather.supervision.domain.ds1.mapper.DomaincatalogMapper +import cn.flightfeather.supervision.common.utils.Constant +import cn.flightfeather.supervision.common.utils.UUIDGenerator +import cn.flightfeather.supervision.domain.ds1.entity.* +import cn.flightfeather.supervision.domain.ds1.mapper.* import cn.flightfeather.supervision.lightshare.service.DomaincatalogService +import cn.flightfeather.supervision.lightshare.vo.AreaVo import cn.flightfeather.supervision.lightshare.vo.DomaincatalogVo import org.springframework.beans.BeanUtils import org.springframework.stereotype.Service +import org.springframework.transaction.annotation.Transactional +import tk.mybatis.mapper.entity.Example +import java.util.* @Service -class DomaincatalogServiceImpl(val domaincatalogMapper: DomaincatalogMapper) : DomaincatalogService { +class DomaincatalogServiceImpl( + private val domaincatalogMapper: DomaincatalogMapper, + private val problemtypeMapper: ProblemtypeMapper, + private val changeAdviceMapper: ChangeAdviceMapper, + private val evaluationruleMapper: EvaluationruleMapper, + private val evaluationsubruleMapper: EvaluationsubruleMapper, +) : DomaincatalogService { //鏍规嵁name鏌ヨ override fun findOneByName(name: String): Domaincatalog? { val domaincatalog = Domaincatalog() @@ -35,4 +47,66 @@ override fun update(domaincatalog: Domaincatalog): Int = domaincatalogMapper.updateByPrimaryKey(domaincatalog) override fun delete(id: String): Int = domaincatalogMapper.deleteByPrimaryKey(id) + + @Transactional + override fun quickConfiguration( + target: Constant.SceneType, + targetArea: AreaVo, + source: Constant.SceneType, + sourceArea: AreaVo, + ): Boolean { + //1. 闂绫诲瀷鍜屾暣鏀瑰缓璁� + val adviceList = changeAdviceMapper.selectByExample(Example(ChangeAdvice::class.java).apply { + createCriteria().andEqualTo("adExtension1", sourceArea.districtname) + .andEqualTo("adExtension2", source.text) + }) + problemtypeMapper.selectByExample(Example(Problemtype::class.java).apply { + createCriteria().andEqualTo("scensetypeid", source.value.toByte()) + .andEqualTo("districtname", sourceArea.districtname) + }).forEach { + val newProblemGuid = UUIDGenerator.generate16ShortUUID() + adviceList.find { ad -> ad.adProblemtypeguid == it.guid }?.let { ad -> + ad.adGuid = UUIDGenerator.generate16ShortUUID() + ad.adProblemtypeguid = newProblemGuid + ad.adCreatedate = Date() + ad.adUpdatedate = Date() + ad.adExtension1 = targetArea.districtname + ad.adExtension2 = target.text + changeAdviceMapper.insert(ad) + } + + it.guid = newProblemGuid + it.scensetypeid = target.value.toByte() + it.scensetype = target.text + it.createdate = Date() + it.updatedate = Date() + it.provincecode = targetArea.provincecode + it.provincename = targetArea.provincename + it.citycode = targetArea.citycode + it.cityname = targetArea.cityname + it.districtcode = targetArea.districtcode + it.districtname = targetArea.districtname + + problemtypeMapper.insert(it) + } + + return true + + //2. 闂浣嶇疆锛堥粯璁ゅ伐鍦帮紝鍙笉淇敼锛� + //3. 鑷瘎瑙勫垯琛� +// evaluationruleMapper.selectByExample(Example(Evaluationrule::class.java).apply { +// createCriteria().andEqualTo("tasktypeid", 99) +// .andEqualTo("scensetypeid", source.value) +// and(createCriteria().orEqualTo("provincecode", sourceArea.provincecode).orIsNull("provincecode")) +// and(createCriteria().orEqualTo("citycode", sourceArea.citycode).orIsNull("citycode")) +// and(createCriteria().orEqualTo("districtcode", sourceArea.districtcode).orIsNull("districtcode")) +// and(createCriteria().orEqualTo("towncode", sourceArea.towncode).orIsNull("towncode")) +// }).takeIf { it.isNotEmpty() }?.get(0).let {sourceRule -> +// if (sourceRule != null) { +// evaluationsubruleMapper.selectByExample(Example(Evaluationsubrule::class.java).apply { +// createCriteria().andEqualTo("", sourceRule) +// }) +// } +// } + } } \ No newline at end of file diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MonitorDataServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MonitorDataServiceImpl.kt new file mode 100644 index 0000000..282d153 --- /dev/null +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MonitorDataServiceImpl.kt @@ -0,0 +1,31 @@ +package cn.flightfeather.supervision.lightshare.service.impl + +import cn.flightfeather.supervision.business.autooutput.AopOutput +import cn.flightfeather.supervision.domain.ds1.entity.DustDataResult +import cn.flightfeather.supervision.domain.ds1.repository.MonitorDataRep +import cn.flightfeather.supervision.lightshare.service.MonitorDataService +import cn.flightfeather.supervision.lightshare.vo.AreaVo +import org.springframework.stereotype.Service +import org.springframework.transaction.annotation.Transactional + +/** + * + * @date 2025/3/19 + * @author feiyu02 + */ +@Service +class MonitorDataServiceImpl( + private val aopOutput: AopOutput, + private val monitorDataRep: MonitorDataRep, +) : MonitorDataService { + + @Transactional + override fun uploadDustDataResult(dataList: List<DustDataResult>): Boolean { + dataList.forEach { aopOutput.toDbDataResult(it) } + return true + } + + override fun fetchDustDataResult(areaVo: AreaVo): List<DustDataResult?> { + return monitorDataRep.fetchDustDataResult(areaVo) + } +} \ No newline at end of file diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemtypeServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemtypeServiceImpl.kt index ba2029e..304299d 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemtypeServiceImpl.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemtypeServiceImpl.kt @@ -1,5 +1,7 @@ package cn.flightfeather.supervision.lightshare.service.impl +import cn.flightfeather.supervision.common.utils.Constant +import cn.flightfeather.supervision.common.utils.UUIDGenerator import cn.flightfeather.supervision.domain.ds1.entity.Problemtype import cn.flightfeather.supervision.domain.ds1.mapper.ProblemtypeMapper import cn.flightfeather.supervision.lightshare.service.ProblemtypeService @@ -7,8 +9,10 @@ import cn.flightfeather.supervision.lightshare.vo.ProblemtypeVo import org.springframework.beans.BeanUtils import org.springframework.stereotype.Service +import org.springframework.transaction.annotation.Transactional import tk.mybatis.mapper.entity.Example import tk.mybatis.mapper.util.StringUtil +import java.util.* @Service class ProblemtypeServiceImpl(val problemtypeMapper: ProblemtypeMapper) : ProblemtypeService { diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/BaseResPack.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/BaseResPack.kt index 2a6af5f..17d155e 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/BaseResPack.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/BaseResPack.kt @@ -22,5 +22,9 @@ } } catch (e: BizException) { BaseResponse(false, message = e.message ?: "") + } catch (e: Exception) { + // fixme: to log system + + BaseResponse(false, message = "鏈嶅姟鍣ㄥ嚭鐜板唴閮ㄩ敊璇�") } } \ No newline at end of file diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MonitorDataController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MonitorDataController.kt new file mode 100644 index 0000000..d247848 --- /dev/null +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MonitorDataController.kt @@ -0,0 +1,33 @@ +package cn.flightfeather.supervision.lightshare.web + +import cn.flightfeather.supervision.domain.ds1.entity.DustDataResult +import cn.flightfeather.supervision.lightshare.service.MonitorDataService +import cn.flightfeather.supervision.lightshare.vo.AreaVo +import io.swagger.annotations.Api +import io.swagger.annotations.ApiOperation +import io.swagger.annotations.ApiParam +import org.springframework.web.bind.annotation.* +import org.springframework.web.multipart.MultipartFile + +/** + * 鐩戞祴鏁版嵁锛堝寘鍚壃灏樼洃娴嬨�佹补鐑熺洃娴嬬瓑绛夋墍鏈夌洃娴嬫暟鎹級鐩稿叧API鎺ュ彛 + * @date 2025/3/19 + * @author feiyu02 + */ +@Api(tags = ["MonitorDataController"], description = "鐩戞祴鏁版嵁锛堝寘鍚壃灏樼洃娴嬨�佹补鐑熺洃娴嬬瓑绛夋墍鏈夌洃娴嬫暟鎹級鐩稿叧API鎺ュ彛") +@RestController +@RequestMapping("/monitor/data") +class MonitorDataController(private val monitorDataService: MonitorDataService) { + + @ApiOperation(value = "涓婁紶鎵皹鐩戞祴鏁版嵁鐨勬湀搴︾粺璁$粨鏋�") + @PutMapping("/result/construction/upload") + fun uploadDustDataResult( + @ApiParam("缁熻缁撴灉") @RequestBody dataList: List<DustDataResult>, + ) = resPack { monitorDataService.uploadDustDataResult(dataList) } + + @ApiOperation(value = "鏌ヨ鎵皹鐩戞祴鏁版嵁鐨勬湀搴︾粺璁$粨鏋�") + @PostMapping("/result/construction/get") + fun fetchDustDataResult( + @ApiParam("鍖哄煙鏉′欢淇℃伅") @RequestBody areaVo: AreaVo + ) = resPack { monitorDataService.fetchDustDataResult(areaVo) } +} \ No newline at end of file diff --git a/src/main/resources/mapper/ds1/DustDataResultMapper.xml b/src/main/resources/mapper/ds1/DustDataResultMapper.xml index ba44d8c..2f6b333 100644 --- a/src/main/resources/mapper/ds1/DustDataResultMapper.xml +++ b/src/main/resources/mapper/ds1/DustDataResultMapper.xml @@ -25,4 +25,33 @@ DR_Id, DR_Scene_Id, DR_Scene_Name, DR_Device_Code, DR_Time, DR_Exceed_Times, DR_Avg, DR_Max, DR_Min, DR_Over_Avg_Per, DR_Data_Num, DR_Effective_Rate </sql> + + <!-- 鏁版嵁缁熻缁撴灉鏃堕棿鏉′欢 --> + <sql id="Where_Plan_Time"> + <if test="starttime != null"> + AND ${tableAlias}.DR_Time >= #{starttime} + </if> + <if test="endtime != null"> + AND ${tableAlias}.DR_Time <= #{endtime} + </if> + </sql> + + <select id="selectByArea" resultMap="BaseResultMap"> + select + <include refid="Base_Column_List"/> + from ea_t_dust_data_result as a + left join sm_t_scense as b + on a.DR_Scene_Id = b.S_GUID + <where> + <include refid="cn.flightfeather.supervision.domain.ds1.mapper.ScenseMapper.Where_Area"> + <property name="tableAlias" value="b"/> + </include> + <include refid="cn.flightfeather.supervision.domain.ds1.mapper.ScenseMapper.Where_Type"> + <property name="tableAlias" value="b"/> + </include> + <include refid="Where_Plan_Time"> + <property name="tableAlias" value="a"/> + </include> + </where> + </select> </mapper> \ No newline at end of file diff --git a/src/main/resources/mapper/ds1/ScenseMapper.xml b/src/main/resources/mapper/ds1/ScenseMapper.xml index 6bd44be..740e874 100644 --- a/src/main/resources/mapper/ds1/ScenseMapper.xml +++ b/src/main/resources/mapper/ds1/ScenseMapper.xml @@ -70,6 +70,13 @@ </if> </sql> + <!-- 鍦烘櫙绫诲瀷鏉′欢 --> + <sql id="Where_Type"> + <if test="scensetypeid != null"> + AND ${tableAlias}.S_TypeID = #{scensetypeid} + </if> + </sql> + <select id="selectNoAccountScene" resultMap="BaseResultMap"> select a.* FROM sm_t_scense as a LEFT JOIN sm_t_userinfo as b on a.S_GUID = b.D_GUID WHERE b.UI_GUID is null </select> diff --git a/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DomaincatalogServiceImplTest.kt b/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DomaincatalogServiceImplTest.kt new file mode 100644 index 0000000..116a253 --- /dev/null +++ b/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DomaincatalogServiceImplTest.kt @@ -0,0 +1,41 @@ +package cn.flightfeather.supervision.lightshare.service.impl + +import cn.flightfeather.supervision.SupervisionApplication +import cn.flightfeather.supervision.common.utils.Constant +import cn.flightfeather.supervision.lightshare.service.DomaincatalogService +import cn.flightfeather.supervision.lightshare.vo.AreaVo +import org.junit.Test +import org.junit.runner.RunWith +import org.springframework.beans.factory.annotation.Autowired +import org.springframework.boot.test.context.SpringBootTest +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner + +@RunWith(SpringJUnit4ClassRunner::class) +@SpringBootTest(classes = [SupervisionApplication::class]) +class DomaincatalogServiceImplTest { + + @Autowired + lateinit var domaincatalogService: DomaincatalogService + + @Test + fun quickConfiguration() { + domaincatalogService.quickConfiguration( + Constant.SceneType.TYPE15, AreaVo().apply { + provincecode = "31" + provincename = "涓婃捣甯�" + citycode = "3100" + cityname = "涓婃捣甯�" + districtcode = "310105" + districtname = "闀垮畞鍖�" + }, + Constant.SceneType.TYPE1, AreaVo().apply { + provincecode = "31" + provincename = "涓婃捣甯�" + citycode = "3100" + cityname = "涓婃捣甯�" + districtcode = "310105" + districtname = "闀垮畞鍖�" + } + ) + } +} \ No newline at end of file -- Gitblit v1.9.3