2f432f52c1cfb1567dadcf6e040c5d38b0a26a79..46adcbf7494340a495539708210bb39110bdc33b
2025-11-29 czt
快速登记、化验及称重作业页面提交1
46adcb 对比 | 目录
2025-11-29 czt
入库通知单提交
867f65 对比 | 目录
已重命名3个文件
已删除17个文件
已修改8个文件
已添加51个文件
10643 ■■■■■ 文件已修改
fzzy-igdss-core/src/main/java/com/fzzy/igds/constant/Constant.java 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/NoticeDto.java 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/NoticeParam.java 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/InoutConf.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/InoutNoticeIn.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/InoutNoticeOut.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/InoutNoticeMapper.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/DeviceSerRepository.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/InoutNoticeInRepository.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/InoutNoticeOutRepository.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/DeviceSerService.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java 288 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SysDeptService.java 171 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/utils/DateUtil.java 253 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/utils/SystemUtil.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticeIn.view.xml 636 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticeOut.view.xml 1122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticePR.java 489 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/models/core.model.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/inout/InoutController.java 236 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/java/com/fzzy/sys/init/SystemRunner.java 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/common/CommonManager.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/inout/InoutManager.java 153 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/common/constant.js 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/common/igds-common.js 238 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/fonts/DigitalNumbers.ttf 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/eoms/bgl1.jpg 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/eoms/bgl2.jpg 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/eoms/bgl3.jpg 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/eoms/bgl4.jpg 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/eoms/da-01.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/eoms/iconl1.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/eoms/iconl2.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/eoms/iconl3.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/eoms/iconl4.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/eoms/imgl1.jpg 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/eoms/imgl2.jpg 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/eoms/imgl3.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/eoms/imgl4.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/eoms/imgl5.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/eoms/nkt.jpg 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/eoms/rz-01.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/eoms/zcl_logo.jpeg 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/czxx-bg_03.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-banli.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-camera-cp.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-camera-h.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-camera.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-chengzhong.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-clear.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-date.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-dayin.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-dengji.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-fuwei.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-gree.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-hyd.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-img-red.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-img.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-ok.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-red.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-shuaxin2.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-stop.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-xiehuo.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-zhijian.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/inout-img.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/img/web/inout/rkbk-photo_03.png 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/inout/inout-check.js 869 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/inout/inout-common.js 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/inout/inout-print.js 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/inout/inout-register.js 699 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/inout/inout-style.css 956 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/inout/inout-weight.js 773 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/inout/video-play.js 346 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/inout/weight.js 381 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/js/plugins/lodop/LodopFuncs.js 141 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/templates/inout/inout-check.html 595 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/templates/inout/inout-register.html 739 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/templates/inout/inout-weight.html 684 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/templates/register.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/constant/Constant.java
@@ -77,4 +77,80 @@
     * ç¼“å­˜KEY-出入库配置信息缓存
     */
    public static final String CACHE_INOUT_CONF_LIST = "INOUT_CONF";
    public static final String MODEL_KEY_LOGIN_USER = "loginUser";
    // ä»“库列表
    public static final String MODEL_KEY_DEPOT_LIST = "listDepot";
    // å®ŒæˆçŠ¶æ€-未完成
    public static final String COMPLETE_STATUS_NONE = "NONE";
    // å‡ºå…¥åº“类型-入库
    public static final String TYPE_IN = "IN";
    // å‡ºå…¥åº“类型-出库
    public static final String TYPE_OUT = "OUT";
    // æµç¨‹-登记
    public static final String PROGRESS_REGISTER = "REGISTER";
    // æµç¨‹-入库质检
    public static final String PROGRESS_CHECK = "CHECK";
    // æµç¨‹-值仓
    public static final String PROGRESS_HANDLE = "HANDLE";
    // æµç¨‹-称重,包括满车称重或者空车称重,当前状态比较特殊,不作为流程节点,只作为标签
    public static final String PROGRESS_WEIGHT_TAG = "WEIGHT_TAG";
    // æµç¨‹-满车称重
    public static final String PROGRESS_WEIGHT_FULL = "WEIGHT_FULL";
    // æµç¨‹-空车称重
    public static final String PROGRESS_WEIGHT_EMPTY = "WEIGHT_EMPTY";
    // æµç¨‹-结算
    public static final String PROGRESS_PAY = "PAY";
    // æµç¨‹-卡片回收
    public static final String PROGRESS_CARD_BACK = "CARD_BACK";
    // æµç¨‹-备案(表示流程整体完成后备案)
    public static final String PROGRESS_RECORD = "RECORD";
    /**
     * å‡ºå…¥åº“配置的类型 10 = è½¦ç‰Œè¯†åˆ«
     */
    public static final String CONF_TYPE_10 = "10";
    /**
     * å‡ºå…¥åº“配置的类型 20 = æ‰¦æ ·æœºå™¨
     */
    public static final String CONF_TYPE_20 = "20";
    /**
     * å‡ºå…¥åº“配置的类型 21 = åŒ–验机
     */
    public static final String CONF_TYPE_21 = "21";
    /**
     * å‡ºå…¥åº“配置的类型 30 = åœ°ç£…
     */
    public static final String CONF_TYPE_30 = "30";
    /**
     * å‡ºå…¥åº“配置的类型40 = LED显示屏幕
     */
    public static final String CONF_TYPE_40 = "40";
    /**
     * åŒ–验大屏视频
     */
    public static final String CONF_TYPE_50 = "50";
    /**
     * å‡ºå…¥åº“抓拍摄像头
     */
    public static final String CONF_TYPE_60 = "60";
    /**
     * ç§°é‡ä¸»æŽ§åˆ¶å™¨
     */
    public static final String CONF_TYPE_70 = "70";
    /**
     * æ™ºæ…§å¡
     */
    public static final String CONF_TYPE_80 = "80";
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/NoticeDto.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,91 @@
package com.fzzy.igds.data;
import lombok.Data;
import java.util.Date;
/**
 * @Description å‡ºå…¥åº“通知单整体使用封装
 * @Author CZT
 * @Date 2025/11/29 16:33
 */
@Data
public class NoticeDto {
    /**
     * é€šçŸ¥å•id
     */
    private String id;
    private String name;
    /**
     * ç»„织编码
     */
    private String companyId;
    /**
     * åº“区编码
     */
    private String deptId;
    /**
     * ä»“库编码
     */
    private String depotId;
    /**
     * å®¢æˆ·ç¼–码
     */
    private String customerId;
    /**
     * å®¢æˆ·åç§°
     */
    private String customerName;
    /**
     * å•位名称
     */
    private String unitName;
    /**
     * ç²®é£Ÿå“ç§
     */
    private String foodVariety;
    /**
     * ç²®é£Ÿæ€§è´¨
     */
    private String foodType;
    /**
     * å¹´ä»½
     */
    private String year;
    /**
     * ç›®æ ‡æ•°é‡
     */
    private Double targetNumber = 0.0;
    /**
     * å®Œæˆæ•°é‡
     */
    private Double completeNumber = 0.0;
    /**
     * å®Œæˆæ—¶é—´
     */
    private Date completeTime;
    /**
     * æ‰€å±žåˆåŒ
     */
    private String contractName;
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/NoticeParam.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,74 @@
package com.fzzy.igds.data;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
 * @Description å‡ºå…¥åº“通知单参数
 * @Author CZT
 * @Date 2025/11/29 16:33
 */
@Data
@EqualsAndHashCode(callSuper=false)
public class NoticeParam {
    private String id;
    private String companyId;
    private String depotId;
    private String deptId;// æ‰€å±žåˆ†åº“
    private String customerName;// å®¢æˆ·åç§°
    private String foodVariety;// å“ç§
    private String contractId;//合同号
    private String planId;//计划
    private String foodType; // ç²®é£Ÿæ€§è´¨
    private String year;// å¹´ä»½
    private String type;
    private Double weight;// é‡é‡ä¿¡æ¯
    private Double taskNum = 0.0;
    private String completeStatus; // å®ŒæˆçŠ¶æ€
    private Double storageReal;// åº“存重量
    private Date start;
    private Date end;
    private String createUser;
    public NoticeParam() {
    }
    public NoticeParam(String companyId, String deptId, String customerName,
                       String foodVariety, String id) {
        this.companyId = companyId;
        this.deptId = deptId;
        this.customerName = customerName;
        this.foodVariety = foodVariety;
        this.id = id;
    }
    public NoticeParam(String companyId, String deptId, String depotId,
                       String customerName, String foodVariety, String id) {
        this.companyId = companyId;
        this.deptId = deptId;
        this.depotId = depotId;
        this.customerName = customerName;
        this.foodVariety = foodVariety;
        this.id = id;
    }
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/InoutConf.java
@@ -121,4 +121,37 @@
    @Transient
    private String errorMsg;
    public InoutConf() {
        super();
    }
    public InoutConf(InoutConf conf) {
        this.id = conf.getId();
        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;
    }
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/InoutNoticeIn.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bstek.dorado.annotation.PropertyDef;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -53,10 +54,6 @@
    @TableField("depot_id")
    private String depotId;
    @Column(name = "customer_id", columnDefinition = "varchar(40) COMMENT '发货客户'")
    @TableField("customer_id")
    private String customerId;
    @Column(name = "customer_name", columnDefinition = "varchar(40) COMMENT '发货单位'")
    @TableField("customer_name")
    private String customerName;
@@ -81,7 +78,7 @@
    @TableField("complete_number")
    private Double completeNumber = 0.0;
    @Column(name = "audit_status", columnDefinition = "varchar(2) COMMENT '审核状态(10=监管审核,20=银行审核,30=通过)'")
    @Column(name = "audit_status", columnDefinition = "varchar(10) COMMENT '审核状态(10=监管审核,20=银行审核,30=通过)'")
    @TableField("audit_status")
    private String auditStatus = "10";
@@ -107,4 +104,9 @@
    @TableField("remark")
    private String remark;
    @Transient
    @PropertyDef(label = "标记", description = "用于判断通知单是否为新增")
    private String tag;
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/InoutNoticeOut.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bstek.dorado.annotation.PropertyDef;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -107,4 +108,7 @@
    @TableField("remark")
    private String remark;
    @Transient
    @PropertyDef(label = "标记", description = "用于判断通知单是否为新增")
    private String tag;
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/InoutNoticeMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,29 @@
package com.fzzy.igds.mapper;
import com.fzzy.igds.data.NoticeParam;
import org.apache.ibatis.annotations.Param;
/**
 * @Description
 * @Author CZT
 * @Date 2025/11/29 16:39
 */
public interface InoutNoticeMapper {
    /**
     * å…¥åº“通知单 - æ ¹æ®å‚数重新计算完成量
     *
     * @param param
     * @return
     */
    int reSumNoticeInComplete(@Param("param") NoticeParam param);
    /**
     * å‡ºåº“通知单 - æ ¹æ®å‚数重新计算完成量
     *
     * @param param
     * @return
     */
    int reSumNoticeOutComplete(@Param("param") NoticeParam param);
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/DeviceSerRepository.java
@@ -20,13 +20,22 @@
public interface DeviceSerRepository extends JpaRepository<DeviceSer, String> {
    /**
     * æ ¹æ®ç»„织编码获取仓库货位信息
     * æ ¹æ®ç»„织编码获取信息
     *
     * @param companyId
     * @return
     */
    @Query("from DeviceSer where companyId =:companyId order by orderNum")
    List<DeviceSer> getDataByDeptId(@Param("companyId") String companyId);
    List<DeviceSer> getAllSerByCompanyId(@Param("companyId") String companyId);
    /**
     * æ ¹æ®ç»„织编码获取仓库货位信息
     *
     * @param deptId
     * @return
     */
    @Query("from DeviceSer where deptId =:deptId order by orderNum")
    List<DeviceSer> getDataByDeptId(@Param("deptId") String deptId);
    /**
fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/InoutNoticeInRepository.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,54 @@
package com.fzzy.igds.repository;
import com.fzzy.igds.domain.InoutNoticeIn;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * @Description
 * @Author CZT
 * @Date 2025/11/29 16:33
 */
@Service
public interface InoutNoticeInRepository extends JpaRepository<InoutNoticeIn, String> , JpaSpecificationExecutor<InoutNoticeIn> {
    /**
     * æ ¹æ®ç»„织编码和库区编码获取信息
     *
     * @param companyId
     * @param deptId
     * @param id
     * @return
     */
    @Query("from InoutNoticeIn where companyId =:companyId and deptId =:deptId and id =:id")
    InoutNoticeIn getDataById(@Param("companyId") String companyId, @Param("deptId") String deptId, @Param("id") String id);
    /**
     * æ ¹æ®ç»„织编码和库区编码获取信息
     *
     * @param companyId
     * @param deptId
     * @param completeStatus
     * @return
     */
    @Query("from InoutNoticeIn where companyId =:companyId and deptId =:deptId and completeStatus =:completeStatus")
    List<InoutNoticeIn> listNoticeIn(@Param("companyId") String companyId, @Param("deptId") String deptId, @Param("completeStatus") String completeStatus);
    /**
     * æ ¹æ®ç»„织编码和库区编码获取信息
     *
     * @param companyId
     * @param completeStatus
     * @return
     */
    @Query("from InoutNoticeIn where companyId =:companyId and completeStatus =:completeStatus")
    List<InoutNoticeIn> listNoticeIn(@Param("companyId") String companyId, @Param("completeStatus") String completeStatus);
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/InoutNoticeOutRepository.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,53 @@
package com.fzzy.igds.repository;
import com.fzzy.igds.domain.InoutNoticeOut;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * @Description
 * @Author CZT
 * @Date 2025/11/29 16:34
 */
@Service
public interface InoutNoticeOutRepository extends JpaRepository<InoutNoticeOut, String> , JpaSpecificationExecutor<InoutNoticeOut> {
    /**
     * æ ¹æ®ç»„织编码和库区编码获取信息
     *
     * @param companyId
     * @param deptId
     * @param id
     * @return
     */
    @Query("from InoutNoticeOut where companyId =:companyId and deptId =:deptId and id =:id")
    InoutNoticeOut getDataById(@Param("companyId") String companyId, @Param("deptId") String deptId, @Param("id") String id);
    /**
     * æ ¹æ®ç»„织编码和库区编码获取信息
     *
     * @param companyId
     * @param deptId
     * @param completeStatus
     * @return
     */
    @Query("from InoutNoticeOut where companyId =:companyId and deptId =:deptId and completeStatus =:completeStatus")
    List<InoutNoticeOut> listNoticeOut(@Param("companyId") String companyId, @Param("deptId") String deptId, @Param("completeStatus") String completeStatus);
    /**
     * æ ¹æ®ç»„织编码和库区编码获取信息
     *
     * @param companyId
     * @param completeStatus
     * @return
     */
    @Query("from InoutNoticeOut where companyId =:companyId and completeStatus =:completeStatus")
    List<InoutNoticeOut> listNoticeOut(@Param("companyId") String companyId, @Param("completeStatus") String completeStatus);
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/DeviceSerService.java
@@ -35,6 +35,15 @@
     *
     * @return
     */
    public List<DeviceSer> getAllSerByCompanyId(String companyId) {
        return deviceSerRepository.getAllSerByCompanyId(companyId);
    }
    /**
     * JPA æŸ¥è¯¢åˆ†æœºåˆ—表
     *
     * @return
     */
    public List<DeviceSer> getAllSer() {
        SysUser user = ContextUtil.getLoginUser();
        SysDept userDept = iSysDeptService.selectDeptById(user.getDeptId());
@@ -43,7 +52,6 @@
        }else {
            return deviceSerRepository.getDataByParentId(user.getDeptId() + "%");
        }
    }
    /**
@@ -172,7 +180,7 @@
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        List<DeviceSer> list = this.getAllSer();
        List<DeviceSer> list = this.getAllSerByCompanyId(companyId);
        this.setCacheSer(list, companyId);
    }
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,288 @@
package com.fzzy.igds.service;
import com.fzzy.igds.constant.Constant;
import com.fzzy.igds.data.NoticeDto;
import com.fzzy.igds.data.NoticeParam;
import com.fzzy.igds.mapper.InoutNoticeMapper;
import com.fzzy.igds.repository.InoutNoticeInRepository;
import com.fzzy.igds.repository.InoutNoticeOutRepository;
import com.fzzy.igds.domain.InoutNoticeIn;
import com.fzzy.igds.domain.InoutNoticeOut;
import com.fzzy.igds.utils.ContextUtil;
import com.ruoyi.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
/**
 * @Description å‡ºå…¥åº“通知单service层,包含入库通知单和出库通知单
 * @Author CZT
 * @Date 2025/11/29 16:33
 */
@Slf4j
@Service
public class InoutNoticeService {
    @Resource
    private InoutNoticeInRepository noticeInRepository;
    @Resource
    private InoutNoticeOutRepository noticeOutRepository;
    @Resource
    private InoutNoticeMapper noticeMapper;
    /**
     * JPA分页查询数据
     *
     * @param specification
     * @param pageable
     * @return
     */
    public Page<InoutNoticeIn> queryAllNoticeIn(Specification<InoutNoticeIn> specification, Pageable pageable) {
        return noticeInRepository.findAll(specification, pageable);
    }
    /**
     * JPA查询数据
     * @param companyId
     * @param deptId
     * @return
     */
    public List<InoutNoticeIn> listNoticeIn(String companyId, String deptId) {
        return noticeInRepository.listNoticeIn(companyId, deptId, Constant.COMPLETE_STATUS_NONE);
    }
    /**
     * jpa èŽ·å–ä¿¡æ¯
     * @param companyId
     * @return
     */
    public List<InoutNoticeIn> getUnComNoticeIn(String companyId) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        return noticeInRepository.listNoticeIn(companyId, Constant.COMPLETE_STATUS_NONE);
    }
    /**
     * JPA - ä¿å­˜æ›´æ–°æ•°æ®
     *
     * @param data
     * @return
     */
    public String saveOrUpdateIn(InoutNoticeIn data) {
        if (Constant.YN_Y.equals(data.getTag())) {
            data.setCreateBy(ContextUtil.getLoginUserName());
            data.setCreateTime(new Date());
            data.setAuditStatus(Constant.COMPLETE_STATUS_NONE);
            data.setCompleteStatus(Constant.COMPLETE_STATUS_NONE);
        }
        data.setUpdateBy(ContextUtil.getLoginUserName());
        data.setUpdateTime(new Date());
        noticeInRepository.save(data);
        return null;
    }
    /**
     * JPA - åˆ é™¤æ•°æ®
     *
     * @param data
     * @return
     */
    public String delDataIn(InoutNoticeIn data) {
        noticeInRepository.delete(data);
        return null;
    }
    /**
     * JPA分页查询数据
     *
     * @param specification
     * @param pageable
     * @return
     */
    public Page<InoutNoticeOut> queryAllNoticeOut(Specification<InoutNoticeOut> specification, Pageable pageable) {
        return noticeOutRepository.findAll(specification, pageable);
    }
    /**
     * JPA查询数据
     * @param companyId
     * @param deptId
     * @return
     */
    public List<InoutNoticeOut> listNoticeOut(String companyId, String deptId) {
        return noticeOutRepository.listNoticeOut(companyId, deptId, Constant.COMPLETE_STATUS_NONE);
    }
    /**
     * Mybatis-plus èŽ·å–ä¿¡æ¯
     * @param companyId
     * @return
     */
    public List<InoutNoticeOut> getUnComNoticeOut(String companyId) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        return noticeOutRepository.listNoticeOut(companyId, Constant.COMPLETE_STATUS_NONE);
    }
    /**
     * JPA - ä¿å­˜æ›´æ–°æ•°æ®
     *
     * @param data
     * @return
     */
    public String saveOrUpdateOut(InoutNoticeOut data) {
        if (Constant.YN_Y.equals(data.getTag())) {
            data.setCreateBy(ContextUtil.getLoginUserName());
            data.setCreateTime(new Date());
            data.setAuditStatus(Constant.COMPLETE_STATUS_NONE);
            data.setCompleteStatus(Constant.COMPLETE_STATUS_NONE);
        }
        data.setUpdateBy(ContextUtil.getLoginUserName());
        data.setUpdateTime(new Date());
        noticeOutRepository.save(data);
        return null;
    }
    /**
     * JPA - åˆ é™¤æ•°æ®
     *
     * @param data
     * @return
     */
    public String delDataOut(InoutNoticeOut data) {
        noticeOutRepository.delete(data);
        return null;
    }
    /**
     * JPA - æ ¹æ®ID获取通知单信息
     * @param id
     * @param type
     * @return
     */
    public NoticeDto queryNoticeById(String id, String type) {
        if (StringUtils.isEmpty(id) || StringUtils.isEmpty(type)) {
            return null;
        }
        NoticeDto noticeDto = new NoticeDto();
        if (Constant.TYPE_IN.equals(type)) {
            InoutNoticeIn noticeIn = noticeInRepository.getDataById(ContextUtil.getCompanyId(), ContextUtil.subDeptId(null), id);
            BeanUtils.copyProperties(noticeIn, noticeDto);
        } else {
            InoutNoticeOut noticeOut = noticeOutRepository.getDataById(ContextUtil.getCompanyId(), ContextUtil.subDeptId(null), id);
            BeanUtils.copyProperties(noticeOut, noticeDto);
        }
        return noticeDto;
    }
    /**
     * Mybatis-plus æ›´æ–°ä¿¡æ¯
     * @param noticeInList
     * @return
     */
    public void updateSumNoticeIn(List<InoutNoticeIn> noticeInList) {
        if (null == noticeInList || noticeInList.isEmpty()) {
            return;
        }
        //遍历通知单
        NoticeParam param;
        for (InoutNoticeIn noticeIn : noticeInList) {
            param = new NoticeParam(noticeIn.getCompanyId(), noticeIn.getDeptId(),
                    noticeIn.getCustomerName(), noticeIn.getFoodVariety(), noticeIn.getId());
            log.info("开始更新出库通知单={}", param.toString());
            String msg = this.reSumNoticeInComplete(param);
            if (msg != null) {
                log.info("入库通知单完成量统计失败={},失败原因={}", param.toString(), msg);
            }
        }
    }
    /**
     * Mybatis-plus èŽ·å–ä¿¡æ¯
     * @param param
     * @return
     */
    public String reSumNoticeInComplete(NoticeParam param) {
        if (StringUtils.isEmpty(param.getCustomerName())) {
            return "客户编码为空!";
        }
        if (StringUtils.isEmpty(param.getFoodVariety())) {
            return "粮食品种为空!";
        }
        if (StringUtils.isEmpty(param.getCompanyId())) {
            param.setCompanyId(ContextUtil.getCompanyId());
        }
        if (StringUtils.isEmpty(param.getDeptId())) {
            param.setDeptId(ContextUtil.subDeptId(null));
        }
        noticeMapper.reSumNoticeInComplete(param);
        return null;
    }
    /**
     * Mybatis-plus æ›´æ–°ä¿¡æ¯
     * @param noticeOutList
     * @return
     */
    public void updateSumNoticeOut(List<InoutNoticeOut> noticeOutList) {
        if (null == noticeOutList || noticeOutList.isEmpty()) {
            return;
        }
        //遍历通知单
        NoticeParam param;
        for (InoutNoticeOut noticeOut : noticeOutList) {
            param = new NoticeParam(noticeOut.getCompanyId(), noticeOut.getDeptId(), noticeOut.getDepotId(),
                    noticeOut.getCustomerId(), noticeOut.getFoodVariety(), noticeOut.getId());
            log.info("开始更新出库通知单={}", param.toString());
            String msg = this.reSumNoticeOutComplete(param);
            if (msg != null) {
                log.info("出库通知单完成量统计失败={},失败原因={}", param.toString(), msg);
            }
        }
    }
    /**
     * Mybatis-plus æ›´æ–°ä¿¡æ¯
     * @param param
     * @return
     */
    public String reSumNoticeOutComplete(NoticeParam param) {
        if (StringUtils.isEmpty(param.getCustomerName())) {
            return "客户编码为空!";
        }
        if (StringUtils.isEmpty(param.getFoodVariety())) {
            return "粮食品种为空!";
        }
        if (StringUtils.isEmpty(param.getDepotId())) {
            return "仓库编码为空!";
        }
        if (StringUtils.isEmpty(param.getCompanyId())) {
            param.setCompanyId(ContextUtil.getCompanyId());
        }
        if (StringUtils.isEmpty(param.getDeptId())) {
            param.setDeptId(ContextUtil.subDeptId(null));
        }
        noticeMapper.reSumNoticeOutComplete(param);
        return null;
    }
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SysDeptService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,171 @@
package com.fzzy.igds.service;
import com.fzzy.igds.constant.Constant;
import com.fzzy.igds.constant.RedisConst;
import com.fzzy.igds.utils.ContextUtil;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.ISysDeptService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
/**
 * @Description
 * @Author CZT
 * @Date 2024/11/22 18:03
 */
@Slf4j
@Service
public class SysDeptService {
    @Resource
    private SysUserMapper userMapper;
    @Resource
    private ISysDeptService iSysDeptService;
    @Resource
    private RedisCache redisCache;
    public void initUserDeptMap(String companyId) {
        if(StringUtils.isEmpty(companyId)){
            companyId = ContextUtil.getCompanyId();
        }
        SysUser sysUser = new SysUser();
        sysUser.setCompanyId(companyId);
        List<SysUser> list = userMapper.selectUserList(sysUser);
        if (null == list || list.isEmpty()){
            return;
        }
        for (SysUser userDept : list) {
            ContextUtil.updateSubDept(userDept.getLoginName(), userDept.getDeptId().toString());
        }
    }
    /**
     * åˆ·æ–°éƒ¨é—¨æž¶æž„信息到缓存
     * @param companyId
     */
    public List<SysDept> flushDeptCache(String companyId) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        SysDept sysDept = new SysDept();
        sysDept.setCompanyId(companyId);
        List<SysDept> listSysDept = iSysDeptService.selectDeptList(sysDept);
        String key = RedisConst.buildKey(companyId, RedisConst.KEY_DEPT_LIST);
        redisCache.setCacheObject(key, listSysDept);
        return listSysDept;
    }
    /**
     * æ ¹æ®ç»„织编码获取所有部门信息
     * @param companyId
     * @return
     */
    public List<SysDept> getCacheDept(String companyId) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        String key = RedisConst.buildKey(companyId, RedisConst.KEY_DEPT_LIST);
        List<SysDept> listSysDept = redisCache.getCacheObject(key);
        if(null == listSysDept){
            listSysDept = flushDeptCache(companyId);
        }
        return listSysDept;
    }
    /**
     * ç¼“存获取组织下所有库区列表
     * @param companyId
     */
    public List<SysDept> getAllDeptByCompanyId(String companyId) {
        List<SysDept> list = getCacheDept(companyId);
        return list.stream()
                .filter(item -> item.getType().equals(Constant.DEPT_TYPE_20))
                .collect(Collectors.toList());
    }
    /**
     * æ ¹æ®id获取部门信息
     * @param companyId
     * @param deptId
     * @return
     */
    public SysDept getCacheDept(String companyId, String deptId) {
        if (StringUtils.isEmpty(deptId)) {
            return null;
        }
        List<SysDept> list = getCacheDept(companyId);
        if (null == list || list.isEmpty()){
            return null;
        }
        for (SysDept dept : list) {
            if (deptId.equals(dept.getDeptId() + ""))
                return dept;
        }
        return null;
    }
    /**
     * æ ¹æ®ç±»åž‹èŽ·å–éƒ¨é—¨ä¿¡æ¯
     * type: 10-公司,20-库区,30-部门
     * @param type
     * @return
     */
    public List<SysDept> getDeptByType(String type) {
        if (StringUtils.isEmpty(type)) {
            return null;
        }
        List<SysDept> list = getCacheDept(null);
        if (null == list || list.isEmpty()) {
            return null;
        }
        //根据类型查询
        return list.stream()
                .filter(item -> type.equals(item.getType()))
                .collect(Collectors.toList());
    }
    /**
     * æ ¹æ®ç±»åž‹èŽ·å–éƒ¨é—¨ä¿¡æ¯
     * type: 00-公司,10-公司,20-库区,多个用英文逗号隔开
     *
     * @param
     * @return
     */
    public List<SysDept> getDeptById(SysDept dept) {
        if (null == dept) {
            return null;
        }
        List<SysDept> list = getCacheDept(null);
        if ("20".equals(dept.getType())) {
            //根据类型查询
            return list.stream()
                    .filter(item -> dept.getDeptId().longValue() == item.getDeptId())
                    .collect(Collectors.toList());
        } else if ("10".equals(dept.getType())) {
            //根据类型查询
            return list.stream()
                    .filter(item -> dept.getDeptId().longValue() == item.getParentId())
                    .collect(Collectors.toList());
        } else {
            return list.stream()
                    .filter(item -> dept.getDeptId().toString().equals(item.getCompanyId()) && "20".equals(item.getType()))
                    .collect(Collectors.toList());
        }
    }
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/utils/DateUtil.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,253 @@
package com.fzzy.igds.utils;
import org.apache.commons.lang3.time.DateUtils;
import java.util.Calendar;
import java.util.Date;
/**
 * æ—¶é—´ç›¸å…³å·¥å…·ç±»
 *
 * @author jiazx
 */
public class DateUtil {
    /**
     * æ ¹æ®å½“前时间获取只有 yyyy-MM-dd的时间
     *
     * @param date
     * @return
     */
    public static Date getCurZero(Date date) {
        //TimeZone.setDefault(TimeZone.getTimeZone("GMT+8"));
        date = DateUtils.setHours(date, 0);
        date = DateUtils.setMinutes(date, 0);
        date = DateUtils.setSeconds(date, 0);
        date = DateUtils.setMilliseconds(date, 0);
        return date;
    }
    /**
     * èŽ·å–å½“å‰æ—¶é—´ä¸‹ä¸€å¤©çš„é›¶ç‚¹é›¶åˆ†é›¶ç§’
     *
     * @param date
     * @return
     */
    public static Date getNextZero(Date date) {
        //TimeZone.setDefault(TimeZone.getTimeZone("GMT+8"));
        date = DateUtils.addDays(date, 1);
        date = DateUtils.setHours(date, 0);
        date = DateUtils.setMinutes(date, 0);
        date = DateUtils.setSeconds(date, 0);
        date = DateUtils.setMilliseconds(date, 0);
        return date;
    }
    /**
     * èŽ·å–å½“å‰æ—¥æœŸæ‰€åœ¨æœˆçš„ç¬¬ä¸€å¤©ï¼Œæ•°æ®ä¸ºï¼š:00:00:00
     *
     * @param date
     * @return
     */
    public static Date getMonthFirst(Date date) {
        if (null == date) date = new Date();
        date = DateUtils.setDays(date, 1);
        date = DateUtils.setHours(date, 0);
        date = DateUtils.setMinutes(date, 0);
        date = DateUtils.setSeconds(date, 0);
        date = DateUtils.setMilliseconds(date, 0);
        return date;
    }
    /**
     * èŽ·å–å½“å‰å¹´ç¬¬ä¸€å¤©
     *
     * @param date
     * @return
     */
    public static Date getYearFirst(Date date) {
        if (null == date) date = new Date();
        Calendar currCal = Calendar.getInstance();
        currCal.setTime(date);
        int currentYear = currCal.get(Calendar.YEAR);
        Calendar calendar = Calendar.getInstance();
        calendar.clear();
        calendar.set(Calendar.YEAR, currentYear);
        Date currYearFirst = calendar.getTime();
        return currYearFirst;
    }
    /**
     * èŽ·å–å½“å‰æ—¶é—´çš„ä¸‹ä¸ªæœˆ1号
     *
     * @param date
     * @return
     */
    public static Date getNextMonthFirst(Date date) {
        if (null == date) date = new Date();
        date = DateUtils.addMonths(date, 1);
        date = DateUtils.setDays(date, 1);
        date = DateUtils.setHours(date, 0);
        date = DateUtils.setMinutes(date, 0);
        date = DateUtils.setSeconds(date, 0);
        date = DateUtils.setMilliseconds(date, 0);
        return date;
    }
    /**
     * èŽ·å–å½“å‰æ—¶é—´çš„ä¸Šä¸ªæœˆ1号
     *
     * @param date
     * @return
     */
    public static Date getPreMonthFirst(Date date) {
        if (null == date) date = new Date();
        date = DateUtils.addMonths(date, -1);
        date = DateUtils.setDays(date, 1);
        date = DateUtils.setHours(date, 0);
        date = DateUtils.setMinutes(date, 0);
        date = DateUtils.setSeconds(date, 0);
        date = DateUtils.setMilliseconds(date, 0);
        return date;
    }
    /**
     * æ—¶é—´ï¼Œæ ¹æ®å¤©æ•° æ·»åŠ å‡ å¤©ï¼Œæˆ–è€…å‡åŽ»å‡ å¤©
     *
     * @param date å½“前时间
     * @param num  æ­£æ•°æˆ–者负数
     * @return
     */
    public static Date getNewByDay(Date date, int num) {
        if (null == date) date = new Date();
        date = DateUtils.addDays(date, num);
        date = DateUtils.setHours(date, 0);
        date = DateUtils.setMinutes(date, 0);
        date = DateUtils.setSeconds(date, 0);
        date = DateUtils.setMilliseconds(date, 0);
        return date;
    }
    /**
     * æ—¶é—´ï¼Œæ ¹æ®å¤©æ•° æ·»åŠ å‡ åˆ†é’Ÿï¼Œæˆ–è€…å‡åŽ»å‡ åˆ†
     *
     * @param date å½“前时间
     * @param num  æ­£æ•°æˆ–者负数
     * @return
     */
    public static Date getNewByMinute(Date date, int num) {
        if (null == date) date = new Date();
        date = DateUtils.addMinutes(date, num);
        return date;
    }
    /**
     * èŽ·å–æŸå¹´ç¬¬ä¸€å¤©æ—¥æœŸ
     *
     * @param year å¹´ä»½
     * @return Date
     */
    public static Date getCurrYearFirst(int year) {
        Calendar calendar = Calendar.getInstance();
        calendar.clear();
        calendar.set(Calendar.YEAR, year);
        Date currYearFirst = calendar.getTime();
        return currYearFirst;
    }
    /**
     * èŽ·å–æ¬¡å¹´ç¬¬ä¸€å¤© 0点
     *
     * @param year å¹´ä»½
     * @return Date
     */
    public static Date getNextYearFirst(int year) {
        Calendar calendar = Calendar.getInstance();
        calendar.clear();
        calendar.set(Calendar.YEAR, year);
        calendar.roll(Calendar.DAY_OF_YEAR, -1);
        Date currYearLast = calendar.getTime();
        currYearLast = DateUtils.addDays(currYearLast, 1);
        return currYearLast;
    }
    /**
     * è®¡ç®—æ—¶é—´1与时间2直接的分钟数,
     *
     * @param begin
     * @param end
     * @return
     */
    public static long difMin(Date begin, Date end) {
        long between = (end.getTime() - begin.getTime()) / 1000;//除以1000是为了转换成秒
        //long day1 = between / (24 * 3600);
        // long hour1 = between % (24 * 3600) / 3600;
        long minute1 = between % 3600 / 60;
        // long second1 = between % 60 / 60;
        return minute1;
    }
    /**
     * è®¡ç®—æ—¶é—´1与时间2直接的天数,
     *
     * @param begin
     * @param end
     * @return
     */
    public static long difDay(Date begin, Date end) {
        int days = (int) ((end.getTime() - begin.getTime()) / (1000 * 3600 * 24));
        return days;
    }
    /**
     * èŽ·å–å½“å‰æ—¶é—´çš„ å°æ—¶,时间从1-24
     *
     * @param date
     * @return
     */
    public static int getHour(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        return calendar.get(Calendar.HOUR_OF_DAY);
    }
    /**
     * èŽ·å–å½“å‰æ—¶é—´çš„ åˆ†é’Ÿ æ—¶é—´ä»Ž0 -59
     *
     * @param date
     * @return
     */
    public static int getMinute(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        return calendar.get(Calendar.MINUTE);
    }
    /**
     * èŽ·å–å½“å‰æ—¶é—´åˆ°ç¬¬äºŒå¤©å‡Œæ™¨çš„æ—¶é—´å·®ç§’æ•°
     *
     * @return
     */
    public static Long getNowToNextDaySeconds() {
        Calendar cal = Calendar.getInstance();
        cal.add(Calendar.DAY_OF_YEAR, 1);
        cal.set(Calendar.HOUR_OF_DAY, 0);
        cal.set(Calendar.SECOND, 0);
        cal.set(Calendar.MINUTE, 0);
        cal.set(Calendar.MILLISECOND, 0);
        return (cal.getTimeInMillis() - System.currentTimeMillis()) / 1000;
    }
    public static void main(String[] args) {
        System.out.println(getMinute(new Date()));
    }
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/utils/SystemUtil.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
package com.fzzy.igds.utils;
import javax.servlet.http.HttpServletRequest;
/**
 * @Description èŽ·å–å®¢æˆ·ç™»é™†ä¿¡æ¯
 * @Author CZT
 * @Date 2025/11/29 11:02
 */
public class SystemUtil {
    /***
     * èŽ·å–å®¢æˆ·ç«¯IP地址
     * @param request
     */
    public static String getIP(HttpServletRequest request) {
        if (request == null) {
            return "127.0.0.1";
        }
        String ip = request.getHeader("X-Real-IP");
        if (ip != null && !"".equals(ip) && !"unknown".equalsIgnoreCase(ip)) {
            return ip;
        }
        ip = request.getHeader("X-Forwarded-For");
        if (ip != null && !"".equals(ip) && !"unknown".equalsIgnoreCase(ip)) {
            // å¤šæ¬¡åå‘代理后会有多个IP值,第一个为真实IP。
            int index = ip.indexOf(',');
            if (index != -1) {
                return ip.substring(0, index);
            } else {
                return ip;
            }
        } else {
            return request.getRemoteAddr();
        }
    }
}
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticeIn.view.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,636 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dtMain">
      <Property name="creationType">com.fzzy.igds.domain.InoutNoticeIn</Property>
      <PropertyDef name="id">
        <Property></Property>
        <Property name="label">通知单号</Property>
      </PropertyDef>
      <PropertyDef name="companyId">
        <Property></Property>
        <Property name="label">组织编码</Property>
      </PropertyDef>
      <PropertyDef name="deptId">
        <Property></Property>
        <Property name="label">所属分库</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;deptPR#getAllData&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">kqmc</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="name">
        <Property></Property>
        <Property name="label">通知单名称</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="type">
        <Property></Property>
        <Property name="label">类型</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="name">库区自建</Property>
                <Property name="code">10</Property>
              </Entity>
              <Entity>
                <Property name="name">银行监管</Property>
                <Property name="code">20</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">code</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="contractId">
        <Property></Property>
        <Property name="label">质押合同</Property>
        <Property name="required">false</Property>
      </PropertyDef>
      <PropertyDef name="depotId">
        <Property></Property>
        <Property name="label">入库仓库</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getAllCache&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="customerName">
        <Property></Property>
        <Property name="label">发货客户</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="unitName">
        <Property></Property>
        <Property name="label">收货单位</Property>
        <Property name="required">false</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;deptPR#getAllData&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">kqmc</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="foodVariety">
        <Property></Property>
        <Property name="label">粮食品种</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;FOOD_VARIETY_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="year">
        <Property></Property>
        <Property name="label">年份</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="targetNumber">
        <Property name="dataType">Double</Property>
        <Property name="displayFormat">#0.0 KG</Property>
        <Property name="required">true</Property>
        <Property name="label">目标数量</Property>
      </PropertyDef>
      <PropertyDef name="completeNumber">
        <Property name="dataType">Double</Property>
        <Property name="label">完成数量</Property>
        <Property name="displayFormat">#0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="auditStatus">
        <Property></Property>
        <Property name="label">审核状态</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="name">监管审核</Property>
                <Property name="code">10</Property>
              </Entity>
              <Entity>
                <Property name="name">银行审核</Property>
                <Property name="code">20</Property>
              </Entity>
              <Entity>
                <Property name="name">已审核</Property>
                <Property name="code">30</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">code</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="auditUser">
        <Property></Property>
        <Property name="label">审核人</Property>
      </PropertyDef>
      <PropertyDef name="auditDate">
        <Property name="dataType">DateTime</Property>
        <Property name="label">审批时间</Property>
      </PropertyDef>
      <PropertyDef name="completeStatus">
        <Property></Property>
        <Property name="label">完成状态</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="name">未完成</Property>
                <Property name="code">NONE</Property>
              </Entity>
              <Entity>
                <Property name="name">已完成</Property>
                <Property name="code">COMPLETE</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">code</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="completeTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">完成时间</Property>
      </PropertyDef>
      <PropertyDef name="remark">
        <Property></Property>
        <Property name="label">备注信息</Property>
      </PropertyDef>
      <PropertyDef name="tag">
        <Property></Property>
        <Property name="label">标记</Property>
      </PropertyDef>
      <PropertyDef name="createTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">创建时间</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="createBy">
        <Property></Property>
        <Property name="label">创建人</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="updateTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">更新时间</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="updateBy">
        <Property></Property>
        <Property name="label">更新人</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtQuery">
      <PropertyDef name="depotId">
        <Property></Property>
        <Property name="label">装卸仓库</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getAllCache&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="customerName">
        <Property></Property>
        <Property name="label">发货客户</Property>
      </PropertyDef>
      <PropertyDef name="foodVariety">
        <Property></Property>
        <Property name="label">粮食品种</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;FOOD_VARIETY_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="completeStatus">
        <Property></Property>
        <Property name="label">完成状态</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="name">未完成</Property>
                <Property name="code">NONE</Property>
              </Entity>
              <Entity>
                <Property name="name">已完成</Property>
                <Property name="code">COMPLETE</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">code</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtQueryTitle">
      <PropertyDef name="title">
        <Property name="label">title</Property>
      </PropertyDef>
    </DataType>
  </Model>
  <View layout="padding:10">
    <ClientEvent name="onReady">var deptId = window.parent.deptId;//父页面中的分库编码&#xD;
var TYPE = &quot;NOTICE_IN&quot;;&#xD;
query = function(){&#xD;
    view.get(&quot;#dsQuery&quot;).set(&quot;parameter&quot;,{deptId:deptId}).flushAsync();&#xD;
};&#xD;
query();&#xD;
      &#xD;
queryTitle = function(){&#xD;
    view.get(&quot;#dsQueryTitle&quot;).set(&quot;parameter&quot;,{type:TYPE,deptId:deptId}).flushAsync();&#xD;
};&#xD;
queryTitle();&#xD;
      &#xD;
//新增&#xD;
add = function(){&#xD;
    view.get(&quot;#ajaxInitAdd&quot;).set(&quot;parameter&quot;, TYPE).execute(function(data){&#xD;
        view.get(&quot;#dsMain&quot;).insert(data);&#xD;
        view.get(&quot;#dialogMain&quot;).show();&#xD;
    });&#xD;
};</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="dataType">[dtMain]</Property>
      <Property name="dataProvider">inoutNoticePR#pageQueryIn</Property>
      <Property name="pageSize">15</Property>
      <Property name="loadMode">lazy</Property>
    </DataSet>
    <DataSet id="dsQuery">
      <Property name="dataType">dtQuery</Property>
      <Property name="dataProvider">inoutNoticePR#getYearQuery</Property>
      <Property name="loadMode">manual</Property>
    </DataSet>
    <DataSet id="dsQueryTitle">
      <Property name="dataType">dtQueryTitle</Property>
      <Property name="dataProvider">inoutNoticePR#getTitle</Property>
      <Property name="loadMode">manual</Property>
    </DataSet>
    <Container>
      <Property name="className">c-param</Property>
      <AutoForm>
        <Property name="cols">*,*,*,*,90,90</Property>
        <Property name="dataSet">dsQuery</Property>
        <Property name="labelAlign">right</Property>
        <Property name="labelWidth">100</Property>
        <AutoFormElement>
          <Property name="name">depotId</Property>
          <Property name="property">depotId</Property>
          <Editor/>
        </AutoFormElement>
        <AutoFormElement>
          <Property name="name">customerName</Property>
          <Property name="property">customerName</Property>
          <Editor/>
        </AutoFormElement>
        <AutoFormElement>
          <Property name="name">foodVariety</Property>
          <Property name="property">foodVariety</Property>
          <Editor/>
        </AutoFormElement>
        <AutoFormElement>
          <Property name="name">completeStatus</Property>
          <Property name="property">completeStatus</Property>
          <Editor/>
        </AutoFormElement>
        <Button>
          <ClientEvent name="onClick">var data = view.get(&quot;#dsQuery.data&quot;);&#xD;
            if(data){&#xD;
            view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,data.toJSON()).flushAsync();&#xD;
            }else{&#xD;
            view.get(&quot;#dsMain&quot;).flushAsync();&#xD;
            }</ClientEvent>
          <Property name="caption">搜索</Property>
          <Property name="iconClass">fa fa-search</Property>
          <Property name="exClassName">btn-q1</Property>>
        </Button>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#dsQuery&quot;).flushAsync();</ClientEvent>
          <Property name="caption">重置</Property>
          <Property name="exClassName">btn-q2</Property>
          <Property name="iconClass">fa fa-refresh</Property>
        </Button>
      </AutoForm>
    </Container>
    <Container>
      <Property name="className">c-data</Property>
      <ToolBar>
        <ToolBarButton layoutConstraint="left">
          <ClientEvent name="onClick">add();</ClientEvent>
          <Property name="caption">新增</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="width">100</Property>
          <Property name="iconClass">fa fa-plus</Property>
        </ToolBarButton>
        <ToolBarButton layoutConstraint="left">
          <ClientEvent name="onClick">&#xD;
            var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
            if(select){&#xD;
            view.get(&quot;#dialogMain&quot;).show();&#xD;
            }else{&#xD;
            $notify(&quot;请选择需要修改的数据……&quot;);&#xD;
            }</ClientEvent>
          <Property name="caption">修改</Property>
          <Property name="exClassName">btn2</Property>
          <Property name="width">100</Property>
          <Property name="iconClass">fa fa-pencil-square-o</Property>
        </ToolBarButton>
        <ToolBarButton layoutConstraint="left">
          <ClientEvent name="onClick">&#xD;
            var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
            if(select){&#xD;
            view.get(&quot;#ajaxDel&quot;).set(&quot;parameter&quot;,select).execute(function(result){&#xD;
            select.remove();&#xD;
            });&#xD;
            }else{&#xD;
            $notify(&quot;请选择需要删除的仓库……&quot;);&#xD;
            }</ClientEvent>
          <Property name="caption">删除</Property>
          <Property name="exClassName">btn3</Property>
          <Property name="width">100</Property>
          <Property name="iconClass">fa fa-times</Property>
        </ToolBarButton>
        <ToolBarButton layoutConstraint="left">
          <ClientEvent name="onClick">view.get(&quot;#recalculate&quot;).execute(function(result){&#xD;
            if(result == 'success'){&#xD;
            $notify(&quot;数据更新完成!!&quot;);&#xD;
            &#xD;
            var data = view.get(&quot;#dsQuery.data&quot;);&#xD;
            view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,data.toJSON()).flushAsync();&#xD;
            }else{&#xD;
            $notify(&quot;数据更新失败!!&quot;);&#xD;
            }&#xD;
            });</ClientEvent>
          <Property name="caption">实时核算</Property>
          <Property name="exClassName">btn4</Property>
          <Property name="iconClass">fa fa-refresh</Property>
          <Property name="width">100</Property>
          <Property name="tip">完成量默认统计到昨天,查看实时完成量请点击“实时核算”按钮</Property>
        </ToolBarButton>
      </ToolBar>
      <DataGrid id="dataGridMain" layoutConstraint="padding:8">
        <ClientEvent name="onDataRowClick">view.get(&quot;#dataGridCamera&quot;).set(&quot;selection&quot;,arg.data);</ClientEvent>
        <Property name="dataSet">dsMain</Property>
        <Property name="readOnly">true</Property>
        <Property name="selectionMode">singleRow</Property>
        <Property name="readOnly">true</Property>
        <RowSelectorColumn/>
        <RowNumColumn>
          <Property name="width">50</Property>
          <Property name="caption">序号</Property>
        </RowNumColumn>
        <DataColumn name="id">
          <Property name="property">id</Property>
          <Property name="width">200</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="name">
          <Property name="property">name</Property>
          <Property name="align">center</Property>
          <Property name="width">120</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">customerName</Property>
          <Property name="name">customerName</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="depotId">
          <Property name="property">depotId</Property>
          <Property name="align">center</Property>
          <Property name="width">150</Property>
        </DataColumn>
        <DataColumn name="foodVariety">
          <Property name="property">foodVariety</Property>
          <Property name="align">center</Property>
          <Property name="width">150</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">targetNumber</Property>
          <Property name="name">targetNumber</Property>
          <Property name="align">center</Property>
          <Property name="width">200</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">completeStatus</Property>
          <Property name="name">completeStatus</Property>
          <Property name="align">center</Property>
          <Property name="width">100</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">createTime</Property>
          <Property name="align">center</Property>
          <Property name="name">createTime</Property>
          <Property name="width">160</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">updateBy</Property>
          <Property name="align">center</Property>
          <Property name="name">updateBy</Property>
          <Property name="width">120</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">updateTime</Property>
          <Property name="align">center</Property>
          <Property name="name">updateTime</Property>
          <Property name="width">160</Property>
        </DataColumn>
      </DataGrid>
    </Container>
    <Container layoutConstraint="bottom">
      <Property name="className">c-bottom</Property>
      <DataPilot layoutConstraint="right">
        <Property name="itemCodes">pageSize,pages</Property>
        <Property name="dataSet">dsMain</Property>
      </DataPilot>
    </Container>
    <Dialog id="dialogMain" layout="regionPadding:8">
      <Property name="closeable">false</Property>
      <Property name="caption">入库通知单</Property>
      <Property name="width">60%</Property>
      <Property name="iconClass">fa fa-tasks</Property>
      <Buttons>
        <Button id="btnOk">
          <ClientEvent name="onClick">var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
            if(data.validate() != 'ok'){&#xD;
            $notify(&quot;数据校验失败!!&quot;);&#xD;
            return;&#xD;
            }&#xD;
            view.get(&quot;#ajaxSave&quot;).set(&quot;parameter&quot;,data).execute(function(result){&#xD;
            if(result){&#xD;
            $alert(result);&#xD;
            return;&#xD;
            }&#xD;
            $notify(&quot;数据执行完成!!&quot;);&#xD;
            self.get(&quot;parent&quot;).hide();&#xD;
            });</ClientEvent>
          <Property name="caption">保存</Property>
          <Property name="iconClass">fa fa-check-circle</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="width">120</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#dsMain.data:#&quot;).cancel();&#xD;
            self.get(&quot;parent&quot;).hide();</ClientEvent>
          <Property name="caption">取消</Property>
          <Property name="exClassName">btn3</Property>
          <Property name="iconClass">fa fa-times-circle</Property>
          <Property name="width">120</Property>
        </Button>
      </Buttons>
      <Children>
        <Container>
          <AutoForm id="autoForm1" layoutConstraint="top padding:10">
            <Property name="cols">*,*,*,*,*,*,*</Property>
            <Property name="dataSet">dsQueryTitle</Property>
            <Property name="labelAlign">right</Property>
            <Property name="showHint">false</Property>
            <AutoFormElement layoutConstraint="colSpan:7">
              <Property name="name">title</Property>
              <Property name="property">title</Property>
              <Property name="showLabel">false</Property>
              <Property name="editorType">Label</Property>
              <Property name="style">
                <Property name="font">bold 30px Georgia, serif;</Property>
                <Property name="text-align">center</Property>
              </Property>
              <Editor/>
            </AutoFormElement>
          </AutoForm>
          <Container layout="padding:15">
            <AutoForm>
              <Property name="dataSet">dsMain</Property>
              <Property name="cols">*,*,*</Property>
              <Property name="labelAlign">right</Property>
              <Property name="labelSeparator">:</Property>
              <Property name="labelWidth">120</Property>
              <AutoFormElement>
                <Property name="name">name</Property>
                <Property name="property">name</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">depotId</Property>
                <Property name="property">depotId</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">id</Property>
                <Property name="property">id</Property>
                <Property name="readOnly">true</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">foodVariety</Property>
                <Property name="property">foodVariety</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">customerName</Property>
                <Property name="property">customerName</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">unitName</Property>
                <Property name="property">unitName</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">year</Property>
                <Property name="property">year</Property>
                <Property name="trigger">defaultYearDropDown</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">targetNumber</Property>
                <Property name="property">targetNumber</Property>
                <Property name="readOnly">false</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">completeNumber</Property>
                <Property name="property">completeNumber</Property>
                <Property name="readOnly">false</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">type</Property>
                <Property name="property">type</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">completeStatus</Property>
                <Property name="property">completeStatus</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">completeTime</Property>
                <Property name="property">completeTime</Property>
                <Property name="readOnly">false</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">contractId</Property>
                <Property name="property">contractId</Property>
                <Editor/>
              </AutoFormElement>
              <Label layoutConstraint="colSpan:2">
                <Property name="style">
                  <Property name="color">blue</Property>
                </Property>
                <Property name="text">注:类型为银行监管时,需关联质押合同</Property>
              </Label>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">remark</Property>
                <Property name="property">remark</Property>
                <Property name="editorType">TextArea</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">createBy</Property>
                <Property name="property">createBy</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">createTime</Property>
                <Property name="property">createTime</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">updateBy</Property>
                <Property name="property">updateBy</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">updateTime</Property>
                <Property name="property">updateTime</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Container>
        </Container>
      </Children>
      <Tools/>
    </Dialog>
    <AjaxAction id="ajaxSave">
      <Property name="service">inoutNoticePR#saveIn</Property>
    </AjaxAction>
    <AjaxAction id="ajaxDel">
      <Property name="service">inoutNoticePR#delDataIn</Property>
      <Property name="confirmMessage">确定要执行删除么?</Property>
    </AjaxAction>
    <AjaxAction id="ajaxInitAdd">
      <Property name="service">inoutNoticePR#initAddIn</Property>
    </AjaxAction>
    <AjaxAction id="recalculate">
      <Property name="service">inoutNoticePR#updateSumNoticeIn</Property>
    </AjaxAction>
  </View>
</ViewConfig>
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticeOut.view.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,1122 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dtMain">
      <ClientEvent name="onDataChange">if(arg.property ==&quot;depotId&quot;){&#xD;
    autoByDepot(arg.newValue);&#xD;
}</ClientEvent>
      <Property name="creationType">com.fzzy.igds.models.InoutNoticeOut</Property>
      <PropertyDef name="id">
        <Property></Property>
        <Property name="label">通知单号</Property>
      </PropertyDef>
      <PropertyDef name="companyId">
        <Property></Property>
        <Property name="label">组织编码</Property>
      </PropertyDef>
      <PropertyDef name="deptId">
        <Property></Property>
        <Property name="label">所属分库</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;deptPR#loadParents&quot;).getResult()}</Property>
          <Property name="keyProperty">deptId</Property>
          <Property name="valueProperty">deptName</Property>
        </Property>
        <Property name="required">false</Property>
      </PropertyDef>
      <PropertyDef name="planId">
        <Property></Property>
        <Property name="label">所属计划</Property>
        <Property name="required">false</Property>
      </PropertyDef>
      <PropertyDef name="planName">
        <Property></Property>
        <Property name="label">所属计划</Property>
        <Property name="required">false</Property>
      </PropertyDef>
      <PropertyDef name="contractId">
        <Property></Property>
        <Property name="label">所属合同</Property>
        <Property name="required">false</Property>
      </PropertyDef>
      <PropertyDef name="contractName">
        <Property></Property>
        <Property name="label">所属合同</Property>
        <Property name="required">false</Property>
      </PropertyDef>
      <PropertyDef name="name">
        <Property></Property>
        <Property name="label">通知单名称</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="depotId">
        <Property></Property>
        <Property name="label">出库仓库</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getAllCache&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">name</Property>
        </Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="customerId">
        <Property></Property>
        <Property name="label">收货客户</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="customerName">
        <Property></Property>
        <Property name="label">收货客户</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="unitName">
        <Property></Property>
        <Property name="label">发货单位</Property>
        <Property name="required">false</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;deptPR#loadParents&quot;).getResult()}</Property>
          <Property name="keyProperty">deptId</Property>
          <Property name="valueProperty">deptName</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="foodVariety">
        <Property></Property>
        <Property name="label">粮食品种</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;FOOD_VARIETY_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="year">
        <Property></Property>
        <Property name="label">粮食年份</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="targetNumber">
        <Property name="dataType">double</Property>
        <Property name="displayFormat">#,## kG</Property>
        <Property name="required">true</Property>
        <Property name="label">计划数量</Property>
      </PropertyDef>
      <PropertyDef name="completeNumber">
        <Property name="dataType">double</Property>
        <Property name="label">完成数量</Property>
        <Property name="displayFormat">#,## kG</Property>
      </PropertyDef>
      <PropertyDef name="auditStatus">
        <Property></Property>
        <Property name="label">审核状态</Property>
      </PropertyDef>
      <PropertyDef name="auditUser">
        <Property></Property>
        <Property name="label">审核人</Property>
      </PropertyDef>
      <PropertyDef name="completeStatus">
        <Property></Property>
        <Property name="label">完成状态</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="name">未完成</Property>
                <Property name="code">NONE</Property>
              </Entity>
              <Entity>
                <Property name="name">已完成</Property>
                <Property name="code">COMPLETE</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">code</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="createTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">创建时间</Property>
      </PropertyDef>
      <PropertyDef name="createUser">
        <Property></Property>
        <Property name="label">创建人</Property>
      </PropertyDef>
      <PropertyDef name="completeTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">完成时间</Property>
      </PropertyDef>
      <PropertyDef name="remark">
        <Property></Property>
        <Property name="label">备注信息</Property>
      </PropertyDef>
      <PropertyDef name="tag">
        <Property></Property>
        <Property name="label">标记</Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtQuery">
      <PropertyDef name="id">
        <Property></Property>
        <Property name="label">通知单号</Property>
      </PropertyDef>
      <PropertyDef name="deptId">
        <Property></Property>
        <Property name="label">发货单位</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;deptPR#loadParents&quot;).getResult()}</Property>
          <Property name="keyProperty">deptId</Property>
          <Property name="valueProperty">deptName</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="foodVariety">
        <Property></Property>
        <Property name="label">粮食品种</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;FOOD_VARIETY_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="year">
        <Property></Property>
        <Property name="label">年份</Property>
      </PropertyDef>
      <PropertyDef name="completeStatus">
        <Property></Property>
        <Property name="label">完成状态</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="name">未完成</Property>
                <Property name="code">NONE</Property>
              </Entity>
              <Entity>
                <Property name="name">已完成</Property>
                <Property name="code">COMPLETE</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">code</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="depotId">
        <Property></Property>
        <Property name="label">出库仓库</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getAllCache&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">name</Property>
        </Property>
        <Property name="required">true</Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtQueryTitle">
      <PropertyDef name="title">
        <Property name="label">title</Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtPlan">
      <Property name="creationType">com.fzzy.igds.models.InoutPlanDetail</Property>
      <PropertyDef name="id">
        <Property></Property>
        <Property name="label">计划明细号</Property>
      </PropertyDef>
      <PropertyDef name="planId">
        <Property name="label">计划编码</Property>
      </PropertyDef>
      <PropertyDef name="foodVariety">
        <Property></Property>
        <Property name="label">粮食品种</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;FOOD_VARIETY_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="foodType">
        <Property></Property>
        <Property name="label">粮食性质</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;FOOD_TYPE_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="foodLevel">
        <Property></Property>
        <Property name="label">粮食等级</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerFoodLevel&quot;).getResult()}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="year">
        <Property></Property>
        <Property name="label">收获年度</Property>
      </PropertyDef>
      <PropertyDef name="depotId">
        <Property></Property>
        <Property name="label">仓库</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getAllCache&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="planNum">
        <Property name="dataType">Double</Property>
        <Property name="label">计划数量</Property>
      </PropertyDef>
      <PropertyDef name="type">
        <Property name="label">计划类型</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerPlanType&quot;).getResult()}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="updateTime">
        <Property></Property>
        <Property name="label">更新时间</Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtContract">
      <Property name="creationType">com.fzzy.igds.models.InoutContract</Property>
      <PropertyDef name="id">
        <Property></Property>
        <Property name="label">ID_</Property>
      </PropertyDef>
      <PropertyDef name="companyId">
        <Property></Property>
        <Property name="label">组织编码</Property>
      </PropertyDef>
      <PropertyDef name="deptId">
        <Property></Property>
        <Property name="label">所属库区</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;deptPR#loadParents&quot;).getResult()}</Property>
          <Property name="keyProperty">deptId</Property>
          <Property name="valueProperty">deptName</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="planId">
        <Property></Property>
        <Property name="label">所属计划</Property>
      </PropertyDef>
      <PropertyDef name="planName">
        <Property></Property>
        <Property name="label">所属计划</Property>
      </PropertyDef>
      <PropertyDef name="type">
        <Property></Property>
        <Property name="label">合同类型</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerContractType&quot;).getResult()}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="name">
        <Property></Property>
        <Property name="label">合同名称</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="year">
        <Property></Property>
        <Property name="label">年份</Property>
      </PropertyDef>
      <PropertyDef name="customerId">
        <Property></Property>
        <Property name="label">客户编码</Property>
      </PropertyDef>
      <PropertyDef name="customerName">
        <Property></Property>
        <Property name="label">客户名称</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="customerType">
        <Property></Property>
        <Property name="label">客户类型</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="code">1</Property>
                <Property name="name">1-企业</Property>
              </Entity>
              <Entity>
                <Property name="code">2</Property>
                <Property name="name">2-个人</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">code</Property>
          <Property name="valueProperty">name</Property>
        </Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="customerBank">
        <Property></Property>
        <Property name="label">客户开户行</Property>
      </PropertyDef>
      <PropertyDef name="customerBankAccount">
        <Property></Property>
        <Property name="label">客户开户行账号</Property>
      </PropertyDef>
      <PropertyDef name="customerSignUser">
        <Property></Property>
        <Property name="label">客户签约人</Property>
      </PropertyDef>
      <PropertyDef name="bank">
        <Property></Property>
        <Property name="label">本方开户行</Property>
      </PropertyDef>
      <PropertyDef name="bankAccount">
        <Property></Property>
        <Property name="label">本方开户行账号</Property>
      </PropertyDef>
      <PropertyDef name="signUser">
        <Property></Property>
        <Property name="label">本方签约人</Property>
      </PropertyDef>
      <PropertyDef name="signAddress">
        <Property></Property>
        <Property name="label">签约地址</Property>
      </PropertyDef>
      <PropertyDef name="price">
        <Property name="dataType">Double</Property>
        <Property name="label">单价</Property>
        <Property name="displayFormat">#,###0.000 å…ƒ/公斤</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="money">
        <Property name="dataType">Double</Property>
        <Property name="label">总金额</Property>
        <Property name="displayFormat">#,###0.000 å…ƒ</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="contactAmount">
        <Property name="dataType">Double</Property>
        <Property name="label">合同数量</Property>
        <Property name="displayFormat">#,##0.00 KG</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="completeNum">
        <Property name="dataType">Double</Property>
        <Property name="label">合同完成数量</Property>
        <Property name="displayFormat">#,##0.00 KG</Property>
      </PropertyDef>
      <PropertyDef name="foodVariety">
        <Property></Property>
        <Property name="label">粮食品种</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;FOOD_VARIETY_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="foodType">
        <Property></Property>
        <Property name="label">粮食性质</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;FOOD_TYPE_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="payType">
        <Property></Property>
        <Property name="label">支付方式</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;PAY_TYPE&quot;)}</Property>
          <Property name="valueProperty">dictLabel</Property>
          <Property name="keyProperty">dictValue</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="createUser">
        <Property></Property>
        <Property name="label">创建人</Property>
      </PropertyDef>
      <PropertyDef name="createTime">
        <Property name="dataType">Date</Property>
        <Property name="label">创建时间</Property>
      </PropertyDef>
      <PropertyDef name="signingTime">
        <Property name="dataType">Date</Property>
        <Property name="label">签订时间</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="beginTime">
        <Property name="dataType">Date</Property>
        <Property name="label">有效开始时间</Property>
      </PropertyDef>
      <PropertyDef name="endTime">
        <Property name="dataType">Date</Property>
        <Property name="label">有效截止时间</Property>
      </PropertyDef>
      <PropertyDef name="remark">
        <Property></Property>
        <Property name="label">备注说明</Property>
      </PropertyDef>
    </DataType>
  </Model>
  <View layout="padding:5;regionPadding:5">
    <ClientEvent name="onReady">var deptId = window.parent.deptId;//父页面中的分库编码&#xD;
