From dc5b54657495c06234bb4332af0ca40c5c0b8b18 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 02 九月 2024 10:11:12 +0800
Subject: [PATCH] 最新版本
---
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformWmsDetail.java | 8
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformEvent.java | 177 +++++++++++++
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/event/parks/EventPlatformCarsInfoRequest.java | 2
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/PlatformEventMapper.java | 12
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformWmsDetailServiceImpl.java | 1
server/db/business.platform_event.permissions.sql | 6
server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/PlatformEventController.java | 90 ++++++
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java | 144 ++++++++++
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformEventServiceImpl.java | 220 ++++++++++++++++
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/TransparentChannelBodyRequest.java | 1
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/wms/WmsServiceImpl.java | 8
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/fhk/HkSyncOrgUserFromSelfServiceImpl.java | 1
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/event/parks/EventPlatformCarsStatusInfoRequest.java | 2
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/PlatformEventService.java | 97 +++++++
14 files changed, 753 insertions(+), 16 deletions(-)
diff --git a/server/db/business.platform_event.permissions.sql b/server/db/business.platform_event.permissions.sql
new file mode 100644
index 0000000..037b95d
--- /dev/null
+++ b/server/db/business.platform_event.permissions.sql
@@ -0,0 +1,6 @@
+INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:platformevent:create', '鏂板缓鏈堝彴杞﹁締杩涘嚭浜嬩欢鎺ㄩ�佽褰曡〃', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
+INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:platformevent:delete', '鍒犻櫎鏈堝彴杞﹁締杩涘嚭浜嬩欢鎺ㄩ�佽褰曡〃', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
+INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:platformevent:update', '淇敼鏈堝彴杞﹁締杩涘嚭浜嬩欢鎺ㄩ�佽褰曡〃', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
+INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:platformevent:query', '鏌ヨ鏈堝彴杞﹁締杩涘嚭浜嬩欢鎺ㄩ�佽褰曡〃', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
+INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:platformevent:exportExcel', '瀵煎嚭鏈堝彴杞﹁締杩涘嚭浜嬩欢鎺ㄩ�佽褰曡〃(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
+
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/PlatformEventController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/PlatformEventController.java
new file mode 100644
index 0000000..8b2ef50
--- /dev/null
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/PlatformEventController.java
@@ -0,0 +1,90 @@
+package com.doumee.api.business;
+
+import com.doumee.api.BaseController;
+import com.doumee.core.annotation.excel.ExcelExporter;
+import com.doumee.core.annotation.pr.PreventRepeat;
+import com.doumee.core.model.ApiResponse;
+import com.doumee.core.model.PageWrap;
+import com.doumee.core.model.PageData;
+import com.doumee.dao.business.model.PlatformEvent;
+import com.doumee.service.business.PlatformEventService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import javax.servlet.http.HttpServletResponse;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2024/08/28 17:24
+ */
+@Api(tags = "鏈堝彴杞﹁締杩涘嚭浜嬩欢鎺ㄩ�佽褰曡〃")
+@RestController
+@RequestMapping("/business/platformEvent")
+public class PlatformEventController extends BaseController {
+
+ @Autowired
+ private PlatformEventService platformEventService;
+
+ @PreventRepeat
+ @ApiOperation("鏂板缓")
+ @PostMapping("/create")
+ @RequiresPermissions("business:platformevent:create")
+ public ApiResponse create(@RequestBody PlatformEvent platformEvent) {
+ return ApiResponse.success(platformEventService.create(platformEvent));
+ }
+
+ @ApiOperation("鏍规嵁ID鍒犻櫎")
+ @GetMapping("/delete/{id}")
+ @RequiresPermissions("business:platformevent:delete")
+ public ApiResponse deleteById(@PathVariable Integer id) {
+ platformEventService.deleteById(id);
+ return ApiResponse.success(null);
+ }
+
+ @ApiOperation("鎵归噺鍒犻櫎")
+ @GetMapping("/delete/batch")
+ @RequiresPermissions("business:platformevent:delete")
+ public ApiResponse deleteByIdInBatch(@RequestParam String ids) {
+ String [] idArray = ids.split(",");
+ List<Integer> idList = new ArrayList<>();
+ for (String id : idArray) {
+ idList.add(Integer.valueOf(id));
+ }
+ platformEventService.deleteByIdInBatch(idList);
+ return ApiResponse.success(null);
+ }
+
+ @ApiOperation("鏍规嵁ID淇敼")
+ @PostMapping("/updateById")
+ @RequiresPermissions("business:platformevent:update")
+ public ApiResponse updateById(@RequestBody PlatformEvent platformEvent) {
+ platformEventService.updateById(platformEvent);
+ return ApiResponse.success(null);
+ }
+
+ @ApiOperation("鍒嗛〉鏌ヨ")
+ @PostMapping("/page")
+ @RequiresPermissions("business:platformevent:query")
+ public ApiResponse<PageData<PlatformEvent>> findPage (@RequestBody PageWrap<PlatformEvent> pageWrap) {
+ return ApiResponse.success(platformEventService.findPage(pageWrap));
+ }
+
+ @ApiOperation("瀵煎嚭Excel")
+ @PostMapping("/exportExcel")
+ @RequiresPermissions("business:platformevent:exportExcel")
+ public void exportExcel (@RequestBody PageWrap<PlatformEvent> pageWrap, HttpServletResponse response) {
+ ExcelExporter.build(PlatformEvent.class).export(platformEventService.findPage(pageWrap).getRecords(), "鏈堝彴杞﹁締杩涘嚭浜嬩欢鎺ㄩ�佽褰曡〃", response);
+ }
+
+ @ApiOperation("鏍规嵁ID鏌ヨ")
+ @GetMapping("/{id}")
+ @RequiresPermissions("business:platformevent:query")
+ public ApiResponse findById(@PathVariable Integer id) {
+ return ApiResponse.success(platformEventService.findById(id));
+ }
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/TransparentChannelBodyRequest.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/TransparentChannelBodyRequest.java
index b19e85a..729b00e 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/TransparentChannelBodyRequest.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/TransparentChannelBodyRequest.java
@@ -39,5 +39,6 @@
private Integer speed ; // Number false 閫熷害
private Integer stayTime ; //Number false 鍋滅暀鏃堕棿
private Integer fontSize ; //Number false 瀛椾綋澶у皬
+ private Integer fontColor ; //Number false 瀛椾綋棰滆壊(1:绾㈣壊锛�2锛氱豢鑹诧紝4:榛勮壊锛�8锛氳摑鑹诧紝16锛氱传鑹诧紝32锛氶潚鑹诧紝64锛氱櫧鑹�)
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/event/parks/EventPlatformCarsInfoRequest.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/event/parks/EventPlatformCarsInfoRequest.java
index 1ae038c..4c89337 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/event/parks/EventPlatformCarsInfoRequest.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/event/parks/EventPlatformCarsInfoRequest.java
@@ -10,7 +10,7 @@
private String srcIndex;// String 浜嬩欢婧愮紪鍙凤紝鐗╃悊璁惧鏄祫婧愮紪鍙� 鏄� 64
private String dateTime;//
private String srcType;// String 浜嬩欢婧愮被鍨� 鏄� 16
- private Integer eventType ;//Number 浜嬩欢绫诲瀷 鏄�
+ private String eventType ;//Number 浜嬩欢绫诲瀷 鏄�
private String srcName;// String 浜嬩欢婧愬悕绉� 鍚� 64
private Integer status ;//Number 浜嬩欢鐘舵�� 鏄� 0-鐬椂1-寮�濮�2-鍋滄3-浜嬩欢鑴夊啿4-浜嬩欢鑱斿姩缁撴灉鏇存柊5-寮傛鍥剧墖涓婁紶
private Integer timeout ;//Number 鑴夊啿瓒呮椂鏃堕棿 鏄� 鍗曚綅锛氱
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/event/parks/EventPlatformCarsStatusInfoRequest.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/event/parks/EventPlatformCarsStatusInfoRequest.java
index 177a789..13d09a8 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/event/parks/EventPlatformCarsStatusInfoRequest.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/event/parks/EventPlatformCarsStatusInfoRequest.java
@@ -6,7 +6,7 @@
@Data
public class EventPlatformCarsStatusInfoRequest {
- private Integer HPNo;// 1,杞﹂亾鍙�
+ private String HPNo;// 1,杞﹂亾鍙�
private Integer plateScore;//: 80杞︾墝璇勫垎
private String motionStatus;//'leave',杩愬姩鐘舵�� enter#杩涘叆,leave#绂诲紑
private String plateNo;//'A12345',杞︾墝鍙�
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/PlatformEventMapper.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/PlatformEventMapper.java
new file mode 100644
index 0000000..a7ebd19
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/PlatformEventMapper.java
@@ -0,0 +1,12 @@
+package com.doumee.dao.business;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.doumee.dao.business.model.PlatformEvent;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2024/08/28 17:24
+ */
+public interface PlatformEventMapper extends BaseMapper<PlatformEvent> {
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformEvent.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformEvent.java
new file mode 100644
index 0000000..3f39246
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformEvent.java
@@ -0,0 +1,177 @@
+package com.doumee.dao.business.model;
+
+import com.doumee.core.annotation.excel.ExcelColumn;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import java.util.Date;
+
+/**
+ * 鏈堝彴杞﹁締杩涘嚭浜嬩欢鎺ㄩ�佽褰曡〃
+ * @author 姹熻箘韫�
+ * @date 2024/08/28 17:24
+ */
+@Data
+@ApiModel("鏈堝彴杞﹁締杩涘嚭浜嬩欢鎺ㄩ�佽褰曡〃")
+@TableName("`platform_event`")
+public class PlatformEvent {
+
+ @TableId(type = IdType.AUTO)
+ @ApiModelProperty(value = "涓婚敭", example = "1")
+ @ExcelColumn(name="涓婚敭")
+ private Integer id;
+
+ @ApiModelProperty(value = "鍒涘缓浜虹紪鐮�", example = "1")
+ @ExcelColumn(name="鍒涘缓浜虹紪鐮�")
+ private Integer creator;
+
+ @ApiModelProperty(value = "鍒涘缓鏃堕棿")
+ @ExcelColumn(name="鍒涘缓鏃堕棿")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private Date createDate;
+
+ @ApiModelProperty(value = "鏇存柊浜虹紪鐮�", example = "1")
+ @ExcelColumn(name="鏇存柊浜虹紪鐮�")
+ private Integer editor;
+
+ @ApiModelProperty(value = "鏇存柊鏃堕棿")
+ @ExcelColumn(name="鏇存柊鏃堕棿")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private Date editDate;
+
+ @ApiModelProperty(value = "鏄惁鍒犻櫎0鍚� 1鏄�", example = "1")
+ @ExcelColumn(name="鏄惁鍒犻櫎0鍚� 1鏄�")
+ private Integer isdeleted;
+
+ @ApiModelProperty(value = "澶囨敞")
+ @ExcelColumn(name="澶囨敞")
+ private String remark;
+
+ @ApiModelProperty(value = "浜嬩欢鍞竴鏍囪瘑锛屽悓涓�浜嬩欢鑻ヤ笂鎶ュ娆★紝鍒欎笂鎶ヤ簨浠剁殑eventId鐩稿悓")
+ @ExcelColumn(name="浜嬩欢鍞竴鏍囪瘑锛屽悓涓�浜嬩欢鑻ヤ笂鎶ュ娆★紝鍒欎笂鎶ヤ簨浠剁殑eventId鐩稿悓")
+ private String eventId;
+
+ @ApiModelProperty(value = "浜嬩欢绫诲瀷")
+ @ExcelColumn(name="浜嬩欢绫诲瀷")
+ private String eventType;
+ @ApiModelProperty(value = "浜嬩欢绫诲瀷(data绾э級")
+ @ExcelColumn(name="浜嬩欢绫诲瀷锛坉ata绾э級")
+ private String dataEventType;
+
+ @ApiModelProperty(value = "浜嬩欢婧愮被鍨嬶紝濡傗�渁csDevice鈥�")
+ @ExcelColumn(name="浜嬩欢婧愮被鍨嬶紝濡傗�渁csDevice鈥�")
+ private String srcType;
+
+ @ApiModelProperty(value = "浜嬩欢鍙戠敓鏃堕棿锛堣澶囨椂闂�")
+ @ExcelColumn(name="浜嬩欢鍙戠敓鏃堕棿锛堣澶囨椂闂�")
+ private String happenTime;
+
+ @ApiModelProperty(value = "闂ㄧ鐐瑰敮涓�鎺ュ叆缂栫爜")
+ @ExcelColumn(name="闂ㄧ鐐瑰敮涓�鎺ュ叆缂栫爜")
+ private String srcIndex;
+
+ @ApiModelProperty(value = "闂ㄧ鍚嶇О")
+ @ExcelColumn(name="闂ㄧ鍚嶇О")
+ private String srcName;
+
+ @ApiModelProperty(value = "浜嬩欢鐘舵��,0-鐬椂 1-寮�濮� 2-鍋滄 4-浜嬩欢鑱斿姩缁撴灉鏇存柊 5-浜嬩欢鍥剧墖寮傛涓婁紶", example = "1")
+ @ExcelColumn(name="浜嬩欢鐘舵��,0-鐬椂 1-寮�濮� 2-鍋滄 4-浜嬩欢鑱斿姩缁撴灉鏇存柊 5-浜嬩欢鍥剧墖寮傛涓婁紶")
+ private Integer status;
+
+ @ApiModelProperty(value = "鑴夊啿瓒呮椂鏃堕棿锛屽崟浣嶏細绉掞紝鐬椂浜嬩欢姝ゅ瓧娈靛~0", example = "1")
+ @ExcelColumn(name="鑴夊啿瓒呮椂鏃堕棿锛屽崟浣嶏細绉掞紝鐬椂浜嬩欢姝ゅ瓧娈靛~0")
+ private Integer timeout;
+
+ @ApiModelProperty(value = "鏁版嵁绫诲瀷", example = "1")
+ @ExcelColumn(name="鏁版嵁绫诲瀷")
+ private String dataType;
+
+ @ApiModelProperty(value = "鍙戦�佹椂闂�", example = "1")
+ @ExcelColumn(name="鍙戦�佹椂闂�")
+ private String sendTime;
+
+ @ApiModelProperty(value = "浜嬩欢鍙戠敓鏃ユ湡", example = "1")
+ @ExcelColumn(name="浜嬩欢鍙戠敓鏃ユ湡")
+ private String dateTime;
+
+ @ApiModelProperty(value = "ip鍦板潃")
+ @ExcelColumn(name="ip鍦板潃")
+ private String ipAddress;
+
+ @ApiModelProperty(value = "ipv6鍦板潃", example = "1")
+ @ExcelColumn(name="ipv6鍦板潃")
+ private String ipv6Address;
+
+ @ApiModelProperty(value = "绔彛", example = "1")
+ @ExcelColumn(name="绔彛")
+ private Integer portNo;
+
+ @ApiModelProperty(value = "鍗忚", example = "1")
+ @ExcelColumn(name="鍗忚")
+ private String protocol;
+
+ @ApiModelProperty(value = "mac鍦板潃")
+ @ExcelColumn(name="mac鍦板潃")
+ private String macAddress;
+
+ @ApiModelProperty(value = "娓犻亾缂栧彿", example = "1")
+ @ExcelColumn(name="娓犻亾缂栧彿")
+ private Integer channelId;
+
+ @ApiModelProperty(value = "娲诲姩鍙戦�佹鏁�", example = "1")
+ @ExcelColumn(name="娲诲姩鍙戦�佹鏁�")
+ private Integer activePostCount;
+
+ @ApiModelProperty(value = "浜嬩欢鐘舵��", example = "1")
+ @ExcelColumn(name="浜嬩欢鐘舵��")
+ private String eventState;
+
+ @ApiModelProperty(value = "浜嬩欢鎻忚堪")
+ @ExcelColumn(name="浜嬩欢鎻忚堪")
+ private String eventDescription;
+
+ @ApiModelProperty(value = "娓犻亾鍚嶇О", example = "1")
+ @ExcelColumn(name="娓犻亾鍚嶇О")
+ private String channelName;
+
+ @ApiModelProperty(value = "璁惧缂栫爜", example = "1")
+ @ExcelColumn(name="璁惧缂栫爜")
+ private String deviceId;
+
+ @ApiModelProperty(value = "杞﹂亾鍙�")
+ @ExcelColumn(name="杞﹂亾鍙�")
+ private String hpno;
+
+ @ApiModelProperty(value = "杩愬姩鐘舵�伮� enter#杩涘叆,leave#绂诲紑")
+ @ExcelColumn(name="杩愬姩鐘舵�伮� enter#杩涘叆,leave#绂诲紑")
+ private String motionStatus;
+
+ @ApiModelProperty(value = "杞︾墝鍙�", example = "1")
+ @ExcelColumn(name="杞︾墝鍙�")
+ private String plateNo;
+
+ @ApiModelProperty(value = "杞﹂棬鐘舵�伮� open-寮�闂紝close-鍏抽棬", example = "1")
+ @ExcelColumn(name="杞﹂棬鐘舵�伮� open-寮�闂紝close-鍏抽棬")
+ private String vehicleDoorStatus;
+
+ @ApiModelProperty(value = "杞﹀ご杞﹀熬鐘舵�伮� 聽front#杞﹀ご,rear#杞﹀熬", example = "1")
+ @ExcelColumn(name="杞﹀ご杞﹀熬鐘舵�伮� 聽front#杞﹀ご,rear#杞﹀熬")
+ private String stockStatus;
+
+ @ApiModelProperty(value = "杞︾墝璇勫垎[0-100]", example = "1")
+ @ExcelColumn(name="杞︾墝璇勫垎[0-100]")
+ private Integer plateScore;
+
+ @ApiModelProperty(value = "鏈堝彴鑳屾櫙澶у浘", example = "1")
+ @ExcelColumn(name="鏈堝彴鑳屾櫙澶у浘")
+ private String backgroundImageContent;
+
+ @ApiModelProperty(value = "杞︾墝鍥�", example = "1")
+ @ExcelColumn(name="杞︾墝鍥�")
+ private String platePictureContent;
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformWmsDetail.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformWmsDetail.java
index ba79ab3..f4d58da 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformWmsDetail.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformWmsDetail.java
@@ -50,14 +50,20 @@
@ApiModelProperty(value = "0鏈畬鎴� 1宸插畬鎴� 2宸插彇娑�", example = "1")
@ExcelColumn(name="鐘舵�� 0鏈畬鎴� 1宸插畬鎴� 2宸插彇娑�")
private Integer status;
+ @ApiModelProperty(value = "涓婇攣鐘舵�� 0鏈笂閿� 1宸蹭笂閿�", example = "1")
+ @ExcelColumn(name="涓婇攣鐘舵�� 0鏈笂閿� 1宸蹭笂閿�")
+ private Integer lockStatus;
@ApiModelProperty(value = "澶囨敞")
@ExcelColumn(name="澶囨敞")
private String remark;
- @ApiModelProperty(value = "琛屾暟鎹紪鐮侊紙鍏宠仈platform_wms_job)", example = "1")
+ @ApiModelProperty(value = "琛屾暟鎹紪鐮侊紙鍏宠仈platform_job)", example = "1")
@ExcelColumn(name="琛屾暟鎹紪鐮侊紙鍏宠仈platform_wms_job)")
private Integer jobId;
+ @ApiModelProperty(value = "琛屾暟鎹紪鐮侊紙鍏宠仈platform_wms_job)", example = "1")
+ @ExcelColumn(name="琛屾暟鎹紪鐮侊紙鍏宠仈platform_wms_job)")
+ private Integer wmsJobId;
@ApiModelProperty(value = "閫氱煡鍗曞彿")
@ExcelColumn(name="閫氱煡鍗曞彿")
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/PlatformEventService.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/PlatformEventService.java
new file mode 100644
index 0000000..21e4231
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/PlatformEventService.java
@@ -0,0 +1,97 @@
+package com.doumee.service.business;
+
+import com.doumee.core.model.PageData;
+import com.doumee.core.model.PageWrap;
+import com.doumee.dao.business.model.PlatformEvent;
+import java.util.List;
+
+/**
+ * 鏈堝彴杞﹁締杩涘嚭浜嬩欢鎺ㄩ�佽褰曡〃Service瀹氫箟
+ * @author 姹熻箘韫�
+ * @date 2024/08/28 17:24
+ */
+public interface PlatformEventService {
+
+ /**
+ * 鍒涘缓
+ *
+ * @param platformEvent 瀹炰綋瀵硅薄
+ * @return Integer
+ */
+ Integer create(PlatformEvent platformEvent);
+
+ /**
+ * 涓婚敭鍒犻櫎
+ *
+ * @param id 涓婚敭
+ */
+ void deleteById(Integer id);
+
+ /**
+ * 鍒犻櫎
+ *
+ * @param platformEvent 瀹炰綋瀵硅薄
+ */
+ void delete(PlatformEvent platformEvent);
+
+ /**
+ * 鎵归噺涓婚敭鍒犻櫎
+ *
+ * @param ids 涓婚敭闆�
+ */
+ void deleteByIdInBatch(List<Integer> ids);
+
+ /**
+ * 涓婚敭鏇存柊
+ *
+ * @param platformEvent 瀹炰綋瀵硅薄
+ */
+ void updateById(PlatformEvent platformEvent);
+
+ /**
+ * 鎵归噺涓婚敭鏇存柊
+ *
+ * @param platformEvents 瀹炰綋闆�
+ */
+ void updateByIdInBatch(List<PlatformEvent> platformEvents);
+
+ /**
+ * 涓婚敭鏌ヨ
+ *
+ * @param id 涓婚敭
+ * @return PlatformEvent
+ */
+ PlatformEvent findById(Integer id);
+
+ /**
+ * 鏉′欢鏌ヨ鍗曟潯璁板綍
+ *
+ * @param platformEvent 瀹炰綋瀵硅薄
+ * @return PlatformEvent
+ */
+ PlatformEvent findOne(PlatformEvent platformEvent);
+
+ /**
+ * 鏉′欢鏌ヨ
+ *
+ * @param platformEvent 瀹炰綋瀵硅薄
+ * @return List<PlatformEvent>
+ */
+ List<PlatformEvent> findList(PlatformEvent platformEvent);
+
+ /**
+ * 鍒嗛〉鏌ヨ
+ *
+ * @param pageWrap 鍒嗛〉瀵硅薄
+ * @return PageData<PlatformEvent>
+ */
+ PageData<PlatformEvent> findPage(PageWrap<PlatformEvent> pageWrap);
+
+ /**
+ * 鏉′欢缁熻
+ *
+ * @param platformEvent 瀹炰綋瀵硅薄
+ * @return long
+ */
+ long count(PlatformEvent platformEvent);
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformEventServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformEventServiceImpl.java
new file mode 100644
index 0000000..cddc0f2
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformEventServiceImpl.java
@@ -0,0 +1,220 @@
+package com.doumee.service.business.impl;
+
+import com.doumee.core.model.PageData;
+import com.doumee.core.model.PageWrap;
+import com.doumee.core.utils.Utils;
+import com.doumee.dao.business.PlatformEventMapper;
+import com.doumee.dao.business.model.PlatformEvent;
+import com.doumee.service.business.PlatformEventService;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.List;
+
+/**
+ * 鏈堝彴杞﹁締杩涘嚭浜嬩欢鎺ㄩ�佽褰曡〃Service瀹炵幇
+ * @author 姹熻箘韫�
+ * @date 2024/08/28 17:24
+ */
+@Service
+public class PlatformEventServiceImpl implements PlatformEventService {
+
+ @Autowired
+ private PlatformEventMapper platformEventMapper;
+
+ @Override
+ public Integer create(PlatformEvent platformEvent) {
+ platformEventMapper.insert(platformEvent);
+ return platformEvent.getId();
+ }
+
+ @Override
+ public void deleteById(Integer id) {
+ platformEventMapper.deleteById(id);
+ }
+
+ @Override
+ public void delete(PlatformEvent platformEvent) {
+ UpdateWrapper<PlatformEvent> deleteWrapper = new UpdateWrapper<>(platformEvent);
+ platformEventMapper.delete(deleteWrapper);
+ }
+
+ @Override
+ public void deleteByIdInBatch(List<Integer> ids) {
+ if (CollectionUtils.isEmpty(ids)) {
+ return;
+ }
+ platformEventMapper.deleteBatchIds(ids);
+ }
+
+ @Override
+ public void updateById(PlatformEvent platformEvent) {
+ platformEventMapper.updateById(platformEvent);
+ }
+
+ @Override
+ public void updateByIdInBatch(List<PlatformEvent> platformEvents) {
+ if (CollectionUtils.isEmpty(platformEvents)) {
+ return;
+ }
+ for (PlatformEvent platformEvent: platformEvents) {
+ this.updateById(platformEvent);
+ }
+ }
+
+ @Override
+ public PlatformEvent findById(Integer id) {
+ return platformEventMapper.selectById(id);
+ }
+
+ @Override
+ public PlatformEvent findOne(PlatformEvent platformEvent) {
+ QueryWrapper<PlatformEvent> wrapper = new QueryWrapper<>(platformEvent);
+ return platformEventMapper.selectOne(wrapper);
+ }
+
+ @Override
+ public List<PlatformEvent> findList(PlatformEvent platformEvent) {
+ QueryWrapper<PlatformEvent> wrapper = new QueryWrapper<>(platformEvent);
+ return platformEventMapper.selectList(wrapper);
+ }
+
+ @Override
+ public PageData<PlatformEvent> findPage(PageWrap<PlatformEvent> pageWrap) {
+ IPage<PlatformEvent> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
+ QueryWrapper<PlatformEvent> queryWrapper = new QueryWrapper<>();
+ Utils.MP.blankToNull(pageWrap.getModel());
+ if (pageWrap.getModel().getId() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getId, pageWrap.getModel().getId());
+ }
+ if (pageWrap.getModel().getCreator() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getCreator, pageWrap.getModel().getCreator());
+ }
+ if (pageWrap.getModel().getCreateDate() != null) {
+ queryWrapper.lambda().ge(PlatformEvent::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate()));
+ queryWrapper.lambda().le(PlatformEvent::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate()));
+ }
+ if (pageWrap.getModel().getEditor() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getEditor, pageWrap.getModel().getEditor());
+ }
+ if (pageWrap.getModel().getEditDate() != null) {
+ queryWrapper.lambda().ge(PlatformEvent::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate()));
+ queryWrapper.lambda().le(PlatformEvent::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate()));
+ }
+ if (pageWrap.getModel().getIsdeleted() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getIsdeleted, pageWrap.getModel().getIsdeleted());
+ }
+ if (pageWrap.getModel().getRemark() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getRemark, pageWrap.getModel().getRemark());
+ }
+ if (pageWrap.getModel().getEventId() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getEventId, pageWrap.getModel().getEventId());
+ }
+ if (pageWrap.getModel().getEventType() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getEventType, pageWrap.getModel().getEventType());
+ }
+ if (pageWrap.getModel().getSrcType() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getSrcType, pageWrap.getModel().getSrcType());
+ }
+ if (pageWrap.getModel().getHappenTime() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getHappenTime, pageWrap.getModel().getHappenTime());
+ }
+ if (pageWrap.getModel().getSrcIndex() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getSrcIndex, pageWrap.getModel().getSrcIndex());
+ }
+ if (pageWrap.getModel().getSrcName() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getSrcName, pageWrap.getModel().getSrcName());
+ }
+ if (pageWrap.getModel().getStatus() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getStatus, pageWrap.getModel().getStatus());
+ }
+ if (pageWrap.getModel().getTimeout() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getTimeout, pageWrap.getModel().getTimeout());
+ }
+ if (pageWrap.getModel().getDataType() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getDataType, pageWrap.getModel().getDataType());
+ }
+ if (pageWrap.getModel().getSendTime() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getSendTime, pageWrap.getModel().getSendTime());
+ }
+ if (pageWrap.getModel().getDateTime() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getDateTime, pageWrap.getModel().getDateTime());
+ }
+ if (pageWrap.getModel().getIpAddress() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getIpAddress, pageWrap.getModel().getIpAddress());
+ }
+ if (pageWrap.getModel().getIpv6Address() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getIpv6Address, pageWrap.getModel().getIpv6Address());
+ }
+ if (pageWrap.getModel().getPortNo() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getPortNo, pageWrap.getModel().getPortNo());
+ }
+ if (pageWrap.getModel().getProtocol() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getProtocol, pageWrap.getModel().getProtocol());
+ }
+ if (pageWrap.getModel().getMacAddress() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getMacAddress, pageWrap.getModel().getMacAddress());
+ }
+ if (pageWrap.getModel().getChannelId() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getChannelId, pageWrap.getModel().getChannelId());
+ }
+ if (pageWrap.getModel().getActivePostCount() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getActivePostCount, pageWrap.getModel().getActivePostCount());
+ }
+ if (pageWrap.getModel().getEventState() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getEventState, pageWrap.getModel().getEventState());
+ }
+ if (pageWrap.getModel().getEventDescription() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getEventDescription, pageWrap.getModel().getEventDescription());
+ }
+ if (pageWrap.getModel().getChannelName() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getChannelName, pageWrap.getModel().getChannelName());
+ }
+ if (pageWrap.getModel().getDeviceId() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getDeviceId, pageWrap.getModel().getDeviceId());
+ }
+ if (pageWrap.getModel().getHpno() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getHpno, pageWrap.getModel().getHpno());
+ }
+ if (pageWrap.getModel().getMotionStatus() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getMotionStatus, pageWrap.getModel().getMotionStatus());
+ }
+ if (pageWrap.getModel().getPlateNo() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getPlateNo, pageWrap.getModel().getPlateNo());
+ }
+ if (pageWrap.getModel().getVehicleDoorStatus() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getVehicleDoorStatus, pageWrap.getModel().getVehicleDoorStatus());
+ }
+ if (pageWrap.getModel().getStockStatus() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getStockStatus, pageWrap.getModel().getStockStatus());
+ }
+ if (pageWrap.getModel().getPlateScore() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getPlateScore, pageWrap.getModel().getPlateScore());
+ }
+ if (pageWrap.getModel().getBackgroundImageContent() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getBackgroundImageContent, pageWrap.getModel().getBackgroundImageContent());
+ }
+ if (pageWrap.getModel().getPlatePictureContent() != null) {
+ queryWrapper.lambda().eq(PlatformEvent::getPlatePictureContent, pageWrap.getModel().getPlatePictureContent());
+ }
+ for(PageWrap.SortData sortData: pageWrap.getSorts()) {
+ if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) {
+ queryWrapper.orderByDesc(sortData.getProperty());
+ } else {
+ queryWrapper.orderByAsc(sortData.getProperty());
+ }
+ }
+ return PageData.from(platformEventMapper.selectPage(page, queryWrapper));
+ }
+
+ @Override
+ public long count(PlatformEvent platformEvent) {
+ QueryWrapper<PlatformEvent> wrapper = new QueryWrapper<>(platformEvent);
+ return platformEventMapper.selectCount(wrapper);
+ }
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformWmsDetailServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformWmsDetailServiceImpl.java
index fec4a0a..8119eeb 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformWmsDetailServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformWmsDetailServiceImpl.java
@@ -99,6 +99,7 @@
.le(pageWrap.getModel().getEditDate() != null, PlatformWmsDetail::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate()))
.eq(pageWrap.getModel().getIsdeleted() != null, PlatformWmsDetail::getIsdeleted, pageWrap.getModel().getIsdeleted())
.eq(pageWrap.getModel().getRemark() != null, PlatformWmsDetail::getRemark, pageWrap.getModel().getRemark())
+ .eq(pageWrap.getModel().getWmsJobId() != null, PlatformWmsDetail::getWmsJobId, pageWrap.getModel().getWmsJobId())
.eq(pageWrap.getModel().getJobId() != null, PlatformWmsDetail::getJobId, pageWrap.getModel().getJobId())
.eq(pageWrap.getModel().getIocode() != null, PlatformWmsDetail::getIocode, pageWrap.getModel().getIocode())
.eq(pageWrap.getModel().getMaterialName() != null, PlatformWmsDetail::getMaterialName, pageWrap.getModel().getMaterialName())
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 09d273b..9cbfcec 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
@@ -5,12 +5,17 @@
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.doumee.config.DataSyncConfig;
import com.doumee.config.SpringContextUtil;
+import com.doumee.core.exception.BusinessException;
import com.doumee.core.haikang.model.HKConstants;
+import com.doumee.core.haikang.model.param.request.CustomBroadcastRequest;
+import com.doumee.core.haikang.model.param.request.TransparentChannelBodyRequest;
+import com.doumee.core.haikang.model.param.request.TransparentChannelHeadRequest;
import com.doumee.core.haikang.model.param.request.event.acs.EventAcsInfoRequest;
import com.doumee.core.haikang.model.param.request.event.acs.EventAcsRequest;
import com.doumee.core.haikang.model.param.request.event.acs.EventDeviceDataRequest;
import com.doumee.core.haikang.model.param.request.event.parks.*;
import com.doumee.core.haikang.model.param.request.event.visit.*;
+import com.doumee.core.haikang.service.HKService;
import com.doumee.core.utils.Constants;
import com.doumee.core.utils.DESUtil;
import com.doumee.core.utils.DateUtil;
@@ -28,6 +33,8 @@
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.yaml.snakeyaml.scanner.Constant;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
@@ -69,7 +76,13 @@
private PlatformMapper platformMapper;
@Autowired
private PlatformDeviceMapper platformDeviceMapper;
+ @Autowired
private PlatformJobMapper platformJobMapper;
+ @Autowired
+ private PlatformWmsDetailMapper platformWmsDetailMapper;
+ @Autowired
+ private PlatformEventMapper platformEventMapper;
+ @Autowired
private PlatformLogMapper platformLogMapper;
/**
* 娴峰悍闂ㄧ浜嬩欢鎺ㄩ��
@@ -844,6 +857,7 @@
}
//闂ㄧ浜嬩欢闆嗗悎
List<EventPlatformCarsInfoRequest> events = param.getParams().getEvents();
+ List<PlatformEvent> eventList = new ArrayList<>();
for(EventPlatformCarsInfoRequest request : events){
if( request.getData() ==null || request.getData().size()==0){
continue;
@@ -863,6 +877,7 @@
}
//鍚勮溅閬撹溅杈嗙姸鎬�
for(EventPlatformCarsStatusInfoRequest status : data.getHPVehicleStatus()){
+ eventList.add(initPlatformEventModel(request,data,status));//灏佽浜嬩欢锛堝凡鏈堝彴閫氶亾涓虹淮搴︼級
if(StringUtils.isBlank(status.getPlateNo())){
continue;//濡傛灉杞﹁締淇℃伅涓虹┖锛屼笉澶勭悊鐩存帴璺宠繃
}
@@ -879,25 +894,39 @@
if(job ==null && !Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.WORKING.getKey())){
continue;//濡傛灉娌℃煡鍒板搴旂殑浣滀笟鎴栬�呬綔涓氬苟闈炰綔涓氫腑锛屼笉鍋氫笟鍔″鐞�
}
+ if(Constants.equalsInteger(job.getType(), Constants.THREE) || Constants.equalsInteger(job.getType(), Constants.TWO)){
+ //濡傛灉鏄痺ms鎺ㄩ�佺殑澶栧崗杞﹁締澶栧崗杞﹁締
+ if(platformWmsDetailMapper.selectCount(new QueryWrapper<PlatformWmsDetail>().lambda()
+ .eq(PlatformWmsDetail::getIsdeleted,Constants.ZERO)
+ .eq(PlatformWmsDetail::getJobId,job.getId())
+ .ne(PlatformWmsDetail::getLockStatus,Constants.ONE)) >0){
+ continue;//濡傛灉澶栧崗浠诲姟浣滀笟锛屽悎鍚屽彿鏈夋湭涓婇攣鐨勬儏鍐碉紝涓嶅仛鑷姩瀹屾垚浣滀笟閫昏緫澶勭悊锛岃烦杩囦笉澶勭悊
+ }
+ }
//濡傛灉鏄鍦ㄤ綔涓氱殑鐘舵�侊紝鏍囪浣滀笟宸插畬鎴�
update.setStatus(Constants.PlatformJobStatus.DONE.getKey());//浣滀笟宸插畬鎴�
update.setDoneDate(update.getEditDate());
-
}else if(StringUtils.equals(status.getMotionStatus(),"enter")){
//濡傛灉鏄溅杈嗚繘鍏�
if(job ==null || !Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.CALLED.getKey())){
//璇存槑杞﹁締杩涢敊鏈堝彴 鎴栬�呰繕鏈彨鍙风姸鎬侊紝鍙戣捣璀﹀憡
dealCarsInErrorPlatformBiz(job,status);
}
+ if(job.getStartDate() == null){
+ update.setStartDate(update.getEditDate());
+ }
update.setStatus(Constants.PlatformJobStatus.WORKING.getKey());//寮�濮嬩綔涓�
}else{
continue;//鍏朵粬鐘舵�佷笉澶勭悊锛岃烦杩�
}
- platformJobMapper.updateById(update);//鏇存柊浣滀笟鐘舵��
dealPlatformJobLogBiz(update,status);//璁板綍浣滀笟鏃ュ織
}
break;//鍙鐞嗙涓�涓暟鎹姸鎬�
}
+ }
+ if(eventList.size()>0){
+ //鐢熸垚浜嬩欢
+ platformEventMapper.insert(eventList);
}
result = "鎴愬姛";
log.error("銆愭捣搴锋湀鍙拌溅杈嗙姸鎬佷簨浠舵帹閫併��========鎴愬姛=======");
@@ -910,12 +939,53 @@
return null;
}
+ private PlatformEvent initPlatformEventModel(EventPlatformCarsInfoRequest request, EventPlatformCarsDataRequest data, EventPlatformCarsStatusInfoRequest status) {
+ PlatformEvent model = new PlatformEvent();
+ model.setCreateDate(new Date());
+ model.setIsdeleted(Constants.ZERO);
+ model.setEditDate(model.getCreateDate());
+ model.setEventId(request.getEventId());
+// model.setRemark(JSONObject.toJSONString(request));
+ model.setEventType(request.getEventType());
+ model.setDataEventType(data.getEventType());
+ model.setHappenTime(request.getHappenTime());
+ model.setSrcIndex(request.getSrcIndex());
+ model.setSrcType(request.getSrcType());
+ model.setStatus(request.getStatus());
+ model.setTimeout(request.getTimeout());
+ model.setDateTime(data.getDateTime());
+ model.setDataType(data.getDataType());
+ model.setSendTime(data.getSendTime());
+ model.setIpAddress(data.getIpAddress());
+ model.setIpv6Address(data.getIpv6Address());
+ model.setPortNo(data.getPortNo());
+ model.setMacAddress(data.getMacAddress());
+ model.setProtocol(data.getProtocol());
+ model.setChannelId(data.getChannelID());
+ model.setChannelName(data.getChannelName());
+ model.setEventState(data.getEventState());
+ model.setActivePostCount(data.getActivePostCount());
+ model.setEventDescription(data.getEventDescription());
+ model.setDeviceId(data.getDeviceID());
+ model.setHpno(status.getHPNo());
+ model.setMotionStatus(status.getMotionStatus());
+ model.setPlateNo(status.getPlateNo());
+ model.setVehicleDoorStatus(status.getVehicleDoorStatus());
+ model.setStockStatus(status.getStockStatus());
+ model.setBackgroundImageContent(status.getBackgroundImage()!=null?status.getBackgroundImage().getResourcesContent():null);
+ model.setPlateScore(status.getPlateScore());
+ model.setPlatePictureContent(status.getPlatePicture()!=null?status.getPlatePicture().getResourcesContent():null);
+ return model;
+ }
+
/**
* 璁板綍鏈堝彴浣滀笟鏃ュ織
* @param job
* @param status
*/
+ @Transactional
private void dealPlatformJobLogBiz(PlatformJob job,EventPlatformCarsStatusInfoRequest status) {
+ platformJobMapper.updateById(job);//鏇存柊浣滀笟鐘舵��
PlatformLog log = new PlatformLog();
log.setIsdeleted(Constants.ZERO);
log.setCreateDate(new Date());
@@ -924,21 +994,27 @@
log.setObjId(job.getId()+"");
if(Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.DONE.getKey())){
//濡傛灉鏄綔涓氬畬鎴�
-// log.setObjType(Constants.LOg);
+ log.setObjType(Constants.PlatformJobLogType.DONE.getKey());
+ log.setTitle(Constants.PlatformJobLogType.DONE.getName());
+ log.setContent(Constants.PlatformJobLogType.DONE.getInfo());
//鏌ヨ鏈�鍚庝竴娆″紑濮嬩綔涓氱殑鏃ュ織
PlatformLog lastBeginPlatform = platformLogMapper.selectOne(new QueryWrapper<PlatformLog>().lambda()
.eq(PlatformLog::getIsdeleted,Constants.ZERO)
- .eq(PlatformLog::getObjType,Constants.PlatformJobStatus.WORKING.getKey())
- .eq(PlatformLog::getJobId,job.getJobId())
+ .eq(PlatformLog::getObjType,Constants.PlatformJobLogType.WORKING.getKey())
+ .eq(PlatformLog::getJobId,job.getId())
.orderByDesc(PlatformLog::getCreateDate)
- .last(" limit 1");
-
+ .last(" limit 1"));
+ String v = Long.toString(job.getDoneDate().getTime() - lastBeginPlatform.getCreateDate().getTime() / 1000) ;
+ lastBeginPlatform.setParam3(v);
+ lastBeginPlatform.setParam2(DateUtil.getDate(lastBeginPlatform.getCreateDate(),"yyyy-MM-dd HH:mm:ss"));
+ platformLogMapper.updateById(lastBeginPlatform);//鏇存柊涓婁竴娆′綔涓氱殑瀹屾垚鏃堕棿鍜屼綔涓氭椂闀�
}else{
//濡傛灉鏄綔涓氫腑
- log.setParam1(DateUtil.getDate(lastBeginPlatform.getCreateDate(),"yyyy-MM-dd HH:mm:ss"));
-// log.setObjType(Constants.Jobl);
+ log.setObjType(Constants.PlatformJobLogType.WORKING.getKey());
+ log.setTitle(Constants.PlatformJobLogType.WORKING.getName());
+ log.setContent(Constants.PlatformJobLogType.WORKING.getInfo());
+ log.setParam1(DateUtil.getDate(log.getCreateDate(),"yyyy-MM-dd HH:mm:ss"));
}
-
platformLogMapper.insert(log);
}
@@ -949,5 +1025,53 @@
*/
private void dealCarsInErrorPlatformBiz( PlatformJob model,EventPlatformCarsStatusInfoRequest status) {
//TODO-----------------澶勭悊杞﹁締杩涘叆閿欒鏈堝彴涓氬姟閫昏緫
+
+ List<PlatformDevice> deviceList = platformDeviceMapper.selectList(new QueryWrapper<PlatformDevice>().lambda()
+ .eq(PlatformDevice::getPlatformId,model.getPlatformId())
+ .eq(PlatformDevice::getIsdeleted,Constants.ZERO));
+ if(deviceList ==null || deviceList.size() == 0){
+ return;
+ }
+ String content ="杞﹁締"+model.getCarCodeFront()+"鍋滈敊鏈堝彴浜�";
+ List<String> broadcastList = new ArrayList<>();
+ for(PlatformDevice device : deviceList){
+ if(StringUtils.isNotBlank(device.getHkId())){
+ continue;
+ }
+ if(Constants.equalsInteger(device.getType(),Constants.ZERO)){
+ //濡傛灉鏄疞ED
+ TransparentChannelBodyRequest request = new TransparentChannelBodyRequest();
+ TransparentChannelHeadRequest head = new TransparentChannelHeadRequest();
+ head.setAbility("cld");//鍥哄畾鍊�
+ head.setTreatyType("haixuan_led_net");//鍥哄畾鍊�
+ head.setDeviceIndexCode(device.getHkId());
+ request.setMethod("ControlLedGereral");//鍥哄畾鍊�
+ request.setIndexCode(device.getHkId());
+ request.setActionType(0);
+ request.setContent(content);
+ request.setOperationType(219);//鍥哄畾鍊�
+ request.setRegionNo(1);
+ request.setRegionType(14);
+ request.setFontColor(1);
+ request.setCircleTimes(1);//寰幆娆℃暟
+ request.setFontSize(16);//
+ request.setStayTime(1);//鍗曚綅锛燂紵
+ HKService.transparentchannel(head,request);
+ }else if(Constants.equalsInteger(device.getType(),Constants.ZERO)){
+ //濡傛灉鏄箍鎾偣
+ broadcastList.add(device.getHkId());
+ }
+ }
+ if(broadcastList.size()>0){
+ CustomBroadcastRequest request = new CustomBroadcastRequest();
+ request.setAudioPointIndexCode(broadcastList);
+ request.setPlayDuration(60);//鍗曚綅绉�
+ request.setBroadCastMode("tts");
+ request.setPriority(15);
+ request.setState(1);//鎾斁/鍋滄鏍囪瘑 1-鎾斁锛�0-鍋滄
+ request.setPlayTtsContent(content);
+ HKService.customBroadcast(request);
+ }
+
}
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/fhk/HkSyncOrgUserFromSelfServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/fhk/HkSyncOrgUserFromSelfServiceImpl.java
index d310af4..db07126 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/fhk/HkSyncOrgUserFromSelfServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/fhk/HkSyncOrgUserFromSelfServiceImpl.java
@@ -289,6 +289,7 @@
c.setFaceId(model.getPersonPhoto().get(0).getPersonPhotoIndexCode());
c.setFaceImg(HKConstants.IMG_INDEX+model.getPersonPhoto().get(0).getPicUri());
c.setFaceServerIndexCode(model.getPersonPhoto().get(0).getServerIndexCode());
+ c.setFaceStatus(Constants.ONE);
}
newList.add(c);
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/wms/WmsServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/wms/WmsServiceImpl.java
index 54652e2..d7064fe 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/wms/WmsServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/wms/WmsServiceImpl.java
@@ -87,7 +87,8 @@
entity.setCreateDate(new Date());
entity.setIsdeleted(Constants.ZERO);
entity.setIocode(d.getIoCode());
- entity.setJobId(job.getId());
+ entity.setJobId(job.getJobId());
+ entity.setWmsJobId(job.getId());
entity.setIoQty(d.getIoQty());
entity.setStatus(Constants.ZERO);
entity.setRate(d.getRate());
@@ -222,7 +223,7 @@
job.setPlateNumber(param.getPlateNumber());
job.setType(Constants.ONE);
job.setIoCreatedate(param.getCreateDate());
- job.setJobId(model.getId());
+ job.setJobId(job.getId());
job.setDriverPhone(param.getDriverPhone());
platformWmsJobMapper.insert(job);
jobList.add(model);
@@ -233,7 +234,8 @@
entity.setCreateDate(new Date());
entity.setIsdeleted(Constants.ZERO);
entity.setIocode(d.getIoCode());
- entity.setJobId(job.getId());
+ entity.setJobId(job.getJobId());
+ entity.setWmsJobId(job.getId());
entity.setIoQty(d.getIoQty());
entity.setStatus(Constants.ZERO);
entity.setRate(d.getRate());
--
Gitblit v1.9.3