| | |
| | | if (!it.isExecuted) { |
| | | it.execute() |
| | | } |
| | | objectResults.add(it.toObject()) |
| | | it.toObject() |
| | | objectResults.add(it.resultObjects) |
| | | } |
| | | } |
| | | |
| | |
| | | * è¾åºå°å¯¹è±¡ |
| | | * hc 2024.12.06 |
| | | */ |
| | | fun toObject(): MutableList<BaseTemplateResult> { |
| | | fun toObject() { |
| | | if (!isExecuted) { |
| | | execute() |
| | | } |
| | |
| | | resultObjects.clear() |
| | | resultObjects.add(classType.createInstance()) |
| | | } |
| | | return resultObjects |
| | | } |
| | | |
| | | /** |
| | |
| | | entity.sceneType = this.sceneType |
| | | entity.sceneName = this.sceneName |
| | | // å°Stringç±»åçç管æ¶é´è½¬æ¢ä¸ºDateç±»å |
| | | entity.inspectionTime = DateUtil.StringToDate(this.subTaskPlanstarttime, "mm-dd") |
| | | entity.inspectionTime = DateUtil.StringToDate(this.subTaskPlanstarttime, "yyyy-mm-dd") |
| | | entity.executors = this.subTaskExecutorrealtimes |
| | | entity.problemType = this.problemTypename |
| | | entity.problemDescription = this.problemDescription |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.business.report.bean |
| | | |
| | | class ProTypeDetailSummaryResult() : BaseTemplateResult() { |
| | | |
| | | override fun convertToDBEntity(): Any { |
| | | TODO("Not yet implemented") |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.business.report.bean |
| | | |
| | | class ProTypeRankMainSummaryResult : BaseTemplateResult() { |
| | | override fun convertToDBEntity(): Any { |
| | | TODO("Not yet implemented") |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.business.report.bean |
| | | |
| | | class ProTypeRankSummaryResult : BaseTemplateResult() { |
| | | override fun convertToDBEntity(): Any { |
| | | TODO("Not yet implemented") |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.business.report.bean |
| | | |
| | | class ProTypeStatusSummaryResult : BaseTemplateResult() { |
| | | override fun convertToDBEntity(): Any { |
| | | TODO("Not yet implemented") |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.business.report.bean |
| | | |
| | | class ScoreAnalysisSummaryResult : BaseTemplateResult() { |
| | | override fun convertToDBEntity(): Any { |
| | | TODO("Not yet implemented") |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.business.report.bean |
| | | |
| | | class ScoreDetailSummaryResult : BaseTemplateResult() { |
| | | override fun convertToDBEntity(): Any { |
| | | TODO("Not yet implemented") |
| | | } |
| | | } |
| | |
| | | import cn.flightfeather.supervision.business.report.BaseCols |
| | | import cn.flightfeather.supervision.business.report.BaseTemplate |
| | | import cn.flightfeather.supervision.business.report.DataSource |
| | | import cn.flightfeather.supervision.business.report.bean.BaseTemplateResult |
| | | import cn.flightfeather.supervision.business.report.bean.ProTypeDetailSummaryResult |
| | | import cn.flightfeather.supervision.business.report.cols.* |
| | | |
| | | class ProTypeDetailSummary(dataSource: DataSource) : BaseTemplate(dataSource) { |
| | | override val cols: List<BaseCols> = listOf(ColSceneName(), ColTown(), ColStatus(), ColProChange(), ColProblemDistribution()) |
| | | |
| | | override var resultObjects: MutableList<BaseTemplateResult> = mutableListOf(ProTypeDetailSummaryResult()) |
| | | override val templateName: String = "é®é¢ä¸æ´æ¹åç±»ç»è®¡è¡¨" |
| | | } |
| | |
| | | package cn.flightfeather.supervision.business.report.template |
| | | |
| | | import cn.flightfeather.supervision.business.report.DataSource |
| | | import cn.flightfeather.supervision.business.report.bean.BaseTemplateResult |
| | | import cn.flightfeather.supervision.business.report.bean.ProTypeRankMainSummaryResult |
| | | import cn.flightfeather.supervision.common.utils.Constant |
| | | import cn.flightfeather.supervision.common.utils.ExcelUtil |
| | | |
| | | class ProTypeRankMainSummary(dataSource: DataSource) : ProTypeRankSummary(dataSource) { |
| | | override val templateName: String = "æåº¦ä¸»è¦æå
¸åé®é¢åæè¡¨" |
| | | |
| | | override var resultObjects: MutableList<BaseTemplateResult> = mutableListOf(ProTypeRankMainSummaryResult()) |
| | | override fun formatTable(summarys: MutableList<Summary>) { |
| | | //æåé åçmax个é®é¢è¢«è®¤å®ä¸ºä¸»è¦æå
¸åé®é¢ |
| | | val max = when (dataSource.config.sceneType.toString()) { |
| | |
| | | import cn.flightfeather.supervision.business.report.BaseCols |
| | | import cn.flightfeather.supervision.business.report.BaseTemplate |
| | | import cn.flightfeather.supervision.business.report.DataSource |
| | | import cn.flightfeather.supervision.business.report.cols.* |
| | | import cn.flightfeather.supervision.business.report.bean.BaseTemplateResult |
| | | import cn.flightfeather.supervision.business.report.bean.ProTypeRankSummaryResult |
| | | import cn.flightfeather.supervision.common.utils.ExcelUtil |
| | | import kotlin.math.round |
| | | |
| | | open class ProTypeRankSummary(dataSource: DataSource) : BaseTemplate(dataSource) { |
| | | override val cols: List<BaseCols> = listOf() |
| | | override val templateName: String = "é®é¢ä¸æ´æ¹åç±»æå" |
| | | |
| | | override fun execute() { |
| | | override var resultObjects: MutableList<BaseTemplateResult> = mutableListOf(ProTypeRankSummaryResult()) |
| | | override fun genData() { |
| | | dataSource.reset() |
| | | |
| | | val proMap = mutableMapOf<String?, Summary>() |
| | |
| | | import cn.flightfeather.supervision.business.report.BaseCols |
| | | import cn.flightfeather.supervision.business.report.BaseTemplate |
| | | import cn.flightfeather.supervision.business.report.DataSource |
| | | import cn.flightfeather.supervision.business.report.bean.BaseTemplateResult |
| | | import cn.flightfeather.supervision.business.report.bean.ProTypeStatusSummaryResult |
| | | import cn.flightfeather.supervision.common.utils.Constant |
| | | import cn.flightfeather.supervision.common.utils.ExcelUtil |
| | | import cn.flightfeather.supervision.domain.ds1.entity.SceneConstructionSite |
| | | |
| | | class ProTypeStatusSummary(dataSource: DataSource) : BaseTemplate(dataSource) { |
| | | override val cols: List<BaseCols> = listOf() |
| | | override var resultObjects: MutableList<BaseTemplateResult> = mutableListOf(ProTypeStatusSummaryResult()) |
| | | override val templateName: String = "工尿½å·¥é¶æ®µé®é¢åç±»åæè¡¨" |
| | | |
| | | @Throws(Exception::class) |
| | | override fun execute() { |
| | | override fun genData() { |
| | | if (dataSource.config.sceneType.toString() != Constant.SceneType.TYPE1.value) { |
| | | // throw IllegalStateException("${templateName}åªè½é对工å°è¿è¡åæï¼å½åä¼ å
¥åºæ¯ç±»åç¼å·ä¸º${dataSource.config.sceneType}") |
| | | println("sadas") |
| | |
| | | import cn.flightfeather.supervision.business.report.BaseCols |
| | | import cn.flightfeather.supervision.business.report.BaseTemplate |
| | | import cn.flightfeather.supervision.business.report.DataSource |
| | | import cn.flightfeather.supervision.business.report.bean.BaseTemplateResult |
| | | import cn.flightfeather.supervision.business.report.bean.ScoreAnalysisSummaryResult |
| | | import cn.flightfeather.supervision.business.report.cols.ColTotalGrade |
| | | import cn.flightfeather.supervision.common.utils.ExcelUtil |
| | | import kotlin.math.round |
| | | |
| | | class ScoreAnalysisSummary(dataSource: DataSource) : BaseTemplate(dataSource) { |
| | | override val cols: List<BaseCols> = listOf(ColTotalGrade()) |
| | | |
| | | override var resultObjects: MutableList<BaseTemplateResult> = mutableListOf(ScoreAnalysisSummaryResult()) |
| | | override val templateName: String = "åè¡éè§èæ§åæè¡¨" |
| | | |
| | | override fun execute() { |
| | | override fun genData() { |
| | | dataSource.reset() |
| | | cols.forEach { it.combineHead(head,dataSource) } |
| | | |
| | |
| | | import cn.flightfeather.supervision.business.report.BaseCols |
| | | import cn.flightfeather.supervision.business.report.BaseTemplate |
| | | import cn.flightfeather.supervision.business.report.DataSource |
| | | import cn.flightfeather.supervision.business.report.bean.BaseTemplateResult |
| | | import cn.flightfeather.supervision.business.report.bean.ScoreDetailSummaryResult |
| | | import cn.flightfeather.supervision.business.report.cols.* |
| | | |
| | | class ScoreDetailSummary(dataSource: DataSource) : BaseTemplate(dataSource) { |
| | |
| | | ColTotalGrade(), |
| | | ColItemGrade() |
| | | ) |
| | | override var resultObjects: MutableList<BaseTemplateResult> = mutableListOf(ScoreDetailSummaryResult()) |
| | | override val templateName: String = "è§èæ§è¯ä¼°è¯¦æ
表" |
| | | } |
| | |
| | | package cn.flightfeather.supervision.domain.ds1.mapper; |
| | | |
| | | import cn.flightfeather.supervision.domain.ds1.entity.DataProduct; |
| | | import tk.mybatis.mapper.common.Mapper; |
| | | import cn.flightfeather.supervision.domain.util.MyMapper; |
| | | |
| | | public interface DataProductMapper extends Mapper<DataProduct> { |
| | | public interface DataProductMapper extends MyMapper<DataProduct> { |
| | | } |
| | |
| | | package cn.flightfeather.supervision.domain.ds1.mapper |
| | | |
| | | import cn.flightfeather.supervision.domain.ds1.entity.DataProductProDetail |
| | | import tk.mybatis.mapper.common.Mapper |
| | | import cn.flightfeather.supervision.domain.util.MyMapper |
| | | |
| | | interface DataProductProDetailMapper : Mapper<DataProductProDetail> { |
| | | fun insertBatch(list: List<DataProductProDetail>) |
| | | interface DataProductProDetailMapper : MyMapper<DataProductProDetail> { |
| | | |
| | | } |
| | |
| | | package cn.flightfeather.supervision.domain.ds1.mapper |
| | | |
| | | import cn.flightfeather.supervision.domain.ds1.entity.DataProductTownProAnalysis |
| | | import cn.flightfeather.supervision.domain.util.MyMapper |
| | | import tk.mybatis.mapper.common.Mapper |
| | | |
| | | interface DataProductTownProAnalysisMapper : Mapper<DataProductTownProAnalysis> { |
| | | fun insertBatch(list: List<DataProductTownProAnalysis>) |
| | | interface DataProductTownProAnalysisMapper : MyMapper<DataProductTownProAnalysis> { |
| | | |
| | | } |
| | |
| | | */ |
| | | fun insertDataProduct(dataProduct: DataProduct, specificEntities: List<Any>) { |
| | | // æ ¹æ®ç±»åæå
¥æå®æ°æ®åºè¡¨ |
| | | if (!ObjectUtils.isEmpty(specificEntities)) { |
| | | if (specificEntities.isNotEmpty()) { |
| | | when (specificEntities.first()::class) { |
| | | DataProductProDetail::class -> { |
| | | (specificEntities as? List<DataProductProDetail>)?.let { let_it -> |
| | |
| | | for_it.dpGuid = dataProduct.guid |
| | | } |
| | | dataProduct.typeId = Constant.DataProductType.PRO_DETAIL_SUMMARY.value |
| | | dataProductProDetailMapper.insertBatch(let_it) |
| | | insertProDetailSpecificInfo(let_it) |
| | | } |
| | | } |
| | | DataProductTownProAnalysis::class -> { |
| | |
| | | for_it.dpGuid = dataProduct.guid |
| | | } |
| | | dataProduct.typeId = Constant.DataProductType.PRO_ANALYSIS_SUMMARY.value |
| | | dataProductTownProAnalysisMapper.insertBatch(let_it) |
| | | insertTownProAnalysisSpecificInfo(let_it) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | insertDataProductBaseInfo(dataProduct) |
| | | } |
| | | |
| | | private fun insertProDetailSpecificInfo(specificEntities: List<DataProductProDetail>) { |
| | | dataProductProDetailMapper.insertList(specificEntities) |
| | | } |
| | | |
| | | private fun insertTownProAnalysisSpecificInfo(specificEntities: List<DataProductTownProAnalysis>) { |
| | | dataProductTownProAnalysisMapper.insertList(specificEntities) |
| | | } |
| | | |
| | | |
| | | private fun insertDataProductBaseInfo(dataProduct: DataProduct) { |
| | | // è¡æ¿åºånameå¡«å
|
| | | if (dataProduct.townCode != null) { |
| | | townMapper.selectByExample(Example(Town::class.java).apply { |
| | |
| | | Change_Check_Per, Ledger_Percent, Ledger_Submit_Date, Ledger_Check_Time, Change_Tracking_Reminder, |
| | | Create_Time |
| | | </sql> |
| | | |
| | | <sql id="Base_Column_List_Without_ID" > |
| | | <!-- |
| | | WARNING - @mbg.generated |
| | | --> |
| | | DP_GUID, Form_Index, Scene_Index, Scene_Type, Scene_Name, Inspection_Time, Executors, |
| | | Problem_Type, Problem_Description, Problem_Location, Problem_Num, Change_Time, Problem_Changed, |
| | | Changed_Problem, Changed_Num, Unchanged_Problems, UnChanged_Num, Change_Percent, |
| | | Check_Status, Pro_Check_Time, Change_Check_Time, Pro_Check_Num, Pro_Check_Per, Change_Check_Num, |
| | | Change_Check_Per, Ledger_Percent, Ledger_Submit_Date, Ledger_Check_Time, Change_Tracking_Reminder, |
| | | Create_Time |
| | | </sql> |
| | | <insert id="insertBatch" parameterType="java.util.List"> |
| | | INSERT INTO sm_t_data_product_prodetail |
| | | ( <include refid="Base_Column_List_Without_ID" /> ) |
| | | VALUES |
| | | <foreach collection="list" item="item" separator=","> |
| | | (#{item.dpGuid,jdbcType=VARCHAR}, |
| | | #{item.formIndex,jdbcType=INTEGER}, |
| | | #{item.sceneIndex,jdbcType=INTEGER}, |
| | | #{item.sceneType,jdbcType=VARCHAR}, |
| | | #{item.sceneName,jdbcType=VARCHAR}, |
| | | #{item.inspectionTime,jdbcType=TIMESTAMP}, |
| | | #{item.executors,jdbcType=VARCHAR}, |
| | | #{item.problemType,jdbcType=VARCHAR}, |
| | | #{item.problemDescription,jdbcType=VARCHAR}, |
| | | #{item.problemLocation,jdbcType=VARCHAR}, |
| | | #{item.problemNum,jdbcType=INTEGER}, |
| | | #{item.changeTime,jdbcType=VARCHAR}, |
| | | #{item.problemChanged,jdbcType=VARCHAR}, |
| | | #{item.changedProblem,jdbcType=VARCHAR}, |
| | | #{item.changedNum,jdbcType=INTEGER}, |
| | | #{item.unchangedProblems,jdbcType=VARCHAR}, |
| | | #{item.unchangedNum,jdbcType=INTEGER}, |
| | | #{item.changePercent,jdbcType=DECIMAL}, |
| | | #{item.checkStatus,jdbcType=VARCHAR}, |
| | | #{item.proCheckTime,jdbcType=VARCHAR}, |
| | | #{item.changeCheckTime,jdbcType=VARCHAR}, |
| | | #{item.proCheckNum,jdbcType=INTEGER}, |
| | | #{item.proCheckPer,jdbcType=DECIMAL}, |
| | | #{item.changeCheckNum,jdbcType=INTEGER}, |
| | | #{item.changeCheckPer,jdbcType=DECIMAL}, |
| | | #{item.ledgerPercent,jdbcType=DECIMAL}, |
| | | #{item.ledgerSubmitDate,jdbcType=TIMESTAMP}, |
| | | #{item.ledgerCheckTime,jdbcType=TIMESTAMP}, |
| | | #{item.changeTrackingReminder,jdbcType=VARCHAR}, |
| | | #{item.createTime,jdbcType=TIMESTAMP}) |
| | | </foreach> |
| | | </insert> |
| | | </mapper> |
| | |
| | | Change_Per, Change_Scene_Rank, Pro_Change_Rank, Focus_Scene_Count, Focus_Scene_Per, |
| | | Create_Time |
| | | </sql> |
| | | |
| | | <sql id="Base_Column_List_Without_ID" > |
| | | <!-- |
| | | WARNING - @mbg.generated |
| | | --> |
| | | DP_GUID, Form_Index, Town_Name, Scene_Type, Scene_Count, Inactive_Scene_Count, |
| | | Active_Scene_Count, Change_Scene_Count, Change_Scene_Per, Pro_Count, Pro_Per, Change_Count, |
| | | Change_Per, Change_Scene_Rank, Pro_Change_Rank, Focus_Scene_Count, Focus_Scene_Per, |
| | | Create_Time |
| | | </sql> |
| | | <insert id="insertBatch" parameterType="java.util.List"> |
| | | INSERT INTO sm_t_data_product_townproanalysis |
| | | ( <include refid="Base_Column_List_Without_ID" /> ) |
| | | VALUES |
| | | <foreach collection="list" item="item" index="index" separator=","> |
| | | ( #{item.dpGuid,jdbcType=VARCHAR}, |
| | | #{item.formIndex,jdbcType=INTEGER}, |
| | | #{item.townName,jdbcType=VARCHAR}, |
| | | #{item.sceneType,jdbcType=VARCHAR}, |
| | | #{item.sceneCount,jdbcType=INTEGER}, |
| | | #{item.inactiveSceneCount,jdbcType=INTEGER}, |
| | | #{item.activeSceneCount,jdbcType=INTEGER}, |
| | | #{item.changeSceneCount,jdbcType=INTEGER}, |
| | | #{item.changeScenePer,jdbcType=DECIMAL}, |
| | | #{item.proCount,jdbcType=INTEGER}, |
| | | #{item.proPer,jdbcType=DECIMAL}, |
| | | #{item.changeCount,jdbcType=INTEGER}, |
| | | #{item.changePer,jdbcType=DECIMAL}, |
| | | #{item.changeSceneRank,jdbcType=INTEGER}, |
| | | #{item.proChangeRank,jdbcType=INTEGER}, |
| | | #{item.focusSceneCount,jdbcType=INTEGER}, |
| | | #{item.focusScenePer,jdbcType=DECIMAL}, |
| | | #{item.createTime,jdbcType=TIMESTAMP}) |
| | | </foreach> |
| | | </insert> |
| | | </mapper> |