var TYPE = &quot;NOTICE_OUT&quot;;&#xD;
query = function(){&#xD;
    view.get(&quot;#dsQuery&quot;).set(&quot;parameter&quot;,{deptId:deptId}).flushAsync();&#xD;
};&#xD;
query();&#xD;
      &#xD;
queryTitle = function(){&#xD;
    view.get(&quot;#dsQueryTitle&quot;).set(&quot;parameter&quot;,{type:TYPE,deptId:deptId}).flushAsync();&#xD;
};&#xD;
queryTitle();&#xD;
      &#xD;
//新增&#xD;
add = function(){&#xD;
    view.get(&quot;#ajaxInitAdd&quot;).set(&quot;parameter&quot;, TYPE).execute(function(data){&#xD;
        view.get(&quot;#dsMain&quot;).insert(data);&#xD;
        view.get(&quot;#dialogMain&quot;).show();&#xD;
    });&#xD;
};&#xD;
&#xD;
//根据仓库自动回填粮食品种,等级,产地新&#xD;
autoByDepot = function(depotId){&#xD;
    view.get(&quot;#ajaxGetDepot&quot;).set(&quot;parameter&quot;,depotId).execute(function(result){&#xD;
        if(result){&#xD;
            var data = view.get(&quot;#dataGridMain.currentEntity&quot;);&#xD;
            data.set(&quot;foodVariety&quot;,result.foodVariety);&#xD;
            &#xD;
        }&#xD;
    });&#xD;
};</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="dataType">[dtMain]</Property>
      <Property name="dataProvider">inoutNoticePR#pageQueryOut</Property>
      <Property name="pageSize">15</Property>
      <Property name="loadMode">lazy</Property>
    </DataSet>
    <DataSet id="dsQueryTitle">
      <Property name="dataType">dtQueryTitle</Property>
      <Property name="dataProvider">inoutNoticePR#getTitle</Property>
      <Property name="loadMode">manual</Property>
    </DataSet>
    <DataSet id="dsQuery">
      <Property name="dataType">dtQuery</Property>
      <Property name="dataProvider">inoutNoticePR#getYearQuery</Property>
      <Property name="loadMode">manual</Property>
    </DataSet>
    <AutoForm layoutConstraint="top">
      <Property name="cols">*,*,*,*</Property>
      <Property name="dataSet">dsQuery</Property>
      <Property name="exClassName">bg-color</Property>
      <AutoFormElement>
        <Property name="name">foodVariety</Property>
        <Property name="property">foodVariety</Property>
        <Property name="editable">false</Property>
        <Editor/>
      </AutoFormElement>
      <AutoFormElement>
        <Property name="name">year</Property>
        <Property name="property">year</Property>
        <Property name="trigger">defaultYearDropDown</Property>
        <Property name="editable">false</Property>
        <Editor/>
      </AutoFormElement>
      <AutoFormElement>
        <Property name="name">completeStatus</Property>
        <Property name="property">completeStatus</Property>
        <Property name="editable">false</Property>
        <Editor/>
      </AutoFormElement>
      <Container layout="hbox regionPadding:15">
        <Button>
          <ClientEvent name="onClick">var data = view.get(&quot;#dsQuery.data&quot;);&#xD;
            if(data){&#xD;
            view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,data.toJSON()).flushAsync();&#xD;
            }else{&#xD;
            view.get(&quot;#dsMain&quot;).flushAsync();&#xD;
            }</ClientEvent>
          <Property name="caption">查询</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="iconClass">fa fa-search</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#dsQuery&quot;).flushAsync();</ClientEvent>
          <Property name="exClassName">btn2</Property>
          <Property name="iconClass">fa fa-refresh</Property>
          <Property name="caption">重置</Property>
        </Button>
      </Container>
      <Container layout="regionPadding:10" layoutConstraint="type:top;colSpan:2">
        <Property name="exClassName">bg-color</Property>
        <Property name="contentOverflow">hidden</Property>
        <Property name="height">55</Property>
        <Label layoutConstraint="left">
          <Property name="text">菜单栏:</Property>
        </Label>
        <Button layoutConstraint="left">
          <ClientEvent name="onClick">add();&#xD;
          //view.get(&quot;#dsMain&quot;).insert({&#xD;
          //          name:&quot;出库通知单&quot;&#xD;
          //          });&#xD;
          //         view.get(&quot;#dialogMain&quot;).show();</ClientEvent>
          <Property name="caption">新增</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="iconClass">fa fa-plus</Property>
        </Button>
        <Button layoutConstraint="left">
          <ClientEvent name="onClick">&#xD;
var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#dialogMain&quot;).show();&#xD;
}else{&#xD;
    $notify(&quot;请选择需要修改的数据……&quot;);&#xD;
}</ClientEvent>
          <Property name="caption">编辑</Property>
          <Property name="exClassName">btn2</Property>
          <Property name="iconClass">fa fa-pencil</Property>
        </Button>
        <Button layoutConstraint="left">
          <ClientEvent name="onClick">&#xD;
var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#ajaxDel&quot;).set(&quot;parameter&quot;,select).execute(function(result){&#xD;
        select.remove();&#xD;
    });&#xD;
}else{&#xD;
    $notify(&quot;请选择需要删除的仓库……&quot;);&#xD;
}&#xD;
        </ClientEvent>
          <Property name="caption">删除</Property>
          <Property name="exClassName">btn3</Property>
          <Property name="iconClass">fa fa-minus</Property>
        </Button>
        <Button layoutConstraint="left">
          <ClientEvent name="onClick">var data = view.get(&quot;#dsQuery.data&quot;);&#xD;
var page = view.get(&quot;#dsMain&quot;);&#xD;
var param = {&#xD;
    &quot;pageSize&quot;:page.get(&quot;pageSize&quot;),&#xD;
    &quot;pageNo&quot;:page.get(&quot;pageNo&quot;),&#xD;
    &quot;foodVariety&quot;:data.get(&quot;foodVariety&quot;),&#xD;
    &quot;year&quot;:data.get(&quot;year&quot;),&#xD;
    &quot;completeStatus&quot;:data.get(&quot;completeStatus&quot;)&#xD;
}&#xD;
console.log(param);&#xD;
window.parent.$.table.exportExcelDorado(&quot;./export/noticeOut-excel&quot;, &quot;出库通知单数据&quot;, param);</ClientEvent>
          <Property name="caption">导出EXCEL</Property>
          <Property name="exClassName">btn4</Property>
          <Property name="iconClass">fa fa-file-excel-o</Property>
          <Property name="action">exportExcel</Property>
        </Button>
        <Button layoutConstraint="left">
          <ClientEvent name="onClick">view.get(&quot;#recalculate&quot;).execute(function(result){&#xD;
    if(result == 'success'){&#xD;
        $notify(&quot;数据更新完成!!&quot;);&#xD;
        &#xD;
        var data = view.get(&quot;#dsQuery.data&quot;);&#xD;
        view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,data.toJSON()).flushAsync();&#xD;
    }else{&#xD;
        $notify(&quot;数据更新失败!!&quot;);&#xD;
    }&#xD;
});</ClientEvent>
          <Property name="caption">实时核算</Property>
          <Property name="exClassName">btn2</Property>
          <Property name="iconClass">fa fa-refresh</Property>
          <Property name="tip">完成量默认统计到昨天,查看实时完成量请点击“实时核算”按钮</Property>
        </Button>
      </Container>
    </AutoForm>
    <Container layoutConstraint="center">
      <Property name="exClassName">bg-color</Property>
      <DataGrid id="dataGridMain" layoutConstraint="center">
        <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
          if(data){&#xD;
          view.get(&quot;#dialogMain&quot;).show();&#xD;
          }</ClientEvent>
        <Property name="dataSet">dsMain</Property>
        <Property name="readOnly">true</Property>
        <Property name="selectionMode">singleRow</Property>
        <RowSelectorColumn/>
        <RowNumColumn>
          <Property name="width">50</Property>
          <Property name="caption">序号</Property>
        </RowNumColumn>
        <DataColumn name="id">
          <Property name="property">id</Property>
          <Property name="width">200</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="name">
          <Property name="property">name</Property>
          <Property name="align">center</Property>
          <Property name="width">120</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">customerName</Property>
          <Property name="name">customerName</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">depotId</Property>
          <Property name="name">depotId</Property>
          <Property name="align">center</Property>
          <Property name="width">100</Property>
        </DataColumn>
        <DataColumn name="foodVariety">
          <Property name="property">foodVariety</Property>
          <Property name="align">center</Property>
          <Property name="width">150</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">targetNumber</Property>
          <Property name="name">targetNumber</Property>
          <Property name="align">center</Property>
          <Property name="width">200</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">completeNumber</Property>
          <Property name="align">center</Property>
          <Property name="name">completeNumber</Property>
          <Property name="width">200</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">completeStatus</Property>
          <Property name="name">completeStatus</Property>
          <Property name="align">center</Property>
          <Property name="width">100</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">createTime</Property>
          <Property name="align">center</Property>
          <Property name="name">createTime</Property>
          <Property name="width">200</Property>
        </DataColumn>
      </DataGrid>
    </Container>
    <Container layoutConstraint="bottom">
      <Property name="exClassName">bg-color</Property>
      <DataPilot layoutConstraint="right">
        <Property name="itemCodes">pageSize,pages</Property>
        <Property name="dataSet">dsMain</Property>
      </DataPilot>
    </Container>
    <Dialog id="dialogMain">
      <Property name="closeable">false</Property>
      <Property name="caption">出库单</Property>
      <Property name="width">60%</Property>
      <Property name="iconClass">fa fa-tasks</Property>
      <Buttons>
        <Button id="btnOk">
          <ClientEvent name="onClick">var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
            if(data.validate() != 'ok'){&#xD;
            $notify(&quot;数据校验失败!!&quot;);&#xD;
            return;&#xD;
            }&#xD;
            view.get(&quot;#ajaxSave&quot;).set(&quot;parameter&quot;,data).execute(function(result){&#xD;
            if(result){&#xD;
            $alert(result);&#xD;
            return;&#xD;
            }&#xD;
            $notify(&quot;数据执行完成!!&quot;);&#xD;
            self.get(&quot;parent&quot;).hide();&#xD;
            });</ClientEvent>
          <Property name="caption">确定</Property>
          <Property name="iconClass">fa fa-check</Property>
          <Property name="exClassName">btn1</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#dsMain.data:#&quot;).cancel();&#xD;
            self.get(&quot;parent&quot;).hide();</ClientEvent>
          <Property name="caption">取消</Property>
          <Property name="iconClass">fa fa-times</Property>
          <Property name="exClassName">btn3</Property>
        </Button>
      </Buttons>
      <Children>
        <Container>
          <AutoForm id="autoForm1" layoutConstraint="top padding:10">
            <Property name="cols">*,*,*,*,*,*,*</Property>
            <Property name="dataSet">dsQueryTitle</Property>
            <Property name="labelAlign">right</Property>
            <Property name="showHint">false</Property>
            <AutoFormElement layoutConstraint="colSpan:7">
              <Property name="name">title</Property>
              <Property name="property">title</Property>
              <Property name="showLabel">false</Property>
              <Property name="editorType">Label</Property>
              <Property name="style">
                <Property name="font">bold 30px Georgia, serif;</Property>
                <Property name="text-align">center</Property>
              </Property>
              <Editor/>
            </AutoFormElement>
          </AutoForm>
          <Container layout="padding:15">
            <AutoForm>
              <Property name="dataSet">dsMain</Property>
              <Property name="cols">*,*</Property>
              <Property name="labelAlign">right</Property>
              <Property name="labelSeparator">:</Property>
              <Property name="labelWidth">120</Property>
              <AutoFormElement>
                <Property name="name">name</Property>
                <Property name="property">name</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">id</Property>
                <Property name="property">id</Property>
                <Property name="readOnly">true</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">customerName</Property>
                <Property name="property">customerName</Property>
                <Property name="trigger">ddCustomer</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">unitName</Property>
                <Property name="property">unitName</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">depotId</Property>
                <Property name="property">depotId</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">foodVariety</Property>
                <Property name="property">foodVariety</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">year</Property>
                <Property name="property">year</Property>
                <Property name="trigger">defaultYearDropDown</Property>
                <Editor/>
              </AutoFormElement>
              <Label layoutConstraint="colSpan:1"/>
              <AutoFormElement>
                <Property name="name">targetNumber</Property>
                <Property name="property">targetNumber</Property>
                <Property name="readOnly">false</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">completeNumber</Property>
                <Property name="property">completeNumber</Property>
                <Property name="readOnly">false</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">planName</Property>
                <Property name="property">planName</Property>
                <Property name="trigger">ddPlan</Property>
                <Editor/>
              </AutoFormElement>
              <Label layoutConstraint="colSpan:1">
                <Property name="style">
                  <Property name="color">blue</Property>
                </Property>
                <Property name="text">注:当前通知单关联的库区计划</Property>
              </Label>
              <AutoFormElement>
                <Property name="name">contractName</Property>
                <Property name="property">contractName</Property>
                <Property name="trigger">ddContract</Property>
                <Editor/>
              </AutoFormElement>
              <Label layoutConstraint="colSpan:1">
                <Property name="style">
                  <Property name="color">blue</Property>
                </Property>
                <Property name="text">注:当前通知单关联的销售合同</Property>
              </Label>
              <AutoFormElement>
                <Property name="name">createTime</Property>
                <Property name="property">createTime</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">completeTime</Property>
                <Property name="property">completeTime</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">completeStatus</Property>
                <Property name="property">completeStatus</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">remark</Property>
                <Property name="property">remark</Property>
                <Property name="editorType">TextArea</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Container>
        </Container>
      </Children>
      <Tools/>
    </Dialog>
    <AjaxAction id="ajaxGetDepot">
      <Property name="service">depotPR#getDepot</Property>
    </AjaxAction>
    <AjaxAction id="ajaxSave">
      <Property name="service">inoutNoticePR#saveOut</Property>
    </AjaxAction>
    <AjaxAction id="ajaxDel">
      <Property name="service">inoutNoticePR#delDataOut</Property>
      <Property name="confirmMessage">确定要执行删除么?</Property>
    </AjaxAction>
    <AjaxAction id="ajaxInitAdd">
      <Property name="service">inoutNoticePR#initAddOut</Property>
    </AjaxAction>
    <CustomDropDown id="ddCustomer">
      <Property name="minHeight">400</Property>
      <Property name="assignmentMap">customerId=id,customerName=name</Property>
      <Property name="minWidth">500</Property>
      <Property name="autoOpen">true</Property>
      <Container layout="regionPadding:5">
        <DataSet id="dsCustomer">
          <Property name="dataProvider">inoutCustomerPR#queryListByKey</Property>
          <Property name="dataType">[dtInoutCustomer]</Property>
          <Property name="parameter">
            <Entity>
              <Property name="type">OUT</Property>
            </Entity>
          </Property>
        </DataSet>
        <Container layout="hbox regionPadding:5">
          <TextEditor id="key">
            <Property name="blankText"> -- ç¼–码或者名称 --</Property>
            <Property name="width">200</Property>
          </TextEditor>
          <Button>
            <ClientEvent name="onClick">var key = view.get(&quot;#key.value&quot;);&#xD;
var type = &quot;${request.getParameter('type')}&quot;;&#xD;
view.get(&quot;#dsCustomer&quot;).set(&quot;parameter&quot;,{key:key,type:type}).flushAsync();</ClientEvent>
            <Property name="caption">查询</Property>
            <Property name="iconClass">fa fa-search</Property>
          </Button>
          <Button>
            <ClientEvent name="onClick">var data = view.get(&quot;#dsCustomer.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#ddCustomer&quot;).close(data.toJSON());&#xD;
}</ClientEvent>
            <Property name="iconClass">fa fa-check</Property>
            <Property name="caption">确定</Property>
          </Button>
        </Container>
        <DataGrid>
          <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsCustomer.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#ddCustomer&quot;).close(data.toJSON());&#xD;
}</ClientEvent>
          <Property name="dataSet">dsCustomer</Property>
          <Property name="readOnly">true</Property>
          <DataColumn name="id">
            <Property name="property">id</Property>
            <Property name="width">100</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="name">
            <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
arg.processDefault = true;</ClientEvent>
            <Property name="property">name</Property>
            <Property name="align">center</Property>
          </DataColumn>
        </DataGrid>
      </Container>
    </CustomDropDown>
    <AjaxAction id="recalculate">
      <Property name="service">inoutNoticePR#updateSumNoticeOut</Property>
    </AjaxAction>
    <CustomDropDown id="ddPlan">
      <Property name="minHeight">325</Property>
      <Property name="assignmentMap">planId=id,planName=planId</Property>
      <Property name="minWidth">900</Property>
      <Property name="autoOpen">false</Property>
      <Container layout="regionPadding:5">
        <DataSet id="dsPlan">
          <Property name="dataProvider">planManagePR#pagePlanDetail</Property>
          <Property name="dataType">[dtPlan]</Property>
          <Property name="parameter"></Property>
          <Property name="pageSize">5</Property>
        </DataSet>
        <AutoForm layoutConstraint="top">
          <Property name="cols">*,*,*</Property>
          <Property name="dataSet">dsQuery</Property>
          <Property name="exClassName">bg-color</Property>
          <Property name="labelAlign">right</Property>
          <Property name="labelSeparator">:</Property>
          <Property name="labelWidth">100</Property>
          <AutoFormElement>
            <Property name="name">depotId</Property>
            <Property name="property">depotId</Property>
            <Property name="editable">false</Property>
            <Property name="label">计划仓库</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">year</Property>
            <Property name="property">year</Property>
            <Property name="trigger">defaultYearDropDown</Property>
            <Property name="editable">false</Property>
            <Property name="label">收获年份</Property>
            <Editor/>
          </AutoFormElement>
          <Container layout="hbox regionPadding:15">
            <Button>
              <ClientEvent name="onClick">var data = view.get(&quot;#dsQuery.data&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#dsPlan&quot;).set(&quot;parameter&quot;,data.toJSON()).flushAsync();&#xD;
}else{&#xD;
    view.get(&quot;#dsPlan&quot;).flushAsync();&#xD;
}&#xD;
</ClientEvent>
              <Property name="caption">查询</Property>
              <Property name="exClassName">btn-normal</Property>
              <Property name="iconClass">fa fa-search</Property>
            </Button>
            <Button>
              <ClientEvent name="onClick">var data = view.get(&quot;#dsPlan.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#ddPlan&quot;).close(data.toJSON());&#xD;
}</ClientEvent>
              <Property name="iconClass">fa fa-check</Property>
              <Property name="caption">确定</Property>
            </Button>
          </Container>
        </AutoForm>
        <DataGrid>
          <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsPlan.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#ddPlan&quot;).close(data.toJSON());&#xD;
}</ClientEvent>
          <Property name="dataSet">dsPlan</Property>
          <Property name="readOnly">true</Property>
          <DataColumn>
            <Property name="property">planId</Property>
            <Property name="width">100</Property>
            <Property name="align">center</Property>
            <Property name="name">planId</Property>
            <Property name="visible">false</Property>
          </DataColumn>
          <DataColumn name="depotId">
            <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
arg.processDefault = true;</ClientEvent>
            <Property name="property">depotId</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn>
            <Property name="property">year</Property>
            <Property name="width">200</Property>
            <Property name="align">center</Property>
            <Property name="name">year</Property>
          </DataColumn>
          <DataColumn>
            <Property name="property">planNum</Property>
            <Property name="width">80</Property>
            <Property name="align">center</Property>
            <Property name="name">planNum</Property>
          </DataColumn>
          <DataColumn>
            <Property name="property">foodVariety</Property>
            <Property name="width">80</Property>
            <Property name="align">center</Property>
            <Property name="name">foodVariety</Property>
          </DataColumn>
          <DataColumn>
            <Property name="property">type</Property>
            <Property name="align">center</Property>
            <Property name="name">type</Property>
          </DataColumn>
        </DataGrid>
        <DataPilot layoutConstraint="bottom">
          <Property name="dataSet">dsPlan</Property>
        </DataPilot>
      </Container>
    </CustomDropDown>
    <CustomDropDown id="ddContract">
      <Property name="minHeight">317</Property>
      <Property name="assignmentMap">contractId=id,contractName=name</Property>
      <Property name="minWidth">550</Property>
      <Property name="autoOpen">false</Property>
      <Container layout="regionPadding:5">
        <DataSet id="dsContract">
          <Property name="dataProvider">contractManagePR#pageContract</Property>
          <Property name="dataType">[dtContract]</Property>
          <Property name="parameter"></Property>
          <Property name="pageSize">5</Property>
        </DataSet>
        <Container layout="hbox regionPadding:5">
          <TextEditor id="key3">
            <Property name="blankText"> -- åˆåŒåç§°æˆ–者所属计划 --</Property>
            <Property name="width">200</Property>
          </TextEditor>
          <Button>
            <ClientEvent name="onClick">var key = view.get(&quot;#key3.value&quot;);&#xD;
view.get(&quot;#dsContract&quot;).set(&quot;parameter&quot;,{key:key}).flushAsync();</ClientEvent>
            <Property name="caption">查询</Property>
            <Property name="iconClass">fa fa-search</Property>
          </Button>
          <Button>
            <ClientEvent name="onClick">var data = view.get(&quot;#dsContract.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#ddContract&quot;).close(data.toJSON());&#xD;
}</ClientEvent>
            <Property name="iconClass">fa fa-check</Property>
            <Property name="caption">确定</Property>
          </Button>
        </Container>
        <DataGrid>
          <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsContract.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#ddContract&quot;).close(data.toJSON());&#xD;
}</ClientEvent>
          <Property name="dataSet">dsContract</Property>
          <Property name="readOnly">true</Property>
          <DataColumn>
            <Property name="property">id</Property>
            <Property name="width">100</Property>
            <Property name="align">center</Property>
            <Property name="name">id</Property>
            <Property name="visible">false</Property>
          </DataColumn>
          <DataColumn name="name">
            <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
arg.processDefault = true;</ClientEvent>
            <Property name="property">name</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn>
            <Property name="property">planName</Property>
            <Property name="align">center</Property>
            <Property name="name">planName</Property>
          </DataColumn>
          <DataColumn>
            <Property name="property">year</Property>
            <Property name="width">80</Property>
            <Property name="align">center</Property>
            <Property name="name">year</Property>
          </DataColumn>
        </DataGrid>
        <DataPilot layoutConstraint="bottom">
          <Property name="dataSet">dsContract</Property>
        </DataPilot>
      </Container>
    </CustomDropDown>
  </View>
</ViewConfig>
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticePR.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,489 @@
package com.fzzy.igds;
import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.annotation.Expose;
import com.bstek.dorado.data.provider.Page;
import com.fzzy.igds.constant.Constant;
import com.fzzy.igds.data.NoticeDto;
import com.fzzy.igds.service.InoutNoticeService;
import com.fzzy.igds.domain.InoutNoticeIn;
import com.fzzy.igds.domain.InoutNoticeOut;
import com.fzzy.igds.service.SysDeptService;
import com.fzzy.igds.utils.ContextUtil;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import java.util.*;
/**
 * @Description é€šçŸ¥å•管理
 * @Author CZT
 * @Date 2024/12/16 10:10
 */
@Component
public class InoutNoticePR {
    @Resource
    private InoutNoticeService inoutNoticeService;
    @Resource
    private SysDeptService sysDeptService;
    /**
     * inoutNoticePR#getTitle æ ¹æ®æŠ¥è¡¨ç±»åž‹ï¼ŒèŽ·å–é»˜è®¤æŸ¥è¯¢ä¿¡æ¯ï¼Œæ¯”å¦‚è¡¨å¤´ä¿¡æ¯ç­‰
     *
     * @param
     * @return
     */
    @DataProvider
    public Map<String, Object> getTitle(Map<String, Object> param) {
        Map<String, Object> result = new HashMap<String, Object>();
        //获取参数中报表类型
        String type = (String)param.get("type");
        //获取分库编码对应的分库名称
        String deptName = "";
        SysDept subDept = sysDeptService.getCacheDept(null, ContextUtil.subDeptId(null));
        if (null != subDept) {
            deptName = subDept.getDeptName();
        }
        if ("NOTICE_IN".equals(type)) {
            result.put("title", "入库通知单");
            if (StringUtils.isNotEmpty(deptName)) {
                result.put("title", deptName + "入库通知单");
            }
        }
        if ("NOTICE_OUT".equals(type)) {
            result.put("title", "出库通知单");
            if (StringUtils.isNotEmpty(deptName)) {
                result.put("title", deptName + "出库通知单");
            }
        }
        return result;
    }
    /**
     * inoutNoticePR#getYearQuery é»˜è®¤å¹´ä»½
     *
     * @param
     * @return
     */
    @DataProvider
    public Map<String, Object> getYearQuery(Map<String, Object> param) {
        Map<String, Object> result = new HashMap<String, Object>();
        //获取参数中分库编码
        String deptId = (String)param.get("deptId");
        result.put("year", DateFormatUtils.format(new Date(), "yyyy"));
        result.put("deptId", deptId);
        return result;
    }
    /**
     * inoutNoticePR#queryNoticeByKey  æ ¹æ®å‚数查询出入库通知单,用于手动补单时,选择通知单
     *
     * @param
     * @return
     */
    @DataProvider
    public List<NoticeDto> queryNoticeByKey(Map<String, Object> param) {
        if (param == null) {
            return null;
        }
        String type = (String) param.get("type");
        if (StringUtils.isEmpty(type)) {
            return null;
        }
        List<NoticeDto> list = new ArrayList<>();
        NoticeDto dto;
        if (Constant.TYPE_IN.equals(type)) {
            List<InoutNoticeIn> listIn = this.queryNoticeIn(param);
            if (null != listIn && listIn.size() > 0) {
                for (InoutNoticeIn inoutNoticeIn : listIn) {
                    dto = new NoticeDto();
                    BeanUtils.copyProperties(inoutNoticeIn, dto);
                    list.add(dto);
                }
            }
        }
        if (Constant.TYPE_OUT.equals(type)) {
            List<InoutNoticeOut> listOut = this.queryNoticeOut(param);
            if (null != listOut && listOut.size() > 0) {
                for (InoutNoticeOut inoutNoticeOut : listOut) {
                    dto = new NoticeDto();
                    BeanUtils.copyProperties(inoutNoticeOut, dto);
                    list.add(dto);
                }
            }
        }
        return list;
    }
    /*==================== å…¥åº“通知单相关业务 ====================*/
    /**
     * inoutNoticePR#initAddIn å…¥åº“通知单新增初始化
     *
     * @return
     */
    @Expose
    public InoutNoticeIn initAddIn() {
        SysUser user = ContextUtil.getLoginUser();
        InoutNoticeIn data = new InoutNoticeIn();
        data.setId("RKTZD_" + ContextUtil.generateId());
        data.setName("入库通知单");
        data.setCompanyId(user.getCompanyId());
        data.setDeptId(ContextUtil.subDeptId(user));
        data.setTag(Constant.YN_Y);
        return data;
    }
    /**
     * inoutNoticePR#pageQueryIn èŽ·å–å…¥åº“é€šçŸ¥å•
     *
     * @param param
     * @return
     */
    @DataProvider
    public void pageQueryIn(Page<InoutNoticeIn> page, Map<String, Object> param) {
        if (null == param) {
            param = new HashMap<>();
        }
        Map<String, Object> finalParam = param;
        //多参数分页查询
        Pageable pageable = PageRequest.of(0, 10000, Sort.Direction.ASC, InoutNoticeIn.SORT_PROP);
        Specification<InoutNoticeIn> specification = new Specification<InoutNoticeIn>() {
            private static final long serialVersionUID = 1L;
            public Predicate toPredicate(Root<InoutNoticeIn> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
                List<Predicate> predicates = new ArrayList<Predicate>(); //所有的断言
                Predicate predicate1 = cb.equal(root.get("companyId"), ContextUtil.getCompanyId());
                predicates.add(predicate1);
                Predicate predicate2 = cb.equal(root.get("deptId"), ContextUtil.subDeptId(null));
                predicates.add(predicate2);
                String key = String.valueOf(finalParam.get("year"));
                if (StringUtils.isBlank(key)) {
                    Predicate predicate3 = cb.equal(root.get("year"), key);
                    predicates.add(predicate3);
                }
                key = (String) finalParam.get("id");
                if (StringUtils.isBlank(key)) {
                    Predicate predicate4 = cb.equal(root.get("id"),  key);
                    predicates.add(predicate4);
                }
                key = (String) finalParam.get("customerName");
                if (StringUtils.isBlank(key)) {
                    Predicate predicate5 = cb.like(root.get("customerName"), "%" + key + "%");
                    predicates.add(predicate5);
                }
                key = (String) finalParam.get("completeStatus");
                if (StringUtils.isBlank(key)) {
                    Predicate predicate6 = cb.equal(root.get("completeStatus"), key);
                    predicates.add(predicate6);
                }
                key = (String) finalParam.get("foodVariety");
                if (StringUtils.isBlank(key)) {
                    Predicate predicate7 = cb.equal(root.get("foodVariety"), key);
                    predicates.add(predicate7);
                }
                return cb.and(predicates.toArray(new Predicate[0]));
            }
        };
        org.springframework.data.domain.Page<InoutNoticeIn> japPage = inoutNoticeService.queryAllNoticeIn(specification, pageable);
        page.setEntityCount((int) japPage.getTotalElements());
        page.setEntities(japPage.getContent());
    }
    /**
     * inoutNoticePR#saveIn æ›´æ–°å…¥åº“通知单
     */
    @Expose
    public String saveIn(InoutNoticeIn data) {
        InoutNoticeIn inoutNoticeIn = new InoutNoticeIn();
        BeanUtils.copyProperties(data, inoutNoticeIn);
        return inoutNoticeService.saveOrUpdateIn(inoutNoticeIn);
    }
    /**
     * inoutNoticePR#delDataIn
     */
    @Expose
    public String delDataIn(InoutNoticeIn data) {
        InoutNoticeIn inoutNoticeIn = new InoutNoticeIn();
        BeanUtils.copyProperties(data, inoutNoticeIn);
        return inoutNoticeService.delDataIn(inoutNoticeIn);
    }
    /**
     * æ ¹æ®ä¸åŒæ¡ä»¶æŸ¥è¯¢
     * @param param
     * @return
     */
    public List<InoutNoticeIn> queryNoticeIn(Map<String, Object> param) {
        if (null == param) {
            param = new HashMap<>();
        }
        Map<String, Object> finalParam = param;
        //多参数分页查询
        Pageable pageable = PageRequest.of(0, 10000, Sort.Direction.ASC, InoutNoticeIn.SORT_PROP);
        Specification<InoutNoticeIn> specification = new Specification<InoutNoticeIn>() {
            private static final long serialVersionUID = 1L;
            public Predicate toPredicate(Root<InoutNoticeIn> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
                List<Predicate> predicates = new ArrayList<Predicate>(); //所有的断言
                Predicate predicate1 = cb.equal(root.get("companyId"), ContextUtil.getCompanyId());
                predicates.add(predicate1);
                Predicate predicate2 = cb.equal(root.get("deptId"), ContextUtil.subDeptId(null));
                predicates.add(predicate2);
                Predicate predicate3 = cb.equal(root.get("completeStatus"), "NONE");
                predicates.add(predicate3);
                String key = (String) finalParam.get("customerId");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate4 = cb.equal(root.get("customerId"), key);
                    predicates.add(predicate4);
                }
                key = (String) finalParam.get("foodVariety");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate5 = cb.equal(root.get("foodVariety"),  key);
                    predicates.add(predicate5);
                }
                key = (String) finalParam.get("depotId");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate6 = cb.equal(root.get("depotId"), key);
                    predicates.add(predicate6);
                }
                key = (String) finalParam.get("key");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate7 = cb.like(root.get("name"), "%" + key + "%");
                    predicates.add(predicate7);
                }
                return cb.and(predicates.toArray(new Predicate[0]));
            }
        };
        org.springframework.data.domain.Page<InoutNoticeIn> japPage = inoutNoticeService.queryAllNoticeIn(specification, pageable);
        return japPage.getContent();
    }
    /**
     * é‡æ–°æ ¸ç®—入库通知单完成量
     *
     * inoutNoticePR#updateSumNoticeIn
     *
     * @return
     */
    @Expose
    public String updateSumNoticeIn() {
        //获取所有未完成状态的入库通知单
        String companyId = ContextUtil.getCompanyId();
        String deptId = ContextUtil.subDeptId(null);
        List<InoutNoticeIn> noticeInList = inoutNoticeService.getUnComNoticeIn(companyId);
        if (noticeInList != null && noticeInList.size() > 0) {
            inoutNoticeService.updateSumNoticeIn(noticeInList);
            return "success";
        }
        return "fail";
    }
    /*==================== å‡ºåº“通知单相关业务 ====================*/
    /**
     * inoutNoticePR#initAddOut å‡ºåº“通知单新增初始化
     *
     * @return
     */
    @Expose
    public InoutNoticeOut initAddOut() {
        SysUser user = ContextUtil.getLoginUser();
        InoutNoticeOut data = new InoutNoticeOut();
        data.setId("CKTZD_" + ContextUtil.generateId());
        data.setName("出库通知单");
        data.setCompanyId(user.getCompanyId());
        data.setDeptId(ContextUtil.subDeptId(user));
        data.setTag(Constant.YN_Y);
        return data;
    }
    /**
     * inoutNoticePR#pageQueryOut èŽ·å–å‡ºåº“é€šçŸ¥å•
     * @param page
     * @param param
     */
    @DataProvider
    public void pageQueryOut(Page<InoutNoticeOut> page, Map<String, Object> param) {
        if (null == param) {
            param = new HashMap<>();
        }
        Map<String, Object> finalParam = param;
        //多参数分页查询
        Pageable pageable = PageRequest.of(0, 10000, Sort.Direction.ASC, InoutNoticeOut.SORT_PROP);
        Specification<InoutNoticeOut> specification = new Specification<InoutNoticeOut>() {
            private static final long serialVersionUID = 1L;
            public Predicate toPredicate(Root<InoutNoticeOut> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
                List<Predicate> predicates = new ArrayList<Predicate>(); //所有的断言
                Predicate predicate1 = cb.equal(root.get("companyId"), ContextUtil.getCompanyId());
                predicates.add(predicate1);
                Predicate predicate2 = cb.equal(root.get("deptId"), ContextUtil.subDeptId(null));
                predicates.add(predicate2);
                String key = String.valueOf(finalParam.get("year"));
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate3 = cb.equal(root.get("year"), key);
                    predicates.add(predicate3);
                }
                key = (String) finalParam.get("id");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate4 = cb.equal(root.get("id"),  key);
                    predicates.add(predicate4);
                }
                key = (String) finalParam.get("customerId");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate5 = cb.equal(root.get("customerId"), key);
                    predicates.add(predicate5);
                }
                key = (String) finalParam.get("completeStatus");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate6 = cb.equal(root.get("completeStatus"), key);
                    predicates.add(predicate6);
                }
                key = (String) finalParam.get("foodVariety");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate7 = cb.equal(root.get("foodVariety"), key);
                    predicates.add(predicate7);
                }
                return cb.and(predicates.toArray(new Predicate[0]));
            }
        };
        org.springframework.data.domain.Page<InoutNoticeOut> japPage = inoutNoticeService.queryAllNoticeOut(specification, pageable);
        page.setEntityCount((int) japPage.getTotalElements());
        page.setEntities(japPage.getContent());
    }
    /**
     * inoutNoticePR#saveOut æ›´æ–°å‡ºåº“通知单
     * @param data
     * @return
     */
    @Expose
    public String saveOut(InoutNoticeOut data) {
        InoutNoticeOut inoutNoticeOut = new InoutNoticeOut();
        BeanUtils.copyProperties(data, inoutNoticeOut);
        return inoutNoticeService.saveOrUpdateOut(inoutNoticeOut);
    }
    /**
     * inoutNoticePR#delDataOut
     */
    @Expose
    public String delDataOut(InoutNoticeOut data) {
        InoutNoticeOut inoutNoticeOut = new InoutNoticeOut();
        BeanUtils.copyProperties(data, inoutNoticeOut);
        return inoutNoticeService.delDataOut(inoutNoticeOut);
    }
    /**
     * æ ¹æ®ä¸åŒæ¡ä»¶æŸ¥è¯¢
     * @param param
     * @return
     */
    public List<InoutNoticeOut> queryNoticeOut(Map<String, Object> param) {
        if (null == param) {
            param = new HashMap<>();
        }
        Map<String, Object> finalParam = param;
        //多参数分页查询
        Pageable pageable = PageRequest.of(0, 10000, Sort.Direction.ASC, InoutNoticeOut.SORT_PROP);
        Specification<InoutNoticeOut> specification = new Specification<InoutNoticeOut>() {
            private static final long serialVersionUID = 1L;
            public Predicate toPredicate(Root<InoutNoticeOut> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
                List<Predicate> predicates = new ArrayList<Predicate>(); //所有的断言
                Predicate predicate1 = cb.equal(root.get("companyId"), ContextUtil.getCompanyId());
                predicates.add(predicate1);
                Predicate predicate2 = cb.equal(root.get("deptId"), ContextUtil.subDeptId(null));
                predicates.add(predicate2);
                Predicate predicate3 = cb.equal(root.get("completeStatus"), "NONE");
                predicates.add(predicate3);
                String key = (String) finalParam.get("customerId");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate4 = cb.equal(root.get("customerId"), key);
                    predicates.add(predicate4);
                }
                key = (String) finalParam.get("foodVariety");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate5 = cb.equal(root.get("foodVariety"),  key);
                    predicates.add(predicate5);
                }
                key = (String) finalParam.get("depotId");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate6 = cb.equal(root.get("depotId"), key);
                    predicates.add(predicate6);
                }
                key = (String) finalParam.get("key");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate7 = cb.like(root.get("name"), "%" + key + "%");
                    predicates.add(predicate7);
                }
                return cb.and(predicates.toArray(new Predicate[0]));
            }
        };
        org.springframework.data.domain.Page<InoutNoticeOut> japPage = inoutNoticeService.queryAllNoticeOut(specification, pageable);
        return japPage.getContent();
    }
    /**
     * é‡æ–°æ ¸ç®—出库通知单完成量
     *
     * inoutNoticePR#updateSumNoticeOut
     *
     * @return
     */
    @Expose
    public String updateSumNoticeOut() {
        //获取所有未完成状态的入库通知单
        String companyId = ContextUtil.getCompanyId();
        String deptId = ContextUtil.subDeptId(null);
        List<InoutNoticeOut> noticeOutList = inoutNoticeService.getUnComNoticeOut(companyId);
        if (noticeOutList != null && noticeOutList.size() > 0) {
            inoutNoticeService.updateSumNoticeOut(noticeOutList);
            return "success";
        }
        return "fail";
    }
}
fzzy-igdss-view/src/main/java/models/core.model.xml
@@ -405,7 +405,7 @@
    <PropertyDef name="storageReal">
      <Property name="dataType">Double</Property>
      <Property name="label">实际储量</Property>
      <Property name="displayFormat">#,##0 KG</Property>
      <Property name="displayFormat">#0.0 KG</Property>
      <Property name="required">true</Property>
    </PropertyDef>
    <PropertyDef name="remark">
fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/inout/InoutController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,236 @@
package com.fzzy.sys.controller.inout;
import com.fzzy.igds.constant.Constant;
import com.fzzy.igds.domain.Depot;
import com.fzzy.igds.domain.InoutConf;
import com.fzzy.igds.utils.ContextUtil;
import com.fzzy.igds.utils.DateUtil;
import com.fzzy.sys.manager.common.CommonManager;
import com.fzzy.sys.manager.inout.InoutManager;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.core.domain.entity.SysUser;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.List;
/**
 * @Description å‡ºå…¥åº“控制层
 * @Author CZT
 * @Date 2025/11/29 10:56
 */
@Slf4j
@Controller
@RequestMapping("basic/inout")
public class InoutController {
    private static final String prefix = "inout";
    @Resource
    private InoutManager inoutManager;
    @Resource
    private CommonManager commonManager;
    /**
     * å‡ºå…¥åº“快速登记
     *
     * @param httpRequest
     * @param sort        é…å¥—号
     * @param type        ä¸šåŠ¡ç±»åž‹ï¼šIN-入库,OUT-出库
     * @param view
     * @return
     */
    @RequestMapping("/register")
    public String register(HttpServletRequest httpRequest,
                           @RequestParam(value = "sort", required = false) String sort,
                           @RequestParam(value = "type", required = false) String type,
                           ModelMap view) {
        SysUser user = ContextUtil.getLoginUser();
        view.put(Constant.MODEL_KEY_LOGIN_USER, user);
        String deptId = ContextUtil.subDeptId(user);
        view.put("deptId", deptId);
        if (StringUtils.isEmpty(sort)) {
            sort = "1";
        }
        if (StringUtils.isEmpty(sort)) {
            sort = inoutManager.getInoutWeightByClient(httpRequest);
        }
        if (StringUtils.isEmpty(type)) {
            //默认入库
            type = Constant.TYPE_IN;
        }
        view.put("type", type);
        //称重是否可编辑标签
        String weightEditTag = inoutManager.getWeightEditTag(user.getCompanyId(), deptId);
        view.put("weightEditTag", weightEditTag);
        //出入库流程
        String inoutProgress = inoutManager.getInoutProgressConf(user.getCompanyId(), ContextUtil.subDeptId(user), type);
        view.put("inoutProgress", inoutProgress);
        // å½“前流程节点
        view.put("progress", Constant.PROGRESS_REGISTER);
        // èŽ·å–å‡ºå…¥åº“é…ç½®ä¿¡æ¯
        List<InoutConf> listInoutConf = inoutManager.getListInoutConf(user.getCompanyId(), deptId);
        //根据出入库设备信息筛选地磅配置信息,所有地磅,支持用户手动选择
        List<InoutConf> listWeight = inoutManager.getInoutConf(listInoutConf, Constant.CONF_TYPE_30);
        view.put("listWeight", listWeight);
        // èŽ·å–å½“å‰åœ°ç£…
        InoutConf weightDto = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_30);
        view.put("weightDto", weightDto);
        // è¿‡ç¨‹æ‘„像头1
        InoutConf conf = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_60, Constant.PROGRESS_WEIGHT_TAG, 1);
        view.put("snapDto1", conf);
        // è¿‡ç¨‹æ‘„像头2
        conf = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_60, Constant.PROGRESS_WEIGHT_TAG, 2);
        view.put("snapDto2", conf);
        // è¿‡ç¨‹æ‘„像头3
        conf = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_60, Constant.PROGRESS_WEIGHT_TAG, 3);
        view.put("snapDto3", conf);
        return prefix + "/inout-register";
    }
    /**
     * è´¨æ£€é¡µé¢
     * @return
     */
    @RequestMapping("/check")
    public String check(HttpServletRequest httpRequest, ModelMap view) {
        SysUser user = ContextUtil.getLoginUser();
        view.put(Constant.MODEL_KEY_LOGIN_USER, user);
        String deptId = ContextUtil.subDeptId(user);
        view.put("type", Constant.TYPE_IN);
        view.put("deptId", deptId);
        // ä»“库列表做下拉框使用
        List<Depot> listDepot = commonManager.listDepotByDeptId(deptId);
        view.put(Constant.MODEL_KEY_DEPOT_LIST, listDepot);
        //入库流程
        String inoutProgress = inoutManager.getInoutProgressConf(user.getCompanyId(), deptId, Constant.TYPE_IN);
        view.put("inoutProgress", inoutProgress);
        // å½“前流程节点
        view.put("progress", Constant.PROGRESS_CHECK);
        // ç²®é£Ÿå“ç§ä¸‹æ‹‰æ¡†
        List<SysDictData> listFoodVariety = commonManager.getDicTrigger(
                Constant.TRIGGER_PARENT_FOOD_VARIETY, user.getCompanyId());
        view.put("listFoodVariety", listFoodVariety);
        // ç²®é£Ÿæ€§è´¨ä¸‹æ‹‰æ¡†
        List<SysDictData> listFoodType = commonManager.getDicTrigger(Constant.TRIGGER_PARENT_FOOD_TYPE, user.getCompanyId());
        view.put("listFoodType", listFoodType);
        // ç²®é£Ÿç­‰çº§ä¸‹æ‹‰æ¡†
        List<SysDictData> listFoodLevel = commonManager.getDicTrigger(Constant.TRIGGER_PARENT_FOOD_LEVEL, user.getCompanyId());
        view.put("listFoodLevel", listFoodLevel);
        view.put("endTime", DateFormatUtils.format(new Date(), "yyyy-MM-dd"));
        view.put("startTime", DateFormatUtils.format(DateUtil.getNewByDay(null, -30), "yyyy-MM-dd"));
        return prefix + "/inout-check";
    }
    /**
     * å…¥åº“称重操作,包括空车称重和满车称重,共用一个页面
     *
     * @param sort è¡¨ç¤ºä½¿ç”¨çš„出入库设备配套号,不传递默认为1
     * @return
     */
    @RequestMapping("/weight")
    public String weight(HttpServletRequest httpRequest,
                         @RequestParam(value = "sort", required = false) String sort,
                         @RequestParam(value = "type", required = false) String type,
                         ModelMap view) {
        //如果没有指定地磅,从用户上一个选择中获取
        if (StringUtils.isEmpty(sort)) {
            sort = "1";
        }
        if (StringUtils.isEmpty(sort)) {
            sort = inoutManager.getInoutWeightByClient(httpRequest);
        }
        if (StringUtils.isEmpty(type)) {
            //默认入库
            type = Constant.TYPE_IN;
        }
        view.put("type", type);
        SysUser user = ContextUtil.getLoginUser();
        view.put(Constant.MODEL_KEY_LOGIN_USER, user);
        String deptId = ContextUtil.subDeptId(user);
        view.put("type", type);
        view.put("deptId", deptId);
        // ä»“库列表做下拉框使用
        List<Depot> listDepot = commonManager.listDepotByDeptId(deptId);
        view.put(Constant.MODEL_KEY_DEPOT_LIST, listDepot);
        // å½“前流程标签
        view.put("progress", Constant.PROGRESS_WEIGHT_TAG);
        //入库流程配置
        String inoutProgress = inoutManager.getInoutProgressConf(user.getCompanyId(), deptId, Constant.TYPE_IN);
        view.put("inoutProgress", inoutProgress);
        //称重是否可编辑标签
        String weightEditTag = inoutManager.getWeightEditTag(user.getCompanyId(), deptId);
        view.put("weightEditTag", weightEditTag);
        // ç²®é£Ÿå“ç§ä¸‹æ‹‰æ¡†
        List<SysDictData> listFoodVariety = commonManager.getDicTrigger(Constant.TRIGGER_PARENT_FOOD_VARIETY, user.getCompanyId());
        view.put("listFoodVariety", listFoodVariety);
        // èŽ·å–å‡ºå…¥åº“è®¾å¤‡é…ç½®ä¿¡æ¯
        List<InoutConf> listInoutConf = inoutManager.getListInoutConf(user.getCompanyId(), deptId);
        //根据出入库设备信息筛选地磅配置信息,所有地磅,支持用户手动选择
        List<InoutConf> listWeight = inoutManager.getInoutConf(listInoutConf, Constant.CONF_TYPE_30);
        view.put("listWeight", listWeight);
        // èŽ·å–å½“å‰åœ°ç£…
        InoutConf weightDto = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_30);
        view.put("weightDto", weightDto);
        // è¿‡ç¨‹æ‘„像头1
        InoutConf conf = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_60, Constant.PROGRESS_WEIGHT_TAG, 1);
        view.put("snapDto1", conf);
        // è¿‡ç¨‹æ‘„像头2
        conf = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_60, Constant.PROGRESS_WEIGHT_TAG, 2);
        view.put("snapDto2", conf);
        // è¿‡ç¨‹æ‘„像头3
        conf = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_60, Constant.PROGRESS_WEIGHT_TAG, 3);
        view.put("snapDto3", conf);
        return prefix + "/inout-weight";
    }
}
fzzy-igdss-web/src/main/java/com/fzzy/sys/init/SystemRunner.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,94 @@
package com.fzzy.sys.init;
import com.bstek.dorado.annotation.Expose;
import com.fzzy.igds.service.*;
import com.ruoyi.system.domain.SysCompany;
import com.ruoyi.system.service.ISysCompanyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
 * @Description é…ç½®ç³»ç»Ÿçº§åˆ«çš„项目启动初始化信息
 * @Author CZT
 * @Date 2025/11/29 16:49
 */
