feiyu02
2024-08-02 16b961c2210fe29fd494ac1f9d830dd93503961f
1. 新增监测设备的管理功能
已修改26个文件
已删除1个文件
已添加10个文件
1089 ■■■■ 文件已修改
pom.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreItem.kt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/datafetch/FetchNightConstruction.kt 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/location/UtilFile.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/DataSource.kt 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColInspectionInfo.kt 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColLedger.kt 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/exception/BizException.kt 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/utils/CacheUtil.kt 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/utils/DateUtil.kt 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/utils/FileUtil.kt 39 ●●●● 补丁 | 查看 | 原始文档 | 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/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/repository/DeviceRep.kt 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/RegionRep.kt 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/repository/ComplaintAndPunishmentRep.kt 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds3/mapper/FumeExceptionDataMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/DeviceService.kt 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DeviceServiceImpl.kt 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/EvaluationServiceImpl.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/InspectionServiceImpl.kt 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MenuController.kt 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TableController.kt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/scheduler/ScheduleService.kt 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/generator/generatorConfig4ds1.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds1/DeviceInfoMapper.xml 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds1/DeviceLocationMapper.xml 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds1/MonitorobjectversionMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds3/FumeExceptionDataMapper.xml 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/test/kotlin/cn/flightfeather/supervision/business/bgtask/AopTaskCtrlTest.kt 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml
@@ -437,8 +437,8 @@
                <artifactId>mybatis-generator-maven-plugin</artifactId>
                <version>1.3.2</version>
                <configuration>
                    <!--                    <configurationFile>src/main/resources/generator/generatorConfig4ds1.xml</configurationFile>-->
                    <configurationFile>src/main/resources/generator/generatorConfig4ds3.xml</configurationFile>
                    <configurationFile>src/main/resources/generator/generatorConfig4ds1.xml</configurationFile>
<!--                    <configurationFile>src/main/resources/generator/generatorConfig4ds3.xml</configurationFile>-->
                    <overwrite>true</overwrite>
                    <verbose>true</verbose>
                </configuration>
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreItem.kt
@@ -23,7 +23,6 @@
    //最小分值(默认0分)
    var minScore: Int = 0
    val dateUtil = DateUtil()
    // è¯„分项是否豁免不扣分
    var exemption = false
