igds-core/src/main/java/com/ld/igds/data/SnapImgDto.java
ÎļþÃû´Ó igds-core/src/main/java/com/ld/igds/inout/dto/InoutSnapImgDto.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--ç¨äºä¿åæä»¶æ°æ®åºä½¿ç¨ 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; } } igds-inout/src/main/java/com/ld/igds/inout/controller/InoutApiController.java
ÎļþÃû´Ó igds-inout/src/main/java/com/ld/igds/inout/controller/InoutDeviceController.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); 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); //åå§å车çè¯å« 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; } 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()) { igds-web/src/main/resources/static/admin/inout/in-register-bak20221110.js
ÎļþÒÑɾ³ý 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", 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"); } } 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({ 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> <!-- å¼¹åºæ¡çä¿¡æ¯ -->