@Service
@Slf4j
@Order(value = 1)
public class SystemRunner implements CommandLineRunner {
    @Resource
    private ISysCompanyService iSysCompanyService;
    @Resource
    private SysDeptService sysDeptService;
    @Resource
    private DicService dicService;
    @Resource
    private DepotService depotService;
    @Resource
    private DepotConfService depotConfService;
    @Resource
    private DeviceSerService deviceSerService;
    @Override
    public void run(String... args) throws Exception {
        //组织信息放入缓存
        iSysCompanyService.resetCompanyCache();
        List<SysCompany> list = iSysCompanyService.selectAll();
        for (SysCompany company : list) {
            flushCache(company.getCompanyId(), "系统调用");
        }
    }
    /**
     * å¹³å°ç³»ç»Ÿï¼Œæ‰‹åŠ¨åˆ·æ–°æ‰€æœ‰ç¼“å­˜
     * <p>
     * systemRunner#flushAllCache
     *
     * @param companyId
     */
    @Expose
    public void flushAllCache(String companyId) {
        flushCache(companyId, "手动调用");
    }
    /**
     * åˆ†ç»„织初始化
     *
     * @param companyId
     * @param name
     */
    public void flushCache(String companyId, String name) {
        //初始化用户部门到内存
        sysDeptService.initUserDeptMap(companyId);
        //初始化常用字典到内存
        dicService.initDicMap(companyId);
        //初始化仓库缓存
        depotService.flushCache(companyId);
        //参数配置
        depotConfService.flushConfCache(companyId);
        //设置分机全部掉线
        deviceSerService.allOffLine(companyId);
        //刷新分机到缓存
        deviceSerService.refreshCache(companyId);
        log.info("* ");
        log.info("* ========================");
        log.info("* ");
        log.info("* ç»„织={},{}初始化缓存完成…………", companyId, name);
        log.info("* ");
        log.info("* ========================");
        log.info("* ");
    }
}
fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/common/CommonManager.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,51 @@
package com.fzzy.sys.manager.common;
import com.fzzy.igds.domain.Depot;
import com.fzzy.igds.service.DepotService;
import com.fzzy.igds.service.DicService;
import com.fzzy.igds.utils.ContextUtil;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
/**
 * @Description
 * @Author CZT
 * @Date 2025/11/29 15:19
 */
@Slf4j
@Component
public class CommonManager {
    @Resource
    private DepotService depotService;
    @Resource
    private DicService dicService;
    /**
     * æ ¹æ®å­—典类型获取字典列表
     * @param parentCode
     * @param companyId
     * @return
     */
    public List<SysDictData> getDicTrigger(String parentCode, String companyId) {
        return dicService.getDictDataByType(parentCode, companyId);
    }
    /**
     * æ ¹æ®åº“区编码获取库区下所有仓库列表
     *
     * @param deptId
     * @return
     */
    public List<Depot> listDepotByDeptId(String deptId) {
        if (StringUtils.isEmpty(deptId)) {
            deptId = ContextUtil.subDeptId(null);
        }
        return depotService.getCacheDepotList(ContextUtil.getCompanyId(), deptId);
    }
}
fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/inout/InoutManager.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,153 @@
package com.fzzy.sys.manager.inout;
import com.fzzy.igds.constant.Constant;
import com.fzzy.igds.domain.InoutConf;
import com.fzzy.igds.domain.InoutSysConf;
import com.fzzy.igds.service.InoutConfService;
import com.fzzy.igds.utils.SystemUtil;
import com.ruoyi.common.core.redis.RedisCache;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;
/**
 * @Description å‡ºå…¥åº“业务处理
 * @Author CZT
 * @Date 2025/11/29 11:02
 */
@Slf4j
@Component
public class InoutManager {
    @Resource
    private RedisCache redisCache;
    @Resource
    private InoutConfService inoutConfService;
    /**
     * æ ¹æ®ç”¨æˆ·è¯·æ±‚信息,根据当前客户电脑IP,获取出入库称重上次选择的地磅
     *
     * @param httpRequest
     * @return
     */
    public String getInoutWeightByClient(HttpServletRequest httpRequest) {
        String userIp = SystemUtil.getIP(httpRequest);
        log.debug("----------------根据用户IP获取选择-地磅----{}", userIp);
        String key = "INOUT:WEIGHT:" + userIp;
        String sort = (String) redisCache.getCacheObject(key);
        if (com.ruoyi.common.utils.StringUtils.isEmpty(sort)) sort = "1";
        return sort;
    }
    /**
     * èŽ·å–å‡ºå…¥åº“çš„æ•´ä¸ªæµç¨‹ä¿¡æ¯
     *
     * @param companyId
     * @param deptId
     * @param inoutType
     * @return
     */
    public String getInoutProgressConf(String companyId, String deptId, String inoutType) {
        // ä»Žç¼“存中获取出入库系统配置信息
        InoutSysConf inoutSysConf = inoutConfService.getCacheInoutSysConf(companyId, deptId);
        String progressConf = null;
        if (inoutSysConf != null) {
            if (Constant.TYPE_IN.equals(inoutType)) {
                progressConf = inoutSysConf.getProgressIn();
            }
            if (Constant.TYPE_OUT.equals(inoutType)) {
                progressConf = inoutSysConf.getProgressOut();
            }
        }
        return progressConf;
    }
    /**
     * èŽ·å–å‡ºå…¥åº“è®¾å¤‡é…ç½®ä¿¡æ¯
     *
     * @param companyId
     * @param deptId
     * @return
     */
    public List<InoutConf> getListInoutConf(String companyId, String deptId) {
        return inoutConfService.getCacheInoutConf(companyId, deptId);
    }
    /**
     * æ ¹æ®é…ç½®èŽ·å–å‡ºå…¥åº“çš„é…ç½®å‚æ•°
     *
     * @param listInoutConf é…ç½®åˆ—表
     * @param sort          æ–¹æ¡ˆåºå·
     * @param type          è®¾å¤‡ç±»åž‹
     * @param inoutProgress å‡ºå…¥åº“流程
     * @return è½¦ç‰Œè®¾å¤‡é…ç½®ï¼Œæ²¡æœ‰åˆ™è¿”回NULL
     */
    public InoutConf getInoutConf(List<InoutConf> listInoutConf, String sort, String type, String inoutProgress, int inOrder) {
        if (null == listInoutConf) {
            return new InoutConf(sort);
        }
        if (StringUtils.isEmpty(sort)) sort = "1";
        InoutConf result = null;
        for (InoutConf conf : listInoutConf) {
            if (sort.equals(conf.getSort()) && type.equals(conf.getType()) && inoutProgress.equals(conf.getInoutProgress())) {
                if (conf.getInOrder() == inOrder) {
                    result = conf;
                    break;
                }
            }
        }
        if (null == result) return new InoutConf(sort);
        return result;
    }
    public List<InoutConf> getInoutConf(List<InoutConf> listInoutConf, String type) {
        List<InoutConf> result = new ArrayList<>();
        if (null == listInoutConf) return result;
        for (InoutConf conf : listInoutConf) {
            if (type.equals(conf.getType())) {
                result.add(conf);
            }
        }
        return result;
    }
    public InoutConf getInoutConf(List<InoutConf> listInoutConf, String sort, String type) {
        if (null == listInoutConf) return new InoutConf(sort);
        if (StringUtils.isEmpty(sort)) sort = "1";
        for (InoutConf conf : listInoutConf) {
            if (sort.equals(conf.getSort()) && type.equals(conf.getType())) {
                return conf;
            }
        }
        return new InoutConf(sort);
    }
    /**
     * èŽ·å–åœ°ç£…é‡é‡ç¼–è¾‘æ ‡ç­¾
     *
     * @param companyId
     * @param deptId
     * @return
     */
    public String getWeightEditTag(String companyId, String deptId) {
        // ä»Žç¼“存中获取出入库系统配置信息
        InoutSysConf inoutSysConf = inoutConfService.getCacheInoutSysConf(companyId, deptId);
        String weightEditTag = Constant.YN_N;
        if (inoutSysConf != null) {
            weightEditTag = inoutSysConf.getWeightEditTag();
        }
        if (null == weightEditTag) weightEditTag = Constant.YN_N;
        return weightEditTag;
    }
}
fzzy-igdss-web/src/main/resources/static/common/constant.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,111 @@
//系统常量定义
//设备状态
var DeviceStatus = {
    CLOSE: "CLOSE",
    OPEN: "OPEN",
    W_CLOSE: "W_CLOSE",
    W_OPEN: "W_OPEN",
    F_OPEN: "F_OPEN",
    F_OPEN_F: "F_OPEN_F",
    F_CLOSE: "F_CLOSE",
    ERROR: "ERROR",
    ZERO: "ZERO"
};
// è®¾å¤‡ç±»åž‹01-风窗 "02-轴流风窗"),"03-离心风机"),"04-环流风机"),"05-空调"),"06-照明"),"07-普通阀门"),"08-气泵"),"09-主阀门"),"0B-通风口"),"0C-混流风机"),"0D-加压风机");
var DeviceType = {
    TYPE_01: "01",
    TYPE_02: "02",
    TYPE_03: "03",
    TYPE_04: "04",
    TYPE_05: "05",
    TYPE_06: "06",
    TYPE_07: "07",
    TYPE_071: "071", // "071-空调阀门"),拓展设备类型
    TYPE_08: "08",
    TYPE_09: "09",
    TYPE_0B: "0B",
    TYPE_0C: "0C",
    TYPE_0D: "0D"
};
// è®¾å¤‡ç±»åž‹ 01-正面 "02-背面"), "03-左侧"), "04-右侧"), "05-仓内"),
var DeviceLocation = {
    L_01: "01",
    L_02: "02",
    L_03: "03",
    L_04: "04",
    L_05: "05"
};
// å‡ºå…¥åº“-流程
var InoutProgress = {
    REGISTER: "REGISTER",
    CHECK: "CHECK",
    HANDLE: "HANDLE",
    WEIGHT_TAG: "WEIGHT_TAG",
    WEIGHT_FULL: "WEIGHT_FULL",
    WEIGHT_EMPTY: "WEIGHT_EMPTY",
    PAY: "PAY",
    CARD_BACK: "CARD_BACK",
    RECORD: "RECORD"
};
// ä»“库类型//平方仓//浅圆仓//油罐//立筒仓//楼房仓//其他类型
var DepotType = {
    T_01: "01",
    T_02: "02",
    T_03: "03",
    T_04: "04",
    T_05: "05",
    T_99: "99"
};
// ä»“库状态
var DepotStatus = {
    S_01: "1", //空仓
    S_02: "2",//入库中
    S_03: "3",//封仓
    S_04: "4",//出库中
    S_05: "31",//封仓-气调中
    S_06: "32",//封仓-熏蒸中
    S_07: "33",//封仓-通风中
    S_08: "34",//封仓-温控中
    S_09: "9"//其他
};
//摄像头播放方式
var PlayType = {
    VLC: "VLC", //本地VLC插件
    PLAY_TYPE_WEB_RTC_DH: "WEB_RTC_DH", //WEB-RTC-大华
    PLAY_TYPE_WEB_RTC_HIK: "WEB_RTC_HIK", //WEB-RTC-海康
    FZZY_GB: "FZZY_GB",//FZZY流媒体播放
    EASY_GBS: "EASY_GBS",//fzzy-easy流媒体播放
    EASY_DSS: "EASY_DSS",//萤石云播放
    MEDIA_HIK: "MEDIA_HIK",//海康流媒体
    HIK_YS: "HIK_YS",//海康-萤石云
    HIK_WEB4: "HIK_WEB4",//海康-WEB插件
    IMOU: "IMOU",///乐橙云
    DEFAULT: "DEFAULT",//默认其他
    OTHER: "OTHER"//不播放
};
//出入库化验项目
var CHECK_ST = {
    C01: "C01",//水分
    C02: "C02",//杂质
    C020101: "020101",//水分
    C01010301: "01010301"//杂质
};
/**
 * ç”¨äºŽå®šä¹‰ç¼“存的打印模板,避免相同配置的模板重新获取
 * @type {Map<any, any>}
 *
 * key = depotType_cable_cableCir
 */
var CACHE_PRINT_MODEL = new Map();
var CACHE_PRINT_MODEL_ALL = new Map();
fzzy-igdss-web/src/main/resources/static/common/igds-common.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,238 @@
//根据浏览器中的地址初始化WS的路径
function initWsUrl() {
    //http://ibms.fzzygf.com
    //http://127.0.0.1:8080/igds
    var href = window.location.href;
    var arrUrl = href.split("//");
    href = arrUrl[1];
    arrUrl = href.split("/");
    //如果没有配置contextPath
    if (arrUrl.length == 1) {
        return "ws://" + arrUrl[0] + "/websocket";
    }
    //如果contextPath = igds
    if ("igds" == arrUrl[1]) {
        return "ws://" + arrUrl[0] + "/" + arrUrl[1] + "/websocket";
    }
    //如果contextPath = zxlk
    if ("zxlk" == arrUrl[1]) {
        return "ws://" + arrUrl[0] + "/" + arrUrl[1] + "/websocket";
    }
    return "ws://" + arrUrl[0] + "/websocket";
};
/**
 *
 * @param deptId åˆ†åº“编码
 * @param bizType ä¸šåŠ¡ç¼–å·
 * @param bizTag è‡ªå®šä¹‰ä¸šåŠ¡æ ‡ç­¾ å¦‚果为null默认取common
 * @param userId å½“前用户Id
 */
function initWS(deptId, bizType, bizTag, userId) {
    if (null == bizTag) bizTag = "common";
    var wsPath = initWsUrl() + "/" + deptId + "/" + bizType + "/" + bizTag + "/" + userId;
    if (typeof (WebSocket) == "undefined") {
        layer.msg("您的浏览器不支持WebSocket,请使用主流浏览器");
        return;
    }
    // åˆ›å»ºè¿žæŽ¥
    var socket = new WebSocket(wsPath);
    // æ‰“开事件
    socket.onopen = function () {
        socket.send(bizType);
    };
    // èŽ·å¾—æ¶ˆæ¯äº‹ä»¶æ˜¯åŽå°ç©¿ä»¶çš„WebPocket对象信息
    socket.onmessage = function (result) {
        var pocket = JSON.parse(result.data);
        socketOnMessage(pocket);
    };
    // å…³é—­äº‹ä»¶
    socket.onclose = function () {
        console.log("Socket closed……");
    };
    // å…³é—­WebSocket连接
    function closeWebSocket() {
        socket.close();
    }
    // å‘生了错误事件
    socket.onerror = function () {
        alert("Socket error……");
    };
    $(window).unload(function () {
        closeWebSocket();
    });
}
// å‡ºå…¥åº“专用连接,添加流程节点参数
function initInoutWS(companyId, bizType, progress, userId) {
    var wsPath = initWsUrl() + "/" + companyId + "/" + bizType + "/" + progress
        + "/" + userId;
    if (typeof (WebSocket) == "undefined") {
        layer.msg("您的浏览器不支持WebSocket,请使用主流浏览器");
        return;
    }
    // å®žçŽ°åŒ–WebSocket对象,指定要连接的服务器地址与端口 Â å»ºç«‹è¿žæŽ¥
    var socket = new WebSocket(wsPath);
    // æ‰“开事件
    socket.onopen = function () {
        socket.send(bizType);
    };
    // èŽ·å¾—æ¶ˆæ¯äº‹ä»¶æ˜¯åŽå°ç©¿ä»¶çš„WebPocket对象信息
    socket.onmessage = function (result) {
        var pocket = JSON.parse(result.data);
        socketOnMessage(pocket);
    };
    // å…³é—­äº‹ä»¶
    socket.onclose = function () {
        console.log("Socket closed……");
    };
    // å…³é—­WebSocket连接
    function closeWebSocket() {
        socket.close();
    }
    // å‘生了错误事件
    socket.onerror = function () {
        alert("Socket error……");
    }
    $(window).unload(function () {
        socket.close();
    });
};
function INOUT_PROGRESS_MSG(code) {
    if (InoutProgress.REGISTER == code) return "登记";
    if (InoutProgress.CHECK == code) return "化验";
    if (InoutProgress.HANDLE == code) return "值仓";
    if (InoutProgress.WEIGHT_TAG == code) return "称重";
    if (InoutProgress.WEIGHT_FULL == code) return "满车称重";
    if (InoutProgress.WEIGHT_EMPTY == code) return "空车称重";
    if (InoutProgress.PAY == code) return "支付";
    if (InoutProgress.CARD_BACK == code) return "卡回收";
    if (InoutProgress.RECORD == code) return "流程完成";
    return "未知";
};
/**
 * æ ¹æ®çŠ¶æ€ç¼–ç è¿”å›žä¸­æ–‡
 * @param code
 */
function DEPOT_STATUS_MSG(code) {
    if (code == DepotStatus.S_01) return "空仓";
    if (code == DepotStatus.S_02) return "入库中";
    if (code == DepotStatus.S_03) return "封仓";
    if (code == DepotStatus.S_04) return "出库中";
    if (code == DepotStatus.S_05) return "封仓-气调中";
    if (code == DepotStatus.S_06) return "封仓-熏蒸中";
    if (code == DepotStatus.S_07) return "封仓-通风中";
    if (code == DepotStatus.S_08) return "封仓-温控中";
    if (code == DepotStatus.S_09) return "其他";
    return code;
}
/**
 * fmt æ—¶é—´æ ¼å¼åŒ–例如:yyyy-MM-dd hh:mm:ss date æ—¶é—´ return å­—符串
 */
function dateFtt(fmt, date) {
    if (!date) return "";
    var o = {
        "M+": date.getMonth() + 1, // æœˆä»½
        "d+": date.getDate(), // æ—¥
        "h+": date.getHours(), // å°æ—¶
        "m+": date.getMinutes(), // åˆ†
        "s+": date.getSeconds(), // ç§’
        "q+": Math.floor((date.getMonth() + 3) / 3), // å­£åº¦
        "S": date.getMilliseconds()
        // æ¯«ç§’
    };
    if (/(y+)/.test(fmt))
        fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "")
            .substr(4 - RegExp.$1.length));
    for (var k in o)
        if (new RegExp("(" + k + ")").test(fmt))
            fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k])
                : (("00" + o[k]).substr(("" + o[k]).length)));
    return fmt;
}
function dateFtt2(fmt, date) {
    if (!date) return "";
    var date2 = new Date(date);
    return dateFtt(fmt, date2);
}
// åˆ·æ–°æ—¶é—´
function initTime() {
    setInterval(function () {
        $("#navBarDate").html(formatDate('mm月dd日', new Date()));
        $("#navBarTime").html(formatDate('HH:MM:SS', new Date()));
        $("#navBarWeek").html(getWeekDate());
    }, 1000);
}
/**
 * æ ¼å¼åŒ–日期
 *
 * @param fmt
 * @param date
 * @return {*}
 */
function formatDate(fmt, date) {
    var ret;
    var opt = {
        "Y+": date.getFullYear().toString(),        // å¹´
        "m+": (date.getMonth() + 1).toString(),     // æœˆ
        "d+": date.getDate().toString(),            // æ—¥
        "H+": date.getHours().toString(),           // æ—¶
        "M+": date.getMinutes().toString(),         // åˆ†
        "S+": date.getSeconds().toString()          // ç§’
        // æœ‰å…¶ä»–格式化字符需求可以继续添加,必须转化成字符串
    };
    for (var k in opt) {
        ret = new RegExp("(" + k + ")").exec(fmt);
        if (ret) {
            fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
        }
    }
    return fmt;
}
/**
 * èŽ·å–å½“å‰æ˜ŸæœŸå‡ 
 */
function getWeekDate() {
    var now = new Date();
    var day = now.getDay();
    var weeks = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
    var week = weeks[day];
    return week;
}
/**
 * åˆ‡æ¢é¡µé¢
 * @param pageTag
 */
function changePage(pageTag) {
    var url = "../dept-board/index";
    if ("inout" == pageTag) {
        url = "../dept-board/inout";
    }
    if ("ai" == pageTag) {
        url = "../dept-board/ai";
    }
    if ("video" == pageTag) {
        url = "../dept-board/video";
    }
    //后台管理首页
    if ("backstage" == pageTag) {
        url = "../index";
        window.parent.open(url, "_self");
        return;
    }
    window.location.href = url;
}
fzzy-igdss-web/src/main/resources/static/fonts/DigitalNumbers.ttf
Binary files differ
fzzy-igdss-web/src/main/resources/static/img/eoms/bgl1.jpg
Binary files differ
fzzy-igdss-web/src/main/resources/static/img/eoms/bgl2.jpg
Binary files differ
fzzy-igdss-web/src/main/resources/static/img/eoms/bgl3.jpg
Binary files differ
fzzy-igdss-web/src/main/resources/static/img/eoms/bgl4.jpg
Binary files differ
fzzy-igdss-web/src/main/resources/static/img/eoms/da-01.png
Binary files differ
fzzy-igdss-web/src/main/resources/static/img/eoms/iconl1.png
Binary files differ
fzzy-igdss-web/src/main/resources/static/img/eoms/iconl2.png
Binary files differ
fzzy-igdss-web/src/main/resources/static/img/eoms/iconl3.png
Binary files differ
fzzy-igdss-web/src/main/resources/static/img/eoms/iconl4.png
Binary files differ
fzzy-igdss-web/src/main/resources/static/img/eoms/imgl1.jpg
Binary files differ
fzzy-igdss-web/src/main/resources/static/img/eoms/imgl2.jpg
Binary files differ
fzzy-igdss-web/src/main/resources/static/img/eoms/imgl3.png
Binary files differ
fzzy-igdss-web/src/main/resources/static/img/eoms/imgl4.png
Binary files differ
fzzy-igdss-web/src/main/resources/static/img/eoms/imgl5.png
Binary files differ
fzzy-igdss-web/src/main/resources/static/img/eoms/nkt.jpg
Binary files differ
fzzy-igdss-web/src/main/resources/static/img/eoms/rz-01.png
Binary files differ
fzzy-igdss-web/src/main/resources/static/img/eoms/zcl_logo.jpeg
Binary files differ
fzzy-igdss-web/src/main/resources/static/img/web/inout/czxx-bg_03.png
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-banli.png
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-camera-cp.png
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-camera-h.png
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-camera.png
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-chengzhong.png
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-clear.png
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-date.png
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-dayin.png

fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-dengji.png
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-fuwei.png
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-gree.png
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-hyd.png

fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-img-red.png
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-img.png
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-ok.png

fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-red.png
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-shuaxin2.png
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-stop.png
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-xiehuo.png
fzzy-igdss-web/src/main/resources/static/img/web/inout/icon-zhijian.png
fzzy-igdss-web/src/main/resources/static/img/web/inout/inout-img.png
fzzy-igdss-web/src/main/resources/static/img/web/inout/rkbk-photo_03.png
fzzy-igdss-web/src/main/resources/static/inout/inout-check.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,869 @@
//当前节点 å…¥åº“质检
var layer;
var laydate;
var form;
var table;
var scanCodeTag = false;
var page = 1;
var limit = 10;
var curCheckData = null;// å½“前编辑数据
var curCheckItems = null;// å½“前数据的检查项信息
$(function () {
    layui.use(['layer', 'laydate', 'form', 'table'], function () {
        layer = layui.layer;
        form = layui.form;
        table = layui.table;
        laydate = layui.laydate;
        laydate.render({
            elem: '#start',
            theme: '#7b8e9f',
            value: startTime
        });
        laydate.render({
            elem: '#end',
            theme: '#7b8e9f',
            value: endTime
        });
        laydate.render({
            elem: '#foodYear',
            theme: '#7b8e9f',
            value: foodYear,
            type: 'year'
        });
        laydate.render({
            elem: '#checkTime',
            theme: '#7b8e9f',
            format: 'yyyy-MM-dd HH:mm:ss',
            type: 'datetime'
        });
        // åˆå§‹åŒ–表单数据
        renderTable();
        // ç›‘听行工具事件
        table.on('tool(tableData)', function (obj) {
            if (obj.event === 'edit') {
                //更新仓库下拉列表
                updateSelect();
                //展示数据
                showDetail(obj.data);
            }
        });
        //监听粮食品种,获取化验项
        layui.form.on('select(select_foodVariety)', function (data) {
            updateFoodVariety(data.value);
        });
        //监听粮食等级,获取粮食定价
        layui.form.on('select(select_foodLevel)', function (data) {
            getPriceByFoodLevel(data.value);
        });
        //监听化验结果单填写数据,并给出提示结果
        table.on('edit(tableCheckItem)', function (obj) {
            getResult(obj);
        });
    });
    //显示入库流程
    showProgress();
});
window.onbeforeunload = function () {
}
window.onunload = function () {
}
window.onload = function () {
    //扫描枪自动回车事件
    $('#checkId').bind('keyup', function (event) {
        if (event.keyCode == "13") {
            // //去掉焦点,防止刷新页面
            // $('#checkId').blur();
            getDataByCheckId();
        }
    });
};
// socket信息返回處理
function socketOnMessage(packet) {
    layer.alert(packet.data);
    window.parent.sysNotify(packet.data);
}
//控制流程环节显示
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");
    }
}
//根据填写化验数据,给出提醒是否合格
function getResult(obj) {
    var data = obj.data;
    //填写的数据值
    var newValue = data.value;
    //标准值
    var limit = data.upperLimit;
    //运算符
    var symbol = data.operaSymbol;
    if (symbol && limit) {
        if (">=" == symbol) {
            if (newValue < limit) {
                data.result = "0";
            } else {
                data.result = "1";
            }
        }
        if ("<=" == symbol) {
            if (newValue > limit) {
                data.result = "0";
            } else {
                data.result = "1";
            }
        }
        if ("==" == symbol) {
            if (newValue != limit) {
                data.result = "0";
            } else {
                data.result = "1";
            }
        }
    }
    obj.update(data);
    //根据化验结果提醒是否合格
    updateCheckResultTip();
}
//动态更换仓库下拉列表
function updateSelect() {
    $('#depotId option').remove();
    for (var i = 0; i < listDepot.length; i++) {
        $('#depotId').append('<option value="' + listDepot[i].id + '">' + listDepot[i].name + '</option>');
    }
    //重新渲染
    form.render('select');
}
//根据品种获取化验项
function updateFoodVariety(foodVariety) {
    if (null == foodVariety || "" == foodVariety) return;
    form.val("form-detail", {
        foodVariety: foodVariety
    });
    form.render();
    flushCheckItem(foodVariety);
}
//根据选择仓库显示粮食品种
function getPriceByFoodLevel(foodLevel) {
    if (null == foodLevel || "" == foodLevel) return;
    form.val("form-detail", {
        foodLevel: foodLevel
    });
    form.render();
    var data = form.val("form-detail");
    $.ajax({
        type: "POST",
        url: "../../basic/inout/get-price",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(data),
        success: function (result) {
            if (result.code != "0000") {
                layer.msg(result.msg);
            } else {
                $("#check-result-tip2").text("粮食定价:" + result.data.price + "元/公斤");
            }
        },
        error: function () {
            layer.msg("后台异常,请重试或者联系管理员!!");
        }
    });
}
// æŸ¥è¯¢
function flushData() {
    var index = layer.load();
    var param = form.val("form-param");
    table.reload('tableData', {
        url: "../../basic/inout/page-check-data",
        where: param,
    });
    $("thead tr").css({
        "border-bottom": "2px solid #53adce",
        "background": "#eff4f6"
    });
    layer.close(index);
};
// å¯¼å‡ºæ•°æ®-- è·³è½¬æ–°é¡µé¢å¤„理
function exportData() {
    // var url = "com.ld.igds.inout.ReportInoutCheck.d";
    // window.parent.openTab(url, "化验结果导出", "checkDataExport");
};
// æ‰¦æ ·æœºè§£é™¤æ€¥åœ
function checkResetStop() {
    var param = JSON.stringify(checkDto);
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "../../api/check/reset-stop",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: param,
        success: function (result) {
            layer.close(index);
            if (result.code != "0000") {
                layer.alert(result.msg);
            } else {
                layer.msg("操作命令发送成功!");
            }
        },
        error: function () {
            layer.close(index);
            layer.alert("后台异常,操作命令发送失败!");
        }
    });
};
// æ›´æ–°åŒ–验结果提醒,只做提醒,不做自动判断
function updateCheckResultTip() {
    if (!curCheckItems || curCheckItems.length == 0) {
        return;
    }
    if (curCheckData.checkStatus != "NONE") {
        return;
    }
    var msg;
    $.each(curCheckItems, function (index, data) {
        if (!data.result) {
            return true;
        }
        if (data.result == "0") {
            msg = "不合格";
            return false;
        }
        if (data.result == "1") {
            msg = "合格";
        }
    });
    if (msg) {
        $("#check-result-tip").text("质检结果:" + msg);
    } else {
        $("#check-result-tip").text("质检结果:#");
    }
}
/**
 * æ¸²æŸ“表格
 */
function renderTableCheckItem() {
    // æ¸…空数据
    $("#tableCheckItem").empty();
    table.render({
        elem: '#tableCheckItem',
        data: curCheckItems,
        page: false,
        // skin: 'line',
        even: true,
        cols: [[{
            field: 'standardName',
            title: '检验项目',
            align: 'center',
            width: '10%'
        }, {
            field: 'value',
            title: '检验值',
            align: 'center',
            width: '10%',
            edit: 'text'
        }, {
            field: 'operaSymbolValue',
            title: '标准值',
            align: 'center',
            width: '10%'
        }, {
            field: 'unit',
            title: '单位',
            align: 'center',
            width: '10%'
        }, {
            field: 'deNum',
            title: '扣重',
            align: 'center',
            width: '10%',
            edit: 'text'
        }, {
            field: 'addNum',
            title: '增重',
            align: 'center',
            width: '10%',
            edit: 'text'
        }, {
            field: 'dePrice',
            title: '扣价',
            align: 'center',
            width: '10%',
            edit: 'text'
        }, {
            field: 'addPrice',
            title: '增价',
            align: 'center',
            width: '10%',
            edit: 'text'
        }, {
            field: 'result',
            title: '检验结果',
            align: 'center',
            width: '10%',
            templet: function (item) {
                if (item.result == null) {
                    return "";
                }
                if (item.result == '0') {
                    return "不合格";
                }
                if (item.result == '1') {
                    return "合格";
                }
            }
        }, {
            field: 'remarks',
            title: '备注说明',
            align: 'center',
            edit: 'text'
        }]],
        limit: this.curCheckItems.length //显示的数量
    });
    $("thead tr").css({
        "border-bottom": "2px solid #53adce",
        "background": "#eff4f6"
    });
}
function showDetail(data) {
    curCheckData = data;
    if (!curCheckData.checkTime) {
        curCheckData.checkTime = dateFtt("yyyy-MM-dd hh:mm:ss", new Date());
    }
    curCheckData.checkUser = checkUser;
    // èµ‹å€¼
    form.val("form-detail", curCheckData);
    form.render();
    layer.open({
        type: 1,
        title: "化验单明细",
        area: ['1400px', '700px'],
        shade: 0,
        content: $('#checkDetail'),
        btnAlign: 'c',
        btn: ['仅保存', '保存提交', '关闭取消'],
        yes: function () {
            // æ›´æ–°åˆ°é¡µé¢
            var data = form.val("form-detail");
            // åˆå¹¶æ›´æ–°ç•¶å‰ç¼–辑数据
            Object.assign(curCheckData, data);
            saveCheckData();
            if (scanCodeTag) {
                showScanCode();
            }
        }, btn2: function () {
            // æ›´æ–°åˆ°é¡µé¢
            var data = form.val("form-detail");
            // åˆå¹¶æ›´æ–°ç•¶å‰ç¼–辑数据
            Object.assign(curCheckData, data);
            submit();
            if (scanCodeTag) {
                showScanCode();
            }
        }, btn3: function () {
            parent.layer.closeAll();
            if (scanCodeTag) {
                showScanCode();
            }
        },
        closeBtn: 0
    });
    //判断是否化验,若已经化验,则不显示提交按钮,不允许修改化验结果
    if (curCheckData.checkStatus != "NONE") {
        $(".layui-layer-btn0").css('display', 'none');
        $(".layui-layer-btn1").css('display', 'none');
    }
    // èŽ·å–åŒ–éªŒé¡¹ä¿¡æ¯
    flushCheckItem(curCheckData.foodVariety);
    getPriceByFoodLevel(curCheckData.foodLevel);
}
/**
 * åˆ·æ–°åŒ–验结果项
 */
