From 34abe3473f7e4deaac31a0ad38f855eeafbf9266 Mon Sep 17 00:00:00 2001
From: jiazx0107@163.com <jiazx0107@163.com>
Date: 星期一, 29 五月 2023 20:59:46 +0800
Subject: [PATCH] 出入库优化-登记1
---
/dev/null | 368 ------------------------------
igds-core/src/main/java/com/ld/igds/data/SnapImgDto.java | 12
igds-inout/src/main/java/com/ld/igds/inout/controller/InoutApiController.java | 12
igds-inout/src/main/java/com/ld/igds/inout/manager/InoutCommonManager.java | 4
igds-web/src/main/resources/templates/admin/inout/in-register.html | 3
igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java | 1
igds-core/src/main/java/com/ld/igds/models/InoutConf.java | 200 ++++++++--------
igds-web/src/main/resources/static/admin/inout/video-play.js | 2
igds-inout/src/main/java/com/ld/igds/inout/manager/InoutDeviceManager.java | 10
igds-web/src/main/resources/static/admin/inout/inout-common.js | 24 ++
igds-web/src/main/resources/static/admin/inout/in-register.js | 73 -----
11 files changed, 157 insertions(+), 552 deletions(-)
diff --git a/igds-core/src/main/java/com/ld/igds/inout/dto/InoutSnapImgDto.java b/igds-core/src/main/java/com/ld/igds/data/SnapImgDto.java
similarity index 80%
rename from igds-core/src/main/java/com/ld/igds/inout/dto/InoutSnapImgDto.java
rename to igds-core/src/main/java/com/ld/igds/data/SnapImgDto.java
index 3dbcb54..ece5e1c 100644
--- a/igds-core/src/main/java/com/ld/igds/inout/dto/InoutSnapImgDto.java
+++ b/igds-core/src/main/java/com/ld/igds/data/SnapImgDto.java
@@ -1,15 +1,21 @@
-package com.ld.igds.inout.dto;
+package com.ld.igds.data;
import com.ld.igds.constant.BizType;
import lombok.Data;
+
/**
- * 鍑哄叆搴撴姄鎷嶅璞★紝椤甸潰浼犻��
+ * @Desc: 鎶撴媿瀵硅薄灏佽锛屾敮鎸佸嚭鍏ュ簱鍜岀郴缁熼厤缃�
+ *
+ * @author: Andy
+ * @update-time: 2023/5/29
+ *
*/
@Data
-public class InoutSnapImgDto {
+public class SnapImgDto {
private String companyId;
+
private String deptId;
//澶栭敭ID--鐢ㄤ簬淇濆瓨鏂囦欢鏁版嵁搴撲娇鐢�
diff --git a/igds-core/src/main/java/com/ld/igds/models/InoutConf.java b/igds-core/src/main/java/com/ld/igds/models/InoutConf.java
index 4b802c3..c74a4d4 100644
--- a/igds-core/src/main/java/com/ld/igds/models/InoutConf.java
+++ b/igds-core/src/main/java/com/ld/igds/models/InoutConf.java
@@ -16,130 +16,134 @@
@Table(name = "D_INOUT_CONF")
public class InoutConf implements Serializable {
- /**
- *
- */
- private static final long serialVersionUID = 1L;
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
- @Id
- @Column(name = "ID_", length = 40)
- @PropertyDef(label = "涓婚敭")
- private String id;
+ @Id
+ @Column(name = "ID_", length = 40)
+ @PropertyDef(label = "涓婚敭")
+ private String id;
- @Column(name = "COMPANY_ID_", length = 10)
- @PropertyDef(label = "缁勭粐缂栫爜")
- private String companyId;
+ @Column(name = "COMPANY_ID_", length = 10)
+ @PropertyDef(label = "缁勭粐缂栫爜")
+ private String companyId;
- @Column(name = "DEPT_ID_", length = 40)
- @PropertyDef(label = "鎵�灞炲簱鍖�")
- private String deptId;
+ @Column(name = "DEPT_ID_", length = 40)
+ @PropertyDef(label = "鎵�灞炲簱鍖�")
+ private String deptId;
- @Column(name = "SORT_", length = 2)
- @PropertyDef(label = "鍑哄叆搴撻厤濂楀簭鍙�")
- private String sort = "1";
+ @Column(name = "SORT_", length = 2)
+ @PropertyDef(label = "鍑哄叆搴撻厤濂楀簭鍙�")
+ private String sort = "1";
- @Column(name = "IN_ORDER_")
- @PropertyDef(label = "璁惧椤哄簭")
- private int inOrder = 1;
+ @Column(name = "IN_ORDER_")
+ @PropertyDef(label = "璁惧椤哄簭")
+ private int inOrder = 1;
- @Column(name = "INTOU_PROGRESS_", length = 20)
- @PropertyDef(label = "鎵�灞炴祦绋�")
- private String inoutProgress;
+ @Column(name = "INTOU_PROGRESS_", length = 20)
+ @PropertyDef(label = "鎵�灞炴祦绋�")
+ private String inoutProgress;
- @Column(name = "NAME_", length = 30)
- @PropertyDef(label = "璁惧鍚嶇О")
- private String name;
+ @Column(name = "NAME_", length = 30)
+ @PropertyDef(label = "璁惧鍚嶇О")
+ private String name;
- @Column(name = "SN_", length = 46)
- @PropertyDef(label = "璁惧搴忓垪鍙�")
- private String sn;
+ @Column(name = "SN_", length = 46)
+ @PropertyDef(label = "璁惧搴忓垪鍙�")
+ private String sn;
- @Column(name = "IP_", length = 20)
- @PropertyDef(label = "鍒嗘満IP")
- private String ip;
+ @Column(name = "IP_", length = 20)
+ @PropertyDef(label = "鍒嗘満IP")
+ private String ip;
- @Column(name = "PORT_")
- @PropertyDef(label = "鍒嗘満绔彛")
- private Integer port;
+ @Column(name = "PORT_")
+ @PropertyDef(label = "鍒嗘満绔彛")
+ private Integer port;
- @Column(name = "LOGIN_ID_", length = 20)
- @PropertyDef(label = "甯愬彿")
- private String loginId;
+ @Column(name = "LOGIN_ID_", length = 20)
+ @PropertyDef(label = "甯愬彿")
+ private String loginId;
- @Column(name = "PWD_", length = 20)
- @PropertyDef(label = "瀵嗙爜")
- private String pwd;
+ @Column(name = "PWD_", length = 20)
+ @PropertyDef(label = "瀵嗙爜")
+ private String pwd;
- @Column(name = "CHAN_NUM_")
- @PropertyDef(label = "閫氶亾鍙�")
- private int chanNum = 1;
+ @Column(name = "CHAN_NUM_")
+ @PropertyDef(label = "閫氶亾鍙�")
+ private int chanNum = 1;
- @Column(name = "PORT_CTRL_")
- @PropertyDef(label = "鎺у埗绔彛")
- private Integer portCtrl;
+ @Column(name = "PORT_CTRL_")
+ @PropertyDef(label = "鎺у埗绔彛")
+ private Integer portCtrl;
// @Column(name = "PORT_WEB_")
// @PropertyDef(label = "WEB绔彛")
// private Integer portWeb;
- @Column(name = "TYPE_", length = 10)
- @PropertyDef(label = "璁惧绫诲瀷")
- private String type;
+ @Column(name = "TYPE_", length = 10)
+ @PropertyDef(label = "璁惧绫诲瀷")
+ private String type;
- @Column(name = "STATUS_", length = 10)
- @PropertyDef(label = "鏄惁鍦ㄧ嚎")
- private String status;
+ @Column(name = "STATUS_", length = 10)
+ @PropertyDef(label = "鏄惁鍦ㄧ嚎")
+ private String status;
- @Column(name = "PROTOCOL_", length = 40)
- @PropertyDef(label = "鍗忚", description = "涓嶅悓鍘傚晢鏈変笉鍚岀殑鍗忚")
- private String protocol;
+ @Column(name = "PROTOCOL_", length = 40)
+ @PropertyDef(label = "鍗忚", description = "涓嶅悓鍘傚晢鏈変笉鍚岀殑鍗忚")
+ private String protocol;
- @Column(name = "PLAY_TYPE_", length = 25)
- @PropertyDef(label = "鎾斁鏂瑰紡")
- private String playType;
+ @Column(name = "PLAY_TYPE_", length = 25)
+ @PropertyDef(label = "鎾斁鏂瑰紡")
+ private String playType;
- @Column(name = "SNAP_TYPE_", length = 25)
- @PropertyDef(label = "鎶撴媿鏂瑰紡")
- private String snapType;
+ @Column(name = "SNAP_TYPE_", length = 25)
+ @PropertyDef(label = "鎶撴媿鏂瑰紡")
+ private String snapType;
- @Column(name = "MEDIA_ADDR_", length = 100)
- @PropertyDef(label = "鏈湴鎾斁鍦板潃")
- private String mediaAddr;
+ @Column(name = "MEDIA_ADDR_", length = 100)
+ @PropertyDef(label = "鏈湴鎾斁鍦板潃")
+ private String mediaAddr;
- @Column(name = "REMARK_", length = 100)
- @PropertyDef(label = "澶囨敞")
- private String remark;
+ @Column(name = "REMARK_", length = 100)
+ @PropertyDef(label = "澶囨敞")
+ private String remark;
- @Transient
- @PropertyDef(label = "寮傚父淇℃伅")
- private String errorMsg;
+ @Transient
+ @PropertyDef(label = "寮傚父淇℃伅")
+ private String errorMsg;
- public InoutConf() {
- super();
- }
+ public InoutConf() {
+ super();
+ }
- public InoutConf(InoutConf conf) {
- this.id = conf.getId();
- this.companyId = conf.getCompanyId();
- this.deptId = conf.getDeptId();
- this.sort = conf.getSort();
- this.inOrder = conf.getInOrder();
- this.inoutProgress = conf.getInoutProgress();
- this.name = conf.getName();
- this.sn = conf.getSn();
- this.ip = conf.getIp();
- this.port = conf.getPort();
- this.loginId = conf.getLoginId();
- this.pwd = conf.getPwd();
- this.chanNum = conf.getChanNum();
- this.portCtrl = conf.getPortCtrl();
- this.type = conf.getType();
- this.status = conf.getStatus();
- this.protocol = conf.getProtocol();
- this.playType = conf.getPlayType();
- this.snapType = conf.getSnapType();
- this.mediaAddr = conf.getMediaAddr();
- this.remark = conf.getRemark();
- this.errorMsg = conf.getErrorMsg();
- }
+ public InoutConf(InoutConf conf) {
+ this.id = conf.getId();
+ this.companyId = conf.getCompanyId();
+ this.deptId = conf.getDeptId();
+ this.sort = conf.getSort();
+ this.inOrder = conf.getInOrder();
+ this.inoutProgress = conf.getInoutProgress();
+ this.name = conf.getName();
+ this.sn = conf.getSn();
+ this.ip = conf.getIp();
+ this.port = conf.getPort();
+ this.loginId = conf.getLoginId();
+ this.pwd = conf.getPwd();
+ this.chanNum = conf.getChanNum();
+ this.portCtrl = conf.getPortCtrl();
+ this.type = conf.getType();
+ this.status = conf.getStatus();
+ this.protocol = conf.getProtocol();
+ this.playType = conf.getPlayType();
+ this.snapType = conf.getSnapType();
+ this.mediaAddr = conf.getMediaAddr();
+ this.remark = conf.getRemark();
+ this.errorMsg = conf.getErrorMsg();
+ }
+
+ public InoutConf(String sort) {
+ this.sort = sort;
+ }
}
diff --git a/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutDeviceController.java b/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutApiController.java
similarity index 94%
rename from igds-inout/src/main/java/com/ld/igds/inout/controller/InoutDeviceController.java
rename to igds-inout/src/main/java/com/ld/igds/inout/controller/InoutApiController.java
index 764ce2b..47c8dc7 100644
--- a/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutDeviceController.java
+++ b/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutApiController.java
@@ -2,9 +2,9 @@
import com.ld.igds.constant.RespCodeEnum;
import com.ld.igds.data.PageResponse;
+import com.ld.igds.data.SnapImgDto;
import com.ld.igds.inout.dto.ApiInoutData;
import com.ld.igds.inout.dto.InoutCameraDto;
-import com.ld.igds.inout.dto.InoutSnapImgDto;
import com.ld.igds.inout.manager.InoutDeviceManager;
import com.ld.igds.models.InoutConf;
import org.apache.commons.lang3.StringUtils;
@@ -22,7 +22,7 @@
*/
@RestController
@RequestMapping("inout/api")
-public class InoutDeviceController {
+public class InoutApiController {
@Resource
private InoutDeviceManager inoutDeviceManager;
@@ -34,8 +34,8 @@
* @return
*/
@ResponseBody
- @RequestMapping("/flush-lpr")
- public PageResponse<ApiInoutData> flushPlate(@RequestBody ApiInoutData param) {
+ @RequestMapping("/get-plateNum")
+ public PageResponse<ApiInoutData> getPlateNum(@RequestBody ApiInoutData param) {
if (StringUtils.isEmpty(param.getProtocol())) {
param.setErrorMsg("褰撳墠杞︾墝璇嗗埆鏈厤缃�氳鍗忚锛屾棤娉曟墽琛�");
@@ -84,7 +84,7 @@
return new PageResponse<>(RespCodeEnum.CODE_1007.getCode(), param.getErrorMsg());
}
-
+
/**
* 鍑哄叆搴撹棰�
*
@@ -126,7 +126,7 @@
*/
@RequestMapping("/snap-img")
public @ResponseBody
- PageResponse<InoutSnapImgDto> cutImg(@RequestBody InoutSnapImgDto param) {
+ PageResponse<SnapImgDto> cutImg(@RequestBody SnapImgDto param) {
param = inoutDeviceManager.snapImg(param);
diff --git a/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java b/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java
index a652f0a..8a56e13 100644
--- a/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java
+++ b/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java
@@ -92,7 +92,6 @@
// 杞︾墝璇嗗埆鍙傛暟灏佽
InoutConf conf = inoutCommonManager.getInoutConf(listInoutConf, sort, InoutConstant.CONF_TYPE_10, InoutConstant.PROGRESS_REGISTER, 1);
- if(null != conf) conf.setSort(sort);
view.addObject("lprDto", conf);
//鍒濆鍖栬溅鐗岃瘑鍒�
diff --git a/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutCommonManager.java b/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutCommonManager.java
index dc26b86..7f9ade9 100644
--- a/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutCommonManager.java
+++ b/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutCommonManager.java
@@ -76,7 +76,7 @@
* @return 杞︾墝璁惧閰嶇疆锛屾病鏈夊垯杩斿洖NULL
*/
public InoutConf getInoutConf(List<InoutConf> listInoutConf, String sort, String type, String inoutProgress, int inOrder) {
- if (null == listInoutConf) return null;
+ if (null == listInoutConf) return new InoutConf(sort);
if (StringUtils.isEmpty(sort)) sort = "1";
InoutConf result = null;
@@ -89,7 +89,7 @@
}
}
- if (null == result) return null;
+ if (null == result) return new InoutConf(sort);
return result;
}
diff --git a/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutDeviceManager.java b/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutDeviceManager.java
index 71662b3..2d36582 100644
--- a/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutDeviceManager.java
+++ b/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutDeviceManager.java
@@ -5,13 +5,13 @@
import com.ld.igds.camera.data.ApiCameraData;
import com.ld.igds.camera.data.ApiCameraResp;
import com.ld.igds.camera.data.ApiSnapReq;
+import com.ld.igds.data.SnapImgDto;
import com.ld.igds.file.CoreFileService;
import com.ld.igds.inout.ApiInoutManager;
import com.ld.igds.inout.InoutConstant;
import com.ld.igds.inout.dto.ApiInoutData;
import com.ld.igds.inout.dto.InoutCameraDto;
import com.ld.igds.inout.dto.InoutData;
-import com.ld.igds.inout.dto.InoutSnapImgDto;
import com.ld.igds.inout.ApiInoutService;
import com.ld.igds.io.constant.ProtocolEnum;
import com.ld.igds.m.service.InoutCommonService;
@@ -154,7 +154,7 @@
* @param param
* @return
*/
- public InoutSnapImgDto snapImg(InoutSnapImgDto param) {
+ public SnapImgDto snapImg(SnapImgDto param) {
try {
InoutConf conf;
@@ -201,7 +201,7 @@
*
* @param snapImgDto
*/
- private void noticeGatewayWeightInfo(InoutSnapImgDto snapImgDto) {
+ private void noticeGatewayWeightInfo(SnapImgDto snapImgDto) {
log.debug("-------------鐢ㄦ埛纭绉伴噸----閫氱煡绉伴噸缃戝叧----{}", snapImgDto.getWeight());
InoutConf conf = this.getWeightGateway(snapImgDto.getCompanyId(), snapImgDto.getDeptId(), snapImgDto.getSort());
@@ -229,7 +229,7 @@
*
* @param imgDto
*/
- private void noticeGatewayAddWhitePlate(InoutSnapImgDto imgDto) {
+ private void noticeGatewayAddWhitePlate(SnapImgDto imgDto) {
List<InoutConf> list = this.getWeightGateway(imgDto.getCompanyId(), imgDto.getDeptId());
@@ -277,7 +277,7 @@
* @param snapSer
* @return
*/
- private String snapImgByConf(InoutConf conf, InoutSnapImgDto param, SnapSer snapSer) {
+ private String snapImgByConf(InoutConf conf, SnapImgDto param, SnapSer snapSer) {
if (null == conf) return null;
if (null == conf.getSnapType()) {
diff --git a/igds-web/src/main/resources/static/admin/inout/in-register-bak20221110.js b/igds-web/src/main/resources/static/admin/inout/in-register-bak20221110.js
deleted file mode 100644
index 865ff02..0000000
--- a/igds-web/src/main/resources/static/admin/inout/in-register-bak20221110.js
+++ /dev/null
@@ -1,368 +0,0 @@
-//褰撳墠鑺傜偣 鍏ュ簱鐧昏
-var layer;
-var form;
-var snapData;//鐧昏鐓х墖
-
-$(function () {
- layui.use(['layer', 'laydate', 'form', 'util'], function () {
- var util = layui.util;
- var laydate = layui.laydate;
- layer = layui.layer;
- form = layui.form;
- laydate.render({
- elem: '#userBirthday'
- });
-
- // 鍙充笅瑙掓坊鍔犲浐瀹氫俊鎭�
- util.fixbar({
- bar1: true,
- css: {
- right: 10,
- bottom: 20
- },
- bgcolor: '#53adce',
- click: function (type) {
- if (type === 'bar1') {
- layer.closeAll();
- layer.open({
- type: 2,
- title: false,
- shadeClose: true,
- shade: 0.3,
- closeBtn: 2,
- area: ['1000px', '640px'],
- content: '../../basic/inout/inout-progress?type=' + type + "&t=" + Math.random()
- });
- }
- }
- });
-
- });
-
- //鏄剧ず鍏ュ簱娴佺▼
- showProgress();
-
- var rightH = $(".rkbk-left-wrap").height();
- $(".rkbk-right-wrap").height(rightH);
-
- $(window).resize(function () {
- var rightH = $(".rkbk-left-wrap").height();
- $(".rkbk-right-wrap").height(rightH);
- });
-
- // 鍒濆鍖朩ebSocket
- initInoutWS(deptId, bizType, progress, userId);
-});
-
-window.onload = function () {
- // 鍔犺浇瑙嗛
- initVideo(lprDto, null, null);
-};
-
-//鎺у埗娴佺▼鐜妭鏄剧ず
-function showProgress() {
- if (!inoutProgress) {
- return;
- }
- if (inoutProgress.indexOf("REGISTER") == -1) {
- $("#progress-register").css("display", "none");
- }
- if (inoutProgress.indexOf("CHECK") == -1) {
- $("#progress-check").css("display", "none");
- }
- if (inoutProgress.indexOf("WEIGHT_FULL") == -1) {
- $("#progress-fullWeight").css("display", "none");
- }
- if (inoutProgress.indexOf("HANDLE") == -1) {
- $("#progress-hand").css("display", "none");
- }
- if (inoutProgress.indexOf("WEIGHT_EMPTY") == -1) {
- $("#progress-emptyWeight").css("display", "none");
- }
- if (inoutProgress.indexOf("CARD_BACK") == -1) {
- $("#progress-cardBack").css("display", "none");
- }
-}
-
-// socket淇℃伅杩斿洖铏曠悊
-function socketOnMessage(packet) {
-
- // 琛ㄧず杞︾墝璇嗗埆
- if (packet.bizId == "PLATE_NUM") {
- if (packet.data.sn == lprDto.sn) {// 鏍规嵁SN杩涜鍖归厤
- $("#plateNum").val(packet.data.plateNum);
-
- $("#pz-img").addClass("kccz-r-img-red");
- $("#pz-text").text("宸叉媿鐓�");
- window.parent.sysNotify("杞︾墝璇嗗埆缁撴灉锛�" + packet.data.plateNum);
- }
- }
-}
-
-//浣跨敤鎻掍欢璇诲彇韬唤璇�
-function flushIdCard() {
- var index = layer.load();
- $.ajax({
- type: "GET",
- async: true,
- url: "http://127.0.0.1:9111/IDCARD",
- data: {},
- dataType: "jsonp",
- jsonp: "callback",
- jsonpCallback: "jsonpCallback",
- success: function (json) {
- layer.close(index);
- var data = json.content;
- if (data === "not found") {
- layer.alert("娌℃湁鑾峰彇鍒拌韩浠借瘉淇℃伅锛�", {
- offset: ['300px', '300px']
- });
- return;
- }
- // 涓存椂璧嬪��
- $("#userName").val(data.cnName);
- $("#userSex").val(data.sex);
- $("#userNation").val(data.nation);
- $("#userAddress").val(data.address);
- var time = data.birthdate;
- if (time.length == 8) {
- time = time.substring(0, 4) + "-" + time.substring(4, 6) + "-" + time.substring(6);
- }
- $("#userBirthday").val(time);
- $("#userId").val(data.idNum);
- if (data.Image) {
- $("#id_img_pers").attr("src", data.Image);
- }
- },
- error: function () {
- layer.alert("韬唤璇佽鍙栧け璐ワ紒", {
- offset: ['300px', '300px']
- });
- layer.close(index);
- }
- });
-}
-
-//浣跨敤鎻掍欢璇诲彇鏅烘収鍗″彿
-function flushICCard() {
- $("#intelCard").val(null);
- $.ajax({
- type: "GET",
- async: true,
- url: "http://127.0.0.1:9111/ICCARD",
- data: {},
- dataType: "jsonp",
- jsonp: "callback",
- jsonpCallback: "jsonpCallback",
- success: function (json) {
- //console.log(json);
- var data = json.no;
- //console.log(data);
- if (data === "not found") {
- layer.alert("璇烽噸鏂拌鍗★紒", {offset: ['300px', '300px']});
- } else {
- $("#intelCard").val(data);
- }
- },
- error: function () {
- layer.alert("IC鍗¤鍙栧嚭閿欙紒", {offset: ['300px', '300px']});
- }
- });
-}
-
-//璇诲彇杞︾墝鍙�
-function flushPlateNum() {
- var param = JSON.stringify(lprDto);
- var index = layer.load();
-
- $.ajax({
- type: "POST",
- url: "../../api/lpr/flush-lpr",
- dataType: "json",
- contentType: "application/json;charset=UTF-8",
- data: param,
- success: function (result) {
- if (result.code != "0000") {
- layer.alert(result.msg, {
- offset: ['300px', '300px']
- });
- } else {
- if (result.data.errorMsg) {
- layer.alert(result.data.errorMsg, {
- offset: ['300px', '300px']
- });
- } else {
- $("#plateNum").val(result.data.plateNum);
- $("#pz-img").addClass("kccz-r-img-red");
- $("#pz-text").text("宸叉媿鐓�");
- }
- }
- layer.close(index);
- },
- error: function () {
- layer.close(index);
- layer.alert("杞︾墝璇嗗埆澶辫触锛�", {
- offset: ['300px', '300px']
- });
- }
- });
-}
-
-//閲嶇疆杞︾墝璇嗗埆淇℃伅
-function resetPlateNum() {
- var index = layer.load();
- var param = JSON.stringify(lprDto);
- $.ajax({
- type: "POST",
- url: "../../api/lpr/reset-lpr",
- dataType: "json",
- contentType: "application/json;charset=UTF-8",
- data: param,
- success: function (result) {
- if (result.code != "0000") {
- layer.alert(result.msg, {
- offset: ['300px', '300px']
- });
- } else {
- layer.alert("閲嶇疆鎴愬姛锛岃閲嶆柊鑾峰彇杞︾墝淇℃伅", {
- offset: ['300px', '300px']
- });
- }
- layer.close(index);
- },
- error: function () {
- layer.close(index);
- layer.alert("閲嶇疆鎵ц澶辫触", {
- offset: ['300px', '300px']
- });
- }
- });
-}
-
-// 琛ㄥ崟娓呯┖
-function resetForm() {
- $("#form-data")[0].reset();
- form.render();
-
- // 韬唤璇侀噸缃�
- $("#id_img_pers").attr("src", "../../static/images/rkbk-photo_03.png");
- $("#pz-img").removeClass("kccz-r-img-red");
- $("#pz-text").text("鏈媿鐓�");
-}
-
-// 褰撳墠瀹屾垚
-function submit() {
- var data = form.val("form-data");
- if (!data.userName) {
- notify("鎵胯繍浜轰俊鎭笉鑳戒负绌�", null);
- return;
- }
- if (!data.plateNum) {
- notify("杞︾墝鍙蜂笉鑳戒负绌�", null);
- return;
- }
- if (!data.intelCard && !data.userId) {
- notify("鏅烘収鍗″彿涓庤韩浠借瘉鍙蜂笉鑳藉悓鏃朵负绌�", null);
- return;
- }
-
- //绯荤粺鎶撴媿
- layer.msg("绯荤粺鑷姩鎶撴媿璁板綍鈥︹��");
- snapData = {
- companyId: companyId,
- deptId: deptId,
- bizTag: progress,
- bizType: bizType,
- plateNum: data.plateNum,
- id1: (null != lprDto) ? lprDto.id : null
- };
-
- $.ajax({
- sync: false,
- type: "POST",
- url: "../../basic/inout/snap-img",
- dataType: "json",
- contentType: "application/json;charset=UTF-8",
- data: JSON.stringify(snapData),
- success: function (result) {
- if (result.code != "0000") {
- layer.alert(result.msg);
- submit2(data);
- } else {
- snapData = result.data;
- submit2(data);
- }
- },
- error: function () {
- layer.msg("鍚庡彴璋冪敤鎴浘澶辫触锛岃閲嶆柊灏濊瘯锛侊紒");
- submit2(data);
- }
- });
-}
-
-//鎵ц淇濆瓨2
-function submit2(data) {
- var index = layer.load();
- // 鑾峰彇鐓х墖-蹇界暐
- var files = [{
- fileName: snapData.fileName1
- }];
- data.files = files;
-
- $.ajax({
- type: "POST",
- url: "../../basic/inout/inout-next-step",
- dataType: "json",
- contentType: "application/json;charset=UTF-8",
- data: JSON.stringify(data),
- success: function (result) {
- layer.close(index);
- if (result.code != "0000") {
- notify(result.msg, result.data);
- } else {
- notify("鏁版嵁鎻愪氦鎴愬姛", result.data);
- // 閲嶇疆椤甸潰
- resetForm();
- }
- },
- error: function () {
- layer.close(index);
- layer.alert("鎻愪氦澶辫触锛岃閲嶆柊灏濊瘯锛侊紒");
- }
- });
-}
-
-/**
- * 寮瑰嚭鎻愰啋妗�
- * @param msg 鎻愰啋淇℃伅
- * @param data 鏁版嵁淇℃伅锛屽彲鑳戒负绌�
- */
-function notify(msg, data) {
- if (data) {
- //璧嬪��
- $("#resultMsg").text(msg);
- $("#resultUserName").text(data.userName);
- $("#resultPlateNum").text(data.plateNum);
- if ("IN" == data.type) {
- $("#resultType").text("鍏ュ簱-" + INOUT_PROGRESS_MSG(data.progress));
- } else {
- $("#resultType").text("鍑哄簱-" + INOUT_PROGRESS_MSG(data.progress));
- }
- $("#resultIntelCard").text(data.intelCard);
-
- layer.open({
- type: 1,
- offset: ['150px', '200px'],
- area: '450px;',
- shade: 0.8,
- id: 'dialog_notify_info',
- btn: ['纭畾'],
- content: $('#dialog-from-notify'),
- yes: function (index) {
- layer.closeAll();
- }
- });
- } else {
- layer.alert(msg, {offset: ['300px', '300px']});
- }
-}
\ No newline at end of file
diff --git a/igds-web/src/main/resources/static/admin/inout/in-register.js b/igds-web/src/main/resources/static/admin/inout/in-register.js
index 58a76fd..db6dead 100644
--- a/igds-web/src/main/resources/static/admin/inout/in-register.js
+++ b/igds-web/src/main/resources/static/admin/inout/in-register.js
@@ -30,7 +30,7 @@
shadeClose: true,
shade: 0.3,
closeBtn: 2,
- offset: ['50px','50px'],
+ offset: ['50px', '50px'],
area: ['1000px', '640px'],
content: '../../basic/inout/inout-progress?type=' + type + "&t=" + Math.random()
});
@@ -55,34 +55,8 @@
});
window.onload = function () {
- // 鍔犺浇瑙嗛
initVideo(lprDto, null, null);
};
-
-//鎺у埗娴佺▼鐜妭鏄剧ず
-function showProgress() {
- if (!inoutProgress) {
- return;
- }
- if (inoutProgress.indexOf("REGISTER") == -1) {
- $("#progress-register").css("display", "none");
- }
- if (inoutProgress.indexOf("CHECK") == -1) {
- $("#progress-check").css("display", "none");
- }
- if (inoutProgress.indexOf("WEIGHT_FULL") == -1) {
- $("#progress-fullWeight").css("display", "none");
- }
- if (inoutProgress.indexOf("HANDLE") == -1) {
- $("#progress-hand").css("display", "none");
- }
- if (inoutProgress.indexOf("WEIGHT_EMPTY") == -1) {
- $("#progress-emptyWeight").css("display", "none");
- }
- if (inoutProgress.indexOf("CARD_BACK") == -1) {
- $("#progress-cardBack").css("display", "none");
- }
-}
// socket淇℃伅杩斿洖铏曠悊
function socketOnMessage(packet) {
@@ -163,14 +137,13 @@
//璇诲彇杞︾墝鍙�
function flushPlateNum() {
- var param = JSON.stringify(lprDto);
var index = layer.load();
$.ajax({
type: "POST",
- url: "../../inout/api/flush-lpr",
+ url: "../../inout/api/get-plateNum",
dataType: "json",
contentType: "application/json;charset=UTF-8",
- data: param,
+ data: JSON.stringify(lprDto),
success: function (result) {
if (result.code != "0000") {
layer.alert(result.msg, {
@@ -183,6 +156,7 @@
});
} else {
$("#plateNum").val(result.data.plateNum);
+ $("#plateNum2").val(result.data.plateNum);
}
}
layer.close(index);
@@ -196,37 +170,6 @@
});
}
-//閲嶇疆杞︾墝璇嗗埆淇℃伅
-function resetPlateNum() {
- var index = layer.load();
- var param = JSON.stringify(lprDto);
- $.ajax({
- type: "POST",
- url: "../../inout/api/reset-lpr",
- dataType: "json",
- contentType: "application/json;charset=UTF-8",
- data: param,
- success: function (result) {
- if (result.code != "0000") {
- layer.alert(result.msg, {
- offset: ['300px', '300px']
- });
- } else {
- layer.alert("閲嶇疆鎴愬姛锛岃閲嶆柊鑾峰彇杞︾墝淇℃伅", {
- offset: ['300px', '300px']
- });
- }
- layer.close(index);
- },
- error: function () {
- layer.close(index);
- layer.alert("閲嶇疆鎵ц澶辫触", {
- offset: ['300px', '300px']
- });
- }
- });
-}
-
// 琛ㄥ崟娓呯┖
function resetForm() {
$("#form-data")[0].reset();
@@ -234,7 +177,6 @@
// 韬唤璇侀噸缃�
$("#id_img_pers").attr("src", "../../static/images/rkbk-photo_03.png");
$("#pz-img").removeClass("kccz-r-img-red");
- $("#pz-text").text("鑷姩鎶撴媿");
}
// 褰撳墠瀹屾垚
@@ -248,8 +190,8 @@
notify("杞︾墝鍙蜂笉鑳戒负绌�", null);
return;
}
- if (!data.intelCard && !data.userId) {
- notify("鏅烘収鍗″彿涓庤韩浠借瘉鍙蜂笉鑳藉悓鏃朵负绌�", null);
+ if (!data.userId) {
+ notify("韬唤璇佸彿涓嶈兘涓虹┖", null);
return;
}
@@ -261,9 +203,8 @@
progress: progress,
bizType: bizType,
plateNum: data.plateNum,
- id1: (null != lprDto) ? lprDto.id : null
+ id1: lprDto.id
};
-
$.ajax({
sync: false,
type: "POST",
diff --git a/igds-web/src/main/resources/static/admin/inout/inout-common.js b/igds-web/src/main/resources/static/admin/inout/inout-common.js
new file mode 100644
index 0000000..231d61b
--- /dev/null
+++ b/igds-web/src/main/resources/static/admin/inout/inout-common.js
@@ -0,0 +1,24 @@
+//鎺у埗娴佺▼鐜妭鏄剧ず
+function showProgress() {
+ if (!inoutProgress) {
+ return;
+ }
+ if (inoutProgress.indexOf("REGISTER") == -1) {
+ $("#progress-register").css("display", "none");
+ }
+ if (inoutProgress.indexOf("CHECK") == -1) {
+ $("#progress-check").css("display", "none");
+ }
+ if (inoutProgress.indexOf("WEIGHT_FULL") == -1) {
+ $("#progress-fullWeight").css("display", "none");
+ }
+ if (inoutProgress.indexOf("HANDLE") == -1) {
+ $("#progress-hand").css("display", "none");
+ }
+ if (inoutProgress.indexOf("WEIGHT_EMPTY") == -1) {
+ $("#progress-emptyWeight").css("display", "none");
+ }
+ if (inoutProgress.indexOf("CARD_BACK") == -1) {
+ $("#progress-cardBack").css("display", "none");
+ }
+}
\ No newline at end of file
diff --git a/igds-web/src/main/resources/static/admin/inout/video-play.js b/igds-web/src/main/resources/static/admin/inout/video-play.js
index c6afd90..0572667 100644
--- a/igds-web/src/main/resources/static/admin/inout/video-play.js
+++ b/igds-web/src/main/resources/static/admin/inout/video-play.js
@@ -10,8 +10,6 @@
*/
function initVideo(snapParam1, snapParam2, snapPram3) {
- // console.log(lprParam);
-
//杞︾墝璇嗗埆鎾斁
if (snapParam1) {
$.ajax({
diff --git a/igds-web/src/main/resources/templates/admin/inout/in-register.html b/igds-web/src/main/resources/templates/admin/inout/in-register.html
index ea69c2f..13eb2c5 100644
--- a/igds-web/src/main/resources/templates/admin/inout/in-register.html
+++ b/igds-web/src/main/resources/templates/admin/inout/in-register.html
@@ -296,7 +296,7 @@
<div class="kccz-r-vedio" id="kccz-r-video1"></div>
<div class="kccz-r-btnbox">
<div class="kccz-r-div">
- <span>鏈瘑鍒�</span>
+ <span id="plateNum2">鏈瘑鍒�</span>
<p>杞︾墝璇嗗埆</p>
</div>
@@ -340,6 +340,7 @@
<script th:src="@{../../static/js/constant.js}"></script>
<script th:src="@{../../static/js/igds-common.js}"></script>
<script th:src="@{../../static/admin/inout/video-play.js}"></script>
+ <script th:src="@{../../static/admin/inout/inout-common.js}"></script>
<script th:src="@{../../static/admin/inout/in-register.js}"></script>
<!-- 寮瑰嚭妗嗙殑淇℃伅 -->
--
Gitblit v1.9.3