jiazx0107@163.com
2023-05-29 34abe3473f7e4deaac31a0ad38f855eeafbf9266
出入库优化-登记1
已重命名2个文件
已删除1个文件
已修改7个文件
已添加1个文件
709 ■■■■ 文件已修改
igds-core/src/main/java/com/ld/igds/data/SnapImgDto.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/models/InoutConf.java 200 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/controller/InoutApiController.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/manager/InoutCommonManager.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/manager/InoutDeviceManager.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/static/admin/inout/in-register-bak20221110.js 368 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/static/admin/inout/in-register.js 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/static/admin/inout/inout-common.js 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/static/admin/inout/video-play.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/templates/admin/inout/in-register.html 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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>
    <!-- å¼¹å‡ºæ¡†çš„信息 -->