src/main/kotlin/cn/flightfeather/supervision/business/datafetch/FetchNightConstruction.kt
@@ -43,8 +43,6 @@
    @Autowired
    lateinit var userinfoMapper: UserinfoMapper
    private val dateUtil = DateUtil()
    @PostConstruct
    fun init() {
        instance = this
@@ -65,7 +63,7 @@
            val timeStr = if (it.isNotEmpty()) {
                val cal = Calendar.getInstance().apply { time = it[0]?.ncCreateTime }
                cal.add(Calendar.DAY_OF_MONTH, -1)
                dateUtil.DateToString(cal.time, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS) ?: DEFAULT_TIME
                DateUtil.DateToString(cal.time, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS) ?: DEFAULT_TIME
            } else {
                DEFAULT_TIME
            }
@@ -83,10 +81,10 @@
                            ncConstructionUnit = vo["constructionUnit"].asString
                            ncPerson = vo["person"].asString
                            ncApplyContent = vo["applyContent"].asString
                            ncStartDate = dateUtil.StringToDate(vo["startDate"].asString)
                            ncEndDate = dateUtil.StringToDate(vo["endDate"].asString)
                            ncStartDate = DateUtil.StringToDate(vo["startDate"].asString)
                            ncEndDate = DateUtil.StringToDate(vo["endDate"].asString)
                            ncFileName = vo["filename"].asString
                            ncCreateTime = dateUtil.StringToDate(vo["createtime"].asString)
                            ncCreateTime = DateUtil.StringToDate(vo["createtime"].asString)
                            ncUrl = vo["url"].asString
                            ncProvinceCode = PROVINCE_CODE
src/main/kotlin/cn/flightfeather/supervision/business/location/UtilFile.kt
@@ -79,7 +79,7 @@
    fun outPutToFile(distance: Double? = null) {
        val workbook = HSSFWorkbook()
        val tag = if (distance == null) "" else  "${distance}ç±³"
        val fileName = "周边${tag}点位-${DateUtil().DateToString(Date(), "yyyy-MM-ddhhmmss")}.xls"
        val fileName = "周边${tag}点位-${DateUtil.DateToString(Date(), "yyyy-MM-ddhhmmss")}.xls"
        val filePath = "C:\\work\\工作\\第三方监管\\周边点位\\$fileName"
        val out = FileOutputStream(File(filePath))
        ExcelUtil.write(heads, contents, workbook)
src/main/kotlin/cn/flightfeather/supervision/business/report/DataSource.kt
@@ -23,8 +23,6 @@
 */
class DataSource(val config: ExcelConfigVo, val dbMapper: DbMapper){
    private val dateUtil = DateUtil()
    private val sourceList = mutableListOf<Subtask>()
    var year = 0
@@ -70,7 +68,7 @@
     */
    fun areaName(): String {
        val t = dbMapper.taskMapper.selectByPrimaryKey(config.topTaskGuid)
        return "${dateUtil.DateToString(t.starttime, DateUtil.DateStyle.YYYY_MM_CN)}${t.districtname}${if (area != t.districtname) area else ""}${Constant.SceneType.getDes(config.sceneType)}"
        return "${DateUtil.DateToString(t.starttime, DateUtil.DateStyle.YYYY_MM_CN)}${t.districtname}${if (area != t.districtname) area else ""}${Constant.SceneType.getDes(config.sceneType)}"
    }
    /**
src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColInspectionInfo.kt
@@ -36,7 +36,6 @@
    }
    override fun onOneRow(rowData: DataSource.RowData): List<Any> {
        val dateUtil = DateUtil()
        val row = mutableListOf<Any>()
        if (rowData.noRecord()) {
            repeat(heads.last().size) { row.add(("")) }
@@ -44,7 +43,7 @@
            row.apply {
                // è¡¨å¤´ï¼šå·¡æŸ¥æƒ…况及问题、整改统计
                //监管时间
                add(dateUtil.DateToString(rowData.subTask?.planstarttime, DateUtil.DateStyle.MM_DD) ?: "")
                add(DateUtil.DateToString(rowData.subTask?.planstarttime, DateUtil.DateStyle.MM_DD) ?: "")
                //巡查人员
                add(rowData.subTask?.executorrealtimes?.replace("#", "、") ?: "")
                //查询子任务对应的问题,并且根据条件进行筛选
@@ -82,7 +81,7 @@
                    pDes += "${lr}$y、${p.problemname}"
                    pLoc += "${lr}$y、${p.location}"
                    pNum++
                    changeTime += "${lr}$y、${dateUtil.DateToString(p.changedtime, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_CN)}"
                    changeTime += "${lr}$y、${DateUtil.DateToString(p.changedtime, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_CN)}"
                    pChanged += "${lr}$y、${if (p.ischanged == true) "✓" else "×"}"
                    if (p.ischanged == true) {
                        if (changedProblem.isNotBlank()) {
src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColLedger.kt
@@ -21,7 +21,6 @@
    }
    override fun onOneRow(rowData: DataSource.RowData): List<Any> {
        val dateUtil = DateUtil()
        rowData.ledgerRecords.sortedByDescending {
            it.lrSubmitdate
        }
@@ -30,7 +29,7 @@
        var t2 = "/"
        if (rowData.ledgerRecords.isNotEmpty()) {
            val r = rowData.ledgerRecords[0]
            t1 = "${dateUtil.DateToString(r.lrSubmitdate, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_CN)}"
            t1 = "${DateUtil.DateToString(r.lrSubmitdate, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_CN)}"
            val random = Random(Date().time).nextLong(0, 6)
            val checkTime = LocalDateTime.ofInstant(r.lrSubmitdate.toInstant(), ZoneId.systemDefault()).plusDays(random)
            t2 = checkTime.format(DateTimeFormatter.ofPattern("yyyyå¹´MM月dd日"))
src/main/kotlin/cn/flightfeather/supervision/common/exception/BizException.kt
@@ -6,8 +6,8 @@
class BizException : Exception {
    constructor():super()
    constructor(message: String) : super(message)
    constructor(message: String, cause: Throwable) : super(message, cause)
    constructor(cause: Throwable) : super(cause)
    constructor(message: String, cause: Throwable, enableSuppression: Boolean, writableStackTrace: Boolean)
    constructor(message: String, cause: Throwable?) : super(message, cause)
    constructor(cause: Throwable?) : super(cause)
    constructor(message: String, cause: Throwable?, enableSuppression: Boolean, writableStackTrace: Boolean)
            : super(message, cause, enableSuppression, writableStackTrace)
}
src/main/kotlin/cn/flightfeather/supervision/common/utils/CacheUtil.kt
ÎļþÒÑɾ³ý
src/main/kotlin/cn/flightfeather/supervision/common/utils/DateUtil.kt
@@ -6,8 +6,7 @@
import java.text.SimpleDateFormat
import java.util.*
@Component
class DateUtil {
object DateUtil {
    private val threadLocal = ThreadLocal<SimpleDateFormat>()
    private val `object` = Any()
src/main/kotlin/cn/flightfeather/supervision/common/utils/FileUtil.kt
@@ -1,10 +1,9 @@
package cn.flightfeather.supervision.common.utils
import java.awt.Image
import java.awt.image.BufferedImage
import cn.flightfeather.supervision.common.exception.BizException
import org.springframework.web.multipart.MultipartFile
import java.io.*
import java.util.*
import javax.imageio.ImageIO
object FileUtil {
@@ -20,13 +19,24 @@
        out.close()
    }
    fun delFile(path: String): Boolean {
        val file = File(path)
        if (!file.exists()) return false
        if (file.isDirectory) return false
        try {
            file.delete()
            return true
        } catch (e: Exception) {
            throw BizException("文件删除出错", e.cause)
        }
    }
    //删除文件夹
    fun delFolder(folderPath: String) {
        try {
            delAllFile(folderPath) //删除完里面所有内容
            var filePath = folderPath
            filePath = filePath
            val myFilePath = java.io.File(filePath)
            val filePath = folderPath
            val myFilePath = File(filePath)
            myFilePath.delete() //删除空文件夹
        } catch (e: Exception) {
            e.printStackTrace()
@@ -117,6 +127,23 @@
        }
    }
    fun saveFiles(files: Array<MultipartFile>, basePath: String, path: String): List<String> {
        val pathList = mutableListOf<String>()
        files.forEach { file ->
            val ext = file.resource.file.extension
            val fileName = UUID.randomUUID().toString() + "." + ext
            pathList.add("$path$fileName")
            val absolutePath = "${basePath}/$path/"
            try {
                //调用文件保存方法
                uploadFile(file.bytes, absolutePath, fileName)
            } catch (e: Exception) {
                // TODO: handle exception
            }
        }
        return pathList
    }
    /**
     * æŒ‰ç…§å›ºå®šå®½åº¦åŽ‹ç¼©å›¾ç‰‡è‡³base64形式
     */
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DeviceInfo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,251 @@
package cn.flightfeather.supervision.domain.ds1.entity;
import java.util.Date;
import javax.persistence.*;
@Table(name = "sm_t_device_info")
public class DeviceInfo {
    @Id
    @Column(name = "DI_ID")
    private Integer diId;
    /**
     * ç›‘测设备MN编号
     */
    @Column(name = "DI_Mn_Code")
    private String diMnCode;
    /**
     * ç«™ç‚¹åç§°
     */
    @Column(name = "DI_Name")
    private String diName;
    /**
     * æ‰€å±žåœºæ™¯id
     */
    @Column(name = "DI_Scene_GUID")
    private String diSceneGuid;
    /**
     * è®¾å¤‡ä¾›åº”商
     */
    @Column(name = "DI_Supplier")
    private String diSupplier;
    /**
     * è¿ç»´å•†
     */
    @Column(name = "DI_Maintainer")
    private String diMaintainer;
    /**
     * è¿è¡ŒçŠ¶æ€(1:上线中;0:下线)
     */
    @Column(name = "DI_Running_Status")
    private Byte diRunningStatus;
    /**
     * æ˜¯å¦æ‹†é™¤
     */
    @Column(name = "DI_Removed")
    private Boolean diRemoved;
    /**
     * è®¾å¤‡ç±»åž‹(1: ç›‘测设备; 2: å‡€åŒ–设备)
     */
    @Column(name = "DI_Type")
    private Byte diType;
    @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;
    }
    /**
     * èŽ·å–ç›‘æµ‹è®¾å¤‡MN编号
     *
     * @return DI_Mn_Code - ç›‘测设备MN编号
     */
    public String getDiMnCode() {
        return diMnCode;
    }
    /**
     * è®¾ç½®ç›‘测设备MN编号
     *
     * @param diMnCode ç›‘测设备MN编号
     */
    public void setDiMnCode(String diMnCode) {
        this.diMnCode = diMnCode == null ? null : diMnCode.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();
    }
    /**
     * èŽ·å–è®¾å¤‡ä¾›åº”å•†
     *
     * @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();
    }
    /**
     * èŽ·å–è¿è¡ŒçŠ¶æ€(1:上线中;0:下线)
     *
     * @return DI_Running_Status - è¿è¡ŒçŠ¶æ€(1:上线中;0:下线)
     */
    public Byte getDiRunningStatus() {
        return diRunningStatus;
    }
    /**
     * è®¾ç½®è¿è¡ŒçŠ¶æ€(1:上线中;0:下线)
     *
     * @param diRunningStatus è¿è¡ŒçŠ¶æ€(1:上线中;0:下线)
     */
    public void setDiRunningStatus(Byte diRunningStatus) {
        this.diRunningStatus = diRunningStatus;
    }
    /**
     * èŽ·å–æ˜¯å¦æ‹†é™¤
     *
     * @return DI_Removed - æ˜¯å¦æ‹†é™¤
     */
    public Boolean getDiRemoved() {
        return diRemoved;
    }
    /**
     * è®¾ç½®æ˜¯å¦æ‹†é™¤
     *
     * @param diRemoved æ˜¯å¦æ‹†é™¤
     */
    public void setDiRemoved(Boolean diRemoved) {
        this.diRemoved = diRemoved;
    }
    /**
     * èŽ·å–è®¾å¤‡ç±»åž‹(1: ç›‘测设备; 2: å‡€åŒ–设备)
     *
     * @return DI_Type - è®¾å¤‡ç±»åž‹(1: ç›‘测设备; 2: å‡€åŒ–设备)
     */
    public Byte getDiType() {
        return diType;
    }
    /**
     * è®¾ç½®è®¾å¤‡ç±»åž‹(1: ç›‘测设备; 2: å‡€åŒ–设备)
     *
     * @param diType è®¾å¤‡ç±»åž‹(1: ç›‘测设备; 2: å‡€åŒ–设备)
     */
    public void setDiType(Byte diType) {
        this.diType = diType;
    }
    /**
     * @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/DeviceLocation.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,238 @@
package cn.flightfeather.supervision.domain.ds1.entity;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;
@Table(name = "sm_t_device_location")
public class DeviceLocation {
    @Id
    @Column(name = "DL_ID")
    private Integer dlId;
    /**
     * æ‰€å±žè®¾å¤‡id
     */
    @Column(name = "DL_Device_Id")
    private Integer dlDeviceId;
    /**
     * ç›‘测设备MN编号
     */
    @Column(name = "DL_Mn_Code")
    private String dlMnCode;
    /**
     * è®¾å¤‡ä½ç½®
     */
    @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;
    /**
     * è®¾å¤‡çŽ°åœºå›¾ç‰‡
     */
    @Column(name = "DL_Pic_Url")
    private String dlPicUrl;
    @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;
    }
    /**
     * èŽ·å–ç›‘æµ‹è®¾å¤‡MN编号
     *
     * @return DL_Mn_Code - ç›‘测设备MN编号
     */
    public String getDlMnCode() {
        return dlMnCode;
    }
    /**
     * è®¾ç½®ç›‘测设备MN编号
     *
     * @param dlMnCode ç›‘测设备MN编号
     */
    public void setDlMnCode(String dlMnCode) {
        this.dlMnCode = dlMnCode == null ? null : dlMnCode.trim();
    }
    /**
     * èŽ·å–è®¾å¤‡ä½ç½®
     *
     * @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();
    }
    /**
     * èŽ·å–è®¾å¤‡çŽ°åœºå›¾ç‰‡
     *
     * @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_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/mapper/DeviceInfoMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
package cn.flightfeather.supervision.domain.ds1.mapper;
import cn.flightfeather.supervision.domain.ds1.entity.DeviceInfo;
import cn.flightfeather.supervision.domain.util.MyMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface DeviceInfoMapper extends MyMapper<DeviceInfo> {
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DeviceLocationMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
package cn.flightfeather.supervision.domain.ds1.mapper;
import cn.flightfeather.supervision.domain.ds1.entity.DeviceLocation;
import cn.flightfeather.supervision.domain.util.MyMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface DeviceLocationMapper extends MyMapper<DeviceLocation> {
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/DeviceRep.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,60 @@
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 org.springframework.stereotype.Repository
/**
 *
 * @date 2024/7/24
 * @author feiyu02
 */
@Repository
class DeviceRep(
    private val deviceInfoMapper: DeviceInfoMapper,
    private val deviceLocationMapper: DeviceLocationMapper,
) {
    /***--DeviceInfo--***/
    fun findDevice(sceneId: String): DeviceInfo? {
        return deviceInfoMapper.selectByPrimaryKey(sceneId)
    }
    fun findDeviceList(sceneId: String): List<DeviceInfo> {
        return findDeviceList(DeviceInfo().apply { diSceneGuid = sceneId })
    }
    fun findDeviceList(deviceInfo: DeviceInfo): List<DeviceInfo> {
        return deviceInfoMapper.select(deviceInfo)
    }
    fun insertDevice(deviceInfo: DeviceInfo): Int {
        return deviceInfoMapper.insert(deviceInfo)
    }
    fun updateDevice(deviceInfo: DeviceInfo): Int {
        return deviceInfoMapper.updateByPrimaryKey(deviceInfo)
    }
    /***--DeviceLocation--***/
    fun findLocation(id: Int): DeviceLocation? {
        return deviceLocationMapper.selectByPrimaryKey(id)
    }
    fun findLocations(deviceId: Int): List<DeviceLocation> {
        return findLocations(DeviceLocation().apply { dlDeviceId = deviceId })
    }
    fun findLocations(location: DeviceLocation): List<DeviceLocation> {
        return deviceLocationMapper.select(location)
    }
    fun insertLocation(location: DeviceLocation): Int {
        return deviceLocationMapper.insert(location)
    }
    fun updateLocation(location: DeviceLocation): Int {
        return deviceLocationMapper.updateByPrimaryKey(location)
    }
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/RegionRep.kt
@@ -1,6 +1,5 @@
package cn.flightfeather.supervision.domain.ds1.repository
import cn.flightfeather.supervision.common.utils.CacheUtil
import cn.flightfeather.supervision.domain.ds1.entity.City
import cn.flightfeather.supervision.domain.ds1.entity.District
import cn.flightfeather.supervision.domain.ds1.entity.Province
@@ -10,7 +9,6 @@
import cn.flightfeather.supervision.domain.ds1.mapper.ProvinceMapper
import cn.flightfeather.supervision.domain.ds1.mapper.TownMapper
import org.springframework.stereotype.Repository
import tk.mybatis.mapper.entity.Example
/**
 * åœ°åŸŸä¿¡æ¯ç›¸å…³æ•°æ®åº“操作
@@ -21,7 +19,6 @@
    private val cityMapper: CityMapper,
    private val districtMapper: DistrictMapper,
    private val townMapper: TownMapper,
    private val cacheUtil: CacheUtil,
) {
    private val cacheMap = mutableMapOf<String, Any?>()
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/repository/ComplaintAndPunishmentRep.kt
@@ -17,7 +17,6 @@
class ComplaintAndPunishmentRep(
    private val complaintMapper: ComplaintMapper,
    private val punishmentMapper: PunishmentMapper,
    private val dateUtil: DateUtil,
){
@@ -27,8 +26,8 @@
     * @param tzUserIdList é£žç¾½çŽ¯å¢ƒç³»ç»Ÿä¸‹çš„ç”¨æˆ·id列表
     */
    fun findComplaint(tzUserIdList: List<String?>, sTime: Date?, eTime: Date?): List<ComplaintVo?> {
        val s = dateUtil.DateToString(sTime, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS)
        val e = dateUtil.DateToString(eTime, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS)
        val s = DateUtil.DateToString(sTime, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS)
        val e = DateUtil.DateToString(eTime, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS)
        return findComplaint(tzUserIdList, s, e)
    }
@@ -47,8 +46,8 @@
     * @param tzUserIdList é£žç¾½çŽ¯å¢ƒç³»ç»Ÿä¸‹çš„ç”¨æˆ·id列表
     */
    fun findPunishment(tzUserIdList: List<String?>, sTime: Date?, eTime: Date?): List<PunishmentVo?> {
        val s = dateUtil.DateToString(sTime, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS)
        val e = dateUtil.DateToString(eTime, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS)
        val s = DateUtil.DateToString(sTime, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS)
        val e = DateUtil.DateToString(eTime, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS)
        return findPunishment(tzUserIdList, s, e)
    }
src/main/kotlin/cn/flightfeather/supervision/domain/ds3/mapper/FumeExceptionDataMapper.java
@@ -1,8 +1,7 @@
package cn.flightfeather.supervision.domain.ds3.mapper;
import cn.flightfeather.supervision.domain.ds3.entity.FumeExceptionData;
import cn.flightfeather.supervision.domain.util.MyMapper;
import tk.mybatis.mapper.common.Mapper;
public interface FumeExceptionDataMapper extends MyMapper<FumeExceptionData> {
public interface FumeExceptionDataMapper extends Mapper<FumeExceptionData> {
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/DeviceService.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
package cn.flightfeather.supervision.lightshare.service
import cn.flightfeather.supervision.domain.ds1.entity.DeviceInfo
import cn.flightfeather.supervision.domain.ds1.entity.DeviceLocation
import org.springframework.web.multipart.MultipartFile
interface DeviceService {
    fun findDevices(sceneId: String): List<DeviceInfo>
    /**
     * æ–°å¢žè®¾å¤‡ä¿¡æ¯
     */
    fun insertDevice(deviceInfo: DeviceInfo): Int
    /**
     * æ›´æ–°è®¾å¤‡ä¿¡æ¯
     */
    fun updateDevice(deviceInfo: DeviceInfo): Int
    fun findDeviceLocations(deviceId: Int): List<DeviceLocation>
    /**
     *新增设备位置变更信息
     */
    fun insertDeviceLocation(deviceLocation: String, files: Array<MultipartFile>): Int
    /**
     *更新设备及图片
     */
    fun updateDeviceLocation(deviceLocation: String, deleteImg: List<String>, files: Array<MultipartFile>): Int
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DeviceServiceImpl.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,79 @@
package cn.flightfeather.supervision.lightshare.service.impl
import cn.flightfeather.supervision.common.exception.BizException
import cn.flightfeather.supervision.common.utils.Constant
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.repository.DeviceRep
import cn.flightfeather.supervision.lightshare.service.DeviceService
import org.springframework.stereotype.Service
import org.springframework.web.multipart.MultipartFile
import java.util.*
/**
 *
 * @date 2024/7/24
 * @author feiyu02
 */
@Service
class DeviceServiceImpl(private val deviceRep: DeviceRep) : DeviceService {
    companion object{
        private const val BASE_IMG_PATH = "${Constant.DEFAULT_FILE_PATH}/images/"
    }
    override fun findDevices(sceneId: String): List<DeviceInfo> {
        return deviceRep.findDeviceList(sceneId)
    }
    override fun insertDevice(deviceInfo: DeviceInfo): Int {
        return deviceRep.insertDevice(deviceInfo)
    }
    override fun updateDevice(deviceInfo: DeviceInfo): Int {
        return deviceRep.updateDevice(deviceInfo)
    }
    override fun findDeviceLocations(deviceId: Int): List<DeviceLocation> {
        return deviceRep.findLocations(deviceId)
    }
    override fun insertDeviceLocation(deviceLocation: String, files: Array<MultipartFile>): Int {
        val obj = JsonUtil.gson.fromJson(deviceLocation, DeviceLocation::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}")
        obj.dlPicUrl = picPath.joinToString(";")
        return deviceRep.insertLocation(obj)
    }
    override fun updateDeviceLocation(
        deviceLocation: String,
        deleteImg: List<String>,
        files: Array<MultipartFile>,
    ): Int {
        // èŽ·å–æ›´æ–°ä¿¡æ¯
        val obj = JsonUtil.gson.fromJson(deviceLocation, DeviceLocation::class.java)
        // èŽ·å–åŽŸä½ç½®ä¿¡æ¯ï¼Œåˆ é™¤å›¾ç‰‡è·¯å¾„å’Œå¯¹åº”å›¾ç‰‡
        val dL = deviceRep.findLocation(obj.dlId) ?: throw BizException("该设备位置信息不存在,无法修改")
        val oldImg = dL.dlPicUrl.split(";").toMutableList()
        deleteImg.forEach {
            if (oldImg.contains(it)) {
                if (FileUtil.delFile(BASE_IMG_PATH + it)) {
                    oldImg.remove(it)
                }
            }
        }
        // ä¿å­˜æ–°å¢žå›¾ç‰‡
        val time = DateUtil.DateToString(obj.dlCreateTime, DateUtil.DateStyle.YYYY_MM_DD)
        val picPath = FileUtil.saveFiles(files, BASE_IMG_PATH, "device/${obj.dlId}/${time}")
        oldImg.addAll(picPath)
        obj.dlPicUrl = oldImg.joinToString(";")
        return deviceRep.updateLocation(obj)
    }
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/EvaluationServiceImpl.kt
@@ -218,7 +218,7 @@
        val example = Example(Subtask::class.java)
        val criteria = example.createCriteria()
        criteria.andEqualTo("districtcode", districtCode)
        val date = DateUtil().StringToDate(time)
        val date = DateUtil.StringToDate(time)
        criteria.andGreaterThanOrEqualTo("planstarttime", time)
        val subTaskList = subtaskMapper.selectByExample(example)
        subTaskList.forEach {
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/InspectionServiceImpl.kt
@@ -34,8 +34,6 @@
    @Autowired
    lateinit var subtaskService: SubtaskService
    private val dateUtil = DateUtil()
    //获取污染场景版本主页的监管情况展示内容
    override fun getInspectionInfoByScene(sceneId: String, topTaskId: String): InspectionInfoVo? {
        val resList = inspectionMapper.getInspectionInfoByScene(sceneId, topTaskId)
@@ -78,7 +76,7 @@
        val example = Example(Inspection::class.java)
        val criteria = example.createCriteria()
        criteria.andEqualTo("sguid", id)
        criteria.andLessThan("executionstarttime", DateUtil().StringToDate(date))
        criteria.andLessThan("executionstarttime", DateUtil.StringToDate(date))
        //添加巡查按执行时间排序*****
        example.orderBy("executionstarttime").desc()
        //**************************
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt
@@ -452,7 +452,7 @@
                response.success = false
                response.message = "问题更新失败!"
            } else {
                bizLog.info(WorkStreamLogInfo(subtask?.executorguids, subtask?.executorrealtimes, event))
                bizLog.info(WorkStreamLogInfo(userId, userName, event))
            }
        }
        return response
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt
@@ -68,8 +68,6 @@
    @Value("\${imgPath}") var imgPath: String,
) : SearchService {
    private val dateUtil = DateUtil()
    override fun writeToFile(config: ExcelConfigVo, mode: Int) {
        val dbMapper = DbMapper(
            scenseMapper,
@@ -258,7 +256,7 @@
        }
        //建立第一层目录,包含所有的任务
        val time = dateUtil.DateToString(Date(), "yyyy-MM-dd_HH-mm-ss")
        val time = DateUtil.DateToString(Date(), "yyyy-MM-dd_HH-mm-ss")
        var basePath =
            Constant.DEFAULT_FILE_PATH + File.separator + "images" + File.separator + "temp" + File.separator + time
        var file = File(basePath)
@@ -351,7 +349,7 @@
    override fun downloadPic2(sceneType: Int, topTaskId: String, response: HttpServletResponse): HttpServletResponse {
        //建立第一层目录,包含所有的任务
        val topTask = taskMapper.selectByPrimaryKey(topTaskId)
        val time = dateUtil.DateToString(Date(), "yyyy-MM-dd_HH-mm-ss")
        val time = DateUtil.DateToString(Date(), "yyyy-MM-dd_HH-mm-ss")
        val basePath =
            Constant.DEFAULT_FILE_PATH + File.separator + "images" + File.separator + "temp" + File.separator + topTask.name
        val file = File(basePath)
@@ -372,7 +370,7 @@
                //建立一个子任务文件夹
                var subTaskFilePath = "${basePath}${File.separator}(${
                    dateUtil.DateToString(
                    DateUtil.DateToString(
                        it.planstarttime,
                        DateUtil.DateStyle.YYYY_MM_DD_CN
                    )
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt
@@ -31,8 +31,6 @@
    private val subTaskRep: SubTaskRep,
) : SubtaskService {
    val dateUtil = DateUtil()
    @Autowired
    lateinit var taskService: TaskService
    @Autowired
@@ -188,25 +186,25 @@
            dateString = date.substring(0, 7)
        }
        //判断参数是否正确
        if (dateUtil.StringToDate(dateString) == null) {
        if (DateUtil.StringToDate(dateString) == null) {
            return taskPackList
        }
        //根据type类型,得到具体是要哪三个月数据
        when (type) {
            "Middle" -> {
                one = dateUtil.addMonth(dateString, -1)
                one = DateUtil.addMonth(dateString, -1)
                two = dateString
                three = dateUtil.addMonth(dateString, 1)
                three = DateUtil.addMonth(dateString, 1)
            }
            "Left" -> {
                one = dateUtil.addMonth(dateString, 1)
                two = dateUtil.addMonth(dateString, 2)
                three = dateUtil.addMonth(dateString, 3)
                one = DateUtil.addMonth(dateString, 1)
                two = DateUtil.addMonth(dateString, 2)
                three = DateUtil.addMonth(dateString, 3)
            }
            "Right" -> {
                one = dateUtil.addMonth(dateString, -1)
                two = dateUtil.addMonth(dateString, -2)
                three = dateUtil.addMonth(dateString, -3)
                one = DateUtil.addMonth(dateString, -1)
                two = DateUtil.addMonth(dateString, -2)
                three = DateUtil.addMonth(dateString, -3)
            }
            else -> {
                //参数不正确就返回
@@ -242,25 +240,25 @@
            dateString = date.substring(0, 7)
        }
        //判断参数是否正确
        if (dateUtil.StringToDate(dateString) == null) {
        if (DateUtil.StringToDate(dateString) == null) {
            return taskPackList
        }
        //根据type类型,得到具体是要哪三个月数据
        when (type) {
            "Middle" -> {
                one = dateUtil.addMonth(dateString, -1)
                one = DateUtil.addMonth(dateString, -1)
                two = dateString
                three = dateUtil.addMonth(dateString, 1)
                three = DateUtil.addMonth(dateString, 1)
            }
            "Left" -> {
                one = dateUtil.addMonth(dateString, 1)
                two = dateUtil.addMonth(dateString, 2)
                three = dateUtil.addMonth(dateString, 3)
                one = DateUtil.addMonth(dateString, 1)
                two = DateUtil.addMonth(dateString, 2)
                three = DateUtil.addMonth(dateString, 3)
            }
            "Right" -> {
                one = dateUtil.addMonth(dateString, -1)
                two = dateUtil.addMonth(dateString, -2)
                three = dateUtil.addMonth(dateString, -3)
                one = DateUtil.addMonth(dateString, -1)
                two = DateUtil.addMonth(dateString, -2)
                three = DateUtil.addMonth(dateString, -3)
            }
            else -> {
                //参数不正确就返回
@@ -393,7 +391,7 @@
        val toptaskVo = taskService.findByID(subtask.tguid.toString())
//        //根据日期获取日任务
//        val daytaskVo = taskService.findByDate(dateUtil.getDate(subtask.planstarttime)!!)
//        val daytaskVo = taskService.findByDate(DateUtil.getDate(subtask.planstarttime)!!)
        //应该直接根据子任务的日任务id查询日任务
        val daytaskVo = taskService.findByID(subtask.tsguid!!)
@@ -407,9 +405,9 @@
            task.tsguid = toptaskVo.tguid
            task.tguid = guid
            task.name = subtask.name
            task.starttime = dateUtil.StringToDate(dateUtil.getDate(subtask.planstarttime)!!.substring(0, 10))
            task.starttime = DateUtil.StringToDate(DateUtil.getDate(subtask.planstarttime)!!.substring(0, 10))
            task.endtime =
                    dateUtil.StringToDate(dateUtil.getDate(subtask.planstarttime)!!.substring(0, 10) + " 23:59:59")
                    DateUtil.StringToDate(DateUtil.getDate(subtask.planstarttime)!!.substring(0, 10) + " 23:59:59")
            //****日任务执行状态继承子任务的状态*(修改)***
            task.runingstatus = subtask.status
            //********************************************
@@ -517,7 +515,7 @@
            cal.set(Calendar.MILLISECOND, 0)
            cal.time
        } else {
            DateUtil().StringToDate(startTime!!)
            DateUtil.StringToDate(startTime!!)
        }
        val _endTime = if (endTime.isNullOrBlank()) {
@@ -528,7 +526,7 @@
            cal.set(Calendar.MILLISECOND, 999)
            cal.time
        } else {
            DateUtil().StringToDate(endTime!!)?.apply {
            DateUtil.StringToDate(endTime!!)?.apply {
                time += 24 * 60 * 60 * 1000
            }
        }
@@ -593,7 +591,7 @@
        }
        val time = if (updateTime != null) {
            DateUtil().StringToDate(updateTime)
            DateUtil.StringToDate(updateTime)
        } else {
            null
        }
@@ -612,7 +610,7 @@
                cal.set(Calendar.MILLISECOND, 0)
                cal.time
            } else {
                DateUtil().StringToDate(startTime!!)
                DateUtil.StringToDate(startTime!!)
            }
            val _endTime = if (endTime.isNullOrBlank()) {
@@ -623,7 +621,7 @@
                cal.set(Calendar.MILLISECOND, 999)
                cal.time
            } else {
                DateUtil().StringToDate(endTime!!)?.apply {
                DateUtil.StringToDate(endTime!!)?.apply {
                    this.time += 24 * 60 * 60 * 1000
                }
            }
@@ -744,7 +742,7 @@
        }
        val time = if (updateTime != null) {
            DateUtil().StringToDate(updateTime)
            DateUtil.StringToDate(updateTime)
        } else {
            null
        }
@@ -763,7 +761,7 @@
                cal.set(Calendar.MILLISECOND, 0)
                cal.time
            } else {
                DateUtil().StringToDate(startTime!!)
                DateUtil.StringToDate(startTime!!)
            }
            val _endTime = if (endTime.isNullOrBlank()) {
@@ -774,7 +772,7 @@
                cal.set(Calendar.MILLISECOND, 999)
                cal.time
            } else {
                DateUtil().StringToDate(endTime!!)?.apply {
                DateUtil.StringToDate(endTime!!)?.apply {
                    this.time += 24 * 60 * 60 * 1000
                }
            }
@@ -895,7 +893,7 @@
    }
    override fun findByDate(date: String, userId: String): List<SubtaskVo> {
        val time = DateUtil().StringToDate(date)
        val time = DateUtil.StringToDate(date)
        val resultList = mutableListOf<SubtaskVo>()
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt
@@ -8,6 +8,7 @@
import cn.flightfeather.supervision.domain.ds1.mapper.TaskMapper
import cn.flightfeather.supervision.common.utils.Constant
import cn.flightfeather.supervision.common.utils.DateUtil
import cn.flightfeather.supervision.domain.ds1.repository.SubTaskRep
import cn.flightfeather.supervision.domain.ds1.repository.TaskRep
import cn.flightfeather.supervision.lightshare.service.*
import cn.flightfeather.supervision.lightshare.vo.*
@@ -22,6 +23,7 @@
class TaskServiceImpl(
    val taskMapper: TaskMapper,
    private val taskRep: TaskRep,
    private val subTaskRep: SubTaskRep,
) : TaskService {
    @Autowired
@@ -181,7 +183,7 @@
        val example = Example(Task::class.java)
        val criteria = example.createCriteria()
        //gsguid不为空为日任务,日任务开始时间和结束时间在同一天,过滤开始时间就ok
        criteria.andEqualTo("starttime", dateUtil.StringToDate(date.substring(0, 10)))
        criteria.andEqualTo("starttime", DateUtil.StringToDate(date.substring(0, 10)))
        criteria.andIsNotNull("tsguid")
        val tasklist = taskMapper.selectByExample(example)
        if (tasklist.isNotEmpty()) {
@@ -287,8 +289,6 @@
        return if (tasks.isEmpty()) Task() else tasks[0]
    }
    val dateUtil = DateUtil()
    //根据顶层列表,日期,和执行人员ID,用户类型获取日任务
    override fun getDayTaskList(taskVoList: List<TaskVo>, date: String, guid: String, userType: String): List<TaskVo> {
        if (taskVoList.isEmpty()) return taskVoList
@@ -297,9 +297,9 @@
            val criteria = example.createCriteria()
            //构造查询条件
            criteria.andEqualTo("tsguid", it.tguid)
            val dateTemo = dateUtil.StringToDate(date)
            val dateTemo = DateUtil.StringToDate(date)
            //条件过滤
            criteria.andBetween("starttime", dateTemo, dateUtil.addSecond(dateUtil.addMonth(dateTemo!!, 1)!!, 1))
            criteria.andBetween("starttime", dateTemo, DateUtil.addSecond(DateUtil.addMonth(dateTemo!!, 1)!!, 1))
            if (userType == "1") {
                criteria.andLike("executorguids", "%$guid%")
            }
@@ -379,9 +379,9 @@
            val criteria = example.createCriteria()
            //构造查询条件
            criteria.andEqualTo("tsguid", it.tguid)
            val dateTemo = dateUtil.StringToDate(date)
            val dateTemo = DateUtil.StringToDate(date)
            //条件过滤
            criteria.andBetween("starttime", dateTemo, dateUtil.addSecond(dateUtil.addMonth(dateTemo!!, 1)!!, 1))
            criteria.andBetween("starttime", dateTemo, DateUtil.addSecond(DateUtil.addMonth(dateTemo!!, 1)!!, 1))
            criteria.andLike("executorguids", "%$guid%")
            //根据sql条件查询
            val taskList = taskMapper.selectByExample(example)
@@ -402,10 +402,10 @@
        if (date.length < 7) {
            return taskVoList
        }
        val startDate = DateUtil().StringToDate(date.substring(0, 7)) ?: return taskVoList
        val startDate = DateUtil.StringToDate(date.substring(0, 7)) ?: return taskVoList
        //查询一个月任务
        var endDate = DateUtil().addMonth(startDate, 1) ?: return taskVoList
        endDate = DateUtil().addSecond(endDate, -1)!!
        var endDate = DateUtil.addMonth(startDate, 1) ?: return taskVoList
        endDate = DateUtil.addSecond(endDate, -1)!!
        //构造查询条件
        val example = Example(Task::class.java)
        val criteria = example.createCriteria()
@@ -454,22 +454,22 @@
//            return taskVoList
//        }
//        //时间转换
//        val d1 = DateUtil().StringToDate(date.substring(0, 7)) ?: return taskVoList
//        val d1 = DateUtil.StringToDate(date.substring(0, 7)) ?: return taskVoList
//        var startDate: Date? = null
//        var endDate: Date? = null
//        //根据type类型,得到要查询的范围
//        when (type) {
//            "Middle" -> {
//                startDate = DateUtil().addMonth(d1, -1);endDate = DateUtil().addMonth(d1, 2)
//                startDate = DateUtil.addMonth(d1, -1);endDate = DateUtil.addMonth(d1, 2)
//            }
//            "Left" -> {
//                startDate = DateUtil().addMonth(d1, -3);endDate = d1
//                startDate = DateUtil.addMonth(d1, -3);endDate = d1
//            }
//            "Right" -> {
//                startDate = DateUtil().addMonth(d1, 1);endDate = DateUtil().addMonth(d1, 4)
//                startDate = DateUtil.addMonth(d1, 1);endDate = DateUtil.addMonth(d1, 4)
//            }
//            else -> {
//                startDate = d1;endDate = DateUtil().addMonth(d1, 1)
//                startDate = d1;endDate = DateUtil.addMonth(d1, 1)
//            }
//        }
//
@@ -498,10 +498,10 @@
        if (date.length < 7) {
            return taskVoList
        }
        val startDate = DateUtil().StringToDate(date.substring(0, 7)) ?: return taskVoList
        val startDate = DateUtil.StringToDate(date.substring(0, 7)) ?: return taskVoList
        //查询一个月任务
        var endDate = DateUtil().addMonth(startDate, 1) ?: return taskVoList
        endDate = DateUtil().addSecond(endDate, -1)!!
        var endDate = DateUtil.addMonth(startDate, 1) ?: return taskVoList
        endDate = DateUtil.addSecond(endDate, -1)!!
        //构造查询条件
        val example = Example(Task::class.java)
        val criteria = example.createCriteria()
@@ -752,7 +752,8 @@
                    count += c
                }
                totaltask = count
                completetask = subtaskService.getSummary(t.tguid!!, areaVo.scensetypeid?.toIntOrNull()).size
                subTaskSummary = subTaskRep.findSummary(areaVo)
                completetask = this.subTaskSummary?.size
            }
            res.add(pro)
        }
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,48 @@
package cn.flightfeather.supervision.lightshare.web
import cn.flightfeather.supervision.domain.ds1.entity.DeviceInfo
import cn.flightfeather.supervision.lightshare.service.DeviceService
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import io.swagger.annotations.ApiParam
import org.springframework.web.bind.annotation.*
import org.springframework.web.multipart.MultipartFile
@Api(tags = ["DeviceController"], description = "监管场景相关设备API接口")
@RestController
@RequestMapping("/device")
class DeviceController(private val deviceService: DeviceService) {
    @ApiOperation("获取场景设备信息")
    @GetMapping
    fun fetchDevice(
        @ApiParam("场景id") sceneId: String,
    ) = resPack { deviceService.findDevices(sceneId) }
    @ApiOperation("新增场景设备信息")
    @PutMapping("/upload")
    fun uploadDevice(
        @ApiParam("设备信息") deviceInfo: DeviceInfo,
    ) = resPack { deviceService.insertDevice(deviceInfo) }
    @ApiOperation("更新场景设备信息")
    @PostMapping("/update")
    fun updateDevice(
        @ApiParam("设备信息") deviceInfo: DeviceInfo,
    ) = resPack { deviceService.updateDevice(deviceInfo) }
    @ApiOperation("新增场景设备位置变更信息")
    @PutMapping("/location/upload")
    fun uploadDeviceLocation(
        @ApiParam("设备位置信息json") @RequestParam("location") location: String,
        @ApiParam("设备图片") @RequestPart("images") images: Array<MultipartFile>,
    ) = resPack { deviceService.insertDeviceLocation(location, images) }
    @ApiOperation("更新场景设备位置变更信息")
    @PutMapping("/location/update")
    fun updateDeviceLocation(
        @ApiParam("设备位置信息json") @RequestParam("location") location: String,
        @ApiParam("删除的设备图片路径") @RequestPart("deleteImg") deleteImg: List<String>,
        @ApiParam("设备图片") @RequestPart("images") images: Array<MultipartFile>,
    ) = resPack { deviceService.updateDeviceLocation(location, deleteImg, images) }
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MenuController.kt
@@ -247,10 +247,10 @@
            val planstarttime = subtaskVo.planstarttime
            val planendtime = subtaskVo.planendtime
            if (planstarttime != null) {
                subtaskVo.planstarttimestr = DateUtil().DateToString(planstarttime, "yyyy-MM-dd")
                subtaskVo.planstarttimestr = DateUtil.DateToString(planstarttime, "yyyy-MM-dd")
            }
            if (planendtime != null) {
                subtaskVo.planendtimestr = DateUtil().DateToString(planendtime, "yyyy-MM-dd")
                subtaskVo.planendtimestr = DateUtil.DateToString(planendtime, "yyyy-MM-dd")
            }
        }
        val taskdayVolist = taskService.getDayTaskByTaskID(taskId)
@@ -308,10 +308,10 @@
            val starttime = taskVo.starttime
            val endtime = taskVo.endtime
            if (starttime != null) {
                taskVo.starttimestr = DateUtil().DateToString(starttime, "yyyy-MM-dd")
                taskVo.starttimestr = DateUtil.DateToString(starttime, "yyyy-MM-dd")
            }
            if (endtime != null) {
                taskVo.endtimestr = DateUtil().DateToString(endtime, "yyyy-MM-dd")
                taskVo.endtimestr = DateUtil.DateToString(endtime, "yyyy-MM-dd")
            }
        }
@@ -349,10 +349,10 @@
            val starttime = taskVo.starttime
            val endtime = taskVo.endtime
            if (starttime != null) {
                taskVo.starttimestr = DateUtil().DateToString(starttime, "yyyy-MM-dd")
                taskVo.starttimestr = DateUtil.DateToString(starttime, "yyyy-MM-dd")
            }
            if (endtime != null) {
                taskVo.endtimestr = DateUtil().DateToString(endtime, "yyyy-MM-dd")
                taskVo.endtimestr = DateUtil.DateToString(endtime, "yyyy-MM-dd")
            }
        }
        val taskVolist = taskService.findTopTask()
@@ -398,8 +398,8 @@
                    //新赋值guid
                    toptask.tguid = UUIDGenerator.generate16ShortUUID()
                    //日期变化
                    toptask.starttime = DateUtil().StringToDate(starttimestr)
                    toptask.endtime = DateUtil().StringToDate(starttimestr)
                    toptask.starttime = DateUtil.StringToDate(starttimestr)
                    toptask.endtime = DateUtil.StringToDate(starttimestr)
                    //新建任务发布为null
                    toptask.deploytime = null
                }
@@ -437,8 +437,8 @@
//            }
                task.tguid = UUIDGenerator.generate16ShortUUID()
                task.name = taskname
                task.starttime = DateUtil().StringToDate(taskVo.starttimestr!!)
                task.endtime = DateUtil().StringToDate(taskVo.endtimestr!!)
                task.starttime = DateUtil.StringToDate(taskVo.starttimestr!!)
                task.endtime = DateUtil.StringToDate(taskVo.endtimestr!!)
                task.settime = Date()
                taskService.save(task)
            }
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TableController.kt
@@ -48,7 +48,7 @@
    fun testdate() {
        val wordMLPackage = WordprocessingMLPackage.createPackage()
        wordMLPackage.mainDocumentPart.addAltChunk(AltChunkType.Html, t.block()!!.toString().toByteArray())
        val time = DateUtil().getTime(Date()).toString()
        val time = DateUtil.getTime(Date()).toString()
        val outputfilepath = File("/Users/liwei/resource/supervision/src/main/resources/public/htmltable.docx")
        wordMLPackage.save(outputfilepath)
        //Thread.sleep(1000)
@@ -68,7 +68,7 @@
        val paragraphOfText = wordMLPackage.mainDocumentPart.createParagraphOfText("Field 1")
        addTableCell(tr, paragraphOfText)
        val time = DateUtil().getTime(Date())
        val time = DateUtil.getTime(Date())
        val file = File("/Users/liwei/resource/supervision/src/main/resources/static/images/tutu.png")
        val paragraphWithImage = addInlineImageToParagraph(createInlineImage(file))
        addTableCell(tr, paragraphWithImage)
src/main/kotlin/cn/flightfeather/supervision/scheduler/ScheduleService.kt
@@ -43,8 +43,8 @@
        logger.info("=====>>>>>每日任务结束 {}", System.currentTimeMillis())
    }
    @Async
    @Scheduled(cron = "0 0 0 * * MON")
//    @Async
//    @Scheduled(cron = "0 0 0 * * MON")
    fun eachWeek() {
        if (mode != "pro") return
@@ -54,16 +54,27 @@
        logger.info("=====>>>>>每周任务结束 {}", System.currentTimeMillis())
    }
//    @Async
//    @Scheduled(cron = "0 0 0 1 * *")
    fun eachStartOfMonth() {
        if (mode != "pro") return
        logger.info("=====>>>>>每月1号任务执行 {}", System.currentTimeMillis())
        // è®¡ç®—去除扬尘监测数据后的评分
        aopTaskCtrl.startAllEvaluation(LocalDate.now().atStartOfDay().minusMonths(1))
        logger.info("=====>>>>>每月1号任务结束 {}", System.currentTimeMillis())
    }
    @Async
    @Scheduled(cron = "0 0 0 2 * *")
    fun eachMonth() {
        if (mode != "pro") return
        logger.info("=====>>>>>每月任务执行 {}", System.currentTimeMillis())
        logger.info("=====>>>>>每月2号任务执行 {}", System.currentTimeMillis())
        // æ‰§è¡Œä¸Šä¸ªæœˆçš„完整自评任务
        aopTaskCtrl.startAll(LocalDate.now().atStartOfDay().minusMonths(1))
        // æ‰§è¡Œé¡¶å±‚任务自动结束任务
        taskFinishTopTask.handle()
        logger.info("=====>>>>>每月任务结束 {}", System.currentTimeMillis())
        logger.info("=====>>>>>每月2号任务结束 {}", System.currentTimeMillis())
    }
}
src/main/resources/generator/generatorConfig4ds1.xml
@@ -56,7 +56,13 @@
<!--        <table tableName="ea_t_mediafile" domainObjectName="LedgerMediaFile" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"/>-->
<!--        <table tableName="ea_t_dust_data_result" domainObjectName="DustDataResult" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"-->
<!--               enableSelectByExample="false" selectByExampleQueryId="false"/>-->
        <table tableName="ea_t_evaluation" domainObjectName="Evaluation" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="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"
               enableUpdateByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" selectByExampleQueryId="false"/>
    </context>
</generatorConfiguration>
src/main/resources/mapper/ds1/DeviceInfoMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
<?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.DeviceInfoMapper" >
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds1.entity.DeviceInfo" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="DI_ID" property="diId" jdbcType="INTEGER" />
    <result column="DI_Mn_Code" property="diMnCode" jdbcType="VARCHAR" />
    <result column="DI_Name" property="diName" jdbcType="VARCHAR" />
    <result column="DI_Scene_GUID" property="diSceneGuid" jdbcType="VARCHAR" />
    <result column="DI_Supplier" property="diSupplier" jdbcType="VARCHAR" />
    <result column="DI_Maintainer" property="diMaintainer" jdbcType="VARCHAR" />
    <result column="DI_Running_Status" property="diRunningStatus" jdbcType="TINYINT" />
    <result column="DI_Removed" property="diRemoved" jdbcType="BIT" />
    <result column="DI_Type" property="diType" jdbcType="TINYINT" />
    <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_Mn_Code, DI_Name, DI_Scene_GUID, DI_Supplier, DI_Maintainer, DI_Running_Status,
    DI_Removed, DI_Type, DI_Create_Time, DI_Update_Time
  </sql>
</mapper>
src/main/resources/mapper/ds1/DeviceLocationMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
<?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.DeviceLocationMapper">
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds1.entity.DeviceLocation">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="DL_ID" jdbcType="INTEGER" property="dlId" />
    <result column="DL_Device_Id" jdbcType="INTEGER" property="dlDeviceId" />
    <result column="DL_Mn_Code" jdbcType="VARCHAR" property="dlMnCode" />
    <result column="DL_Location" jdbcType="VARCHAR" property="dlLocation" />
    <result column="DL_Longitude" jdbcType="DECIMAL" property="dlLongitude" />
    <result column="DL_Latitude" jdbcType="DECIMAL" property="dlLatitude" />
    <result column="DL_Standard" jdbcType="BIT" property="dlStandard" />
    <result column="DL_UnStandard_Reason" jdbcType="VARCHAR" property="dlUnstandardReason" />
    <result column="DL_Pic_Url" jdbcType="VARCHAR" property="dlPicUrl" />
    <result column="DL_Create_Time" jdbcType="TIMESTAMP" property="dlCreateTime" />
    <result column="DL_Update_Time" jdbcType="TIMESTAMP" property="dlUpdateTime" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
    -->
    DL_ID, DL_Device_Id, DL_Mn_Code, DL_Location, DL_Longitude, DL_Latitude, DL_Standard,
    DL_UnStandard_Reason, DL_Pic_Url, DL_Create_Time, DL_Update_Time
  </sql>
</mapper>
src/main/resources/mapper/ds1/MonitorobjectversionMapper.xml
@@ -5,9 +5,9 @@
    <!--
      WARNING - @mbg.generated
    -->
    <id column="MOV_ID" property="movId" jdbcType="VARCHAR" />
    <result column="T_ID" property="tId" jdbcType="VARCHAR" />
    <result column="S_GUID" property="sGuid" jdbcType="VARCHAR" />
    <id column="MOV_ID" property="movid" jdbcType="VARCHAR" />
    <result column="T_ID" property="tid" jdbcType="VARCHAR" />
    <result column="S_GUID" property="sguid" jdbcType="VARCHAR" />
    <result column="MOV_SenseName" property="sensename" jdbcType="VARCHAR" />
    <result column="MOV_TaskTypeID" property="tasktypeid" jdbcType="TINYINT" />
    <result column="MOV_TaskType" property="tasktype" jdbcType="VARCHAR" />
src/main/resources/mapper/ds3/FumeExceptionDataMapper.xml
@@ -5,13 +5,13 @@
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="dev_id" property="devId" jdbcType="VARCHAR" />
    <result column="exception" property="exception" jdbcType="VARCHAR" />
    <result column="exception_type" property="exceptionType" jdbcType="VARCHAR" />
    <result column="region" property="region" jdbcType="VARCHAR" />
    <result column="begin_time" property="beginTime" jdbcType="TIMESTAMP" />
    <result column="end_time" property="endTime" jdbcType="TIMESTAMP" />
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="dev_id" jdbcType="VARCHAR" property="devId" />
    <result column="exception" jdbcType="VARCHAR" property="exception" />
    <result column="exception_type" jdbcType="VARCHAR" property="exceptionType" />
    <result column="region" jdbcType="VARCHAR" property="region" />
    <result column="begin_time" jdbcType="TIMESTAMP" property="beginTime" />
    <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
src/test/kotlin/cn/flightfeather/supervision/business/bgtask/AopTaskCtrlTest.kt
@@ -40,8 +40,15 @@
    }
    @Test
    fun startMonthly() {
        aopTaskCtrl.startAll(LocalDate.now().atStartOfDay().minusMonths(1))
        val reader = BufferedReader(InputStreamReader(System.`in`))
        reader.readLine()
    }
    @Test
    fun startNewTask(){
        val time = LocalDate.of(2024, 6, 23).atStartOfDay()
        val time = LocalDate.of(2024, 7, 23).atStartOfDay()
        aopTaskCtrl.startNewTask(aopTaskCtrl.getArea(time, "310106", "静安区", Constant.SceneType.TYPE1))
        val reader = BufferedReader(InputStreamReader(System.`in`))
        reader.readLine()