已修改24个文件
已删除1个文件
已添加14个文件
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.business.autooutput.dataanalysis |
| | | |
| | | import cn.flightfeather.supervision.common.utils.Constant |
| | | import cn.flightfeather.supervision.domain.ds2.repository.JADustSiteMapRep |
| | | import cn.flightfeather.supervision.domain.ds3.repository.JSDustSiteMapRep |
| | | import cn.flightfeather.supervision.domain.ds3.repository.XHFumeSiteMapRep |
| | | import cn.flightfeather.supervision.lightshare.vo.AreaVo |
| | | import cn.flightfeather.supervision.lightshare.vo.DeviceMapVo |
| | | import org.springframework.stereotype.Component |
| | | |
| | | /** |
| | | * çæµæ°æ®åç³»ç»ç¨æ·çæ å°ç®¡ç |
| | | */ |
| | | @Component |
| | | class AopDataDeviceMap( |
| | | private val jaDustSiteMapRep: JADustSiteMapRep, |
| | | private val jsDustSiteMapRep: JSDustSiteMapRep, |
| | | private val xhFumeSiteMapRep: XHFumeSiteMapRep, |
| | | ) { |
| | | |
| | | /** |
| | | * è·ååºåæ¡ä»¶ä¸ç设å¤åç¨æ·çæ å°å
³ç³» |
| | | */ |
| | | fun findMapSet(areaVo: AreaVo, userIdList: List<String?>): List<DeviceMapVo> { |
| | | return when (areaVo.sourceType) { |
| | | //以é£ç¾½ç¯å¢ç³»ç»ä¸çç¨æ·ä¸ºä¸»ä½ |
| | | 1 -> find1(areaVo, userIdList) |
| | | //以é£ç¾½ç管系ç»ä¸çç¨æ·ä¸ºä¸»ä½ |
| | | 2 -> find2(areaVo, userIdList) |
| | | else -> emptyList() |
| | | } |
| | | } |
| | | |
| | | private fun find1(areaVo: AreaVo, userIdList: List<String?>): List<DeviceMapVo> { |
| | | return when (areaVo.districtcode) { |
| | | //徿±åº |
| | | "310104" -> { |
| | | when (areaVo.scensetypeid) { |
| | | //汽修 |
| | | Constant.SceneTypeTZ.VehicleRepair.value.toString() -> emptyList() |
| | | else -> emptyList() |
| | | } |
| | | } |
| | | else -> emptyList() |
| | | } |
| | | } |
| | | |
| | | private fun find2(areaVo: AreaVo, userIdList: List<String?>): List<DeviceMapVo> { |
| | | return when (areaVo.districtcode) { |
| | | //éå®åº |
| | | "310106" -> when (areaVo.scensetypeid) { |
| | | //å·¥å° |
| | | Constant.SceneType.TYPE1.value -> jaDustSiteMapRep.findBySVUserId(userIdList) |
| | | else -> emptyList() |
| | | } |
| | | //éå±±åº |
| | | "310116" -> when (areaVo.scensetypeid) { |
| | | //å·¥å°,ç 头水泥æ
æç« |
| | | Constant.SceneType.TYPE1.value, |
| | | Constant.SceneType.TYPE2.value, |
| | | Constant.SceneType.TYPE3.value, |
| | | -> jsDustSiteMapRep.findBySVUserId(userIdList) |
| | | else -> emptyList() |
| | | } |
| | | //徿±åº |
| | | "310104" -> when (areaVo.scensetypeid) { |
| | | //é¤é¥® |
| | | Constant.SceneType.TYPE5.value -> xhFumeSiteMapRep.findBySVUserId(userIdList) |
| | | else -> emptyList() |
| | | } |
| | | else -> emptyList() |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | this.mode = 0 |
| | | sceneSourceList.clear() |
| | | val taskSceneIdList = |
| | | aopDbMapper.monitorobjectversionMapper.getSceneByType(config.topTaskGuid, config.sceneType, config.townCode) |
| | | |
| | | aopDbMapper.scenseMapper.selectByExample(Example(Scense::class.java).apply { |
| | | createCriteria() |
| | | .andIn("guid", taskSceneIdList) |
| | | })?.let { sceneSourceList.addAll(it) } |
| | | aopDbMapper.scenseMapper.getSceneByType(config.topTaskGuid, config.sceneType, config.townCode) |
| | | sceneSourceList.addAll(taskSceneIdList) |
| | | } |
| | | |
| | | // ä»å°è´¦ç³»ç»è·ååºæ¯ |
| | |
| | | } |
| | | }) |
| | | } else { |
| | | taskSceneIdList = dbMapper.monitorobjectversionMapper.getSceneByType(config.topTaskGuid, config.sceneType, config.townCode) |
| | | taskSceneIdList = dbMapper.scenseMapper.getSceneByType(config.topTaskGuid, config |
| | | .sceneType, config.townCode).map { it.guid ?: "" } |
| | | dbMapper.subtaskMapper.selectByExample(Example(Subtask::class.java).apply { |
| | | createCriteria().andIn("scenseid", taskSceneIdList) |
| | | .andEqualTo("tguid", config.topTaskGuid) |
| | |
| | | } |
| | | } |
| | | |
| | | enum class SceneTypeTZ(val value: Int, val des: String) { |
| | | NoType(0, "æ ç±»å"), |
| | | Restaurant(1, "é¤é¥®"), |
| | | Construction(2, "å·¥å°"), |
| | | Wharf(3, "ç 头"), |
| | | StorageYard(4, "å åº"), |
| | | MixingPlant(5, "æ
æç«"), |
| | | Industrial(6, "å·¥ä¸ä¼ä¸"), |
| | | VehicleRepair(7, "汽修"), |
| | | Laboratory(8, "å®éªå®¤"), |
| | | MedicalInstitution(9, "å»çæºæ"); |
| | | |
| | | companion object { |
| | | fun getNameByValue(value: Int?): String = when (value) { |
| | | 0 -> NoType.des |
| | | 1 -> Restaurant.des |
| | | 2 -> Construction.des |
| | | 3 -> Wharf.des |
| | | 4 -> StorageYard.des |
| | | 5 -> MixingPlant.des |
| | | 6 -> Industrial.des |
| | | 7 -> VehicleRepair.des |
| | | 8 -> Laboratory.des |
| | | 9 -> MedicalInstitution.des |
| | | else -> NoType.des |
| | | } |
| | | |
| | | fun toPairList() = listOf( |
| | | Pair(Restaurant.value.toString(), Restaurant.des), |
| | | Pair(Construction.value.toString(), Construction.des), |
| | | Pair(Wharf.value.toString(), Wharf.des), |
| | | Pair(StorageYard.value.toString(), StorageYard.des), |
| | | Pair(MixingPlant.value.toString(), MixingPlant.des), |
| | | Pair(Industrial.value.toString(), Industrial.des), |
| | | Pair(VehicleRepair.value.toString(), VehicleRepair.des), |
| | | Pair(Laboratory.value.toString(), Laboratory.des), |
| | | Pair(MedicalInstitution.value.toString(), MedicalInstitution.des), |
| | | ) |
| | | } |
| | | } |
| | | |
| | | companion object { |
| | | //é®é¢å®¡æ ¸ |
| | | const val PROBLEM_CHECK_PASS = "pass"//é®é¢å®¡æ ¸éè¿ |
| | |
| | | package cn.flightfeather.supervision.common.utils |
| | | |
| | | import org.springframework.stereotype.Component |
| | | import java.sql.Timestamp |
| | | import java.text.ParsePosition |
| | | import java.text.SimpleDateFormat |
| | | import java.util.* |
| | | |
| | | @Component |
| | | class DateUtil { |
| | | private val threadLocal = ThreadLocal<SimpleDateFormat>() |
| | | |
| | |
| | | package cn.flightfeather.supervision.domain.ds1.mapper |
| | | |
| | | import cn.flightfeather.supervision.domain.ds1.entity.Monitorobjectversion |
| | | import cn.flightfeather.supervision.domain.ds1.entity.Scense |
| | | import cn.flightfeather.supervision.domain.util.MyMapper |
| | | import org.apache.ibatis.annotations.Mapper |
| | | import org.apache.ibatis.annotations.Select |
| | | |
| | | @Mapper |
| | | interface MonitorobjectversionMapper:MyMapper<Monitorobjectversion> { |
| | | |
| | | // @Select("select b.S_GUID from sm_t_monitorobjectversion as a left join sm_t_scense as b on a.S_GUID = b.S_GUID" + |
| | | // " where a.T_ID = #{param1} and b.S_TypeID = #{param2}") |
| | | fun getSceneByType(topTaskId: String, sceneTypeId: Int? = null, townCode: String? = null): List<String> |
| | | } |
| | | interface MonitorobjectversionMapper:MyMapper<Monitorobjectversion> |
| | |
| | | @Mapper |
| | | interface ScenseMapper:MyMapper<Scense>, MutableList<Scense> { |
| | | |
| | | /** |
| | | * è·åæªåå»ºç¨æ·çåºæ¯ |
| | | */ |
| | | fun selectNoAccountScene(): List<Scense> |
| | | |
| | | fun getSceneByType(topTaskId: String, sceneTypeId: Int? = null, townCode: String? = null): List<Scense> |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.domain.ds1.repository |
| | | |
| | | import cn.flightfeather.supervision.domain.ds1.entity.Scense |
| | | import cn.flightfeather.supervision.domain.ds1.mapper.ScenseMapper |
| | | import org.springframework.stereotype.Repository |
| | | |
| | | /** |
| | | * åºæ¯ä¿¡æ¯æ°æ®åºç¸å
³æä½ |
| | | */ |
| | | @Repository |
| | | class SceneRep( |
| | | private val scenseMapper: ScenseMapper, |
| | | ) { |
| | | |
| | | /** |
| | | * æ¥æ¾åºæ¯ |
| | | */ |
| | | fun findScene(topTaskId: String, sceneTypeId: Int? = null, townCode: String? = null): List<Scense?> { |
| | | return scenseMapper.getSceneByType(topTaskId, sceneTypeId, townCode) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.domain.ds1.repository |
| | | |
| | | import cn.flightfeather.supervision.domain.ds1.entity.Scense |
| | | import cn.flightfeather.supervision.domain.ds1.entity.Userinfo |
| | | import cn.flightfeather.supervision.domain.ds1.mapper.UserinfoMapper |
| | | import org.springframework.stereotype.Repository |
| | | import tk.mybatis.mapper.entity.Example |
| | | |
| | | /** |
| | | * é£ç¾½çç®¡ç¨æ·ä¿¡æ¯æ°æ®åºç¸å
³æä½ |
| | | */ |
| | | @Repository |
| | | class UserInfoSVRep( |
| | | private val userinfoMapper: UserinfoMapper, |
| | | ) { |
| | | |
| | | /** |
| | | * æ¥æ¾åºæ¯ |
| | | */ |
| | | fun findUser(sceneIdList: List<String?>): List<Userinfo?> { |
| | | return userinfoMapper.selectByExample(Example(Userinfo::class.java).apply { |
| | | createCriteria().andIn("dGuid", sceneIdList) |
| | | }) |
| | | } |
| | | |
| | | fun findUser(sceneId: String): List<Userinfo?> { |
| | | return userinfoMapper.selectByExample(Example(Userinfo::class.java).apply { |
| | | createCriteria().andEqualTo("dGuid", sceneId) |
| | | }) |
| | | } |
| | | } |
| | |
| | | import javax.persistence.Column; |
| | | import javax.persistence.Id; |
| | | import javax.persistence.Table; |
| | | import java.util.Date; |
| | | |
| | | @Table(name = "ts_t_user_map") |
| | | public class UserMap { |
| | |
| | | */ |
| | | @Column(name = "SV_User_Name") |
| | | private String svUserName; |
| | | |
| | | @Column(name = "UM_Create_Time") |
| | | private Date umCreateTime; |
| | | |
| | | /** |
| | | * è·åé£ç¾½ç¯å¢ç¨æ·id |
| | |
| | | public void setSvUserName(String svUserName) { |
| | | this.svUserName = svUserName == null ? null : svUserName.trim(); |
| | | } |
| | | |
| | | /** |
| | | * @return UM_Create_Time |
| | | */ |
| | | public Date getUmCreateTime() { |
| | | return umCreateTime; |
| | | } |
| | | |
| | | /** |
| | | * @param umCreateTime |
| | | */ |
| | | public void setUmCreateTime(Date umCreateTime) { |
| | | this.umCreateTime = umCreateTime; |
| | | } |
| | | } |
| | |
| | | |
| | | import cn.flightfeather.supervision.domain.ds2.entity.Complaint |
| | | import cn.flightfeather.supervision.domain.util.MyMapper |
| | | import cn.flightfeather.supervision.lightshare.vo.ComplaintVo |
| | | import org.apache.ibatis.annotations.Mapper |
| | | import java.util.* |
| | | |
| | | @Mapper |
| | | interface ComplaintMapper : MyMapper<Complaint> |
| | | interface ComplaintMapper : MyMapper<Complaint> { |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | fun findComplaint(tzUserIdList: List<String?>, sTime: String?, eTime: String?): List<ComplaintVo?> |
| | | } |
| | |
| | | |
| | | import cn.flightfeather.supervision.domain.ds2.entity.Punishment |
| | | import cn.flightfeather.supervision.domain.util.MyMapper |
| | | import cn.flightfeather.supervision.lightshare.vo.ComplaintVo |
| | | import cn.flightfeather.supervision.lightshare.vo.PunishmentVo |
| | | import org.apache.ibatis.annotations.Mapper |
| | | import java.util.* |
| | | |
| | | @Mapper |
| | | interface PunishmentMapper : MyMapper<Punishment> |
| | | interface PunishmentMapper : MyMapper<Punishment> { |
| | | |
| | | fun findPunishment(tzUserIdList: List<String?>, sTime: String?, eTime: String?): List<PunishmentVo?> |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.domain.ds2.repository |
| | | |
| | | import cn.flightfeather.supervision.common.utils.DateUtil |
| | | import cn.flightfeather.supervision.domain.ds2.mapper.ComplaintMapper |
| | | import cn.flightfeather.supervision.domain.ds2.mapper.PunishmentMapper |
| | | import cn.flightfeather.supervision.lightshare.vo.ComplaintVo |
| | | import cn.flightfeather.supervision.lightshare.vo.PunishmentVo |
| | | import org.springframework.stereotype.Repository |
| | | import java.util.* |
| | | |
| | | /** |
| | | * 信访æè¯åè¡æ¿å¤ç½æ°æ®åºç¸å
³æä½ |
| | | */ |
| | | @Repository |
| | | 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) |
| | | return findComplaint(tzUserIdList, s, e) |
| | | } |
| | | |
| | | fun findComplaint(tzUserIdList: List<String?>, sTime: String?, eTime: String?): List<ComplaintVo?> { |
| | | return complaintMapper.findComplaint(tzUserIdList, sTime, eTime) |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è¡æ¿å¤ç½ |
| | | * @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) |
| | | return findPunishment(tzUserIdList, s, e) |
| | | } |
| | | |
| | | fun findPunishment(tzUserIdList: List<String?>, sTime: String?, eTime: String?): List<PunishmentVo?> { |
| | | return punishmentMapper.findPunishment(tzUserIdList, sTime, eTime) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.domain.ds2.repository |
| | | |
| | | import cn.flightfeather.supervision.domain.ds2.entity.DustSiteMap |
| | | import cn.flightfeather.supervision.domain.ds2.mapper.DustSiteMapMapper |
| | | import cn.flightfeather.supervision.lightshare.vo.DeviceMapVo |
| | | import org.springframework.stereotype.Repository |
| | | import tk.mybatis.mapper.entity.Example |
| | | |
| | | /** |
| | | * éå®å·¥å°æ¬å°çæµç¹ä½åç³»ç»ç¨æ·æ å°å
³ç³»æ°æ®åºç¸å
³æä½ |
| | | */ |
| | | @Repository |
| | | class JADustSiteMapRep( |
| | | private val dustSiteMapMapper: DustSiteMapMapper, |
| | | ) { |
| | | |
| | | /** |
| | | * æ ¹æ®é£ç¾½çç®¡ç¨æ·idæ¥è¯¢ |
| | | */ |
| | | fun findBySVUserId(idList: List<String?>): List<DeviceMapVo> { |
| | | val res = dustSiteMapMapper.selectByExample(Example(DustSiteMap::class.java).apply { |
| | | createCriteria().andIn("svUserId", idList) |
| | | }) |
| | | return DeviceMapVo.fromJADustSiteMap(res) |
| | | } |
| | | } |
| | |
| | | */ |
| | | fun findEnterpriseUser(district: String?, sceneType: Constant.SceneType): List<UserinfoTZ?> { |
| | | val type = Constant.SceneType.typeMap(sceneType.value.toByte()) |
| | | return findEnterpriseUser(district, type?.toInt()) |
| | | } |
| | | |
| | | /** |
| | | * æ¥æ¾å¨çº¿çæ£å¼ä¼ä¸ç¨æ· |
| | | * @param sceneTypeTZ é£ç¾½ç¯å¢ç³»ç»ä¸çåºæ¯ç±»å |
| | | */ |
| | | fun findEnterpriseUser(district: String?, sceneTypeTZ: Int?): List<UserinfoTZ?> { |
| | | return userinfoTZMapper.selectByExample(Example(UserinfoTZ::class.java).apply { |
| | | createCriteria().andEqualTo("extension2", type) |
| | | createCriteria().andEqualTo("extension2", sceneTypeTZ) |
| | | .andEqualTo("extension1", district) |
| | | .andEqualTo("usertypeid", Constant.UserType.ENTERPRISE.value) |
| | | .andEqualTo("isenable", true) |
| | |
| | | import cn.flightfeather.supervision.domain.ds2.entity.UserinfoTZ |
| | | import cn.flightfeather.supervision.domain.ds2.mapper.UserMapMapper |
| | | import org.springframework.stereotype.Repository |
| | | import tk.mybatis.mapper.entity.Example |
| | | |
| | | @Repository |
| | | class UserMapRep( |
| | |
| | | // æ¾å°é£ç¾½ç管ä¸çåºæ¯ä¿¡æ¯ |
| | | return scenseMapper.selectByPrimaryKey(userInfoSp.dGuid) |
| | | } |
| | | |
| | | /** |
| | | * éè¿é£ç¾½çç®¡ç¨æ·idæ¥è¯¢é£ç¾½ç¯å¢ç¨æ·id |
| | | */ |
| | | fun findBySVUserId(idList: List<String?>): List<UserMap?> { |
| | | return userMapMapper.selectByExample(Example(UserMap::class.java).apply { |
| | | createCriteria().andIn("svUserId", idList) |
| | | }) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.domain.ds3.repository |
| | | |
| | | import cn.flightfeather.supervision.domain.ds3.entity.JSDustSiteMap |
| | | import cn.flightfeather.supervision.domain.ds3.mapper.JSDustSiteMapMapper |
| | | import cn.flightfeather.supervision.lightshare.vo.DeviceMapVo |
| | | import org.springframework.stereotype.Repository |
| | | import tk.mybatis.mapper.entity.Example |
| | | |
| | | /** |
| | | * éå±±æ¬å°çæµç¹ä½åç³»ç»ç¨æ·æ å°å
³ç³»æ°æ®åºç¸å
³æä½ |
| | | */ |
| | | @Repository |
| | | class JSDustSiteMapRep( |
| | | private val jsDustSiteMapMapper: JSDustSiteMapMapper, |
| | | ) { |
| | | |
| | | /** |
| | | * æ ¹æ®é£ç¾½çç®¡ç¨æ·idæ¥è¯¢ |
| | | */ |
| | | fun findBySVUserId(idList: List<String?>): List<DeviceMapVo> { |
| | | val res = jsDustSiteMapMapper.selectByExample(Example(JSDustSiteMap::class.java).apply { |
| | | createCriteria().andIn("svUserId", idList) |
| | | }) |
| | | return DeviceMapVo.fromJSDustSiteMap(res) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.domain.ds3.repository |
| | | |
| | | import cn.flightfeather.supervision.domain.ds3.entity.FumeSiteMap |
| | | import cn.flightfeather.supervision.domain.ds3.mapper.FumeSiteMapMapper |
| | | import cn.flightfeather.supervision.lightshare.vo.DeviceMapVo |
| | | import org.springframework.stereotype.Repository |
| | | import tk.mybatis.mapper.entity.Example |
| | | |
| | | /** |
| | | * 徿±æ²¹ççæµç¹ä½åç³»ç»ç¨æ·æ å°å
³ç³»æ°æ®åºç¸å
³æä½ |
| | | */ |
| | | @Repository |
| | | class XHFumeSiteMapRep( |
| | | private val fumeSiteMapMapper: FumeSiteMapMapper, |
| | | ) { |
| | | |
| | | /** |
| | | * æ ¹æ®é£ç¾½çç®¡ç¨æ·idæ¥è¯¢ |
| | | */ |
| | | fun findBySVUserId(idList: List<String?>): List<DeviceMapVo> { |
| | | val res = fumeSiteMapMapper.selectByExample(Example(FumeSiteMap::class.java).apply { |
| | | createCriteria().andIn("svUserId", idList) |
| | | }) |
| | | return DeviceMapVo.fromXHFumeSiteMap(res) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.lightshare.service |
| | | |
| | | import cn.flightfeather.supervision.lightshare.vo.AreaVo |
| | | import cn.flightfeather.supervision.lightshare.vo.ComplaintVo |
| | | import cn.flightfeather.supervision.lightshare.vo.PunishmentVo |
| | | |
| | | interface ComplaintService { |
| | | |
| | | // 信访æè¯ |
| | | fun findComplaints(areaVo: AreaVo): List<ComplaintVo?> |
| | | |
| | | // è¡æ¿å¤ç½ |
| | | fun findPunishment(areaVo: AreaVo): List<PunishmentVo?> |
| | | } |
| | |
| | | import cn.flightfeather.supervision.lightshare.vo.AreaVo |
| | | import cn.flightfeather.supervision.lightshare.vo.AutoScoreResultVo |
| | | import cn.flightfeather.supervision.lightshare.vo.BaseResponse |
| | | import cn.flightfeather.supervision.lightshare.vo.EvaluateResVo |
| | | |
| | | |
| | | interface EvaluationService { |
| | |
| | | |
| | | fun getRankOfSense(tguid: String, scensetypeid: String?, ruletypeid: ByteArray?): List<Evaluation> |
| | | |
| | | fun getRankOfTown(tguid: String, scensetypeid: String?):List<AreaVo> |
| | | fun getRankOfTown(tguid: String, scensetypeid: String?):List<EvaluateResVo> |
| | | |
| | | fun autoScore(districtCode: String, time: String): List<String> |
| | | |
| | |
| | | package cn.flightfeather.supervision.lightshare.service |
| | | |
| | | import cn.flightfeather.supervision.domain.ds1.entity.Version |
| | | import cn.flightfeather.supervision.domain.ds2.entity.UserMap |
| | | import org.springframework.web.multipart.MultipartFile |
| | | import cn.flightfeather.supervision.lightshare.vo.AreaVo |
| | | import cn.flightfeather.supervision.lightshare.vo.DeviceMapVo |
| | | |
| | | interface UserMapService { |
| | | |
| | | /** |
| | | * æ ¹æ®é£ç¾½ç管系ç»ä¸çåºæ¯idï¼è·åä¸é£ç¾½ç¯å¢ç³»ç»ä¸çå
³èç¨æ· |
| | | */ |
| | | fun getTZIdBySceneId(sceneId: String): UserMap |
| | | |
| | | fun autoCreateMap() |
| | | |
| | | fun fetchDeviceMap(areaVo: AreaVo): List<DeviceMapVo?> |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.lightshare.service.impl |
| | | |
| | | import cn.flightfeather.supervision.domain.ds1.repository.SceneRep |
| | | import cn.flightfeather.supervision.domain.ds1.repository.TaskRep |
| | | import cn.flightfeather.supervision.domain.ds1.repository.UserInfoSVRep |
| | | import cn.flightfeather.supervision.domain.ds2.entity.Complaint |
| | | import cn.flightfeather.supervision.domain.ds2.entity.Punishment |
| | | import cn.flightfeather.supervision.domain.ds2.mapper.ComplaintMapper |
| | | import cn.flightfeather.supervision.domain.ds2.mapper.PunishmentMapper |
| | | import cn.flightfeather.supervision.domain.ds2.repository.ComplaintAndPunishmentRep |
| | | import cn.flightfeather.supervision.domain.ds2.repository.UserInfoTZRep |
| | | import cn.flightfeather.supervision.domain.ds2.repository.UserMapRep |
| | | import cn.flightfeather.supervision.lightshare.service.ComplaintService |
| | | import cn.flightfeather.supervision.lightshare.service.UserinfoService |
| | | import cn.flightfeather.supervision.lightshare.vo.AreaVo |
| | | import cn.flightfeather.supervision.lightshare.vo.ComplaintVo |
| | | import cn.flightfeather.supervision.lightshare.vo.PunishmentVo |
| | | import org.springframework.stereotype.Service |
| | | |
| | | @Service |
| | | class ComplaintServiceImpl( |
| | | private val complaintAndPunishmentRep: ComplaintAndPunishmentRep, |
| | | private val sceneRep: SceneRep, |
| | | private val taskRep: TaskRep, |
| | | private val userInfoSVRep: UserInfoSVRep, |
| | | private val userInfoTZRep: UserInfoTZRep, |
| | | private val userMapRep: UserMapRep, |
| | | ) : ComplaintService { |
| | | |
| | | private fun getTZUserId(areaVo: AreaVo): List<String?> { |
| | | return when (areaVo.sourceType) { |
| | | //以é£ç¾½ç¯å¢ç³»ç»ä¸çç¨æ·ä¸ºä¸»ä½ |
| | | 1 -> { |
| | | val u = userInfoTZRep.findEnterpriseUser(areaVo.districtname, areaVo.scensetypeid?.toInt()) |
| | | u.map { it?.guid } |
| | | } |
| | | //以é£ç¾½ç管系ç»ä¸çç¨æ·ä¸ºä¸»ä½ |
| | | 2 -> { |
| | | val task = taskRep.findOneTask(areaVo) ?: throw IllegalStateException("å½åæ¥è¯¢æ¡ä»¶ä¸æªæ¾å°å¯¹åºé¡¶å±ä»»å¡") |
| | | val scenes = sceneRep.findScene(task.tguid!!, areaVo.scensetypeid?.toInt(), areaVo.towncode) |
| | | .map { it?.guid } |
| | | val idList = userInfoSVRep.findUser(scenes).map { it?.guid } |
| | | userMapRep.findBySVUserId(idList).map { it?.tzUserId } |
| | | } |
| | | else -> emptyList() |
| | | } |
| | | } |
| | | |
| | | override fun findComplaints(areaVo: AreaVo): List<ComplaintVo?> { |
| | | val userIdList = getTZUserId(areaVo) |
| | | return complaintAndPunishmentRep.findComplaint(userIdList, areaVo.starttime, areaVo.endtime) |
| | | } |
| | | |
| | | override fun findPunishment(areaVo: AreaVo): List<PunishmentVo?> { |
| | | val userIdList = getTZUserId(areaVo) |
| | | return complaintAndPunishmentRep.findPunishment(userIdList, areaVo.starttime, areaVo.endtime) |
| | | } |
| | | } |
| | |
| | | import cn.flightfeather.supervision.common.utils.DateUtil |
| | | import cn.flightfeather.supervision.common.utils.Domain |
| | | import cn.flightfeather.supervision.domain.ds1.repository.EvaluationRep |
| | | import cn.flightfeather.supervision.domain.ds1.repository.TaskRep |
| | | import cn.flightfeather.supervision.lightshare.service.EvaluationService |
| | | import cn.flightfeather.supervision.lightshare.service.SubtaskService |
| | | import cn.flightfeather.supervision.lightshare.vo.AreaVo |
| | | import cn.flightfeather.supervision.lightshare.vo.AutoScoreResultVo |
| | | import cn.flightfeather.supervision.lightshare.vo.BaseResponse |
| | | import cn.flightfeather.supervision.lightshare.vo.EvaluateResVo |
| | | import org.springframework.beans.factory.annotation.Autowired |
| | | import org.springframework.stereotype.Service |
| | | import tk.mybatis.mapper.entity.Example |
| | |
| | | class EvaluationServiceImpl( |
| | | private val evaluationMapper: EvaluationMapper, |
| | | private val evaluationRep: EvaluationRep, |
| | | private val taskRep: TaskRep, |
| | | private val aopTaskCtrl: AopTaskCtrl, |
| | | ) : EvaluationService { |
| | | |
| | |
| | | private var isAutoScoreRunning = false |
| | | |
| | | //è·åæé¡¶å±ä»»å¡ä¸æä¸ªåºæ¯çè¡éè¯åæå |
| | | override fun getRankOfTown(tguid: String, scensetypeid: String?): List<AreaVo> { |
| | | override fun getRankOfTown(tguid: String, scensetypeid: String?): List<EvaluateResVo> { |
| | | val evaluationlist = getRankInfo(tguid, scensetypeid, null) |
| | | var areaVolist = mutableListOf<AreaVo>() |
| | | var areaVolist = mutableListOf<EvaluateResVo>() |
| | | //èæ ¸ç±»åæ¯è§èèæ ¸ |
| | | if (evaluationlist.isNotEmpty() && |
| | | Objects.equals(evaluationlist.get(0).ertype, Constant.RuleType.STANDARD.value)) { |
| | |
| | | val iterator: MutableIterator<Evaluation> = tmplist.iterator() |
| | | |
| | | val evaluation = evaluationlist.get(0)//è·åä¸ç§è¡é |
| | | var areaVo = AreaVo() |
| | | var areaVo = EvaluateResVo() |
| | | areaVo = transform(areaVo, evaluation) |
| | | while (iterator.hasNext()){ |
| | | val tmp = iterator.next() |
| | |
| | | val iterator: MutableIterator<Evaluation> = tmplist.iterator() |
| | | |
| | | val evaluation = evaluationlist.get(0)//è·åä¸ç§è¡é |
| | | var areaVo = AreaVo() |
| | | var areaVo = EvaluateResVo() |
| | | areaVo = transform(areaVo, evaluation) |
| | | while (iterator.hasNext()){ |
| | | val tmp = iterator.next() |
| | |
| | | } |
| | | |
| | | //Evaluationä¼ éæ°æ®ç»AreaVo |
| | | fun transform(areaVo: AreaVo, evaluation: Evaluation):AreaVo{ |
| | | fun transform(areaVo: EvaluateResVo, evaluation: Evaluation):EvaluateResVo{ |
| | | areaVo.provincecode = evaluation.provincecode |
| | | areaVo.provincename = evaluation.provincename |
| | | areaVo.citycode = evaluation.citycode |
| | |
| | | } |
| | | |
| | | //æè¡é严éä¸è§èåºæ¯ç¾åæ¯æåº |
| | | fun sort(areaVolist: MutableList<AreaVo>):MutableList<AreaVo>{ |
| | | Collections.sort(areaVolist, object : Comparator<AreaVo>{ |
| | | override fun compare(o1: AreaVo?, o2: AreaVo?): Int { |
| | | fun sort(areaVolist: MutableList<EvaluateResVo>):MutableList<EvaluateResVo>{ |
| | | Collections.sort(areaVolist, object : Comparator<EvaluateResVo>{ |
| | | override fun compare(o1: EvaluateResVo?, o2: EvaluateResVo?): Int { |
| | | var num1 = 0.0 |
| | | if (o1!!.allsensenum != 0) |
| | | num1 = (o1.notstandardnum/o1.allsensenum).toDouble() |
| | |
| | | |
| | | override fun findAutoEvaluation(areaVo: AreaVo): List<AutoScoreResultVo?>? { |
| | | //1. æ¥æ¾åå²è®°å½ï¼æ¥çè¯ä¼°æ¯å¦å·²åå¨ |
| | | areaVo.scensetypeid ?: throw IllegalStateException("æ¥è¯¢æ¶å¿
须鿩ä¸ä¸ªåºæ¯ç±»å") |
| | | val task = taskRep.findOneTask(areaVo) ?: throw IllegalStateException("æ¥è¯¢æ¶å¿
须鿩ä¸ä¸ªåºæ¯ç±»å") |
| | | return evaluationRep.findAutoScore(areaVo) |
| | | } |
| | | } |
| | |
| | | package cn.flightfeather.supervision.lightshare.service.impl |
| | | |
| | | import cn.flightfeather.supervision.business.autooutput.dataanalysis.AopDataDeviceMap |
| | | import cn.flightfeather.supervision.common.utils.Constant |
| | | import cn.flightfeather.supervision.common.utils.UUIDGenerator |
| | | import cn.flightfeather.supervision.domain.ds1.entity.Userinfo |
| | | import cn.flightfeather.supervision.domain.ds1.mapper.UserinfoMapper |
| | | import cn.flightfeather.supervision.domain.ds1.repository.SceneRep |
| | | import cn.flightfeather.supervision.domain.ds1.repository.TaskRep |
| | | import cn.flightfeather.supervision.domain.ds1.repository.UserInfoSVRep |
| | | import cn.flightfeather.supervision.domain.ds2.entity.UserMap |
| | | import cn.flightfeather.supervision.domain.ds2.entity.UserinfoTZ |
| | | import cn.flightfeather.supervision.domain.ds2.mapper.UserMapMapper |
| | | import cn.flightfeather.supervision.domain.ds2.mapper.UserinfoTZMapper |
| | | import cn.flightfeather.supervision.domain.ds2.repository.UserInfoTZRep |
| | | import cn.flightfeather.supervision.lightshare.service.UserMapService |
| | | import cn.flightfeather.supervision.lightshare.service.UserinfoService |
| | | import cn.flightfeather.supervision.lightshare.vo.AreaVo |
| | | import cn.flightfeather.supervision.lightshare.vo.DeviceMapVo |
| | | import org.springframework.stereotype.Service |
| | | import tk.mybatis.mapper.entity.Example |
| | | |
| | |
| | | class UserMapServiceImpl( |
| | | private val userMapMapper: UserMapMapper, |
| | | private val userinfoMapper: UserinfoMapper, |
| | | private val userinfoTZMapper: UserinfoTZMapper |
| | | ) : UserMapService { |
| | | private val userinfoTZMapper: UserinfoTZMapper, |
| | | private val sceneRep: SceneRep, |
| | | private val taskRep: TaskRep, |
| | | private val userInfoSVRep: UserInfoSVRep, |
| | | private val userInfoTZRep: UserInfoTZRep, |
| | | private val aopDataDeviceMap: AopDataDeviceMap, |
| | | ) : UserMapService { |
| | | |
| | | override fun getTZIdBySceneId(sceneId: String): UserMap { |
| | | val list = userinfoMapper.selectByExample(Example(Userinfo::class.java).apply { |
| | | createCriteria().andEqualTo("dGuid", sceneId) |
| | | }) |
| | | val list = userInfoSVRep.findUser(sceneId) |
| | | if (list.isEmpty()) return UserMap() |
| | | val userId = list[0].guid |
| | | val userId = list[0]?.guid |
| | | val result = userMapMapper.selectByExample(Example(UserMap::class.java).apply { |
| | | createCriteria().andEqualTo("svUserId", userId) |
| | | }) |
| | |
| | | // 2ã æ æ³ç²¾ç¡®å¹é
çï¼éç¨é»è®¤çç¼å·ï¼æå
¥è®°å½ãåç»äººå·¥ä¿®æ¹ï¼æå®ï¼ |
| | | else { |
| | | if (userMapMapper.selectByExample(Example(UserMap::class.java).apply { |
| | | createCriteria().andEqualTo("svUserId", it.guid) |
| | | createCriteria().andEqualTo("svUserId", it.guid) |
| | | }).isEmpty()) { |
| | | val id = "temp" + UUIDGenerator.generateShortUUID() |
| | | userMapMapper.insert(UserMap().apply { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | override fun fetchDeviceMap(areaVo: AreaVo): List<DeviceMapVo?> { |
| | | // 1.éè¿åºåæ¡ä»¶è·å主ä½ç¨æ· |
| | | val userIdList = when (areaVo.sourceType) { |
| | | //以é£ç¾½ç¯å¢ç³»ç»ä¸çç¨æ·ä¸ºä¸»ä½ |
| | | 1 -> { |
| | | val u = userInfoTZRep.findEnterpriseUser(areaVo.districtname, areaVo.scensetypeid?.toInt()) |
| | | u.map { it?.guid } |
| | | } |
| | | //以é£ç¾½ç管系ç»ä¸çç¨æ·ä¸ºä¸»ä½ |
| | | 2 -> { |
| | | val task = taskRep.findOneTask(areaVo) ?: throw IllegalStateException("å½åæ¥è¯¢æ¡ä»¶ä¸æªæ¾å°å¯¹åºé¡¶å±ä»»å¡") |
| | | val scenes = sceneRep.findScene(task.tguid!!, areaVo.scensetypeid?.toInt(), areaVo.towncode) |
| | | .map { it?.guid } |
| | | userInfoSVRep.findUser(scenes).map { it?.guid } |
| | | } |
| | | else -> emptyList() |
| | | } |
| | | // 2.éè¿åºåæ¡ä»¶å³å®å¹é
çæ°æ®æ¥æº |
| | | return aopDataDeviceMap.findMapSet(areaVo, userIdList) |
| | | } |
| | | } |
| | |
| | | import cn.flightfeather.supervision.domain.ds1.entity.Userinfo |
| | | import cn.flightfeather.supervision.domain.ds1.mapper.ScenseMapper |
| | | import cn.flightfeather.supervision.domain.ds1.mapper.UserinfoMapper |
| | | import cn.flightfeather.supervision.domain.ds1.repository.SceneRep |
| | | import cn.flightfeather.supervision.domain.ds1.repository.TaskRep |
| | | import cn.flightfeather.supervision.domain.ds1.repository.UserInfoSVRep |
| | | import cn.flightfeather.supervision.domain.ds2.repository.UserInfoTZRep |
| | | import cn.flightfeather.supervision.lightshare.service.UserinfoService |
| | | import cn.flightfeather.supervision.lightshare.vo.AreaVo |
| | | import org.springframework.stereotype.Service |
| | | import tk.mybatis.mapper.entity.Example |
| | | import kotlin.random.Random |
| | | import kotlin.random.nextInt |
| | | |
| | | @Service |
| | | class UserinfoServiceImpl(val userinfoMapper: UserinfoMapper, private val scenseMapper: ScenseMapper) : UserinfoService { |
| | | class UserinfoServiceImpl( |
| | | val userinfoMapper: UserinfoMapper, |
| | | private val scenseMapper: ScenseMapper, |
| | | ) : UserinfoService { |
| | | |
| | | //æ ¹æ®userinfoæ¡ä»¶æ¥è¯¢ |
| | | override fun findOneByName(userinfo: Userinfo): Userinfo? { |
| | | val example = Example(Userinfo::class.java) |
| | | val criteria = example.createCriteria() |
| | | criteria.andEqualTo("acountname", userinfo.acountname) |
| | | .andEqualTo("password", userinfo.password) |
| | | .andEqualTo("password", userinfo.password) |
| | | val result = userinfoMapper.selectByExample(example) |
| | | return if (result.isNotEmpty()) { |
| | | result[0] |
| | |
| | | |
| | | private fun getUName(sceneName: String): String { |
| | | var uName = PinYin.getPinYinHeader(sceneName) |
| | | var repeated = false |
| | | var suffix = "" |
| | | var repeated: Boolean |
| | | var i = 1 |
| | | do { |
| | | userinfoMapper.selectByExample(Example(Userinfo::class.java).apply { |
| | | createCriteria().andEqualTo("acountname", uName) |
| | | createCriteria().andEqualTo("acountname", uName + suffix) |
| | | }).let { |
| | | repeated = it.isNotEmpty() |
| | | if (repeated) { |
| | | uName += i |
| | | suffix = Random.nextInt(100..999).toString() |
| | | } |
| | | } |
| | | i++ |
| | | } while (repeated && i < 20) |
| | | if (repeated) uName = UUIDGenerator.generateShortUUID() |
| | | return uName |
| | | return uName + suffix |
| | | } |
| | | |
| | | override fun autoCreateAccount() { |
| | |
| | | } |
| | | } |
| | | |
| | | private fun createAccount(sence: Scense) { |
| | | sence.let { |
| | | private fun createAccount(scence: Scense) { |
| | | scence.let { |
| | | val sceneName = it.name ?: return |
| | | val uName = getUName(sceneName) |
| | | |
| | |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonInclude |
| | | |
| | | /** |
| | | * åºåæ¡ä»¶ |
| | | */ |
| | | @JsonInclude(JsonInclude.Include.NON_NULL) |
| | | open class AreaVo{ |
| | | |
| | | // è¡æ¿åºå |
| | | var provincecode: String? = null |
| | | |
| | | var provincename: String? = null |
| | | |
| | | var citycode: String? = null |
| | | |
| | | var cityname: String? = null |
| | | |
| | | var districtcode: String? = null |
| | | |
| | | var districtname: String? = null |
| | | |
| | | var towncode: String? = null |
| | | |
| | | var townname: String? = null |
| | | |
| | | // æ¶é´èå´ |
| | | var starttime: String? = null |
| | | |
| | | var endtime: String? = null |
| | | |
| | | // åºæ¯åç§° |
| | | var sceneName: String? = null |
| | | |
| | | // åºæ¯ç±»å |
| | | var scensetypeid: String? = null |
| | | |
| | | var notstandardnum: Int = 0 |
| | | |
| | | var allsensenum: Int = 0 |
| | | |
| | | //æ¯å¦ä¸çº¿ |
| | | // æ¯å¦ä¸çº¿ |
| | | var online: Boolean? = null |
| | | |
| | | // ä¸»æ°æ®æºï¼1ï¼ä»¥é£ç¾½ç¯å¢ç³»ç»ä¸çç¨æ·ä¸ºä¸»ä½ï¼2ï¼ä»¥é£ç¾½ç管系ç»ä¸çç¨æ·ä¸ºä¸»ä½ |
| | | var sourceType:Int = 1 |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.lightshare.vo |
| | | |
| | | import cn.flightfeather.supervision.domain.ds2.entity.BaseInfo |
| | | import cn.flightfeather.supervision.domain.ds2.entity.Complaint |
| | | |
| | | /** |
| | | * 信访æè¯ |
| | | */ |
| | | class ComplaintVo : Complaint() { |
| | | var baseInfo: BaseInfo? = null |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.lightshare.vo |
| | | |
| | | import cn.flightfeather.supervision.domain.ds2.entity.DustSiteMap |
| | | import cn.flightfeather.supervision.domain.ds3.entity.FumeSiteMap |
| | | import cn.flightfeather.supervision.domain.ds3.entity.JSDustSiteMap |
| | | import org.springframework.beans.BeanUtils |
| | | import java.util.* |
| | | |
| | | /** |
| | | * çæµè®¾å¤åé£ç¾½ç管系ç»ãé£ç¾½ç¯å¢ç³»ç»ç¨æ·çå¹é
å
³ç³» |
| | | */ |
| | | class DeviceMapVo { |
| | | // çæµè®¾å¤id |
| | | var deviceCode:String?=null |
| | | // çæµè®¾å¤æç«ç¹åç§° |
| | | var deviceName:String?=null |
| | | // é£ç¾½ç管系ç»ç¨æ·id |
| | | var svUserId:String?=null |
| | | // é£ç¾½ç管系ç»ç¨æ·åç§° |
| | | var svUserName:String?=null |
| | | // é£ç¾½ç¯å¢ç³»ç»ç¨æ·id |
| | | var tzUserId:String?=null |
| | | // é£ç¾½ç¯å¢ç³»ç»ç¨æ·åç§° |
| | | var tzUserName:String?=null |
| | | |
| | | var createTime: Date? = null |
| | | |
| | | companion object { |
| | | fun fromJADustSiteMap(list: List<DustSiteMap?>): List<DeviceMapVo> { |
| | | val res = mutableListOf<DeviceMapVo>() |
| | | list.forEach { |
| | | it ?: return@forEach |
| | | res.add(DeviceMapVo().apply { |
| | | deviceCode = it.jaMnCode |
| | | deviceName = it.jaSceneName |
| | | svUserId = it.svUserId |
| | | svUserName = it.svUserName |
| | | tzUserId = it.tzUserId |
| | | tzUserName = it.tzUserName |
| | | }) |
| | | } |
| | | return res |
| | | } |
| | | |
| | | fun fromJSDustSiteMap(list: List<JSDustSiteMap?>): List<DeviceMapVo> { |
| | | val res = mutableListOf<DeviceMapVo>() |
| | | list.forEach { |
| | | it ?: return@forEach |
| | | res.add(DeviceMapVo().apply { |
| | | deviceCode = it.jsDeviceCode |
| | | deviceName = it.jsDeviceName |
| | | svUserId = it.svUserId |
| | | svUserName = it.svUserName |
| | | tzUserId = it.tzUserId |
| | | tzUserName = it.tzUserName |
| | | }) |
| | | } |
| | | return res |
| | | } |
| | | |
| | | fun fromXHFumeSiteMap(list: List<FumeSiteMap?>): List<DeviceMapVo> { |
| | | val res = mutableListOf<DeviceMapVo>() |
| | | list.forEach { |
| | | it ?: return@forEach |
| | | res.add(DeviceMapVo().apply { |
| | | deviceCode = it.xhDeviceCode |
| | | deviceName = it.xhDeviceName |
| | | svUserId = it.svUserId |
| | | svUserName = it.svUserName |
| | | tzUserId = it.tzUserId |
| | | tzUserName = it.tzUserName |
| | | }) |
| | | } |
| | | return res |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.lightshare.vo |
| | | |
| | | /** |
| | | * è¯ä¼°ç»æç»è®¡ |
| | | */ |
| | | class EvaluateResVo:AreaVo() { |
| | | // 严éä¸è§èæ°é |
| | | var notstandardnum: Int = 0 |
| | | // åºæ¯æ»æ° |
| | | var allsensenum: Int = 0 |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.lightshare.vo |
| | | |
| | | import cn.flightfeather.supervision.domain.ds2.entity.BaseInfo |
| | | import cn.flightfeather.supervision.domain.ds2.entity.Punishment |
| | | |
| | | /** |
| | | * è¡æ¿å¤ç½ |
| | | */ |
| | | class PunishmentVo : Punishment() { |
| | | var baseInfo: BaseInfo? = null |
| | | } |
| | |
| | | if (head is DataHead) { |
| | | BaseResponse(true, head = head, data = res.second) |
| | | } else { |
| | | BaseResponse(true, data = res.second) |
| | | BaseResponse(true, data = res) |
| | | } |
| | | } else { |
| | | BaseResponse(true, data = res) |
| | | } |
| | | } catch (e: Exception) { |
| | | } catch (e: IllegalStateException) { |
| | | BaseResponse(false, message = e.message ?: "") |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.lightshare.web |
| | | |
| | | import cn.flightfeather.supervision.lightshare.service.ComplaintService |
| | | import cn.flightfeather.supervision.lightshare.vo.AreaVo |
| | | import io.swagger.annotations.Api |
| | | import io.swagger.annotations.ApiOperation |
| | | import io.swagger.annotations.ApiParam |
| | | import org.springframework.web.bind.annotation.* |
| | | |
| | | @Api(tags = ["信访æè¯åè¡æ¿å¤ç½ç¸å
³APIæ¥å£"]) |
| | | @RestController |
| | | @RequestMapping("") |
| | | class ComplaintController(val complaintService: ComplaintService) { |
| | | |
| | | @ApiOperation(value = "è·å信访æè¯ä¿¡æ¯") |
| | | @PostMapping("/complaint/find") |
| | | fun findComplaints(@ApiParam(value = "åºåæ¡ä»¶") @RequestBody areaVo: AreaVo) = complaintService.findComplaints(areaVo) |
| | | |
| | | @ApiOperation(value = "è·åè¡æ¿å¤ç½ä¿¡æ¯") |
| | | @PostMapping("/punishment/find") |
| | | fun findPunishment(@ApiParam(value = "åºåæ¡ä»¶") @RequestBody areaVo: AreaVo) = complaintService.findPunishment(areaVo) |
| | | } |
| | |
| | | package cn.flightfeather.supervision.lightshare.web |
| | | |
| | | import cn.flightfeather.supervision.lightshare.service.UserMapService |
| | | import cn.flightfeather.supervision.lightshare.vo.AreaVo |
| | | import io.swagger.annotations.Api |
| | | import io.swagger.annotations.ApiOperation |
| | | import org.springframework.web.bind.annotation.* |
| | | |
| | | @Api(tags = ["VersionController"], description = "ç¨æ·id对åºAPIæ¥å£") |
| | | @Api(tags = ["UserMapController"], description = "ç¨æ·id对åºAPIæ¥å£") |
| | | @RestController |
| | | @RequestMapping("/usermap") |
| | | class UserMapController(val userMapService: UserMapService) { |
| | | |
| | | @ApiOperation(value = "æ ¹æ®é£ç¾½ç管系ç»ä¸çåºæ¯idï¼è·åä¸é£ç¾½ç¯å¢ç³»ç»ä¸çå
³èç¨æ·") |
| | | @GetMapping |
| | | fun getTZId(@RequestParam("sceneId") sceneId: String) = userMapService.getTZIdBySceneId(sceneId) |
| | | |
| | | @ApiOperation(value = "è·ååºåç¨æ·ççæµè®¾å¤åé£ç¾½ç管系ç»ãé£ç¾½ç¯å¢ç³»ç»çå¹é
è®°å½") |
| | | @PostMapping("/device") |
| | | fun fetchDeviceMap(@RequestBody areaVo: AreaVo) = resPack { userMapService.fetchDeviceMap(areaVo) } |
| | | } |
| | |
| | | MOV_Suitable, MOV_DisplayID, MOV_Year, MOV_Month, MOV_Day, MOV_ISCP, MOV_CustomPeriod, |
| | | MOV_Extension1, MOV_Extension2, MOV_Extension3, MOV_Remark |
| | | </sql> |
| | | |
| | | <select id="getSceneByType" resultType="String"> |
| | | select |
| | | b.S_GUID |
| | | from sm_t_monitorobjectversion as a |
| | | left join sm_t_scense as b |
| | | on a.S_GUID = b.S_GUID |
| | | where a.T_ID = #{param1} |
| | | <if test="param2 != null"> |
| | | and b.S_TypeID = #{param2} |
| | | </if> |
| | | <if test="param3 != null"> |
| | | and b.S_TownCode = #{param3} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | <select id="selectNoAccountScene" resultMap="BaseResultMap"> |
| | | select a.* FROM sm_t_scense as a LEFT JOIN sm_t_userinfo as b on a.S_GUID = b.D_GUID WHERE b.UI_GUID is null |
| | | </select> |
| | | |
| | | <select id="getSceneByType" resultMap="BaseResultMap"> |
| | | select |
| | | b.* |
| | | from sm_t_monitorobjectversion as a |
| | | left join sm_t_scense as b |
| | | on a.S_GUID = b.S_GUID |
| | | where a.T_ID = #{param1} |
| | | <if test="param2 != null"> |
| | | and b.S_TypeID = #{param2} |
| | | </if> |
| | | <if test="param3 != null"> |
| | | and b.S_TownCode = #{param3} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | CP_Mediate_Unit, CP_Mediate_Result, CP_Extension1, CP_Extension2, CP_Extension3, |
| | | CP_Remark |
| | | </sql> |
| | | |
| | | <resultMap id="ComplaintVo" type="cn.flightfeather.supervision.lightshare.vo.ComplaintVo" extends="BaseResultMap"> |
| | | <association property="baseInfo" resultMap="cn.flightfeather.supervision.domain.ds2.mapper.BaseInfoMapper.BaseResultMap" /> |
| | | </resultMap> |
| | | |
| | | <select id="findComplaint" resultMap="ComplaintVo"> |
| | | select |
| | | * |
| | | from ea_t_complaint as a |
| | | left join ea_t_baseinfo as b |
| | | on a.CP_SceneId = b.BI_GUID |
| | | <where> |
| | | a.CP_SceneId in #{tzUserIdList} |
| | | <if test="sTime != null"> |
| | | and a.CP_Time >= #{sTime} |
| | | </if> |
| | | <if test="eTime != null"> |
| | | and a.CP_Time <= #{eTime} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | |
| | | PM_GUID, PM_Name, PM_Time, PM_Reason, PM_Result, PM_Department, PM_Basis, PM_Scene_Id, |
| | | PM_Extension1, PM_Extension2, PM_Extension3, PM_Remark |
| | | </sql> |
| | | |
| | | <resultMap id="PunishmentVo" type="cn.flightfeather.supervision.lightshare.vo.PunishmentVo" extends="BaseResultMap"> |
| | | <association property="baseInfo" resultMap="cn.flightfeather.supervision.domain.ds2.mapper.BaseInfoMapper.BaseResultMap" /> |
| | | </resultMap> |
| | | |
| | | <select id="findPunishment" resultMap="PunishmentVo"> |
| | | select |
| | | * |
| | | from ea_t_punishment as a |
| | | left join ea_t_baseinfo as b |
| | | on a.PM_Scene_Id = b.BI_GUID |
| | | <where> |
| | | a.PM_Scene_Id in #{tzUserIdList} |
| | | <if test="sTime != null"> |
| | | and a.PM_Time >= #{sTime} |
| | | </if> |
| | | <if test="eTime != null"> |
| | | and a.PM_Time <= #{eTime} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | |
| | | <result column="TZ_User_Name" property="tzUserName" jdbcType="VARCHAR" /> |
| | | <result column="SV_User_Id" property="svUserId" jdbcType="VARCHAR" /> |
| | | <result column="SV_User_Name" property="svUserName" jdbcType="VARCHAR" /> |
| | | <result column="UM_Create_Time" jdbcType="TIMESTAMP" property="umCreateTime" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List" > |
| | | <!-- |
| | | WARNING - @mbg.generated |
| | | --> |
| | | TZ_User_Id, TZ_User_Name, SV_User_Id, SV_User_Name |
| | | TZ_User_Id, TZ_User_Name, SV_User_Id, SV_User_Name, UM_Create_Time |
| | | </sql> |
| | | </mapper> |