From 22f01e53363e79d6c2304d58d2924372954649e8 Mon Sep 17 00:00:00 2001 From: hanrenchun Date: Sun, 28 Jan 2024 17:02:49 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E4=BF=A1=E6=81=AF=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DisposalInfoController.java | 37 ++++- .../MetaImpUserModelInfoController.java | 67 +++++++++ ...ansitHuntersUserModelRecordController.java | 4 - .../database/domain/MetaImpUserModelInfo.java | 134 ++++++++++++++++++ .../domain/TransitHuntersUserModelRecord.java | 17 +++ .../mapper/MetaImpUserModelInfoMapper.java | 20 +++ .../service/MetaImpUserModelInfoService.java | 13 ++ .../impl/MetaImpUserModelInfoServiceImpl.java | 22 +++ 8 files changed, 307 insertions(+), 7 deletions(-) create mode 100644 gather-app/src/main/java/com/ruoyi/database/controller/MetaImpUserModelInfoController.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/domain/MetaImpUserModelInfo.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/mapper/MetaImpUserModelInfoMapper.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/MetaImpUserModelInfoService.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/impl/MetaImpUserModelInfoServiceImpl.java diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/DisposalInfoController.java b/gather-app/src/main/java/com/ruoyi/database/controller/DisposalInfoController.java index dc47858..65aaebe 100644 --- a/gather-app/src/main/java/com/ruoyi/database/controller/DisposalInfoController.java +++ b/gather-app/src/main/java/com/ruoyi/database/controller/DisposalInfoController.java @@ -9,12 +9,15 @@ import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.database.domain.DevopsVideoStatus; import com.ruoyi.database.domain.DisposalInfo; +import com.ruoyi.database.domain.TransitHuntersUserModelRecord; import com.ruoyi.database.service.DisposalInfoService; +import com.ruoyi.database.service.TransitHuntersUserModelRecordService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; +import java.util.ArrayList; import java.util.List; @Api(tags = "预警信息处置表") @@ -24,20 +27,48 @@ import java.util.List; public class DisposalInfoController extends BaseController { private final DisposalInfoService disposalInfoService; + private final TransitHuntersUserModelRecordService transitHuntersUserModelRecordService; @GetMapping @ApiOperation("查询预警信息处置表") - public TableDataInfo list(DisposalInfo disposalInfo) { + public TableDataInfo list() { startPage(); - List list = disposalInfoService.list(new QueryWrapper<>(disposalInfo)); - return getDataTable(list); + List list1 = transitHuntersUserModelRecordService.list(); + ArrayList transitHuntersUserModelRecords = new ArrayList<>(); + for (TransitHuntersUserModelRecord transitHuntersUserModelRecord :list1){ + Long id = transitHuntersUserModelRecord.getId(); + DisposalInfo one = disposalInfoService.lambdaQuery().eq(DisposalInfo::getHuntersModelRecordId, id).one(); + if (one != null){ + transitHuntersUserModelRecord.setDisposalResult(one.getDisposalResult()); + transitHuntersUserModelRecord.setSignStatus(one.getSignStatus()); + if (one.getRiskDesc()!=null){ + transitHuntersUserModelRecord.setRisk("有风险"); + }else { + transitHuntersUserModelRecord.setRisk("无风险"); + } + } else { + transitHuntersUserModelRecord.setDisposalResultCn("未处置"); + transitHuntersUserModelRecord.setDisposalResult(1); + } + transitHuntersUserModelRecords.add(transitHuntersUserModelRecord); + } + return getDataTable(transitHuntersUserModelRecords); } @PostMapping @ApiOperation("新增预警信息处置表") @Log(title = "预警信息处置表", businessType = BusinessType.INSERT) public AjaxResult insert(@RequestBody DisposalInfo disposalInfo) { + if (disposalInfo.getDisposalResultCn()!=null){ + boolean equals = "未处置".equals(disposalInfo.getDisposalResultCn()); + if (equals){ + disposalInfo.setDisposalResult(1); + }else { + disposalInfo.setDisposalResult(2); + } + } +// if (disposalInfo.getDisposalResultCn()) return toAjax(disposalInfoService.save(disposalInfo)); } diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/MetaImpUserModelInfoController.java b/gather-app/src/main/java/com/ruoyi/database/controller/MetaImpUserModelInfoController.java new file mode 100644 index 0000000..692fc43 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/controller/MetaImpUserModelInfoController.java @@ -0,0 +1,67 @@ +package com.ruoyi.database.controller; + +import cn.hutool.db.handler.StringHandler; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.database.domain.DisposalInfo; +import com.ruoyi.database.domain.MetaImpUserModelInfo; +import com.ruoyi.database.service.MetaImpUserModelInfoService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.ArrayList; +import java.util.List; + +@Api(tags = "重点人员预警信息表") +@RestController +@RequiredArgsConstructor +@RequestMapping("/base/metaImpUserModelInfo") +public class MetaImpUserModelInfoController extends BaseController { + + private final MetaImpUserModelInfoService metaImpUserModelInfoService; + + @GetMapping + @ApiOperation("查询重点人员预警信息表") + public TableDataInfo list() { + startPage(); + ArrayList strings = new ArrayList<>(); + strings.add("320924510000"); + strings.add("320924510102"); + strings.add("320924510101"); + strings.add("320924830100"); + strings.add("320924830000"); + strings.add("320924680000"); + QueryWrapper metaImpUserModelInfoQueryWrapper = new QueryWrapper<>(); + metaImpUserModelInfoQueryWrapper.in("sign_police_code",strings); + List list = metaImpUserModelInfoService.list(metaImpUserModelInfoQueryWrapper); + return getDataTable(list); + } + + @GetMapping("/time") + @ApiOperation("查询24小时重点人员预警信息表") + public TableDataInfo timeList() { + startPage(); + ArrayList strings = new ArrayList<>(); + strings.add("320924510000"); + strings.add("320924510102"); + strings.add("320924510101"); + strings.add("320924830100"); + strings.add("320924830000"); + strings.add("320924680000"); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + LocalDateTime now = LocalDateTime.now(); + LocalDateTime minusDay = now.minusDays(1); + QueryWrapper metaImpUserModelInfoQueryWrapper = new QueryWrapper<>(); + metaImpUserModelInfoQueryWrapper.in("sign_police_code",strings); + metaImpUserModelInfoQueryWrapper.between("warning_time",formatter.format(minusDay), formatter.format(now)); + List list = metaImpUserModelInfoService.list(metaImpUserModelInfoQueryWrapper); + return getDataTable(list); + } +} diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/TransitHuntersUserModelRecordController.java b/gather-app/src/main/java/com/ruoyi/database/controller/TransitHuntersUserModelRecordController.java index 9fe45c2..bdd1a6a 100644 --- a/gather-app/src/main/java/com/ruoyi/database/controller/TransitHuntersUserModelRecordController.java +++ b/gather-app/src/main/java/com/ruoyi/database/controller/TransitHuntersUserModelRecordController.java @@ -49,12 +49,8 @@ public class TransitHuntersUserModelRecordController extends BaseController { public TableDataInfo list(TransitHuntersUserModelRecord transitHuntersUserModelRecord) { startPage(); QueryWrapper queryWrapper = new QueryWrapper<>(transitHuntersUserModelRecord); - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); - LocalDateTime now = LocalDateTime.now(); - LocalDateTime minusDay = now.minusDays(1); SimpleDateFormat outputSdf = new SimpleDateFormat("yyyyMMddHHmmss"); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - queryWrapper.between("partition_field", formatter.format(minusDay), formatter.format(now)); List list = transitHuntersUserModelRecordService.list(queryWrapper); List listVo = list.stream() .map(record -> { diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/MetaImpUserModelInfo.java b/gather-app/src/main/java/com/ruoyi/database/domain/MetaImpUserModelInfo.java new file mode 100644 index 0000000..9148cba --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/domain/MetaImpUserModelInfo.java @@ -0,0 +1,134 @@ +package com.ruoyi.database.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +import com.ruoyi.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @TableName meta_imp_user_model_info + */ +@TableName(value ="meta_imp_user_model_info") +@Data +public class MetaImpUserModelInfo extends BaseEntity { + + @ApiModelProperty("主键") + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + private Integer dataType; + + private String impUserSubType; + + private String impUserName; + + private String impUserIdCard; + + private BigDecimal longitude; + + private BigDecimal latitude; + + private String activityTime; + + private String activityDeviceAddress; + + private String activityDeviceCode; + + private String activityPoliceStationCode; + + private String activityPoliceStationName; + + private String activityMessage; + + private String signPoliceman; + + private String signPolicemanIdCard; + + private Integer signStatus; + @TableField(exist = false) + private String signStatusCn; + + private Integer disposalStatus; + @TableField(exist = false) + private String disposalStatusCn; + + private String signPoliceStation; + + private String signPoliceCode; + + private String warningTime; + + private String isImpAddress; + + private String key1; + + private String value1; + + private String key2; + + private String value2; + + private String key3; + + private String value3; + + private String key4; + + private String value4; + + private String key5; + + private String value5; + + private String key6; + + private String value6; + + private String key7; + + private String value7; + + private String key8; + + private String value8; + + private String key9; + + private String value9; + + private String key10; + + private String value10; + + private String key11; + + private String value11; + + private String key12; + + private String value12; + + private String key13; + + private String value13; + + private String key14; + + private String value14; + + private String key15; + + private String value15; + + private String key16; + + private String value16; + +} \ No newline at end of file diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/TransitHuntersUserModelRecord.java b/gather-app/src/main/java/com/ruoyi/database/domain/TransitHuntersUserModelRecord.java index 7d8658d..a90cb50 100644 --- a/gather-app/src/main/java/com/ruoyi/database/domain/TransitHuntersUserModelRecord.java +++ b/gather-app/src/main/java/com/ruoyi/database/domain/TransitHuntersUserModelRecord.java @@ -233,4 +233,21 @@ public class TransitHuntersUserModelRecord extends BaseEntity { @Excel(name = "预警时间(分区)") private Date partitionField; + + @TableField(exist = false) + @ApiModelProperty("签收状态") + @Excel(name = "签收状态") + private Integer signStatus; + @TableField(exist = false) + private String signStatusCn; + + @TableField(exist = false) + @ApiModelProperty("处置结果") + @Excel(name = "处置结果") + private Integer disposalResult; + @TableField(exist = false) + private String disposalResultCn; + + @TableField(exist = false) + private String risk; } diff --git a/gather-app/src/main/java/com/ruoyi/database/mapper/MetaImpUserModelInfoMapper.java b/gather-app/src/main/java/com/ruoyi/database/mapper/MetaImpUserModelInfoMapper.java new file mode 100644 index 0000000..6b1a6fa --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/mapper/MetaImpUserModelInfoMapper.java @@ -0,0 +1,20 @@ +package com.ruoyi.database.mapper; + +import com.ruoyi.database.domain.MetaImpUserModelInfo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** +* @author 28758 +* @description 针对表【meta_imp_user_model_info(?ص???Ԥ??ģ????Ϣ?)】的数据库操作Mapper +* @createDate 2024-01-28 15:49:30 +* @Entity com.ruoyi.database.domain.MetaImpUserModelInfo +*/ +@Mapper +public interface MetaImpUserModelInfoMapper extends BaseMapper { + +} + + + + diff --git a/gather-app/src/main/java/com/ruoyi/database/service/MetaImpUserModelInfoService.java b/gather-app/src/main/java/com/ruoyi/database/service/MetaImpUserModelInfoService.java new file mode 100644 index 0000000..4c17840 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/MetaImpUserModelInfoService.java @@ -0,0 +1,13 @@ +package com.ruoyi.database.service; + +import com.ruoyi.database.domain.MetaImpUserModelInfo; +import com.baomidou.mybatisplus.extension.service.IService; + +/** +* @author 28758 +* @description 针对表【meta_imp_user_model_info(?ص???Ԥ??ģ????Ϣ?)】的数据库操作Service +* @createDate 2024-01-28 15:49:30 +*/ +public interface MetaImpUserModelInfoService extends IService { + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/impl/MetaImpUserModelInfoServiceImpl.java b/gather-app/src/main/java/com/ruoyi/database/service/impl/MetaImpUserModelInfoServiceImpl.java new file mode 100644 index 0000000..2e948f3 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/impl/MetaImpUserModelInfoServiceImpl.java @@ -0,0 +1,22 @@ +package com.ruoyi.database.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.database.domain.MetaImpUserModelInfo; +import com.ruoyi.database.service.MetaImpUserModelInfoService; +import com.ruoyi.database.mapper.MetaImpUserModelInfoMapper; +import org.springframework.stereotype.Service; + +/** +* @author 28758 +* @description 针对表【meta_imp_user_model_info(?ص???Ԥ??ģ????Ϣ?)】的数据库操作Service实现 +* @createDate 2024-01-28 15:49:30 +*/ +@Service +public class MetaImpUserModelInfoServiceImpl extends ServiceImpl + implements MetaImpUserModelInfoService{ + +} + + + +