| | |
| | | package cn.flightfeather.supervision.business.autooutput |
| | | |
| | | import cn.flightfeather.supervision.business.autooutput.score.AopEvaluation |
| | | import cn.flightfeather.supervision.business.autooutput.score.construction.JADataAnalysis |
| | | import cn.flightfeather.supervision.business.autooutput.dataanalysis.JACsDataAnalysis |
| | | import cn.flightfeather.supervision.business.autooutput.dataanalysis.JSCsDataAnalysis |
| | | import cn.flightfeather.supervision.business.autooutput.dataanalysis.JSMpDataAnalysis |
| | | import cn.flightfeather.supervision.business.autooutput.dataanalysis.XHFuDataAnalysis |
| | | import cn.flightfeather.supervision.business.autooutput.dataanalysis.JSWhDataAnalysis |
| | | import cn.flightfeather.supervision.business.autooutput.datasource.AopDataConfig |
| | | import cn.flightfeather.supervision.business.autooutput.score.AopCreditCode |
| | | import cn.flightfeather.supervision.common.utils.Constant |
| | | import cn.flightfeather.supervision.lightshare.service.SearchService |
| | | import cn.flightfeather.supervision.lightshare.vo.ExcelConfigVo |
| | | import org.junit.Test |
| | |
| | | lateinit var aopEvaluation: AopEvaluation |
| | | |
| | | @Autowired |
| | | lateinit var aopCreditCode: AopCreditCode |
| | | |
| | | @Autowired |
| | | lateinit var searchService: SearchService |
| | | |
| | | @Autowired |
| | | lateinit var jaDataAnalysis: JADataAnalysis |
| | | lateinit var jaCsDataAnalysis: JACsDataAnalysis |
| | | |
| | | @Autowired |
| | | lateinit var xhFuDataAnalysis: XHFuDataAnalysis |
| | | |
| | | @Autowired |
| | | lateinit var jsCsDataAnalysis: JSCsDataAnalysis |
| | | |
| | | @Autowired |
| | | lateinit var jsMpDataAnalysis: JSMpDataAnalysis |
| | | |
| | | @Autowired |
| | | lateinit var jsWhDataAnalysis: JSWhDataAnalysis |
| | | |
| | | /** |
| | | * 统计监测数据结果 |
| | | * 静安工地自评 |
| | | */ |
| | | @Test |
| | | fun test1() { |
| | | jaDataAnalysis.setResource("VHXHS1dHsykTNUf2", 1, 2023, 8) |
| | | jaDataAnalysis.execute() |
| | | val taskId = "tTbZIUg7nQJ1MRgE" |
| | | val districtCode = "310106" |
| | | val year = 2023 |
| | | val month = 12 |
| | | val sceneType = Constant.SceneType.TYPE1.value.toInt() |
| | | jaCsDataAnalysis.setResource(taskId, sceneType, year, month) |
| | | jaCsDataAnalysis.execute(0.124) |
| | | |
| | | aopEvaluation.executeByTopTask(taskId, sceneType) |
| | | |
| | | val mode = 9 |
| | | searchService.writeToFile(ExcelConfigVo( |
| | | taskId, |
| | | districtCode = districtCode, |
| | | sceneType = sceneType), mode) |
| | | } |
| | | |
| | | /** |
| | | * 自动评估 |
| | | * 徐汇餐饮自评 |
| | | */ |
| | | @Test |
| | | fun test() { |
| | | aopEvaluation.setResource("VHXHS1dHsykTNUf2", 1) |
| | | aopEvaluation.execute() |
| | | val taskId = "88wgq9l5gm9cUMg1" |
| | | val districtCode = "310104" |
| | | val districtName = "徐汇区" |
| | | val year = 2023 |
| | | val month = 11 |
| | | val sceneType = Constant.SceneType.TYPE5.value.toInt() |
| | | xhFuDataAnalysis.setResource(taskId, sceneType, year, month) |
| | | xhFuDataAnalysis.execute() |
| | | |
| | | aopEvaluation.executeByTopTask(taskId, sceneType) |
| | | |
| | | val mode = 9 |
| | | searchService.writeToFile(ExcelConfigVo( |
| | | taskId, |
| | | districtCode = districtCode, |
| | | sceneType = sceneType), mode) |
| | | aopCreditCode.execute(AopDataConfig( |
| | | year = year, |
| | | month = month, |
| | | districtName = districtName, |
| | | sceneType = sceneType, |
| | | period = 1 |
| | | )) |
| | | } |
| | | |
| | | /** |
| | | * 导出自动评估结果 |
| | | * 金山工地、码头、搅拌站自评 |
| | | */ |
| | | @Test |
| | | fun test2() { |
| | | val taskId = "rXtm0AozZYJqoEpW" |
| | | val districtCode = "310116" |
| | | val year = 2023 |
| | | val month = 11 |
| | | // val sceneType = Constant.SceneType.TYPE1.value.toInt() |
| | | // val sceneType = Constant.SceneType.TYPE2.value.toInt() |
| | | val sceneType = Constant.SceneType.TYPE3.value.toInt() |
| | | // val sceneType = Constant.SceneType.TYPE14.value.toInt() |
| | | |
| | | when (sceneType) { |
| | | Constant.SceneType.TYPE1.value.toInt()->{ |
| | | jsCsDataAnalysis.setResource(taskId, sceneType, year, month) |
| | | jsCsDataAnalysis.execute() |
| | | } |
| | | Constant.SceneType.TYPE2.value.toInt()->{ |
| | | jsWhDataAnalysis.setResource(taskId, sceneType, year, month) |
| | | jsWhDataAnalysis.execute() |
| | | } |
| | | Constant.SceneType.TYPE3.value.toInt()->{ |
| | | jsMpDataAnalysis.setResource(taskId, sceneType, year, month) |
| | | jsMpDataAnalysis.execute() |
| | | } |
| | | } |
| | | |
| | | aopEvaluation.executeByTopTask(taskId, sceneType) |
| | | |
| | | val mode = 9 |
| | | searchService.writeToFile(ExcelConfigVo( |
| | | "VHXHS1dHsykTNUf2", |
| | | districtCode = "310106", |
| | | sceneType = 1), mode) |
| | | taskId, |
| | | districtCode = districtCode, |
| | | sceneType = sceneType), mode) |
| | | } |
| | | } |