function flushCheckItem(foodVariety) {
    curCheckItems = null;
    $("#check-result-tip").text("检验结果:#");
    $("#price-result-tip2").text("粮食定价:#元/公斤");
    curCheckData.foodVariety = foodVariety;
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "../../basic/inout/get-check-item",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(curCheckData),
        success: function (result) {
            if (result.code != "0000") {
                layer.msg(result.msg);
            } else {
                curCheckItems = result.data;
                // æ ¹æ®åŒ–验结果提醒是否合格
                updateCheckResultTip();
                // é¡µé¢æ¸²æŸ“检测项
                renderTableCheckItem();
                layer.close(index);
            }
        },
        error: function () {
            layer.close(index);
            layer.msg("后台异常,请重试或者联系管理员!!");
        }
    });
};
//仅保存
function saveCheckData() {
    if (!curCheckData.foodVariety) {
        layer.alert("请确认粮食品种!!");
        return;
    }
    curCheckData.checkItems = curCheckItems;
    var index1 = layer.load();
    $.ajax({
        type: "POST",
        url: "../../basic/inout/submit-checkItem",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        async: false,
        data: JSON.stringify(curCheckData),
        success: function (result) {
            if (result.code != "0000") {
                layer.close(index1);
                notify(result.msg, result.data);
            } else {
                layer.closeAll();
                curCheckData = null;
                notify("数据保存成功", result.data);
                flushData();
            }
        },
        error: function () {
            layer.close(index1);
            layer.alert("保存失败,请重新尝试!");
        }
    });
}
//保存提交
function submit() {
    if (curCheckData.checkStatus == "NONE" || curCheckData.checkStatus == "NONE2") {
        layer.alert("请确认化验结果!!");
        return;
    }
    if (!curCheckData.foodVariety) {
        layer.alert("请确认粮食品种!!");
        return;
    }
    if (!curCheckData.foodLevel) {
        layer.alert("请确认粮食等级!!");
        return;
    }
    if (!curCheckData.foodType) {
        layer.alert("请确认粮食性质!!");
        return;
    }
    if (!curCheckData.price) {
        layer.alert("请确认粮食定价,如不考虑定价,请填写0.0");
        return;
    }
    curCheckData.checkItems = curCheckItems;
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "../../basic/inout/submit-check",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        async: false,
        data: JSON.stringify(curCheckData),
        success: function (result) {
            if (result.code != "0000") {
                layer.close(index);
                notify(result.msg, result.data);
            } else {
                parent.layer.closeAll();
                curCheckData = null;
                notify("数据提交成功", result.data);
                flushData();
            }
        },
        error: function () {
            layer.close(index);
            layer.alert("提交失败,请重新尝试!");
        }
    });
}
//扫码弹窗
function showScanCode() {
    //清空表单
    $("#form-sacnCodeDetail")[0].reset();
    form.render();
    //扫码弹窗-赋值true
    scanCodeTag = true;
    layer.open({
        type: 1,
        title: "扫码信息",
        area: ['700px', '320px'],
        shade: 0,
        content: $('#scanCodeDetail'),
        success: function () {
            document.getElementById('checkId').focus();
        },
        btnAlign: 'c',
        btn: ['查询', '关闭取消'],
        yes: function () {
            getDataByCheckId();
        }, btn2: function () {
            scanCodeTag = false;
            layer.closeAll();
        },
        closeBtn: 0
    });
}
//根据质检单号获取信息
function getDataByCheckId() {
    var param = form.val("form-sacnCodeDetail");
    if (!param.checkId) {
        layer.alert("质检单号为空,请扫码或输入质检单号");
    }
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "../../basic/inout/inout-check-scan-code",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(param),
        success: function (result) {
            if (result.code != "0000") {
                layer.close(index);
                $("#form-sacnCodeDetail")[0].reset();
                form.render();
                notify(result.msg, result.data);
            } else {
                updateSelect();
                showDetail(result.data);
            }
        },
        error: function () {
            layer.close(index);
            $("#form-sacnCodeDetail")[0].reset();
            form.render();
            alertError("保存失败,请重新尝试!")
        }
    });
}
// æ¸²æŸ“表单数据
function renderTable() {
    var param = form.val("form-param");
    // æ¸…空数据
    $("#tableData").empty();
    table.render({
        elem: '#tableData',
        url: '../../basic/inout/page-check-data',
        page: true,
        limit: limit,
        even: true,
        method: 'POST',
        contentType: "application/json;charset=UTF-8",
        cols: [[{
            field: 'checkId',
            title: '质检单号',
            width: '10%',
            style: 'color: #f67d06;font-weight: bold'
        }, {
            field: 'plateNum',
            title: '车牌号',
            width: '9%',
            style: 'font-weight: bold'
        }, {
            field: 'registerTime',
            title: '登记时间',
            width: '13%',
            style: 'font-weight: bold'
        }, {
            field: 'sampleStatus',
            title: '是否扦样',
            width: '10%',
            templet: function (item) {
                if (item.sampleStatus == null) {
                    return "未扦样";
                }
                if (item.sampleStatus == 'NONE') {
                    return "未扦样";
                }
                if (item.sampleStatus == 'SAMPLE') {
                    return "已扦样";
                }
            }
        }, {
            field: 'sampleUser',
            title: '扦样人',
            width: '10%',
            style: 'font-weight: bold'
        }, {
            field: 'sampleTime',
            title: '扦样时间',
            width: '13%',
            style: 'font-weight: bold'
        }, {
            field: 'foodVariety',
            title: '粮食品种',
            width: '9%',
            templet: function (item) {
                var result = item.foodVariety;
                $.each(listFoodVariety, function (index, data) {
                    if (item.foodVariety == data.code) {
                        result = data.name;
                        return true;
                    }
                });
                return result == null ? "" : result;
            }
        }, {
            field: 'depotId',
            title: '装卸仓库',
            width: '10%',
            templet: function (item) {
                var result = item.depotId;
                $.each(listDepot, function (index, data) {
                    if (item.depotId == data.id) {
                        result = data.name;
                        return true;
                    }
                });
                return result == null ? "" : result;
            }
        }, {
            field: 'checkStatus',
            title: '检验结果',
            style: 'font-weight: bold',
            templet: function (item) {
                if (item.checkStatus == 'NONE') {
                    return "未化验";
                }
                if (item.checkStatus == 'PASS') {
                    return "合格";
                }
                if (item.checkStatus == 'UNPASS') {
                    return "不合格";
                }
                return item.checkStatus == null ? "" : item.checkStatus;
            }
        }, {
            field: '',
            title: '操作',
            width: '8%',
            toolbar: "#barControl"
        }]],
        where: param,
        parseData: function (res) {
            if ("0000" == res.code) {
                return {
                    "code": "0",
                    "msg": res.msg,
                    "count": res.data.total,
                    "data": res.data.records
                }
            } else {
                return {
                    "code": "1",
                    "msg": res.msg
                }
            }
        }
    });
    $("thead tr").css({
        "border-bottom": "2px solid #53adce",
        "background": "#eff4f6"
    });
}
// è¡¨å•清空
function resetForm() {
    $("#form-param")[0].reset();
    form.render();
}
// ---------------------------粮食产地 -开始 -------------------//
// å¼¹å‡ºç²®é£Ÿäº§åœ°ä¸‹æ‹‰æ¡†
function showFoodLocation() {
    var index = layer.load();
    // æ¸²æŸ“往来单位列表
    table.render({
        elem: '#tableFoodLoaction',
        url: '../../basic/common/page-food-location',
        page: false,
        toolbar: '#toolbarFoodLocaton',
        even: true,
        method: 'POST',
        contentType: "application/json;charset=UTF-8",
        cols: [[{
            field: 'code',
            title: '编码',
        }, {
            field: 'simple',
            title: '简拼',
        }, {
            field: 'name',
            title: '名称',
            width: '60%'
        }]],
        where: {
            "page": 1,
            "limit": 100
        },
        parseData: function (res) {
            if ("0000" == res.code) {
                return {
                    "code": "0",
                    "msg": res.msg,
                    "count": res.data.total,
                    "data": res.data.records
                }
            } else {
                return {
                    "code": "1",
                    "msg": res.msg
                }
            }
        },
        done: function (res) {
            layer.close(index);
        }
    });
    //双击显示选中数据
    table.on('rowDouble(tableFoodLoaction)', function (obj) {
        var data = obj.data;
        // èµ‹å€¼
        form.val("form-detail", {
            foodLocation: data.name,
        });
        // å…³é—­
        layer.close(index2);
    });
    // å¼¹å‡ºå¯¹è¯æ¡†
    var index2 = layer.open({
        type: 1,
        title: "选择粮产地",
        area: ['600px', '600px'],
        shade: 0,
        content: $('#listFoodLocation'),
        btn: 0,
        btn: ['取消'],
        yes: function () {
            // å…³é—­
            layer.close(index2);
        },
        closeBtn: 0
    });
};
// åˆ·æ–°
function flushFoodLocation() {
    var key = $("#key2").val();
    table.reload('tableFoodLoaction', {
        url: "../../basic/common/page-food-location",
        where: {
            key: key
        },
        done: function (res) {
            if (key) {
                $("#key2").val(key);
            }
        }
    });
};
/**
 * å¼¹å‡ºæé†’框
 * @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']});
    }
}
// ---------------------------粮食产地 -结束 -------------------//
fzzy-igdss-web/src/main/resources/static/inout/inout-common.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,73 @@
//控制流程环节显示
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");
    }
}
//错误提醒
function alertError(msg) {
    layer.alert(msg, {
        icon: 5,
        offset: ['300px', '300px']
    });
}
function alertSuccess(msg) {
    layer.alert(msg, {
        icon: 1,
        offset: ['300px', '300px']
    });
}
/**
 * å¼¹å‡ºæé†’框
 * @param msg æé†’信息
 * @param data æ•°æ®ä¿¡æ¯ï¼Œå¯èƒ½ä¸ºç©º
 */
function notifyProgress(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 {
        alertError(msg);
    }
}
fzzy-igdss-web/src/main/resources/static/inout/inout-print.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,53 @@
/**
 * æ‰“印过磅单
 */
printWeight = function (htmlStr) {
    // var LODOP = CLODOP
    var LODOP = getLodop();
    if ("5016" == companyId || "5326" == companyId || "5347" == companyId || "5352" == companyId) {
        LODOP.PRINT_INIT("称重单");
        //值为1--纵向打印,固定纸张;
        // å€¼ä¸º2--横向打印,固定纸张;
        // å€¼ä¸º3--纵向打印,固定宽度,高度按打印内容的高度自适应;
        LODOP.SET_PRINT_PAGESIZE(1, 1050, 1400, "");
        LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", htmlStr);
        LODOP.PREVIEW();
    } else {
        LODOP.PRINT_INIT("过磅单");
        //LODOP.SET_PRINT_PAGESIZE(1, 0, '90mm', "A4");
        LODOP.SET_PRINT_PAGESIZE(1, '210mm', '140mm', "A4");
        LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", htmlStr);
        //打印多份
        // LODOP.SET_PRINT_COPIES(3);
        LODOP.PREVIEW();
    }
};
//打印扦样单条形码,checkId-条形码,html-库区名称和扦样时间
printBar = function (checkId, html) {
    var LODOP = getLodop();
    if(companyId && "5317" == companyId){
        LODOP.PRINT_INIT("");
        LODOP.SET_PRINT_PAGESIZE(1, '60mm', '40mm', '');
        LODOP.ADD_PRINT_BARCODE(20, 30, '50mm', 80, "128A", checkId);
        LODOP.ADD_PRINT_HTM(110, 20, '50mm', 80, html);
        LODOP.SET_PRINT_STYLEA(0, "FontSize", 18);
        LODOP.SET_PRINTER_INDEX("条码打印机");//指定打印机
        LODOP.PREVIEW();
    }else {
        LODOP.PRINT_INIT("");
        LODOP.SET_PRINT_PAGESIZE(1, '80mm', '60mm', '');
        LODOP.ADD_PRINT_BARCODE(20, 30, '70mm', 80, "128A", checkId);
        LODOP.ADD_PRINT_HTM(110, 10, '70mm', 80, html);
        LODOP.SET_PRINT_STYLEA(0, "FontSize", 18);
        LODOP.SET_PRINTER_INDEX("条码打印机");//指定打印机
        LODOP.PREVIEW();
    }
};
fzzy-igdss-web/src/main/resources/static/inout/inout-register.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,699 @@
//称重-包括空车和满车称重
var layer;
var form;
var table;
var recordData = null;// ä¸šåŠ¡æ•°æ®ä¿¡æ¯
var snapData;//系统抓拍对象信息
var timerWeight;
var paramIntelCard;//设备识别结果
var paramIdCard;//设备识别结果
var curCheckItems = null;// å½“前数据的检查项信息
var step = 1;
$(function () {
    layui.use(['layer', 'laydate', 'form', 'table', 'util'], function () {
        var util = layui.util;
        layer = layui.layer;
        form = layui.form;
        table = layui.table;
        layui.laydate.render({
            elem: '#test1',
            theme: '#7b8e9f'
        });
        // å³ä¸‹è§’添加固定信息
        util.fixbar({
            bar1: true,
            css: {
                left: 10,
                bottom: 10
            },
            bgcolor: '#53adce',
            click: function (type) {
                if (type === 'bar1') {
                    layer.closeAll();
                    layer.open({
                        type: 2,
                        title: false,
                        shadeClose: true,
                        shade: 0.3,
                        closeBtn: 2,
                        offset: ['50px', '120px'],
                        area: ['1000px', '640px'],
                        content: '../../basic/inout/inout-progress?type=' + type + "&t=" + Math.random()
                    });
                }
            }
        });
        //监听选择数据事件
        table.on('tool(tableListProgressData)', function (obj) {
            var data = obj.data;
            if (obj.event === 'select') {
                //清空表单
                resetForm();
                flushData(data.intelCard, null);
                layer.closeAll();
            }
        });
    });
    //显示流程环节
    showProgress();
    // ç›‘听重量变化
    $(".weight").blur(function () {
        deAutoByIn(this.name);
    });
    // åˆå§‹åŒ–WebSocket
    // initInoutWS(companyId, bizType, progress, userId);
});
window.onload = function () {
    //自动连接地磅信息,2.5秒获取一次地磅重量信息
    clearInterval(timerWeight);
    timerWeight = setInterval(function () {
        flushWeight();
    }, 2500);
    // åŠ è½½è§†é¢‘
    initVideo(snapDto1, snapDto2, snapDto3);
    //设置地磅
    $("#scaleName").val(weightDto.sort);
    //监听地磅选择
    $("#scaleName").change(function () {
        layer.confirm('调整地磅需重新加载页面,确定调整?', {
            btn: ['确定', '取消']
        }, function () {
            updateWeight();
        });
    });
};
// socket信息返回處理
function socketOnMessage(packet) {
    //暂无
}
//点击称重
function weight() {
    // æ²¡æœ‰ä¸šåŠ¡æ•°æ®ä¸å¯æ‰§è¡Œ
    if (!recordData) {
        alertError("没有查询到业务数据,执行被拒绝!");
        return;
    }
    // å¦‚果是空车称重
    if (InoutProgress.WEIGHT_EMPTY == recordData.progress) {
        form.val("form-data", {
            emptyWeight: weightDto.weight
        });
        form.render();
    }
    // å¦‚果是满车称重
    if (InoutProgress.WEIGHT_FULL == recordData.progress) {
        form.val("form-data", {
            fullWeight: weightDto.weight
        });
        form.render();
    }
    // ç‚¹å‡»ç§°é‡è‡ªåŠ¨è°ƒç”¨æŠ“æ‹
    snapData = {
        companyId: companyId,
        deptId: deptId,
        progress: recordData.progress,
        bizType: type,
        bizId: recordData.id,
        plateNum: recordData.plateNum,
        id1: snapDto1.id,
        id2: snapDto2.id,
        id3: snapDto3.id,
        id4: snapDto2.id,
        sort: $("#scaleName").val(),
        weight: weightDto.weight
    };
    //当前AJAX服务为同步服务,返回数据包装照片信息
    var index = layer.load();
    $.ajax({
        sync: false,
        type: "POST",
        url: "../../inout/api/snap-img",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(snapData),
        success: function (result) {
            layer.close(index);
            if (result.code != "0000") {
                alertError(result.msg);
            } else {
                snapData = result.data;
            }
        },
        error: function () {
            layer.close(index);
            alertError("后台调用截图失败,请重新尝试");
        }
    });
    //如果是第二次称重,默认执行自动计算
    if (InoutProgress.WEIGHT_EMPTY == recordData.progress) {
        deAutoByIn("emptyWeight");
    }
}
// ä½¿ç”¨æ’件获取身份证
function flushIdCard() {
    var index = layer.load();
    $.ajax({
        type: "GET",
        async: true,
        url: "http://127.0.0.1:9111/IDCARD",
        data: {},
        dataType: "json",
        // jsonp: "callback",
        // jsonpCallback: "jsonpCallback",
        success: function (json) {
            layer.close(index);
            var data = json;
            if (data.code === "200" || data.code == 200) {
                paramIdCard = data.idNum;
                $("#text-param").text("识别身份证:" + paramIdCard);
                flushData(null, paramIdCard);
            } else {
                alertError("没有读取到身份证信息!");
                return;
            }
        },
        error: function () {
            alertError("没有读取到身份证信息!");
            layer.close(index);
        }
    });
}
function flushByHand() {
    var intelCard = $("#intelCard").val();
    flushData(intelCard, null);
}
/**
 * æ‰‹åŠ¨é€‰æ‹©ï¼ŒèŽ·å–å¾…ç§°é‡çš„æ•°æ®ï¼Œå¼¹å‡ºé€‰æ‹©
 */
function selectByHand() {
    var param = {
        deptId: deptId,
        type: type,
        timer: Math.random()
    };
    $.ajax({
        type: "POST",
        url: "../../basic/inout/list-only-progress",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(param),
        success: function (result) {
            if (result.code != "0000") {
                layer.msg(result.msg);
            } else {
                renderTableProgressData(result.data);
            }
        },
        error: function () {
            layer.msg("系统获取数据出现异常,重新尝试");
        }
    });
}
function flushWeight() {
    var ip = "127.0.0.1";
    if (weightDto.ip) {
        ip = weightDto.ip;
    }
    var port = "9111";
    if (weightDto.port) {
        port = weightDto.port;
    }
    var sn = "WEIGHT";
    if (weightDto.sn) {
        sn = weightDto.sn;
    }
    var url = "http://" + ip + ":" + port + "/" + sn;
    $.ajax({
        type: "GET",
        async: true,
        timeout: 2000,
        url: url,
        data: {},
        dataType: "json",
        success: function (json) {
            var data = json.content;
            if (!data) data = 0.0;
            weightDto.weight = data;
            $("#weightValue").text(data);
            $("#img_scale_statule").attr("src", "/img/web/inout/icon-gree.png");
        },
        error: function () {
            weightDto.weight = 0.0;
            $("#weightValue").text("0.0");
            $("#img_scale_statule").attr("src", "/img/web/inout/icon-red.png");
        }
    });
}
// ç‚¹å‡»æ‰“印,系统判断是否已经执行完成,如果已经完成,直接打印,如果未完成则先执行完成
function printBill() {
    if (!recordData) {
        alertError("没有获取到业务数据,打印被拒绝!");
        return;
    }
    // ä»ŽåŽå°èŽ·å–æ¨¡ç‰ˆå¹¶æ‰“å°
    var data = form.val("form-data");
    // åˆå¹¶æ›´æ–°ç•¶å‰ç¼–辑数据
    Object.assign(recordData, data);
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "../../basic/inout/report/bill-weight",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(recordData),
        success: function (result) {
            layer.close(index);
            if (result.code != "0000") {
                alertError(result.msg);
            } else {
                layer.msg("开始渲染打印单……");
                printWeight(result.data);
            }
        },
        error: function () {
            layer.close(index);
            alertError("获取打印模版失败,请联系管理员查看原因");
        }
    });
}
// è¡¨å•清空
function resetForm() {
    $("#form-data")[0].reset();
    form.render();
    recordData = null;
    weightDto.weight = 0.0;
    $("#weightValue").text("0.0");
    $("#img_scale_statule").attr("src", "/img/web/inout/icon-red.png");
    $("#text-param").val(null);
}
function flushPage() {
    layer.confirm('确定要刷新页面吗?', {icon: 3, title: '提示'}, function (index) {
        resetForm();
        layer.close(index);
    });
}
//监听表单里的数值变化
document.getElementById('intelCard').addEventListener('input', function (event) {
    var intelCard = $("#intelCard").val();
    if (intelCard.length == 10) {
        flushData(intelCard, null);
    }
});
// --查询方法,获取身份证号、卡号、车牌号,进行查询
function flushData(intelCard, userIdCard) {
    var index = layer.load();
    var userIdCard = userIdCard;
    var intelCard = intelCard;
    var plateNum = $("#plateNum").val();
    var param = {
        type: type,
        progress: progress,
        intelCard: intelCard,
        userId: userIdCard,
        plateNum: plateNum
    };
    $.ajax({
        type: "POST",
        url: "../../basic/inout/inout-query",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(param),
        success: function (result) {
            layer.close(index);
            if (result.code != "0000") {
                notifyProgress(result.msg, result.data);
            } else {
                recordData = result.data;
                // è¿”回的数据进行赋值
                form.val("form-data", recordData);
                form.render();
                updateEditAndProgress();
            }
        },
        error: function () {
            layer.close(index);
            alertError("查询失败,请重新尝试");
        }
    });
}
/**
 * æ ¹æ®ä¸šåŠ¡æ•°æ®æ›´æ–°é¡µé¢ä¸­çš„çŠ¶æ€
 */
function updateEditAndProgress() {
    if (recordData) {
        if (InoutProgress.WEIGHT_EMPTY == recordData.progress) {
            $("#emptyWeight").removeClass("rkbk-search-input");
            $("#emptyWeight").attr("disabled", false);
            $("#progress-hand").addClass("active");
            $("#progress-emptyWeight").addClass("active");
            $("#fullWeight").addClass("rkbk-search-input");
            $("#fullWeight").attr("disabled", true);
        }
        if (InoutProgress.WEIGHT_FULL == recordData.progress) {
            $("#fullWeight").removeClass("rkbk-search-input");
            $("#fullWeight").attr("disabled", false);
            $("#progress-hand").removeClass("active");
            $("#progress-emptyWeight").removeClass("active");
            $("#emptyWeight").addClass("rkbk-search-input");
            $("#emptyWeight").attr("disabled", true);
        }
    } else {
        $("#fullWeight").addClass("rkbk-search-input");
        $("#fullWeight").attr("disabled", true);
        $("#emptyWeight").addClass("rkbk-search-input");
        $("#emptyWeight").attr("disabled", true);
        $("#progress-hand").removeClass("active");
        $("#progress-emptyWeight").removeClass("active");
    }
    //根据配置信息设置地磅是否可编辑
    if (weightEditTag && weightEditTag == 'N') {
        $("#fullWeight").addClass("rkbk-search-input");
        $("#fullWeight").attr("disabled", true);
        $("#emptyWeight").addClass("rkbk-search-input");
        $("#emptyWeight").attr("disabled", true);
    }
}
// å½“前完成
function submit() {
    if (!recordData) {
        alertError("没有业务数据信息,执行被拒绝");
        return;
    }
    var data = form.val("form-data");
    if (!data.depotId) {
        alertError("提示:装卸仓库必填");
        return;
    }
    if (!data.customerName) {
        alertError("提示:客户名称必填");
        return;
    }
    // æ ¡éªŒ-入库满车称重
    if (InoutProgress.WEIGHT_FULL == recordData.progress) {
        if (data.fullWeight <= 0.0) {
            alertError("提示:满车称重信息必填");
            return;
        }
    }
    if (InoutProgress.WEIGHT_EMPTY == recordData.progress) {
        if (data.emptyWeight <= 0.0) {
            alertError("提示:空车称重信息必填");
            return;
        }
        if (!data.foodVariety) {
            alertError("提示:粮食品种必填");
            return;
        }
        if (!data.settleWeight || data.settleWeight <= 0.0) {
            alertError("结算重量不合规,请核对");
            return;
        }
        if (!data.recordWeight || data.recordWeight <= 0.0) {
            alertError("入库重量不合规,请核对");
            return;
        }
    }
    //合并数据
    Object.assign(recordData, data);
    // èŽ·å–ç…§ç‰‡
    var files = [{
        fileName: snapData.fileName1
    }, {
        fileName: snapData.fileName2
    }, {
        fileName: snapData.fileName3
    }, {
        fileName: snapData.fileName4
    }];
    recordData.files = files;
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "../../basic/inout/submit-weight",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(recordData),
        success: function (result) {
            if (result.code != "0000") {
                alertError(result.msg);
            } else {
                notify("数据提交成功", result.data);
                if (InoutProgress.WEIGHT_FULL == recordData.progress) {
                    resetForm();
                }
            }
            layer.close(index);
        },
        error: function () {
            layer.close(index);
            alertError("提交失败,请重新尝试");
        }
    });
}
//显示质检信息
function showCheck() {
    if (!recordData) {
        alertError("没有业务数据信息,执行被拒绝");
        return;
    }
    // èŽ·å–åŒ–éªŒé¡¹ä¿¡æ¯
    flushCheckItem();
    layer.open({
        type: 1,
        title: "质检详细",
        offset: ['120px', '100px'],
        area: ['1000px', '520px'],
        shade: 0,
        content: $('#checkDetail'),
        btnAlign: 'c',
        btn: ['取消'],
        yes: function () {
            layer.closeAll();
        },
        closeBtn: 0
    });
}
/**
 * åˆ·æ–°åŒ–验结果项
 */
function flushCheckItem() {
    curCheckItems = null;
    $.ajax({
        type: "POST",
        url: "../../basic/inout/get-check-item",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(recordData),
        success: function (result) {
            if (result.code != "0000") {
                layer.msg(result.msg);
            } else {
                curCheckItems = result.data;
                // é¡µé¢æ¸²æŸ“检测项
                renderTableCheckItem();
            }
        },
        error: function () {
            layer.msg("后台异常,请重试或者联系管理员!!");
        }
    });
}
/**
 * å¼¹å‡ºæé†’框
 * @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']});
    }
}
/**
 * æ¸²æŸ“表格
 */
function renderTableCheckItem() {
    // æ¸…空数据
    $("#tableCheckItem").empty();
    table.render({
        elem: '#tableCheckItem',
        data: curCheckItems,
        page: false,
        even: true,
        cols: [[{
            field: 'standardName',
            title: '检验项目',
            align: 'center',
            width: '13%'
        }, {
            field: 'value',
            title: '检验值',
            align: 'center',
            width: '9%'
        }, {
            field: 'operaSymbolValue',
            title: '标准值',
            align: 'center',
            width: '10%'
        }, {
            field: 'unit',
            title: '单位',
            align: 'center',
            width: '10%'
        }, {
            field: 'deNum',
            title: '扣重',
            align: 'center',
            width: '9%'
        }, {
            field: 'addNum',
            title: '增重',
            align: 'center',
            width: '9%'
        }, {
            field: 'dePrice',
            title: '扣价',
            align: 'center',
            width: '9%'
        }, {
            field: 'addPrice',
            title: '增价',
            align: 'center',
            width: '9%'
        }, {
            field: 'result',
            title: '检验结果',
            align: 'center',
            width: '10%',
            templet: function (item) {
                if (item.result == null) {
                    return "";
                }
                if (item.result == '0') {
                    return "不合格";
                }
                if (item.result == '1') {
                    return "合格";
                }
            }
        }, {
            field: 'remarks',
            title: '备注说明',
            align: 'center'
        }]]
    });
    $("thead tr").css({
        "border-bottom": "2px solid #53adce",
        "background": "#eff4f6"
    });
}
function renderTableProgressData(list) {
    // æ¸…空数据
    $("#tableListProgressData").empty();
    layer.open({
        type: 1,
        title: "选择流程中车辆",
        offset: ['120px', '100px'],
        area: ['1000px', '520px'],
        shade: 0,
        content: $('#listProgressData'),
        closeBtn: 1
    });
    table.render({
        elem: '#tableListProgressData',
        data: list,
        page: true,
        even: true,
        cols: [[
            {type: 'numbers'}, {
                field: 'id',
                title: '单据号',
                align: 'center'
            }, {
                field: 'userName',
                title: '承运人',
                align: 'center'
            }, {
                field: 'plateNum',
                title: '车牌号',
                align: 'center'
            }, {fixed: 'right', title: '选择操作', align: 'center', toolbar: '#barSelectProgress'}]]
    });
    $("thead tr").css({
        "border-bottom": "2px solid #53adce",
        "background": "#eff4f6"
    });
}
fzzy-igdss-web/src/main/resources/static/inout/inout-style.css
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,956 @@
@charset "utf-8";
/*-----------------
  Author:xq
  update:2020
 -------------------*/
@font-face {
    font-family: DINCond-Bold;
    src: url('../fonts/DINCond-Bold.otf');
}
@font-face {
    font-family: DigitalNumbers;
    src: url(../fonts/DigitalNumbers.ttf);
}
body {
    font-family: "微软雅黑", Arial, sans-serif;
    font-size: 14px;
    background: #f3f5f8;
}
i, em {
    font-style: normal;
}
.radius-3,
.layui-btn,
.layui-input {
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    -ms-border-radius: 3px;
    -o-border-radius: 3px;
    border-radius: 3px;
    border-color: #bfbfbf !important;
}
.radius-6,
.rk-step li:before {
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    -ms-border-radius: 6px;
    -o-border-radius: 6px;
    border-radius: 6px;
}
.rkbk-tit > i,
.rkbk-tit > i:before,
.rk-step-span,
.ckdj-radiobox .layui-form-radio:after {
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    -ms-border-radius: 50%;
    -o-border-radius: 50%;
    border-radius: 50%;
}
.box-shadow {
    -webkit-box-shadow: 0px 0px 9px 3px rgba(230, 230, 230, 0.6);
    -moz-box-shadow: 0px 0px 9px 3px rgba(230, 230, 230, 0.6);
    box-shadow: 0px 0px 9px 3px rgba(230, 230, 230, 0.6);
}
.fl {
    float: left;
}
.fr {
    float: right;
}
input::-webkit-input-placeholder {
    color: #b3babf
}
input::-moz-placeholder {
    /* Mozilla Firefox 19+ */
    color: #b3babf;
}
input:-moz-placeholder {
    /* Mozilla Firefox 4 to 18 */
    color: #b3babf;
}
input:-ms-input-placeholder {
    /* Internet Explorer 10-11 */
    color: #b3babf;
}
/*rk-bk*/
.l-container {
    width: 100%;
    /*max-width: 1680px;*/
    min-width: 1340px;
    margin-left: auto;
    margin-right: auto;
}
.rk-main {
    margin: 0 20px;
    position: relative;
}
.rkbk-quick {
    height: 34px;
    width: 100%;
    margin: 30px 0;
}
.rkbk-quick-btn {
    height: 34px;
    /*width: 150px;*/
    min-width: 100px;
    display: inline-block;
    line-height: 34px;
    font-size: 16px;
}
.layui-btn {
    background-color: #2ab5ad;
}
.layui-btn i {
    display: inline-block;
    width: 24px;
    height: 24px;
    position: relative;
    top: -2px;
}
.layui-btn i img {
    width: 100%;
    height: 100%;
}
.rkbk-searchBox {
    padding: 20px 40px;
    background: #fff;
}
.rkbk-search-item {
    height: 34px;
    width: 28%;
    margin-right: 8%;
    position: relative;
}
.rkbk-search-item.mr-0 {
    margin-right: 0;
}
.rkbk-search-tit,
.rkbk-search-btn {
    width: 80px;
    height: 34px;
    line-height: 34px;
    font-size: 16px;
    position: absolute;
    top: 0;
    z-index: 3;
}
.rkbk-search-tit {
    left: 0;
    color: #324251;
    text-align: right;
}
.rkbk-search-btn {
    right: 0;
}
.rkbk-search-inputbox {
    margin: 0 90px;
}
.rkbk-search-input {
    /*     height: 34px; */
    line-height: 34px;
    padding-right: 10px;
    font-size: 16px;
    /*color: #666;*/
    color: #000;
    background: #eff4f6;
    border-color: #eff4f6;
}
.layui-btn-normal {
    background: #53adce;
}
.rkbk-con {
    width: 100%;
    overflow: hidden;
    margin-top: 15px;
}
.rkbk-left-wrap {
    width: 52%;
}
.rkbk-right-wrap {
    width: 46%;
}
.rkbk-left-wrap,
.rkbk-right-wrap {
    /*background: #dee6ec;*/
    background: #dee6ec;
    min-height: 560px;
}
.rkbk-left {
    padding: 0 40px 0 20px;
}
.rkbk-tit {
    height: 30px;
    line-height: 30px;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}
