From 35380accc69232c46f874aed3a7818ed58febade Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 19 十二月 2025 09:34:09 +0800
Subject: [PATCH] Merge branch 'wuhuyancao' of http://139.186.142.91:10010/r/productDev/dmvisit into wuhuyancao
---
server/system_service/src/main/java/com/doumee/core/utils/Constants.java | 4 +
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/WarningServiceImpl.java | 29 +++++++++
admin/src/views/index.vue | 12 ++-
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java | 4
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/InoutRecordServiceImpl.java | 12 ++-
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java | 67 +++++++++++++++++++++-
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/InoutRecord.java | 1
admin/src/views/business/carStatistics.vue | 2
server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java | 16 +++++
admin/src/views/business/regionDevice.vue | 2
10 files changed, 128 insertions(+), 21 deletions(-)
diff --git a/admin/src/views/business/carStatistics.vue b/admin/src/views/business/carStatistics.vue
index 8ed23e3..78f8a5f 100644
--- a/admin/src/views/business/carStatistics.vue
+++ b/admin/src/views/business/carStatistics.vue
@@ -290,7 +290,7 @@
},
xAxis: {
type: 'category',
- data: names
+ data: names ||[]
},
yAxis: {
type: 'value',
diff --git a/admin/src/views/business/regionDevice.vue b/admin/src/views/business/regionDevice.vue
index 4cc8669..1aa5bfe 100644
--- a/admin/src/views/business/regionDevice.vue
+++ b/admin/src/views/business/regionDevice.vue
@@ -111,7 +111,7 @@
}) .catch(e => {
})
.finally(() => {
- this.isWorking.loading = false
+ this.isWorking.loading = falsex
})
},
getDepartmentTree (tree) {
diff --git a/admin/src/views/index.vue b/admin/src/views/index.vue
index 3a202dd..455ce35 100644
--- a/admin/src/views/index.vue
+++ b/admin/src/views/index.vue
@@ -2,7 +2,7 @@
<div class="main_home">
<!-- <div style="position: fixed;z-index: 99999"><video style="height: 100px;width: 500px" src="rtsp://10.50.250.253:554/openUrl/K2y2vE4" controls></video></div> -->
<div class="home_header">
- <div class="mb10 fs17">涓嬪崍濂斤紝{{ userInfo.realname }}</div>
+ <div class="mb10 fs17">{{timeInfo}}濂斤紝{{ userInfo.realname }}</div>
<div class="fs13">
浠婂ぉ鏄� {{ nowDate }} {{ nowWeek }}锛屾杩庤闂櫤鎱х墿娴佸洯鍖哄畨娑堜竴浣撳寲绯荤粺
</div>
@@ -233,6 +233,7 @@
return {
tabPosition: 'right',
colors,
+ timeInfo: '涓婂崍',
nowDate: '',
nowWeek: '',
headerData: {},
@@ -246,7 +247,7 @@
{ name: '璁垮鎶ュ', path: '', url: require('@/assets/icons/home_func1.png'), path: '/business/reportRecord' },
// { name: '闅愭偅闅忔墜鎷�', path: '', url: require('@/assets/icons/home_func2.png'), path: '/operation/danger/record' },
// { name: '棰勭害浼氳瀹�', path: '', url: require('@/assets/icons/home_func3.png'), path: '/meeting/bookings' },
- { name: '鍏姟杞﹂绾�', path: '', url: require('@/assets/icons/home_func5.png'), path: '/operation/serviceCar/apprRecord' },
+ { name: '鍏姟杞﹂绾�', path: '', url: require('@/assets/icons/home_func5.png'), path: '/operation/serviceCar/apprRecord' }
// { name: '鑰冨嫟宸ヤ綔鍙�', path: '', url: require('@/assets/icons/home_func4.png') },
// { name: '椋熷爞娑堣垂', path: '', url: require('@/assets/icons/8.png') }
],
@@ -375,6 +376,7 @@
updateDate () {
this.nowDate = dayjs().format('YYYY骞碝鏈圖鏃�')
this.nowWeek = weeks[new Date().getDay()]
+ this.timeInfo = new Date().getHours() < 12 ? '涓婂崍' : '涓嬪崍'
},
initData () {
this.getWorkHead()
@@ -623,7 +625,7 @@
})
},
initEchart21 () {
- console.log('initEchart21',this.staticData.lwList)
+ console.log('initEchart21', this.staticData.lwList)
if (!document.getElementById('echart21')) {
return
}
@@ -632,7 +634,7 @@
const that = this
var le1 = that.staticData.internalList.length
var le2 = that.staticData.lwList.length
- const end = Math.round(40 * ((le1>0&& le2>0?le1:1) / (le1>0&& le2>0?le2:1)))+10
+ const end = Math.round(40 * ((le1 > 0 && le2 > 0 ? le1 : 1) / (le1 > 0 && le2 > 0 ? le2 : 1))) + 10
myChart.setOption({
dataZoom: [
{
@@ -700,7 +702,7 @@
yAxis: {
type: 'category',
inverse: true,
- data: that.staticData.lwList.map(i => i.name),
+ data: that.staticData.lwList.map(i => i.name),
axisLabel: {
interval: 0
}
diff --git a/server/system_service/src/main/java/com/doumee/core/utils/Constants.java b/server/system_service/src/main/java/com/doumee/core/utils/Constants.java
index 481a4bc..c591402 100644
--- a/server/system_service/src/main/java/com/doumee/core/utils/Constants.java
+++ b/server/system_service/src/main/java/com/doumee/core/utils/Constants.java
@@ -59,6 +59,7 @@
public static final String SIGN_IN_QRCODE_PREFIX ="SIGN_IN_QRCODE_PREFIX" ;
public static final String JK_PLAN_MAX_CLUSTER ="JK_PLAN_MAX_CLUSTER" ;
public static final String JK_PLAN_DISTANCE_CLUSTER ="JK_PLAN_DISTANCE_CLUSTER" ;
+ public static final String HK_PUSH_THIRD_URL ="HK_PUSH_THIRD_URL" ;
/**
* 鎿嶄綔绫诲瀷锛岀敤浜庡仛鎺ュ彛楠岃瘉鍒嗙粍
@@ -1541,9 +1542,10 @@
AF_XFTDZS(422000000, "銆愬畨闃蹭簨浠躲�戞秷闃查�氶亾闃诲",1),
XF_SYGDBJ(254215, "銆愭秷闃蹭簨浠躲�戞按鍘嬭繃浣庢姤璀�",1),
XF_SYGGBJ(254216, "銆愭秷闃蹭簨浠躲�戞按鍘嬭繃楂樻姤璀�",1),
- XF_HZBJ(253999, "銆愭秷闃蹭簨浠躲�戠伀鐏炬姤璀�",1),
+ XF_HZBJ(254047, "銆愭秷闃蹭簨浠躲�戠伀鐏炬姤璀�",1),
XF_YWGDBJ(254331, "銆愭秷闃蹭簨浠躲�戞恫浣嶈繃浣庢姤璀�",1),
XF_YWGGBJ(254332, "銆愭秷闃蹭簨浠躲�戞恫浣嶈繃楂樻姤璀�",1),
+ AF_DZWL(327681, "銆愬畨闃蹭簨浠躲�戠數瀛愬洿鏍�",1),
;
// 鎴愬憳鍙橀噺
private int key;
diff --git a/server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java b/server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java
index 6213c15..6fe5dc6 100644
--- a/server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java
+++ b/server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java
@@ -2967,11 +2967,25 @@
public static void main(String[] args) {
try {
+
+ LocalDate today = LocalDate.now();
+
+ // 鑾峰彇褰撳墠鏃ユ湡鏄槦鏈熷嚑
+ DayOfWeek dayOfWeek = today.getDayOfWeek();
+
+ // 璁$畻鍛ㄤ竴鍜屽懆浜旂殑鏃ユ湡
+ LocalDate monday = today.with(DayOfWeek.MONDAY);
+ LocalDate friday = today.with(DayOfWeek.FRIDAY);
+
+ // 杈撳嚭鍛ㄤ竴鍜屽懆浜旂殑鏃ユ湡
+ System.out.println("Monday: " + monday.toString());
+ System.out.println("Friday: " + friday.toString());
+
// Date date = getISO8601DateByStr("2024-04-15T07:46:36.014+08:00");
// Date date1 = getISO8601DateByStr("2024-06-14T08:46:36.014+08:00");
// System.out.println(DateUtil.afterMinutesDate(-5));
- System.out.println(DateUtil.getWeekZhouOfDate(getDateFromString2("2025-11-06 00:00:00")));
+// System.out.println(DateUtil.getWeekZhouOfDate(getDateFromString2("2025-11-06 00:00:00")));
// System.out.println(getPlusTime2(DateUtil.addMonthToDate(new Date(),-1)));
// System.out.println(DateUtil.getBeforMonthStr(new Date(),12));
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java
index 3a88eef..6d913e4 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java
@@ -288,8 +288,8 @@
* 3銆佽兘绠′腑蹇冿細ngzx
*/
public interface MenuPageId{
- String[] componentIds = new String[]{"vms","fem","cems"};
- String afzx = "010100";//瀹夐槻涓績
+ String[] componentIds = new String[]{"Infovision iPark Platform","fem","cems"};
+ String afzx = "rule_event_center";//瀹夐槻涓績
String xkzx = "000101";//娑堟帶涓績
String ngzx = "ngzx";//鑳界涓績
String jsc = "jsc";//鐗╀笟鍚庡嫟
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/InoutRecord.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/InoutRecord.java
index 80a4a5f..05eb1cc 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/InoutRecord.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/InoutRecord.java
@@ -20,7 +20,6 @@
@ApiModel("鍑哄叆鍦轰汉娆¤溅娆℃瘡鏃ョ粺璁¤〃")
@TableName("`inout_record`")
public class InoutRecord {
-
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "涓婚敭", example = "1")
private Integer id;
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/InoutRecordServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/InoutRecordServiceImpl.java
index cc19130..dd19231 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/InoutRecordServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/InoutRecordServiceImpl.java
@@ -155,7 +155,7 @@
//浜哄憳鍒嗙被 鍗曠嫭澶勭悊浜哄憳鏁版嵁 0鍔冲姟璁垮 1鏅�氳瀹� 2鍐呴儴鍛樺伐 3杞﹁締淇℃伅 4鐩稿叧鏂逛汉鍛� 5璐ц繍鍙告満
- private static String[] userTypeList = new String[]{"","鏅�氳瀹�","鍐呴儴浜哄憳","","鐩稿叧鏂逛汉鍛�","璐ц繍鍙告満"};
+ private static String[] userTypeList = new String[]{"","鏅�氳瀹�","鍐呴儴浜哄憳","","鐩稿叧鏂逛汉鍛�"};
/**
@@ -172,8 +172,11 @@
){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
- //鏌ヨ鏈懆鐨勫紑濮嬫棩鏈熷拰缁撴潫鏃ユ湡
- Long weekStart = LocalDate.now().with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)).atStartOfDay(ZoneOffset.UTC).toInstant().toEpochMilli();
+ //鏌ヨ鏈懆鐨勫紑濮嬫棩鏈�
+ LocalDate today = LocalDate.now();
+ // 璁$畻鍛ㄤ竴鍜屽懆浜旂殑鏃ユ湡
+ LocalDate monday = today.with(DayOfWeek.MONDAY);
+ Long weekStart = DateUtil.fromStringToDate("yyyy-MM-dd HH:mm:ss",monday.toString() + " 00:00:00").getTime();//LocalDate.now().with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)).atStartOfDay(ZoneOffset.UTC).toInstant().toEpochMilli();
InParkUserDataVO inParkUserDataVO = new InParkUserDataVO();
List<InoutRecord> yearList = inoutRecordMapper.selectJoinList(InoutRecord.class,new MPJLambdaWrapper<InoutRecord>()
.selectAll(InoutRecord.class)
@@ -310,7 +313,7 @@
for (String categoryName:setList) {
GeneralDataVO generalDataVO = new GeneralDataVO();
generalDataVO.setName(categoryName);
- generalDataVO.setTotal(yearList.stream().filter(j->StringUtils.isNotBlank(j.getCategoryParentName())&&j.getCategoryName().equals(categoryName)).collect(Collectors.toList()).size());
+ generalDataVO.setTotal(yearList.stream().filter(j->StringUtils.isNotBlank(j.getCategoryParentName())&&j.getCategoryParentName().equals(categoryName)).collect(Collectors.toList()).size());
generalDataVO.setRata(new BigDecimal(generalDataVO.getTotal().toString()).divide(new BigDecimal(yearList.size()+""),2,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
rataList.add(generalDataVO);
}
@@ -352,7 +355,6 @@
}else if(Constants.equalsInteger(inParkDataDTO.getDateStr().length(),7)&&Constants.equalsInteger(inParkDataDTO.getType(),Constants.ZERO)){
mpjLambdaWrapper.select("car_code,category_name,DATE_FORMAT(CREATE_DATE, '%Y-%m-%d') as createDateStr ");
}else if(Constants.equalsInteger(inParkDataDTO.getDateStr().length(),4)&&Constants.equalsInteger(inParkDataDTO.getType(),Constants.ONE)){
-
mpjLambdaWrapper.select("member_phone,MEMBER_TYPE,DATE_FORMAT(CREATE_DATE, '%Y-%m') as createDateStr");
}else{
mpjLambdaWrapper.select("member_phone,MEMBER_TYPE,DATE_FORMAT(CREATE_DATE, '%Y-%m-%d') as createDateStr ");
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/WarningServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/WarningServiceImpl.java
index cdf162f..da0bdca 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/WarningServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/WarningServiceImpl.java
@@ -315,6 +315,9 @@
model.setSubscribeStatus(Constants.TWO);
model.setSubscribeInfo(response.getMsg());
}
+
+ startCheckThirdDest(eventParam);
+
}else{
model.setSubscribeStatus(Constants.ZERO);
}
@@ -325,6 +328,32 @@
warningMapper.updateById(model);
}
+ /**
+ * 妫�鏌ヤ笁鏂规槸鍚﹂渶瑕佽闃呮捣搴蜂簨浠�
+ * @param eventParam
+ */
+
+ private void startCheckThirdDest(EventSubRequest eventParam) {
+ try {
+ String thirdpath =systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_PUSH_THIRD_URL).getCode();
+ if(StringUtils.isNotBlank(thirdpath)){
+ String[] ss = thirdpath.split(";");
+ for(String s : ss){
+ eventParam.setEventDest(s);
+ BaseResponse response = HKService.eventSub(eventParam);
+ if(Objects.nonNull(response)&&StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)){
+ log.error("========璁㈤槄鍏朵粬涓夋柟鍦板潃鎴愬姛:"+s);
+ }else{
+ log.error("========璁㈤槄鍏朵粬涓夋柟鍦板潃閿欒:"+s);
+ }
+ }
+ }
+ }catch (Exception e){
+ log.error("========璁㈤槄鍏朵粬涓夋柟鍦板潃閿欒"+e.getMessage());
+ }
+
+ }
+
/**
* 瀹氭椂鑾峰彇澶╂皵淇℃伅鎵ц
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java
index eb48099..bf7cb52 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java
@@ -26,6 +26,7 @@
import com.doumee.dao.business.model.*;
import com.doumee.dao.business.model.Member;
import com.doumee.dao.web.reqeust.SavePlatformWarnEventDTO;
+import com.doumee.dao.web.response.platformReport.CarmeraListVO;
import com.doumee.service.business.VisitsService;
import com.doumee.service.business.impl.JkCabinetGridServiceImpl;
import com.doumee.service.business.impl.PlatformWarnEventServiceImpl;
@@ -37,6 +38,7 @@
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
@@ -498,12 +500,15 @@
warningEvent.setEventId(request.getEventId());
warningEvent.setEventType(request.getEventType().toString());
warningEvent.setHappenTime(request.getHappenTime());
- warningEvent.setJsonContent(request.getData().toJSONString());
+ if(Objects.nonNull(request.getData())){
+ warningEvent.setJsonContent(request.getData().toJSONString());
+ }
warningEvent.setSrcIndex(request.getSrcIndex());
warningEvent.setSrcType(request.getSrcType());
warningEvent.setSrcName(request.getSrcName());
warningEvent.setWarningId(warning.getId());
warningEvent.setDeviceId(request.getSrcIndex());
+ warningEvent.setRegion(this.getRegionsName(warningEvent.getSrcIndex(),warning.getType()));
warningEventMapper.insert(warningEvent);
if(Objects.nonNull(warningConfig)){
@@ -529,8 +534,7 @@
warningPush.setContent(content);
warningPush.setStatus(Constants.ZERO);
warningPush.setPushType(Constants.ZERO);
- //TODO 鏍规嵁鍏蜂綋鏁版嵁瀵规瘮鑾峰彇
- warningPush.setRegion( "鏈煡浣嶇疆");
+ warningPush.setRegion( warningEvent.getRegion());
if (com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(memberList)) {
warningPush.setMemberIds(
StringUtils.join(memberList.stream().map(i -> i.getId()).collect(Collectors.toList()), ",")
@@ -569,9 +573,64 @@
}
saveInterfaceLog(param,"/business/hksync/push/notice",result,true);
return null;
-
}
+ @Autowired
+ private RedisTemplate<String,Object> stringRedisTemplate;
+
+ public String getRegionsName(String srcIndex,Integer warningType){
+ log.error("銆愬尮閰嶈澶囦笌鍖哄煙鍏崇郴淇℃伅銆�========寮�濮�=======锛�"+srcIndex);
+ String regionName = "鏈煡鍖哄煙";
+ if(StringUtils.isBlank(srcIndex)){
+ return regionName;
+ }
+ try{
+ if(Constants.equalsInteger(warningType,Constants.ZERO)){
+ List<CarmeraListVO> carmeraListVOList = (List<CarmeraListVO>) stringRedisTemplate.opsForValue().get(Constants.RedisKeys.HK_CAMERAS);//鎵�鏈夌洃鎺х偣鏁版嵁
+ if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(carmeraListVOList)){
+ if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(carmeraListVOList)){
+ for (CarmeraListVO c:carmeraListVOList) {
+ if(c.getIndexCode().equals(srcIndex)){
+ log.error("銆愮洃鎺у尯鍩熷尮閰嶇粨鏋溿��===============锛�"+c.getRegionName());
+ return c.getRegionName();
+ }
+ }
+ }
+ }
+ }else{
+ List<CarmeraListVO> fireDeviceListVOList = (List<CarmeraListVO>) stringRedisTemplate.opsForValue().get(Constants.RedisKeys.HK_FIRE_DEVICE);//鎵�鏈夋秷闃茶澶囨暟鎹�
+ List<CarmeraListVO> sensorListVOList = (List<CarmeraListVO>) stringRedisTemplate.opsForValue().get(Constants.RedisKeys.HK_SENSOR);//鎵�鏈変紶鎰熷櫒
+ if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(fireDeviceListVOList)){
+ if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(fireDeviceListVOList)){
+ for (CarmeraListVO c:fireDeviceListVOList) {
+ if(c.getIndexCode().equals(srcIndex)){
+ log.error("銆愭秷闃插尯鍩熷尮閰嶇粨鏋溿��===============锛�"+c.getRegionName());
+ return c.getRegionName();
+ }
+ }
+ }
+ }
+
+ if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(sensorListVOList)){
+ if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(sensorListVOList)){
+ for (CarmeraListVO c:sensorListVOList) {
+ if(c.getIndexCode().equals(srcIndex)){
+ log.error("銆愪紶鎰熷櫒鍖哄煙鍖归厤缁撴灉銆�==============锛�"+c.getRegionName());
+ return c.getRegionName();
+ }
+ }
+ }
+ }
+ }
+
+ }catch (Exception e){
+ e.printStackTrace();
+ }
+ log.error("銆愬尮閰嶈澶囦笌鍖哄煙鍏崇郴淇℃伅銆�========缁撴潫=======锛�"+srcIndex);
+ return regionName;
+ }
+
+
/**
* 娴峰悍璁垮浜嬩欢鎺ㄩ��
* @param param
--
Gitblit v1.9.3