feiyu02
2024-08-13 b8cc591541b88dd2bb93f111f8e8075842dce7ca
1. 新增设备信息相关功能
2. 修正自评估中数据自动评分的部分逻辑
已修改26个文件
已删除6个文件
已添加18个文件
3067 ■■■■ 文件已修改
pom.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/dataanalysis/AopDataAnalysis.kt 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/dataanalysis/JACsDataAnalysis.kt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/dataanalysis/JSDustDataAnalysis.kt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/dataanalysis/XHFuDataAnalysis.kt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/AopEvaluation.kt 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem10.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem11.kt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem7.kt 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/bgtask/AopTaskCtrl.kt 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/utils/Constant.kt 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/BaseDevice.kt 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DeviceInfo.java 251 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DeviceLocation.java 238 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DeviceStatus.java 334 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DustDataResult.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/MonitorDeviceInfo.java 467 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/ProductionDeviceInfo.java 436 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/TreatmentDeviceInfo.java 460 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DeviceInfoMapper.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DeviceLocationMapper.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DeviceStatusMapper.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/MonitorDeviceInfoMapper.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/ProductionDeviceInfoMapper.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/TreatmentDeviceInfoMapper.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/DeviceRep.kt 109 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/DeviceService.kt 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/UserMapService.kt 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DeviceServiceImpl.kt 81 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MediafileServiceImpl.kt 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/UserMapServiceImpl.kt 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/DeviceMapVo.kt 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/DeviceStatusVo.kt 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/MonitorDeviceInfoVo.kt 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/ProductionDeviceInfoVo.kt 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/TreatmentDeviceInfoVo.kt 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-pro-https.yml 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-pro.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/generator/generatorConfig4ds1.xml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds1/DeviceInfoMapper.xml 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds1/DeviceLocationMapper.xml 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds1/DeviceStatusMapper.xml 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds1/DustDataResultMapper.xml 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds1/MonitorDeviceInfoMapper.xml 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds1/ProductionDeviceInfoMapper.xml 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds1/TreatmentDeviceInfoMapper.xml 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/test/kotlin/cn/flightfeather/supervision/business/bgtask/AopTaskCtrlTest.kt 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/test/kotlin/cn/flightfeather/supervision/lightshare/service/impl/UserinfoServiceImplTest.kt 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml
@@ -499,6 +499,12 @@
            </properties>
        </profile>
        <profile>
            <id>pro-https</id>
            <properties>
                <profileActive>pro-https</profileActive>
            </properties>
        </profile>
        <profile>
            <id>test</id>
            <properties>
                <profileActive>test</profileActive>
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/dataanalysis/AopDataAnalysis.kt
@@ -70,48 +70,58 @@
            //获取原始监测数据
            val dataList = fetchDataResources(evaluationScene)
            //计算统计结果
            var tempExceedTimes = TempResult()
            var tempAvg = TempResult()
            var tempMax = TempResult()
            var tempMin = TempResult()
//            var tempExceedTimes = TempResult()
//            var tempAvg = TempResult()
//            var tempMax = TempResult()
//            var tempMin = TempResult()
            dataList.forEach {
                // ç›‘测点有多台设备时,每台设备单独统计,取均值最高的为统计结果
                val _tempExceedTimes = TempResult()
                val _tempAvg = TempResult()
                val _tempMax = TempResult()
                val _tempMin = TempResult()
                // ç›‘测点有多台设备时,每台设备单独记录
                val deviceCode = if (it.isNotEmpty()) {
                    getDeviceCode(it[0])
                } else {
                    null
                }
                val tempExceedTimes = TempResult()
                val tempAvg = TempResult()
                val tempMax = TempResult()
                val tempMin = TempResult()
//                val _tempExceedTimes = TempResult()
//                val _tempAvg = TempResult()
//                val _tempMax = TempResult()
//                val _tempMin = TempResult()
                it.forEach { t ->
                    t?.let {
                        exceedTimes(t, _tempExceedTimes)
                        avg(t, _tempAvg)
                        max(t, _tempMax)
                        min(t, _tempMin)
                        exceedTimes(t, tempExceedTimes)
                        avg(t, tempAvg)
                        max(t, tempMax)
                        min(t, tempMin)
                    }
                }
                // ä¿ç•™å‡å€¼æœ€é«˜çš„一台设备
                if (_tempAvg.avg > tempAvg.avg) {
                    tempExceedTimes = _tempExceedTimes
                    tempAvg = _tempAvg
                    tempMax = _tempMax
                    tempMin = _tempMin
//                if (_tempAvg.avg > tempAvg.avg) {
//                    tempExceedTimes = _tempExceedTimes
//                    tempAvg = _tempAvg
//                    tempMax = _tempMax
//                    tempMin = _tempMin
//                }
                val dustDataResult = DustDataResult().apply {
                    drSceneId = evaluationScene.scene.value?.guid
                    drSceneName = evaluationScene.scene.value?.name
                    drDeviceCode = deviceCode
                    drTime = source?.config?.startTime
                    drExceedTimes = tempExceedTimes.count
                    drAvg = tempAvg.avg
                    drMax = tempMax.total
                    drMin = tempMin.total
                    drOverAvgPer = overAvgRate(drAvg, dAvg)
                    drDataNum = count(dataList)
                    // å½“数据量为0时,超月度区均值百分比变为0
                    if (drDataNum == 0) drOverAvgPer = .0
                    drEffectiveRate = effectiveRate(dataList, evaluationScene)
                }
                //更新入库
                aopOutput.toDbDataResult(dustDataResult)
            }
            val dustDataResult = DustDataResult().apply {
                drSceneId = evaluationScene.scene.value?.guid
                drSceneName = evaluationScene.scene.value?.name
                drTime = source?.config?.startTime
                drExceedTimes = tempExceedTimes.count
                drAvg = tempAvg.avg
                drMax = tempMax.total
                drMin = tempMin.total
                drOverAvgPer = overAvgRate(drAvg, dAvg)
                drDataNum = count(dataList)
                // å½“数据量为0时,超月度区均值百分比变为0
                if (drDataNum == 0) drOverAvgPer = .0
                drEffectiveRate = effectiveRate(dataList, evaluationScene)
            }
            //更新入库
            aopOutput.toDbDataResult(dustDataResult)
        }
    }
