已修改26个文件
已删除1个文件
已添加10个文件
| | |
| | | <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> |
| | |
| | | //æå°åå¼ï¼é»è®¤0åï¼ |
| | | var minScore: Int = 0 |
| | | |
| | | val dateUtil = DateUtil() |
| | | // è¯å项æ¯å¦è±å
䏿£å |
| | | var exemption = false |
| | | |
| | |
| | | @Autowired |
| | | lateinit var userinfoMapper: UserinfoMapper |
| | | |
| | | private val dateUtil = DateUtil() |
| | | |
| | | @PostConstruct |
| | | fun init() { |
| | | instance = this |
| | |
| | | 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 |
| | | } |
| | |
| | | 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 |
| | |
| | | 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) |
| | |
| | | */ |
| | | class DataSource(val config: ExcelConfigVo, val dbMapper: DbMapper){ |
| | | |
| | | private val dateUtil = DateUtil() |
| | | |
| | | private val sourceList = mutableListOf<Subtask>() |
| | | |
| | | var year = 0 |
| | |
| | | */ |
| | | 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)}" |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | override fun onOneRow(rowData: DataSource.RowData): List<Any> { |
| | | val dateUtil = DateUtil() |
| | | val row = mutableListOf<Any>() |
| | | if (rowData.noRecord()) { |
| | | repeat(heads.last().size) { row.add(("")) } |
| | |
| | | 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("#", "ã") ?: "") |
| | | //æ¥è¯¢åä»»å¡å¯¹åºçé®é¢ï¼å¹¶ä¸æ ¹æ®æ¡ä»¶è¿è¡çé |
| | |
| | | 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()) { |
| | |
| | | } |
| | | |
| | | override fun onOneRow(rowData: DataSource.RowData): List<Any> { |
| | | val dateUtil = DateUtil() |
| | | rowData.ledgerRecords.sortedByDescending { |
| | | it.lrSubmitdate |
| | | } |
| | |
| | | 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æ¥")) |
| | |
| | | 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) |
| | | } |
| | |
| | | import java.text.SimpleDateFormat |
| | | import java.util.* |
| | | |
| | | @Component |
| | | class DateUtil { |
| | | object DateUtil { |
| | | private val threadLocal = ThreadLocal<SimpleDateFormat>() |
| | | |
| | | private val `object` = Any() |
| | |
| | | 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 { |
| | |
| | | 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() |
| | |
| | | } |
| | | } |
| | | |
| | | 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å½¢å¼ |
| | | */ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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) |
| | | } |
| | | } |
| | |
| | | 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 |
| | |
| | | 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 |
| | | |
| | | /** |
| | | * å°åä¿¡æ¯ç¸å
³æ°æ®åºæä½ |
| | |
| | | private val cityMapper: CityMapper, |
| | | private val districtMapper: DistrictMapper, |
| | | private val townMapper: TownMapper, |
| | | private val cacheUtil: CacheUtil, |
| | | ) { |
| | | private val cacheMap = mutableMapOf<String, Any?>() |
| | | |
| | |
| | | class ComplaintAndPunishmentRep( |
| | | private val complaintMapper: ComplaintMapper, |
| | | private val punishmentMapper: PunishmentMapper, |
| | | private val dateUtil: DateUtil, |
| | | ){ |
| | | |
| | | |
| | |
| | | * @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) |
| | | } |
| | | |
| | |
| | | * @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) |
| | | } |
| | | |
| | |
| | | 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> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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) |
| | | } |
| | | } |
| | |
| | | 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 { |
| | |
| | | @Autowired |
| | | lateinit var subtaskService: SubtaskService |
| | | |
| | | private val dateUtil = DateUtil() |
| | | |
| | | //è·å污æåºæ¯çæ¬ä¸»é¡µçç管æ
åµå±ç¤ºå
容 |
| | | override fun getInspectionInfoByScene(sceneId: String, topTaskId: String): InspectionInfoVo? { |
| | | val resList = inspectionMapper.getInspectionInfoByScene(sceneId, topTaskId) |
| | |
| | | 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() |
| | | //************************** |
| | |
| | | response.success = false |
| | | response.message = "é®é¢æ´æ°å¤±è´¥ï¼" |
| | | } else { |
| | | bizLog.info(WorkStreamLogInfo(subtask?.executorguids, subtask?.executorrealtimes, event)) |
| | | bizLog.info(WorkStreamLogInfo(userId, userName, event)) |
| | | } |
| | | } |
| | | return response |
| | |
| | | @Value("\${imgPath}") var imgPath: String, |
| | | ) : SearchService { |
| | | |
| | | private val dateUtil = DateUtil() |
| | | |
| | | override fun writeToFile(config: ExcelConfigVo, mode: Int) { |
| | | val dbMapper = DbMapper( |
| | | scenseMapper, |
| | |
| | | } |
| | | |
| | | //建ç«ç¬¬ä¸å±ç®å½ï¼å
嫿æçä»»å¡ |
| | | 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) |
| | |
| | | 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) |
| | |
| | | |
| | | //建ç«ä¸ä¸ªå任塿件夹 |
| | | var subTaskFilePath = "${basePath}${File.separator}(${ |
| | | dateUtil.DateToString( |
| | | DateUtil.DateToString( |
| | | it.planstarttime, |
| | | DateUtil.DateStyle.YYYY_MM_DD_CN |
| | | ) |
| | |
| | | private val subTaskRep: SubTaskRep, |
| | | ) : SubtaskService { |
| | | |
| | | val dateUtil = DateUtil() |
| | | |
| | | @Autowired |
| | | lateinit var taskService: TaskService |
| | | @Autowired |
| | |
| | | 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 -> { |
| | | //忰䏿£ç¡®å°±è¿å |
| | |
| | | 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 -> { |
| | | //忰䏿£ç¡®å°±è¿å |
| | |
| | | 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!!) |
| | |
| | | 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 |
| | | //******************************************** |
| | |
| | | cal.set(Calendar.MILLISECOND, 0) |
| | | cal.time |
| | | } else { |
| | | DateUtil().StringToDate(startTime!!) |
| | | DateUtil.StringToDate(startTime!!) |
| | | } |
| | | |
| | | val _endTime = if (endTime.isNullOrBlank()) { |
| | |
| | | cal.set(Calendar.MILLISECOND, 999) |
| | | cal.time |
| | | } else { |
| | | DateUtil().StringToDate(endTime!!)?.apply { |
| | | DateUtil.StringToDate(endTime!!)?.apply { |
| | | time += 24 * 60 * 60 * 1000 |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | val time = if (updateTime != null) { |
| | | DateUtil().StringToDate(updateTime) |
| | | DateUtil.StringToDate(updateTime) |
| | | } else { |
| | | null |
| | | } |
| | |
| | | cal.set(Calendar.MILLISECOND, 0) |
| | | cal.time |
| | | } else { |
| | | DateUtil().StringToDate(startTime!!) |
| | | DateUtil.StringToDate(startTime!!) |
| | | } |
| | | |
| | | val _endTime = if (endTime.isNullOrBlank()) { |
| | |
| | | cal.set(Calendar.MILLISECOND, 999) |
| | | cal.time |
| | | } else { |
| | | DateUtil().StringToDate(endTime!!)?.apply { |
| | | DateUtil.StringToDate(endTime!!)?.apply { |
| | | this.time += 24 * 60 * 60 * 1000 |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | val time = if (updateTime != null) { |
| | | DateUtil().StringToDate(updateTime) |
| | | DateUtil.StringToDate(updateTime) |
| | | } else { |
| | | null |
| | | } |
| | |
| | | cal.set(Calendar.MILLISECOND, 0) |
| | | cal.time |
| | | } else { |
| | | DateUtil().StringToDate(startTime!!) |
| | | DateUtil.StringToDate(startTime!!) |
| | | } |
| | | |
| | | val _endTime = if (endTime.isNullOrBlank()) { |
| | |
| | | cal.set(Calendar.MILLISECOND, 999) |
| | | cal.time |
| | | } else { |
| | | DateUtil().StringToDate(endTime!!)?.apply { |
| | | DateUtil.StringToDate(endTime!!)?.apply { |
| | | this.time += 24 * 60 * 60 * 1000 |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | override fun findByDate(date: String, userId: String): List<SubtaskVo> { |
| | | val time = DateUtil().StringToDate(date) |
| | | val time = DateUtil.StringToDate(date) |
| | | |
| | | val resultList = mutableListOf<SubtaskVo>() |
| | | |
| | |
| | | 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.* |
| | |
| | | class TaskServiceImpl( |
| | | val taskMapper: TaskMapper, |
| | | private val taskRep: TaskRep, |
| | | private val subTaskRep: SubTaskRep, |
| | | ) : TaskService { |
| | | |
| | | @Autowired |
| | |
| | | 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()) { |
| | |
| | | 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 |
| | |
| | | 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%") |
| | | } |
| | |
| | | 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) |
| | |
| | | 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() |
| | |
| | | // 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) |
| | | // } |
| | | // } |
| | | // |
| | |
| | | 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() |
| | |
| | | count += c |
| | | } |
| | | totaltask = count |
| | | completetask = subtaskService.getSummary(t.tguid!!, areaVo.scensetypeid?.toIntOrNull()).size |
| | | subTaskSummary = subTaskRep.findSummary(areaVo) |
| | | completetask = this.subTaskSummary?.size |
| | | } |
| | | res.add(pro) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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) } |
| | | } |
| | |
| | | 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) |
| | |
| | | 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 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() |
| | |
| | | //æ°èµå¼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 |
| | | } |
| | |
| | | // } |
| | | 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) |
| | | } |
| | |
| | | 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) |
| | |
| | | |
| | | 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) |
| | |
| | | logger.info("=====>>>>>æ¯æ¥ä»»å¡ç»æ {}", System.currentTimeMillis()) |
| | | } |
| | | |
| | | @Async |
| | | @Scheduled(cron = "0 0 0 * * MON") |
| | | // @Async |
| | | // @Scheduled(cron = "0 0 0 * * MON") |
| | | fun eachWeek() { |
| | | if (mode != "pro") return |
| | | |
| | |
| | | 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()) |
| | | } |
| | | } |
| | |
| | | <!-- <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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
| | |
| | | <!-- |
| | | 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" /> |
| | |
| | | <!-- |
| | | 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" > |
| | | <!-- |
| | |
| | | } |
| | | |
| | | @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() |