.rkbk-tit h3 {
    color: #324251;
    font-size: 18px;
    font-weight: bold;
}
.rkbk-tit > i {
    width: 14px;
    height: 14px;
    display: inline-block;
    background: #53adce;
    position: relative;
    float: left;
    margin: 8px 10px 0 0;
}
.rkbk-tit > i:before {
    display: block;
    content: '';
    width: 6px;
    height: 6px;
    background: #fff;
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -3px;
    margin-top: -3px;
    z-index: 3;
}
.rkbk-form-box1 {
    height: 304px;
    position: relative;
    padding-right: 315px;
}
.rkbk-photo {
    position: absolute;
    width: 270px;
    height: 304px;
    z-index: 9;
    right: 0;
    top: 0;
}
.rkbk-photo img {
    width: 100%;
    height: 100%;
}
.rkbk-left-form .layui-form-label,
.qyzj-con-top .layui-form-label {
    color: #324251;
    font-size: 16px;
    padding: 7px 15px;
}
.rkbk-search-input.bg-date {
    background: #eff4f6 url(../img/web/inout/icon-date.png) 98% center no-repeat;
}
.rkbk-left-form .layui-form-item {
    margin-bottom: 20px;
}
.rkbk-selBox .layui-form-select .layui-input {
    height: 34px;
    font-size: 16px;
    line-height: 34px;
    /*background: #eff4f6;*/
    background: #FFFFFF;
    border-color: #eff4f6;
}
.rkbk-selBox .layui-form-select dl {
    top: 36px;
}
.rkbk-left-form .layui-input-block {
    min-height: 34px;
}
.rkbk-form-box2,
.rkbk-left-form {
    margin-top: 20px;
    width: 100%;
}
.rkbk-right-form .layui-input-block {
    margin-right: 150px;
}
.rkbk-r-btn {
    width: 130px;
    height: 34px;
    line-height: 34px;
    font-size: 16px;
}
.rk-step-wrap {
    padding: 8px 0 8px;
    border-bottom: 1px solid #d1d7de;
    text-align: center;
}
.rk-step {
    height: 60px;
    margin: 0 auto;
    text-align: center;
    overflow: hidden;
}
.rk-step li {
    width: 60px;
    height: 40px;
    display: inline-block;
    margin: 0 25px;
    position: relative;
}
.rk-step-span {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    background: #c9d0d7;
}
.rk-step-span img {
    width: 30px;
    height: 30px;
}
.rk-step li p {
    line-height: 16px;
    font-size: 14px;
    color: #000;
    height: 16px;
    overflow: hidden;
    margin: 5px 0 0;
    font-weight: bold;
}
.rk-step li:before {
    display: block;
    content: '';
    width: 60px;
    height: 6px;
    background: #dee2e7;
    position: absolute;
    left: -57px;
    z-index: 3;
    top: 20px;
}
.rk-step li.rk-step-first:before {
    display: none;
}
.rk-step li.active .rk-step-span {
    background: #53adce;
}
.rk-step li.active:before {
    background: #a3d1e3;
}
.btn-green {
    background-color: #8bc16a;
}
.btn-violet {
    background-color: #7494d1;
}
.btn-red {
    background-color: #e37878;
}
.btn-blue {
    background-color: #53adce;
}
.layui-btn-primary {
    font-size: 16px;
    color: #324251;
    background: none;
    border-color: #9fabb6;
}
.layui-btn.btn-sm {
    width: 130px;
}
/*rk-ckdj*/
.layui-text-center {
    text-align: center;
}
.ckdj-radiobox .layui-form-item {
    margin-bottom: 0;
    margin-top: 20px;
}
.ckdj-radiobox .layui-form-label {
    /*padding-left: 0;*/
    /*padding-right: 0;*/
    /*!*width: 100px;*!*/
    /*text-align: left;*/
}
.ckdj-radiobox .layui-form-label,
.ckdj-radiobox .layui-form-radio > div {
    color: #324251;
    font-size: 16px;
}
.ckdj-radiobox .layui-form-radio {
    position: relative;
}
.ckdj-radiobox .layui-form-radio > i {
    position: relative;
    z-index: 9;
}
.ckdj-radiobox .layui-form-radio:after {
    background: #fff;
    width: 20px;
    height: 20px;
    overflow: hidden;
    display: block;
    content: '';
    position: absolute;
    left: 1px;
    top: 4px;
    z-index: 1;
}
.ckdj-radiobox .layui-form-radio > i:hover,
.ckdj-radiobox .layui-form-radioed > i {
    color: #5bb1d0;
}
.jiange-bowen img {
    width: 100%;
}
.mb-20 {
    margin-bottom: 20px;
}
.pl-20 {
    padding-left: 20px;
}
.mr-30 {
    margin-right: 30px;
}
/*rk-qyzj*/
.qyzj-btnbox {
    margin-top: 20px;
    width: 100%;
}
.btn-34 {
    height: 34px;
    line-height: 34px;
}
.qyzj-btnbox .layui-btn {
    margin-bottom: 0;
}
.qyzj-btn-sm {
    padding: 0 11px;
}
.qyzj-btnbox .rkbk-quick {
    margin: 0;
    width: auto;
}
.qyzj-con {
    padding: 20px;
    background: #fff;
    margin-top: 20px;
}
.qyzj-con-top .layui-input-block {
    min-height: 34px;
}
.qyzj-top-btn {
    /*width: 80px;*/
    height: 34px;
    line-height: 34px;
    font-size: 16px;
}
.layui-text-right {
    text-align: right;
}
.qyzj-tabBox {
    margin-top: 15px;
    overflow: hidden;
    width: 100%;
}
.qyzj-tabBox td,
.qyzj-tabBox th {
    text-align: center;
    color: #283a48;
}
.qyzj-tabBox .qyzj-table-tit {
    border-bottom: 1px solid #53adce;
    background: #eff4f6;
}
.qyzj-tabBox tbody tr:nth-child(2n) {
    background: #f6f8f9;
}
.qyzj-page-wrap {
    margin-top: 20px;
    width: 100%;
}
.page-box1 {
    color: #48536e;
}
.page-box1 a,
.page-input {
    display: inline-block;
    width: 26px;
    height: 26px;
    text-align: center;
    line-height: 26px;
    border: 1px solid #bcc4cc;
    font-size: 14px;
    color: #9fabb6;
    font-family: "arial";
}
.page-box1 a:hover,
.page-box1 a.active {
    border-color: #53adce;
    color: #fff;
    background: #53adce;
}
.page-box1 a:last-child,
.page-box1 a:first-child {
    font-family: "宋体";
    font-weight: bold;
}
.page-box2,
.page-box3 {
    margin-left: 30px;
}
.page-box2 select {
    border: 1px solid #bcc4cc;
    color: #9fabb6;
    width: 94px;
    font-size: 14px;
    height: 28px;
}
.page-box3 {
    line-height: 28px;
    font-size: 14px;
    color: #9fabb6;
}
.page-input {
    font-family: "微软雅黑";
    margin: 0 10px;
}
/*rk-kccz*/
.kccz-con {
    width: 100%;
    overflow: hidden;
    margin: 20px 0;
}
.kccz-left {
    width: 73%;
}
.kccz-right {
    width: 26%;
}
.kccz-left,
.kccz-right {
    min-height: 560px;
}
.kccz-left-box1 {
    /*background: #fff;*/
    background:#dee6ec;
    padding: 1px 20px 20px 20px;
}
.kccz-czxx-wrap {
    padding-left: 24px;
    /*margin-top: 20px;*/
}
.kccz-czxx-left .layui-form-item {
    margin-bottom: 0;
}
.kccz-czxx-left .layui-form-label {
    color: #324251;
    font-size: 16px;
    padding: 7px 0;
    text-align: left;
}
.kccz-czxx-left .layui-input-block {
    margin-left: 80px;
    min-height: 34px;
}
.kccz-czxx-dl {
    line-height: 24px;
    overflow: hidden;
}
.kccz-czxx-dl dt,
.kccz-czxx-dl dd {
    float: left;
    line-height: 24px;
}
.kccz-czxx-dl dt {
    width: 80px;
    height: 24px;
    color: #000;
    font-size: 18px;
}
.kccz-czxx-dl dt i {
    width: 24px;
    height: 24px;
    display: inline-block;
    margin-right: 5px;
}
.kccz-czxx-dl dt i img {
    width: 100%;
    height: 100%;
    vertical-align: top;
}
.kccz-czxx-dl dd {
    color: #9fabb6;
    font-size: 14px;
    margin-left: 30px;
}
.kccz-czxx-num {
    height: 90px;
    background: url(../img/web/inout/czxx-bg_03.png) center repeat-x;
    text-align: center;
    line-height: 90px;
    margin-top: 15px;
    color: #ff0000;
}
.kccz-czxx-num span {
    font-size: 70px;
    font-family: "DigitalNumbers";
}
.kccz-czxx-num em {
    font-size: 50px;
    margin-left: 10px;
    font-family: "DINCond-Bold";
}
.kccz-r-item {
    height: 220px;
    background: #fff;
    overflow: hidden;
}
.kccz-r-box {
    padding: 0 10px;
}
.kccz-r-box .rkbk-tit {
    margin: 5px 0;
}
.kccz-r-con {
    height: 170px;
    position: relative;
}
.kccz-r-vedio {
    width: 100%;
    height: 170px;
    background: #dee6ec;
}
.kccz-r-vedio img,
.kccz-r-vedio video {
    width: 100%;
    height: 100%;
}
.kccz-r-btnbox {
    width: 110px;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 99;
}
.kccz-r-btn {
    display: block;
    width: 110px;
    height: 78px;
    border: 1px solid #e7eaed;
    text-align: center;
}
.kccz-r-div{
    display: block;
    height: 78px;
    border: 1px solid #e7eaed;
    background: #53adce;
    text-align: center;
}
.kccz-r-div span{
    display: inline-block;
    width: 100px;
    margin: 10px 0 0px;
    height: 40px;
    font-size: 18px;
    font-weight: bold;
    color: #FFF;
}
.kccz-r-div p {
    color: #fff;
}
.kccz-r-btn span {
    display: inline-block;
    width: 30px;
    height: 30px;
    margin: 13px 0 0px;
}
.kccz-r-btn p {
    color: #324251;
    font-size: 14px;
}
.kccz-r-pz {
    background: url(../img/web/inout/icon-camera.png) no-repeat;
}
.kccz-r-cp {
    background: url(../img/web/inout/icon-camera-cp.png) no-repeat;
}
.kccz-r-img {
    background: url(../img/web/inout/icon-img.png) no-repeat;
}
.kccz-r-img-red {
    background: url(../img/web/inout/icon-img-red.png) no-repeat !important;
}
.kccz-r-btn:hover,
.kccz-r-btn.active {
    border-color: #53adce;
}
.kccz-r-btn1:hover,
.kccz-r-btn1.active {
    background: #53adce;
}
.kccz-r-btn1:hover .kccz-r-pz,
.kccz-r-btn1.active .kccz-r-pz {
    background: url(../img/web/inout/icon-camera-h.png) no-repeat;
}
.kccz-r-btn1:hover p,
.kccz-r-btn1.active p {
    color: #fff;
}
.mt-10 {
    margin-top: 10px;
}
.mt-20 {
    margin-top: 20px;
}
.kccz-left-box2 {
    height: 680px;
    padding: 1px 20px 0 20px;
    /*background: #fff;*/
    background: #dee6ec;
}
.kccz-data-form {
    width: 100%;
    margin-top: 20px;
}
.kccz-data-form .layui-form-label {
    color: #324251;
    font-size: 16px;
    padding: 7px 15px;
    font-weight: 600;
}
.kccz-data-form .layui-input-block {
    min-height: 34px;
}
.kccz-data-group-sm .layui-input-block {
    position: relative;
    padding-right: 90px;
}
.kccz-data-btnbox .rkbk-search-btn {
    position: relative;
    margin-left: 10px;
}
.kccz-data-group-md .layui-input-block {
    padding-right: 30%;
    position: relative;
}
.kccz-data-bfb {
    width: 27%;
    z-index: 3;
}
.kccz-data-dw {
    position: absolute;
    right: 5px;
    top: 1px;
    z-index: 9;
    line-height: 34px;
    color: #324251;
    font-size: 16px;
    display: block;
    height: 32px;
    background: #eff4f6;
    text-align: center;
}
.posi-r {
    position: relative;
}
.bg-fff {
    background: #fff;
}
.bg-ef {
    background: #efefef;
}
@media all and (max-width: 1650px) {
    .layui-input {
        padding-left: 5px;
        font-size: 14px;
    }
}
.layui-layer-title{
    font-weight: bold;
}
.line-container {
    display: flex;
    align-items: center;
    justify-content: center;
}
.line {
    flex: 1;
    height: 1px;
    background-color: #0e9aef;
}
.line-text {
    padding: 0 10px;
    color: #0e9aef;
}
.layui-layer-title{
    color: #FFF !important;
    background-color: #0e9aef !important;
}
fzzy-igdss-web/src/main/resources/static/inout/inout-weight.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,773 @@
//称重-包括空车和满车称重
var layer;
var form;
var table;
var recordData = null;// ä¸šåŠ¡æ•°æ®ä¿¡æ¯
var snapData;//系统抓拍对象信息
var timerWeight;
var paramIntelCard;//设备识别结果
var paramIdCard;//设备识别结果
var curCheckItems = null;// å½“前数据的检查项信息
var step = 1;
$(function () {
    layui.use(['layer', 'laydate', 'form', 'table', 'util'], function () {
        var util = layui.util;
        layer = layui.layer;
        form = layui.form;
        table = layui.table;
        layui.laydate.render({
            elem: '#test1',
            theme: '#7b8e9f'
        });
        // å³ä¸‹è§’添加固定信息
        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,
                        offset: ['50px', '120px'],
                        area: ['1000px', '640px'],
                        content: '../../basic/inout/inout-progress?type=' + type + "&t=" + Math.random()
                    });
                }
            }
        });
        //监听选择数据事件
        table.on('tool(tableListProgressData)', function (obj) {
            var data = obj.data;
            if (obj.event === 'select') {
                //清空表单
                resetForm();
                flushData(data.intelCard, null);
                layer.closeAll();
            }
        });
    });
    //显示流程环节
    showProgress();
    // ç›‘听重量变化
    $(".weight").blur(function () {
        deAutoByIn(this.name);
    });
    // åˆå§‹åŒ–WebSocket
    // initInoutWS(companyId, bizType, progress, userId);
});
window.onload = function () {
    //自动连接地磅信息,2.5秒获取一次地磅重量信息
    clearInterval(timerWeight);
    timerWeight = setInterval(function () {
        flushWeight();
    }, 2500);
    // åŠ è½½è§†é¢‘
    initVideo(snapDto1, snapDto2, snapDto3);
    //设置地磅
    $("#scaleName").val(weightDto.sort);
    //监听地磅选择
    $("#scaleName").change(function () {
        layer.confirm('调整地磅需重新加载页面,确定调整?', {
            btn: ['确定', '取消']
        }, function () {
            updateWeight();
        });
    });
};
// socket信息返回處理
function socketOnMessage(packet) {
    //暂无
}
//点击称重
function weight() {
    // æ²¡æœ‰ä¸šåŠ¡æ•°æ®ä¸å¯æ‰§è¡Œ
    if (!recordData) {
        alertError("没有查询到业务数据,执行被拒绝!");
        return;
    }
    // å¦‚果是空车称重
    if (InoutProgress.WEIGHT_EMPTY == recordData.progress) {
        form.val("form-data", {
            emptyWeight: weightDto.weight
        });
        form.render();
    }
    // å¦‚果是满车称重
    if (InoutProgress.WEIGHT_FULL == recordData.progress) {
        form.val("form-data", {
            fullWeight: weightDto.weight
        });
        form.render();
    }
    // ç‚¹å‡»ç§°é‡è‡ªåŠ¨è°ƒç”¨æŠ“æ‹
    snapData = {
        companyId: companyId,
        deptId: deptId,
        progress: recordData.progress,
        bizType: type,
        bizId: recordData.id,
        plateNum: recordData.plateNum,
        id1: snapDto1.id,
        id2: snapDto2.id,
        id3: snapDto3.id,
        id4: snapDto2.id,
        sort: $("#scaleName").val(),
        weight: weightDto.weight
    };
    //当前AJAX服务为同步服务,返回数据包装照片信息
    var index = layer.load();
    $.ajax({
        sync: false,
        type: "POST",
        url: "../../inout/api/snap-img",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(snapData),
        success: function (result) {
            layer.close(index);
            if (result.code != "0000") {
                alertError(result.msg);
            } else {
                snapData = result.data;
            }
        },
        error: function () {
            layer.close(index);
            alertError("后台调用截图失败,请重新尝试");
        }
    });
    //如果是第二次称重,默认执行自动计算
    if (InoutProgress.WEIGHT_EMPTY == recordData.progress) {
        deAutoByIn("emptyWeight");
    }
}
//读智慧卡
function flushICCard() {
    if (!cardDto.protocol) {
        flushICCard1();
    } else {
        flushICCard2();
    }
}
/**
 * åè®®è¯»å–智慧卡
 */
function flushICCard2() {
    var index = layer.load();
    var param = JSON.stringify(cardDto);
    $.ajax({
        type: "POST",
        url: "../../inout/api/get-icCard",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: param,
        success: function (result) {
            layer.close(index);
            if (result.code != "0000") {
                alertError(result.msg);
            } else {
                resultData = result.data;
                paramIntelCard = resultData.icCardNo;
                $("#text-param").text("识别卡号:" + paramIntelCard);
                flushData(paramIntelCard, null);
            }
        },
        error: function () {
            layer.close(index);
            alertError("IC卡读取失败");
        }
    });
}
/**
 * æœ¬åœ°è¯»å–智慧卡
 */
function flushICCard1() {
    var index = layer.load();
    $("#text-param").val(null);
    $("#form-data")[0].reset();
    form.render();
    recordData = null;
    $.ajax({
        type: "GET",
        async: true,
        url: "http://127.0.0.1:9111/ICCARD",
        data: {},
        dataType: "json",
        // jsonp: "callback",
        // jsonpCallback: "jsonpCallback",
        success: function (json) {
            var data = json;
            layer.close(index);
            if (data.code === "200" || data.code == 200) {
                paramIntelCard = data.no;
                $("#text-param").text("识别卡号:" + paramIntelCard);
                flushData(paramIntelCard, null);
            } else {
                alertError("请重新读卡!");
            }
        },
        error: function () {
            layer.close(index);
            alertError("IC卡读取出错!");
        }
    });
}
// ä½¿ç”¨æ’件获取身份证
function flushIdCard() {
    var index = layer.load();
    $.ajax({
        type: "GET",
        async: true,
        url: "http://127.0.0.1:9111/IDCARD",
        data: {},
        dataType: "json",
        // jsonp: "callback",
        // jsonpCallback: "jsonpCallback",
        success: function (json) {
            layer.close(index);
            var data = json;
            if (data.code === "200" || data.code == 200) {
                paramIdCard = data.idNum;
                $("#text-param").text("识别身份证:" + paramIdCard);
                flushData(null, paramIdCard);
            } else {
                alertError("没有读取到身份证信息!");
                return;
            }
        },
        error: function () {
            alertError("没有读取到身份证信息!");
            layer.close(index);
        }
    });
}
function flushByHand() {
    var intelCard = $("#intelCard").val();
    flushData(intelCard, null);
}
/**
 * æ‰‹åŠ¨é€‰æ‹©ï¼ŒèŽ·å–å¾…ç§°é‡çš„æ•°æ®ï¼Œå¼¹å‡ºé€‰æ‹©
 */
function selectByHand() {
    var param = {
        deptId: deptId,
        type: type,
        timer: Math.random()
    };
    $.ajax({
        type: "POST",
        url: "../../basic/inout/list-only-progress",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(param),
        success: function (result) {
            if (result.code != "0000") {
                layer.msg(result.msg);
            } else {
                renderTableProgressData(result.data);
            }
        },
        error: function () {
            layer.msg("系统获取数据出现异常,重新尝试");
        }
    });
}
function flushWeight() {
    var ip = "127.0.0.1";
    if (weightDto.ip) {
        ip = weightDto.ip;
    }
    var port = "9111";
    if (weightDto.port) {
        port = weightDto.port;
    }
    var sn = "WEIGHT";
    if (weightDto.sn) {
        sn = weightDto.sn;
    }
    var url = "http://" + ip + ":" + port + "/" + sn;
    $.ajax({
        type: "GET",
        async: true,
        timeout: 2000,
        url: url,
        data: {},
        dataType: "json",
        success: function (json) {
            var data = json.content;
            if (!data) data = 0.0;
            weightDto.weight = data;
            $("#weightValue").text(data);
            $("#img_scale_statule").attr("src", "/img/web/inout/icon-gree.png");
        },
        error: function () {
            weightDto.weight = 0.0;
            $("#weightValue").text("0.0");
            $("#img_scale_statule").attr("src", "/img/web/inout/icon-red.png");
        }
    });
}
// ç‚¹å‡»æ‰“印,系统判断是否已经执行完成,如果已经完成,直接打印,如果未完成则先执行完成
function printBill() {
    if (!recordData) {
        alertError("没有获取到业务数据,打印被拒绝!");
        return;
    }
    // ä»ŽåŽå°èŽ·å–æ¨¡ç‰ˆå¹¶æ‰“å°
    var data = form.val("form-data");
    // åˆå¹¶æ›´æ–°ç•¶å‰ç¼–辑数据
    Object.assign(recordData, data);
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "../../basic/inout/report/bill-weight",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(recordData),
        success: function (result) {
            layer.close(index);
            if (result.code != "0000") {
                alertError(result.msg);
            } else {
                layer.msg("开始渲染打印单……");
                printWeight(result.data);
            }
        },
        error: function () {
            layer.close(index);
            alertError("获取打印模版失败,请联系管理员查看原因");
        }
    });
}
// è¡¨å•清空
function resetForm() {
    $("#form-data")[0].reset();
    form.render();
    recordData = null;
    weightDto.weight = 0.0;
    $("#weightValue").text("0.0");
    $("#img_scale_statule").attr("src", "/img/web/inout/icon-red.png");
    $("#text-param").val(null);
}
function flushPage() {
    layer.confirm('确定要刷新页面吗?', {icon: 3, title: '提示'}, function (index) {
        resetForm();
        layer.close(index);
    });
}
//监听表单里的数值变化
document.getElementById('intelCard').addEventListener('input', function (event) {
    var intelCard = $("#intelCard").val();
    if (intelCard.length == 10) {
        flushData(intelCard, null);
    }
});
// --查询方法,获取身份证号、卡号、车牌号,进行查询
function flushData(intelCard, userIdCard) {
    var index = layer.load();
    var userIdCard = userIdCard;
    var intelCard = intelCard;
    var plateNum = $("#plateNum").val();
    var param = {
        type: type,
        progress: progress,
        intelCard: intelCard,
        userId: userIdCard,
        plateNum: plateNum
    };
    $.ajax({
        type: "POST",
        url: "../../basic/inout/inout-query",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(param),
        success: function (result) {
            layer.close(index);
            if (result.code != "0000") {
                notifyProgress(result.msg, result.data);
            } else {
                recordData = result.data;
                // è¿”回的数据进行赋值
                form.val("form-data", recordData);
                form.render();
                updateEditAndProgress();
            }
        },
        error: function () {
            layer.close(index);
            alertError("查询失败,请重新尝试");
        }
    });
}
/**
 * æ ¹æ®ä¸šåŠ¡æ•°æ®æ›´æ–°é¡µé¢ä¸­çš„çŠ¶æ€
 */
function updateEditAndProgress() {
    if (recordData) {
        if (InoutProgress.WEIGHT_EMPTY == recordData.progress) {
            $("#emptyWeight").removeClass("rkbk-search-input");
            $("#emptyWeight").attr("disabled", false);
            $("#progress-hand").addClass("active");
            $("#progress-emptyWeight").addClass("active");
            $("#fullWeight").addClass("rkbk-search-input");
            $("#fullWeight").attr("disabled", true);
        }
        if (InoutProgress.WEIGHT_FULL == recordData.progress) {
            $("#fullWeight").removeClass("rkbk-search-input");
            $("#fullWeight").attr("disabled", false);
            $("#progress-hand").removeClass("active");
            $("#progress-emptyWeight").removeClass("active");
            $("#emptyWeight").addClass("rkbk-search-input");
            $("#emptyWeight").attr("disabled", true);
        }
    } else {
        $("#fullWeight").addClass("rkbk-search-input");
        $("#fullWeight").attr("disabled", true);
        $("#emptyWeight").addClass("rkbk-search-input");
        $("#emptyWeight").attr("disabled", true);
        $("#progress-hand").removeClass("active");
        $("#progress-emptyWeight").removeClass("active");
    }
    //根据配置信息设置地磅是否可编辑
    if (weightEditTag && weightEditTag == 'N') {
        $("#fullWeight").addClass("rkbk-search-input");
        $("#fullWeight").attr("disabled", true);
        $("#emptyWeight").addClass("rkbk-search-input");
        $("#emptyWeight").attr("disabled", true);
    }
}
// å½“前完成
function submit() {
    if (!recordData) {
        alertError("没有业务数据信息,执行被拒绝");
        return;
    }
    var data = form.val("form-data");
    if (!data.depotId) {
        alertError("提示:装卸仓库必填");
        return;
    }
    if (!data.customerName) {
        alertError("提示:客户名称必填");
        return;
    }
    // æ ¡éªŒ-入库满车称重
    if (InoutProgress.WEIGHT_FULL == recordData.progress) {
        if (data.fullWeight <= 0.0) {
            alertError("提示:满车称重信息必填");
            return;
        }
    }
    if (InoutProgress.WEIGHT_EMPTY == recordData.progress) {
        if (data.emptyWeight <= 0.0) {
            alertError("提示:空车称重信息必填");
            return;
        }
        if (!data.foodVariety) {
            alertError("提示:粮食品种必填");
            return;
        }
        if (!data.settleWeight || data.settleWeight <= 0.0) {
            alertError("结算重量不合规,请核对");
            return;
        }
        if (!data.recordWeight || data.recordWeight <= 0.0) {
            alertError("入库重量不合规,请核对");
            return;
        }
    }
    //合并数据
    Object.assign(recordData, data);
    // èŽ·å–ç…§ç‰‡
    var files = [{
        fileName: snapData.fileName1
    }, {
        fileName: snapData.fileName2
    }, {
        fileName: snapData.fileName3
    }, {
        fileName: snapData.fileName4
    }];
    recordData.files = files;
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "../../basic/inout/submit-weight",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(recordData),
        success: function (result) {
            if (result.code != "0000") {
                alertError(result.msg);
            } else {
                notify("数据提交成功", result.data);
                if (InoutProgress.WEIGHT_FULL == recordData.progress) {
                    resetForm();
                }
            }
            layer.close(index);
        },
        error: function () {
            layer.close(index);
            alertError("提交失败,请重新尝试");
        }
    });
}
//显示质检信息
function showCheck() {
    if (!recordData) {
        alertError("没有业务数据信息,执行被拒绝");
        return;
    }
    // èŽ·å–åŒ–éªŒé¡¹ä¿¡æ¯
    flushCheckItem();
    layer.open({
        type: 1,
        title: "质检详细",
        offset: ['120px', '100px'],
        area: ['1000px', '520px'],
        shade: 0,
        content: $('#checkDetail'),
        btnAlign: 'c',
        btn: ['取消'],
        yes: function () {
            layer.closeAll();
        },
        closeBtn: 0
    });
}
/**
 * åˆ·æ–°åŒ–验结果项
 */
function flushCheckItem() {
    curCheckItems = null;
    $.ajax({
        type: "POST",
        url: "../../basic/inout/get-check-item",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(recordData),
        success: function (result) {
            if (result.code != "0000") {
                layer.msg(result.msg);
            } else {
                curCheckItems = result.data;
                // é¡µé¢æ¸²æŸ“检测项
                renderTableCheckItem();
            }
        },
        error: function () {
            layer.msg("后台异常,请重试或者联系管理员!!");
        }
    });
}
/**
 * å¼¹å‡ºæé†’框
 * @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']});
    }
}
/**
 * æ¸²æŸ“表格
 */
function renderTableCheckItem() {
    // æ¸…空数据
    $("#tableCheckItem").empty();
    table.render({
        elem: '#tableCheckItem',
        data: curCheckItems,
        page: false,
        even: true,
        cols: [[{
            field: 'standardName',
            title: '检验项目',
            align: 'center',
            width: '13%'
        }, {
            field: 'value',
            title: '检验值',
            align: 'center',
            width: '9%'
        }, {
            field: 'operaSymbolValue',
            title: '标准值',
            align: 'center',
            width: '10%'
        }, {
            field: 'unit',
            title: '单位',
            align: 'center',
            width: '10%'
        }, {
            field: 'deNum',
            title: '扣重',
            align: 'center',
            width: '9%'
        }, {
            field: 'addNum',
            title: '增重',
            align: 'center',
            width: '9%'
        }, {
            field: 'dePrice',
            title: '扣价',
            align: 'center',
            width: '9%'
        }, {
            field: 'addPrice',
            title: '增价',
            align: 'center',
            width: '9%'
        }, {
            field: 'result',
            title: '检验结果',
            align: 'center',
            width: '10%',
            templet: function (item) {
                if (item.result == null) {
                    return "";
                }
                if (item.result == '0') {
                    return "不合格";
                }
                if (item.result == '1') {
                    return "合格";
                }
            }
        }, {
            field: 'remarks',
            title: '备注说明',
            align: 'center'
        }]]
    });
    $("thead tr").css({
        "border-bottom": "2px solid #53adce",
        "background": "#eff4f6"
    });
}
function renderTableProgressData(list) {
    // æ¸…空数据
    $("#tableListProgressData").empty();
    layer.open({
        type: 1,
        title: "选择流程中车辆",
        offset: ['120px', '100px'],
        area: ['1000px', '520px'],
        shade: 0,
        content: $('#listProgressData'),
        closeBtn: 1
    });
    table.render({
        elem: '#tableListProgressData',
        data: list,
        page: true,
        even: true,
        cols: [[
            {type: 'numbers'}, {
                field: 'id',
                title: '单据号',
                align: 'center'
            }, {
                field: 'userName',
                title: '承运人',
                align: 'center'
            }, {
                field: 'plateNum',
                title: '车牌号',
                align: 'center'
            }, {fixed: 'right', title: '选择操作', align: 'center', toolbar: '#barSelectProgress'}]]
    });
    $("thead tr").css({
        "border-bottom": "2px solid #53adce",
        "background": "#eff4f6"
    });
}
fzzy-igdss-web/src/main/resources/static/inout/video-play.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,346 @@
var playNum = 1;
var playUrl = null;
var videoId = null;
let webrtc1;
let mediaStream1;
let webrtc2;
let mediaStream2;
let webrtc3;
let mediaStream3;
/**
 * é¡µé¢æœ€å¤šåŒæ—¶è°ƒç”¨ä¸‰ä¸ªè§†é¢‘,一个车牌识别,抓拍,三个顺序执行
 * @param lprParam è½¦ç‰Œè¯†åˆ«å‚æ•°
 * @param snapParam1 æŠ“拍参数1
 * @param snapPram2 æŠ“拍参数2
 */
function initVideo(snapParam1, snapParam2, snapPram3) {
    //车牌识别播放
    if (snapParam1) {
        $.ajax({
            type: "POST",
            url: "../../inout/api/inout-video-play",
            dataType: "json",
            contentType: "application/json;charset=UTF-8",
            data: JSON.stringify(snapParam1),
            success: function (result) {
                if (result.code != "SUCCESS") {
                    layer.msg(result.msg);
                } else {
                    initSnapVideo(result, 1);
                }
                //执行第二个
                initVideo2(snapParam2, snapPram3);
            },
            error: function () {
                layer.msg("过程1摄像头配置失败……");
                //执行第二个
                initVideo2(snapParam2, snapPram3);
            }
        });
    } else {
        initVideo2(snapParam2, snapPram3);
    }
}
function initVideo2(snapParam2, snapParam3) {
    if (snapParam2) {
        $.ajax({
            type: "POST",
            url: "../../inout/api/inout-video-play",
            dataType: "json",
            contentType: "application/json;charset=UTF-8",
            data: JSON.stringify(snapParam2),
            success: function (result) {
                if (result.code != "SUCCESS") {
                    layer.msg(result.msg);
                } else {
                    initSnapVideo(result, 2);
                }
                //执行第三个
                initVideo3(snapParam3)
            },
            error: function () {
                layer.msg("过程2摄像头配置失败……");
                //执行第三个
                initVideo3(snapParam3);
            }
        });
    } else {
        initVideo3(snapParam3);
    }
}
function initVideo3(snapParam3) {
    if (!snapParam3) return;
    $.ajax({
        type: "POST",
        url: "../../inout/api/inout-video-play",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(snapParam3),
        success: function (result) {
            if (result.code != "SUCCESS") {
                layer.msg(result.msg);
            } else {
                initSnapVideo(result, 3);
            }
        },
        error: function () {
            layer.msg("过程3摄像头配置失败……");
        }
    });
}
/**
 * è§†é¢‘播放
 * @param data
 * @param order
 */
function initSnapVideo(data, order) {
    var htm = "";
    //海康web4.0播放
    if (PlayType.HIK_WEB4 == data.playType) {
        var url = "../../inout/api/iframe-hik?id=" + data.id;
        if (ship && ship == "ship") { //船运称重页面
            url += "&length=340&width=195";
        } else { //称重页面
            url += "&length=310&width=170";
        }
        htm = '<iframe src=' + url + ' style="width: 100%;height: 100%"></iframe>';
    }
    //VLC播放
    if (PlayType.VLC == data.playType) {
        htm = "<object type='application/x-vlc-plugin' "
            + "events='true' width='100%' height='100%'"
            + "pluginspage='http://www.videolan.org'"
            + "th:codebase='@{../../static/plugins/vlc/npapi-vlc-2.2.2.tar.xz}'>\n"
            + "<param name='mrl' value='" + data.playUrl + "'/>\n"
            + "<param name='volume' value='50'/>\n"
            + "<param name='autoplay' value='true'/>\n"
            + "<param name='loop' value='false'/>\n"
            + "<param name='fullscreen' value='true'/>\n"
            + "<param name='toolbar' value='false'/>\n" + "</object>";
    }
    //web-rtc播放方式
    if (PlayType.PLAY_TYPE_WEB_RTC_DH == data.playType || PlayType.PLAY_TYPE_WEB_RTC_HIK == data.playType) {
        playUrl = data.playUrl;
        playNum = order;
        videoId = data.cameraId;
        htm = '<video class="video" id="video' + playNum + '" autoplay="" muted="" playsinline=""></video>';
    }
    if (1 == order) {
        $("#kccz-r-video1").append(htm);
    }
    if (2 == order) {
        $("#kccz-r-video2").append(htm);
    }
    if (3 == order) {
        $("#kccz-r-video3").append(htm);
    }
    if (PlayType.PLAY_TYPE_WEB_RTC_DH == data.playType || PlayType.PLAY_TYPE_WEB_RTC_HIK == data.playType) {
        if (1 == order) {
            webRtcToPlay1();
        }
        if (2 == order) {
            webRtcToPlay2();
        }
        if (3 == order) {
            webRtcToPlay3();
        }
    }
}
/*============= webRtc视频播放1 ----- å¼€å§‹ ===============*/
/**
 * å¼€å§‹æ’­æ”¾
 * @param winTag  æ’­æ”¾çª—口
 * @returns {Promise<void>}
 */
async function webRtcToPlay1() {
    if (playUrl) {
        mediaStream1 = new MediaStream();
        $("#video" + playNum)[0].srcObject = mediaStream1;
        webrtc1 = new RTCPeerConnection({
            iceServers: [{
                urls: ["stun:stun.l.google.com:19302"]
            }],
            sdpSemantics: "unified-plan"
        });
        webrtc1.onsignalingstatechange = signalingstatechange1;
        webrtc1.ontrack = ontrack1
        let offer = await webrtc1.createOffer({
            offerToReceiveAudio: true,
            offerToReceiveVideo: true
        });
        await webrtc1.setLocalDescription(offer);
    }
}
function ontrack1(event) {
    mediaStream1.addTrack(event.track);
}
async function signalingstatechange1() {
    switch (webrtc1.signalingState) {
        case 'have-local-offer':
            // let uuid = $('#uuid').val();
            let url = playUrl + "?uuid=" + videoId + "&channel=0";
            $.post(url, {
                data: btoa(webrtc1.localDescription.sdp)
            }, function (data) {
                try {
                    console.log(data);
                    webrtc1.setRemoteDescription(new RTCSessionDescription({
                        type: 'answer',
                        sdp: atob(data)
                    }))
                } catch (e) {
                    console.warn(e);
                }
            });
            break;
        case 'stable':
            break;
        case 'closed':
            break;
        default:
            console.log(`unhandled signalingState is ${webrtc1.signalingState}`);
            break;
    }
}
/*============= è§†é¢‘播放 ----- ç»“束 ===============*/
/*============= webRtc视频播放2 ----- å¼€å§‹ ===============*/
/**
 * å¼€å§‹æ’­æ”¾
 * @param winTag  æ’­æ”¾çª—口
 * @returns {Promise<void>}
 */
async function webRtcToPlay2() {
    if (playUrl) {
        mediaStream2 = new MediaStream();
        $("#video" + playNum)[0].srcObject = mediaStream2;
        webrtc2 = new RTCPeerConnection({
            iceServers: [{
                urls: ["stun:stun.l.google.com:19302"]
            }],
            sdpSemantics: "unified-plan"
        });
        webrtc2.onsignalingstatechange = signalingstatechange2;
        webrtc2.ontrack = ontrack2
        let offer = await webrtc2.createOffer({
            offerToReceiveAudio: true,
            offerToReceiveVideo: true
        });
        await webrtc2.setLocalDescription(offer);
    }
}
function ontrack2(event) {
    mediaStream2.addTrack(event.track);
}
async function signalingstatechange2() {
    switch (webrtc2.signalingState) {
        case 'have-local-offer':
            // let uuid = $('#uuid').val();
            let url = playUrl + "?uuid=" + videoId + "&channel=0";
            $.post(url, {
                data: btoa(webrtc2.localDescription.sdp)
            }, function (data) {
                try {
                    console.log(data);
                    webrtc2.setRemoteDescription(new RTCSessionDescription({
                        type: 'answer',
                        sdp: atob(data)
                    }))
                } catch (e) {
                    console.warn(e);
                }
            });
            break;
        case 'stable':
            break;
        case 'closed':
            break;
        default:
            console.log(`unhandled signalingState is ${webrtc2.signalingState}`);
            break;
    }
}
/*============= è§†é¢‘播放 ----- ç»“束 ===============*/
/*============= webRtc视频播放3 ----- å¼€å§‹ ===============*/
/**
 * å¼€å§‹æ’­æ”¾
 * @param winTag  æ’­æ”¾çª—口
 * @returns {Promise<void>}
 */
