diff --git a/gather-app/src/main/java/com/ruoyi/business/controller/BigScreenController.java b/gather-app/src/main/java/com/ruoyi/business/controller/BigScreenController.java index e53699e..a9080e0 100644 --- a/gather-app/src/main/java/com/ruoyi/business/controller/BigScreenController.java +++ b/gather-app/src/main/java/com/ruoyi/business/controller/BigScreenController.java @@ -629,13 +629,24 @@ public class BigScreenController extends BaseController { ) )); - LinkedMap>> linkedMap = new LinkedMap<>(); - resultMap.entrySet().stream() - .sorted((entry1, entry2) -> { - Collator collator = Collator.getInstance(java.util.Locale.CHINA); - return collator.compare(entry1.getKey(), entry2.getKey()); - }) - .forEachOrdered(entry -> linkedMap.put(entry.getKey(), entry.getValue())); + LinkedHashMap>> linkedMap = resultMap.entrySet() + .stream() + .sorted(Comparator.comparingInt(entry -> { + String key = entry.getKey(); + if ("商铺".equals(key)) { + return Integer.MAX_VALUE; + } else { + String number = key.replaceAll("[^0-9]+", ""); + return Integer.parseInt(number); + } + })) + .collect(Collectors.toMap( + Map.Entry::getKey, + Map.Entry::getValue, + (e1, e2) -> e1, + LinkedHashMap::new + )); + return AjaxResult.success(linkedMap); } catch (Exception e) { logger.info(StringKit.toString(e)); 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 5b291db..286d970 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 @@ -86,13 +86,15 @@ public class DisposalInfoController extends BaseController { @ApiOperation("修改或新增预警信息处置表") public AjaxResult insert(@RequestBody DisposalInfo disposalInfo) { if (disposalInfo != null) { + disposalInfo.setSignStatus(1); if ("无风险".equals(disposalInfo.getDisposalResultCn())) { disposalInfo.setDisposalResult(1); + disposalInfo.setSignStatus(3); } if ("有风险".equals(disposalInfo.getDisposalResultCn())) { disposalInfo.setDisposalResult(2); } - disposalInfo.setSignStatus(1); + if (disposalInfo.getSignPoliceman() != null && disposalInfo.getSignPoliceStation() != null) { disposalInfo.setSignStatus(2); } 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 index eeb28fa..b2495a1 100644 --- a/gather-app/src/main/java/com/ruoyi/database/controller/MetaImpUserModelInfoController.java +++ b/gather-app/src/main/java/com/ruoyi/database/controller/MetaImpUserModelInfoController.java @@ -5,15 +5,18 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.utils.bean.BeanUtils; import com.ruoyi.database.domain.DisposalInfo; import com.ruoyi.database.domain.MetaImpUserModelInfo; import com.ruoyi.database.domain.TransitHuntersUserModelRecord; +import com.ruoyi.database.domain.vo.ImpUserModelVO; import com.ruoyi.database.domain.vo.MetaImpUserModelInfoVO; import com.ruoyi.database.service.MetaImpUserModelInfoService; import com.ruoyi.database.service.TransitHuntersUserModelRecordService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.SmartInitializingSingleton; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -21,9 +24,7 @@ import org.springframework.web.bind.annotation.RestController; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.List; +import java.util.*; import java.util.stream.Collectors; @Api(tags = "重点人员预警信息表") @@ -40,15 +41,28 @@ public class MetaImpUserModelInfoController extends BaseController { public AjaxResult list(MetaImpUserModelInfoVO metaImpUserModelInfoVO) { if ("重点人员".equals(metaImpUserModelInfoVO.getType())) { MetaImpUserModelInfo one = metaImpUserModelInfoService.lambdaQuery().eq(MetaImpUserModelInfo::getId, metaImpUserModelInfoVO.getDataId()).one(); - - return AjaxResult.success(one); + ImpUserModelVO impUserModelVO = new ImpUserModelVO(); + BeanUtils.copyProperties(one, impUserModelVO); + Map map = new HashMap<>(); + map.put(one.getKey1(), one.getValue1()); + map.put(one.getKey2(), one.getValue2()); + map.put(one.getKey3(), one.getValue3()); + map.put(one.getKey4(), one.getValue4()); + map.put(one.getKey5(), one.getValue5()); + map.put(one.getKey6(), one.getValue6()); + map.put(one.getKey7(), one.getValue7()); + map.put(one.getKey8(), one.getValue8()); + map.put(one.getKey9(), one.getValue9()); + map.put(one.getKey10(), one.getValue10()); + impUserModelVO.setKV(map); + return AjaxResult.success(impUserModelVO); } if ("狩猎人员".equals(metaImpUserModelInfoVO.getType())) { TransitHuntersUserModelRecord one = transitHuntersUserModelRecordService.lambdaQuery().eq(TransitHuntersUserModelRecord::getId, metaImpUserModelInfoVO.getDataId()).one(); - if (one.getWarningLevel() == 3){ + if (one.getWarningLevel() == 3) { one.setWarningLevelCn("二级"); } - if (one.getCaptureFrequency() == 1){ + if (one.getCaptureFrequency() == 1) { one.setEndGlobalPic(null); } return AjaxResult.success(one); @@ -87,11 +101,28 @@ public class MetaImpUserModelInfoController extends BaseController { metaImpUserModelInfoVO.setWarningTime(metaImpUserModelInfo.getWarningTime()); metaImpUserModelInfoVO.setDataId(metaImpUserModelInfo.getId()); metaImpUserModelInfoVO.setType("重点人员"); - if (metaImpUserModelInfo.getDataType() == 101003) { + if (Objects.equals(metaImpUserModelInfo.getDataType(), "101003")) { metaImpUserModelInfoVO.setValue(metaImpUserModelInfo.getValue3()); + metaImpUserModelInfoVO.setSubType("人脸抓拍"); } - if (metaImpUserModelInfo.getDataType() == 060001) { + if (Objects.equals(metaImpUserModelInfo.getDataType(), "060001")) { metaImpUserModelInfoVO.setValue(metaImpUserModelInfo.getValue4()); + metaImpUserModelInfoVO.setSubType("车辆抓拍"); + } + if (Objects.equals(metaImpUserModelInfo.getDataType(), "500002")) { + metaImpUserModelInfoVO.setSubType("技侦定位"); + } + if (Objects.equals(metaImpUserModelInfo.getDataType(), "100086")) { + metaImpUserModelInfoVO.setSubType("汽车客运"); + } + if (Objects.equals(metaImpUserModelInfo.getDataType(), "900018")) { + metaImpUserModelInfoVO.setSubType("民航进港"); + } + if (Objects.equals(metaImpUserModelInfo.getDataType(), "102011")) { + metaImpUserModelInfoVO.setSubType("铁路订票"); + } + if (Objects.equals(metaImpUserModelInfo.getDataType(), "101005")) { + metaImpUserModelInfoVO.setSubType("旅馆住宿"); } metaImpUserModelInfoVOS.add(metaImpUserModelInfoVO); @@ -115,4 +146,7 @@ public class MetaImpUserModelInfoController extends BaseController { .collect(Collectors.toList()); return getDataTable(infoVOS); } + } + + 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 index fe6a084..8f664e4 100644 --- a/gather-app/src/main/java/com/ruoyi/database/domain/MetaImpUserModelInfo.java +++ b/gather-app/src/main/java/com/ruoyi/database/domain/MetaImpUserModelInfo.java @@ -24,7 +24,7 @@ public class MetaImpUserModelInfo extends BaseEntity { @TableId(value = "id", type = IdType.AUTO) private Long id; - private Integer dataType; + private String dataType; @ApiModelProperty("重点人小类") diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/vo/MetaImpUserModelInfoVO.java b/gather-app/src/main/java/com/ruoyi/database/domain/vo/MetaImpUserModelInfoVO.java index 00488ae..f65bbda 100644 --- a/gather-app/src/main/java/com/ruoyi/database/domain/vo/MetaImpUserModelInfoVO.java +++ b/gather-app/src/main/java/com/ruoyi/database/domain/vo/MetaImpUserModelInfoVO.java @@ -31,6 +31,8 @@ public class MetaImpUserModelInfoVO extends BaseEntity { private String type; + private String subType; + private Long dataId; } \ No newline at end of file