@@ -122,6 +132,11 @@
    abstract fun districtAvg(source: AopDataSource?): Double?
    /**
     * èŽ·å–è®¾å¤‡ç¼–å·
     */
    abstract fun getDeviceCode(data: T?): String?
    /**
     * èŽ·å–åŽŸå§‹ç›‘æµ‹æ•°æ®
     */
    abstract fun fetchDataResources(evaluationScene: AopDataSource.EvaluationScene): List<List<T?>>
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/dataanalysis/JACsDataAnalysis.kt
@@ -52,6 +52,10 @@
        }
    }
    override fun getDeviceCode(data: HourDustData?): String? {
        return data?.mncode
    }
    override fun fetchDataResources(evaluationScene: AopDataSource.EvaluationScene): List<List<HourDustData?>> {
        val dustSiteMaps = dustSiteMapMapper.selectByExample(Example(DustSiteMap::class.java).apply {
            createCriteria().andEqualTo("svUserId", evaluationScene.userInfo.value?.guid)
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/dataanalysis/JSDustDataAnalysis.kt
@@ -57,6 +57,10 @@
        }
    }
    override fun getDeviceCode(data: JSDustData?): String? {
        return data?.mnCode
    }
    override fun fetchDataResources(evaluationScene: AopDataSource.EvaluationScene): List<List<JSDustData?>> {
        val dustSiteMaps = jsDustSiteMapMapper.selectByExample(Example(JSDustSiteMap::class.java).apply {
            createCriteria().andEqualTo("svUserId", evaluationScene.userInfo.value?.guid)
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/dataanalysis/XHFuDataAnalysis.kt
@@ -40,6 +40,10 @@
        return fumeSiteMaps.map { it?.xhDeviceCode }
    }
    override fun getDeviceCode(data: FumeDailyAnalysis?): String? {
        return data?.fumeDevId
    }
    override fun fetchDataResources(evaluationScene: AopDataSource.EvaluationScene): List<List<FumeDailyAnalysis?>> {
        val deviceCodeList = getDeviceCodes(evaluationScene)
        val map = mutableMapOf<String?, MutableList<FumeDailyAnalysis?>>()
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/AopEvaluation.kt
@@ -36,8 +36,6 @@
    whScoreItem1: WhScoreItem1,
    whScoreItem2: WhScoreItem2,
    reScoreItem5: ReScoreItem5,
    // FIXME: 2023/12/29 åˆ åŽ»ç‰¹æ®Šè¯„ä¼°è§„åˆ™
//    reScoreItem7: ReScoreItem7,
    reScoreItem8: ReScoreItem8,
    reScoreItem9: ReScoreItem9,
    reScoreItem10: ReScoreItem10,
@@ -62,7 +60,6 @@
            add(whScoreItem1)
            add(whScoreItem2)
            add(reScoreItem5)
//            add(reScoreItem7)
            add(reScoreItem8)
            add(reScoreItem9)
            add(reScoreItem10)
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem10.kt
@@ -44,7 +44,7 @@
        val s = lt.withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0)
        val e = s.plusMonths(1)
        var i = 1
        var i = 0
        when {
            condition3(s, e) -> {
                i = 3
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem11.kt
@@ -26,14 +26,14 @@
     *      2.环境信用自评未按时自评或未按时提
     */
    override fun otherProblem(size: Int): List<Int>? {
        var i = 0
        var i = -1
        if (condition1()) {
            i = 1
        } else if (condition2()) {
            i = 2
        }
        if (i > size - 1) i = size - 1
        return listOf(i)
        return if(i == -1) null else listOf(i)
    }
    /**
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem7.kt
@@ -14,17 +14,9 @@
import java.time.ZoneId
import javax.annotation.PostConstruct
@Deprecated(level = DeprecationLevel.HIDDEN, message = "台账的评估通过巡查问题自动对应")
@Component
class ReScoreItem7: ScoreItem() {
    companion object {
        private lateinit var instance: ReScoreItem7
    }
    @PostConstruct
    fun init() {
        instance = this
    }
    init {
        exemption = true
    }
src/main/kotlin/cn/flightfeather/supervision/business/bgtask/AopTaskCtrl.kt
@@ -78,10 +78,11 @@
            val id = "${BgTaskType.AUTO_SCORE.name}-${districtCode}-${sceneType}"
            val name = "${districtName}${Constant.SceneType.getDes(sceneType)}自动评分"
            val bgTask = backgroundTaskCtrl.startNewTask(BgTaskType.AUTO_SCORE, id, name) {
                // ç›‘测数据分析入库
                dataAnalysis(districtCode, sceneType, taskId, year, month)
                // è‡ªåŠ¨è¯„ä¼°è®¡ç®—å…¥åº“
                aopEvaluation.executeByTopTask(taskId, sceneType)
                // çŽ¯ä¿¡ç ç»“æžœè½¬æ¢å…¥åº“
                aopCreditCode.execute(AopDataConfig(
                    year = year,
                    month = month,
src/main/kotlin/cn/flightfeather/supervision/common/utils/Constant.kt
@@ -130,6 +130,23 @@
        }
    }
    //设备类型
    enum class DeviceType(val value: Byte, val text: String){
        MONITOR_DEVICE(0, "监控设备"),
        TREATMENT_DEVICE(1, "治理设备"),
        PRODUCTION_DEVICE(2, "生产设备");
        companion object {
            fun fromValue(value: Byte) = when (value.toInt()) {
                0 -> MONITOR_DEVICE
                1 -> TREATMENT_DEVICE
                2 -> PRODUCTION_DEVICE
                else -> MONITOR_DEVICE
            }
        }
    }
    companion object {
        //问题审核
        const val PROBLEM_CHECK_PASS = "pass"//问题审核通过
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/BaseDevice.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,11 @@
package cn.flightfeather.supervision.domain.ds1.entity
import io.swagger.annotations.ApiModel
/**
 * åŸºæœ¬åœºæ™¯è®¾å¤‡ä¿¡æ¯ï¼Œç»§æ‰¿æ­¤æŽ¥å£ï¼Œè¡¨ç¤ºè¯¥ç±»ä¸ºåœºæ™¯è®¾å¤‡ä¸­çš„子类
 * @date 2024/8/6
 * @author feiyu02
 */
@ApiModel(description = "场景设备信息基类接口")
interface BaseDevice
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DeviceInfo.java
ÎļþÒÑɾ³ý
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DeviceLocation.java
ÎļþÒÑɾ³ý
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DeviceStatus.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,334 @@
package cn.flightfeather.supervision.domain.ds1.entity;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;
@Table(name = "di_t_device_status")
public class DeviceStatus {
    @Id
    @Column(name = "DL_ID")
    private Integer dlId;
    /**
     * æ‰€å±žè®¾å¤‡id
     */
    @Column(name = "DL_Device_Id")
    private Integer dlDeviceId;
    /**
     * è®¾å¤‡ç±»åž‹ï¼ˆ0:监控设备;1:净化设备;2:作业设备)
     */
    @Column(name = "DL_Device_Type")
    private Byte dlDeviceType;
    /**
     * æ‰€å±žåœºæ™¯id
     */
    @Column(name = "DL_Scene_GUID")
    private String dlSceneGuid;
    /**
     * åœºæ™¯ç±»åž‹id
     */
    @Column(name = "DL_Scene_Type_Id")
    private Byte dlSceneTypeId;
    /**
     * è®¾å¤‡ä½ç½®
     */
    @Column(name = "DL_Location")
    private String dlLocation;
    @Column(name = "DL_Longitude")
    private BigDecimal dlLongitude;
    @Column(name = "DL_Latitude")
    private BigDecimal dlLatitude;
    /**
     * å®‰è£…位置是否规范
     */
    @Column(name = "DL_Standard")
    private Boolean dlStandard;
    /**
     * å®‰è£…位置不规范原因
     */
    @Column(name = "DL_UnStandard_Reason")
    private String dlUnstandardReason;
    /**
     * è¿è¡ŒçŠ¶æ€(0:未联网;1:上线中;2:下线;3:拆除)
     */
    @Column(name = "DL_Real_Time_Status")
    private Byte dlRealTimeStatus;
    /**
     * è®¾å¤‡çŽ°åœºå›¾ç‰‡(多张图片用;分隔)
     */
    @Column(name = "DL_Pic_Url")
    private String dlPicUrl;
    /**
     * è§†é¢‘地址
     */
    @Column(name = "DL_Video_Url")
    private String dlVideoUrl;
    @Column(name = "DL_Create_Time")
    private Date dlCreateTime;
    @Column(name = "DL_Update_Time")
    private Date dlUpdateTime;
    /**
     * @return DL_ID
     */
    public Integer getDlId() {
        return dlId;
    }
    /**
     * @param dlId
     */
    public void setDlId(Integer dlId) {
        this.dlId = dlId;
    }
    /**
     * èŽ·å–æ‰€å±žè®¾å¤‡id
     *
     * @return DL_Device_Id - æ‰€å±žè®¾å¤‡id
     */
    public Integer getDlDeviceId() {
        return dlDeviceId;
    }
    /**
     * è®¾ç½®æ‰€å±žè®¾å¤‡id
     *
     * @param dlDeviceId æ‰€å±žè®¾å¤‡id
     */
    public void setDlDeviceId(Integer dlDeviceId) {
        this.dlDeviceId = dlDeviceId;
    }
    /**
     * èŽ·å–è®¾å¤‡ç±»åž‹ï¼ˆ0:监控设备;1:净化设备;2:作业设备)
     *
     * @return DL_Device_Type - è®¾å¤‡ç±»åž‹ï¼ˆ0:监控设备;1:净化设备;2:作业设备)
     */
    public Byte getDlDeviceType() {
        return dlDeviceType;
    }
    /**
     * è®¾ç½®è®¾å¤‡ç±»åž‹ï¼ˆ0:监控设备;1:净化设备;2:作业设备)
     *
     * @param dlDeviceType è®¾å¤‡ç±»åž‹ï¼ˆ0:监控设备;1:净化设备;2:作业设备)
     */
    public void setDlDeviceType(Byte dlDeviceType) {
        this.dlDeviceType = dlDeviceType;
    }
    /**
     * èŽ·å–æ‰€å±žåœºæ™¯id
     *
     * @return DL_Scene_GUID - æ‰€å±žåœºæ™¯id
     */
    public String getDlSceneGuid() {
        return dlSceneGuid;
    }
    /**
     * è®¾ç½®æ‰€å±žåœºæ™¯id
     *
     * @param dlSceneGuid æ‰€å±žåœºæ™¯id
     */
    public void setDlSceneGuid(String dlSceneGuid) {
        this.dlSceneGuid = dlSceneGuid == null ? null : dlSceneGuid.trim();
    }
    /**
     * èŽ·å–åœºæ™¯ç±»åž‹id
     *
     * @return DL_Scene_Type_Id - åœºæ™¯ç±»åž‹id
     */
    public Byte getDlSceneTypeId() {
        return dlSceneTypeId;
    }
    /**
     * è®¾ç½®åœºæ™¯ç±»åž‹id
     *
     * @param dlSceneTypeId åœºæ™¯ç±»åž‹id
     */
    public void setDlSceneTypeId(Byte dlSceneTypeId) {
        this.dlSceneTypeId = dlSceneTypeId;
    }
    /**
     * èŽ·å–è®¾å¤‡ä½ç½®
     *
     * @return DL_Location - è®¾å¤‡ä½ç½®
     */
    public String getDlLocation() {
        return dlLocation;
    }
    /**
     * è®¾ç½®è®¾å¤‡ä½ç½®
     *
     * @param dlLocation è®¾å¤‡ä½ç½®
     */
    public void setDlLocation(String dlLocation) {
        this.dlLocation = dlLocation == null ? null : dlLocation.trim();
    }
    /**
     * @return DL_Longitude
     */
    public BigDecimal getDlLongitude() {
        return dlLongitude;
    }
    /**
     * @param dlLongitude
     */
    public void setDlLongitude(BigDecimal dlLongitude) {
        this.dlLongitude = dlLongitude;
    }
    /**
     * @return DL_Latitude
     */
    public BigDecimal getDlLatitude() {
        return dlLatitude;
    }
    /**
     * @param dlLatitude
     */
    public void setDlLatitude(BigDecimal dlLatitude) {
        this.dlLatitude = dlLatitude;
    }
    /**
     * èŽ·å–å®‰è£…ä½ç½®æ˜¯å¦è§„èŒƒ
     *
     * @return DL_Standard - å®‰è£…位置是否规范
     */
    public Boolean getDlStandard() {
        return dlStandard;
    }
    /**
     * è®¾ç½®å®‰è£…位置是否规范
     *
     * @param dlStandard å®‰è£…位置是否规范
     */
    public void setDlStandard(Boolean dlStandard) {
        this.dlStandard = dlStandard;
    }
    /**
     * èŽ·å–å®‰è£…ä½ç½®ä¸è§„èŒƒåŽŸå› 
     *
     * @return DL_UnStandard_Reason - å®‰è£…位置不规范原因
     */
    public String getDlUnstandardReason() {
        return dlUnstandardReason;
    }
    /**
     * è®¾ç½®å®‰è£…位置不规范原因
     *
     * @param dlUnstandardReason å®‰è£…位置不规范原因
     */
    public void setDlUnstandardReason(String dlUnstandardReason) {
        this.dlUnstandardReason = dlUnstandardReason == null ? null : dlUnstandardReason.trim();
    }
    /**
     * èŽ·å–è¿è¡ŒçŠ¶æ€(0:未联网;1:上线中;2:下线;3:拆除)
     *
     * @return DL_Real_Time_Status - è¿è¡ŒçŠ¶æ€(0:未联网;1:上线中;2:下线;3:拆除)
     */
    public Byte getDlRealTimeStatus() {
        return dlRealTimeStatus;
    }
    /**
     * è®¾ç½®è¿è¡ŒçŠ¶æ€(0:未联网;1:上线中;2:下线;3:拆除)
     *
     * @param dlRealTimeStatus è¿è¡ŒçŠ¶æ€(0:未联网;1:上线中;2:下线;3:拆除)
     */
    public void setDlRealTimeStatus(Byte dlRealTimeStatus) {
        this.dlRealTimeStatus = dlRealTimeStatus;
    }
    /**
     * èŽ·å–è®¾å¤‡çŽ°åœºå›¾ç‰‡(多张图片用;分隔)
     *
     * @return DL_Pic_Url - è®¾å¤‡çŽ°åœºå›¾ç‰‡(多张图片用;分隔)
     */
    public String getDlPicUrl() {
        return dlPicUrl;
    }
    /**
     * è®¾ç½®è®¾å¤‡çŽ°åœºå›¾ç‰‡(多张图片用;分隔)
     *
     * @param dlPicUrl è®¾å¤‡çŽ°åœºå›¾ç‰‡(多张图片用;分隔)
     */
    public void setDlPicUrl(String dlPicUrl) {
        this.dlPicUrl = dlPicUrl == null ? null : dlPicUrl.trim();
    }
    /**
     * èŽ·å–è§†é¢‘åœ°å€
     *
     * @return DL_Video_Url - è§†é¢‘地址
     */
    public String getDlVideoUrl() {
        return dlVideoUrl;
    }
    /**
     * è®¾ç½®è§†é¢‘地址
     *
     * @param dlVideoUrl è§†é¢‘地址
     */
    public void setDlVideoUrl(String dlVideoUrl) {
        this.dlVideoUrl = dlVideoUrl == null ? null : dlVideoUrl.trim();
    }
    /**
     * @return DL_Create_Time
     */
    public Date getDlCreateTime() {
        return dlCreateTime;
    }
    /**
     * @param dlCreateTime
     */
    public void setDlCreateTime(Date dlCreateTime) {
        this.dlCreateTime = dlCreateTime;
    }
    /**
     * @return DL_Update_Time
     */
    public Date getDlUpdateTime() {
        return dlUpdateTime;
    }
    /**
     * @param dlUpdateTime
     */
    public void setDlUpdateTime(Date dlUpdateTime) {
        this.dlUpdateTime = dlUpdateTime;
    }
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DustDataResult.java
@@ -22,6 +22,12 @@
    private String drSceneName;
    /**
     * è®¾å¤‡ç¼–号
     */
    @Column(name = "DR_Device_Code")
    private String drDeviceCode;
    /**
     * è®°å½•月份
     */
    @Column(name = "DR_Time")
@@ -120,6 +126,24 @@
    }
    /**
     * èŽ·å–è®¾å¤‡ç¼–å·
     *
     * @return DR_Device_Code - è®¾å¤‡ç¼–号
     */
    public String getDrDeviceCode() {
        return drDeviceCode;
    }
    /**
     * è®¾ç½®è®¾å¤‡ç¼–号
     *
     * @param drDeviceCode è®¾å¤‡ç¼–号
     */
    public void setDrDeviceCode(String drDeviceCode) {
        this.drDeviceCode = drDeviceCode == null ? null : drDeviceCode.trim();
    }
    /**
     * èŽ·å–è®°å½•æœˆä»½
     *
     * @return DR_Time - è®°å½•月份
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/MonitorDeviceInfo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,467 @@
package cn.flightfeather.supervision.domain.ds1.entity;
import java.util.Date;
import javax.persistence.*;
@Table(name = "di_t_monitor_device_info")
public class MonitorDeviceInfo implements BaseDevice {
    @Id
    @Column(name = "DI_ID")
    private Integer diId;
    /**
     * ç›‘测设备编号
     */
    @Column(name = "DI_Device_Code")
    private String diDeviceCode;
    /**
     * ç«™ç‚¹åç§°
     */
    @Column(name = "DI_Name")
    private String diName;
    /**
     * æ‰€å±žåœºæ™¯id
     */
    @Column(name = "DI_Scene_GUID")
    private String diSceneGuid;
    /**
     * åœºæ™¯ç±»åž‹id
     */
    @Column(name = "DI_Scene_Type_Id")
    private Byte diSceneTypeId;
    /**
     * è®¾å¤‡ç±»åž‹(0:扬尘监测;1:油烟监测;2:VOC监测)
     */
    @Column(name = "DI_Type_Id")
    private Byte diTypeId;
    /**
     * è®¾å¤‡å­ç±»åž‹
     */
    @Column(name = "DI_Subtype_Id")
    private Byte diSubtypeId;
    /**
     * è®¾å¤‡ä¾›åº”商
     */
    @Column(name = "DI_Supplier")
    private String diSupplier;
    /**
     * è¿ç»´å•†
     */
    @Column(name = "DI_Maintainer")
    private String diMaintainer;
    /**
     * è¿ç»´é¢‘次(0:每周一次;1:每月一次;2:每季度一次;3:半年一次)
     */
    @Column(name = "DI_Maintain_Frequency")
    private Byte diMaintainFrequency;
    /**
     * è¿ç»´äººå‘˜
     */
    @Column(name = "DI_Maintain_Staff")
    private String diMaintainStaff;
    /**
     * è¿ç»´è”系方式
     */
    @Column(name = "DI_Maintain_Tel")
    private String diMaintainTel;
    /**
     * è¿è¡ŒçŠ¶æ€(0:未联网;1:上线中;2:下线;3:拆除)
     */
    @Column(name = "DI_Running_Status")
    private Byte diRunningStatus;
    /**
     * å“ç‰Œåž‹å·
     */
    @Column(name = "DI_Brand_Model")
    private String diBrandModel;
    /**
     * è®¾å¤‡å‚æ•°
     */
    @Column(name = "DI_Device_Param")
    private String diDeviceParam;
    /**
     * æ‰€æœ‰æƒï¼ˆ0:è´­ä¹°;1:租赁)
     */
    @Column(name = "DI_Ownership")
    private Byte diOwnership;
    /**
     * æ ‡è¯†äºŒç»´ç 
     */
    @Column(name = "DI_QR_Code")
    private String diQrCode;
    /**
     * å…¶ä»–第三方或设备自带二维码
     */
    @Column(name = "DI_Other_QR_Code")
    private String diOtherQrCode;
    @Column(name = "DI_Create_Time")
    private Date diCreateTime;
    @Column(name = "DI_Update_Time")
    private Date diUpdateTime;
    /**
     * @return DI_ID
     */
    public Integer getDiId() {
        return diId;
    }
    /**
     * @param diId
     */
    public void setDiId(Integer diId) {
        this.diId = diId;
    }
    /**
     * èŽ·å–ç›‘æµ‹è®¾å¤‡ç¼–å·
     *
     * @return DI_Device_Code - ç›‘测设备编号
     */
    public String getDiDeviceCode() {
        return diDeviceCode;
    }
    /**
     * è®¾ç½®ç›‘测设备编号
     *
     * @param diDeviceCode ç›‘测设备编号
     */
    public void setDiDeviceCode(String diDeviceCode) {
        this.diDeviceCode = diDeviceCode == null ? null : diDeviceCode.trim();
    }
    /**
     * èŽ·å–ç«™ç‚¹åç§°
     *
     * @return DI_Name - ç«™ç‚¹åç§°
     */
    public String getDiName() {
        return diName;
    }
    /**
     * è®¾ç½®ç«™ç‚¹åç§°
     *
     * @param diName ç«™ç‚¹åç§°
     */
    public void setDiName(String diName) {
        this.diName = diName == null ? null : diName.trim();
    }
    /**
     * èŽ·å–æ‰€å±žåœºæ™¯id
     *
     * @return DI_Scene_GUID - æ‰€å±žåœºæ™¯id
     */
    public String getDiSceneGuid() {
        return diSceneGuid;
    }
    /**
     * è®¾ç½®æ‰€å±žåœºæ™¯id
     *
     * @param diSceneGuid æ‰€å±žåœºæ™¯id
     */
    public void setDiSceneGuid(String diSceneGuid) {
        this.diSceneGuid = diSceneGuid == null ? null : diSceneGuid.trim();
    }
    /**
     * èŽ·å–åœºæ™¯ç±»åž‹id
     *
     * @return PI_Scene_Type_Id - åœºæ™¯ç±»åž‹id
     */
    public Byte getDiSceneTypeId() {
        return diSceneTypeId;
    }
    /**
     * è®¾ç½®åœºæ™¯ç±»åž‹id
     *
     * @param diSceneTypeId åœºæ™¯ç±»åž‹id
     */
    public void setDiSceneTypeId(Byte diSceneTypeId) {
        this.diSceneTypeId = diSceneTypeId;
    }
    /**
     * èŽ·å–è®¾å¤‡ç±»åž‹(0:扬尘监测;1:油烟监测;2:VOC监测)
     *
     * @return DI_Type_Id - è®¾å¤‡ç±»åž‹(0:扬尘监测;1:油烟监测;2:VOC监测)
     */
    public Byte getDiTypeId() {
        return diTypeId;
    }
    /**
     * è®¾ç½®è®¾å¤‡ç±»åž‹(0:扬尘监测;1:油烟监测;2:VOC监测)
     *
     * @param diTypeId è®¾å¤‡ç±»åž‹(0:扬尘监测;1:油烟监测;2:VOC监测)
     */
    public void setDiTypeId(Byte diTypeId) {
        this.diTypeId = diTypeId;
    }
    /**
     * èŽ·å–è®¾å¤‡å­ç±»åž‹
     *
     * @return DI_Subtype_Id - è®¾å¤‡å­ç±»åž‹
     */
    public Byte getDiSubtypeId() {
        return diSubtypeId;
    }
    /**
     * è®¾ç½®è®¾å¤‡å­ç±»åž‹
     *
     * @param diSubtypeId è®¾å¤‡å­ç±»åž‹
     */
    public void setDiSubtypeId(Byte diSubtypeId) {
        this.diSubtypeId = diSubtypeId;
    }
    /**
     * èŽ·å–è®¾å¤‡ä¾›åº”å•†
     *
     * @return DI_Supplier - è®¾å¤‡ä¾›åº”商
     */
    public String getDiSupplier() {
        return diSupplier;
    }
    /**
     * è®¾ç½®è®¾å¤‡ä¾›åº”商
     *
     * @param diSupplier è®¾å¤‡ä¾›åº”商
     */
    public void setDiSupplier(String diSupplier) {
        this.diSupplier = diSupplier == null ? null : diSupplier.trim();
    }
    /**
     * èŽ·å–è¿ç»´å•†
     *
     * @return DI_Maintainer - è¿ç»´å•†
     */
    public String getDiMaintainer() {
        return diMaintainer;
    }
    /**
     * è®¾ç½®è¿ç»´å•†
     *
     * @param diMaintainer è¿ç»´å•†
     */
    public void setDiMaintainer(String diMaintainer) {
        this.diMaintainer = diMaintainer == null ? null : diMaintainer.trim();
    }
    /**
     * èŽ·å–è¿ç»´é¢‘æ¬¡(0:每周一次;1:每月一次;2:每季度一次;3:半年一次)
     *
     * @return DI_Maintain_Frequency - è¿ç»´é¢‘次(0:每周一次;1:每月一次;2:每季度一次;3:半年一次)
     */
    public Byte getDiMaintainFrequency() {
        return diMaintainFrequency;
    }
    /**
     * è®¾ç½®è¿ç»´é¢‘次(0:每周一次;1:每月一次;2:每季度一次;3:半年一次)
     *
     * @param diMaintainFrequency è¿ç»´é¢‘次(0:每周一次;1:每月一次;2:每季度一次;3:半年一次)
     */
    public void setDiMaintainFrequency(Byte diMaintainFrequency) {
        this.diMaintainFrequency = diMaintainFrequency;
    }
    /**
     * èŽ·å–è¿ç»´äººå‘˜
     *
     * @return DI_Maintain_Staff - è¿ç»´äººå‘˜
     */
    public String getDiMaintainStaff() {
        return diMaintainStaff;
    }
    /**
     * è®¾ç½®è¿ç»´äººå‘˜
     *
     * @param diMaintainStaff è¿ç»´äººå‘˜
     */
    public void setDiMaintainStaff(String diMaintainStaff) {
        this.diMaintainStaff = diMaintainStaff == null ? null : diMaintainStaff.trim();
    }
    /**
     * èŽ·å–è¿ç»´è”ç³»æ–¹å¼
     *
     * @return DI_Maintain_Tel - è¿ç»´è”系方式
     */
    public String getDiMaintainTel() {
        return diMaintainTel;
    }
    /**
     * è®¾ç½®è¿ç»´è”系方式
     *
     * @param diMaintainTel è¿ç»´è”系方式
     */
    public void setDiMaintainTel(String diMaintainTel) {
        this.diMaintainTel = diMaintainTel == null ? null : diMaintainTel.trim();
    }
    /**
     * èŽ·å–è¿è¡ŒçŠ¶æ€(0:未联网;1:上线中;2:下线;3:拆除)
     *
     * @return DI_Running_Status - è¿è¡ŒçŠ¶æ€(0:未联网;1:上线中;2:下线;3:拆除)
     */
    public Byte getDiRunningStatus() {
        return diRunningStatus;
    }
    /**
     * è®¾ç½®è¿è¡ŒçŠ¶æ€(0:未联网;1:上线中;2:下线;3:拆除)
     *
     * @param diRunningStatus è¿è¡ŒçŠ¶æ€(0:未联网;1:上线中;2:下线;3:拆除)
     */
    public void setDiRunningStatus(Byte diRunningStatus) {
        this.diRunningStatus = diRunningStatus;
    }
    /**
     * èŽ·å–å“ç‰Œåž‹å·
     *
     * @return DI_Brand_Model - å“ç‰Œåž‹å·
     */
    public String getDiBrandModel() {
        return diBrandModel;
    }
    /**
     * è®¾ç½®å“ç‰Œåž‹å·
     *
     * @param diBrandModel å“ç‰Œåž‹å·
     */
    public void setDiBrandModel(String diBrandModel) {
        this.diBrandModel = diBrandModel == null ? null : diBrandModel.trim();
    }
    /**
     * èŽ·å–è®¾å¤‡å‚æ•°
     *
     * @return DI_Device_Param - è®¾å¤‡å‚æ•°
     */
    public String getDiDeviceParam() {
        return diDeviceParam;
    }
    /**
     * è®¾ç½®è®¾å¤‡å‚æ•°
     *
     * @param diDeviceParam è®¾å¤‡å‚æ•°
     */
    public void setDiDeviceParam(String diDeviceParam) {
        this.diDeviceParam = diDeviceParam == null ? null : diDeviceParam.trim();
    }
    /**
     * èŽ·å–æ‰€æœ‰æƒï¼ˆ0:è´­ä¹°;1:租赁)
     *
     * @return DI_Ownership - æ‰€æœ‰æƒï¼ˆ0:è´­ä¹°;1:租赁)
     */
    public Byte getDiOwnership() {
        return diOwnership;
    }
    /**
     * è®¾ç½®æ‰€æœ‰æƒï¼ˆ0:è´­ä¹°;1:租赁)
     *
     * @param diOwnership æ‰€æœ‰æƒï¼ˆ0:è´­ä¹°;1:租赁)
     */
    public void setDiOwnership(Byte diOwnership) {
        this.diOwnership = diOwnership;
    }
    /**
     * èŽ·å–æ ‡è¯†äºŒç»´ç 
     *
     * @return DI_QR_Code - æ ‡è¯†äºŒç»´ç 
     */
    public String getDiQrCode() {
        return diQrCode;
    }
    /**
     * è®¾ç½®æ ‡è¯†äºŒç»´ç 
     *
     * @param diQrCode æ ‡è¯†äºŒç»´ç 
     */
    public void setDiQrCode(String diQrCode) {
        this.diQrCode = diQrCode == null ? null : diQrCode.trim();
    }
    /**
     * èŽ·å–å…¶ä»–ç¬¬ä¸‰æ–¹æˆ–è®¾å¤‡è‡ªå¸¦äºŒç»´ç 
     *
     * @return DI_Other_QR_Code - å…¶ä»–第三方或设备自带二维码
     */
    public String getDiOtherQrCode() {
        return diOtherQrCode;
    }
    /**
     * è®¾ç½®å…¶ä»–第三方或设备自带二维码
     *
     * @param diOtherQrCode å…¶ä»–第三方或设备自带二维码
     */
    public void setDiOtherQrCode(String diOtherQrCode) {
        this.diOtherQrCode = diOtherQrCode == null ? null : diOtherQrCode.trim();
    }
    /**
     * @return DI_Create_Time
     */
    public Date getDiCreateTime() {
        return diCreateTime;
    }
    /**
     * @param diCreateTime
     */
    public void setDiCreateTime(Date diCreateTime) {
        this.diCreateTime = diCreateTime;
    }
    /**
     * @return DI_Update_Time
     */
    public Date getDiUpdateTime() {
        return diUpdateTime;
    }
    /**
     * @param diUpdateTime
     */
    public void setDiUpdateTime(Date diUpdateTime) {
        this.diUpdateTime = diUpdateTime;
    }
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/ProductionDeviceInfo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,436 @@
package cn.flightfeather.supervision.domain.ds1.entity;
import java.util.Date;
import javax.persistence.*;
@Table(name = "di_t_production_device_info")
public class ProductionDeviceInfo implements BaseDevice {
    @Id
    @Column(name = "WI_ID")
    private Integer wiId;
    /**
     * ç”Ÿäº§è®¾å¤‡ç¼–号
     */
    @Column(name = "WI_Device_Code")
    private String wiDeviceCode;
    /**
     * ä½œä¸šè®¾æ–½åç§°
     */
    @Column(name = "WI_Name")
    private String wiName;
    /**
     * æ‰€å±žåœºæ™¯id
     */
    @Column(name = "WI_Scene_GUID")
    private String wiSceneGuid;
    /**
     * åœºæ™¯ç±»åž‹id
     */
    @Column(name = "WI_Scene_Type_Id")
    private Byte wiSceneTypeId;
    /**
     * è®¾å¤‡ç±»åž‹id
     */
    @Column(name = "WI_Type_Id")
    private Byte wiTypeId;
    /**
     * è®¾å¤‡å­ç±»åž‹
     */
    @Column(name = "WI_Subtype_Id")
    private Byte wiSubtypeId;
    /**
     * è®¾å¤‡ä¾›åº”商
     */
    @Column(name = "WI_Supplier")
    private String wiSupplier;
    /**
     * æœåŠ¡å•ä½
     */
    @Column(name = "WI_Servicer")
    private String wiServicer;
    /**
     * è¿ç»´äººå‘˜
     */
    @Column(name = "WI_Maintain_Staff")
    private String wiMaintainStaff;
    /**
     * è¿ç»´è”系方式
     */
    @Column(name = "WI_Maintain_Tel")
    private String wiMaintainTel;
    /**
     * è¿è¡ŒçŠ¶æ€(0:未联网;1:上线中;2:下线;3:拆除)
     */
    @Column(name = "WI_Running_Status")
    private Byte wiRunningStatus;
    /**
     * å“ç‰Œåž‹å·
     */
    @Column(name = "WI_Brand_Model")
    private String wiBrandModel;
    /**
     * è®¾å¤‡å‚æ•°
     */
    @Column(name = "WI_Device_Param")
    private String wiDeviceParam;
    /**
     * æ‰€æœ‰æƒï¼ˆ0:è´­ä¹°;1:租赁)
     */
    @Column(name = "WI_Ownership")
    private Byte wiOwnership;
    @Column(name = "WI_QR_Code")
    private String wiQrCode;
    /**
     * å…¶ä»–第三方或设备自带二维码
     */
    @Column(name = "WI_Other_QR_Code")
    private String wiOtherQrCode;
    @Column(name = "WI_Create_Time")
    private Date wiCreateTime;
    @Column(name = "WI_Update_Time")
    private Date wiUpdateTime;
    /**
     * @return WI_ID
     */
    public Integer getWiId() {
        return wiId;
    }
    /**
     * @param wiId
     */
    public void setWiId(Integer wiId) {
        this.wiId = wiId;
    }
    /**
     * èŽ·å–ç”Ÿäº§è®¾å¤‡ç¼–å·
     *
     * @return WI_Device_Code - ç”Ÿäº§è®¾å¤‡ç¼–号
     */
    public String getWiDeviceCode() {
        return wiDeviceCode;
    }
    /**
     * è®¾ç½®ç”Ÿäº§è®¾å¤‡ç¼–号
     *
     * @param wiDeviceCode ç”Ÿäº§è®¾å¤‡ç¼–号
     */
    public void setWiDeviceCode(String wiDeviceCode) {
        this.wiDeviceCode = wiDeviceCode == null ? null : wiDeviceCode.trim();
    }
    /**
     * èŽ·å–ä½œä¸šè®¾æ–½åç§°
     *
     * @return WI_Name - ä½œä¸šè®¾æ–½åç§°
     */
    public String getWiName() {
        return wiName;
    }
    /**
     * è®¾ç½®ä½œä¸šè®¾æ–½åç§°
     *
     * @param wiName ä½œä¸šè®¾æ–½åç§°
     */
    public void setWiName(String wiName) {
        this.wiName = wiName == null ? null : wiName.trim();
    }
    /**
     * èŽ·å–æ‰€å±žåœºæ™¯id
     *
     * @return WI_Scene_GUID - æ‰€å±žåœºæ™¯id
     */
    public String getWiSceneGuid() {
        return wiSceneGuid;
    }
    /**
     * è®¾ç½®æ‰€å±žåœºæ™¯id
     *
     * @param wiSceneGuid æ‰€å±žåœºæ™¯id
     */
    public void setWiSceneGuid(String wiSceneGuid) {
        this.wiSceneGuid = wiSceneGuid == null ? null : wiSceneGuid.trim();
    }
    /**
     * èŽ·å–åœºæ™¯ç±»åž‹id
     *
     * @return WI_Scene_Type_Id - åœºæ™¯ç±»åž‹id
     */
    public Byte getWiSceneTypeId() {
        return wiSceneTypeId;
    }
    /**
     * è®¾ç½®åœºæ™¯ç±»åž‹id
     *
     * @param wiSceneTypeId åœºæ™¯ç±»åž‹id
     */
    public void setWiSceneTypeId(Byte wiSceneTypeId) {
        this.wiSceneTypeId = wiSceneTypeId;
    }
    /**
     * èŽ·å–è®¾å¤‡ç±»åž‹id
     *
     * @return WI_Type_Id - è®¾å¤‡ç±»åž‹id
     */
    public Byte getWiTypeId() {
        return wiTypeId;
    }
    /**
     * è®¾ç½®è®¾å¤‡ç±»åž‹id
     *
     * @param wiTypeId è®¾å¤‡ç±»åž‹id
     */
    public void setWiTypeId(Byte wiTypeId) {
        this.wiTypeId = wiTypeId;
    }
    /**
     * èŽ·å–è®¾å¤‡å­ç±»åž‹
     *
     * @return WI_Subtype_Id - è®¾å¤‡å­ç±»åž‹
     */
    public Byte getWiSubtypeId() {
        return wiSubtypeId;
    }
    /**
     * è®¾ç½®è®¾å¤‡å­ç±»åž‹
     *
     * @param wiSubtypeId è®¾å¤‡å­ç±»åž‹
     */
    public void setWiSubtypeId(Byte wiSubtypeId) {
        this.wiSubtypeId = wiSubtypeId;
    }
    /**
     * èŽ·å–è®¾å¤‡ä¾›åº”å•†
     *
     * @return WI_Supplier - è®¾å¤‡ä¾›åº”商
     */
    public String getWiSupplier() {
        return wiSupplier;
    }
    /**
     * è®¾ç½®è®¾å¤‡ä¾›åº”商
     *
     * @param wiSupplier è®¾å¤‡ä¾›åº”商
     */
    public void setWiSupplier(String wiSupplier) {
        this.wiSupplier = wiSupplier == null ? null : wiSupplier.trim();
    }
    /**
     * èŽ·å–æœåŠ¡å•ä½
     *
     * @return WI_Servicer - æœåŠ¡å•ä½
     */
    public String getWiServicer() {
        return wiServicer;
    }
    /**
     * è®¾ç½®æœåŠ¡å•ä½
     *
     * @param wiServicer æœåŠ¡å•ä½
     */
    public void setWiServicer(String wiServicer) {
        this.wiServicer = wiServicer == null ? null : wiServicer.trim();
    }
    /**
     * èŽ·å–è¿ç»´äººå‘˜
     *
     * @return WI_Maintain_Staff - è¿ç»´äººå‘˜
     */
    public String getWiMaintainStaff() {
        return wiMaintainStaff;
    }
    /**
     * è®¾ç½®è¿ç»´äººå‘˜
     *
     * @param wiMaintainStaff è¿ç»´äººå‘˜
     */
    public void setWiMaintainStaff(String wiMaintainStaff) {
        this.wiMaintainStaff = wiMaintainStaff == null ? null : wiMaintainStaff.trim();
    }
    /**
     * èŽ·å–è¿ç»´è”ç³»æ–¹å¼
     *
     * @return WI_Maintain_Tel - è¿ç»´è”系方式
     */
    public String getWiMaintainTel() {
        return wiMaintainTel;
    }
    /**
     * è®¾ç½®è¿ç»´è”系方式
     *
     * @param wiMaintainTel è¿ç»´è”系方式
     */
    public void setWiMaintainTel(String wiMaintainTel) {
        this.wiMaintainTel = wiMaintainTel == null ? null : wiMaintainTel.trim();
    }
    /**
     * èŽ·å–è¿è¡ŒçŠ¶æ€(0:未联网;1:上线中;2:下线;3:拆除)
     *
     * @return WI_Running_Status - è¿è¡ŒçŠ¶æ€(0:未联网;1:上线中;2:下线;3:拆除)
     */
    public Byte getWiRunningStatus() {
        return wiRunningStatus;
    }
    /**
     * è®¾ç½®è¿è¡ŒçŠ¶æ€(0:未联网;1:上线中;2:下线;3:拆除)
     *
     * @param wiRunningStatus è¿è¡ŒçŠ¶æ€(0:未联网;1:上线中;2:下线;3:拆除)
     */
    public void setWiRunningStatus(Byte wiRunningStatus) {
        this.wiRunningStatus = wiRunningStatus;
    }
    /**
     * èŽ·å–å“ç‰Œåž‹å·
     *
     * @return WI_Brand_Model - å“ç‰Œåž‹å·
     */
    public String getWiBrandModel() {
        return wiBrandModel;
    }
    /**
     * è®¾ç½®å“ç‰Œåž‹å·
     *
     * @param wiBrandModel å“ç‰Œåž‹å·
     */
    public void setWiBrandModel(String wiBrandModel) {
        this.wiBrandModel = wiBrandModel == null ? null : wiBrandModel.trim();
    }
    /**
     * èŽ·å–è®¾å¤‡å‚æ•°
     *
     * @return WI_Device_Param - è®¾å¤‡å‚æ•°
     */
    public String getWiDeviceParam() {
        return wiDeviceParam;
    }
    /**
     * è®¾ç½®è®¾å¤‡å‚æ•°
     *
     * @param wiDeviceParam è®¾å¤‡å‚æ•°
     */
    public void setWiDeviceParam(String wiDeviceParam) {
        this.wiDeviceParam = wiDeviceParam == null ? null : wiDeviceParam.trim();
    }
    /**
     * èŽ·å–æ‰€æœ‰æƒï¼ˆ0:è´­ä¹°;1:租赁)
     *
     * @return WI_Ownership - æ‰€æœ‰æƒï¼ˆ0:è´­ä¹°;1:租赁)
     */
    public Byte getWiOwnership() {
        return wiOwnership;
    }
    /**
     * è®¾ç½®æ‰€æœ‰æƒï¼ˆ0:è´­ä¹°;1:租赁)
     *
     * @param wiOwnership æ‰€æœ‰æƒï¼ˆ0:è´­ä¹°;1:租赁)
     */
    public void setWiOwnership(Byte wiOwnership) {
        this.wiOwnership = wiOwnership;
    }
    /**
     * @return WI_QR_Code
     */
    public String getWiQrCode() {
        return wiQrCode;
    }
    /**
     * @param wiQrCode
     */
    public void setWiQrCode(String wiQrCode) {
        this.wiQrCode = wiQrCode == null ? null : wiQrCode.trim();
    }
    /**
     * èŽ·å–å…¶ä»–ç¬¬ä¸‰æ–¹æˆ–è®¾å¤‡è‡ªå¸¦äºŒç»´ç 
     *
     * @return WI_Other_QR_Code - å…¶ä»–第三方或设备自带二维码
     */
    public String getWiOtherQrCode() {
        return wiOtherQrCode;
    }
    /**
     * è®¾ç½®å…¶ä»–第三方或设备自带二维码
     *
     * @param wiOtherQrCode å…¶ä»–第三方或设备自带二维码
     */
    public void setWiOtherQrCode(String wiOtherQrCode) {
        this.wiOtherQrCode = wiOtherQrCode == null ? null : wiOtherQrCode.trim();
    }
    /**
     * @return WI_Create_Time
     */
    public Date getWiCreateTime() {
        return wiCreateTime;
    }
    /**
     * @param wiCreateTime
     */
    public void setWiCreateTime(Date wiCreateTime) {
        this.wiCreateTime = wiCreateTime;
    }
    /**
     * @return WI_Update_Time
     */
    public Date getWiUpdateTime() {
        return wiUpdateTime;
    }
    /**
     * @param wiUpdateTime
     */
    public void setWiUpdateTime(Date wiUpdateTime) {
        this.wiUpdateTime = wiUpdateTime;
    }
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/TreatmentDeviceInfo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,460 @@
package cn.flightfeather.supervision.domain.ds1.entity;
import java.util.Date;
import javax.persistence.*;
@Table(name = "di_t_treatment_device_info")
public class TreatmentDeviceInfo implements BaseDevice {
    @Id
    @Column(name = "PI_ID")
    private Integer piId;
    /**
     * æ²»ç†è®¾å¤‡ç¼–号
     */
    @Column(name = "PI_Device_Code")
    private String piDeviceCode;
    /**
     * å‡€åŒ–设施名称
     */
    @Column(name = "PI_Name")
    private String piName;
    /**
     * æ‰€å±žåœºæ™¯id
     */
    @Column(name = "PI_Scene_GUID")
    private String piSceneGuid;
    /**
     * åœºæ™¯ç±»åž‹id
     */
    @Column(name = "PI_Scene_Type_Id")
    private Byte piSceneTypeId;
    /**
     * è®¾æ–½ç±»åž‹id,根据场景类型不同选项不同
     */
    @Column(name = "PI_Type_Id")
    private Byte piTypeId;
    /**
     * è®¾å¤‡å­ç±»åž‹
     */
    @Column(name = "PI_Subtype_Id")
    private Byte piSubtypeId;
    /**
     * è®¾å¤‡ä¾›åº”商
     */
    @Column(name = "PI_Supplier")
    private String piSupplier;
    /**
     * è¿ç»´å•†
     */
    @Column(name = "PI_Maintainer")
    private String piMaintainer;
    /**
     * è¿ç»´é¢‘次(0:每周一次;1:每月一次;2:每季度一次;3:半年一次)
     */
    @Column(name = "PI_Maintain_Frequency")
    private Byte piMaintainFrequency;
    /**
     * è¿ç»´äººå‘˜
     */
    @Column(name = "PI_Maintain_Staff")
    private String piMaintainStaff;
    /**
     * è¿ç»´è”系方式
     */
    @Column(name = "PI_Maintain_Tel")
    private String piMaintainTel;
    /**
     * è¿è¡ŒçŠ¶æ€(0:未联网;1:上线中;2:下线;3:拆除)
     */
    @Column(name = "PI_Running_Status")
    private Byte piRunningStatus;
    /**
     * å“ç‰Œåž‹å·
     */
    @Column(name = "PI_Brand_Model")
    private String piBrandModel;
    /**
     * è®¾å¤‡å‚æ•°
     */
    @Column(name = "PI_Device_Param")
    private String piDeviceParam;
    /**
     * æ‰€æœ‰æƒï¼ˆ0:è´­ä¹°;1:租赁)
     */
    @Column(name = "PI_Ownership")
    private Byte piOwnership;
    @Column(name = "PI_QR_Code")
    private String piQrCode;
    /**
     * å…¶ä»–第三方或设备自带二维码
     */
    @Column(name = "PI_Other_QR_Code")
    private String piOtherQrCode;
    @Column(name = "PI_Create_Time")
    private Date piCreateTime;
    @Column(name = "PI_Update_Time")
    private Date piUpdateTime;
    /**
     * @return PI_ID
     */
    public Integer getPiId() {
        return piId;
    }
    /**
     * @param piId
     */
    public void setPiId(Integer piId) {
        this.piId = piId;
    }
    /**
     * èŽ·å–æ²»ç†è®¾å¤‡ç¼–å·
     *
     * @return PI_Device_Code - æ²»ç†è®¾å¤‡ç¼–号
     */
    public String getPiDeviceCode() {
        return piDeviceCode;
    }
    /**
     * è®¾ç½®æ²»ç†è®¾å¤‡ç¼–号
     *
     * @param piDeviceCode æ²»ç†è®¾å¤‡ç¼–号
     */
    public void setPiDeviceCode(String piDeviceCode) {
        this.piDeviceCode = piDeviceCode == null ? null : piDeviceCode.trim();
    }
    /**
     * èŽ·å–å‡€åŒ–è®¾æ–½åç§°
     *
     * @return PI_Name - å‡€åŒ–设施名称
     */
    public String getPiName() {
        return piName;
    }
    /**
     * è®¾ç½®å‡€åŒ–设施名称
     *
     * @param piName å‡€åŒ–设施名称
     */
    public void setPiName(String piName) {
        this.piName = piName == null ? null : piName.trim();
    }
    /**
     * èŽ·å–æ‰€å±žåœºæ™¯id
     *
     * @return PI_Scene_GUID - æ‰€å±žåœºæ™¯id
     */
    public String getPiSceneGuid() {
        return piSceneGuid;
    }
    /**
     * è®¾ç½®æ‰€å±žåœºæ™¯id
     *
     * @param piSceneGuid æ‰€å±žåœºæ™¯id
     */
    public void setPiSceneGuid(String piSceneGuid) {
        this.piSceneGuid = piSceneGuid == null ? null : piSceneGuid.trim();
    }
    /**
     * èŽ·å–åœºæ™¯ç±»åž‹id
     *
     * @return PI_Scene_Type_Id - åœºæ™¯ç±»åž‹id
     */
    public Byte getPiSceneTypeId() {
        return piSceneTypeId;
    }
    /**
     * è®¾ç½®åœºæ™¯ç±»åž‹id
     *
     * @param piSceneTypeId åœºæ™¯ç±»åž‹id
     */
    public void setPiSceneTypeId(Byte piSceneTypeId) {
        this.piSceneTypeId = piSceneTypeId;
    }
    /**
     * èŽ·å–è®¾æ–½ç±»åž‹id,根据场景类型不同选项不同
     *
     * @return PI_Type_Id - è®¾æ–½ç±»åž‹id,根据场景类型不同选项不同
     */
    public Byte getPiTypeId() {
        return piTypeId;
    }
    /**
     * è®¾ç½®è®¾æ–½ç±»åž‹id,根据场景类型不同选项不同
     *
     * @param piTypeId è®¾æ–½ç±»åž‹id,根据场景类型不同选项不同
     */
    public void setPiTypeId(Byte piTypeId) {
        this.piTypeId = piTypeId;
    }
    /**
     * èŽ·å–è®¾å¤‡å­ç±»åž‹
     *
     * @return PI_Subtype_Id - è®¾å¤‡å­ç±»åž‹
     */
    public Byte getPiSubtypeId() {
        return piSubtypeId;
    }
    /**
     * è®¾ç½®è®¾å¤‡å­ç±»åž‹
     *
     * @param piSubtypeId è®¾å¤‡å­ç±»åž‹
     */
    public void setPiSubtypeId(Byte piSubtypeId) {
        this.piSubtypeId = piSubtypeId;
    }
    /**
     * èŽ·å–è®¾å¤‡ä¾›åº”å•†
     *
     * @return PI_Supplier - è®¾å¤‡ä¾›åº”商
     */
    public String getPiSupplier() {
        return piSupplier;
    }
    /**
     * è®¾ç½®è®¾å¤‡ä¾›åº”商
     *
     * @param piSupplier è®¾å¤‡ä¾›åº”商
     */
    public void setPiSupplier(String piSupplier) {
        this.piSupplier = piSupplier == null ? null : piSupplier.trim();
    }
    /**
     * èŽ·å–è¿ç»´å•†
     *
     * @return PI_Maintainer - è¿ç»´å•†
     */
    public String getPiMaintainer() {
        return piMaintainer;
    }
    /**
     * è®¾ç½®è¿ç»´å•†
     *
     * @param piMaintainer è¿ç»´å•†
     */
    public void setPiMaintainer(String piMaintainer) {
        this.piMaintainer = piMaintainer == null ? null : piMaintainer.trim();
    }
    /**
     * èŽ·å–è¿ç»´é¢‘æ¬¡(0:每周一次;1:每月一次;2:每季度一次;3:半年一次)
     *
     * @return PI_Maintain_Frequency - è¿ç»´é¢‘次(0:每周一次;1:每月一次;2:每季度一次;3:半年一次)
     */
    public Byte getPiMaintainFrequency() {
        return piMaintainFrequency;
    }
    /**
     * è®¾ç½®è¿ç»´é¢‘次(0:每周一次;1:每月一次;2:每季度一次;3:半年一次)
     *
     * @param piMaintainFrequency è¿ç»´é¢‘次(0:每周一次;1:每月一次;2:每季度一次;3:半年一次)
     */
    public void setPiMaintainFrequency(Byte piMaintainFrequency) {
        this.piMaintainFrequency = piMaintainFrequency;
    }
    /**
     * èŽ·å–è¿ç»´äººå‘˜
     *
     * @return PI_Maintain_Staff - è¿ç»´äººå‘˜
     */
    public String getPiMaintainStaff() {
        return piMaintainStaff;
    }
    /**
     * è®¾ç½®è¿ç»´äººå‘˜
     *
     * @param piMaintainStaff è¿ç»´äººå‘˜
     */
    public void setPiMaintainStaff(String piMaintainStaff) {
        this.piMaintainStaff = piMaintainStaff == null ? null : piMaintainStaff.trim();
    }
    /**
     * èŽ·å–è¿ç»´è”ç³»æ–¹å¼
     *
     * @return PI_Maintain_Tel - è¿ç»´è”系方式
     */
    public String getPiMaintainTel() {
        return piMaintainTel;
    }
    /**
     * è®¾ç½®è¿ç»´è”系方式
     *
     * @param piMaintainTel è¿ç»´è”系方式
     */
    public void setPiMaintainTel(String piMaintainTel) {
        this.piMaintainTel = piMaintainTel == null ? null : piMaintainTel.trim();
    }
    /**
     * èŽ·å–è¿è¡ŒçŠ¶æ€(0:未联网;1:上线中;2:下线;3:拆除)
     *
     * @return PI_Running_Status - è¿è¡ŒçŠ¶æ€(0:未联网;1:上线中;2:下线;3:拆除)
     */
    public Byte getPiRunningStatus() {
        return piRunningStatus;
    }
    /**
     * è®¾ç½®è¿è¡ŒçŠ¶æ€(0:未联网;1:上线中;2:下线;3:拆除)
     *
     * @param piRunningStatus è¿è¡ŒçŠ¶æ€(0:未联网;1:上线中;2:下线;3:拆除)
     */
    public void setPiRunningStatus(Byte piRunningStatus) {
        this.piRunningStatus = piRunningStatus;
    }
    /**
     * èŽ·å–å“ç‰Œåž‹å·
     *
     * @return PI_Brand_Model - å“ç‰Œåž‹å·
     */
    public String getPiBrandModel() {
        return piBrandModel;
    }
    /**
     * è®¾ç½®å“ç‰Œåž‹å·
     *
     * @param piBrandModel å“ç‰Œåž‹å·
     */
    public void setPiBrandModel(String piBrandModel) {
        this.piBrandModel = piBrandModel == null ? null : piBrandModel.trim();
    }
    /**
     * èŽ·å–è®¾å¤‡å‚æ•°
     *
     * @return PI_Device_Param - è®¾å¤‡å‚æ•°
     */
    public String getPiDeviceParam() {
        return piDeviceParam;
    }
    /**
     * è®¾ç½®è®¾å¤‡å‚æ•°
     *
     * @param piDeviceParam è®¾å¤‡å‚æ•°
     */
    public void setPiDeviceParam(String piDeviceParam) {
        this.piDeviceParam = piDeviceParam == null ? null : piDeviceParam.trim();
    }
    /**
     * èŽ·å–æ‰€æœ‰æƒï¼ˆ0:è´­ä¹°;1:租赁)
     *
     * @return PI_Ownership - æ‰€æœ‰æƒï¼ˆ0:è´­ä¹°;1:租赁)
     */
    public Byte getPiOwnership() {
        return piOwnership;
    }
    /**
     * è®¾ç½®æ‰€æœ‰æƒï¼ˆ0:è´­ä¹°;1:租赁)
     *
     * @param piOwnership æ‰€æœ‰æƒï¼ˆ0:è´­ä¹°;1:租赁)
     */
    public void setPiOwnership(Byte piOwnership) {
        this.piOwnership = piOwnership;
    }
    /**
     * @return PI_QR_Code
     */
    public String getPiQrCode() {
        return piQrCode;
    }
    /**
     * @param piQrCode
     */
    public void setPiQrCode(String piQrCode) {
        this.piQrCode = piQrCode == null ? null : piQrCode.trim();
    }
    /**
     * èŽ·å–å…¶ä»–ç¬¬ä¸‰æ–¹æˆ–è®¾å¤‡è‡ªå¸¦äºŒç»´ç 
     *
     * @return PI_Other_QR_Code - å…¶ä»–第三方或设备自带二维码
     */
    public String getPiOtherQrCode() {
        return piOtherQrCode;
    }
    /**
     * è®¾ç½®å…¶ä»–第三方或设备自带二维码
     *
     * @param piOtherQrCode å…¶ä»–第三方或设备自带二维码
     */
    public void setPiOtherQrCode(String piOtherQrCode) {
        this.piOtherQrCode = piOtherQrCode == null ? null : piOtherQrCode.trim();
    }
    /**
     * @return PI_Create_Time
     */
    public Date getPiCreateTime() {
        return piCreateTime;
    }
    /**
     * @param piCreateTime
     */
    public void setPiCreateTime(Date piCreateTime) {
        this.piCreateTime = piCreateTime;
    }
    /**
     * @return PI_Update_Time
     */
    public Date getPiUpdateTime() {
        return piUpdateTime;
    }
    /**
     * @param piUpdateTime
     */
    public void setPiUpdateTime(Date piUpdateTime) {
        this.piUpdateTime = piUpdateTime;
    }
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DeviceInfoMapper.java
ÎļþÒÑɾ³ý
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DeviceLocationMapper.java
ÎļþÒÑɾ³ý
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DeviceStatusMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
package cn.flightfeather.supervision.domain.ds1.mapper;
import cn.flightfeather.supervision.domain.ds1.entity.DeviceStatus;
import cn.flightfeather.supervision.domain.util.MyMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface DeviceStatusMapper extends MyMapper<DeviceStatus> {
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/MonitorDeviceInfoMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
package cn.flightfeather.supervision.domain.ds1.mapper;
import cn.flightfeather.supervision.domain.ds1.entity.MonitorDeviceInfo;
import cn.flightfeather.supervision.domain.util.MyMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface MonitorDeviceInfoMapper extends MyMapper<MonitorDeviceInfo> {
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/ProductionDeviceInfoMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
package cn.flightfeather.supervision.domain.ds1.mapper;
import cn.flightfeather.supervision.domain.ds1.entity.ProductionDeviceInfo;
import cn.flightfeather.supervision.domain.util.MyMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface ProductionDeviceInfoMapper extends MyMapper<ProductionDeviceInfo> {
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/TreatmentDeviceInfoMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
package cn.flightfeather.supervision.domain.ds1.mapper;
import cn.flightfeather.supervision.domain.ds1.entity.TreatmentDeviceInfo;
import cn.flightfeather.supervision.domain.util.MyMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface TreatmentDeviceInfoMapper extends MyMapper<TreatmentDeviceInfo> {
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/DeviceRep.kt
@@ -1,9 +1,11 @@
package cn.flightfeather.supervision.domain.ds1.repository
import cn.flightfeather.supervision.domain.ds1.entity.DeviceInfo
import cn.flightfeather.supervision.domain.ds1.entity.DeviceLocation
import cn.flightfeather.supervision.domain.ds1.mapper.DeviceInfoMapper
import cn.flightfeather.supervision.domain.ds1.mapper.DeviceLocationMapper
import cn.flightfeather.supervision.common.utils.Constant
import cn.flightfeather.supervision.domain.ds1.entity.*
import cn.flightfeather.supervision.domain.ds1.mapper.DeviceStatusMapper
import cn.flightfeather.supervision.domain.ds1.mapper.MonitorDeviceInfoMapper
import cn.flightfeather.supervision.domain.ds1.mapper.TreatmentDeviceInfoMapper
import cn.flightfeather.supervision.domain.ds1.mapper.ProductionDeviceInfoMapper
import org.springframework.stereotype.Repository
/**
@@ -13,48 +15,97 @@
 */
@Repository
class DeviceRep(
    private val deviceInfoMapper: DeviceInfoMapper,
    private val deviceLocationMapper: DeviceLocationMapper,
    private val monitorDeviceInfoMapper: MonitorDeviceInfoMapper,
    private val treatmentDeviceInfoMapper: TreatmentDeviceInfoMapper,
    private val productionDeviceInfoMapper: ProductionDeviceInfoMapper,
    private val deviceStatusMapper: DeviceStatusMapper,
) {
    /***--DeviceInfo--***/
    fun findDevice(sceneId: String): DeviceInfo? {
        return deviceInfoMapper.selectByPrimaryKey(sceneId)
    /**
     * æŸ¥è¯¢è®¾å¤‡ä¿¡æ¯
     * @param deviceId è®¾å¤‡ä¸»é”®id
     * @param type è®¾å¤‡ç±»åž‹
     * @return è®¾å¤‡ä¿¡æ¯
     */
    fun findDevice(deviceId: Int, type: Constant.DeviceType): BaseDevice? {
        return when (type) {
            Constant.DeviceType.MONITOR_DEVICE -> monitorDeviceInfoMapper.selectByPrimaryKey(deviceId)
            Constant.DeviceType.TREATMENT_DEVICE -> treatmentDeviceInfoMapper.selectByPrimaryKey(deviceId)
            Constant.DeviceType.PRODUCTION_DEVICE -> productionDeviceInfoMapper.selectByPrimaryKey(deviceId)
        }
    }
    fun findDeviceList(sceneId: String): List<DeviceInfo> {
        return findDeviceList(DeviceInfo().apply { diSceneGuid = sceneId })
    /**
     * æŸ¥è¯¢è®¾å¤‡ä¿¡æ¯
     * @param sceneId åœºæ™¯ä¸»é”®id
     * @param type è®¾å¤‡ç±»åž‹
     * @return è®¾å¤‡ä¿¡æ¯
     */
    fun findDeviceList(sceneId: String, type: Constant.DeviceType): List<BaseDevice> {
        return when (type) {
            Constant.DeviceType.MONITOR_DEVICE -> findDeviceList(MonitorDeviceInfo().apply { diSceneGuid = sceneId })
            Constant.DeviceType.TREATMENT_DEVICE -> findDeviceList(TreatmentDeviceInfo()
                .apply { piSceneGuid = sceneId })
            Constant.DeviceType.PRODUCTION_DEVICE -> findDeviceList(ProductionDeviceInfo()
                .apply { wiSceneGuid = sceneId })
        }
    }
    fun findDeviceList(monitorDeviceInfo: MonitorDeviceInfo): List<MonitorDeviceInfo> {
        return monitorDeviceInfoMapper.select(monitorDeviceInfo)
    }
    fun findDeviceList(treatmentDeviceInfo: TreatmentDeviceInfo): List<TreatmentDeviceInfo> {
        return treatmentDeviceInfoMapper.select(treatmentDeviceInfo)
    }
    fun findDeviceList(productionDeviceInfo: ProductionDeviceInfo): List<ProductionDeviceInfo> {
        return productionDeviceInfoMapper.select(productionDeviceInfo)
    }
    fun findDeviceList(deviceInfo: DeviceInfo): List<DeviceInfo> {
        return deviceInfoMapper.select(deviceInfo)
    /**
     * æ’入设备信息
     */
    fun insertDevice(monitorDeviceInfo: MonitorDeviceInfo): Int {
        return monitorDeviceInfoMapper.insert(monitorDeviceInfo)
    }
    fun insertDevice(treatmentDeviceInfo: TreatmentDeviceInfo): Int {
        return treatmentDeviceInfoMapper.insert(treatmentDeviceInfo)
    }
    fun insertDevice(productionDeviceInfo: ProductionDeviceInfo): Int {
        return productionDeviceInfoMapper.insert(productionDeviceInfo)
    }
    fun insertDevice(deviceInfo: DeviceInfo): Int {
        return deviceInfoMapper.insert(deviceInfo)
    /**
     * æ›´æ–°è®¾å¤‡ä¿¡æ¯
     */
    fun updateDevice(monitorDeviceInfo: MonitorDeviceInfo): Int {
        return monitorDeviceInfoMapper.updateByPrimaryKey(monitorDeviceInfo)
    }
    fun updateDevice(treatmentDeviceInfo: TreatmentDeviceInfo): Int {
        return treatmentDeviceInfoMapper.updateByPrimaryKey(treatmentDeviceInfo)
    }
    fun updateDevice(productionDeviceInfo: ProductionDeviceInfo): Int {
        return productionDeviceInfoMapper.updateByPrimaryKey(productionDeviceInfo)
    }
    fun updateDevice(deviceInfo: DeviceInfo): Int {
        return deviceInfoMapper.updateByPrimaryKey(deviceInfo)
    /***--DeviceStatus--***/
    fun findStatus(id: Int): DeviceStatus? {
        return deviceStatusMapper.selectByPrimaryKey(id)
    }
    /***--DeviceLocation--***/
    fun findLocation(id: Int): DeviceLocation? {
        return deviceLocationMapper.selectByPrimaryKey(id)
    fun findStatuses(deviceId: Int): List<DeviceStatus> {
        return findStatuses(DeviceStatus()
            .apply { dlDeviceId = deviceId })
    }
    fun findLocations(deviceId: Int): List<DeviceLocation> {
        return findLocations(DeviceLocation().apply { dlDeviceId = deviceId })
    fun findStatuses(location: DeviceStatus): List<DeviceStatus> {
        return deviceStatusMapper.select(location)
    }
    fun findLocations(location: DeviceLocation): List<DeviceLocation> {
        return deviceLocationMapper.select(location)
    fun insertStatus(location: DeviceStatus): Int {
        return deviceStatusMapper.insert(location)
    }
    fun insertLocation(location: DeviceLocation): Int {
        return deviceLocationMapper.insert(location)
    }
    fun updateLocation(location: DeviceLocation): Int {
        return deviceLocationMapper.updateByPrimaryKey(location)
    fun updateStatus(location: DeviceStatus): Int {
        return deviceStatusMapper.updateByPrimaryKey(location)
    }
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/DeviceService.kt
@@ -1,24 +1,34 @@
package cn.flightfeather.supervision.lightshare.service
import cn.flightfeather.supervision.domain.ds1.entity.DeviceInfo
import cn.flightfeather.supervision.domain.ds1.entity.DeviceLocation
import cn.flightfeather.supervision.common.utils.Constant
import cn.flightfeather.supervision.domain.ds1.entity.BaseDevice
import cn.flightfeather.supervision.domain.ds1.entity.DeviceStatus
import org.springframework.web.multipart.MultipartFile
interface DeviceService {
    fun findDevices(sceneId: String): List<DeviceInfo>
    /**
     * æŸ¥è¯¢åœºæ™¯è®¾å¤‡
     * @param sceneId åœºæ™¯id
     * @param deviceType è®¾å¤‡ç±»åž‹
     * @return è®¾å¤‡ä¿¡æ¯
     */
    fun findDevices(sceneId: String, deviceType: Constant.DeviceType): List<BaseDevice>
    /**
     * æ–°å¢žè®¾å¤‡ä¿¡æ¯
     */
    fun insertDevice(deviceInfo: DeviceInfo): Int
    fun insertDevice(deviceInfo: String, deviceType: Constant.DeviceType): Int
    /**
     * æ›´æ–°è®¾å¤‡ä¿¡æ¯
     */
    fun updateDevice(deviceInfo: DeviceInfo): Int
    fun updateDevice(deviceInfo: String, deviceType: Constant.DeviceType): Int
    fun findDeviceLocations(deviceId: Int): List<DeviceLocation>
    /**
     * æŸ¥è¯¢è®¾å¤‡çŠ¶æ€å˜æ›´ä¿¡æ¯
     */
    fun findDeviceLocations(sceneId: String?, deviceId: Int, deviceType: Constant.DeviceType): List<DeviceStatus>
    /**
     *新增设备位置变更信息
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/UserMapService.kt
@@ -1,6 +1,7 @@
package cn.flightfeather.supervision.lightshare.service
import cn.flightfeather.supervision.domain.ds1.entity.Scense
import cn.flightfeather.supervision.domain.ds1.entity.Userinfo
import cn.flightfeather.supervision.domain.ds2.entity.UserMap
import cn.flightfeather.supervision.lightshare.vo.AreaVo
import cn.flightfeather.supervision.lightshare.vo.DeviceMapVo
@@ -17,7 +18,7 @@
     */
    fun getSceneByTZId(tzUserId: String): Scense?
    fun autoCreateMap()
    fun autoCreateMap(userList: List<Userinfo?>)
    fun fetchDeviceMap(areaVo: AreaVo): List<DeviceMapVo?>
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DeviceServiceImpl.kt
@@ -5,10 +5,11 @@
import cn.flightfeather.supervision.common.utils.DateUtil
import cn.flightfeather.supervision.common.utils.FileUtil
import cn.flightfeather.supervision.common.utils.JsonUtil
import cn.flightfeather.supervision.domain.ds1.entity.DeviceInfo
import cn.flightfeather.supervision.domain.ds1.entity.DeviceLocation
import cn.flightfeather.supervision.domain.ds1.entity.*
import cn.flightfeather.supervision.domain.ds1.repository.DeviceRep
import cn.flightfeather.supervision.lightshare.service.DeviceService
import com.google.gson.Gson
import org.springframework.beans.factory.annotation.Value
import org.springframework.stereotype.Service
import org.springframework.web.multipart.MultipartFile
import java.util.*
@@ -19,34 +20,68 @@
 * @author feiyu02
 */
@Service
class DeviceServiceImpl(private val deviceRep: DeviceRep) : DeviceService {
class DeviceServiceImpl(
    private val deviceRep: DeviceRep,
    @Value("\${filePath}") var filePath: String,
    @Value("\${imgPath}") var imgPath: String,
) : DeviceService {
    companion object{
        private const val BASE_IMG_PATH = "${Constant.DEFAULT_FILE_PATH}/images/"
    override fun findDevices(sceneId: String, deviceType: Constant.DeviceType): List<BaseDevice> {
        return deviceRep.findDeviceList(sceneId, deviceType)
    }
    override fun findDevices(sceneId: String): List<DeviceInfo> {
        return deviceRep.findDeviceList(sceneId)
    override fun insertDevice(deviceInfo: String, deviceType: Constant.DeviceType): Int {
        return when (deviceType) {
            Constant.DeviceType.MONITOR_DEVICE -> {
                val info = Gson().fromJson(deviceInfo, MonitorDeviceInfo::class.java)
                info.diCreateTime = Date()
                deviceRep.insertDevice(info)
            }
            Constant.DeviceType.TREATMENT_DEVICE -> {
                val info = Gson().fromJson(deviceInfo, TreatmentDeviceInfo::class.java)
                info.piCreateTime = Date()
                deviceRep.insertDevice(info)
            }
            Constant.DeviceType.PRODUCTION_DEVICE -> {
                val info = Gson().fromJson(deviceInfo, ProductionDeviceInfo::class.java)
                info.wiCreateTime = Date()
                deviceRep.insertDevice(info)
            }
        }
    }
    override fun insertDevice(deviceInfo: DeviceInfo): Int {
        return deviceRep.insertDevice(deviceInfo)
    override fun updateDevice(deviceInfo: String, deviceType: Constant.DeviceType): Int {
        return when (deviceType) {
            Constant.DeviceType.MONITOR_DEVICE -> {
                val info = Gson().fromJson(deviceInfo, MonitorDeviceInfo::class.java)
                deviceRep.updateDevice(info)
            }
            Constant.DeviceType.TREATMENT_DEVICE -> {
                val info = Gson().fromJson(deviceInfo, TreatmentDeviceInfo::class.java)
                deviceRep.updateDevice(info)
            }
            Constant.DeviceType.PRODUCTION_DEVICE -> {
                val info = Gson().fromJson(deviceInfo, ProductionDeviceInfo::class.java)
                deviceRep.updateDevice(info)
            }
        }
    }
    override fun updateDevice(deviceInfo: DeviceInfo): Int {
        return deviceRep.updateDevice(deviceInfo)
    }
    override fun findDeviceLocations(deviceId: Int): List<DeviceLocation> {
        return deviceRep.findLocations(deviceId)
    override fun findDeviceLocations(
        sceneId: String?,
        deviceId: Int,
        deviceType: Constant.DeviceType,
    ): List<DeviceStatus> {
        return emptyList()
    }
    override fun insertDeviceLocation(deviceLocation: String, files: Array<MultipartFile>): Int {
        val obj = JsonUtil.gson.fromJson(deviceLocation, DeviceLocation::class.java)
        val obj = JsonUtil.gson.fromJson(deviceLocation, DeviceStatus::class.java)
        val time = DateUtil.DateToString(obj.dlCreateTime, DateUtil.DateStyle.YYYY_MM_DD)
        val picPath = FileUtil.saveFiles(files, BASE_IMG_PATH, "device/${obj.dlId}/${time}")
        val picPath = FileUtil.saveFiles(files, imgPath, "device/${obj.dlId}/${time}")
        obj.dlPicUrl = picPath.joinToString(";")
        return deviceRep.insertLocation(obj)
        obj.dlCreateTime = Date()
        return deviceRep.insertStatus(obj)
    }
    override fun updateDeviceLocation(
@@ -55,14 +90,14 @@
        files: Array<MultipartFile>,
    ): Int {
        // èŽ·å–æ›´æ–°ä¿¡æ¯
        val obj = JsonUtil.gson.fromJson(deviceLocation, DeviceLocation::class.java)
        val obj = JsonUtil.gson.fromJson(deviceLocation, DeviceStatus::class.java)
        // èŽ·å–åŽŸä½ç½®ä¿¡æ¯ï¼Œåˆ é™¤å›¾ç‰‡è·¯å¾„å’Œå¯¹åº”å›¾ç‰‡
        val dL = deviceRep.findLocation(obj.dlId) ?: throw BizException("该设备位置信息不存在,无法修改")
        val dL = deviceRep.findStatus(obj.dlId) ?: throw BizException("该设备位置信息不存在,无法修改")
        val oldImg = dL.dlPicUrl.split(";").toMutableList()
        deleteImg.forEach {
            if (oldImg.contains(it)) {
                if (FileUtil.delFile(BASE_IMG_PATH + it)) {
                if (FileUtil.delFile(imgPath + it)) {
                    oldImg.remove(it)
                }
            }
@@ -70,10 +105,10 @@
        // ä¿å­˜æ–°å¢žå›¾ç‰‡
        val time = DateUtil.DateToString(obj.dlCreateTime, DateUtil.DateStyle.YYYY_MM_DD)
        val picPath = FileUtil.saveFiles(files, BASE_IMG_PATH, "device/${obj.dlId}/${time}")
        val picPath = FileUtil.saveFiles(files, imgPath, "device/${obj.dlId}/${time}")
        oldImg.addAll(picPath)
        obj.dlPicUrl = oldImg.joinToString(";")
        return deviceRep.updateLocation(obj)
        return deviceRep.updateStatus(obj)
    }
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MediafileServiceImpl.kt
@@ -13,11 +13,16 @@
import com.fasterxml.jackson.databind.ObjectMapper
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Value
import java.io.File
@Service
class MediafileServiceImpl(val mediafileMapper: MediafileMapper) : MediafileService {
class MediafileServiceImpl(
    val mediafileMapper: MediafileMapper,
    @Value("\${filePath}") var filePath: String,
    @Value("\${imgPath}") var imgPath: String,
) : MediafileService {
    private val logging: Logger = LoggerFactory.getLogger(MediafileServiceImpl::class.java)
@@ -117,7 +122,7 @@
        val path = mediafile.extension1
        //File("/Users/liwei/images/${path}/${id}.jpg").delete()
        //先删图片
        val  f = File("${Constant.DEFAULT_FILE_PATH}/images/$path/$id.jpg")
        val f = File("${Constant.DEFAULT_FILE_PATH}/images/$path/$id.jpg")
        if (f.exists()) {
            f.delete()
        }
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/UserMapServiceImpl.kt
@@ -48,12 +48,13 @@
        return userMapRep.findFromSupervision(tzUserId)
    }
    override fun autoCreateMap() {
    override fun autoCreateMap(userList: List<Userinfo?>) {
        // é€‰æ‹©éœ€è¦å¤„理的账户
        val userList = userinfoMapper.selectByExample(Example(Userinfo::class.java).apply {
            createCriteria().andEqualTo("remark", "徐汇区")
        })
//        val userList = userinfoMapper.selectByExample(Example(Userinfo::class.java).apply {
//            createCriteria().andEqualTo("remark", "徐汇区")
//        })
        userList.forEach {
            it ?: return@forEach
            // æŸ¥æ‰¾æ˜¯å¦å·²ç»æœ‰è´¦æˆ·åŒ¹é…è®°å½•
            val records = userMapMapper.selectByExample(Example(UserMap::class.java).apply {
                createCriteria().andEqualTo("svUserId", it.guid)
@@ -72,6 +73,7 @@
                            tzUserName = tzU.realname
                            svUserId = it.guid
                            svUserName = it.realname
                            umCreateTime = Date()
                        })
                    }
                }
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/DeviceMapVo.kt
@@ -37,6 +37,7 @@
                    svUserName = it.svUserName
                    tzUserId = it.tzUserId
                    tzUserName = it.tzUserName
                    createTime = it.createTime
                })
            }
            return res
@@ -53,6 +54,7 @@
                    svUserName = it.svUserName
                    tzUserId = it.tzUserId
                    tzUserName = it.tzUserName
                    createTime = it.createTime
                })
            }
            return res
@@ -69,6 +71,7 @@
                    svUserName = it.svUserName
                    tzUserId = it.tzUserId
                    tzUserName = it.tzUserName
                    createTime = it.createTime
                })
            }
            return res
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/DeviceStatusVo.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,11 @@
package cn.flightfeather.supervision.lightshare.vo
import cn.flightfeather.supervision.domain.ds1.entity.DeviceStatus
/**
 *
 * @date 2024/8/13
 * @author feiyu02
 */
class DeviceStatusVo : DeviceStatus() {
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/MonitorDeviceInfoVo.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
package cn.flightfeather.supervision.lightshare.vo
import cn.flightfeather.supervision.common.utils.Constant
import cn.flightfeather.supervision.domain.ds1.entity.MonitorDeviceInfo
import org.springframework.beans.BeanUtils
/**
 *
 * @date 2024/8/13
 * @author feiyu02
 */
class MonitorDeviceInfoVo : MonitorDeviceInfo {
    constructor():super()
    constructor(obj: MonitorDeviceInfo){
        BeanUtils.copyProperties(obj, this)
        this.sceneType = Constant.SceneType.getByValue(this.diSceneTypeId.toString()).text
        this.type
    }
    // åœºæ™¯ç±»åž‹
    var sceneType: String? = null
    // è®¾å¤‡ç±»åž‹
    var type: String? = null
    // è®¾å¤‡å­ç±»åž‹
    var subType: String? = null
    // è¿ç»´é¢‘次
    var maintainFrequency: String? = null
    // è¿è¡ŒçŠ¶æ€
    var runningStatus: String? = null
    // æ‰€æœ‰æƒ
    var ownership: String? = null
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/ProductionDeviceInfoVo.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
package cn.flightfeather.supervision.lightshare.vo
import cn.flightfeather.supervision.domain.ds1.entity.ProductionDeviceInfo
/**
 *
 * @date 2024/8/13
 * @author feiyu02
 */
class ProductionDeviceInfoVo: ProductionDeviceInfo() {
    // åœºæ™¯ç±»åž‹
    var sceneType: String? = null
    // è®¾å¤‡ç±»åž‹
    var type: String? = null
    // è®¾å¤‡å­ç±»åž‹
    var subType: String? = null
    // è¿è¡ŒçŠ¶æ€
    var runningStatus: String? = null
    // æ‰€æœ‰æƒ
    var ownership: String? = null
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/TreatmentDeviceInfoVo.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
package cn.flightfeather.supervision.lightshare.vo
import cn.flightfeather.supervision.domain.ds1.entity.TreatmentDeviceInfo
/**
 *
 * @date 2024/8/13
 * @author feiyu02
 */
class TreatmentDeviceInfoVo : TreatmentDeviceInfo() {
    // åœºæ™¯ç±»åž‹
    var sceneType: String? = null
    // è®¾å¤‡ç±»åž‹
    var type: String? = null
    // è®¾å¤‡å­ç±»åž‹
    var subType: String? = null
    // è¿ç»´é¢‘次
    var maintainFrequency: String? = null
    // è¿è¡ŒçŠ¶æ€
    var runningStatus: String? = null
    // æ‰€æœ‰æƒ
    var ownership: String? = null
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt
@@ -1,6 +1,7 @@
package cn.flightfeather.supervision.lightshare.web
import cn.flightfeather.supervision.domain.ds1.entity.DeviceInfo
import cn.flightfeather.supervision.common.utils.Constant
import cn.flightfeather.supervision.domain.ds1.entity.MonitorDeviceInfo
import cn.flightfeather.supervision.lightshare.service.DeviceService
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
@@ -16,33 +17,44 @@
    @ApiOperation("获取场景设备信息")
    @GetMapping
    fun fetchDevice(
        @ApiParam("场景id") sceneId: String,
    ) = resPack { deviceService.findDevices(sceneId) }
        @ApiParam("场景id") @RequestParam sceneId: String,
        @ApiParam("设备类型id") @RequestParam deviceTypeId: Byte,
    ) = resPack { deviceService.findDevices(sceneId, Constant.DeviceType.fromValue(deviceTypeId)) }
    @ApiOperation("新增场景设备信息")
    @PutMapping("/upload")
    fun uploadDevice(
        @ApiParam("设备信息") deviceInfo: DeviceInfo,
    ) = resPack { deviceService.insertDevice(deviceInfo) }
        @ApiParam("设备信息") @RequestBody deviceInfo: String,
        @ApiParam("设备类型id") @RequestParam deviceTypeId: Byte,
    ) = resPack { deviceService.insertDevice(deviceInfo, Constant.DeviceType.fromValue(deviceTypeId)) }
    @ApiOperation("更新场景设备信息")
    @PostMapping("/update")
    fun updateDevice(
        @ApiParam("设备信息") deviceInfo: DeviceInfo,
    ) = resPack { deviceService.updateDevice(deviceInfo) }
        @ApiParam("设备信息") @RequestBody deviceInfo: String,
        @ApiParam("设备类型id") @RequestParam deviceTypeId: Byte,
    ) = resPack { deviceService.updateDevice(deviceInfo, Constant.DeviceType.fromValue(deviceTypeId)) }
    @ApiOperation("获取场景设备位置变更信息")
    @GetMapping("/status")
    fun fetchDeviceLocation(
        @ApiParam("场景id") @RequestParam(required = false) sceneId: String?,
        @ApiParam("设备id") @RequestParam deviceId: Int,
        @ApiParam("设备类型id") @RequestParam deviceTypeId: Byte,
    ) = resPack { deviceService.findDeviceLocations(sceneId, deviceId, Constant.DeviceType.fromValue(deviceTypeId)) }
    @ApiOperation("新增场景设备位置变更信息")
    @PutMapping("/location/upload")
    @PutMapping("/status/upload")
    fun uploadDeviceLocation(
        @ApiParam("设备位置信息json") @RequestParam("location") location: String,
        @ApiParam("设备位置信息json") @RequestParam("status") status: String,
        @ApiParam("设备图片") @RequestPart("images") images: Array<MultipartFile>,
    ) = resPack { deviceService.insertDeviceLocation(location, images) }
    ) = resPack { deviceService.insertDeviceLocation(status, images) }
    @ApiOperation("更新场景设备位置变更信息")
    @PutMapping("/location/update")
    @PutMapping("/status/update")
    fun updateDeviceLocation(
        @ApiParam("设备位置信息json") @RequestParam("location") location: String,
        @ApiParam("删除的设备图片路径") @RequestPart("deleteImg") deleteImg: List<String>,
        @ApiParam("设备位置信息json") @RequestParam("status") status: String,
        @ApiParam("删除的设备图片路径") @RequestParam("deleteImg") deleteImg: List<String>,
        @ApiParam("设备图片") @RequestPart("images") images: Array<MultipartFile>,
    ) = resPack { deviceService.updateDeviceLocation(location, deleteImg, images) }
    ) = resPack { deviceService.updateDeviceLocation(status, deleteImg, images) }
}
src/main/resources/application-pro-https.yml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
spring:
  datasource:
    ds1:
      #-发布服务器-
      url: jdbc:mysql://localhost:3306/supervision?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
      username: supervision
      password: supervision_feiyu2021
    ds2:
      #-发布服务器-
      url: jdbc:mysql://localhost:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
      username: ledger
      password: ledger_fxxchackxr
mybatis:
  configuration:
    log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
imgPath: D:/02product/04supervision/images/
filePath: D:/02product/04supervision/files/
mode: prohttps
src/main/resources/application-pro.yml
@@ -11,6 +11,10 @@
      username: ledger
      password: ledger_fxxchackxr
mybatis:
  configuration:
    log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
imgPath: D:/02product/04supervision/images/
filePath: D:/02product/04supervision/files/
mode: pro
src/main/resources/generator/generatorConfig4ds1.xml
@@ -58,10 +58,18 @@
<!--               enableSelectByExample="false" selectByExampleQueryId="false"/>-->
<!--        <table tableName="ea_t_evaluation" domainObjectName="Evaluation" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"-->
<!--               enableSelectByExample="false" selectByExampleQueryId="false"/>-->
<!--        <table tableName="sm_t_device_info" domainObjectName="DeviceInfo" enableCountByExample="false"-->
<!--               enableUpdateByExample="false" enableDeleteByExample="false"-->
<!--               enableSelectByExample="false" selectByExampleQueryId="false"/>-->
        <table tableName="sm_t_device_location" domainObjectName="DeviceLocation" enableCountByExample="false"
        <table tableName="di_t_monitor_device_info" domainObjectName="MonitorDeviceInfo" enableCountByExample="false"
               enableUpdateByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" selectByExampleQueryId="false"/>
        <table tableName="di_t_treatment_device_info" domainObjectName="TreatmentDeviceInfo"
               enableCountByExample="false"
               enableUpdateByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" selectByExampleQueryId="false"/>
        <table tableName="di_t_production_device_info" domainObjectName="ProductionDeviceInfo"
               enableCountByExample="false"
               enableUpdateByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" selectByExampleQueryId="false"/>
        <table tableName="di_t_device_status" domainObjectName="DeviceStatus" enableCountByExample="false"
               enableUpdateByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" selectByExampleQueryId="false"/>
    </context>
src/main/resources/mapper/ds1/DeviceInfoMapper.xml
ÎļþÒÑɾ³ý
src/main/resources/mapper/ds1/DeviceLocationMapper.xml
ÎļþÒÑɾ³ý
src/main/resources/mapper/ds1/DeviceStatusMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.flightfeather.supervision.domain.ds1.mapper.DeviceStatusMapper" >
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds1.entity.DeviceStatus" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="DL_ID" property="dlId" jdbcType="INTEGER" />
    <result column="DL_Device_Id" property="dlDeviceId" jdbcType="INTEGER" />
    <result column="DL_Device_Type" property="dlDeviceType" jdbcType="TINYINT" />
    <result column="DL_Scene_GUID" property="dlSceneGuid" jdbcType="VARCHAR" />
    <result column="DL_Scene_Type_Id" property="dlSceneTypeId" jdbcType="TINYINT" />
    <result column="DL_Location" property="dlLocation" jdbcType="VARCHAR" />
    <result column="DL_Longitude" property="dlLongitude" jdbcType="DECIMAL" />
    <result column="DL_Latitude" property="dlLatitude" jdbcType="DECIMAL" />
    <result column="DL_Standard" property="dlStandard" jdbcType="BIT" />
    <result column="DL_UnStandard_Reason" property="dlUnstandardReason" jdbcType="VARCHAR" />
    <result column="DL_Real_Time_Status" property="dlRealTimeStatus" jdbcType="TINYINT" />
    <result column="DL_Pic_Url" property="dlPicUrl" jdbcType="VARCHAR" />
    <result column="DL_Video_Url" property="dlVideoUrl" jdbcType="VARCHAR" />
    <result column="DL_Create_Time" property="dlCreateTime" jdbcType="TIMESTAMP" />
    <result column="DL_Update_Time" property="dlUpdateTime" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    DL_ID, DL_Device_Id, DL_Device_Type, DL_Scene_GUID, DL_Scene_Type_Id, DL_Location,
    DL_Longitude, DL_Latitude, DL_Standard, DL_UnStandard_Reason, DL_Real_Time_Status,
    DL_Pic_Url, DL_Video_Url, DL_Create_Time, DL_Update_Time
  </sql>
</mapper>
src/main/resources/mapper/ds1/DustDataResultMapper.xml
@@ -1,27 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.flightfeather.supervision.domain.ds1.mapper.DustDataResultMapper">
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds1.entity.DustDataResult">
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.flightfeather.supervision.domain.ds1.mapper.DustDataResultMapper" >
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds1.entity.DustDataResult" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="DR_Id" jdbcType="INTEGER" property="drId" />
    <result column="DR_Scene_Id" jdbcType="VARCHAR" property="drSceneId" />
    <result column="DR_Scene_Name" jdbcType="VARCHAR" property="drSceneName" />
    <result column="DR_Time" jdbcType="DATE" property="drTime" />
    <result column="DR_Exceed_Times" jdbcType="INTEGER" property="drExceedTimes" />
    <result column="DR_Avg" jdbcType="DOUBLE" property="drAvg" />
    <result column="DR_Max" jdbcType="DOUBLE" property="drMax" />
    <result column="DR_Min" jdbcType="DOUBLE" property="drMin" />
    <result column="DR_Over_Avg_Per" jdbcType="DOUBLE" property="drOverAvgPer" />
    <result column="DR_Data_Num" jdbcType="INTEGER" property="drDataNum" />
    <result column="DR_Effective_Rate" jdbcType="DOUBLE" property="drEffectiveRate" />
    <id column="DR_Id" property="drId" jdbcType="INTEGER" />
    <result column="DR_Scene_Id" property="drSceneId" jdbcType="VARCHAR" />
    <result column="DR_Scene_Name" property="drSceneName" jdbcType="VARCHAR" />
    <result column="DR_Device_Code" property="drDeviceCode" jdbcType="VARCHAR" />
    <result column="DR_Time" property="drTime" jdbcType="DATE" />
    <result column="DR_Exceed_Times" property="drExceedTimes" jdbcType="INTEGER" />
    <result column="DR_Avg" property="drAvg" jdbcType="DOUBLE" />
    <result column="DR_Max" property="drMax" jdbcType="DOUBLE" />
    <result column="DR_Min" property="drMin" jdbcType="DOUBLE" />
    <result column="DR_Over_Avg_Per" property="drOverAvgPer" jdbcType="DOUBLE" />
    <result column="DR_Data_Num" property="drDataNum" jdbcType="INTEGER" />
    <result column="DR_Effective_Rate" property="drEffectiveRate" jdbcType="DOUBLE" />
  </resultMap>
  <sql id="Base_Column_List">
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    DR_Id, DR_Scene_Id, DR_Scene_Name, DR_Time, DR_Exceed_Times, DR_Avg, DR_Max, DR_Min,
    DR_Over_Avg_Per, DR_Data_Num, DR_Effective_Rate
    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>
</mapper>
src/main/resources/mapper/ds1/MonitorDeviceInfoMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.flightfeather.supervision.domain.ds1.mapper.MonitorDeviceInfoMapper" >
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds1.entity.MonitorDeviceInfo" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="DI_ID" property="diId" jdbcType="INTEGER" />
    <result column="DI_Device_Code" property="diDeviceCode" jdbcType="VARCHAR" />
    <result column="DI_Name" property="diName" jdbcType="VARCHAR" />
    <result column="DI_Scene_GUID" property="diSceneGuid" jdbcType="VARCHAR" />
    <result column="DI_Scene_Type_Id" property="diSceneTypeId" jdbcType="TINYINT" />
    <result column="DI_Type_Id" property="diTypeId" jdbcType="TINYINT" />
    <result column="DI_Subtype_Id" property="diSubtypeId" jdbcType="TINYINT" />
    <result column="DI_Supplier" property="diSupplier" jdbcType="VARCHAR" />
    <result column="DI_Maintainer" property="diMaintainer" jdbcType="VARCHAR" />
    <result column="DI_Maintain_Frequency" property="diMaintainFrequency" jdbcType="TINYINT" />
    <result column="DI_Maintain_Staff" property="diMaintainStaff" jdbcType="VARCHAR" />
    <result column="DI_Maintain_Tel" property="diMaintainTel" jdbcType="VARCHAR" />
    <result column="DI_Running_Status" property="diRunningStatus" jdbcType="TINYINT" />
    <result column="DI_Brand_Model" property="diBrandModel" jdbcType="VARCHAR" />
    <result column="DI_Device_Param" property="diDeviceParam" jdbcType="VARCHAR" />
    <result column="DI_Ownership" property="diOwnership" jdbcType="TINYINT" />
    <result column="DI_QR_Code" property="diQrCode" jdbcType="VARCHAR" />
    <result column="DI_Other_QR_Code" property="diOtherQrCode" jdbcType="VARCHAR" />
    <result column="DI_Create_Time" property="diCreateTime" jdbcType="TIMESTAMP" />
    <result column="DI_Update_Time" property="diUpdateTime" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    DI_ID, DI_Device_Code, DI_Name, DI_Scene_GUID, DI_Scene_Type_Id, DI_Type_Id, DI_Subtype_Id,
    DI_Supplier, DI_Maintainer, DI_Maintain_Frequency, DI_Maintain_Staff, DI_Maintain_Tel,
    DI_Running_Status, DI_Brand_Model, DI_Device_Param, DI_Ownership, DI_QR_Code, DI_Other_QR_Code,
    DI_Create_Time, DI_Update_Time
  </sql>
</mapper>
src/main/resources/mapper/ds1/ProductionDeviceInfoMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.flightfeather.supervision.domain.ds1.mapper.ProductionDeviceInfoMapper" >
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds1.entity.ProductionDeviceInfo" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="WI_ID" property="wiId" jdbcType="INTEGER" />
    <result column="WI_Device_Code" property="wiDeviceCode" jdbcType="VARCHAR" />
    <result column="WI_Name" property="wiName" jdbcType="VARCHAR" />
    <result column="WI_Scene_GUID" property="wiSceneGuid" jdbcType="VARCHAR" />
    <result column="WI_Scene_Type_Id" property="wiSceneTypeId" jdbcType="TINYINT" />
    <result column="WI_Type_Id" property="wiTypeId" jdbcType="TINYINT" />
    <result column="WI_Subtype_Id" property="wiSubtypeId" jdbcType="TINYINT" />
    <result column="WI_Supplier" property="wiSupplier" jdbcType="VARCHAR" />
    <result column="WI_Servicer" property="wiServicer" jdbcType="VARCHAR" />
    <result column="WI_Maintain_Staff" property="wiMaintainStaff" jdbcType="VARCHAR" />
    <result column="WI_Maintain_Tel" property="wiMaintainTel" jdbcType="VARCHAR" />
    <result column="WI_Running_Status" property="wiRunningStatus" jdbcType="TINYINT" />
    <result column="WI_Brand_Model" property="wiBrandModel" jdbcType="VARCHAR" />
    <result column="WI_Device_Param" property="wiDeviceParam" jdbcType="VARCHAR" />
    <result column="WI_Ownership" property="wiOwnership" jdbcType="TINYINT" />
    <result column="WI_QR_Code" property="wiQrCode" jdbcType="VARCHAR" />
    <result column="WI_Other_QR_Code" property="wiOtherQrCode" jdbcType="VARCHAR" />
    <result column="WI_Create_Time" property="wiCreateTime" jdbcType="TIMESTAMP" />
    <result column="WI_Update_Time" property="wiUpdateTime" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    WI_ID, WI_Device_Code, WI_Name, WI_Scene_GUID, WI_Scene_Type_Id, WI_Type_Id, WI_Subtype_Id,
    WI_Supplier, WI_Servicer, WI_Maintain_Staff, WI_Maintain_Tel, WI_Running_Status,
    WI_Brand_Model, WI_Device_Param, WI_Ownership, WI_QR_Code, WI_Other_QR_Code, WI_Create_Time,
    WI_Update_Time
  </sql>
</mapper>
src/main/resources/mapper/ds1/TreatmentDeviceInfoMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.flightfeather.supervision.domain.ds1.mapper.TreatmentDeviceInfoMapper" >
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds1.entity.TreatmentDeviceInfo" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="PI_ID" property="piId" jdbcType="INTEGER" />
    <result column="PI_Device_Code" property="piDeviceCode" jdbcType="VARCHAR" />
    <result column="PI_Name" property="piName" jdbcType="VARCHAR" />
    <result column="PI_Scene_GUID" property="piSceneGuid" jdbcType="VARCHAR" />
    <result column="PI_Scene_Type_Id" property="piSceneTypeId" jdbcType="TINYINT" />
    <result column="PI_Type_Id" property="piTypeId" jdbcType="TINYINT" />
    <result column="PI_Subtype_Id" property="piSubtypeId" jdbcType="TINYINT" />
    <result column="PI_Supplier" property="piSupplier" jdbcType="VARCHAR" />
    <result column="PI_Maintainer" property="piMaintainer" jdbcType="VARCHAR" />
    <result column="PI_Maintain_Frequency" property="piMaintainFrequency" jdbcType="TINYINT" />
    <result column="PI_Maintain_Staff" property="piMaintainStaff" jdbcType="VARCHAR" />
    <result column="PI_Maintain_Tel" property="piMaintainTel" jdbcType="VARCHAR" />
    <result column="PI_Running_Status" property="piRunningStatus" jdbcType="TINYINT" />
    <result column="PI_Brand_Model" property="piBrandModel" jdbcType="VARCHAR" />
    <result column="PI_Device_Param" property="piDeviceParam" jdbcType="VARCHAR" />
    <result column="PI_Ownership" property="piOwnership" jdbcType="TINYINT" />
    <result column="PI_QR_Code" property="piQrCode" jdbcType="VARCHAR" />
    <result column="PI_Other_QR_Code" property="piOtherQrCode" jdbcType="VARCHAR" />
    <result column="PI_Create_Time" property="piCreateTime" jdbcType="TIMESTAMP" />
    <result column="PI_Update_Time" property="piUpdateTime" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    PI_ID, PI_Device_Code, PI_Name, PI_Scene_GUID, PI_Scene_Type_Id, PI_Type_Id, PI_Subtype_Id,
    PI_Supplier, PI_Maintainer, PI_Maintain_Frequency, PI_Maintain_Staff, PI_Maintain_Tel,
    PI_Running_Status, PI_Brand_Model, PI_Device_Param, PI_Ownership, PI_QR_Code, PI_Other_QR_Code,
    PI_Create_Time, PI_Update_Time
  </sql>
</mapper>
src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt
@@ -144,7 +144,7 @@
    @Test
    fun aopSubtask() {
        val s = subTaskRep.findOne("yMRHdPg7e4i8M6aB")
        val s = subTaskRep.findOne("B6kyaAjJRoGJ2Yur")
        aopEvaluation.executeBySubTask(s!!)
    }
}
src/test/kotlin/cn/flightfeather/supervision/business/bgtask/AopTaskCtrlTest.kt
@@ -48,8 +48,9 @@
    @Test
    fun startNewTask(){
        val time = LocalDate.of(2024, 7, 23).atStartOfDay()
        aopTaskCtrl.startNewTask(aopTaskCtrl.getArea(time, "310106", "静安区", Constant.SceneType.TYPE1))
        val time = LocalDate.of(2024, 6, 23).atStartOfDay()
//        aopTaskCtrl.startNewTask(aopTaskCtrl.getArea(time, "310106", "静安区", Constant.SceneType.TYPE1))
        aopTaskCtrl.startNewTask(aopTaskCtrl.getArea(time, "310104", "徐汇区", Constant.SceneType.TYPE5))
        val reader = BufferedReader(InputStreamReader(System.`in`))
        reader.readLine()
    }
src/test/kotlin/cn/flightfeather/supervision/lightshare/service/impl/UserinfoServiceImplTest.kt
@@ -33,6 +33,7 @@
    @Test
    fun autoCreateMap() {
        userMapService.autoCreateMap()
        val user = userinfoService.findOne("58G5NHgRc1TjDTAH")
        userMapService.autoCreateMap(listOf(user))
    }
}