async function webRtcToPlay3() {
    if (playUrl) {
        mediaStream3 = new MediaStream();
        $("#video" + playNum)[0].srcObject = mediaStream3;
        webrtc3 = new RTCPeerConnection({
            iceServers: [{
                urls: ["stun:stun.l.google.com:19302"]
            }],
            sdpSemantics: "unified-plan"
        });
        webrtc3.onsignalingstatechange = signalingstatechange3;
        webrtc3.ontrack = ontrack3
        let offer = await webrtc3.createOffer({
            offerToReceiveAudio: true,
            offerToReceiveVideo: true
        });
        await webrtc3.setLocalDescription(offer);
    }
}
function ontrack3(event) {
    mediaStream3.addTrack(event.track);
}
async function signalingstatechange3() {
    switch (webrtc3.signalingState) {
        case 'have-local-offer':
            // let uuid = $('#uuid').val();
            let url = playUrl + "?uuid=" + videoId + "&channel=0";
            $.post(url, {
                data: btoa(webrtc3.localDescription.sdp)
            }, function (data) {
                try {
                    console.log(data);
                    webrtc3.setRemoteDescription(new RTCSessionDescription({
                        type: 'answer',
                        sdp: atob(data)
                    }))
                } catch (e) {
                    console.warn(e);
                }
            });
            break;
        case 'stable':
            break;
        case 'closed':
            break;
        default:
            console.log(`unhandled signalingState is ${webrtc3.signalingState}`);
            break;
    }
}
/*============= è§†é¢‘播放 ----- ç»“束 ===============*/
fzzy-igdss-web/src/main/resources/static/inout/weight.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,381 @@
/**
 * å…¥åº“-称重自动计算
 * @param name è§¦å‘事件的属性名称
 */
function deAutoByIn(name) {
    var curData = form.val("form-data");
    if (curData.fullWeight == 0 || curData.emptyWeight == 0) {
        return;
    }
    // å‡€é‡
    var netWeight = curData.fullWeight - curData.emptyWeight;
    if (netWeight <= 0) {
        alertError("净重<=0,当前环节存在逻辑错误,请核对");
        return;
    }
    //其他信息
    var deHandle = curData.deHandle, dePackage = curData.dePackage, deOther = curData.deOther, settleWeight = 0,
        recordWeight = 0, deCheck = curData.deCheck, addCheck = curData.addCheck;
    recordWeight = Number(netWeight) - Number(deHandle) - Number(dePackage) - Number(deOther) - Number(deCheck);
    settleWeight = Number(recordWeight) + Number(addCheck);
    netWeight = netWeight.toFixed(1);
    recordWeight = recordWeight.toFixed(1);
    settleWeight = settleWeight.toFixed(1);
    form.val("form-data", {
        netWeight: netWeight,
        settleWeight: settleWeight,
        recordWeight: recordWeight
    });
    form.render();
}
/**
 * å‡ºåº“-称重自动计算
 * 1、净重 = æ¯›é‡ - çš®é‡ ï¼› æ€»æ‰£é‡ = è´¨æ£€æ‰£é‡  + å…¶ä»–扣重
 * 2、结算重量 = å‡€é‡ - æ€»æ‰£é‡ + è´¨æ£€æ‰£é‡ï¼› å…¥åº“重量 = å‡€é‡ - æ€»æ‰£é‡
 * æ³¨æ„ï¼šå¦‚果是手动修改了水分和杂质的扣重,则不按照配置规则进行增扣重计算
 * @param name è§¦å‘事件的属性名称
 */
function deAutoByOut(name) {
    var curData = form.val("form-data");
    if (curData.fullWeight == 0 || curData.emptyWeight == 0) {
        return;
    }
    // å‡€é‡
    var netWeight = curData.fullWeight - curData.emptyWeight;
    if (netWeight <= 0) {
        alertError("净重<=0,当前环节存在逻辑错误,请核对");
        return;
    }
    //其他信息
    var dePackage = curData.dePackage, deOther = curData.deOther, settleWeight = 0,
        recordWeight = 0, deSum = 0, deCheck = curData.deCheck, addCheck = curData.addCheck;
    recordWeight = Number(netWeight) - Number(dePackage) - Number(deOther) - Number(deCheck);
    settleWeight = Number(recordWeight) + Number(addCheck);
    deSum = Number(deOther) + Number(deCheck)
    netWeight = netWeight.toFixed(1);
    recordWeight = recordWeight.toFixed(1);
    settleWeight = settleWeight.toFixed(1);
    deSum = deSum.toFixed(1);
    form.val("form-data", {
        netWeight: netWeight,
        settleWeight: settleWeight,
        recordWeight: recordWeight,
        deSum: deSum
    });
    form.render();
}
// function deAutoByOut(name) {
//     var curData = form.val("form-data");
//
//     if (curData.fullWeight == 0 || curData.emptyWeight == 0) {
//         return;
//     }
//     //汇总结果
//     var deSum = 0, addSum = 0, settleWeight = 0, recordWeight = 0;
//     // å‡€é‡
//     var netWeight = curData.fullWeight - curData.emptyWeight;
//     //扣水杂
//     var deWet = curData.deWet, deImpurity = curData.deImpurity;
//
//     if (netWeight <= 0) {
//         layer.alert("净重小于0,当前称重存在逻辑问题");
//         return;
//     }
//
//     var deBase = 0, multiple = 0;
//     //水分杂质,更改比例并且水分扣重还没计算情况下
//     if ("fullWeight" == name || null == deWet) {
//         var checkItem = this.getCheckItem(recordData.checkItems, CHECK_ST.C01, CHECK_ST.C020101);
//         if (checkItem) {
//             deBase = Number(curData.wet) - Number(checkItem.upperLimit);
//             if (deBase == 0) return;
//             multiple = parseInt(deBase / checkItem.ruleNum);//倍数
//             deWet = (netWeight * multiple * checkItem.ruleReduce / 100.00).toFixed(0);
//         }
//     }
//     //杂质
//     if ("fullWeight" == name || null == deImpurity) {
//         checkItem = this.getCheckItem(recordData.checkItems, CHECK_ST.C02, CHECK_ST.C01010301);
//         if (checkItem) {
//             deBase = Number(curData.impurity) - Number(checkItem.upperLimit);
//             if (deBase == 0) return;
//             multiple = parseInt(deBase / checkItem.ruleNum);
//             deImpurity = (netWeight * multiple * checkItem.ruleReduce / 100.00).toFixed(0);
//         }
//     }
//
//     /** æ€»æ‰£é‡ï¼Œä¸å«å¢žé‡*/
//     deSum = Number(curData.deOther) + Number(curData.deHandle);
//
//
//     if (Number(deWet) > 0) {//增重
//         addSum = addSum + Number(deWet);
//     } else {
//         deSum = deSum + Number(deWet);
//     }
//
//     if (Number(deImpurity) > 0) {//扣重
//         deSum = deSum + Number(deImpurity);
//     } else {
//         addSum = addSum + Number(deImpurity);
//     }
//
//     deSum = deSum.toFixed(0);
//     /** å¢žé‡è½¬æ­£æ•°ï¼Œä¾¿äºŽè®¡ç®—  */
//     addSum = Math.abs(addSum).toFixed(0);
//     /** å…¥åº“重量 = å‡€é‡ - æ€»æ‰£é‡  */
//     recordWeight = Number(netWeight) - Number(deSum);
//     /** ç»“算重量 = å‡€é‡ - æ€»æ‰£é‡ + å¢žé‡ */
//     settleWeight = Number(netWeight) - Number(deSum) + Number(addSum);
//
//     form.val("form-data", {
//         netWeight: netWeight,
//         deImpurity: deImpurity,
//         deWet: deWet,
//         deSum: deSum,
//         settleWeight: settleWeight,
//         recordWeight: recordWeight
//     });
//     form.render();
// }
/**
 * æ ¹æ®åŒ–验项和传递过来的参数获取当前参数的配置信息
 * @param checkItems
 * @param code1 ç³»ç»Ÿå‚æ•°ID
 * @param code2 å›½æ ‡å‚æ•°ID
 * @returns {undefined}
 */
function getCheckItem(checkItems, code1, code2) {
    var checkData = null;
    if (!checkItems) return checkData;
    $.each(checkItems, function (index, checkItem) {
        if (checkItem.standardId == code1 || checkItem.standardId == code2) {
            if (checkItem.ruleNum && checkItem.upperLimit > 0.0) {
                checkData = checkItem;
                return true;
            }
        }
    });
    return checkData;
}
/**
 * æ›´æ–°ç”¨æˆ·é€‰æ‹©åœ°ç£…
 */
function updateWeight() {
    var scale = $("#scaleName").val();
    $.ajax({
        type: "POST",
        url: "../../basic/inout/update-select-weight",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify({"key": scale}),
        success: function (result) {
            if (result.code != "0000") {
                notify(result.msg, result.data);
            } else {
                window.location.reload();
            }
        },
        error: function () {
            notify("提交失败,请重新尝试", null);
        }
    });
}
// ---------------------------通知单-开始 -------------------//
// å¼¹å‡ºå¾€æ¥å•位下拉框
function showNotice() {
    var titleCustomer = "送货单位";
    var url = "../../basic/inout/list-notice-in";
    if ("OUT" == type) {
        titleCustomer = "收货单位";
        url = "../../basic/inout/list-notice-out"
    }
    var index = layer.load();
    var param = {
        type: type
    };
    console.log(url);
    table.render({
        elem: '#tableNotice',
        url: url,
        page: false,
        even: true,
        method: 'POST',
        contentType: "application/json;charset=UTF-8",
        cols: [[{
            field: 'name',
            title: '通知单名称',
            width: '15%'
        }, {
            field: 'customerName',
            title: titleCustomer
        }, {
            field: 'foodVarietyName',
            title: '粮食品种',
            width: '10%'
        }, {
            field: 'year',
            title: '年份',
            width: '8%'
        }, {
            field: 'depotName',
            title: "所涉仓库"
        }, {
            field: 'contractName',
            title: '所属合同'
        }]],
        where: param,
        parseData: function (res) {
            if ("0000" == res.code) {
                return {
                    "code": "0",
                    "msg": res.msg,
                    "data": res.data
                }
            } else {
                return {
                    "code": "1",
                    "msg": res.msg
                }
            }
        },
        done: function (res) {
            layer.close(index);
        }
    });
    //双击显示选中数据
    table.on('rowDouble(tableNotice)', function (obj) {
        var data = obj.data;
        console.log(data)
        form.val("form-data", {
            customerName: data.customerName,
            noticeId: data.id,
            foodYear: data.year,
            depotId: data.depotId,
            foodVariety: data.foodVariety
        });
        layer.closeAll();
    });
    // å¼¹å‡ºå¯¹è¯æ¡†
    layer.open({
        type: 1,
        offset: ['100px', '250px'],
        title: "通知单列表(双击选中)",
        area: ['900px', '600px'],
        shade: 0,
        content: $('#listNotice'),
        btn: 0,
        btn: ['取消'],
        yes: function () {
            layer.closeAll();
        },
        closeBtn: 0
    });
}
// ---------------------------粮食产地-开始 -------------------//
function showFoodLocation() {
    var index = layer.load();
    table.render({
        elem: '#tableFoodLoaction',
        url: '../../basic/inout/page-dicArea',
        page: false,
        toolbar: '#toolbarFoodLocaton',
        even: true,
        method: 'POST',
        contentType: "application/json;charset=UTF-8",
        cols: [[{
            field: 'code',
            title: '编码',
        }, {
            field: 'simple',
            title: '简拼',
        }, {
            field: 'name',
            title: '名称',
            width: '60%'
        }]],
        where: {
            "page": 1,
            "limit": 100
        },
        parseData: function (res) {
            if ("0000" == res.code) {
                return {
                    "code": "0",
                    "msg": res.msg,
                    "count": res.data.total,
                    "data": res.data.records
                }
            } else {
                return {
                    "code": "1",
                    "msg": res.msg
                }
            }
        },
        done: function (res) {
            layer.close(index);
        }
    });
    //双击显示选中数据
    table.on('rowDouble(tableFoodLoaction)', function (obj) {
        var data = obj.data;
        // èµ‹å€¼
        form.val("form-data", {
            foodLocation: data.name,
            foodLocationId: data.code
        });
        // å…³é—­
        layer.closeAll();
    });
    // å¼¹å‡ºå¯¹è¯æ¡†
    layer.open({
        type: 1,
        title: "选择粮产地",
        area: ['600px', '600px'],
        shade: 0,
        content: $('#listFoodLocation'),
        btn: 0,
        btn: ['取消'],
        yes: function () {
            layer.closeAll();
        },
        closeBtn: 0
    });
}
// åˆ·æ–°
function flushFoodLocation() {
    var key = $("#key2").val();
    table.reload('tableFoodLoaction', {
        url: "../../basic/inout/page-dicArea",
        where: {
            key: key
        },
        done: function (res) {
            if (key) {
                $("#key2").val(key);
            }
        }
    });
}
// ---------------------------粮食产地 -结束 -------------------//
fzzy-igdss-web/src/main/resources/static/js/plugins/lodop/LodopFuncs.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,141 @@
var CreatedOKLodop7766 = null, CLodopIsLocal;
//====判断是否需要 Web打印服务CLodop:===
//===(不支持插件的浏览器版本需要用它)===
function needCLodop() {
    try {
        var ua = navigator.userAgent;
        if (ua.match(/Windows\sPhone/i))
            return true;
        if (ua.match(/iPhone|iPod|iPad/i))
            return true;
        if (ua.match(/Android/i))
            return true;
        if (ua.match(/Edge\D?\d+/i))
            return true;
        var verTrident = ua.match(/Trident\D?\d+/i);
        var verIE = ua.match(/MSIE\D?\d+/i);
        var verOPR = ua.match(/OPR\D?\d+/i);
        var verFF = ua.match(/Firefox\D?\d+/i);
        var x64 = ua.match(/x64/i);
        if ((!verTrident) && (!verIE) && (x64))
            return true;
        else if (verFF) {
            verFF = verFF[0].match(/\d+/);
            if ((verFF[0] >= 41) || (x64))
                return true;
        } else if (verOPR) {
            verOPR = verOPR[0].match(/\d+/);
            if (verOPR[0] >= 32)
                return true;
        } else if ((!verTrident) && (!verIE)) {
            var verChrome = ua.match(/Chrome\D?\d+/i);
            if (verChrome) {
                verChrome = verChrome[0].match(/\d+/);
                if (verChrome[0] >= 41)
                    return true;
            }
        }
        return false;
    } catch (err) {
        return true;
    }
}
//====页面引用CLodop云打印必须的JS文件,用双端口(8000和18000)避免其中某个被占用:====
if (needCLodop()) {
    var src1 = "http://localhost:8000/CLodopfuncs.js?priority=1";
    var src2 = "http://localhost:18000/CLodopfuncs.js?priority=0";
    var head = document.head || document.getElementsByTagName("head")[0] || document.documentElement;
    var oscript = document.createElement("script");
    oscript.src = src1;
    head.insertBefore(oscript, head.firstChild);
    oscript = document.createElement("script");
    oscript.src = src2;
    head.insertBefore(oscript, head.firstChild);
    CLodopIsLocal = !!((src1 + src2).match(/\/\/localho|\/\/127.0.0./i));
}
//====获取LODOP对象的主过程:====
function getLodop(oOBJECT, oEMBED) {
    var strHtmInstall = "<br><font color='#FF00FF'>打印控件未安装!点击这里<a href='install_lodop32.exe' target='_self'>执行安装</a>,安装后请刷新页面或重新进入。</font>";
    var strHtmUpdate = "<br><font color='#FF00FF'>打印控件需要升级!点击这里<a href='install_lodop32.exe' target='_self'>执行升级</a>,升级后请重新进入。</font>";
    var strHtm64_Install = "<br><font color='#FF00FF'>打印控件未安装!点击这里<a href='install_lodop64.exe' target='_self'>执行安装</a>,安装后请刷新页面或重新进入。</font>";
    var strHtm64_Update = "<br><font color='#FF00FF'>打印控件需要升级!点击这里<a href='install_lodop64.exe' target='_self'>执行升级</a>,升级后请重新进入。</font>";
    var strHtmFireFox = "<br><br><font color='#FF00FF'>(注意:如曾安装过Lodop旧版附件npActiveXPLugin,请在【工具】->【附加组件】->【扩展】中先卸它)</font>";
    var strHtmChrome = "<br><br><font color='#FF00FF'>(如果此前正常,仅因浏览器升级或重安装而出问题,需重新执行以上安装)</font>";
    var strCLodopInstall_1 = "<br><font color='#FF00FF'>Web打印服务CLodop未安装启动,点击这里<a href='CLodop_Setup_for_Win32NT.exe' target='_self'>下载执行安装</a>";
    var strCLodopInstall_2 = "<br>(若此前已安装过,可<a href='CLodop.protocol:setup' target='_self'>点这里直接再次启动</a>)";
    var strCLodopInstall_3 = ",成功后请刷新本页面。</font>";
    var strCLodopUpdate = "<br><font color='#FF00FF'>Web打印服务CLodop需升级!点击这里<a href='CLodop_Setup_for_Win32NT.exe' target='_self'>执行升级</a>,升级后请刷新页面。</font>";
    var LODOP;
    try {
        var ua = navigator.userAgent;
        var isIE = !!(ua.match(/MSIE/i)) || !!(ua.match(/Trident/i));
        if (needCLodop()) {
            try {
                LODOP = getCLodop();
            } catch (err) {}
            if (!LODOP && document.readyState !== "complete") {
                alert("网页还没下载完毕,请稍等一下再操作.");
                return;
            }
            if (!LODOP) {
                document.body.innerHTML = strCLodopInstall_1 + (CLodopIsLocal ? strCLodopInstall_2 : "") + strCLodopInstall_3 + document.body.innerHTML;
                return;
            } else {
                if (CLODOP.CVERSION < "3.0.9.2") {
                    document.body.innerHTML = strCLodopUpdate + document.body.innerHTML;
                }
                if (oEMBED && oEMBED.parentNode)
                    oEMBED.parentNode.removeChild(oEMBED);
                if (oOBJECT && oOBJECT.parentNode)
                    oOBJECT.parentNode.removeChild(oOBJECT);
            }
        } else {
            var is64IE = isIE && !!(ua.match(/x64/i));
            //=====如果页面有Lodop就直接使用,没有则新建:==========
            if (oOBJECT || oEMBED) {
                if (isIE)
                    LODOP = oOBJECT;
                else
                    LODOP = oEMBED;
            } else if (!CreatedOKLodop7766) {
                LODOP = document.createElement("object");
                LODOP.setAttribute("width", 0);
                LODOP.setAttribute("height", 0);
                LODOP.setAttribute("style", "position:absolute;left:0px;top:-100px;width:0px;height:0px;");
                if (isIE)
                    LODOP.setAttribute("classid", "clsid:2105C259-1E0C-4534-8141-A753534CB4CA");
                else
                    LODOP.setAttribute("type", "application/x-print-lodop");
                document.documentElement.appendChild(LODOP);
                CreatedOKLodop7766 = LODOP;
            } else
                LODOP = CreatedOKLodop7766;
            //=====Lodop插件未安装时提示下载地址:==========
            if ((!LODOP) || (!LODOP.VERSION)) {
                if (ua.indexOf('Chrome') >= 0)
                    document.body.innerHTML = strHtmChrome + document.body.innerHTML;
                if (ua.indexOf('Firefox') >= 0)
                    document.body.innerHTML = strHtmFireFox + document.body.innerHTML;
                document.body.innerHTML = (is64IE ? strHtm64_Install : strHtmInstall) + document.body.innerHTML;
                return LODOP;
            }
        }
        if (LODOP.VERSION < "6.2.2.6") {
            if (!needCLodop())
                document.body.innerHTML = (is64IE ? strHtm64_Update : strHtmUpdate) + document.body.innerHTML;
        }
        //===如下空白位置适合调用统一功能(如注册语句、语言选择等):==
        //=======================================================
        return LODOP;
    } catch (err) {
        alert("getLodop出错:" + err);
    }
}
fzzy-igdss-web/src/main/resources/templates/inout/inout-check.html
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,595 @@
<!DOCTYPE html>
<html lang="zh-cn" xmlns:th=http://www.thymeleaf.org>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <title>出入库管理-扦样质检</title>
    <link rel="stylesheet" type="text/css" th:href="@{/ajax/libs/layui/css/layui.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/inout/inout-style.css}">
    <style type="text/css">
        .qyzj-tabBox {
            margin-top: 0px !important;
            overflow: hidden;
            width: 100%;
        }
        #layui-table-page1 {
            text-align: right !important;
        }
        .display-none {
            display: none;
        }
        .control-btn {
            height: 35px;
            line-height: 30px;
            background-color: #f67d06;
        }
        .tip-red {
            text-align: right;
            padding-left: 40px;
            font-size: 16px;
            color: red;
            font-weight: bold;
        }
        thead span {
            font-weight: bold
        }
        #label1, #label4, #label5 {
            color: red;
        }
        .layui-select-disabled .layui-disabled {
            color: #000 !important;
        }
        .layui-table td {
            font-weight: bold;
        }
        .rk-step-wrap {
            padding: 0px;
            border-bottom: 0px;
            text-align: center;
        }
        .qyzj-btnbox {
            margin-top: 10px;
        }
        .qyzj-btnbox .rkbk-quick {
            margin-top: 13px;
        }
        .qyzj-con {
            margin-top: 10px;
            background: #dee6ec;
        }
        .rkbk-search-input {
            background: #FFF !important;
        }
        .rkbk-search-input.bg-date {
            background: #FFF !important;
        }
        thead span {
            font-weight: bold
        }
        .red {
            color: red;
            font-weight: bold;
        }
        .layui-select-disabled .layui-disabled {
            color: #000 !important;
        }
        .layui-table td {
            font-weight: bold;
        }
        .layui-elem-quote {
            padding: 10px;
            color: blue;
            margin-bottom: unset;
        }
        .input_ba {
            background: #e7eaec !important;
        }
        .layui-layer-btn .layui-layer-btn1 {
            border-color: #53adce;
            background-color: #53adce;
            color: #fff;
        }
    </style>
</head>
<body>
<div class="l-container layui-clear">
    <div class="rk-main">
        <div class="qyzj-btnbox layui-clear">
            <!--流程引导-->
            <div class="rk-step-wrap fr">
                <ul class="rk-step">
                    <li id="progress-register" class="active rk-step-first">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-dengji.png}"/>
                        </span>
                        <p>入库登记</p>
                    </li>
                    <li id="progress-fullWeight">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-chengzhong.png}"/>
                        </span>
                        <p>满车称重</p>
                    </li>
                    <li id="progress-hand">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-xiehuo.png}"/>
                        </span>
                        <p>入库值仓</p>
                    </li>
                    <li id="progress-emptyWeight">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-chengzhong.png}"/>
                        </span>
                        <p>空车称重</p>
                    </li>
                </ul>
            </div>
            <!--流程引导结束-->
        </div>
        <!--qyzj-btnbox end-->
        <div class="qyzj-con radius-6">
            <div class="qyzj-con-top layui-row">
                <form class="layui-form" action="" id="form-param"
                      lay-filter="form-param">
                    <div class="layui-form-item display-none">
                        <label class="layui-form-label">隐藏-类型</label>
                        <div class="layui-input-block">
                            <input type="text" name="type" th:value="${type}"
                                   autocomplete="off" class="layui-input rkbk-search-input">
                        </div>
                    </div>
                    <div class="layui-form-item display-none">
                        <label class="layui-form-label">隐藏-流程</label>
                        <div class="layui-input-block">
                            <input type="text" name="progress" th:value="${progress}"
                                   autocomplete="off" class="layui-input rkbk-search-input">
                        </div>
                    </div>
                    <div class="layui-col-xs3">
                        <div class="layui-form-item">
                            <label class="layui-form-label">质检单号</label>
                            <div class="layui-input-block">
                                <input type="text" name="checkId" placeholder="请输入"
                                       autocomplete="off" class="layui-input rkbk-search-input">
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs3">
                        <div class="layui-form-item">
                            <label class="layui-form-label">粮食品种</label>
                            <div class="layui-input-block rkbk-selBox">
                                <select name="foodVariety">
                                    <option value=""></option>
                                    <option th:each="dic,dicSet:${listFoodVariety}"
                                            th:value="${dic.dictValue}" th:text="${dic.dictLabel}"></option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs3">
                        <div class="layui-form-item">
                            <label class="layui-form-label">起始时间</label>
                            <div class="layui-input-block">
                                <input type="text" name="start" placeholder="请输入" autocomplete="off"
                                       class="layui-input rkbk-search-input bg-date" id="start">
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs3">
                        <div class="layui-form-item">
                            <label class="layui-form-label">截止时间</label>
                            <div class="layui-input-block">
                                <input type="text" name="end" placeholder="请输入" autocomplete="off"
                                       class="layui-input rkbk-search-input bg-date" id="end">
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs3">
                        <div class="layui-form-item">
                            <label class="layui-form-label">装卸仓库</label>
                            <div class="layui-input-block rkbk-selBox">
                                <select name="depotId">
                                    <option value=""></option>
                                    <option th:each="depot,depotSet:${listDepot}"
                                            th:value="${depot.id}" th:text="${depot.name}"></option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs3">
                        <div class="layui-form-item">
                            <label class="layui-form-label">是否化验</label>
                            <div class="layui-input-block rkbk-selBox">
                                <select name="checkStatus">
                                    <option value="NONE" selected>未化验</option>
                                    <option value="CHECK">已化验</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs3 layui-text-right">
                        <input type="button" value="查询/刷新"
                               class="qyzj-top-btn layui-btn btn-blue" onclick="flushData()"/>
                        <input type="button" value="清空条件"
                               class="qyzj-top-btn layui-btn btn-red" onclick="resetForm()"/>
                    </div>
                </form>
            </div>
            <!--qyzj-con-oop end-->
            <div class="qyzj-tabBox">
                <table class="layui-table" lay-skin="nob" id="tableData"
                       lay-filter="tableData">
                    <colgroup>
                        <col width="10%">
                        <col width="10%">
                        <col width="10%">
                        <col width="10%">
                        <col width="10%">
                        <col width="10%">
                        <col width="10%">
                        <col width="10%">
                        <col width="">
                        <col width="10%">
                    </colgroup>
                    <thead>
                    <tr class="qyzj-table-tit">
                        <th>质检单号</th>
                        <th>登记时间</th>
                        <th>扦样状态</th>
                        <th>扦样人</th>
                        <th>扦样时间</th>
                        <th>粮食品种</th>
                        <th>装卸仓库</th>
                        <th>检验结果</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<script th:inline="javascript">
    var progress = [[${progress}]];
    var listDepot = [[${listDepot}]];
    //业务步骤
    var bizType = [[${bizType}]];
    //出入库类型
    var type = [[${type}]];
    //userId
    var userId = [[${loginUser.loginName}]];
    var checkUser = [[${loginUser.userName}]];
    var companyId = [[${loginUser.companyId}]];
    //品种
    var listFoodVariety = [[${listFoodVariety}]];
    //性质
    var listFoodType = [[${listFoodType}]];
    var startTime = [[${startTime}]];
    var endTime = [[${endTime}]];
    var foodYear = [[${foodYear}]];
    //扦样机信息
    var checkDto = [[${checkDto}]];
    //所属分库
    var deptId = [[${deptId}]];
    var inoutProgress = [[${inoutProgress}]];
</script>
<script th:src="@{/ajax/libs/layui/layui.js}"></script>
<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/common/constant.js}"></script>
<script th:src="@{/common/igds-common.js}"></script>
<script th:src="@{/inout/inout-common.js}"></script>
<script th:src="@{/web/inout/inout-check.js}"></script>
<script type="text/html" id="barControl">
    <a class="layui-btn control-btn" lay-event="edit">结果录入</a>
</script>
</body>
<!-- æ‰«ç å¼¹çª— -->
<div class="layui-tab-content" id="scanCodeDetail" style="display: none;" Î¿nsubmit="return false;">
    <!-- è¡¨å•基本信息 -->
    <form class="layui-form" id="form-sacnCodeDetail" lay-filter="form-sacnCodeDetail">
        <div class="layui-col-xs12">
            <div class="layui-form-item">
                <label class="layui-form-label">质检单号</label>
                <div class="layui-input-block">
                    <input type="text" id="checkId" name="checkId" placeholder="请扫码,也可手动输入" class="layui-input">
                    <!--这行代码不能删-->
                    <!--当form表单中只有一个input时按回车按键会刷新页面,因此添加一个input并隐藏,不能使用type="hidden"方式隐藏-->
                    <input type="text" id="hiddenText" name="hiddenText" style="display:none"/>
                </div>
            </div>
        </div>
        <div class="layui-col-xs12" style="margin-bottom: 10px">
            <div style="padding-left: 50px; color: #2ab5ad;">
                <span style="font-weight: bold; margin-right: 10px;">备注:质检单号可以扫码,也可以手动输入,手动输入后需要点击查询</span>
            </div>
        </div>
    </form>
</div>
<!-- æ‰‹åŠ¨å½•å–åŒ–éªŒä¿¡æ¯å¼¹çª— -->
<div class="layui-tab-content" id="checkDetail" style="display: none;">
    <!-- è¡¨å•基本信息 -->
    <form class="layui-form" id="form-detail" lay-filter="form-detail">
        <div class="layui-col-xs12" style="display: none;">
            <div class="layui-form-item">
                <label class="layui-form-label">隐藏字段-流水编号</label>
                <div class="layui-input-block">
                    <input type="text" name="id" autocomplete="off" class="layui-input rkbk-search-input">
                </div>
            </div>
        </div>
        <div class="layui-col-xs4">
            <div class="layui-form-item">
                <label class="layui-form-label">质检单号</label>
                <div class="layui-input-block">
                    <input type="text" name="checkId" autocomplete="off"
                           class="layui-input input_ba" disabled="">
                </div>
            </div>
        </div>
        <div class="layui-col-xs4">
            <div class="layui-form-item">
                <label class="layui-form-label">扦 æ · äºº</label>
                <div class="layui-input-block">
                    <input type="text" name="sampleUser" autocomplete="off"
                           class="layui-input input_ba" disabled="">
                </div>
            </div>
        </div>
        <div class="layui-col-xs4">
            <div class="layui-form-item">
                <label class="layui-form-label">扦样时间</label>
                <div class="layui-input-block">
                    <input type="text" name="sampleTime" autocomplete="off"
                           class="layui-input input_ba" disabled="">
                </div>
            </div>
        </div>
        <div class="layui-col-xs4">
            <div class="layui-form-item">
                <label class="layui-form-label">è´¨ æ£€ äºº</label>
                <div class="layui-input-block">
                    <input type="text" name="checkUser" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-col-xs4">
            <div class="layui-form-item">
                <label class="layui-form-label red">装卸仓库</label>
                <div class="layui-input-block">
                    <select name="depotId" id="depotId" lay-filter="select_depot">
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-col-xs4">
            <div class="layui-form-item">
                <label class="layui-form-label red">粮食品种</label>
                <div class="layui-input-block">
                    <select name="foodVariety" style="font-weight: bold"
                            id="foodVariety" lay-filter="select_foodVariety">
                        <option value=""></option>
                        <option th:each="dic,dicSet:${listFoodVariety}"
                                th:value="${dic.dictValue}" th:text="${dic.dictLabel}"></option>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-col-xs4">
            <div class="layui-form-item">
                <label class="layui-form-label">质检时间</label>
                <div class="layui-input-block">
                    <input type="text" name="checkTime" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-col-xs4">
            <div class="layui-form-item">
                <label class="layui-form-label">收粮定价</label>
                <div class="layui-input-block">
                    <input type="text" name="price" id="price"
                           class="layui-input rkbk-search-input" placeholder="根据粮食等级带入/手动录入">
                    <em class="kccz-data-dw">元/公斤</em>
                </div>
            </div>
        </div>
        <div class="layui-col-xs4">
            <div class="layui-form-item">
                <label class="layui-form-label red">粮食等级</label>
                <div class="layui-input-block">
                    <select id="foodLevel" name="foodLevel" lay-filter="select_foodLevel">
                        <option value=""></option>
                        <option th:each="dic,dicSet:${listFoodLevel}"
                                th:value="${dic.dictValue}" th:text="${dic.dictLabel}"></option>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-col-xs4">
            <div class="layui-form-item">
                <label class="layui-form-label">粮食年份</label>
                <div class="layui-input-block">
                    <input type="text" name="foodYear" placeholder="请输入" autocomplete="off"
                           class="layui-input rkbk-search-input bg-date" id="foodYear">
                </div>
            </div>
        </div>
        <div class="layui-col-xs4">
            <div class="layui-form-item">
                <label class="layui-form-label red">粮食性质</label>
                <div class="layui-input-block">
                    <select id="foodType" name="foodType" lay-filter="select_foodType">
                        <option value=""></option>
                        <option th:each="dic,dicSet:${listFoodType}"
                                th:value="${dic.dictValue}" th:text="${dic.dictLabel}"></option>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-col-xs4">
            <div class="layui-form-item">
                <label class="layui-form-label red">化验结果</label>
                <div class="layui-input-block">
                    <select name="checkStatus" id="checkStatus">
                        <option value="NONE">未化验</option>
                        <option value="PASS">合格</option>
                        <option value="UNPASS">不合格</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-col-xs12">
            <div class="layui-form-item">
                <label class="layui-form-label">备注说明</label>
                <div class="layui-input-block">
                    <input type="text" name="remarks" placeholder="请输入内容"
                           class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-col-xs12" style="margin-bottom: 10px">
            <div style="padding-left: 50px; color: #2ab5ad;">
                <span style="font-weight: bold; margin-right: 10px;">备注说明:1.结果判定:系统根据各化验项结果判定,最后化验结果需手动选择确认;2.核算定价:根据化验项配置计算相关增扣价,最后单价需手动确认。</span>
            </div>
        </div>
        <div class="layui-col-xs6">
            <blockquote class="layui-elem-quote" style="width: 95%;float: left;">
                <div>
                    <span style="font-weight: bold; margin-right: 10px;">结果判定:</span>
                    <span id="check-result-tip" style="margin-right: 25px;">化验结果:</span>
                </div>
            </blockquote>
        </div>
        <div class="layui-col-xs6">
            <blockquote class="layui-elem-quote" style="width: 95%;float: right;">
                <div>
                    <span style="font-weight: bold; margin-right: 10px;">定价判定:</span>
                    <span id="check-result-tip2" style="margin-right: 25px;">收粮单价:#元/公斤</span>
                </div>
            </blockquote>
        </div>
    </form>
    <!-- åŒ–验结果信息 -->
    <table class="layui-table tableCheckItem" id="tableCheckItem"
           lay-filter="tableCheckItem">
        <colgroup>
            <col width="10%">
            <col width="10%">
            <col width="10%">
            <col width="10%">
            <col width="10%">
            <col width="10%">
            <col width="10%">
            <col width="10%">
            <col width="10%">
            <col width="">
        </colgroup>
        <thead>
        <tr class="qyzj-table-tit">
            <th>检验项目</th>
            <th>检验值</th>
            <th>标准值</th>
            <th>单位</th>
            <th>扣重</th>
            <th>增重</th>
            <th>扣价</th>
            <th>增价</th>
            <th>检验结果</th>
            <th>备注</th>
        </tr>
        </thead>
        <tbody>
        </tbody>
    </table>
