| | |
| | | import cn.flightfeather.supervision.domain.ds2.mapper.LedgerSubTypeMapper |
| | | import cn.flightfeather.supervision.domain.ds2.mapper.UserMapMapper |
| | | import cn.flightfeather.supervision.lightshare.vo.ExcelConfigVo |
| | | import org.springframework.beans.factory.annotation.Autowired |
| | | import org.springframework.stereotype.Component |
| | | import tk.mybatis.mapper.entity.Example |
| | | import java.time.Duration |
| | | import java.time.LocalDateTime |
| | | import java.time.ZoneId |
| | | import javax.annotation.PostConstruct |
| | | |
| | | /** |
| | | * 报告所需源数据 |
| | |
| | | */ |
| | | fun areaName(): String { |
| | | val t = dbMapper.taskMapper.selectByPrimaryKey(config.topTaskGuid) |
| | | return "${dateUtil.DateToString(t.starttime, DateUtil.DateStyle.YYYY_MM_CN)}${t.districtname}${if (area != t.districtname) area else ""}${Constant.ScenseType.getDes(config.sceneType)}" |
| | | return "${dateUtil.DateToString(t.starttime, DateUtil.DateStyle.YYYY_MM_CN)}${t.districtname}${if (area != t.districtname) area else ""}${Constant.SceneType.getDes(config.sceneType)}" |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | }) |
| | | } else { |
| | | taskSceneIdList = dbMapper.monitorobjectversionMapper.getSceneByType(config.topTaskGuid, config.sceneType, config.townCode) |
| | | taskSceneIdList = dbMapper.scenseMapper.getSceneByType(config.topTaskGuid, config |
| | | .sceneType, config.townCode).map { it.guid ?: "" } |
| | | dbMapper.subtaskMapper.selectByExample(Example(Subtask::class.java).apply { |
| | | createCriteria().andIn("scenseid", taskSceneIdList) |
| | | .andEqualTo("tguid", config.topTaskGuid) |
| | |
| | | get() { |
| | | if (_baseScene == null) { |
| | | _baseScene = when (this.scene?.typeid.toString()) { |
| | | Constant.ScenseType.TYPE1.value -> { |
| | | Constant.SceneType.TYPE1.value -> { |
| | | dbMapper.sceneConstructionSiteMapper.selectByPrimaryKey(scene?.guid) |
| | | } |
| | | Constant.ScenseType.TYPE2.value -> { |
| | | Constant.SceneType.TYPE2.value -> { |
| | | dbMapper.sceneWharfMapper.selectByPrimaryKey(scene?.guid) |
| | | } |
| | | Constant.ScenseType.TYPE3.value -> { |
| | | Constant.SceneType.TYPE3.value -> { |
| | | dbMapper.sceneMixingPlantMapper.selectByPrimaryKey(scene?.guid) |
| | | } |
| | | Constant.ScenseType.TYPE14.value -> { |
| | | Constant.SceneType.TYPE14.value -> { |
| | | dbMapper.sceneStorageYardMapper.selectByPrimaryKey(scene?.guid) |
| | | } |
| | | else -> null |
| | |
| | | val ledgerCount: Int |
| | | get() { |
| | | if (_ledgerCount == -1) { |
| | | val tzSceneType = Constant.ScenseType.typeMap(scene?.typeid) |
| | | val tzSceneType = Constant.SceneType.typeMap(scene?.typeid) |
| | | _ledgerCount = dbMapper.ledgerSubTypeMapper.selectCountByExample(Example(LedgerSubType::class.java).apply { |
| | | createCriteria().andEqualTo("lScenetype", tzSceneType).andEqualTo("lNeedupdate", true) |
| | | }) |