</div>
<!-- å¼¹å‡ºæ¡†çš„信息 -->
<div class="layui-tab-content" id="dialog-from-notify"
     style="display: none;">
    <table class="layui-table">
        <colgroup>
            <col width="100">
        </colgroup>
        <tbody>
        <tr>
            <td>返回信息</td>
            <td id="resultMsg" style="color: red; font-weight: bold;"></td>
        </tr>
        <tr>
            <td>承运人</td>
            <td id="resultUserName" style="font-weight: bold;"></td>
        </tr>
        <tr>
            <td>车牌号</td>
            <td id="resultPlateNum" style="font-weight: bold;"></td>
        </tr>
        <tr>
            <td>下一步</td>
            <td id="resultType" style="font-weight: bold;"></td>
        </tr>
        <tr>
            <td>智慧卡号</td>
            <td id="resultIntelCard" style="font-weight: bold;"></td>
        </tr>
        </tbody>
    </table>
</div>
</html>
fzzy-igdss-web/src/main/resources/templates/inout/inout-register.html
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,739 @@
<!DOCTYPE html>
<html lang="zh-cn" xmlns:th=http://www.thymeleaf.org>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <title>出入库管理-入库称重</title>
    <link rel="stylesheet" type="text/css" th:href="@{/ajax/libs/layui/css/layui.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/inout/inout-style.css}">
    <!--使用打印插件 éšè—å½“前插件 -->
    <script th:src="@{/js/plugins/lodop/LodopFuncs.js}"></script>
    <style>
        .kccz-r-btnbox {
            width: 86px !important;
        }
        .kccz-r-btn {
            width: 86px !important;
        }
        #text-param {
            font-size: 14px;
            color: red;
            padding-left: 10px;
        }
        .display-none {
            display: none;
        }
        .cursor {
            cursor: pointer;
        }
        .kccz-czxx-dl dt {
            width: 25px;
            height: 24px;
            color: #000;
            font-size: 18px;
        }
        .kccz-left-box2 {
            height: 400px;
        }
        .color-red {
            color: red !important;
        }
        .layui-table td {
            font-weight: bold;
        }
        .layui-select-disabled .layui-disabled {
            color: #000 !important;
        }
        .depot-food input {
            line-height: 34px;
            padding-right: 10px;
            font-size: 16px;
            color: #666;
            background: #eff4f6;
        }
        .rk-step-wrap {
            padding: 0px;
            border-bottom: 0px;
            text-align: center;
        }
        .rkbk-quick {
            margin-top: 15px !important;
        }
        .kccz-con {
            margin: 10px 0px;
        }
        .border-no {
            border: 0px;
        }
        .qyzj-btnbox {
            margin-top: 10px;
        }
        .kccz-data-btnbox {
            min-height: 38px;
            padding-top: 2px;
        }
        .layui-layer-title {
            font-weight: bold;
        }
        .rkbk-search-btn {
            width: 100px;
            height: 30px;
            line-height: 30px;
            font-size: 16px;
        }
        .r-360 {
            right: 360px;
        }
        .r-240 {
            right: 240px;
        }
        .r-120 {
            right: 120px;
        }
        .rkbk-search-input {
            background: #FFF !important;
        }
        .rkbk-search-input.bg-date {
            background: #FFF !important;
        }
        #scaleName {
            width: 130px;
            height: 28px;
        }
        .layui-table, .layui-table-view {
            margin: 0 0;
        }
        .layui-table-body {
            max-height: 350px;
        }
        .video {
            width: 100%;
            height: 100%;
        }
        .layui-form-radio {
            margin: unset;
            margin-top: 5px;
            padding-right: unset;
        }
        .rk-step li {
            width: 60px;
            height: 40px;
            display: inline-block;
            margin: 0 20px;
            position: relative;
        }
        .kccz-r-box .rkbk-tit {
            margin: 6px 0;
            float: left;
            width: 5%;
            height: 100%;
            text-align: center;
            margin-left: 6px;
        }
        .kccz-r-con {
            height: 215px;
            position: relative;
            float: right;
            width: 90%;
            margin: 10px 0;
        }
        .kccz-r-vedio {
            width: 100%;
            height: 100%;
            background: #dee6ec;
        }
        .kccz-r-item {
            height: 235px;
        }
    </style>
</head>
<body>
<div class="l-container layui-clear">
    <div class="rk-main">
        <div class="kccz-con">
            <div class="kccz-left fl">
                <div class="kccz-left-box1 radius-6">
                    <div class="rkbk-tit">
                        <i></i>
                        <div>
                            <h3 style="width: 150px; float: left;">登记信息</h3>
                            <div style="float: right;margin-top: -5px">
                                <button class="rkbk-quick-btn layui-btn btn-blue" onclick="weight()">
                                    <i><img th:src="@{/img/web/inout/icon-hyd.png}"/></i>步骤1:车牌识别
                                </button>
                                <button class="rkbk-quick-btn layui-btn btn-green" onclick="submit()">
                                    <i><img th:src="@{/img/web/inout/icon-ok.png}"/></i>步骤2:登记提交
                                </button>
                            </div>
                        </div>
                    </div>
                    <div class="kccz-data-form layui-row">
                        <form class="layui-form" action="" id="form-data-regster"
                              lay-filter="form-data-regster">
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label color-red">承运人</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="userName1" placeholder="请输入" class="layui-input">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">身份证号</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="userId1" id="userId1" placeholder="请输入"
                                               autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label color-red">车牌号</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="plateNum1" id="plateNum1" placeholder="请输入"
                                               autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">联系电话</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="userContact" id="userContact" placeholder="请输入"
                                               autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs8">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="userAddress" id="userAddress" placeholder="请输入"
                                               autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                    <!--kccz-czxx-wrap end-->
                </div>
                <div class="kccz-left-box1 radius-6" style="margin-top: 10px">
                    <div class="rkbk-tit">
                        <i></i>
                        <div>
                            <h3 style="width: 150px; float: left;">称重信息</h3>
                            <div style="float: right;">
                                <div class="kccz-czxx-left fl">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">当前地磅</label>
                                        <div class="layui-input-block">
                                            <select name="depotId" id="scaleName" lay-filter="select_scaleName">
                                                <option th:each="dto,weightSet:${listWeight}"
                                                        th:value="${dto.sort}" th:text="${dto.name}"></option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="kccz-czxx-right fr">
                                    <dl class="kccz-czxx-dl" style="padding-left: 15px;">
                                        <dt>
                                            <i><img id="img_scale_statule"
                                                    th:src="@{/img/web/inout/icon-red.png}"/></i>
                                        </dt>
                                    </dl>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="kccz-czxx-wrap">
                        <div class="kccz-czxx-num">
                            <span id="weightValue">0.00</span><em>KG</em>
                        </div>
                    </div>
                    <!--kccz-czxx-wrap end-->
                </div>
                <!--kccz-left-box1 end-->
                <div class="kccz-left-box2 mt-10 radius-6">
                    <div class="rkbk-tit">
                        <i></i>
                        <h3>称重数据<span id="text-param"></span></h3>
                        <div style="float: right;margin-top: -35px">
                            <button class="rkbk-quick-btn layui-btn" onclick="selectByHand()">
                                <i><img th:src="@{/img/web/inout/icon-hyd.png}"/></i>选择车辆
                            </button>
                            <button class="rkbk-quick-btn layui-btn btn-blue" onclick="weight()">
                                <i><img th:src="@{/img/web/inout/icon-chengzhong.png}"/></i>步骤1:称重及抓拍
                            </button>
                            <button class="rkbk-quick-btn layui-btn btn-green" onclick="submit()">
                                <i><img th:src="@{/img/web/inout/icon-ok.png}"/></i>步骤2:完成称重
                            </button>
                            <button class="rkbk-quick-btn layui-btn btn-blue" onclick="printBill()">
                                <i><img th:src="@{/img/web/inout/icon-dayin.png}"/></i>步骤3:打印过磅单
                            </button>
                            <button class="rkbk-quick-btn layui-btn btn-violet"
                                    onclick="flushPage()">
                                <i><img th:src="@{/img/web/inout/icon-shuaxin2.png}"/></i>刷新页面
                            </button>
                        </div>
                    </div>
                    <div class="kccz-data-form layui-row">
                        <form class="layui-form" action="" id="form-data"
                              lay-filter="form-data">
                            <div class="layui-form-item display-none">
                                <input type="text" name="id">
                            </div>
                            <div class="layui-form-item display-none">
                                <input type="text" name="progress">
                            </div>
                            <div class="layui-form-item display-none">
                                <input type="text" name="type">
                            </div>
                            <div class="layui-form-item display-none">
                                <input type="text" name="foodLocationId">
                            </div>
                            <div class="layui-form-item display-none">
                                <input type="text" name="noticeId">
                            </div>
                            <div class="layui-form-item display-none">
                                <input type="text" name="foodType">
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label color-red">车牌号</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="plateNum" id="plateNum" placeholder="自动带入"
                                               autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label color-red">客户信息</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="customerName" placeholder="请选择"
                                               autocomplete="off" class="layui-input" disabled="disabled"> <em
                                            class="kccz-data-dw cursor" onclick="showNotice()">……</em>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label color-red">毛重(满车)</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="fullWeight" id="fullWeight" autocomplete="off"
                                               placeholder="地磅自动带入" class="layui-input rkbk-search-input" disabled>
                                        <em
                                                class="kccz-data-dw">KG</em>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label color-red">承运人</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="userName" placeholder="自动带入,不可编辑" class="layui-input"
                                               disabled>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label  color-red" id="depotIdLabel">装卸仓库</label>
                                    <div class="layui-input-block">
                                        <select name="depotId" id="depotId" lay-filter="select_depotId">
                                            <option value=""></option>
                                            <option th:each="depot,depotSet:${listDepot}"
                                                    th:value="${depot.id}" th:text="${depot.name}"></option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label color-red">皮重(空车)</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="emptyWeight" id="emptyWeight" autocomplete="off"
                                               placeholder="地磅自动带入" class="layui-input weight rkbk-search-input"
                                               disabled>
                                        <em
                                                class="kccz-data-dw">KG</em>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">身份证号</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="userId" id="userId" placeholder="身份证号"
                                               autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label color-red">粮食品种</label>
                                    <div class="layui-input-block">
                                        <select name="foodVariety" id="foodVariety">
                                            <option value=""></option>
                                            <option th:each="dic,dicSet:${listFoodVariety}"
                                                    th:value="${dic.dictValue}" th:text="${dic.dictLabel}"></option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">净&nbsp;&nbsp;&nbsp;&nbsp;重</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="netWeight" autocomplete="off"
                                               placeholder="自动计算,不可编辑" class="layui-input rkbk-search-input"
                                               disabled> <em class="kccz-data-dw">KG</em>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">粮食产地</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="foodLocation" placeholder="请选择"
                                               autocomplete="off" class="layui-input" disabled="disabled"> <em
                                            class="kccz-data-dw cursor" onclick="showFoodLocation()">……</em>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">水分</label>
                                    <div class="layui-input-block">
                                        <input id="perWet" type="text" name="perWet" autocomplete="off"
                                               placeholder="请输入" class="layui-input weight"> <em
                                            class="kccz-data-dw">%</em>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">扣重</label>
                                    <div class="layui-input-block">
                                        <input id="deOther" type="text" name="deOther" autocomplete="off"
                                               placeholder="请输入" class="layui-input weight"> <em
                                            class="kccz-data-dw">KG</em>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">单价</label>
                                    <div class="layui-input-block">
                                        <input id="price" type="text" name="price" autocomplete="off"
                                               placeholder="请输入" class="layui-input weight"> <em
                                            class="kccz-data-dw">元</em>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">杂质</label>
                                    <div class="layui-input-block">
                                        <input id="perImpurity" type="text" name="perImpurity" autocomplete="off"
                                               placeholder="请输入" class="layui-input weight"> <em
                                            class="kccz-data-dw">%</em>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">入库重量</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="recordWeight" placeholder="自动计算"
                                               autocomplete="off" class="layui-input rkbk-search-input"
                                               disabled> <em class="kccz-data-dw">KG</em>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs8">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">备注说明</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="remarks" placeholder="请输入内容"
                                               class="layui-input">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">结算重量</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="settleWeight" placeholder="自动计算"
                                               autocomplete="off" class="layui-input rkbk-search-input"
                                               disabled> <em class="kccz-data-dw">KG</em>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <!--kccz-left-box2 end-->
            </div>
            <!--kccz-left end-->
            <div class="kccz-right fr">
                <ul class="rk-step" style="background-color: #FFFFFF;border-radius: 6px;margin-bottom: 10px;padding: 10px 0;">
                    <li id="progress-register" class="active rk-step-first">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-dengji.png}"/>
                        </span>
                        <p>入库登记</p>
                    </li>
                    <li id="progress-fullWeight">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-chengzhong.png}"/>
                        </span>
                        <p>满车称重</p>
                    </li>
                    <li id="progress-hand" class="">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-xiehuo.png}"/>
                        </span>
                        <p>入库值仓</p>
                    </li>
                    <li id="progress-emptyWeight" class="">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-chengzhong.png}"/>
                        </span>
                        <p>空车称重</p>
                    </li>
                </ul>
                <div class="kccz-r-item radius-6">
                    <div class="kccz-r-box">
                        <div class="rkbk-tit">
                            <i style="margin: 8px 3px 0 3px"></i>
                            <h3>车牌识别视频</h3>
                        </div>
                        <div class="kccz-r-con">
                            <div class="kccz-r-vedio" id="kccz-r-video1">
                            </div>
                        </div>
                    </div>
                </div>
                <!--kccz-r-item end-->
                <div class="kccz-r-item radius-6 mt-10">
                    <div class="kccz-r-box">
                        <div class="rkbk-tit">
                            <i style="margin: 8px 3px 0 3px"></i>
                            <h3>车顶抓拍视频</h3>
                        </div>
                        <div class="kccz-r-con">
                            <div class="kccz-r-vedio" id="kccz-r-video2">
                            </div>
                        </div>
                    </div>
                </div>
                <!--kccz-r-item end-->
                <div class="kccz-r-item radius-6 mt-10">
                    <div class="kccz-r-box">
                        <div class="rkbk-tit">
                            <i style="margin: 8px 3px 0 3px"></i>
                            <h3>车尾抓拍视频</h3>
                        </div>
                        <div class="kccz-r-con">
                            <div class="kccz-r-vedio" id="kccz-r-video3">
                            </div>
                        </div>
                    </div>
                </div>
                <!--kccz-r-item end-->
            </div>
        </div>
        <!--kccz-con end-->
    </div>
    <!--rk-main end-->
</div>
<!--l-container end-->
<script th:inline="javascript">
    //流程环节
    var inoutProgress = [[${inoutProgress}]];
    var progress = [[${progress}]];
    var deptId = [[${deptId}]];
    var listDepot = [[${listDepot}]];
    var weightEditTag = [[${weightEditTag}]];
    //userId
    var userId = [[${loginUser.loginName}]];
    //出入库类型
    var type = [[${type}]];
    var companyId = [[${loginUser.companyId}]];
    //地磅信息
    var weightDto = [[${weightDto}]];
    //过程摄像头
    var snapDto1 = [[${snapDto1}]];
    var snapDto2 = [[${snapDto2}]];
    var snapDto3 = [[${snapDto3}]];
</script>
<script th:src="@{/ajax/libs/layui/layui.js}"></script>
<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/common/constant.js}"></script>
<script th:src="@{/common/igds-common.js}"></script>
<script th:src="@{/inout/inout-common.js}"></script>
<script th:src="@{/inout/inout-print.js}"></script>
<script th:src="@{/inout/video-play.js}"></script>
<script th:src="@{/inout/weight.js}"></script>
<script th:src="@{/inout/inout-register.js}"></script>
</body>
<!-- å¼¹å‡ºé€šçŸ¥å• -->
<div class="layui-tab-content" id="listNotice" style="display: none;">
    <table class="layui-table" lay-skin="nob" id="tableNotice"
           lay-filter="tableNotice" style="margin: 0px;"></table>
</div>
<!-- å¼¹å‡ºç²®é£Ÿäº§åœ° -->
<div class="layui-tab-content" id="listFoodLocation"
     style="display: none;">
    <table class="layui-table" lay-skin="nob" id="tableFoodLoaction"
           lay-filter="tableFoodLoaction" style="margin: 0px;"></table>
</div>
<!-- è´¨æ£€ä¿¡æ¯ -->
<div class="layui-tab-content" id="checkDetail" style="display: none;">
    <!-- åŒ–验结果信息 -->
    <table class="layui-table tableCheckItem" id="tableCheckItem"
           lay-filter="tableCheckItem">
        <colgroup><col><col><col><col><col><col><col><col><col><col>
        </colgroup>
        <thead>
        <tr class="qyzj-table-tit">
            <th>检验项目</th>
            <th>检验值</th>
            <th>标准值</th>
            <th>单位</th>
            <th>扣重</th>
            <th>增重</th>
            <th>扣价</th>
            <th>增价</th>
            <th>检验结果</th>
            <th>备注</th>
        </tr>
        </thead>
        <tbody>
        </tbody>
    </table>
</div>
<!-- æµç¨‹æ•°æ®ä¿¡æ¯ -->
<div class="layui-tab-content" id="listProgressData" style="display: none;">
    <table class="layui-table tableListProgressData" id="tableListProgressData"
           lay-filter="tableListProgressData">
        <thead>
        <tr class="qyzj-table-tit">
            <th>单据号</th><th>承运人</th><th>车牌号</th><th>操作</th>
        </tr>
        </thead>
        <tbody>
        </tbody>
    </table>
</div>
<!-- å¼¹å‡ºæ¡†çš„信息 -->
<div class="layui-tab-content" id="dialog-from-notify" style="display: none;">
    <table class="layui-table">
        <colgroup>
            <col>
        </colgroup>
        <tbody>
        <tr>
            <td>返回信息</td>
            <td id="resultMsg" style="color: red;font-weight: bold;"></td>
        </tr>
        <tr>
            <td>承运人</td>
            <td id="resultUserName" style="font-weight: bold;"></td>
        </tr>
        <tr>
            <td>车牌号</td>
            <td id="resultPlateNum" style="font-weight: bold;"></td>
        </tr>
        <tr>
            <td>下一步</td>
            <td id="resultType" style="font-weight: bold;"></td>
        </tr>
        <tr>
            <td>智慧卡号</td>
            <td id="resultIntelCard" style="font-weight: bold;"></td>
        </tr>
        </tbody>
    </table>
</div>
<script type="text/html" id="toolbarFoodLocaton">
    <div class="">
        <div class="layui-col-xs6">
            <input type="text" id="key2" placeholder="输入编码或者名称……" class="layui-input">
        </div>
        <div class="layui-col-xs6" style="padding-left: 10px;">
            <button class="layui-btn layui-btn-sm" onclick="flushFoodLocation()">查询</button>
        </div>
    </div>
</script>
<script type="text/html" id="barSelectProgress">
    <a class="layui-btn layui-btn-xs" lay-event="select">选择称重</a>
</script>
</html>
fzzy-igdss-web/src/main/resources/templates/inout/inout-weight.html
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,684 @@
<!DOCTYPE html>
<html lang="zh-cn" xmlns:th=http://www.thymeleaf.org>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <title>出入库管理-入库称重</title>
    <link rel="stylesheet" type="text/css" th:href="@{/ajax/libs/layui/css/layui.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/inout/inout-style.css}">
    <!--使用打印插件 éšè—å½“前插件 -->
    <script th:src="@{/js/plugins/lodop/LodopFuncs.js}"></script>
    <style>
        .kccz-r-btnbox {
            width: 86px !important;
        }
        .kccz-r-btn {
            width: 86px !important;
        }
        #text-param {
            font-size: 14px;
            color: red;
            padding-left: 10px;
        }
        .display-none {
            display: none;
        }
        .cursor {
            cursor: pointer;
        }
        .kccz-czxx-dl dt {
            width: 25px;
            height: 24px;
            color: #000;
            font-size: 18px;
        }
        .kccz-left-box2 {
            height: 555px;
        }
        .color-red {
            color: red !important;
        }
        .layui-table td {
            font-weight: bold;
        }
        .layui-select-disabled .layui-disabled {
            color: #000 !important;
        }
        .depot-food input {
            line-height: 34px;
            padding-right: 10px;
            font-size: 16px;
            color: #666;
            background: #eff4f6;
        }
        .rk-step-wrap {
            padding: 0px;
            border-bottom: 0px;
            text-align: center;
        }
        .rkbk-quick {
            margin-top: 15px !important;
        }
        .kccz-con {
            margin: 10px 0px;
        }
        .border-no {
            border: 0px;
        }
        .qyzj-btnbox {
            margin-top: 10px;
        }
        .kccz-data-btnbox {
            min-height: 38px;
            padding-top: 2px;
        }
        .layui-layer-title {
            font-weight: bold;
        }
        .rkbk-search-btn {
            width: 100px;
            height: 30px;
            line-height: 30px;
            font-size: 16px;
        }
        .r-360 {
            right: 360px;
        }
        .r-240 {
            right: 240px;
        }
        .r-120 {
            right: 120px;
        }
        .rkbk-search-input {
            background: #FFF !important;
        }
        .rkbk-search-input.bg-date {
            background: #FFF !important;
        }
        #scaleName {
            width: 130px;
            height: 28px;
        }
        .layui-table, .layui-table-view {
            margin: 0 0;
        }
        .layui-table-body {
            max-height: 350px;
        }
        .video {
            width: 100%;
            height: 100%;
        }
        .layui-form-radio {
            margin: unset;
            margin-top: 5px;
            padding-right: unset;
        }
        .kccz-r-box .rkbk-tit {
            margin: 6px 0;
            float: left;
            width: 5%;
            height: 100%;
            text-align: center;
            margin-left: 6px;
        }
        .kccz-r-con {
            height: 215px;
            position: relative;
            float: right;
            width: 90%;
            margin: 10px 0;
        }
        .kccz-r-vedio {
            width: 100%;
            height: 100%;
            background: #dee6ec;
        }
        .kccz-r-item {
            height: 235px;
        }
    </style>
</head>
<body>
<div class="l-container layui-clear">
    <div class="rk-main">
        <div class="qyzj-btnbox layui-clear">
            <div class="rkbk-quick fl">
                <button class="rkbk-quick-btn layui-btn btn-blue"
                        onclick="weight()">
                    <i><img th:src="@{/img/web/inout/icon-chengzhong.png}"/></i>步骤1:称重确认及抓拍
                </button>
                <button class="rkbk-quick-btn layui-btn btn-green" onclick="submit()">
                    <i><img th:src="@{/img/web/inout/icon-ok.png}"/></i>步骤2:完成称重
                </button>
                <button class="rkbk-quick-btn layui-btn btn-blue" onclick="printBill()">
                    <i><img th:src="@{/img/web/inout/icon-dayin.png}"/></i>步骤3:打印过磅单
                </button>
                <button class="rkbk-quick-btn layui-btn" onclick="showCheck()">
                    <i><img th:src="@{/img/web/inout/icon-hyd.png}"/></i>质检详细
                </button>
                <button class="rkbk-quick-btn layui-btn btn-violet" onclick="flushPage()">
                    <i><img th:src="@{/img/web/inout/icon-shuaxin2.png}"/></i>刷新页面
                </button>
            </div>
            <!-- æµç¨‹å¼•导 -->
            <div class="rk-step-wrap fr">
                <ul class="rk-step">
                    <li id="progress-register" class="active rk-step-first">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-dengji.png}"/>
                        </span>
                        <p>入库登记</p>
                    </li>
                    <li id="progress-fullWeight" class="active">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-chengzhong.png}"/>
                        </span>
                        <p>满车称重</p>
                    </li>
                    <li id="progress-hand" class="">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-xiehuo.png}"/>
                        </span>
                        <p>入库值仓</p>
                    </li>
                    <li id="progress-emptyWeight" class="">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-chengzhong.png}"/>
                        </span>
                        <p>空车称重</p>
                    </li>
                </ul>
            </div>
            <!-- æµç¨‹å¼•导EDN -->
        </div>
        <!--qyzj-btnbox end-->
        <div class="kccz-con">
            <div class="kccz-left fl">
                <div class="kccz-left-box1 radius-6">
                    <div class="rkbk-tit">
                        <i></i>
                        <div>
                            <h3 style="width: 150px; float: left;">称重信息</h3>
                            <div style="float: right;">
                                <div class="kccz-czxx-left fl">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">当前地磅</label>
                                        <div class="layui-input-block">
                                            <select name="depotId" id="scaleName" lay-filter="select_scaleName">
                                                <option th:each="dto,weightSet:${listWeight}"
                                                        th:value="${dto.sort}" th:text="${dto.name}"></option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="kccz-czxx-right fr">
                                    <dl class="kccz-czxx-dl" style="padding-left: 15px;">
                                        <dt>
                                            <i><img id="img_scale_statule"
                                                    th:src="@{/img/web/inout/icon-red.png}"/></i>
                                        </dt>
                                    </dl>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="kccz-czxx-wrap">
                        <div class="kccz-czxx-num">
                            <span id="weightValue">0.00</span><em>KG</em>
                        </div>
                    </div>
                    <!--kccz-czxx-wrap end-->
                </div>
                <!--kccz-left-box1 end-->
                <div class="kccz-left-box2 mt-10 radius-6">
                    <div class="rkbk-tit">
                        <i></i>
                        <h3>业务数据<span id="text-param"></span></h3>
                    </div>
                    <div class="kccz-data-form layui-row">
                        <form class="layui-form" action="" id="form-data"
                              lay-filter="form-data">
                            <div class="layui-form-item display-none">
                                <input type="text" name="id">
                            </div>
                            <div class="layui-form-item display-none">
                                <input type="text" name="progress">
                            </div>
                            <div class="layui-form-item display-none">
                                <input type="text" name="type">
                            </div>
                            <div class="layui-form-item display-none">
                                <input type="text" name="foodLocationId">
                            </div>
                            <div class="layui-form-item display-none">
                                <input type="text" name="noticeId">
                            </div>
                            <div class="layui-form-item display-none">
                                <input type="text" name="foodType">
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label color-red">车牌号</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="plateNum" id="plateNum" placeholder="自动带入"
                                               autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label color-red">客户信息</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="customerName" placeholder="请选择"
                                               autocomplete="off" class="layui-input" disabled="disabled"> <em
                                            class="kccz-data-dw cursor" onclick="showNotice()">……</em>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label color-red">毛重(满车)</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="fullWeight" id="fullWeight" autocomplete="off"
                                               placeholder="地磅自动带入" class="layui-input rkbk-search-input" disabled>
                                        <em
                                                class="kccz-data-dw">KG</em>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label color-red">承运人</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="userName" placeholder="自动带入,不可编辑" class="layui-input"
                                               disabled>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label  color-red" id="depotIdLabel">装卸仓库</label>
                                    <div class="layui-input-block">
                                        <select name="depotId" id="depotId" lay-filter="select_depotId">
                                            <option value=""></option>
                                            <option th:each="depot,depotSet:${listDepot}"
                                                    th:value="${depot.id}" th:text="${depot.name}"></option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label color-red">皮重(空车)</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="emptyWeight" id="emptyWeight" autocomplete="off"
                                               placeholder="地磅自动带入" class="layui-input weight rkbk-search-input"
                                               disabled>
                                        <em
                                                class="kccz-data-dw">KG</em>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">身份证号</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="userId" id="userId" placeholder="身份证号"
                                               autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label color-red">粮食品种</label>
                                    <div class="layui-input-block">
                                        <select name="foodVariety" id="foodVariety">
                                            <option value=""></option>
                                            <option th:each="dic,dicSet:${listFoodVariety}"
                                                    th:value="${dic.dictValue}" th:text="${dic.dictLabel}"></option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">净&nbsp;&nbsp;&nbsp;&nbsp;重</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="netWeight" autocomplete="off"
                                               placeholder="自动计算,不可编辑" class="layui-input rkbk-search-input"
                                               disabled> <em class="kccz-data-dw">KG</em>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">粮食产地</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="foodLocation" placeholder="请选择"
                                               autocomplete="off" class="layui-input" disabled="disabled"> <em
                                            class="kccz-data-dw cursor" onclick="showFoodLocation()">……</em>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">水分</label>
                                    <div class="layui-input-block">
                                        <input id="perWet" type="text" name="perWet" autocomplete="off"
                                               placeholder="请输入" class="layui-input weight"> <em
                                            class="kccz-data-dw">%</em>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">扣重</label>
                                    <div class="layui-input-block">
                                        <input id="deOther" type="text" name="deOther" autocomplete="off"
                                               placeholder="请输入" class="layui-input weight"> <em
                                            class="kccz-data-dw">KG</em>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">单价</label>
                                    <div class="layui-input-block">
                                        <input id="price" type="text" name="price" autocomplete="off"
                                               placeholder="请输入" class="layui-input weight"> <em
                                            class="kccz-data-dw">元</em>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">杂质</label>
                                    <div class="layui-input-block">
                                        <input id="perImpurity" type="text" name="perImpurity" autocomplete="off"
                                               placeholder="请输入" class="layui-input weight"> <em
                                            class="kccz-data-dw">%</em>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">入库重量</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="recordWeight" placeholder="自动计算"
                                               autocomplete="off" class="layui-input rkbk-search-input"
                                               disabled> <em class="kccz-data-dw">KG</em>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs8">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">备注说明</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="remarks" placeholder="请输入内容"
                                               class="layui-input">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">结算重量</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="settleWeight" placeholder="自动计算"
                                               autocomplete="off" class="layui-input rkbk-search-input"
                                               disabled> <em class="kccz-data-dw">KG</em>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <!--kccz-left-box2 end-->
            </div>
            <!--kccz-left end-->
            <div class="kccz-right fr">
                <div class="kccz-r-item radius-6">
                    <div class="kccz-r-box">
                        <div class="rkbk-tit">
                            <i style="margin: 8px 3px 0 3px"></i>
                            <h3>车牌识别视频</h3>
                        </div>
                        <div class="kccz-r-con">
                            <div class="kccz-r-vedio" id="kccz-r-video1">
                            </div>
                        </div>
                    </div>
                </div>
                <!--kccz-r-item end-->
                <div class="kccz-r-item radius-6 mt-10">
                    <div class="kccz-r-box">
                        <div class="rkbk-tit">
                            <i style="margin: 8px 3px 0 3px"></i>
                            <h3>车顶抓拍视频</h3>
                        </div>
                        <div class="kccz-r-con">
                            <div class="kccz-r-vedio" id="kccz-r-video2">
                            </div>
                        </div>
                    </div>
                </div>
                <!--kccz-r-item end-->
                <div class="kccz-r-item radius-6 mt-10">
                    <div class="kccz-r-box">
                        <div class="rkbk-tit">
                            <i style="margin: 8px 3px 0 3px"></i>
                            <h3>车尾抓拍视频</h3>
                        </div>
                        <div class="kccz-r-con">
                            <div class="kccz-r-vedio" id="kccz-r-video3">
                            </div>
                        </div>
                    </div>
                </div>
                <!--kccz-r-item end-->
            </div>
        </div>
        <!--kccz-con end-->
    </div>
    <!--rk-main end-->
</div>
<!--l-container end-->
<script th:inline="javascript">
    //流程环节
    var inoutProgress = [[${inoutProgress}]];
    var progress = [[${progress}]];
    var deptId = [[${deptId}]];
    var listDepot = [[${listDepot}]];
    //业务步骤
    var bizType = [[${bizType}]];
    var weightEditTag = [[${weightEditTag}]];
    //userId
    var userId = [[${loginUser.loginName}]];
    //出入库类型
    var type = [[${type}]];
    var companyId = [[${loginUser.companyId}]];
    //品种
    var listFoodVariety = [[${listFoodVariety}]];
    //地磅信息
    var weightDto = [[${weightDto}]];
    //过程摄像头
    var snapDto1 = [[${snapDto1}]];
    var snapDto2 = [[${snapDto2}]];
    var snapDto3 = [[${snapDto3}]];
    var gateDto = [[${gateDto}]];
    //智慧卡
    var cardDto = [[${cardDto}]];
    var ship = null; //是否船运页面标识
</script>
<script th:src="@{/ajax/libs/layui/layui.js}"></script>
<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/common/constant.js}"></script>
<script th:src="@{/common/igds-common.js}"></script>
<script th:src="@{/inout/inout-common.js}"></script>
<script th:src="@{/inout/inout-print.js}"></script>
<script th:src="@{/inout/video-play.js}"></script>
<script th:src="@{/inout/weight.js}"></script>
<script th:src="@{/web/inout/inout-weight.js}"></script>
</body>
<!-- å¼¹å‡ºé€šçŸ¥å• -->
<div class="layui-tab-content" id="listNotice" style="display: none;">
    <table class="layui-table" lay-skin="nob" id="tableNotice"
           lay-filter="tableNotice" style="margin: 0px;"></table>
</div>
<!-- å¼¹å‡ºç²®é£Ÿäº§åœ° -->
<div class="layui-tab-content" id="listFoodLocation"
     style="display: none;">
    <table class="layui-table" lay-skin="nob" id="tableFoodLoaction"
           lay-filter="tableFoodLoaction" style="margin: 0px;"></table>
</div>
<!-- è´¨æ£€ä¿¡æ¯ -->
<div class="layui-tab-content" id="checkDetail" style="display: none;">
    <!-- åŒ–验结果信息 -->
    <table class="layui-table tableCheckItem" id="tableCheckItem"
           lay-filter="tableCheckItem">
        <colgroup><col><col><col><col><col><col><col><col><col><col>
        </colgroup>
        <thead>
        <tr class="qyzj-table-tit">
            <th>检验项目</th>
            <th>检验值</th>
            <th>标准值</th>
            <th>单位</th>
            <th>扣重</th>
            <th>增重</th>
            <th>扣价</th>
            <th>增价</th>
            <th>检验结果</th>
            <th>备注</th>
        </tr>
        </thead>
        <tbody>
        </tbody>
    </table>
</div>
<!-- æµç¨‹æ•°æ®ä¿¡æ¯ -->
<div class="layui-tab-content" id="listProgressData" style="display: none;">
    <table class="layui-table tableListProgressData" id="tableListProgressData"
           lay-filter="tableListProgressData">
        <thead>
        <tr class="qyzj-table-tit">
            <th>单据号</th><th>承运人</th><th>车牌号</th><th>操作</th>
        </tr>
        </thead>
        <tbody>
        </tbody>
    </table>
</div>
<!-- å¼¹å‡ºæ¡†çš„信息 -->
<div class="layui-tab-content" id="dialog-from-notify" style="display: none;">
    <table class="layui-table">
        <colgroup>
            <col>
        </colgroup>
        <tbody>
        <tr>
            <td>返回信息</td>
            <td id="resultMsg" style="color: red;font-weight: bold;"></td>
        </tr>
        <tr>
            <td>承运人</td>
            <td id="resultUserName" style="font-weight: bold;"></td>
        </tr>
        <tr>
            <td>车牌号</td>
            <td id="resultPlateNum" style="font-weight: bold;"></td>
        </tr>
        <tr>
            <td>下一步</td>
            <td id="resultType" style="font-weight: bold;"></td>
        </tr>
        <tr>
            <td>智慧卡号</td>
            <td id="resultIntelCard" style="font-weight: bold;"></td>
        </tr>
        </tbody>
    </table>
</div>
<script type="text/html" id="toolbarFoodLocaton">
    <div class="">
        <div class="layui-col-xs6">
            <input type="text" id="key2" placeholder="输入编码或者名称……" class="layui-input">
        </div>
        <div class="layui-col-xs6" style="padding-left: 10px;">
            <button class="layui-btn layui-btn-sm" onclick="flushFoodLocation()">查询</button>
        </div>
    </div>
</script>
<script type="text/html" id="barSelectProgress">
    <a class="layui-btn layui-btn-xs" lay-event="select">选择称重</a>
</script>
</html>
fzzy-igdss-web/src/main/resources/templates/register.html
@@ -75,6 +75,6 @@
<script src="../static/ajax/libs/layer/layer.min.js" th:src="@{/ajax/libs/layer/layer.min.js}"></script>
<script src="../static/ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.7.8}"></script>
<script src="../static/ruoyi/register.js" th:src="@{/ruoyi/register.js}"></script>
<script src="../static/ruoyi/register.js" th:src="@{/ruoyi/inout-register.js}"></script>
</body>
</html>