已重命名2个文件
已删除2个文件
已添加36个文件
已修改24个文件
8952 ■■■■ 文件已修改
fzzy-igdss-core/src/main/java/com/fzzy/igds/bill/InoutBill.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/constant/Constant.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/ApiCameraData.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/ApiCameraResp.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/ApiInoutData.java 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/InoutCameraDto.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/InoutData.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/InoutParam.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/InoutPrintBill.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/NoticeDto.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/NoticeParam.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/SnapImgDto.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/FileInfo.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/InoutRecord.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/Patrol.java 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/PatrolConf.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/PatrolRecord.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/EventInfoMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/FileMapper.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/CoreDeptService.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/EventInfoService.java 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/FileService.java 204 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutRecordService.java 413 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SnapRecordService.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/utils/NumberUtil.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/pom.xml 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/FilePR.java 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/FileUploadManage.java 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutDataPR.java 161 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutHand.view.xml 944 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutList.view.xml 1165 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticePR.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapRecord.view.xml 200 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapRecordPR.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/models/core.model.xml 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/eventInfo/EventInfoController.java 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/file/FileController.java 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/inout/InoutApiController.java 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/inout/InoutController.java 83 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/print/PrintController.java 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/snapRecord/SnapRecordController.java 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/eventInfo/EventInfoManager.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/file/FileManager.java 133 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/inout/InoutManager.java 166 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/print/PrintManager.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/snapRecord/SnapRecordManager.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/eventInfo/eventInfo-style.css 201 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/eventInfo/eventInfo.js 278 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/inout/inout-check.js 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/inout/inout-handle.js 386 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/inout/inout-register.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/inout/inout-weight.js 526 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/inout/inout-weight2.js 605 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/inout/weight.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/snapRecord/snapRecord-style.css 201 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/snapRecord/snapRecord.js 278 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/templates/eventInfo/eventInfo.html 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/templates/inout/check.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/templates/inout/handle.html 632 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/templates/inout/register.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/templates/inout/weight.html 145 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/templates/inout/weight2.html 197 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/templates/snapRecord/snapRecord.html 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/bill/InoutBill.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
package com.fzzy.igds.bill;
/**
 * @Description å‡ºå…¥åº“的表单模版
 * @Author CZT
 * @Date 2025/12/4 9:27
 */
public class InoutBill {
    /**
     * é»˜è®¤å…¥åº“过磅单
     */
    public static String IN_WEIGHT_DEFAULT = "<!DOCTYPE html><html lang='zh-cn'><head><meta http-equiv='Content-Type' content='text/html;charset=UTF-8'><title>入库过磅单</title><style>body {text-align: center;padding: 10px}  .tit {margin: 10px;font-size: 24px;font-family: '宋体';padding-top: 15px}  .div-tit {padding-top: 10px}  table {width: 100%;border-right: 1px solid;border-bottom: 1px solid;font-size: 14px}  table td {border-left: 1px solid;border-top: 1px solid;height: 38px}  .sp1 {width: 50%;float: left;padding-bottom: 10px}  .sp2 {width: 25%;float: left;text-align: center}</style></head><body><h1 class='tit'>billTitle</h1><div id=\"print_main\" class='div-tit'><span class='sp1'>完成时间:<a>completeTime</a></span><span class='sp1'>单号:serId</span></div><table cellspacing='0' cellpadding='0'><tr><td width='12.5%'>发货单位</td><td colspan='3' width='37.5%'>customerName</td><td width='12.5%'>收货单位</td><td colspan='3' `width`='37.5%'>deptName</td></tr><tr><td width='12.5%'>承运人</td><td width='12.5%'>driverName</td><td width='12.5%'>粮食品种</td><td width='12.5%'>foodVariety</td><td width='12.5%'>装卸仓库</td><td width='12.5%'>depotName</td><td width='12.5%'>粮食产地</td><td width='12.5%'>foodLocation</td></tr><tr><td>承运车牌</td><td>plateNum</td><td>毛重(KG)</td><td>fullWeight</td><td>皮重(KG)</td><td>emptyWeight</td><td>净重(KG)</td><td>netWeight</td></tr><tr><td>质检扣重(KG)</td><td>deCheck</td><td>质检增重(KG)</td><td>addCheck</td><td>值仓扣重(KG)</td><td>deHandle</td><td>其他扣重(KG)</td><td>deOther</td></tr><tr><td>质检结果</td><td colspan='3'>checkStatus</td><td>入库重量(KG)</td><td>recordWeight</td><td>结算重量(KG)</td><td>settleWeight</td></tr><tr><td>备注</td><td colspan='7'>remark</td></tr></table><div class='div-tit'><span class='sp2'>司磅员:</span><span class='sp2'>监磅员:</span><span class='sp2'>保管员:handleUser</span><span class='sp2'>承运人:driverName</span></div></br><div style=\"padding-top: 10px\"><span></span></div><div style=\"text-align: left;font-size: 12px\"><span>注:</span></div><div style=\"text-align: left;font-size: 12px\"><span>1.净重=毛重-皮重;质检增扣重根据质检详细填写;</span></div><div style=\"text-align: left;font-size: 12px\"><span>2.入库重量=净重-扣重;结算重量=入库重量+质检增重;</span></div><div style=\"text-align: left;font-size: 12px\"><span>3.白联(存根),红联(记账),黄联(客户保留)</span></div></body></html>";
    /**
     * é»˜è®¤å‡ºåº“过磅单
     */
    public static String OUT_WEIGHT_DEFAULT = "<!DOCTYPE html><html lang='zh-cn'><head><meta http-equiv='Content-Type'content='text/html;charset=UTF-8'><title>出库称重单</title><style>body{text-align:center;padding:10px}.tit{margin:10px;font-size:24px;font-family:'宋体';padding-top:15px}.div-tit{padding-top:10px}.sp1{width:50%;float:left;padding-bottom:10px}.sp2{width:25%;float:left;text-align:center}table{width:100%;border-right:1px solid;border-bottom:1px solid;font-size:14px}table td{border-left:1px solid;border-top:1px solid;height:38px}</style></head><body><h1 class='tit'>billTitle</h1><div class='div-tit'><span class='sp1'>完成时间:completeTime</span><span class='sp1'>出库单号:serId</span></div><table cellspacing='0'cellpadding='0'><tr><td width='12.5%'>发货单位</td><td colspan='3'width='37.5%'>deptName</td><td width='12.5%'>收货单位</td><td colspan='3'width='37.5%'>customerName</td></tr><tr><td width='12.5%'>承运人</td><td width='12.5%'>driverName</td><td width='12.5%'>粮食品种</td><td width='12.5%'>foodVariety</td><td width='12.5%'>出库仓库</td><td width='12.5%'>depotName</td><td width='12.5%'>粮食产地</td><td width='12.5%'>foodLocation</td></tr><tr><td>承运车牌</td><td>plateNum</td><td>毛重(KG)</td><td>fullWeight</td><td>皮重(KG)</td><td>emptyWeight</td><td>净重(KG)</td><td>netWeight</td></tr><tr><td>其他扣重(KG)</td><td>deOther</td><td>值仓扣重(KG)</td><td>deHandle</td><td>出库重量(KG)</td><td>recordWeight</td><td>结算重量(KG)</td><td>settleWeight</td></tr><tr><td>备注</td><td colspan='7'>remark</td></tr></table><div class='div-tit'><span class='sp2'>司磅员:</span><span class='sp2'>监磅员:</span><span class='sp2'>保管员:handleUser</span><span class='sp2'>承运人:driverName</span></div><br></body><div style=\"padding-top: 10px\"><span></span></div><div style=\"text-align: left;font-size: 12px\"><span>注:</span></div><div style=\"text-align: left;font-size: 12px\"><span>1.净重=毛重-皮重;</span></div><div style=\"text-align: left;font-size: 12px\"><span>2.出库重量=净重-总扣重;结算重量=净重-总扣重;</span></div><div style=\"text-align: left;font-size: 12px\"><span>3.白联(存根),红联(记账),黄联(客户保留)</span></div></html>";
    /**
     * é»˜è®¤ç»“算单
     */
    public static String IN_SETTLE_DEFAULT = "<!DOCTYPE html><html lang='zh-cn'><head><meta http-equiv='Content-Type'content='text/html;charset=UTF-8'><title>入库过磅单</title><style>body{text-align:center;padding:10px}.tit{margin:10px;font-size:24px;font-family:'宋体';padding-top:15px}.div-tit{padding-top:10px}table{width:100%;border-right:1px solid;border-bottom:1px solid;font-size:14px}table td{border-left:1px solid;border-top:1px solid;height:38px}.sp1{width:50%;float:left;padding-bottom:10px}.sp2{width:50%;float:left;text-align:center}</style></head><body><h1 class='tit'>billTitle</h1><div class='div-tit'><span class='sp1'>结算时间:payTime</span><span class='sp1'>入库单号:serId</span></div><table cellspacing='0'cellpadding='0'><tr><td width='12.5%'>发货单位</td><td colspan='3'width='37.5%'>customerName</td><td width='12.5%'>收货单位</td><td colspan='3'width='37.5%'>deptName</td></tr><tr><td width='12.5%'>开户银行</td><td colspan='3'width='37.5%'>bank</td><td>毛重(KG)</td><td>fullWeight</td><td>皮重(KG)</td><td>emptyWeight</td></tr><tr><td width='12.5%'>银行卡号</td><td colspan='3'width='37.5%'>banNum</td><td>净重(KG)</td><td>netWeight</td><td>总扣重(KG)</td><td>deSum</td></tr><tr><td>入库仓库</td><td>depotName</td><td>粮食品种</td><td>foodVariety</td><td>粮食单价</td><td>payPrice</td><td>结算重量</td><td>settleWeight</td></tr><tr><td>保管员</td><td>keeperName</td><td>承运人</td><td>driverName</td><td>其他费用</td><td>otherSum</td><td>结算费用</td><td>paySum</td></tr><tr><td>备注</td><td colspan='3'>remark</td><td>大写金额</td><td colspan='3'>moneyName</td></tr></table><div class='div-tit'><span class=\"sp2\">收货单位签字:</span><span class=\"sp2\">客户签字:</span></div></body></html>";
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/constant/Constant.java
@@ -119,6 +119,14 @@
    // æµç¨‹-备案(表示流程整体完成后备案)
    public static final String PROGRESS_RECORD = "RECORD";
    // æ•°æ®çŠ¶æ€-正常
    public static final String RECORD_STATUS_NORMAL = "NORMAL";
    // æ•°æ®çŠ¶æ€-补录
    public static final String RECORD_STATUS_ADD = "ADD";
    // æ•°æ®çŠ¶æ€-已删除
    public static final String RECORD_STATUS_DEL = "DEL";
    /**
     * å‡ºå…¥åº“配置的类型 10 = è½¦ç‰Œè¯†åˆ«
     */
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/ApiCameraData.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,96 @@
package com.fzzy.igds.data;
import lombok.Data;
import java.io.Serializable;
/**
 * @Description èŽ·å–ç›‘æŽ§æ’­æ”¾ä¿¡æ¯å°è£…ç±»
 * @Author CZT
 * @Date 2024/12/11 10:10
 */
@Data
public class ApiCameraData implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    /**
     * ç»„织编码
     */
    private String companyId;
    /**
     * åˆ†åº“编码
     */
    private String deptId;
    /**
     * ç›‘控ID
     */
    private String cameraId;
    /**
     * ç›‘控名称
     */
    private String cameraName;
    /**
     * IP
     */
    private String ip;
    /**
     * æŽ§åˆ¶ç«¯å£
     */
    private Integer controlPort;
    /**
     * æ’­æ”¾æ–¹å¼
     */
    private String playType;
    /**
     * æŠ“拍方式
     **/
    private String snapType;
    /**
     * ç›‘控SN
     */
    private String sn;
    /**
     * é€šé“号
     */
    private Integer channel;
    /**
     * ç™»å½•名
     */
    private String loginId;
    /**
     * å¯†ç 
     */
    private String pwd;
    /**
     * äº‘台速度
     */
    private int speed = 129;//速度(0-255 é»˜è®¤129)
    /**
     * äº‘台控制命令 1=上,2=下,3=左,4=右,5=左上,6=左下,7=右上,8=右下,0=停止,9=变倍小,10 = å˜å€åŠ 
     * é¢„置位命令 1=设置,2=执行,3=删除
     */
    private String command;
    /**
     * é¢„置位编号1~255
     */
    private String preset;
    /**
     * RTSP地址
     */
    private String mediaAddr;
    /**
     * å†…网播放地址
     */
    private String urlIn;
    /**
     * å¤–网播放地址
     */
    private String urlOut;
    /**
     * è¯·æ±‚æ–¹IP,用于判断是内网播放,还是外网播放
     */
    private String requireIp;
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/ApiCameraResp.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,63 @@
package com.fzzy.igds.data;
import lombok.Data;
/**
 * @Description è§†é¢‘播放封装信息
 * @Author CZT
 * @Date 2024/12/11 09:59
 */
@Data
public class ApiCameraResp {
    public static String CODE_SUCCESS = "SUCCESS";
    public static String CODE_ERROR = "ERROR";
    private String code = CODE_SUCCESS;
    private String msg;
    /**
     * æ’­æ”¾ä¿¡æ¯
     */
    private String cameraId;  //监控ID
    private String cameraName;  //视频名称
    private String playUrl;  //播放地址
    private String playType; //播放方式
    private String snapType; //播放方式
    private String appkey; //安防平台appKey
    private String secret; //安防平台秘钥
    private String ip;     //设备IP
    private Integer port;   //设备端口
    private String sn;     //设备序列号
    /**
     * æŠ“拍附件名称
     */
    private String fileName;
    public ApiCameraResp() {
    }
    public ApiCameraResp(String playUrl) {
        this.code = CODE_SUCCESS;
        this.msg = "成功";
        this.playUrl = playUrl;
    }
    public ApiCameraResp(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public ApiCameraResp(String appkey, String secret, String ip, Integer port, String sn) {
        this.code = CODE_SUCCESS;
        this.msg = "成功";
        this.appkey = appkey;
        this.secret = secret;
        this.ip = ip;
        this.port = port;
        this.sn = sn;
    }
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/ApiInoutData.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,126 @@
package com.fzzy.igds.data;
import com.fzzy.igds.domain.InoutConf;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * å‡ºå…¥åº“流程过程中,车牌失败,读卡器等设备的公共参数和传递对象
 */
@Data
public class ApiInoutData implements Serializable {
    private static final long serialVersionUID = 1L;
    private String id;
    private String companyId;
    private String deptId;
    /**
     * å‡ºå…¥åº“配套序号
     */
    private String sort = "1";
    /**
     * è®¾å¤‡åç§°
     */
    private String name;
    /**
     * è®¾å¤‡åºåˆ—号/设备编码
     */
    private String sn;
    private String ip;
    private Integer port;
    private String loginId;
    private String pwd;
    private int chanNum = 1;
    private Integer portCtrl;
    private String type;
    private String status;
    private String protocol;
    private String playType;
    private String snapType;
    /**
     * è½¦ç‰Œè¯†åˆ«æŠ“拍-适用于风正致远API-HTTP协议
     */
    private String plateSnapType;
    private String mediaAddr;
    private String videoPath;
    private String videoName;
    private String errorMsg = "ERROR";
    // è½¦ç‰Œå·
    private String plateNum;
    // ç”¨æˆ·Id
    private String userId;
    private Date time = new Date();
    //信息
    private String msg;
    //信息播放次数
    private int repeat = 1;
    //智慧卡号
    private String icCardNo;
    //称重信息
    private double weight = 0.0;
    //动作编码:0=关闭/红灯,1=打开/路灯
    private String actionCode;
    //设备编号
    private int deviceCode;
    public ApiInoutData() {
        super();
    }
    public ApiInoutData(InoutConf conf) {
        this.id = conf.getId();
        this.companyId = conf.getCompanyId();
        this.deptId = conf.getDeptId();
        this.sort = conf.getSort();
        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.deviceCode = conf.getInOrder();
    }
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/InoutCameraDto.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
package com.fzzy.igds.data;
import com.fzzy.igds.domain.InoutConf;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
 * å‡ºå…¥åº“视频
 */
@Data
@EqualsAndHashCode(callSuper=false)
public class InoutCameraDto extends InoutConf implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    /**
     * è§†é¢‘播放地址,根据不同的播放方式生成不同的播放地址
     */
    private String playAddr;
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/InoutData.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
package com.fzzy.igds.data;
import com.fzzy.igds.domain.FileInfo;
import com.fzzy.igds.domain.InoutRecord;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.List;
/**
 * @Description
 * @Author CZT
 * @Date 2025/12/4 14:04
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class InoutData extends InoutRecord implements Serializable {
    //提交的相关附件信息,例如照片。
    private List<FileInfo> files;
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/InoutParam.java
@@ -19,6 +19,8 @@
    private String progress;
    private String progressTag; //表示未完成的单据
    private String weightTag;
    private String type;
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/InoutPrintBill.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
package com.fzzy.igds.data;
import lombok.Data;
import java.io.Serializable;
/**
 * ç§°é‡å•信息封装
 *
 * @author chen
 */
@Data
public class InoutPrintBill implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    private String billTitle = "称重单";
    private String companyId = "";
    //登记时间
    private String registerTime = "";
    //完成时间
    private String completeTime = "";
    //完成时间
    private String fullTime = "";
    //完成时间
    private String emptyTime = "";
    //流水单号
    private String serId = "";
    //往来单位(入库为发货单位,出库为收货单位)
    private String customerName = "";
    //往来单位(出库为发货单位,入库为收货单位)
    private String unitName = "";
    private String noticeId = "";
    private String deptId = "";
    private String deptName = "";
    private String weightUser = "";//称重人
    private String keeperUser = "";//保管员
    //承运人
    private String driverName = "";
    private String userId = "";
    private String userContact = "";
    private String userAddress = "";
    //粮食品种
    private String foodVariety = "";
    //仓库名称
    private String depotName = "";
    //粮食产地
    private String foodLocation = "";
    private String foodLevel = "";
    //承运车牌
    private String plateNum = "";
    //毛重
    private double fullWeight = 0.0;
    //皮重
    private double emptyWeight = 0.0;
    //净重
    private double netWeight = 0.0;
    //质检扣重
    private double deCheck = 0.0;
    //质检增重
    private double addCheck = 0.0;
    //包装扣重
    private double dePackage = 0.0;
    //质检结果
    private String checkStatus;
    //入库重量
    private double recordWeight = 0.0;
    //水分增扣重
    private double deWet = 0.0;
    //杂质增扣重
    private double deImpurity = 0.0;
    //水分
    private String wet = "";
    //杂质
    private String impurity = "";
    //值仓扣重
    private double deHandle = 0.0;
    //其他扣重
    private double deOther = 0.0;
    //总扣重
    private double deSum = 0.0;
    //结算金额
    private String settleMoney = "";
    //结算重量
    private double settleWeight = 0.0;
    //单价
    private String price = "";
    //大写金额
    private String moneyName = "";
    //备注
    private String remark = "";
    //保管员
    private String handleUser = "";
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/NoticeDto.java
@@ -86,6 +86,6 @@
    /**
     * æ‰€å±žåˆåŒ
     */
    private String contractName;
    private String contract;
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/NoticeParam.java
@@ -19,6 +19,8 @@
    private String depotId;
    private String key;
    private String deptId;// æ‰€å±žåˆ†åº“
    private String customerName;// å®¢æˆ·åç§°
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/SnapImgDto.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,48 @@
package com.fzzy.igds.data;
import com.fzzy.igds.constant.Constant;
import lombok.Data;
/**
 * @Description æŠ“拍对象封装,支持出入库和系统配置
 * @Author CZT
 * @Date 2025/12/4 9:27
 */
@Data
public class SnapImgDto {
    private String companyId;
    private String deptId;
    //外键ID--用于保存文件数据库使用
    private String bizId;
    // ä¸šåŠ¡ç¬¬äºŒä¸ªæ ‡ç­¾
    private String progress;
    //业务类型
    private String bizType = Constant.TYPE_IN;
    //出入库车牌号
    private String plateNum;
    //配置信息ID1
    private String id1;
    //配置信息ID2
    private String id2;
    //配置信息ID2
    private String id3;
    private String fileName1;
    private String fileName2;
    private String fileName3;
    private String sort;
    private double weight;
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/FileInfo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,55 @@
package com.fzzy.igds.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
/**
 * @Description é™„件信息
 * @Author CZT
 * @Date 2025/12/4 13:56
 */
@Data
@Entity
@Table(name = "d_file")
@TableName("d_file")
@EqualsAndHashCode(callSuper = false)
public class FileInfo extends BizBaseEntity implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "id", columnDefinition = "varchar(40) COMMENT '附件ID'")
    @TableField("id")
    private String id;
    @Column(name = "dept_id", columnDefinition = "varchar(40) COMMENT '所属库区'")
    @TableField("dept_id")
    private String deptId;
    @Column(name = "biz_id", columnDefinition = "varchar(40) COMMENT '业务ID'")
    @TableField("biz_id")
    private String bizId;
    @Column(name = "biz_tag", columnDefinition = "varchar(40) COMMENT '业务标签'")
    @TableField("biz_tag")
    private String bizTag;
    @Column(name = "file_name", columnDefinition = "varchar(200) COMMENT '文件路径及名称'")
    @TableField("file_name")
    private String fileName;
    @Column(name = "file_path", columnDefinition = "varchar(200) COMMENT '文件全路径'")
    @TableField("file_path")
    private String filePath;
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/InoutRecord.java
@@ -196,10 +196,6 @@
    @TableField("settle_money")
    private Double settleMoney = 0.00;
    @Column(name = "settle_id", columnDefinition = "varchar(40) COMMENT '结算单号'")
    @TableField("settle_id")
    private String settleId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "settle_time", columnDefinition = "datetime COMMENT '结算时间'")
    @TableField("settle_time")
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/Patrol.java
@@ -11,12 +11,6 @@
import javax.persistence.Table;
import java.io.Serializable;
/**
 * @Description ç”µå­å·¡é€»è®°å½•主表
 * @Author sgj
 * @Date 2025/12/04 11:38
 */
@Data
@Entity
@Table(name = "d_patrol")
@@ -29,29 +23,20 @@
     */
    private static final long serialVersionUID = 1L;
    //生成规则 å¹´æœˆæ—¥
    @Id
    @Column(name = "id", columnDefinition = "varchar(40) COMMENT '主键'")
    @TableField("id")
    private String id;
    @Id
    @Column(name = "batch_id", columnDefinition = "varchar(40) COMMENT '班次编号'")
    @TableField("batch_id")
    private String batchId;
    @Id
    @Column(name = "user_id", columnDefinition = "varchar(40) COMMENT '巡逻人账号'")
    @TableField("user_id")
    private String userId;
    @Column(name = "user_name", columnDefinition = "varchar(40) COMMENT '巡逻人'")
    @TableField("user_name")
    private String userName;
    @Column(name = "dept_id", columnDefinition = "varchar(40) COMMENT '所属库区'")
    @TableField("dept_id")
    private String deptId;
    @Column(name = "batch_id", columnDefinition = "varchar(40) COMMENT '班次编号'")
    @TableField("batch_id")
    private String batchId;
    @Column(name = "user_name", columnDefinition = "varchar(40) COMMENT '巡逻人'")
    @TableField("user_name")
    private String userName;
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/PatrolConf.java
@@ -2,7 +2,6 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -11,13 +10,7 @@
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
 * @Description ç”µå­å·¡é€»é…ç½®
 * @Author sgj
 * @Date 2025/12/04 11:38
 */
@Data
@Entity
@Table(name = "d_patrol_conf")
@@ -39,15 +32,8 @@
    @TableField("batch_name")
    private String batchName;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "start_time", columnDefinition = "datetime COMMENT '巡逻开始时间'")
    @TableField("start_time")
    private Date startTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "end_time", columnDefinition = "datetime COMMENT '巡逻结束时间'")
    @TableField("end_time")
    private Date endTime;
    @Column(name = "user_name", columnDefinition = "varchar(40) COMMENT '巡逻人'")
    @TableField("user_name")
    private String userName;
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/PatrolRecord.java
@@ -2,14 +2,16 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
/**
 * @Description ç”µå­å·¡é€»è®°å½•子表
 * @Description ç”µå­å·¡é€»
 * @Author CZT
 * @Date 2025/11/25 19:38
 */
@@ -40,6 +42,11 @@
    @TableField("point_name")
    private String pointName;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "create_time", columnDefinition = "datetime COMMENT '巡逻时间'")
    @TableField("create_time")
    private Date createTime;
    @Column(name = "longitude", columnDefinition = "decimal(20,6) COMMENT '经度'")
    @TableField("longitude")
    private String longitude;
@@ -51,11 +58,16 @@
    /**
     * --------鸟瞰图信息--------
     **/
    @Column(name = "img_id", columnDefinition = "varchar(50) COMMENT '巡更照片'")
    @TableField("img_id")
    private String imgId;
    @Column(name = "file_name", columnDefinition = "varchar(50) COMMENT '巡更照片'")
    @TableField("file_name")
    private String imgName;
    //巡更照片全路径
    @Transient
    private String imgPath;
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/EventInfoMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
package com.fzzy.igds.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fzzy.igds.domain.EventInfo;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface EventInfoMapper extends BaseMapper<EventInfo> {
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/FileMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
package com.fzzy.igds.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fzzy.igds.domain.FileInfo;
import org.apache.ibatis.annotations.Mapper;
/**
 * @Description
 * @Author CZT
 * @Date 2025/12/05 15:48
 */
@Mapper
public interface FileMapper extends BaseMapper<FileInfo> {
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/CoreDeptService.java
@@ -68,6 +68,16 @@
    }
    /**
     * æ ¹æ®ID查询库区信息
     * @param id
     * @return
     */
    public Dept getDeptById(String id) {
        return coreDeptMapper.selectById(id);
    }
    /**
     * æ–°å¢žæˆ–更新库区信息
     * @param sysDept
     * @param isAdd
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/EventInfoService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,85 @@
package com.fzzy.igds.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fzzy.igds.data.BaseResp;
import com.fzzy.igds.data.IgdsBaseParam;
import com.fzzy.igds.domain.EventInfo;
import com.fzzy.igds.mapper.EventInfoMapper;
import com.fzzy.igds.utils.ContextUtil;
import com.ruoyi.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
@Slf4j
@Service
public class EventInfoService {
    @Resource
    private EventInfoMapper eventInfoMapper;
    /**
     * åˆ†é¡µæŸ¥è¯¢æ•°æ®
     *
     * @param page
     * @param param
     */
    public void listPage(Page<EventInfo> page, IgdsBaseParam param) {
        QueryWrapper<EventInfo> queryWrapper = getQueryWrapper(param);
        eventInfoMapper.selectPage(page, queryWrapper);
    }
    /**
     * å°è£…查询条件
     *
     * @param param
     */
    public QueryWrapper<EventInfo> getQueryWrapper(IgdsBaseParam param) {
        QueryWrapper<EventInfo> queryWrapper = new QueryWrapper<>();
        param.setCompanyId(ContextUtil.getCompanyId());
        queryWrapper.eq("company_id", param.getCompanyId());
        if (StringUtils.isNotBlank(param.getDeptId())) {
            queryWrapper.eq("dept_id", param.getDeptId());
        }
        queryWrapper.orderByDesc("create_time");
        return queryWrapper;
    }
    public List<EventInfo> listAll(IgdsBaseParam param) {
        if (null == param)
            return eventInfoMapper.selectList(null);
        QueryWrapper<EventInfo> queryWrapper = new QueryWrapper<>();
        if (StringUtils.isNotEmpty(param.getName())) {
            queryWrapper.like("name", param.getName());
        }
        return eventInfoMapper.selectList(queryWrapper);
    }
    public BaseResp addData(EventInfo eventInfo) {
        eventInfo.setId(ContextUtil.generateId());
        eventInfo.setCompanyId(ContextUtil.getCompanyId());
        eventInfo.setUpdateBy(ContextUtil.getLoginUserName());
        eventInfo.setUpdateTime(new Date());
        eventInfo.setCreateBy(ContextUtil.getLoginUserName());
        eventInfo.setCreateTime(new Date());
        return eventInfoMapper.insert(eventInfo) > 0 ? BaseResp.success() : BaseResp.error("添加失败");
    }
    public BaseResp updateData(EventInfo eventInfo) {
        eventInfo.setUpdateBy(ContextUtil.getLoginUserName());
        eventInfo.setUpdateTime(new Date());
        return eventInfoMapper.updateById(eventInfo) > 0 ? BaseResp.success() : BaseResp.error("更新失败");
    }
    public BaseResp deleteData(EventInfo eventInfo) {
        return eventInfoMapper.deleteById(eventInfo) > 0 ? BaseResp.success() : BaseResp.error("删除失败");
    }
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/FileService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,204 @@
package com.fzzy.igds.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fzzy.igds.domain.FileInfo;
import com.fzzy.igds.mapper.FileMapper;
import com.fzzy.igds.utils.ContextUtil;
import com.ruoyi.common.config.FrameworkConfig;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import com.ruoyi.common.utils.StringUtils;
import javax.annotation.Resource;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.Date;
import java.util.List;
/**
 * @Description
 * @Author CZT
 * @Date 2025/12/4 17:36
 */
@Service
public class FileService {
    @Resource
    private FileMapper fileMapper;
    /**
     * å¼‚步执行附件保存
     * @param files     é™„件信息
     * @param bizId     ä¸šåŠ¡id
     * @param bizTag    æ ‡ç­¾
     * @param pathTag   æ–‡ä»¶è·¯å¾„标识
     */
    @Async
    public void saveInoutFiles(List<FileInfo> files, String bizId, String bizTag, String pathTag) {
        if (null == files || files.isEmpty()) {
            return;
        }
        for (FileInfo data : files) {
            // å¦‚果没有附件名称,则不保存附件信息
            if (StringUtils.isBlank(data.getFileName())) {
                continue;
            }
            data.setId(ContextUtil.generateId());
            data.setCompanyId(ContextUtil.getCompanyId());
            //文件全路径
            String filePath = getFileSavePath(pathTag) + data.getFileName();
            filePath = filePath.replace(FrameworkConfig.getProfile(), "/profile/");
            data.setFilePath(filePath);
            if (StringUtils.isNotEmpty(bizId)) {
                data.setBizId(bizId);
            }
            if (StringUtils.isNotEmpty(bizTag)) {
                data.setBizTag(bizTag);
            }
            data.setCreateTime(new Date());
            data.setCreateBy(ContextUtil.getLoginUserName());
            data.setUpdateTime(new Date());
            data.setUpdateBy(ContextUtil.getLoginUserName());
            fileMapper.insert(data);
        }
    }
    /**
     * æ ¹æ®æ¡ä»¶æŸ¥è¯¢æ•°æ®
     * @param companyId
     * @param deptId
     * @param bizId
     * @return
     */
    public List<FileInfo> listFile(String companyId, String deptId, String bizId, String bizTag) {
        QueryWrapper<FileInfo> queryWrapper = new QueryWrapper<>();
        if (StringUtils.isNotBlank(companyId)) {
            queryWrapper.eq("company_id", companyId);
        }
        if (StringUtils.isNotBlank(deptId)) {
            queryWrapper.eq("dept_id", deptId);
        }
        if (StringUtils.isNotBlank(bizId)) {
            queryWrapper.eq("biz_id", bizId);
        }
        if (StringUtils.isNotBlank(bizTag)) {
            queryWrapper.eq("biz_tag", bizTag);
        }
        return fileMapper.selectList(queryWrapper);
    }
    /**
     *
     * @param id
     */
    public void delFile(String id) {
        fileMapper.deleteById(id);
    }
    /**
     * èŽ·å–å‡ºå…¥åº“æ–‡ä»¶è·¯å¾„
     * @param pathTag
     * @return
     */
    public String getFileSavePath(String pathTag) {
        if(StringUtils.isBlank(pathTag)){
            pathTag = "COMMON";
        }
        if("INOUT".equals(pathTag)) return getInoutFilePath();
        if("PATROL".equals(pathTag)) return getPatrolFilePath();
        if("DEPT".equals(pathTag)) return getDeptFilePath();
        return getCommonFilePath();
    }
    /**
     * èŽ·å–å‡ºå…¥åº“æ–‡ä»¶è·¯å¾„
     * @return
     */
    public String getPatrolFilePath() {
        String basePath = FrameworkConfig.getProfile() + "INOUT/" + DateFormatUtils.format(new Date(), "yyyyMM") + "/";
        File file = new File(basePath);
        if (!file.exists()) {
            file.mkdirs();
        }
        return basePath;
    }
    /**
     * èŽ·å–å‡ºå…¥åº“æ–‡ä»¶è·¯å¾„
     * @return
     */
    public String getInoutFilePath() {
        String basePath = FrameworkConfig.getProfile() + "INOUT/" + DateFormatUtils.format(new Date(), "yyyyMM") + "/";
        File file = new File(basePath);
        if (!file.exists()) {
            file.mkdirs();
        }
        return basePath;
    }
    /**
     * èŽ·å–åº“åŒºè·¯å¾„ä¸‹æ–‡ä»¶
     * @return
     */
    public String getDeptFilePath() {
        String basePath = FrameworkConfig.getProfile() + "IMG/"+ FrameworkConfig.getCompanyId() + "/SECURITY/";
        File file = new File(basePath);
        if (!file.exists()) {
            file.mkdirs();
        }
        return basePath;
    }
    /**
     * èŽ·å–å…¬å…±è·¯å¾„
     * @return
     */
    public String getCommonFilePath() {
        String basePath = FrameworkConfig.getProfile() + "COMMON/" + DateFormatUtils.format(new Date(), "yyyyMM") + "/";
        File file = new File(basePath);
        if (!file.exists()) {
            file.mkdirs();
        }
        return basePath;
    }
    /**
     * åŽ‹ç¼©å›¾ç‰‡
     *
     * @param filePath   åŽ‹ç¼©å‰è·¯å¾„
     * @param scale      åŽ‹ç¼©æ¯”ä¾‹
     * @param outputPath åŽ‹ç¼©åŽè·¯å¾„
     * @throws IOException
     */
    public void compressedImage(String filePath, double scale, String outputPath) throws IOException {
        BufferedImage bufferedImage = ImageIO.read(new File(filePath));
        int newWidth = (int) (bufferedImage.getWidth() * scale);
        int newHeight = (int) (bufferedImage.getHeight() * scale);
        //创建压缩后的图片
        BufferedImage compressedImage = new BufferedImage(newWidth, newHeight, BufferedImage.TYPE_INT_RGB);
        Graphics2D graphics2D = compressedImage.createGraphics();
        //绘制原始图片到压缩后的图片上
        graphics2D.drawImage(bufferedImage, 0, 0, newWidth, newHeight, null);
        graphics2D.dispose();
        ImageIO.write(compressedImage, "jpg", new File(outputPath));
    }
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java
@@ -62,22 +62,22 @@
    /**
     * æ ¹æ®æ¡ä»¶æŸ¥è¯¢
     * @param companyId
     * @param deptId
     * @param completeStatus
     * @return
     */
    public List<InoutNoticeIn> getNoticeIn(String companyId, String deptId, String completeStatus) {
    public List<InoutNoticeIn> getNoticeIn(NoticeParam param) {
        QueryWrapper<InoutNoticeIn> queryWrapper = new QueryWrapper<>();
        if(StringUtils.isNotBlank(companyId)){
            queryWrapper.eq("company_id", companyId);
        if(StringUtils.isNotBlank(param.getCompanyId())){
            queryWrapper.eq("company_id", param.getCompanyId());
        }
        if(StringUtils.isNotBlank(deptId)){
            queryWrapper.eq("dept_id", deptId);
        if(StringUtils.isNotBlank(param.getDeptId())){
            queryWrapper.eq("dept_id", param.getDeptId());
        }
        if(StringUtils.isNotBlank(completeStatus)){
            queryWrapper.eq("complete_status", completeStatus);
        if(StringUtils.isNotBlank(param.getCompleteStatus())){
            queryWrapper.eq("complete_status", param.getCompleteStatus());
        }
        if(StringUtils.isNotBlank(param.getKey())){
            queryWrapper.like("name", param.getKey());
        }
        queryWrapper.orderByDesc("create_time");
        
@@ -97,16 +97,6 @@
    }
    /**
     * æŸ¥è¯¢æ•°æ®
     * @param companyId
     * @param deptId
     * @return
     */
    public List<InoutNoticeIn> listNoticeIn(String companyId, String deptId) {
        return this.getNoticeIn(companyId, deptId, Constant.COMPLETE_STATUS_NONE);
    }
    /**
     *  æŸ¥è¯¢æ•°æ®
     * @param companyId
     * @return
@@ -115,7 +105,10 @@
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        return this.getNoticeIn(companyId, null, Constant.COMPLETE_STATUS_NONE);
        NoticeParam param = new NoticeParam();
        param.setCompanyId(companyId);
        param.setCompleteStatus(Constant.COMPLETE_STATUS_NONE);
        return this.getNoticeIn(param);
    }
    /**
@@ -183,22 +176,21 @@
    /**
     * æ ¹æ®æ¡ä»¶æŸ¥è¯¢
     * @param companyId
     * @param deptId
     * @param completeStatus
     * @return
     */
    public List<InoutNoticeOut> getNoticeOut(String companyId, String deptId, String completeStatus) {
    public List<InoutNoticeOut> getNoticeOut(NoticeParam param) {
        QueryWrapper<InoutNoticeOut> queryWrapper = new QueryWrapper<>();
        if(StringUtils.isNotBlank(companyId)){
            queryWrapper.eq("company_id", companyId);
        if(StringUtils.isNotBlank(param.getCompanyId())){
            queryWrapper.eq("company_id", param.getCompanyId());
        }
        if(StringUtils.isNotBlank(deptId)){
            queryWrapper.eq("dept_id", deptId);
        if(StringUtils.isNotBlank(param.getDeptId())){
            queryWrapper.eq("dept_id", param.getDeptId());
        }
        if(StringUtils.isNotBlank(completeStatus)){
            queryWrapper.eq("complete_status", completeStatus);
        if(StringUtils.isNotBlank(param.getCompleteStatus())){
            queryWrapper.eq("complete_status", param.getCompleteStatus());
        }
        if(StringUtils.isNotBlank(param.getKey())){
            queryWrapper.like("name", param.getKey());
        }
        queryWrapper.orderByDesc("create_time");
@@ -218,16 +210,6 @@
    }
    /**
     * æŸ¥è¯¢æ•°æ®
     * @param companyId
     * @param deptId
     * @return
     */
    public List<InoutNoticeOut> listNoticeOut(String companyId, String deptId) {
        return this.getNoticeOut(companyId, deptId, Constant.COMPLETE_STATUS_NONE);
    }
    /**
     * Mybatis-plus èŽ·å–ä¿¡æ¯
     * @param companyId
     * @return
@@ -236,7 +218,10 @@
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        return this.getNoticeOut(companyId, null,Constant.COMPLETE_STATUS_NONE);
        NoticeParam param = new NoticeParam();
        param.setCompanyId(companyId);
        param.setCompleteStatus(Constant.COMPLETE_STATUS_NONE);
        return this.getNoticeOut(param);
    }
    /**
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutRecordService.java
@@ -2,19 +2,28 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fzzy.igds.bill.InoutBill;
import com.fzzy.igds.constant.Constant;
import com.fzzy.igds.constant.FoodVariety;
import com.fzzy.igds.constant.RedisConst;
import com.fzzy.igds.data.InoutData;
import com.fzzy.igds.data.InoutParam;
import com.fzzy.igds.data.InoutPrintBill;
import com.fzzy.igds.domain.Depot;
import com.fzzy.igds.domain.InoutRecord;
import com.fzzy.igds.mapper.InoutRecordMapper;
import com.fzzy.igds.utils.ContextUtil;
import com.fzzy.igds.utils.DateUtil;
import com.fzzy.igds.utils.NumberUtil;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.text.DecimalFormat;
import java.util.Date;
import java.util.List;
@@ -30,6 +39,12 @@
    @Resource
    private InoutRecordMapper inoutRecordMapper;
    @Resource
    private FileService fileService;
    @Resource
    private SysDeptService sysDeptService;
    @Resource
    private DepotService depotService;
    @Resource
    private RedisCache redisCache;
    /**
@@ -38,6 +53,12 @@
     * @param param
     */
    public void listPageInout(Page<InoutRecord> page, InoutParam param) {
        if(StringUtils.isBlank(param.getCompanyId())){
            param.setCompanyId(ContextUtil.getCompanyId());
        }
        if(StringUtils.isBlank(param.getDeptId())){
            param.setDeptId(ContextUtil.subDeptId(null));
        }
        QueryWrapper<InoutRecord> queryWrapper = getQueryWrapper(param);
        inoutRecordMapper.selectPage(page, queryWrapper);
    }
@@ -47,7 +68,14 @@
     * @param param
     */
    public List<InoutRecord> listInout(InoutParam param) {
        if(StringUtils.isBlank(param.getCompanyId())){
            param.setCompanyId(ContextUtil.getCompanyId());
        }
        if(StringUtils.isBlank(param.getDeptId())){
            param.setDeptId(ContextUtil.subDeptId(null));
        }
        QueryWrapper<InoutRecord> queryWrapper = getQueryWrapper(param);
        return inoutRecordMapper.selectList(queryWrapper);
    }
@@ -57,16 +85,32 @@
     */
    public QueryWrapper<InoutRecord> getQueryWrapper(InoutParam param) {
        QueryWrapper<InoutRecord> queryWrapper = new QueryWrapper<>();
        param.setCompanyId(ContextUtil.getCompanyId());
        param.setDeptId(ContextUtil.subDeptId(null));
        queryWrapper.eq("company_id", param.getCompanyId());
        queryWrapper.eq("dept_id", param.getDeptId());
        if (StringUtils.isNotBlank(param.getCompanyId())) {
            queryWrapper.eq("company_id", param.getCompanyId());
        }
        if (StringUtils.isNotBlank(param.getDeptId())) {
            queryWrapper.eq("dept_id", param.getDeptId());
        }
        if (StringUtils.isNotBlank(param.getCustomerName())) {
            queryWrapper.like("customer_name", param.getCustomerName());
        }
        if (StringUtils.isNotBlank(param.getId())) {
            queryWrapper.eq("id", param.getId());
        }
        if (StringUtils.isNotBlank(param.getPlateNum())) {
            queryWrapper.like("plate_num", param.getPlateNum());
        }
        if (StringUtils.isNotBlank(param.getWeightTag())) {
            //查询待称重的
            queryWrapper.likeRight("progress", param.getWeightTag());
        }
        if (StringUtils.isNotBlank(param.getProgressTag())) {
            //未完成的
            queryWrapper.ne("progress", param.getProgressTag());
        }
        if (StringUtils.isNotBlank(param.getProgress())) {
            queryWrapper.eq("progress", param.getProgress());
        }
        if (StringUtils.isNotBlank(param.getFoodVariety())) {
            queryWrapper.eq("food_variety", param.getFoodVariety());
@@ -86,7 +130,9 @@
        if (null != param.getEnd()) {
            queryWrapper.le("create_time", DateUtil.getNextZero(param.getEnd()));
        }
        queryWrapper.eq("record_status", "NORMAL"); //正常状态的单子
        queryWrapper.eq("record_status", Constant.RECORD_STATUS_NORMAL); //正常状态的单子
        queryWrapper.or();
        queryWrapper.eq("record_status", Constant.RECORD_STATUS_ADD); //补录单子的单子
        queryWrapper.orderByDesc("create_time");
        return queryWrapper;
@@ -94,16 +140,17 @@
    /**
     * æ ¹æ®id查询数据
     * @param id
     * æŸ¥è¯¢æ•°æ®
     * @param param
     * @return
     */
    public InoutRecord selectById(String id) {
        if(StringUtils.isBlank(id)){
            return null;
    public InoutRecord selectOne(InoutParam param) {
        if(StringUtils.isBlank(param.getCompanyId())){
            param.setCompanyId(ContextUtil.getCompanyId());
        }
        return inoutRecordMapper.selectById(id);
        QueryWrapper<InoutRecord> queryWrapper = getQueryWrapper(param);
        return inoutRecordMapper.selectOne(queryWrapper);
    }
    /**
@@ -122,8 +169,59 @@
        queryWrapper.eq("plate_num", plateNum);
        queryWrapper.ne("progress", Constant.PROGRESS_RECORD);
        queryWrapper.eq("record_status", "NORMAL");
        queryWrapper.or();
        queryWrapper.eq("record_status", Constant.RECORD_STATUS_ADD); //补录单子的单子
        return inoutRecordMapper.selectCount(queryWrapper);
    }
    /**
     * æ‰‹åŠ¨è¡¥å•
     * @param data
     * @return
     */
    public String handAddInoutRecord(InoutData data) {
        //补单数据直接到结果状态
        data.setRecordStatus(Constant.RECORD_STATUS_ADD);
        data.setProgress(Constant.PROGRESS_RECORD);
        if(null != data.getPerWet() && data.getPerWet() > 0){
            data.setCheckStatus(Constant.STATUS_CHECK);
        }
        String loginUser = ContextUtil.getLoginUserName();
        if (StringUtils.isEmpty(data.getRegisterUser())) {
            data.setRegisterUser(loginUser);
        }
        if (StringUtils.isEmpty(data.getFullWeightUser())) {
            data.setFullWeightUser(loginUser);
        }
        if (StringUtils.isEmpty(data.getEmptyWeightUser())) {
            data.setEmptyWeightUser(loginUser);
        }
        if (StringUtils.isEmpty(data.getHandleUser())) {
            data.setHandleUser(loginUser);
        }
        if (StringUtils.isEmpty(data.getCompleteUser())) {
            data.setCompleteUser(loginUser);
        }
        if (null == data.getCompleteTime()) {
            data.setCompleteTime(new Date());
        }
        InoutRecord record = new InoutRecord();
        BeanUtils.copyProperties(data, record);
        //保存
        int num = this.addInoutRecord(record);
        //附件处理
        fileService.saveInoutFiles(data.getFiles(), record.getId(), null, "INOUT");
        if (num > 0) {
            return null;
        } else {
            return "保存失败!";
        }
    }
    /**
@@ -172,6 +270,38 @@
        //updateInoutCache(data);
        return num;
    }
    /**
     * å¼‚常终止
     * @param data
     * @return
     */
    public String errorInoutData(InoutRecord data) {
        InoutParam param = new InoutParam();
        param.setId(data.getId());
        data = this.selectOne(param);
        if (Constant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
            return "当前信息已做异常处理,不支持重复执行!";
        }
        String msg = " äºŽ" + DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm") + " è¢« " + ContextUtil.getLoginUserName() + " æ‰§è¡Œç»ˆæ­¢ï¼ŒåŽŸå› ï¼š" + data.getRemarks();
        data.setRemarks(msg);
        data.setProgress(Constant.PROGRESS_RECORD);
        data.setRecordStatus(Constant.RECORD_STATUS_DEL);
        data.setCompleteTime(new Date());
        int i = this.updateInoutRecord(data);
        //TODO åˆ é™¤ç¼“å­˜
        if(i > 0){
            return null;
        }else {
            return "操作失败!";
        }
    }
    /**
@@ -262,4 +392,261 @@
        }
    }
    /**
     * èŽ·å–å…¥åº“è¿‡ç£…å•æ•°æ®ä¿¡æ¯
     *
     * @param data
     * @return
     */
    public String inWeightBill(InoutRecord data) {
        // èŽ·å–è¡¨å•æ•°æ®
        InoutPrintBill bill = this.createBillData(data, "入库划码单");
        // è°ƒæ•´æ¨¡ç‰ˆæ•°æ®å¹¶è¿”回
        String htmlStr = InoutBill.IN_WEIGHT_DEFAULT;
        htmlStr = htmlStr.replace("billTitle", bill.getBillTitle());
        htmlStr = htmlStr.replace("registerTime", bill.getRegisterTime());
        htmlStr = htmlStr.replace("completeTime", bill.getCompleteTime());
        htmlStr = htmlStr.replace("fullTime", bill.getFullTime());
        htmlStr = htmlStr.replace("emptyTime", bill.getEmptyTime());
        htmlStr = htmlStr.replace("serId", bill.getSerId());
        htmlStr = htmlStr.replace("customerName", bill.getCustomerName());
        htmlStr = htmlStr.replace("deptName", bill.getUnitName());
        htmlStr = htmlStr.replace("driverName", bill.getDriverName());
        htmlStr = htmlStr.replace("userNumberId", bill.getUserId());
        htmlStr = htmlStr.replace("userContact", bill.getUserContact());
        htmlStr = htmlStr.replace("userAddress", bill.getUserAddress());
        htmlStr = htmlStr.replace("foodVariety", bill.getFoodVariety());
        htmlStr = htmlStr.replace("depotName", bill.getDepotName());
        htmlStr = htmlStr.replace("foodLocation", bill.getFoodLocation());
        htmlStr = htmlStr.replace("plateNum", bill.getPlateNum());
        htmlStr = htmlStr.replace("fullWeight",
                new DecimalFormat("0.00").format(bill.getFullWeight()));
        htmlStr = htmlStr.replace("emptyWeight",
                new DecimalFormat("0.00").format(bill.getEmptyWeight()));
        htmlStr = htmlStr.replace("netWeight",
                new DecimalFormat("0.00").format(bill.getNetWeight()));
        htmlStr = htmlStr.replace("deImpurity", bill.getDeImpurity() + "");
        htmlStr = htmlStr.replace("deWet", bill.getDeWet() + "");
        htmlStr = htmlStr.replace("recordWeight", new DecimalFormat("0.00").format(bill.getRecordWeight()));
        htmlStr = htmlStr.replace("deCheck", bill.getDeCheck() + "");
        htmlStr = htmlStr.replace("addCheck", bill.getAddCheck() + "");
        htmlStr = htmlStr.replace("deSum", bill.getDeSum() + "");
        htmlStr = htmlStr.replace("settleWeight",
                new DecimalFormat("0.00").format(bill.getSettleWeight()));
        htmlStr = htmlStr.replace("dePackage", bill.getDePackage() + "");
        htmlStr = htmlStr.replace("deHandle", bill.getDeHandle() + "");
        htmlStr = htmlStr.replace("deOther", bill.getDeOther() + "");
        htmlStr = htmlStr.replace("price", bill.getPrice());
        htmlStr = htmlStr.replace("settleMoney", bill.getSettleMoney() + "");
        htmlStr = htmlStr.replace("wet", bill.getWet() + "");
        htmlStr = htmlStr.replace("impurity", bill.getImpurity() + "");
        htmlStr = htmlStr.replace("checkStatus", bill.getCheckStatus());
        htmlStr = htmlStr.replace("remark", bill.getRemark());
        htmlStr = htmlStr.replace("moneyName", bill.getMoneyName());
        htmlStr = htmlStr.replace("unitName", bill.getUnitName());
        htmlStr = htmlStr.replace("time", bill.getRegisterTime());
        htmlStr = htmlStr.replace("handleStart", "");
        htmlStr = htmlStr.replace("handleEnd", "");
        htmlStr = htmlStr.replace("noticeId", bill.getNoticeId() == null ? "" : bill.getNoticeId());
        htmlStr = htmlStr.replace("phone", data.getUserContact() == null ? "" : data.getUserContact() + "");
        htmlStr = htmlStr.replace("printTime", DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm"));
        htmlStr = htmlStr.replaceAll("weightUser",
                bill.getWeightUser() == null ? "" : bill.getWeightUser());
        htmlStr = htmlStr.replaceAll("handleUser",
                bill.getHandleUser() == null ? "" : bill.getHandleUser());
        htmlStr = htmlStr.replaceAll("keeperName",
                bill.getKeeperUser() == null ? "" : bill.getKeeperUser());
        return htmlStr;
    }
    /**
     * èŽ·å–å‡ºåº“è¿‡ç£…å•
     *
     * @param data
     * @return
     */
    public String outWeightBill(InoutRecord data) {
        // èŽ·å–è¡¨å•æ•°æ®
        InoutPrintBill bill = this.createBillData(data, "出库划码单");
        //默认模版
        String htmlStr = InoutBill.OUT_WEIGHT_DEFAULT;
        htmlStr = htmlStr.replace("billTitle", bill.getBillTitle());
        htmlStr = htmlStr.replace("registerTime", bill.getRegisterTime());
        htmlStr = htmlStr.replace("completeTime", bill.getCompleteTime());
        htmlStr = htmlStr.replace("fullTime", bill.getFullTime());
        htmlStr = htmlStr.replace("emptyTime", bill.getEmptyTime());
        htmlStr = htmlStr.replace("serId", bill.getSerId());
        htmlStr = htmlStr.replace("customerName", bill.getCustomerName());
        htmlStr = htmlStr.replace("deptName", bill.getUnitName());
        htmlStr = htmlStr.replace("driverName", bill.getDriverName());
        htmlStr = htmlStr.replace("userNumberId", bill.getUserId());
        htmlStr = htmlStr.replace("userContact", bill.getUserContact());
        htmlStr = htmlStr.replace("userAddress", bill.getUserAddress());
        htmlStr = htmlStr.replace("foodVariety", bill.getFoodVariety());
        htmlStr = htmlStr.replace("depotName", bill.getDepotName());
        htmlStr = htmlStr.replace("foodLocation", bill.getFoodLocation());
        htmlStr = htmlStr.replace("plateNum", bill.getPlateNum());
        htmlStr = htmlStr.replace("fullWeight",
                new DecimalFormat("0.00").format(bill.getFullWeight()));
        htmlStr = htmlStr.replace("emptyWeight",
                new DecimalFormat("0.00").format(bill.getEmptyWeight()));
        htmlStr = htmlStr.replace("netWeight",
                new DecimalFormat("0.00").format(bill.getNetWeight()));
        htmlStr = htmlStr.replace("dePackage",
                new DecimalFormat("0.00").format(bill.getDePackage()));
        htmlStr = htmlStr.replace("remark", bill.getRemark());
        htmlStr = htmlStr.replace("settleWeight",
                new DecimalFormat("0.00").format(bill.getSettleWeight()));
        htmlStr = htmlStr.replace("deHandle", bill.getDeHandle() + "");
        htmlStr = htmlStr.replace("recordWeight", new DecimalFormat("0.00").format(bill.getRecordWeight()));
        htmlStr = htmlStr.replace("deSum", bill.getDeSum() + "");
        htmlStr = htmlStr.replace("deOther", bill.getDeOther() + "");
        htmlStr = htmlStr.replace("price", bill.getPrice());
        htmlStr = htmlStr.replace("settleMoney", bill.getSettleMoney() + "");
        htmlStr = htmlStr.replace("wet", bill.getWet() + "");
        htmlStr = htmlStr.replace("impurity", bill.getImpurity() + "");
        htmlStr = htmlStr.replace("unitName", getValue(bill.getUnitName()));
        htmlStr = htmlStr.replace("time", bill.getRegisterTime());
        htmlStr = htmlStr.replace("handleStart", "");
        htmlStr = htmlStr.replace("handleEnd", "");
        htmlStr = htmlStr.replace("noticeId", bill.getNoticeId() == null ? "" : bill.getNoticeId());
        htmlStr = htmlStr.replace("phone", data.getUserContact() == null ? "" : data.getUserContact() + "");
        htmlStr = htmlStr.replace("printTime", DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm"));
        htmlStr = htmlStr.replaceAll("weightUser", getValue(bill.getWeightUser()));
        htmlStr = htmlStr.replace("handleUser", getValue(bill.getHandleUser()));
        htmlStr = htmlStr.replaceAll("keeperName", getValue(bill.getKeeperUser()));
        return htmlStr;
    }
    public String getValue(String value) {
        if (null == value) return "";
        return value;
    }
    /**
     * å°è£…过磅单数据
     *
     * @param data
     * @param billTitle
     * @return
     */
    private InoutPrintBill createBillData(InoutRecord data, String billTitle) {
        InoutPrintBill bill = new InoutPrintBill();
        bill.setBillTitle(billTitle);
        SysDept dept = sysDeptService.getCacheDept(data.getCompanyId(), data.getDeptId());
        if (null != dept && StringUtils.isNotEmpty(dept.getDeptName())) {
            bill.setBillTitle(dept.getDeptName() + billTitle);
            bill.setDeptId(dept.getDeptId() + "");
            bill.setDeptName(dept.getDeptName() + "");
            bill.setUnitName(dept.getDeptName());
        }
        bill.setCompanyId(data.getCompanyId() == null ? "" : data
                .getCompanyId());
        if (null == data.getRegisterTime()) {
            data.setRegisterTime(new Date());
        }
        bill.setRegisterTime(DateFormatUtils.format(data.getRegisterTime(),
                "yyyy-MM-dd HH:mm"));
        if (null == data.getCompleteTime()) {
            data.setCompleteTime(new Date());
        }
        bill.setCompleteTime(DateFormatUtils.format(data.getCompleteTime(),
                "yyyy-MM-dd HH:mm"));
        bill.setEmptyTime(DateFormatUtils.format(data.getEmptyWeightTime(),
                "yyyy-MM-dd HH:mm:ss"));
        bill.setFullTime(DateFormatUtils.format(data.getFullWeightTime(),
                "yyyy-MM-dd HH:mm:ss"));
        bill.setSerId(data.getId());
        if ("5016".equals(data.getCompanyId()) || "5347".equals(data.getCompanyId()) || "5352".equals(data.getCompanyId())) {
            bill.setCompleteTime(DateFormatUtils.format(data.getCompleteTime(), "yyyy-MM-dd"));
            bill.setSerId(data.getId().substring(2));
        }
        //客户信息
        bill.setCustomerName(data.getCustomerName() == null ? "" : data.getCustomerName());
        bill.setUserId(data.getUserId() == null ? "" : data.getUserId());
        bill.setUserAddress(data.getUserAddress() == null ? "" : data.getUserAddress());
        bill.setUserContact(data.getUserContact() == null ? "" : data.getUserContact());
        bill.setNoticeId(data.getNoticeId());
        bill.setDriverName(data.getUserName() == null ? "" : data.getUserName());
        // èŽ·å–ä»“åº“ä¿¡æ¯
        Depot depot = depotService.getCacheDepot(data.getCompanyId(),
                data.getDepotId());
        if (depot != null) {
            bill.setDepotName(depot.getName() == null ? "" : depot.getName());
            bill.setHandleUser(depot.getStoreKeeperName() == null ? "" : depot
                    .getStoreKeeperName());
        }
        bill.setFoodVariety(FoodVariety.getMsg(data.getFoodVariety()));
        bill.setFoodLocation(data.getFoodLocation() == null ? "" : data
                .getFoodLocation());
        bill.setPlateNum(data.getPlateNum());
        bill.setFullWeight(data.getFullWeight());
        bill.setEmptyWeight(data.getEmptyWeight());
        bill.setNetWeight(data.getNetWeight());
        bill.setRecordWeight(data.getRecordWeight());
        bill.setCheckStatus(data.getCheckStatus().equals(Constant.STATUS_CHECK) ? "合格" : "不合格");
        bill.setDeOther(data.getDeOther());
        bill.setSettleWeight(data.getSettleWeight());
        bill.setPrice(data.getPrice() == null ? "" : data.getPrice() + "");
        if (data.getSettleMoney() <= 0) {
            if (null != data.getPrice() && null != data.getRecordWeight()) {
                data.setSettleMoney(NumberUtil.keepPrecision(data.getPrice() * data.getRecordWeight(), 2));
            }
        }
        bill.setSettleMoney(data.getSettleMoney() == null ? "" : data.getSettleMoney() + "");
        bill.setRemark(data.getRemarks() == null ? "" : data.getRemarks());
        if (Constant.TYPE_IN.equals(data.getType())) {
            bill.setWeightUser(data.getFullWeightUser());
        }
        if (Constant.TYPE_OUT.equals(data.getType())) {
            bill.setWeightUser(data.getEmptyWeightUser());
        }
        bill.setHandleUser(data.getHandleUser());
        bill.setKeeperUser(depot.getStoreKeeperName());
        return bill;
    }
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SnapRecordService.java
@@ -1,6 +1,7 @@
package com.fzzy.igds.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fzzy.igds.data.BaseResp;
import com.fzzy.igds.data.IgdsBaseParam;
import com.fzzy.igds.domain.SnapRecord;
@@ -21,6 +22,36 @@
    @Resource
    private SnapRecordMapper snapRecordMapper;
    /**
     * åˆ†é¡µæŸ¥è¯¢æ•°æ®
     *
     * @param page
     * @param param
     */
    public void listPage(Page<SnapRecord> page, IgdsBaseParam param) {
        QueryWrapper<SnapRecord> queryWrapper = getQueryWrapper(param);
        snapRecordMapper.selectPage(page, queryWrapper);
    }
    /**
     * å°è£…查询条件
     *
     * @param param
     */
    public QueryWrapper<SnapRecord> getQueryWrapper(IgdsBaseParam param) {
        QueryWrapper<SnapRecord> queryWrapper = new QueryWrapper<>();
        param.setCompanyId(ContextUtil.getCompanyId());
        queryWrapper.eq("company_id", param.getCompanyId());
        if (StringUtils.isNotBlank(param.getDeptId())) {
            queryWrapper.eq("dept_id", param.getDeptId());
        }
        queryWrapper.orderByDesc("create_time");
        return queryWrapper;
    }
    public List<SnapRecord> listAll(IgdsBaseParam param) {
        if (null == param)
fzzy-igdss-core/src/main/java/com/fzzy/igds/utils/NumberUtil.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,49 @@
package com.fzzy.igds.utils;
import java.math.BigDecimal;
import java.text.DecimalFormat;
/**
 * æ•°å­—格式化工具类
 */
public class NumberUtil {
    /**
     * å¯¹double类型的数值保留指定位数的小数。<br>
     * è¯¥æ–¹æ³•舍入模式:向“最接近的”数字舍入,如果与两个相邻数字的距离相等,则为向上舍入的舍入模式。<br>
     * <b>注意:</b>如果精度要求比较精确请使用 keepPrecision(String number, int precision)方法
     * @param number  è¦ä¿ç•™å°æ•°çš„æ•°å­—
     * @param precision å°æ•°ä½æ•°
     * @return double å¦‚果数值较大,则使用科学计数法表示
     */
    public static double keepPrecision(Double number, int precision) {
        if(null == number || 0.0 == number ) return 0.0;
        BigDecimal bg = new BigDecimal(number);
        return bg.setScale(precision, BigDecimal.ROUND_HALF_UP).doubleValue();
    }
    /**
     * å¯¹float类型的数值保留指定位数的小数。<br>
     * è¯¥æ–¹æ³•舍入模式:向“最接近的”数字舍入,如果与两个相邻数字的距离相等,则为向上舍入的舍入模式。<br>
     * <b>注意:</b>如果精度要求比较精确请使用 keepPrecision(String number, int precision)方法
     * @param number  è¦ä¿ç•™å°æ•°çš„æ•°å­—
     * @param precision å°æ•°ä½æ•°
     * @return float å¦‚果数值较大,则使用科学计数法表示
     */
    public static float keepPrecision(Float number, int precision) {
        if(null == number) return 0f;
        BigDecimal bg = new BigDecimal(number);
        return bg.setScale(precision, BigDecimal.ROUND_HALF_UP).floatValue();
    }
    /**
     * double转字符串,避免出现科学计数法
     * @param d
     * @return
     */
    public static String doubleToStr(Double d) {
        if(null == d) return "";
        DecimalFormat df = new DecimalFormat("0.0");
        return df.format(d);
    }
}
fzzy-igdss-view/pom.xml
@@ -96,11 +96,29 @@
            </exclusions>
        </dependency>
<!--        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.6</version>
        </dependency>-->
        <dependency>
            <groupId>com.bstek.dorado</groupId>
            <artifactId>dorado-uploader</artifactId>
            <version>1.0.20</version>
            <exclusions>
                <exclusion>
                    <artifactId>slf4j-jcl</artifactId>
                    <groupId>org.slf4j</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>slf4j-log4j12</artifactId>
                    <groupId>org.slf4j</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>log4j</artifactId>
                    <groupId>log4j</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>slf4j-jdk14</artifactId>
                    <groupId>org.slf4j</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
fzzy-igdss-view/src/main/java/com/fzzy/igds/FilePR.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,78 @@
package com.fzzy.igds;
import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.annotation.Expose;
import com.fzzy.common.utils.Base64Util;
import com.fzzy.igds.domain.FileInfo;
import com.fzzy.igds.service.FileService;
import com.fzzy.igds.utils.ContextUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * @Description æ–‡ä»¶ä¸Šä¼ 
 * @Author CZT
 * @Date 2025/11/29 11:02
 */
@Slf4j
@Component
public class FilePR {
    @Resource
    private FileService fileService;
    /**
     * filePR#parseExcel
     *
     * @param fileName
     * @return
     */
    @Expose
    public String parseExcel(String fileName) {
        return fileName;
    }
    /**
     * filePR#listFile æ ¹æ®æ¡ä»¶èŽ·å–åˆ—è¡¨æ•°æ®
     *
     * @param bizId
     * @param bizId
     * @return
     */
    @DataProvider
    public List<FileInfo> listFile(String bizId) {
        if (null == bizId){
            return null;
        }
        return fileService.listFile(ContextUtil.getCompanyId(),ContextUtil.subDeptId(null), bizId, null);
    }
    /**
     *
     * filePR#getImg
     * èŽ·å–å›¾ç‰‡ä¿¡æ¯
     *
     * @param file
     * @return
     */
    @Expose
    public Map<String, String> getImg(FileInfo file) {
        Map<String, String> result = new HashMap<String, String>();
        result.put("code", "SUCCESS");
        String basePath = fileService.getFileSavePath("COMMON");
        String imgData = Base64Util.getImageStr(basePath + file.getFileName());
        if (null == imgData) {
            result.put("code", "ERROR");
        }
        result.put("data", imgData);
        return result;
    }
}
fzzy-igdss-view/src/main/java/com/fzzy/igds/FileUploadManage.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,94 @@
package com.fzzy.igds;
import com.bstek.dorado.uploader.UploadFile;
import com.bstek.dorado.uploader.annotation.FileResolver;
import com.fzzy.igds.service.FileService;
import com.fzzy.igds.utils.ContextUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.time.DateFormatUtils;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.io.File;
import java.io.IOException;
import java.util.Date;
import java.util.Map;
/**
 * @Description Dorado7 é™„件上传公共管理层
 * @Author CZT
 * @Date 2025/12/05 10:05
 */
@Slf4j
@Component
public class FileUploadManage {
    @Resource
    private FileService fileService;
    /**
     * ä¸Šä¼ åº“区鸟瞰图
     * fileUploadManage#imgFile
     *
     * @param file
     * @param parameter
     * @return
     */
    @FileResolver
    public String imgFile(UploadFile file, Map<String, Object> parameter) {
        String fileId = null;
        try {
            String basePath = fileService.getFileSavePath("DEPT");
            fileId = "aerial-" + ContextUtil.subDeptId(null)
                    + file.getFileName().substring(
                    file.getFileName().lastIndexOf("."));
            file.transferTo(new File(basePath + fileId));
        } catch (IllegalStateException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return fileId;
    }
    /**
     * ä¸Šä¼ å‡ºå…¥åº“附件
     * fileUploadManage#inoutFile
     *
     * @param file
     * @param parameter
     * @return
     */
    @FileResolver
    public String inoutFile(UploadFile file, Map<String, Object> parameter) {
        //流程
        String bizTag = (String) parameter.get("bizTag");
        String newFileName = null;
        try {
            String basePath = fileService.getFileSavePath("INOUT");
            // èŽ·å–æ–°çš„ID
            newFileName = DateFormatUtils.format(new Date(), "yyyyMMddHHmmss");
            if(StringUtils.isNotEmpty(bizTag)){
                newFileName = bizTag + "_" + newFileName;
            }
            // æ–‡ä»¶åŽç¼€å
            String suffixName = file.getFileName().substring(file.getFileName().lastIndexOf("."));
            // åˆæˆæ–°çš„æ–‡ä»¶å
            newFileName = newFileName + suffixName;
            file.transferTo(new File(basePath + newFileName));
        } catch (Exception e) {
            e.printStackTrace();
        }
        return newFileName;
    }
}
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutDataPR.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,161 @@
package com.fzzy.igds;
import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.annotation.DataResolver;
import com.bstek.dorado.annotation.Expose;
import com.bstek.dorado.data.provider.Page;
import com.fzzy.igds.constant.Constant;
import com.fzzy.igds.data.InoutData;
import com.fzzy.igds.data.InoutParam;
import com.fzzy.igds.domain.InoutRecord;
import com.fzzy.igds.service.InoutRecordService;
import com.fzzy.igds.utils.ContextUtil;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Date;
/**
 * @Description å‡ºå…¥åº“详单页面管理
 * @Author CZT
 * @Date 2025/12/05 10:40
 */
@Component
public class InoutDataPR {
    @Resource
    private InoutRecordService inoutRecordService;
    /**
     * inoutDataPR#pageInoutData
     *
     * @param page
     * @param param
     * @throws Exception
     */
    @DataProvider
    public void pageInoutData(Page<InoutRecord> page, InoutParam param) {
        com.baomidou.mybatisplus.extension.plugins.pagination.Page<InoutRecord> corePage = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(page.getPageNo(), page.getPageSize());
        if(null == param) {
            param = new InoutParam();
        }
        inoutRecordService.listPageInout(corePage, param);
        // é‡æ–°å°è£…
        page.setEntities(corePage.getRecords());
        page.setEntityCount(Integer.parseInt(String.valueOf(corePage.getTotal())));
    }
    /**
     * ä¿å­˜å‡ºå…¥åº“数据 inoutDataPR#saveInoutData
     */
    @DataResolver
    public String saveInoutData(InoutRecord data) {
        if (Constant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
            return "系统:已经删除的数据不支持修改!";
        }
        if (!Constant.PROGRESS_RECORD.equals(data.getProgress())) {
            return "系统:未结束流程的数据不支持修改!";
        }
        int i = inoutRecordService.updateInoutRecord(data);
        if (i > 0) {
            return null;
        } else {
            return "保存失败!";
        }
    }
    /**
     * inoutDataPR#errorInoutData å‡ºå…¥åº“数据执行 å¼‚常终止
     *
     * @param data
     * @return
     * @throws Exception
     */
    @DataResolver
    @Transactional
    public String errorInoutData(InoutRecord data) {
        return inoutRecordService.errorInoutData(data);
    }
    /**
     * inoutDataPR#printWeightBill èŽ·å–æ‰“å°å•ä¿¡æ¯
     *
     * @param data
     * @return
     * @throws Exception
     */
    @Expose
    public String printWeightBill(InoutRecord data) {
        if (Constant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
            return "删除的数据不支持打印!";
        }
        if (!Constant.PROGRESS_RECORD.equals(data.getProgress())) {
            return "未完成的数据不支持打印!";
        }
        if (Constant.TYPE_IN.equals(data.getType())) {
            return inoutRecordService.inWeightBill(data);
        } else {
            return inoutRecordService.outWeightBill(data);
        }
    }
    /**
     * inoutDataPR#initDataByHand æ–°å¢ž
     *
     * @return
     */
    @DataProvider
    public InoutData initDataByHand(String type) {
        SysUser user = ContextUtil.getLoginUser();
        InoutData data = new InoutData();
        data.setCompanyId(user.getCompanyId());
        data.setRegisterTime(new Date());
        data.setType(type);
        data.setRegisterUser(user.getUserName());
        data.setDeptId(ContextUtil.subDeptId(user));
        data.setCheckUser(user.getUserName());
        data.setProgress(Constant.PROGRESS_RECORD);
        data.setRecordStatus(Constant.RECORD_STATUS_ADD);
        return data;
    }
    /**
     * è¡¥å• inoutDataPR#addData
     */
    @DataResolver
    public String addData(InoutData data) {
        if (data.getSettleWeight() <= 0.0) {
            return "系统:结算重量必须大于0";
        }
        return inoutRecordService.handAddInoutRecord(data);
    }
    /**
     * inoutDataPR#printWeightBill èŽ·å–æ‰“å°å•ä¿¡æ¯
     *
     * @param data
     * @return
     * @throws Exception
     */
    @Expose
    public String printWeightBillHand(InoutData data) {
        if (Constant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
            return "删除的数据不支持打印!";
        }
        if (!Constant.PROGRESS_RECORD.equals(data.getProgress())) {
            return "未完成的数据不支持打印!";
        }
        if (Constant.TYPE_IN.equals(data.getType())) {
            return inoutRecordService.inWeightBill(data);
        } else {
            return inoutRecordService.outWeightBill(data);
        }
    }
}
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutHand.view.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,944 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dtMain">
      <Property name="creationType">com.fzzy.igds.data.InoutData</Property>
      <PropertyDef name="id">
        <Property></Property>
        <Property name="label">单据号</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="companyId">
        <Property></Property>
        <Property name="label">组织编码</Property>
      </PropertyDef>
      <PropertyDef name="progress">
        <Property></Property>
        <Property name="label">流程进度</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;PROCESS_STATUS_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="recordStatus">
        <Property></Property>
        <Property name="label">数据状态</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;RECORD_STATUS&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="checkStatus">
        <Property></Property>
        <Property name="label">扦样结果</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;CHECK_STATUS&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="registerTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">登记时间</Property>
      </PropertyDef>
      <PropertyDef name="registerUser">
        <Property></Property>
        <Property name="label">登记人员</Property>
      </PropertyDef>
      <PropertyDef name="userName">
        <Property></Property>
        <Property name="label">承运人</Property>
      </PropertyDef>
      <PropertyDef name="userId">
        <Property></Property>
        <Property name="label">身份证号</Property>
      </PropertyDef>
      <PropertyDef name="userContact">
        <Property></Property>
        <Property name="label">联系方式</Property>
      </PropertyDef>
      <PropertyDef name="userAddress">
        <Property></Property>
        <Property name="label">承运人地址</Property>
      </PropertyDef>
      <PropertyDef name="plateNum">
        <Property></Property>
        <Property name="label">车牌号</Property>
      </PropertyDef>
      <PropertyDef name="customerName">
        <Property></Property>
        <Property name="label">往来单位</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="foodLocation">
        <Property></Property>
        <Property name="label">粮食产地</Property>
      </PropertyDef>
      <PropertyDef name="foodYear">
        <Property></Property>
        <Property name="label">粮食年份</Property>
      </PropertyDef>
      <PropertyDef name="deOther">
        <Property name="dataType">Double</Property>
        <Property name="label">扣重</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="fullWeight">
        <Property name="dataType">Double</Property>
        <Property name="label">满车称重</Property>
        <Property name="required">true</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="fullWeightTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">满车称时间</Property>
      </PropertyDef>
      <PropertyDef name="fullWeightUser">
        <Property></Property>
        <Property name="label">满车称重人</Property>
      </PropertyDef>
      <PropertyDef name="emptyWeight">
        <Property name="dataType">Double</Property>
        <Property name="label">空车称重</Property>
        <Property name="required">true</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="emptyWeightTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">空车称时间</Property>
      </PropertyDef>
      <PropertyDef name="emptyWeightUser">
        <Property></Property>
        <Property name="label">空车称重人</Property>
      </PropertyDef>
      <PropertyDef name="netWeight">
        <Property name="dataType">Double</Property>
        <Property name="label">净重</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="settleWeight">
        <Property name="dataType">Double</Property>
        <Property name="label">结算净重</Property>
        <Property name="required">true</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="recordWeight">
        <Property name="dataType">Double</Property>
        <Property name="label">入库重量</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="handleStart">
        <Property name="dataType">Date</Property>
        <Property name="label">值仓开始时间</Property>
      </PropertyDef>
      <PropertyDef name="handleEnd">
        <Property name="dataType">Date</Property>
        <Property name="label">值仓结束时间</Property>
      </PropertyDef>
      <PropertyDef name="handleUser">
        <Property></Property>
        <Property name="label">值仓操作人</Property>
      </PropertyDef>
      <PropertyDef name="completeTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">完成时间</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="completeUser">
        <Property></Property>
        <Property name="label">完成确认人</Property>
      </PropertyDef>
      <PropertyDef name="remarks">
        <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="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="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="type">
        <Property name="label">出入库类型</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="name">出库</Property>
                <Property name="value">OUT</Property>
              </Entity>
              <Entity>
                <Property name="name">入库</Property>
                <Property name="value">IN</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">value</Property>
          <Property name="valueProperty">name</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="checkUser">
        <Property></Property>
        <Property name="label">质检人</Property>
      </PropertyDef>
      <PropertyDef name="price">
        <Property name="dataType">double</Property>
        <Property name="label">粮食定价</Property>
        <Property name="displayFormat">0.00 å…ƒ/公斤</Property>
      </PropertyDef>
      <PropertyDef name="noticeId">
        <Property></Property>
        <Property name="label">通知单编码</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="foodLocationId">
        <Property></Property>
        <Property name="label">产地名称代码</Property>
      </PropertyDef>
      <PropertyDef name="checkTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">质检时间</Property>
      </PropertyDef>
      <PropertyDef name="perWet">
        <Property name="dataType">Double</Property>
        <Property name="label">水分</Property>
        <Property name="displayFormat">0.00 %</Property>
      </PropertyDef>
      <PropertyDef name="perImpurity">
        <Property name="dataType">Double</Property>
        <Property name="label">杂质</Property>
        <Property name="displayFormat">0.00 %</Property>
      </PropertyDef>
      <PropertyDef name="settleMoney">
        <Property name="dataType">Double</Property>
        <Property name="label">结算金额</Property>
        <Property name="displayFormat">0.00 å…ƒ</Property>
      </PropertyDef>
      <PropertyDef name="settleTag">
        <Property></Property>
        <Property name="label">是否结算</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="name">未结算</Property>
                <Property name="value">N</Property>
              </Entity>
              <Entity>
                <Property name="name">已结算</Property>
                <Property name="value">Y</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">value</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="settleTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">结算时间</Property>
        <Property name="readOnly">true</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>
      <Reference name="files">
        <Property name="dataProvider">filePR#listFile</Property>
        <Property name="dataType">[dtFileData]</Property>
        <Property name="parameter">$${this.id}</Property>
      </Reference>
    </DataType>
  </Model>
  <View layout="padding:10">
    <ClientEvent name="onReady">var TYPE = &quot;${request.getParameter('type')}&quot;;&#xD;
var PROGRESS = &quot;WEIGHT_TAG&quot;;&#xD;
      &#xD;
      /**&#xD;
      * åˆ·æ–°é¡µé¢&#xD;
      */&#xD;
      flush = function(){&#xD;
      view.get(&quot;#btnSave&quot;).set(&quot;disabled&quot;,false);&#xD;
      view.get(&quot;#btnPrintWeigh&quot;).set(&quot;disabled&quot;,true);&#xD;
      view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,TYPE).flushAsync();&#xD;
      };&#xD;
      flush();&#xD;
      &#xD;
      /**&#xD;
      * æ•°æ®ä¿å­˜æäº¤&#xD;
      */&#xD;
      save = function(){&#xD;
      var data = view.get(&quot;#dsMain.data&quot;);&#xD;
      if(data.validate() != 'ok'){&#xD;
      $alert(&quot;数据验证失败,请查看【基础信息】【扦样化验信息】中红色提醒!&quot;);&#xD;
      return;&#xD;
      }&#xD;
      var netWeight = data.get(&quot;netWeight&quot;);&#xD;
      if(netWeight &lt;= 0){&#xD;
      $alert(&quot;数据验证失败,【基础信息】-结算重量必须大于0!&quot;);&#xD;
      return;&#xD;
    }&#xD;
    view.get(&quot;#uaSave&quot;).execute(function(result){&#xD;
      if(result){&#xD;
      $alert(&quot;保存失败:&quot;+result);&#xD;
      }else{&#xD;
      view.get(&quot;#btnSave&quot;).set(&quot;disabled&quot;,true);&#xD;
      view.get(&quot;#btnPrintWeigh&quot;).set(&quot;disabled&quot;,false);&#xD;
      $alert(&quot;保存成功,可以进行打印和重新提新表单!&quot;);&#xD;
      flush();&#xD;
      &#xD;
      }&#xD;
      });&#xD;
      }&#xD;
      &#xD;
      /**&#xD;
      * è‡ªåŠ¨è®¡ç®—&#xD;
      * @param name&#xD;
      */&#xD;
      deAutoByWeight = function () {&#xD;
      &#xD;
      var curData = view.get(&quot;#dsMain.data:#&quot;);&#xD;
      var fullWeight = curData.get(&quot;fullWeight&quot;);&#xD;
      var emptyWeight = curData.get(&quot;emptyWeight&quot;);&#xD;
      //扣重信息&#xD;
      var deOther = curData.get(&quot;deOther&quot;);&#xD;
      &#xD;
      if (fullWeight == 0 || emptyWeight == 0) {&#xD;
      return;&#xD;
      }&#xD;
      // å‡€é‡&#xD;
      var netWeight = Number(fullWeight) - Number(emptyWeight);&#xD;
      &#xD;
      if (netWeight &lt;= 0) {&#xD;
      $notify(&quot;净重小于0,当前称重存在逻辑问题&quot;);&#xD;
      return;&#xD;
      }&#xD;
      &#xD;
      /** å…¥åº“重量 = å‡€é‡ - æ€»æ‰£é‡  */&#xD;
      recordWeight = Number(netWeight) - Number(deOther);&#xD;
      &#xD;
      /** ç»“算重量 = å‡€é‡ - æ€»æ‰£é‡ + å¢žé‡ */&#xD;
      settleWeight = Number(recordWeight);&#xD;
      &#xD;
      curData.set(&quot;netWeight&quot;, netWeight);&#xD;
      curData.set(&quot;settleWeight&quot;, settleWeight);&#xD;
      curData.set(&quot;recordWeight&quot;, recordWeight);&#xD;
      };&#xD;
      //删除附件&#xD;
      delFile = function(){&#xD;
      var entity = view.get(&quot;#dgFiles&quot;).getCurrentItem();&#xD;
      view.get(&quot;#ajaxDelFile&quot;).set(&quot;parameter&quot;,{&#xD;
      fileName:entity.get(&quot;fileName&quot;),&#xD;
      createTime:entity.get(&quot;createTime&quot;)&#xD;
      }).execute(function(result){&#xD;
      if(result){&#xD;
      $alert(result);&#xD;
      }else{&#xD;
      entity.remove();&#xD;
      $alert(&quot;删除成功!&quot;);&#xD;
      }&#xD;
      });&#xD;
      }</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <Property name="javaScriptFile">./static/js/plugins/lodop/LodopFuncs.js</Property>
    <DataSet id="dsMain">
      <Property name="dataType">dtMain</Property>
      <Property name="dataProvider">inoutDataPR#initDataByHand</Property>
      <Property name="loadMode">manual</Property>
    </DataSet>
    <Container>
      <Property name="className">c-data</Property>
      <ToolBar>
        <ToolBarButton id="btnSave">
          <ClientEvent name="onClick">save();</ClientEvent>
          <Property name="caption">提交保存</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="width">100</Property>
          <Property name="iconClass">fa fa-plus</Property>
        </ToolBarButton>
        <ToolBarButton id="btnPrintWeigh">
          <ClientEvent name="onClick">printWeight();</ClientEvent>
          <Property name="caption">打印过磅单</Property>
          <Property name="exClassName">btn4</Property>
          <Property name="iconClass">fa fa-print</Property>
          <Property name="disabled">true</Property>
          <Property name="width">120</Property>
        </ToolBarButton>
        <ToolBarButton>
          <ClientEvent name="onClick">flush();</ClientEvent>
          <Property name="caption">刷新页面</Property>
          <Property name="exClassName">btn2</Property>
          <Property name="iconClass">fa fa-refresh</Property>
        </ToolBarButton>
      </ToolBar>
    </Container>
    <Container>
      <Property name="className">c-data</Property>
      <TabControl id="tabControlMain" layoutConstraint="left">
        <Property name="width">1300</Property>
        <ControlTab>
          <Property name="caption">基础信息</Property>
          <Property name="iconClass">fa fa-download</Property>
          <Property name="width">150</Property>
          <Property name="name">tabCommon</Property>
          <Container>
            <FieldSet layoutConstraint="padding:2" layout="padding:5">
              <Property name="caption">基本信息</Property>
              <Buttons/>
              <Children>
                <AutoForm>
                  <Property name="dataSet">dsMain</Property>
                  <Property name="cols">*,*,*</Property>
                  <Property name="labelAlign">right</Property>
                  <Property name="labelSeparator">:</Property>
                  <Property name="labelWidth">100</Property>
                  <AutoFormElement>
                    <Property name="name">id</Property>
                    <Property name="property">id</Property>
                    <Editor>
                      <TextEditor>
                        <Property name="blankText">-- ç³»ç»Ÿè‡ªåŠ¨ç”Ÿæˆ --</Property>
                      </TextEditor>
                    </Editor>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">plateNum</Property>
                    <Property name="property">plateNum</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">depotId</Property>
                    <Property name="property">depotId</Property>
                    <Property name="label">装卸仓库</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">userName</Property>
                    <Property name="property">userName</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">userId</Property>
                    <Property name="property">userId</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">foodVariety</Property>
                    <Property name="property">foodVariety</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">perWet</Property>
                    <Property name="property">perWet</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">userContact</Property>
                    <Property name="property">userContact</Property>
                    <Property name="label">联系电话</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">foodLevel</Property>
                    <Property name="property">foodLevel</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">perImpurity</Property>
                    <Property name="property">perImpurity</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">foodYear</Property>
                    <Property name="property">foodYear</Property>
                    <Property name="trigger">yearDropDown</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">foodLocation</Property>
                    <Property name="property">foodLocation</Property>
                    <Property name="trigger">ddDicArea</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="label">客户名称</Property>
                    <Property name="property">customerName</Property>
                    <Property name="editable">false</Property>
                    <Property name="trigger">ddNotice</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <Property name="name">noticeId</Property>
                    <Property name="property">noticeId</Property>
                    <Editor/>
                  </AutoFormElement>
                </AutoForm>
              </Children>
            </FieldSet>
            <FieldSet layoutConstraint="padding:2" layout="padding:5">
              <Property name="caption">称重信息(单位:KG)</Property>
              <Buttons/>
              <Children>
                <AutoForm>
                  <Property name="dataSet">dsMain</Property>
                  <Property name="cols">*,50,*,50,*,50</Property>
                  <Property name="labelAlign">right</Property>
                  <Property name="labelWidth">100</Property>
                  <Property name="labelSeparator">:</Property>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <ClientEvent name="onBlur">deAutoByWeight();</ClientEvent>
                    <Property name="name">fullWeight</Property>
                    <Property name="property">fullWeight</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <Property name="name">fullWeightTime</Property>
                    <Property name="property">fullWeightTime</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <Property name="name">fullWeightUser</Property>
                    <Property name="property">fullWeightUser</Property>
                    <Property name="label">满车称重人</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <ClientEvent name="onBlur">deAutoByWeight();</ClientEvent>
                    <Property name="name">emptyWeight</Property>
                    <Property name="property">emptyWeight</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <Property name="name">emptyWeightTime</Property>
                    <Property name="property">emptyWeightTime</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <Property name="name">emptyWeightUser</Property>
                    <Property name="property">emptyWeightUser</Property>
                    <Property name="label">空车称重人</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <Property name="name">netWeight</Property>
                    <Property name="property">netWeight</Property>
                    <Property name="readOnly">true</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <ClientEvent name="onBlur">deAutoByWeight();</ClientEvent>
                    <Property name="name">deOther</Property>
                    <Property name="property">deOther</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <Property name="name">registerTime</Property>
                    <Property name="property">registerTime</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <Property name="name">settleWeight</Property>
                    <Property name="property">settleWeight</Property>
                    <Property name="readOnly">true</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <Property name="name">recordWeight</Property>
                    <Property name="property">recordWeight</Property>
                    <Property name="readOnly">true</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <Property name="name">completeTime</Property>
                    <Property name="property">completeTime</Property>
                    <Editor/>
                  </AutoFormElement>
                </AutoForm>
              </Children>
            </FieldSet>
            <FieldSet layoutConstraint="padding:2" layout="padding:5">
              <Property name="caption">其他信息</Property>
              <Buttons/>
              <Children>
                <AutoForm>
                  <Property name="dataSet">dsMain</Property>
                  <Property name="cols">*,*,*</Property>
                  <Property name="labelAlign">right</Property>
                  <Property name="labelSeparator">:</Property>
                  <Property name="labelWidth">100</Property>
                  <AutoFormElement>
                    <Property name="name">price</Property>
                    <Property name="property">price</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">settleMoney</Property>
                    <Property name="property">settleMoney</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">settleTime</Property>
                    <Property name="property">settleTime</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:3">
                    <Property name="name">remarks</Property>
                    <Property name="property">remarks</Property>
                    <Editor/>
                  </AutoFormElement>
                </AutoForm>
              </Children>
            </FieldSet>
          </Container>
        </ControlTab>
      </TabControl>
      <TabControl id="tabControlImage" layoutConstraint="left">
        <Property name="width">370</Property>
        <ControlTab id="tabImage">
          <Property name="name">tabImage</Property>
          <Property name="caption">出入库过程记录</Property>
          <FieldSet layoutConstraint="padding:10" layout="padding:5">
            <Buttons>
              <Button layoutConstraint="left">
                <ClientEvent name="onClick">view.PROGRESS = &quot;WEIGHT_EMPTY&quot;;&#xD;
                </ClientEvent>
                <Property name="exClassName">btn1</Property>
                <Property name="iconClass">fa fa-cloud-upload</Property>
                <Property name="action">uploadImg</Property>
                <Property name="caption">空车称照片</Property>
                <Property name="width">110</Property>
              </Button>
              <Button layoutConstraint="left">
                <ClientEvent name="onClick">view.PROGRESS = &quot;WEIGHT_FULL&quot;;&#xD;
                </ClientEvent>
                <Property name="exClassName">btn2</Property>
                <Property name="iconClass">fa fa-cloud-upload</Property>
                <Property name="action">uploadImg1</Property>
                <Property name="caption">满车称照片</Property>
                <Property name="width">110</Property>
              </Button>
              <Button layoutConstraint="left">
                <ClientEvent name="onClick">view.PROGRESS = &quot;HANDLE&quot;;</ClientEvent>
                <Property name="caption">值仓照片</Property>
                <Property name="exClassName">btn4</Property>
                <Property name="iconClass">fa fa-cloud-upload</Property>
                <Property name="action">uploadImg2</Property>
                <Property name="width">110</Property>
              </Button>
            </Buttons>
            <Children>
              <DataGrid id="dgFiles">
                <Property name="dataSet">dsMain</Property>
                <Property name="readOnly">true</Property>
                <Property name="selectionMode">singleRow</Property>
                <Property name="dataPath">#.files</Property>
                <RowNumColumn/>
                <DataColumn name="bizTag">
                  <Property name="property">bizTag</Property>
                  <Property name="visible">false</Property>
                </DataColumn>
                <DataColumn name="fileName">
                  <Property name="property">fileName</Property>
                </DataColumn>
                <DataColumn>
                  <ClientEvent name="onRenderCell">arg.dom.innerHTML = &quot;&lt;a href='javascript:;' onClick='delFile()'>删除&lt;/a>&quot;;&#xD;
                  </ClientEvent>
                  <Property name="property">fileId</Property>
                  <Property name="name">fileId</Property>
                  <Property name="align">center</Property>
                  <Property name="caption">操作</Property>
                  <Property name="readOnly">true</Property>
                  <Property name="width">80</Property>
                </DataColumn>
              </DataGrid>
            </Children>
          </FieldSet>
        </ControlTab>
      </TabControl>
    </Container>
    <YearDropDown id="yearDropDown"/>
    <UpdateAction id="uaSave">
      <Property name="dataResolver">inoutDataPR#addData</Property>
      <Property name="confirmMessage">确定要提交么?</Property>
      <UpdateItem>
        <Property name="dataSet">dsMain</Property>
        <Property name="dataPath">[#current]</Property>
        <Property name="validateData">false</Property>
      </UpdateItem>
    </UpdateAction>
    <AjaxAction id="ajaxPrint">
      <Property name="service">inoutDataPR#printWeightBillHand</Property>
      <Property name="executingMessage">正在执行打印……</Property>
      <Property name="async">false</Property>
    </AjaxAction>
    <CustomDropDown id="ddNotice">
      <Property name="minHeight">400</Property>
      <Property name="assignmentMap">noticeId=id,customerName=customerName</Property>
      <Property name="minWidth">1000</Property>
      <Property name="autoOpen">true</Property>
      <Container layout="regionPadding:5">
        <DataSet id="dsNotice">
          <Property name="dataProvider">inoutNoticePR#queryNoticeByKey</Property>
          <Property name="parameter">
            <Entity>
              <Property name="type">${request.getParameter('type')}</Property>
            </Entity>
          </Property>
          <Property name="dataType">[dtNoticeDto]</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;
              var type = &quot;${request.getParameter('type')}&quot;;&#xD;
              view.get(&quot;#dsNotice&quot;).set(&quot;parameter&quot;,{key: key,type: type}).flushAsync();</ClientEvent>
            <Property name="caption">查询</Property>
            <Property name="exClassName">btn1</Property>
            <Property name="iconClass">fa fa-search</Property>
          </Button>
          <Button>
            <ClientEvent name="onClick">var data = view.get(&quot;#dsNotice.data:#&quot;);&#xD;
              if(data){&#xD;
              view.get(&quot;#ddNotice&quot;).close(data.toJSON());&#xD;
              }</ClientEvent>
            <Property name="iconClass">fa fa-check</Property>
            <Property name="exClassName">btn2</Property>
            <Property name="caption">确定</Property>
          </Button>
        </Container>
        <DataGrid>
          <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsNotice.data:#&quot;);&#xD;
            if(data){&#xD;
            view.get(&quot;#ddNotice&quot;).close(data.toJSON());&#xD;
            }</ClientEvent>
          <Property name="dataSet">dsNotice</Property>
          <Property name="readOnly">true</Property>
          <DataColumn name="name">
            <Property name="property">name</Property>
            <Property name="align">center</Property>
            <Property name="width">100</Property>
          </DataColumn>
          <DataColumn>
            <Property name="property">customerName</Property>
            <Property name="align">center</Property>
            <Property name="name">customerName</Property>
            <Property name="width">240</Property>
          </DataColumn>
          <DataColumn name="foodVariety">
            <Property name="property">foodVariety</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="year">
            <Property name="property">year</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="contract">
            <Property name="property">contract</Property>
            <Property name="align">center</Property>
            <Property name="width">300</Property>
          </DataColumn>
        </DataGrid>
      </Container>
    </CustomDropDown>
    <CustomDropDown id="ddDicArea">
      <Property name="minHeight">500</Property>
      <Property name="minWidth">500</Property>
      <Property name="assignmentMap">foodLocation=name,foodLocationId=code</Property>
      <Container layout="regionPadding:5">
        <DataSet id="dsDicArea">
          <Property name="dataProvider">dicAreaPR#pageList</Property>
          <Property name="parameter"></Property>
          <Property name="dataType">[dtArea]</Property>
          <Property name="pageSize">1000</Property>
        </DataSet>
        <Container layout="hbox regionPadding:5">
          <TextEditor id="key2">
            <Property name="blankText"> -名称或简拼,北京市  bjs -</Property>
            <Property name="width">200</Property>
          </TextEditor>
          <Button>
            <ClientEvent name="onClick">var key = view.get(&quot;#key2.value&quot;);&#xD;
              view.get(&quot;#dsDicArea&quot;).set(&quot;parameter&quot;,{key:key}).flushAsync();</ClientEvent>
            <Property name="caption">查询</Property>
            <Property name="iconClass">fa fa-search</Property>
            <Property name="exClassName">btn1</Property>
          </Button>
          <Button>
            <ClientEvent name="onClick">var data = view.get(&quot;#dsDicArea.data:#&quot;);&#xD;
              if(data){&#xD;
              view.get(&quot;#ddDicArea&quot;).close(data.toJSON());&#xD;
              }</ClientEvent>
            <Property name="iconClass">fa fa-check</Property>
            <Property name="exClassName">btn2</Property>
            <Property name="caption">确定</Property>
          </Button>
        </Container>
        <DataGrid>
          <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsDicArea.data:#&quot;);&#xD;
            if(data){&#xD;
            view.get(&quot;#ddDicArea&quot;).close(data.toJSON());&#xD;
            }</ClientEvent>
          <Property name="dataSet">dsDicArea</Property>
          <Property name="readOnly">true</Property>
          <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="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="code">
            <Property name="property">code</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="simple">
            <Property name="property">simple</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
        </DataGrid>
        <DataPilot layoutConstraint="bottom">
          <Property name="dataSet">dsDicArea</Property>
        </DataPilot>
      </Container>
    </CustomDropDown>
    <UploadAction id="uploadImg">
      <ClientEvent name="beforeFileUploaded">var data = view.get(&quot;#dsMain.data:#&quot;)&#xD;;
        var bizTag = &quot;EMPTY&quot;;&#xD;
        self.set(&quot;parameter&quot;,{&#xD;
        bizTag: bizTag&#xD;
        })</ClientEvent>
      <ClientEvent name="onFileUploaded">//附件上传完成后添加业务数据&#xD;
        var mainData = view.get(&quot;#dsMain.data&quot;);&#xD;
        var fileName = arg.returnValue;&#xD;
        var files = mainData.get(&quot;files&quot;);&#xD;
        files.insert({bizTag:view.PROGRESS,fileName:fileName,createTime:new Date()});</ClientEvent>
      <ClientEvent name="beforeFileUploaded">var data = view.get(&quot;#dsMain.data:#&quot;)&#xD;
        if(data){&#xD;
        var plateNum = data.get(&quot;plateNum&quot;);&#xD;
        var bizTag = &quot;EMPTY&quot;;&#xD;
        self.set(&quot;parameter&quot;,{&#xD;
        bizTag:bizTag&#xD;
        })&#xD;
        }</ClientEvent>
      <Property name="maxFileSize">20MB</Property>
      <Property name="successMessage">上传成功</Property>
      <Property name="parameter"></Property>
      <Property name="fileResolver">fileUploadManage#inoutFile</Property>
      <Filters/>
    </UploadAction>
    <UploadAction id="uploadImg1">
      <ClientEvent name="beforeFileUploaded">var data = view.get(&quot;#dsMain.data:#&quot;)&#xD;
        &#xD;
        var bizTag = &quot;FULL&quot;;&#xD;
        self.set(&quot;parameter&quot;,{&#xD;
        bizTag: bizTag&#xD;
        })</ClientEvent>
      <ClientEvent name="onFileUploaded">//附件上传完成后添加业务数据&#xD;
        var mainData = view.get(&quot;#dsMain.data&quot;);&#xD;
        var fileName = arg.returnValue;&#xD;
        var files = mainData.get(&quot;files&quot;);&#xD;
        files.insert({bizTag:view.PROGRESS,fileName:fileName});</ClientEvent>
      <ClientEvent name="beforeFileUploaded">var data = view.get(&quot;#dsMain.data:#&quot;)&#xD;
        if(data){&#xD;
        var bizTag = &quot;FULL&quot;;&#xD;
        self.set(&quot;parameter&quot;,{&#xD;
        bizTag:bizTag&#xD;
        })&#xD;
        }</ClientEvent>
      <Property name="maxFileSize">20MB</Property>
      <Property name="successMessage">上传成功</Property>
      <Property name="parameter"></Property>
      <Property name="fileResolver">fileUploadManage#inoutFile</Property>
      <Filters/>
    </UploadAction>
    <UploadAction id="uploadImg2">
      <ClientEvent name="beforeFileUploaded">var data = view.get(&quot;#dsMain.data:#&quot;)&#xD;
        &#xD;
        var plateNum = data.get(&quot;plateNum&quot;);&#xD;
        var bizTag = &quot;HANDLE&quot;;&#xD;
        self.set(&quot;parameter&quot;,{&#xD;
        bizTag: bizTag&#xD;
        })</ClientEvent>
      <ClientEvent name="onFileUploaded">//附件上传完成后添加业务数据&#xD;
        var mainData = view.get(&quot;#dsMain.data&quot;);&#xD;
        var fileName = arg.returnValue;&#xD;
        var files = mainData.get(&quot;files&quot;);&#xD;
        files.insert({bizTag:view.PROGRESS,fileName:fileName});</ClientEvent>
      <ClientEvent name="beforeFileUploaded">var data = view.get(&quot;#dsMain.data:#&quot;)&#xD;
        if(data){&#xD;
        var plateNum = data.get(&quot;plateNum&quot;);&#xD;
        var bizTag = &quot;HANDLE&quot;;&#xD;
        self.set(&quot;parameter&quot;,{&#xD;
        bizTag:bizTag&#xD;
        })&#xD;
        }</ClientEvent>
      <Property name="maxFileSize">20MB</Property>
      <Property name="successMessage">上传成功</Property>
      <Property name="parameter"></Property>
      <Property name="fileResolver">fileUploadManage#inoutFile</Property>
      <Filters/>
    </UploadAction>
    <AjaxAction id="ajaxDelFile">
      <Property name="service">fileUploadManage#delInoutFile</Property>
      <Property name="async">true</Property>
      <Property name="confirmMessage">确定要删除么?</Property>
    </AjaxAction>
  </View>
</ViewConfig>
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutList.view.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,1165 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dtMain">
      <Property name="creationType">com.fzzy.igds.domain.InoutRecord</Property>
      <PropertyDef name="id">
        <Property></Property>
        <Property name="label">单据号</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="companyId">
        <Property></Property>
        <Property name="label">组织编码</Property>
      </PropertyDef>
      <PropertyDef name="progress">
        <Property></Property>
        <Property name="label">流程进度</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;PROCESS_STATUS_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="recordStatus">
        <Property></Property>
        <Property name="label">数据状态</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;RECORD_STATUS&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="checkStatus">
        <Property></Property>
        <Property name="label">扦样结果</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;CHECK_STATUS&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="registerTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">登记时间</Property>
      </PropertyDef>
      <PropertyDef name="registerUser">
        <Property></Property>
        <Property name="label">登记人员</Property>
      </PropertyDef>
      <PropertyDef name="userName">
        <Property></Property>
        <Property name="label">承运人</Property>
      </PropertyDef>
      <PropertyDef name="userId">
        <Property></Property>
        <Property name="label">身份证号</Property>
      </PropertyDef>
      <PropertyDef name="userContact">
        <Property></Property>
        <Property name="label">联系方式</Property>
      </PropertyDef>
      <PropertyDef name="userAddress">
        <Property></Property>
        <Property name="label">承运人地址</Property>
      </PropertyDef>
      <PropertyDef name="plateNum">
        <Property></Property>
        <Property name="label">车牌号</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="customerName">
        <Property></Property>
        <Property name="label">往来单位</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="foodLocation">
        <Property></Property>
        <Property name="label">粮食产地</Property>
      </PropertyDef>
      <PropertyDef name="foodYear">
        <Property></Property>
        <Property name="label">粮食年份</Property>
      </PropertyDef>
      <PropertyDef name="deOther">
        <Property name="dataType">Double</Property>
        <Property name="label">扣重</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="fullWeight">
        <Property name="dataType">Double</Property>
        <Property name="label">满车称重</Property>
        <Property name="required">true</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="fullWeightTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">满车称时间</Property>
      </PropertyDef>
      <PropertyDef name="fullWeightUser">
        <Property></Property>
        <Property name="label">满车称重人</Property>
      </PropertyDef>
      <PropertyDef name="emptyWeight">
        <Property name="dataType">Double</Property>
        <Property name="label">空车称重</Property>
        <Property name="required">true</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="emptyWeightTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">空车称时间</Property>
      </PropertyDef>
      <PropertyDef name="emptyWeightUser">
        <Property></Property>
        <Property name="label">空车称重人</Property>
      </PropertyDef>
      <PropertyDef name="netWeight">
        <Property name="dataType">Double</Property>
        <Property name="label">净重</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="settleWeight">
        <Property name="dataType">Double</Property>
        <Property name="label">结算净重</Property>
        <Property name="required">true</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="recordWeight">
        <Property name="dataType">Double</Property>
        <Property name="label">入库重量</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="handleStart">
        <Property name="dataType">Date</Property>
        <Property name="label">值仓开始时间</Property>
      </PropertyDef>
      <PropertyDef name="handleEnd">
        <Property name="dataType">Date</Property>
        <Property name="label">值仓结束时间</Property>
      </PropertyDef>
      <PropertyDef name="handleUser">
        <Property></Property>
        <Property name="label">值仓操作人</Property>
      </PropertyDef>
      <PropertyDef name="completeTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">完成时间</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="completeUser">
        <Property></Property>
        <Property name="label">完成确认人</Property>
      </PropertyDef>
      <PropertyDef name="remarks">
        <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="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="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="type">
        <Property name="label">出入库类型</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="name">出库</Property>
                <Property name="value">OUT</Property>
              </Entity>
              <Entity>
                <Property name="name">入库</Property>
                <Property name="value">IN</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">value</Property>
          <Property name="valueProperty">name</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="checkUser">
        <Property></Property>
        <Property name="label">质检人</Property>
      </PropertyDef>
      <PropertyDef name="price">
        <Property name="dataType">double</Property>
        <Property name="label">粮食定价</Property>
        <Property name="displayFormat">0.00 å…ƒ/公斤</Property>
      </PropertyDef>
      <PropertyDef name="noticeId">
        <Property></Property>
        <Property name="label">通知单编码</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="foodLocationId">
        <Property></Property>
        <Property name="label">产地名称代码</Property>
      </PropertyDef>
      <PropertyDef name="checkTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">质检时间</Property>
      </PropertyDef>
      <PropertyDef name="perWet">
        <Property name="dataType">Double</Property>
        <Property name="label">水分</Property>
        <Property name="displayFormat">0.00 %</Property>
      </PropertyDef>
      <PropertyDef name="perImpurity">
        <Property name="dataType">Double</Property>
        <Property name="label">杂质</Property>
        <Property name="displayFormat">0.00 %</Property>
      </PropertyDef>
      <PropertyDef name="settleMoney">
        <Property name="dataType">Double</Property>
        <Property name="label">结算金额</Property>
        <Property name="displayFormat">0.00 å…ƒ</Property>
      </PropertyDef>
      <PropertyDef name="settleTag">
        <Property></Property>
        <Property name="label">是否结算</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="name">未结算</Property>
                <Property name="value">N</Property>
              </Entity>
              <Entity>
                <Property name="name">已结算</Property>
                <Property name="value">Y</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">value</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="settleTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">结算时间</Property>
        <Property name="readOnly">true</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">
      <Property name="creationType">com.fzzy.igds.data.InoutParam</Property>
      <PropertyDef name="type">
        <Property name="label">出入库类型</Property>
      </PropertyDef>
      <PropertyDef name="deptId">
        <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="plateNum">
        <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="progress">
        <Property></Property>
        <Property name="label">流程进度</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;PROCESS_STATUS_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="recordStatus">
        <Property></Property>
        <Property name="label">单据状态</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;RECORD_STATUS&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="start">
        <Property name="label">开始时间</Property>
        <Property name="dataType">Date</Property>
      </PropertyDef>
      <PropertyDef name="end">
        <Property name="label">截止时间</Property>
        <Property name="dataType">Date</Property>
      </PropertyDef>
    </DataType>
  </Model>
  <View layout="padding:10">
    <ClientEvent name="onReady">var TYPE = &quot;${request.getParameter('type')}&quot;;&#xD;
var EDIT = &quot;${request.getParameter('edit')}&quot;;&#xD;
var deptId = window.parent.DEPT_ID;//父页面中的分库编码&#xD;
&#xD;
//如果edit有值表示隐藏ADD和编辑按钮&#xD;
if(EDIT){&#xD;
    view.get(&quot;#btnEdit&quot;).set(&quot;visible&quot;,false);&#xD;
    view.get(&quot;#btnDel&quot;).set(&quot;visible&quot;,false);&#xD;
}&#xD;
&#xD;
if(&quot;OUT&quot; == TYPE){&#xD;
    view.get(&quot;#recordWeight&quot;).set(&quot;caption&quot;,&quot;出库重量&quot;);&#xD;
}else{&#xD;
    view.get(&quot;#recordWeight&quot;).set(&quot;caption&quot;,&quot;入库重量&quot;);&#xD;
}&#xD;
&#xD;
//默认查询查询提条件&#xD;
view.get(&quot;#dsQuery&quot;).insert({&#xD;
    type:TYPE,&#xD;
    deptId:deptId&#xD;
});&#xD;
&#xD;
//查询&#xD;
query = function(){&#xD;
    var data = view.get(&quot;#dsQuery.data&quot;);&#xD;
    view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,data).flushAsync();&#xD;
};&#xD;
query();&#xD;
&#xD;
&#xD;
//编辑,只有流程结束的才可以修改&#xD;
edit = function(){&#xD;
    &#xD;
    var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
    if(select){&#xD;
        console.log(select);&#xD;
        view.get(&quot;#dialogMain&quot;).show();;&#xD;
    }else{&#xD;
        $notify(&quot;请选择需要修改的数据……&quot;);&#xD;
    }        &#xD;
};&#xD;
&#xD;
&#xD;
//异常操作&#xD;
showAbnormal = function(){    &#xD;
    var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
    if(select){&#xD;
        view.get(&quot;#dialogAbnormal&quot;).show();&#xD;
        view.get(&quot;#textAbnormal&quot;).set(&quot;value&quot;,null);&#xD;
    }else{&#xD;
        $notify(&quot;请选择数据……&quot;);&#xD;
    }    &#xD;
};&#xD;
&#xD;
//追踪&#xD;
showImg = function(){&#xD;
    &#xD;
    var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
    if(select){&#xD;
        var user = encodeURIComponent(select.get(&quot;userName&quot;));&#xD;
        var plateNum = encodeURIComponent(select.get(&quot;plateNum&quot;));&#xD;
    &#xD;
        view.get(&quot;#iFrameImg&quot;).set(&quot;path&quot;, &quot;./basic/inout/inout-img?id=&quot; + select.get(&quot;id&quot;)+&quot;&amp;plateNum=&quot;+plateNum+&quot;&amp;user=&quot;+user);&#xD;
        view.get(&quot;#dialogImg&quot;).show();&#xD;
    }else{&#xD;
        $notify(&quot;请选择数据……&quot;);&#xD;
    }&#xD;
};&#xD;
&#xD;
//异常执行&#xD;
todoError = function(){&#xD;
    var data = view.get(&quot;#dataGridMain.currentEntity&quot;);&#xD;
    if(!data) return;&#xD;
    &#xD;
    var textError = view.get(&quot;#textAbnormal.text&quot;);&#xD;
    if(!textError){&#xD;
        $alert(&quot;请说明异常终止原因!!&quot;);&#xD;
        return;&#xD;
    }&#xD;
    data.set(&quot;remarks&quot;,textError);&#xD;
    view.get(&quot;#ajaxError&quot;).execute(function(result){&#xD;
        if(result){&#xD;
            $alert(result);&#xD;
            return;&#xD;
        }else{&#xD;
            data.remove();&#xD;
            view.get(&quot;#dialogAbnormal&quot;).close();&#xD;
            $alert(&quot;执行成功,自动刷新数据!&quot;);&#xD;
        }&#xD;
    });&#xD;
};&#xD;
&#xD;
/**&#xD;
 * æ‰“印过磅单&#xD;
 */&#xD;
printBill = function (htmlStr) {&#xD;
    var LODOP = CLODOP;&#xD;
    LODOP.PRINT_INIT(&quot;称重单&quot;);&#xD;
    LODOP.SET_PRINT_PAGESIZE(1, 2100, 1400, &quot;A4&quot;);&#xD;
    //LODOP.SET_PRINT_PAGESIZE(1, 0, '90mm', &quot;A4&quot;);&#xD;
    LODOP.ADD_PRINT_HTM(0, 0, &quot;100%&quot;, &quot;100%&quot;, htmlStr);&#xD;
    LODOP.PREVIEW();&#xD;
};&#xD;
&#xD;
//打印过磅单&#xD;
printWeight = function () {&#xD;
    var data = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
    if (!data) return;&#xD;
    if (&quot;DEL&quot; == data.get(&quot;recordStatus&quot;)) {&#xD;
        $alert(&quot;异常处理的信息不支持打印!&quot;);&#xD;
        return;&#xD;
    }&#xD;
    if (&quot;RECORD&quot; != data.get(&quot;progress&quot;)) {&#xD;
        $alert(&quot;流程未完成不支持打印!&quot;);&#xD;
        return;&#xD;
    }&#xD;
    view.get(&quot;#ajaxPrint&quot;).set(&quot;parameter&quot;, data).execute(function (result) {&#xD;
      printBill(result);&#xD;
    });&#xD;
};&#xD;
&#xD;
/**&#xD;
 * è‡ªåŠ¨è®¡ç®—&#xD;
 * @param name&#xD;
 */&#xD;
deAutoByWeight = function () {&#xD;
&#xD;
    var curData = view.get(&quot;#dsMain.data:#&quot;);&#xD;
    var fullWeight = curData.get(&quot;fullWeight&quot;);&#xD;
    var emptyWeight = curData.get(&quot;emptyWeight&quot;);&#xD;
    //扣重信息&#xD;
    var deOther = curData.get(&quot;deOther&quot;);&#xD;
&#xD;
    if (fullWeight == 0 || emptyWeight == 0) {&#xD;
        return;&#xD;
    }&#xD;
    // å‡€é‡&#xD;
    var netWeight = Number(fullWeight) - Number(emptyWeight);&#xD;
&#xD;
    if (netWeight &lt;= 0) {&#xD;
        $notify(&quot;净重小于0,当前称重存在逻辑问题&quot;);&#xD;
        return;&#xD;
    }&#xD;
&#xD;
    /** å…¥åº“重量 = å‡€é‡ - æ€»æ‰£é‡  */&#xD;
    recordWeight = Number(netWeight) - Number(deOther);&#xD;
&#xD;
    /** ç»“算重量 = å‡€é‡ - æ€»æ‰£é‡ + å¢žé‡ */&#xD;
    settleWeight = Number(recordWeight);&#xD;
&#xD;
    curData.set(&quot;netWeight&quot;, netWeight);&#xD;
    curData.set(&quot;settleWeight&quot;, settleWeight);&#xD;
    curData.set(&quot;recordWeight&quot;, recordWeight);&#xD;
};&#xD;
</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <Property name="javaScriptFile">./static/js/plugins/lodop/LodopFuncs.js</Property>
    <DataSet id="dsMain">
      <Property name="dataType">[dtMain]</Property>
      <Property name="pageSize">20</Property>
      <Property name="dataProvider">inoutDataPR#pageInoutData</Property>
      <Property name="loadMode">manual</Property>
    </DataSet>
    <DataSet id="dsQuery">
      <Property name="dataType">dtQuery</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">plateNum</Property>
          <Property name="property">plateNum</Property>
          <Editor>
            <TextEditor>
              <Property name="blankText">-- æ”¯æŒæ¨¡ç³Š --</Property>
            </TextEditor>
          </Editor>
        </AutoFormElement>
        <AutoFormElement>
          <Property name="name">start</Property>
          <Property name="property">start</Property>
          <Property name="trigger">defaultDateDropDown</Property>
          <Editor/>
        </AutoFormElement>
        <AutoFormElement>
          <Property name="name">end</Property>
          <Property name="property">end</Property>
          <Property name="trigger">defaultDateDropDown</Property>
          <Editor/>
        </AutoFormElement>
        <Button layoutConstraint="left">
          <ClientEvent name="onClick">query();&#xD;
          </ClientEvent>
          <Property name="caption">搜索</Property>
          <Property name="iconClass">fa fa-search</Property>
          <Property name="exClassName">btn-q1</Property>
        </Button>
        <Button layoutConstraint="left">
          <ClientEvent name="onClick">var type =&quot;${request.getParameter('type')}&quot;;&#xD;
              var deptId = window.parent.DEPT_ID;//父页面中的分库编码&#xD;
              view.get(&quot;#dsQuery&quot;).setData({type:type,deptId:deptId});</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 id="btnEdit">
          <ClientEvent name="onClick">edit();</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 id="btnDel">
          <ClientEvent name="onClick">showAbnormal();</ClientEvent>
          <Property name="caption">异常操作</Property>
          <Property name="exClassName">btn4</Property>
          <Property name="iconClass">fa fa-minus</Property>
          <Property name="width">100</Property>
        </ToolBarButton>
        <ToolBarButton>
          <ClientEvent name="onClick">showImg();</ClientEvent>
          <Property name="caption">过程追踪</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="width">100</Property>
          <Property name="iconClass">fa fa-picture-o</Property>
        </ToolBarButton>
        <ToolBarButton>
          <ClientEvent name="onClick">var data = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
              if (!data) {&#xD;
              $alert(&quot;请先选择数据!&quot;);&#xD;
              return;&#xD;
              }&#xD;
              &#xD;
              printWeight();&#xD;
              </ClientEvent>
          <Property name="caption">打印过磅单</Property>
          <Property name="exClassName">btn4</Property>
          <Property name="iconClass">fa fa-print</Property>
          <Property name="width">120</Property>
        </ToolBarButton>
      </ToolBar>
      <DataGrid id="dataGridMain" layoutConstraint="padding:8">
        <ClientEvent name="onDataRowClick">view.get(&quot;#dataGridMain&quot;).set(&quot;selection&quot;,arg.data);</ClientEvent>
        <Property name="dataSet">dsMain</Property>
        <Property name="readOnly">true</Property>
        <Property name="selectionMode">singleRow</Property>
        <RowSelectorColumn/>
        <RowNumColumn>
          <Property name="width">50</Property>
        </RowNumColumn>
        <DataColumn name="id">
          <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
arg.dom.style.color = &quot;#f67d06&quot;;&#xD;
arg.processDefault = true;</ClientEvent>
          <Property name="property">id</Property>
          <Property name="align">center</Property>
          <Property name="width">150</Property>
        </DataColumn>
        <DataColumn name="plateNum">
          <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
arg.processDefault = true;</ClientEvent>
          <Property name="property">plateNum</Property>
          <Property name="align">center</Property>
          <Property name="width">130</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">customerName</Property>
          <Property name="name">customerName</Property>
          <Property name="align">center</Property>
          <Property name="caption">往来单位</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>
          <Property name="width">120</Property>
        </DataColumn>
        <DataColumn name="foodVariety">
          <Property name="property">foodVariety</Property>
          <Property name="align">center</Property>
          <Property name="width">110</Property>
        </DataColumn>
        <DataColumn name="fullWeight">
          <Property name="property">fullWeight</Property>
          <Property name="caption">毛重</Property>
          <Property name="align">center</Property>
          <Property name="width">100</Property>
        </DataColumn>
        <DataColumn name="emptyWeight">
          <Property name="property">emptyWeight</Property>
          <Property name="caption">皮重</Property>
          <Property name="align">center</Property>
          <Property name="width">100</Property>
        </DataColumn>
        <DataColumn name="deOther">
          <Property name="property">deOther</Property>
          <Property name="caption">扣重</Property>
          <Property name="align">center</Property>
          <Property name="width">100</Property>
        </DataColumn>
        <DataColumn name="settleWeight">
          <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
arg.processDefault = true;</ClientEvent>
          <Property name="property">settleWeight</Property>
          <Property name="align">center</Property>
          <Property name="width">100</Property>
        </DataColumn>
        <DataColumn id="recordWeight">
          <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
arg.processDefault = true;</ClientEvent>
          <Property name="property">recordWeight</Property>
          <Property name="align">center</Property>
          <Property name="width">100</Property>
          <Property name="visible">true</Property>
          <Property name="name">recordWeight</Property>
        </DataColumn>
        <DataColumn name="progress">
          <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
arg.processDefault = true;</ClientEvent>
          <Property name="property">progress</Property>
          <Property name="align">center</Property>
          <Property name="width">80</Property>
        </DataColumn>
        <DataColumn name="completeTime">
          <Property name="property">completeTime</Property>
          <Property name="align">center</Property>
          <Property name="width">150</Property>
        </DataColumn>
      </DataGrid>
      <ToolBar layoutConstraint="bottom">
        <Fill/>
        <DataPilot layoutConstraint="right">
          <Property name="itemCodes">pageSize,pages</Property>
          <Property name="dataSet">dsMain</Property>
        </DataPilot>
      </ToolBar>
    </Container>
    <Dialog id="dialogMain" layout="regionPadding:8">
      <Property name="iconClass">fa fa-tasks</Property>
      <Property name="caption">单据信息</Property>
      <Property name="width">1200</Property>
      <Property name="showCaptionBar">false</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;#uaSave&quot;).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">self.get(&quot;parent&quot;).close();</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>
        <FieldSet layout="padding:5">
          <Property name="caption">基本信息</Property>
          <Buttons/>
          <Children>
            <AutoForm>
              <Property name="dataSet">dsMain</Property>
              <Property name="cols">*,*,*</Property>
              <Property name="labelAlign">right</Property>
              <Property name="labelSeparator">:</Property>
              <Property name="labelWidth">100</Property>
              <AutoFormElement>
                <Property name="name">id</Property>
                <Property name="property">id</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">plateNum</Property>
                <Property name="property">plateNum</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">depotId</Property>
                <Property name="property">depotId</Property>
                <Property name="label">装卸仓库</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">userName</Property>
                <Property name="property">userName</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">userId</Property>
                <Property name="property">userId</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">foodVariety</Property>
                <Property name="property">foodVariety</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">perWet</Property>
                <Property name="property">perWet</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">userContact</Property>
                <Property name="property">userContact</Property>
                <Property name="label">联系电话</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">foodLevel</Property>
                <Property name="property">foodLevel</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">perImpurity</Property>
                <Property name="property">perImpurity</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">foodYear</Property>
                <Property name="property">foodYear</Property>
                <Property name="trigger">yearDropDown</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">foodLocation</Property>
                <Property name="property">foodLocation</Property>
                <Property name="trigger">ddDicArea</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="label">客户名称</Property>
                <Property name="property">customerName</Property>
                <Property name="editable">false</Property>
                <Property name="trigger">ddNotice</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">noticeId</Property>
                <Property name="property">noticeId</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Children>
        </FieldSet>
        <FieldSet layout="padding:5">
          <Property name="caption">称重信息(单位:KG)</Property>
          <Buttons/>
          <Children>
            <AutoForm>
              <Property name="dataSet">dsMain</Property>
              <Property name="cols">*,50,*,50,*,50</Property>
              <Property name="labelAlign">right</Property>
              <Property name="labelWidth">100</Property>
              <Property name="labelSeparator">:</Property>
              <AutoFormElement layoutConstraint="colSpan:2">
                <ClientEvent name="onBlur">deAutoByWeight();</ClientEvent>
                <Property name="name">fullWeight</Property>
                <Property name="property">fullWeight</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">fullWeightTime</Property>
                <Property name="property">fullWeightTime</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">fullWeightUser</Property>
                <Property name="property">fullWeightUser</Property>
                <Property name="label">满车称重人</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <ClientEvent name="onBlur">deAutoByWeight();</ClientEvent>
                <Property name="name">emptyWeight</Property>
                <Property name="property">emptyWeight</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">emptyWeightTime</Property>
                <Property name="property">emptyWeightTime</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">emptyWeightUser</Property>
                <Property name="property">emptyWeightUser</Property>
                <Property name="label">空车称重人</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">netWeight</Property>
                <Property name="property">netWeight</Property>
                <Property name="readOnly">true</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <ClientEvent name="onBlur">deAutoByWeight();</ClientEvent>
                <Property name="name">deOther</Property>
                <Property name="property">deOther</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">registerTime</Property>
                <Property name="property">registerTime</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">settleWeight</Property>
                <Property name="property">settleWeight</Property>
                <Property name="readOnly">true</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">recordWeight</Property>
                <Property name="property">recordWeight</Property>
                <Property name="readOnly">true</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">completeTime</Property>
                <Property name="property">completeTime</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Children>
        </FieldSet>
        <FieldSet layout="padding:5">
          <Property name="caption">其他信息</Property>
          <Buttons/>
          <Children>
            <AutoForm>
              <Property name="dataSet">dsMain</Property>
              <Property name="cols">*,*,*</Property>
              <Property name="labelAlign">right</Property>
              <Property name="labelSeparator">:</Property>
              <Property name="labelWidth">100</Property>
              <AutoFormElement>
                <Property name="name">price</Property>
                <Property name="property">price</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">settleMoney</Property>
                <Property name="property">settleMoney</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">settleTime</Property>
                <Property name="property">settleTime</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:3">
                <Property name="name">remarks</Property>
                <Property name="property">remarks</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Children>
        </FieldSet>
      </Children>
      <Tools/>
    </Dialog>
    <Dialog id="dialogImg">
      <Property name="width">1000</Property>
      <Property name="height">95%</Property>
      <Property name="iconClass">fa fa-tasks</Property>
      <Property name="caption">流程追溯展示</Property>
      <Buttons/>
      <Children>
        <IFrame id="iFrameImg">
          <Property name="width">100%</Property>
        </IFrame>
      </Children>
      <Tools/>
    </Dialog>
    <Dialog id="dialogAbnormal" layout="regionPadding:5">
      <Property name="width">450</Property>
      <Property name="iconClass">fa fa-tasks</Property>
      <Property name="caption">异常操作原因</Property>
      <Property name="closeable">false</Property>
      <Buttons>
        <Button>
          <ClientEvent name="onClick">todoError();</ClientEvent>
          <Property name="caption">异常终止</Property>
          <Property name="iconClass">fa fa-check</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="width">120</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">self.get(&quot;parent&quot;).close();</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>
        <TextArea id="textAbnormal">
          <Property name="height">165</Property>
        </TextArea>
        <AutoForm>
          <Property name="cols">*</Property>
          <Label layoutConstraint="colSpan:1">
            <Property name="style">
              <Property name="color">blue</Property>
            </Property>
            <Property name="text">异常终止:业务数据流程结束,重量信息不进行统计计算。</Property>
          </Label>
          <Label layoutConstraint="colSpan:1">
            <Property name="style">
              <Property name="color">blue</Property>
            </Property>
            <Property name="text">删除操作:业务数据被删除且不统计,只保留日志记录。</Property>
          </Label>
        </AutoForm>
      </Children>
      <Tools/>
    </Dialog>
    <UpdateAction id="uaSave">
      <Property name="dataResolver">inoutDataPR#saveInoutData</Property>
      <UpdateItem>
        <Property name="dataSet">dsMain</Property>
        <Property name="dataPath">[#current]</Property>
        <Property name="validateData">false</Property>
      </UpdateItem>
    </UpdateAction>
    <UpdateAction id="ajaxError">
      <Property name="dataResolver">inoutDataPR#errorInoutData</Property>
      <UpdateItem>
        <Property name="dataSet">dsMain</Property>
        <Property name="dataPath">[#current]</Property>
        <Property name="validateData">false</Property>
      </UpdateItem>
    </UpdateAction>
    <AjaxAction id="ajaxPrint">
      <Property name="service">inoutDataPR#printWeightBill</Property>
      <Property name="executingMessage">正在执行打印……</Property>
      <Property name="async">false</Property>
    </AjaxAction>
    <CustomDropDown id="ddNotice">
      <Property name="minHeight">400</Property>
      <Property name="assignmentMap">noticeId=id,customerName=customerName</Property>
      <Property name="minWidth">1000</Property>
      <Property name="autoOpen">true</Property>
      <Container layout="regionPadding:5">
        <DataSet id="dsNotice">
          <Property name="dataProvider">inoutNoticePR#queryNoticeByKey</Property>
          <Property name="parameter">
            <Entity>
              <Property name="type">${request.getParameter('type')}</Property>
            </Entity>
          </Property>
          <Property name="dataType">[dtNoticeDto]</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;
var type = &quot;${request.getParameter('type')}&quot;;&#xD;
view.get(&quot;#dsNotice&quot;).set(&quot;parameter&quot;,{key: key,type: type}).flushAsync();</ClientEvent>
            <Property name="caption">查询</Property>
            <Property name="exClassName">btn1</Property>
            <Property name="iconClass">fa fa-search</Property>
          </Button>
          <Button>
            <ClientEvent name="onClick">var data = view.get(&quot;#dsNotice.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#ddNotice&quot;).close(data.toJSON());&#xD;
}</ClientEvent>
            <Property name="iconClass">fa fa-check</Property>
            <Property name="exClassName">btn2</Property>
            <Property name="caption">确定</Property>
          </Button>
        </Container>
        <DataGrid>
          <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsNotice.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#ddNotice&quot;).close(data.toJSON());&#xD;
}</ClientEvent>
          <Property name="dataSet">dsNotice</Property>
          <Property name="readOnly">true</Property>
          <DataColumn name="name">
            <Property name="property">name</Property>
            <Property name="align">center</Property>
            <Property name="width">100</Property>
          </DataColumn>
          <DataColumn>
            <Property name="property">customerName</Property>
            <Property name="align">center</Property>
            <Property name="name">customerName</Property>
            <Property name="width">240</Property>
          </DataColumn>
          <DataColumn name="foodVariety">
            <Property name="property">foodVariety</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="year">
            <Property name="property">year</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="contract">
            <Property name="property">contract</Property>
            <Property name="align">center</Property>
            <Property name="width">300</Property>
          </DataColumn>
        </DataGrid>
      </Container>
    </CustomDropDown>
    <CustomDropDown id="ddDicArea">
      <Property name="minHeight">500</Property>
      <Property name="minWidth">500</Property>
      <Property name="assignmentMap">foodLocation=name,foodLocationId=code</Property>
      <Container layout="regionPadding:5">
        <DataSet id="dsDicArea">
          <Property name="dataProvider">dicAreaPR#pageList</Property>
          <Property name="parameter"></Property>
          <Property name="dataType">[dtArea]</Property>
          <Property name="pageSize">1000</Property>
        </DataSet>
        <Container layout="hbox regionPadding:5">
          <TextEditor id="key2">
            <Property name="blankText"> -名称或简拼,北京市  bjs -</Property>
            <Property name="width">200</Property>
          </TextEditor>
          <Button>
            <ClientEvent name="onClick">var key = view.get(&quot;#key2.value&quot;);&#xD;
view.get(&quot;#dsDicArea&quot;).set(&quot;parameter&quot;,{key:key}).flushAsync();</ClientEvent>
            <Property name="caption">查询</Property>
            <Property name="iconClass">fa fa-search</Property>
            <Property name="exClassName">btn1</Property>
          </Button>
          <Button>
            <ClientEvent name="onClick">var data = view.get(&quot;#dsDicArea.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#ddDicArea&quot;).close(data.toJSON());&#xD;
}</ClientEvent>
            <Property name="iconClass">fa fa-check</Property>
            <Property name="exClassName">btn2</Property>
            <Property name="caption">确定</Property>
          </Button>
        </Container>
        <DataGrid>
          <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsDicArea.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#ddDicArea&quot;).close(data.toJSON());&#xD;
}</ClientEvent>
          <Property name="dataSet">dsDicArea</Property>
          <Property name="readOnly">true</Property>
          <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="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="code">
            <Property name="property">code</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="simple">
            <Property name="property">simple</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
        </DataGrid>
        <DataPilot layoutConstraint="bottom">
          <Property name="dataSet">dsDicArea</Property>
        </DataPilot>
      </Container>
    </CustomDropDown>
    <YearDropDown id="yearDropDown"/>
  </View>
</ViewConfig>
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticePR.java
@@ -5,12 +5,15 @@
import com.bstek.dorado.annotation.DataResolver;
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.data.NoticeParam;
import com.fzzy.igds.service.InoutNoticeService;
import com.fzzy.igds.domain.InoutNoticeIn;
import com.fzzy.igds.domain.InoutNoticeOut;
import com.fzzy.igds.utils.ContextUtil;
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.stereotype.Component;
@@ -208,4 +211,55 @@
        return "fail";
    }
    /**
     * 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;
        NoticeParam noticeParam = new NoticeParam();
        noticeParam.setCompanyId(ContextUtil.getCompanyId());
        noticeParam.setDeptId(ContextUtil.subDeptId(null));
        noticeParam.setCompleteStatus(Constant.COMPLETE_STATUS_NONE);
        String key = (String)param.get("key");
        if (StringUtils.isNotEmpty(key)) {
            noticeParam.setKey(key);
        }
        if (Constant.TYPE_IN.equals(type)) {
            List<InoutNoticeIn> listIn = inoutNoticeService.getNoticeIn(noticeParam);
            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 = inoutNoticeService.getNoticeOut(noticeParam);
            if (null != listOut && listOut.size() > 0) {
                for (InoutNoticeOut inoutNoticeOut : listOut) {
                    dto = new NoticeDto();
                    BeanUtils.copyProperties(inoutNoticeOut, dto);
                    list.add(dto);
                }
            }
        }
        return list;
    }
}
fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapRecord.view.xml
ÎļþÒÑɾ³ý
fzzy-igdss-view/src/main/java/com/fzzy/igds/SnapRecordPR.java
ÎļþÒÑɾ³ý
fzzy-igdss-view/src/main/java/models/core.model.xml
@@ -1209,4 +1209,120 @@
      <Property name="label">执行时间3</Property>
    </PropertyDef>
  </DataType>
  <DataType name="dtNoticeDto">
    <Property name="creationType">com.fzzy.igds.data.NoticeDto</Property>
    <PropertyDef name="id">
      <Property></Property>
      <Property name="label">通道单编码</Property>
    </PropertyDef>
    <PropertyDef name="name">
      <Property></Property>
      <Property name="label">通知单名称</Property>
    </PropertyDef>
    <PropertyDef name="companyId">
      <Property></Property>
    </PropertyDef>
    <PropertyDef name="deptId">
      <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>
    </PropertyDef>
    <PropertyDef name="customerId">
      <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="foodType">
      <Property></Property>
    </PropertyDef>
    <PropertyDef name="year">
      <Property></Property>
      <Property name="label">年份</Property>
    </PropertyDef>
    <PropertyDef name="targetNumber">
      <Property name="dataType">Double</Property>
    </PropertyDef>
    <PropertyDef name="completeNumber">
      <Property name="dataType">Double</Property>
    </PropertyDef>
    <PropertyDef name="completeTime">
      <Property name="dataType">Date</Property>
    </PropertyDef>
    <PropertyDef name="unitName">
      <Property></Property>
    </PropertyDef>
    <PropertyDef name="contract">
      <Property></Property>
      <Property name="label">所属合同</Property>
    </PropertyDef>
  </DataType>
  <DataType name="dtFileData">
    <Property name="creationType">com.fzzy.igds.domain.FileInfo</Property>
    <PropertyDef name="fileId">
      <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>
    </PropertyDef>
    <PropertyDef name="bizId">
      <Property></Property>
      <Property name="label">业务ID</Property>
    </PropertyDef>
    <PropertyDef name="bizTag">
      <Property></Property>
      <Property name="label">业务标签</Property>
    </PropertyDef>
    <PropertyDef name="fileName">
      <Property></Property>
      <Property name="label">文件名称</Property>
    </PropertyDef>
    <PropertyDef name="filePath">
      <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>
</Model>
fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/eventInfo/EventInfoController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,59 @@
package com.fzzy.sys.controller.eventInfo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fzzy.igds.constant.RespCodeEnum;
import com.fzzy.igds.data.IgdsBaseParam;
import com.fzzy.igds.data.PageResponse;
import com.fzzy.igds.domain.EventInfo;
import com.fzzy.sys.manager.eventInfo.EventInfoManager;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
@Slf4j
@Controller
@RequestMapping("/eventInfo")
public class EventInfoController {
    private static final String prefix = "eventInfo";
    @Resource
    private EventInfoManager eventInfoManager;
    @GetMapping
    public String getEventInfo(
            Model model) {
        IgdsBaseParam param = new IgdsBaseParam();
        param.setPage(1);
        param.setLimit(6);
        Page<EventInfo> events = eventInfoManager.pageData(param);
        model.addAttribute("eventInfoList", events.getRecords());
        model.addAttribute("currentPage", events.getCurrent());
        model.addAttribute("totalItems", events.getTotal());
        model.addAttribute("pageSize", events.getSize());
        return prefix + "/eventInfo";
    }
    /**
     * åˆ†é¡µèŽ·å–æ•°æ®
     *
     * @param param
     * @return
     */
    @RequestMapping("/pageData")
    @ResponseBody
    public PageResponse<Page<EventInfo>> pageData(@RequestBody IgdsBaseParam param) {
        Page<EventInfo> eventInfoPage = eventInfoManager.pageData(param);
        if (null == eventInfoPage.getRecords() || eventInfoPage.getRecords().isEmpty()) {
            return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(), "获取到数据信息为空");
        }
        return new PageResponse<>(RespCodeEnum.CODE_0000, eventInfoPage);
    }
}
fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/file/FileController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,69 @@
package com.fzzy.sys.controller.file;
import com.fzzy.igds.data.PageResponse;
import com.fzzy.sys.manager.file.FileManager;
import com.ruoyi.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
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 org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.*;
/**
 * @Description å‡ºå…¥åº“设备相关功能
 * @Author CZT
 * @Date 2025/12/4 9:27
 */
@Slf4j
@Controller
@RequestMapping("basic/file")
public class FileController {
    @Resource
    private FileManager fileManager;
    /**
     * é¸Ÿçž°å›¾é¢„览页面
     *
     * @return
     */
    @RequestMapping("/dept-img")
    public String deptImg(@RequestParam(value = "id", required = true) String id,
                          ModelMap view) {
        if(StringUtils.isNotEmpty(id)){
            String imgPath = fileManager.getDeptFile(id);;
            view.put("imgPath", imgPath);
        }
        return "web/common/preview-img";
    }
    /**
     * é•¿ä¼  å‡ºå…¥åº“图片
     *
     * @param file
     * @param request
     * @return
     * @throws IOException
     */
    @RequestMapping("/update-file")
    @ResponseBody
    public PageResponse<String> updateFile(
            @RequestParam(value = "file", required = true) MultipartFile file,
            HttpServletRequest request) throws IOException {
        String plateNum = request.getParameter("plateNum");
        return fileManager.upLoadInoutHandleImg(file, plateNum);
    }
}
fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/inout/InoutApiController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,85 @@
package com.fzzy.sys.controller.inout;
import com.fzzy.igds.constant.RespCodeEnum;
import com.fzzy.igds.data.*;
import com.fzzy.igds.utils.SystemUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
/**
 * @Description å‡ºå…¥åº“设备相关功能
 * @Author CZT
 * @Date 2025/12/4 9:27
 */
@RestController
@RequestMapping("inout/api")
public class InoutApiController {
    /**
     * èŽ·å–è½¦ç‰Œè¯†åˆ«ä¿¡æ¯
     *
     * @param param è½¦ç‰Œè¯†åˆ«æ•°æ®ä¿¡æ¯
     * @return
     */
    @ResponseBody
    @RequestMapping("/get-plateNum")
    public PageResponse<ApiInoutData> getPlateNum(@RequestBody ApiInoutData param) {
        if (null == param.getIp()) {
            return new PageResponse<>(RespCodeEnum.CODE_1007.getCode(), "出入库配置中没有配置如入登记的车牌识别");
        }
        if (StringUtils.isEmpty(param.getProtocol())) {
            return new PageResponse<>(RespCodeEnum.CODE_1007.getCode(), "当前车牌识别未配置通讯协议,无法执行");
        }
//        param = inoutEventControl.getPlateNum(param);
        //TODO å¾…实现,后续根据需求进行实现
        if (StringUtils.isEmpty(param.getErrorMsg())) {
            return new PageResponse<>(RespCodeEnum.CODE_0000, param);
        }
        return new PageResponse<>(RespCodeEnum.CODE_1007.getCode(), param.getErrorMsg());
    }
    /**
     * å‡ºå…¥åº“抓拍
     *
     * @param param
     * @return
     */
    @RequestMapping("/snap-img")
    public @ResponseBody
    PageResponse<SnapImgDto> cutImg(@RequestBody SnapImgDto param) {
        //TODO å¾…实现,后续根据需求进行实现
//        param = inoutApiManager.snapImg(param);
        return new PageResponse<>(RespCodeEnum.CODE_0000, param);
    }
    /**
     * å‡ºå…¥åº“视频
     *
     * @return
     */
    @RequestMapping("/inout-video-play")
    @ResponseBody
    public ApiCameraResp inoutVideoPlay(HttpServletRequest request, @RequestBody InoutCameraDto param) {
        //获取请求方IP
        String ip = SystemUtil.getIP(request);
//        return inoutEventControl.inoutVideoPlay(param, ip);
        //TODO å¾…实现,后续根据需求进行实现
        return null;
    }
}
fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/inout/InoutController.java
@@ -4,10 +4,7 @@
import com.fzzy.common.dto.BaseParam;
import com.fzzy.igds.constant.Constant;
import com.fzzy.igds.constant.RespCodeEnum;
import com.fzzy.igds.data.IgdsBaseParam;
import com.fzzy.igds.data.InoutParam;
import com.fzzy.igds.data.NoticeParam;
import com.fzzy.igds.data.PageResponse;
import com.fzzy.igds.data.*;
import com.fzzy.igds.domain.*;
import com.fzzy.igds.utils.ContextUtil;
import com.fzzy.igds.utils.DateUtil;
@@ -144,6 +141,61 @@
    }
    /**
     * å‡ºå…¥åº“值仓
     * @param httpRequest
     * @param sort
     * @param type
     * @param view
     * @return
     */
    @RequestMapping("/handle")
    public String handle(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("deptId", deptId);
        // å½“前流程标签
        view.put("progress", Constant.PROGRESS_HANDLE);
        //入库流程配置
        String inoutProgress = inoutManager.getInoutProgressConf(user.getCompanyId(), deptId, type);
        view.put("inoutProgress", inoutProgress);
        // ç±»åž‹
        List<SysDictData> listInoutType = commonManager.getInoutType();
        view.put("listInoutType", listInoutType);
        // ä»“库列表做下拉框使用
        List<Depot> listDepot = commonManager.listDepotByDeptId(deptId);
        view.put(Constant.MODEL_KEY_DEPOT_LIST, listDepot);
        // ç²®é£Ÿå“ç§ä¸‹æ‹‰æ¡†
        List<SysDictData> listFoodVariety = commonManager.getDicTrigger(Constant.TRIGGER_PARENT_FOOD_VARIETY, user.getCompanyId());
        view.put("listFoodVariety", listFoodVariety);
        return prefix + "/handle";
    }
    /**
     * å…¥åº“称重操作,包括空车称重和满车称重,共用一个页面
     *
     * @param sort è¡¨ç¤ºä½¿ç”¨çš„出入库设备配套号,不传递默认为1
@@ -265,15 +317,26 @@
    }
    /**
     * å‡ºå…¥åº“数据查询,根据条件查询数据,出入库数据信息
     * èŽ·å–å¾…å€¼ä»“çš„æ•°æ®
     *
     * @param param
     * @return
     */
    @RequestMapping("/list-handle-data")
    @ResponseBody
    public PageResponse<List<InoutRecord>> listHandleData(@RequestBody InoutParam param) {
        return inoutManager.listHandleData(param);
    }
    /**
     * æ ¹æ®æ¡ä»¶æŸ¥è¯¢å¾…称重的数据
     * @param param
     * @return
     */
    @RequestMapping("/inout-query")
    @ResponseBody
    public PageResponse<InoutRecord> inoutQuery(@RequestBody InoutParam param) {
        if (null == param.getCompanyId()) param.setCompanyId(ContextUtil.getCompanyId());
        return inoutManager.inoutQuery(param);
    }
@@ -286,7 +349,7 @@
     */
    @RequestMapping("/submit-register")
    @ResponseBody
    public PageResponse<InoutRecord> submitRegister(@RequestBody InoutRecord data) {
    public PageResponse<InoutData> submitRegister(@RequestBody InoutData data) {
        return inoutManager.submitRegister(data);
    }
@@ -298,7 +361,7 @@
     */
    @RequestMapping("/submit-check")
    @ResponseBody
    public PageResponse<InoutRecord> submitCheck(@RequestBody InoutRecord data) {
    public PageResponse<InoutData> submitCheck(@RequestBody InoutData data) {
        return inoutManager.submitCheck(data);
    }
@@ -310,7 +373,7 @@
     */
    @RequestMapping("/submit-weight")
    @ResponseBody
    public PageResponse<InoutRecord> submitWeight(@RequestBody InoutRecord data) {
    public PageResponse<InoutData> submitWeight(@RequestBody InoutData data) {
        return inoutManager.submitWeight(data);
    }
@@ -325,7 +388,7 @@
    @RequestMapping("/submit-handle")
    @Transactional
    @ResponseBody
    public PageResponse<InoutRecord> submitHandle(@RequestBody InoutRecord data) {
    public PageResponse<InoutData> submitHandle(@RequestBody InoutData data) {
        log.debug("-------------submitHandle------------------");
        return inoutManager.submitHandle(data);
fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/print/PrintController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,64 @@
package com.fzzy.sys.controller.print;
import com.fzzy.igds.constant.Constant;
import com.fzzy.igds.constant.RespCodeEnum;
import com.fzzy.igds.data.InoutData;
import com.fzzy.igds.data.InoutParam;
import com.fzzy.igds.data.PageResponse;
import com.fzzy.igds.domain.InoutRecord;
import com.fzzy.igds.service.InoutRecordService;
import com.fzzy.sys.manager.print.PrintManager;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
 * @Description å•据打印
 * @Author CZT
 * @Date 2025/12/4 9:27
 */
@Slf4j
@RestController
@RequestMapping("basic/print")
public class PrintController {
    @Resource
    private PrintManager reportManager;
    @Resource
    private InoutRecordService inoutRecordService;
    /**
     * èŽ·å–å‡ºåº“ç§°é‡æ‰“å°å•
     *
     * @param data
     * @return
     */
    @RequestMapping("/bill-weight")
    public PageResponse<String> inoutWeightBill(@RequestBody InoutData data) {
        try {
            InoutParam inoutParam = new InoutParam();
            inoutParam.setId(data.getId());
            InoutRecord inoutData = inoutRecordService.selectOne(inoutParam);
            if (inoutData.getProgress().equals(Constant.PROGRESS_WEIGHT_FULL)
                    || inoutData.getProgress().equals(Constant.PROGRESS_WEIGHT_EMPTY)
                    || inoutData.getProgress().equals(Constant.PROGRESS_HANDLE)) {
                return new PageResponse<>(RespCodeEnum.CODE_1008.getCode(), "操作异常:" + "请先完成称重");
            }
            String html;
            if (Constant.TYPE_IN.equals(data.getType())) {
                html = reportManager.inWeightBill(inoutData);
            } else {
                html = reportManager.outWeightBill(inoutData);
            }
            return new PageResponse<>(RespCodeEnum.CODE_0000, html);
        } catch (Exception e) {
            log.error("后台异常:{}", e);
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                    "后台异常:" + e.getMessage());
        }
    }
}
fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/snapRecord/SnapRecordController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,60 @@
package com.fzzy.sys.controller.snapRecord;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fzzy.igds.constant.RespCodeEnum;
import com.fzzy.igds.data.IgdsBaseParam;
import com.fzzy.igds.data.PageResponse;
import com.fzzy.igds.domain.SnapRecord;
import com.fzzy.sys.manager.snapRecord.SnapRecordManager;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
@Slf4j
@Controller
@RequestMapping("/snapRecord")
public class SnapRecordController {
    private static final String prefix = "snapRecord";
    @Resource
    private SnapRecordManager snapRecordManager;
    @GetMapping
    public String getSnapRecord(
            Model model) {
        IgdsBaseParam param = new IgdsBaseParam();
        param.setPage(1);
        param.setLimit(6);
        Page<SnapRecord> images = snapRecordManager.pageData(param);
        model.addAttribute("snapRecordList", images.getRecords());
        model.addAttribute("currentPage", images.getCurrent());
        model.addAttribute("totalItems", images.getTotal());
        model.addAttribute("pageSize", images.getSize());
        return prefix + "/snapRecord";
    }
    /**
     * åˆ†é¡µèŽ·å–æ•°æ®
     *
     * @param param
     * @return
     */
    @RequestMapping("/pageData")
    @ResponseBody
    public PageResponse<Page<SnapRecord>> pageData(@RequestBody IgdsBaseParam param) {
        Page<SnapRecord> snapRecordPage = snapRecordManager.pageData(param);
        if (null == snapRecordPage.getRecords() || snapRecordPage.getRecords().isEmpty()) {
            return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(), "获取到数据信息为空");
        }
        return new PageResponse<>(RespCodeEnum.CODE_0000, snapRecordPage);
    }
}
fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/eventInfo/EventInfoManager.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,42 @@
package com.fzzy.sys.manager.eventInfo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fzzy.igds.data.IgdsBaseParam;
import com.fzzy.igds.domain.EventInfo;
import com.fzzy.igds.service.EventInfoService;
import com.fzzy.igds.utils.ContextUtil;
import com.ruoyi.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.ArrayList;
@Slf4j
@Component
public class EventInfoManager {
    @Resource
    private EventInfoService eventInfoService;
    /**
     * åˆ†é¡µæŸ¥è¯¢æ•°æ®
     *
     * @param param
     * @return
     */
    public Page<EventInfo> pageData(IgdsBaseParam param) {
        if (StringUtils.isEmpty(param.getCompanyId())) {
            param.setCompanyId(ContextUtil.getCompanyId());
        }
        Page<EventInfo> corePage = new Page<>(param.getPage(), param.getLimit());
        eventInfoService.listPage(corePage, param);
        if (null == corePage.getRecords() || corePage.getRecords().isEmpty()) {
            return corePage.setRecords(new ArrayList<>());
        }
        return corePage;
    }
}
fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/file/FileManager.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,133 @@
package com.fzzy.sys.manager.file;
import com.fzzy.igds.constant.RespCodeEnum;
import com.fzzy.igds.data.PageResponse;
import com.fzzy.igds.domain.Dept;
import com.fzzy.igds.service.CoreDeptService;
import com.fzzy.igds.service.FileService;
import com.fzzy.igds.utils.ContextUtil;
import com.ruoyi.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Date;
/**
 * @Description å‡ºå…¥åº“设备相关功能
 * @Author CZT
 * @Date 2025/12/4 9:27
 */
@Slf4j
@Component("file.fileManager")
public class FileManager {
    @Resource
    private CoreDeptService coreDeptService;
    @Resource
    private FileService fileService;
    /**
     * æ ¹æ®å•位ID获取单位信息
     *
     * @param deptId
     * @return
     */
    public String getDeptFile(String deptId) {
        if (StringUtils.isEmpty(deptId)) {
            return null;
        }
        String imgBathPath = "未上传";
        Dept dept = coreDeptService.getDeptById(deptId);
        if (StringUtils.isNotEmpty(dept.getImgName())) {
            File imgFile = new File(dept.getImgName());
            if (imgFile.exists()) {
                imgBathPath = dept.getImgName();
            }
        }
        return imgBathPath;
    }
    /**
     * å‡ºå…¥åº“的附件上次,参数是车牌号
     *
     * @param file
     * @return
     * @throws IOException
     */
    public PageResponse<String> upLoadInoutHandleImg(MultipartFile file, String plateNum)
            throws IOException {
        log.debug("上传出入库的附件……");
        // èŽ·å–é»˜è®¤ç¼–ç çš„å­—èŠ‚æ•°ç»„
        byte[] fileByte = file.getBytes();
        // èŽ·å–æ–‡ä»¶çš„æºæ–‡ä»¶åç§°
        String oldFileName = file.getOriginalFilename();
        // èŽ·å–æ–‡ä»¶ä¿å­˜è·¯å¾„
        String filePath = fileService.getFileSavePath("INOUT");
        // èŽ·å–æ–°çš„ID
        String newFileName = ContextUtil.generateId();
        // æ–‡ä»¶åŽç¼€å
        String suffixName = oldFileName.substring(oldFileName.lastIndexOf("."));
        // åˆæˆæ–°çš„æ–‡ä»¶å
        if (StringUtils.isEmpty(plateNum)) {
            newFileName = newFileName + suffixName;
        } else {
            newFileName = plateNum + "_" + newFileName + suffixName;
        }
        // æ–‡ä»¶ä¸Šä¼ 
        boolean flag = uploadFile(fileByte, filePath, newFileName);
        // åˆ¤æ–­æ–‡ä»¶ä¸Šä¼ æ˜¯å¦æˆåŠŸ,成功返回文件名
        if (flag) {
            return new PageResponse<String>(RespCodeEnum.CODE_0000.getCode(),
                    newFileName);
        } else {
            return new PageResponse<String>(RespCodeEnum.CODE_1111.getCode(),
                    "上传失败");
        }
    }
    /**
     * æ–‡ä»¶æµä¸Šä¼ æ–‡ä»¶
     *
     * @param file
     * @param filePath
     * @param fileName
     * @return
     */
    private static boolean uploadFile(byte[] file, String filePath, String fileName) throws IOException {
        // é»˜è®¤æ–‡ä»¶ä¸Šä¼ æˆåŠŸ
        boolean flag = true;
        // new一个文件对象实例
        File targetFile = new File(filePath);
        // å¦‚果当前文件目录不存在就自动创建该文件或者目录
        if (!targetFile.exists()) {
            targetFile.mkdirs();
        }
        // åˆ›å»ºæ–‡ä»¶æµ
        FileOutputStream fileOutputStream = new FileOutputStream(filePath + fileName);
        try {
            fileOutputStream.write(file);
        } catch (FileNotFoundException e) {
            flag = false;
        } catch (IOException ioException) {
            flag = false;
        } finally {
            fileOutputStream.flush();
            fileOutputStream.close();
        }
        return flag;
    }
}
fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/inout/InoutManager.java
@@ -3,22 +3,18 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fzzy.igds.constant.Constant;
import com.fzzy.igds.constant.RespCodeEnum;
import com.fzzy.igds.data.IgdsBaseParam;
import com.fzzy.igds.data.InoutParam;
import com.fzzy.igds.data.NoticeParam;
import com.fzzy.igds.data.PageResponse;
import com.fzzy.igds.data.*;
import com.fzzy.igds.domain.*;
import com.fzzy.igds.service.DicAreaService;
import com.fzzy.igds.service.InoutConfService;
import com.fzzy.igds.service.InoutNoticeService;
import com.fzzy.igds.service.InoutRecordService;
import com.fzzy.igds.service.*;
import com.fzzy.igds.utils.ContextUtil;
import com.fzzy.igds.utils.SystemUtil;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.redis.RedisCache;
import lombok.extern.slf4j.Slf4j;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
@@ -36,6 +32,8 @@
    private RedisCache redisCache;
    @Resource
    private InoutConfService inoutConfService;
    @Resource
    private FileService fileService;
    @Resource
    private InoutRecordService inoutRecordService;
    @Resource
@@ -125,6 +123,7 @@
    /**
     * æ ¹æ®é…ç½®èŽ·å–å‡ºå…¥åº“çš„é…ç½®å‚æ•°
     *
     * @param listInoutConf
     * @param type
     * @return
@@ -142,6 +141,7 @@
    /**
     * æ ¹æ®é…ç½®èŽ·å–å‡ºå…¥åº“çš„é…ç½®å‚æ•°
     *
     * @param listInoutConf
     * @param sort
     * @param type
@@ -179,18 +179,17 @@
    }
    /**
     * å‡ºå…¥åº“注册数据提交,出入库登记使用同一个方法
     * å‡ºå…¥åº“注册数据提交,出入库登记使用同一个方法,包含称重时直接登记
     *
     * @param data
     * @return
     */
    public PageResponse<InoutRecord> submitRegister(InoutRecord data) {
        SysUser user = ContextUtil.getLoginUser();
    public PageResponse<InoutData> submitRegister(InoutData data) {
        if (StringUtils.isEmpty(data.getCompanyId())) {
            data.setCompanyId(user.getCompanyId());
            data.setCompanyId(ContextUtil.getCompanyId());
        }
        if (StringUtils.isEmpty(data.getDeptId())) {
            data.setDeptId(ContextUtil.subDeptId(user));
            data.setDeptId(ContextUtil.subDeptId(null));
        }
        int num = inoutRecordService.checkExist(data.getCompanyId(), data.getPlateNum());
@@ -218,7 +217,7 @@
            data.setUserName(data.getUserName().trim());
        }
        //登记人及登记时间
        data.setRegisterUser(user.getUserName());
        data.setRegisterUser(ContextUtil.getLoginUserName());
        data.setRegisterTime(new Date());
        num = inoutRecordService.addInoutRecord(data);
@@ -227,22 +226,19 @@
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "登记失败!", data);
        }
        //TODO é™„件处理
//        List<FileData> files = data.getFiles();
//        if (null != files && files.size() > 0) {
//            // æ‰§è¡Œé™„件信息
//            fileService.saveInoutFiles(files, data.getCompanyId(), data.getId(), curProgress);
//        }
        //附件处理
        fileService.saveInoutFiles(data.getFiles(), data.getId(), curProgress, "INOUT");
        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "登记成功!", data);
    }
    /**
     * åŒ–验信息提交
     *
     * @param data
     * @return
     */
    public PageResponse<InoutRecord> submitCheck(InoutRecord data) {
    public PageResponse<InoutData> submitCheck(InoutData data) {
        SysUser user = ContextUtil.getLoginUser();
        if (StringUtils.isEmpty(data.getCompanyId())) {
            data.setCompanyId(user.getCompanyId());
@@ -267,12 +263,25 @@
    /**
     * ç§°é‡æäº¤ï¼ŒåŒ…含称重登记提交及单独称重提交
     *
     * @param data
     * @return
     */
    public PageResponse<InoutRecord> submitWeight(InoutRecord data) {
    public PageResponse<InoutData> submitWeight(InoutData data) {
        if (Constant.PROGRESS_WEIGHT_EMPTY.equals(data.getProgress())) {
            data.setEmptyWeightTime(new Date());
            data.setEmptyWeightUser(ContextUtil.getLoginUserName());
        }
        if (Constant.PROGRESS_WEIGHT_FULL.equals(data.getProgress())) {
            data.setFullWeightTime(new Date());
            data.setFullWeightUser(ContextUtil.getLoginUserName());
        }
        if (StringUtils.isBlank(data.getId())) {
            //表示称重时直接登记
            return submitRegister(data);
        }
        // èŽ·å–ç³»ç»Ÿå‚æ•°é…ç½®
        //获取系统参数配置
        InoutSysConf inoutSysConf = inoutConfService.getCacheInoutSysConf(data.getCompanyId(), data.getDeptId());
        if (null == inoutSysConf) {
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "提示:当前系统中流程配置异常,请联系管理员", data);
@@ -283,55 +292,31 @@
        String nextProgress = getNextProgress(curProgress, data.getType(), inoutSysConf);
        data.setProgress(nextProgress);
        int num;
        if(StringUtils.isBlank(data.getId())){
            data.setRegisterTime(new Date());
            data.setRegisterUser(ContextUtil.getLoginUserName());
            //设置初次提交时称重时间信息
            if(data.getFullWeight() > 0){
                data.setFullWeightUser(ContextUtil.getLoginUserName());
                data.setFullWeightTime(new Date());
            }
            if(data.getEmptyWeight() > 0){
                data.setEmptyWeightUser(ContextUtil.getLoginUserName());
                data.setEmptyWeightTime(new Date());
            }
            //称重登记
            num = inoutRecordService.addInoutRecord(data);
        }else {
            if (Constant.PROGRESS_WEIGHT_EMPTY.equals(curProgress)) {
                data.setEmptyWeightTime(new Date());
                data.setEmptyWeightUser(ContextUtil.getLoginUserName());
            }
            if (Constant.PROGRESS_WEIGHT_FULL.equals(curProgress)) {
                data.setFullWeightTime(new Date());
                data.setFullWeightUser(ContextUtil.getLoginUserName());
            }
            //称重更新
            num = inoutRecordService.updateInoutRecord(data);
        if(Constant.PROGRESS_RECORD.equals(nextProgress)){
            //流程结束时,设置完成时间和完成人
            data.setCompleteTime(new Date());
            data.setCompleteUser(ContextUtil.getLoginUserName());
        }
        //称重数据更新
        int num = inoutRecordService.updateInoutRecord(data);
        if (num == 0) {
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "提交失败!", data);
        }
        //TODO é™„件处理
//        List<FileData> files = data.getFiles();
//        if (null != files && files.size() > 0) {
//            // æ‰§è¡Œé™„件信息
//            fileService.saveInoutFiles(files, data.getCompanyId(), data.getId(), curProgress);
//        }
        //附件处理
        fileService.saveInoutFiles(data.getFiles(), data.getId(), curProgress, "INOUT");
        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "执行成功", data);
    }
    /**
     * å€¼ä»“信息提交
     *
     * @param data
     * @return
     */
    public PageResponse<InoutRecord> submitHandle(InoutRecord data) {
    public PageResponse<InoutData> submitHandle(InoutData data) {
        // èŽ·å–ç³»ç»Ÿå‚æ•°é…ç½®
        InoutSysConf inoutSysConf = inoutConfService.getCacheInoutSysConf(data.getCompanyId(), data.getDeptId());
@@ -353,12 +338,8 @@
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "提交失败!", data);
        }
        //TODO é™„件处理
//        List<FileData> files = data.getFiles();
//        if (null != files && files.size() > 0) {
//            // æ‰§è¡Œé™„件信息
//            fileService.saveInoutFiles(files, data.getCompanyId(), data.getId(), curProgress);
//        }
        //附件处理
        fileService.saveInoutFiles(data.getFiles(), data.getId(), curProgress, "INOUT");
        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "提交成功", data);
    }
@@ -393,6 +374,7 @@
    /**
     * åˆ†é¡µæŸ¥è¯¢æ•°æ®
     *
     * @param param
     * @return
     */
@@ -403,6 +385,8 @@
        if (StringUtils.isEmpty(param.getDeptId())) {
            param.setDeptId(ContextUtil.subDeptId(null));
        }
        param.setProgressTag(Constant.PROGRESS_RECORD);
        Page<InoutRecord> corePage = new Page<>(param.getPage(), param.getLimit());
        inoutRecordService.listPageInout(corePage, param);
@@ -415,7 +399,8 @@
    }
    /**
     * åˆ†é¡µæŸ¥è¯¢æ•°æ®
     * æŸ¥è¯¢å¾…称重的数据
     *
     * @param param
     * @return
     */
@@ -440,16 +425,54 @@
    }
    /**
     * æŸ¥è¯¢å¾…值仓的数据
     *
     * @param param
     * @return
     */
    public PageResponse<List<InoutRecord>> listHandleData(InoutParam param) {
        if (StringUtils.isEmpty(param.getCompanyId())) {
            param.setCompanyId(ContextUtil.getCompanyId());
        }
        if (StringUtils.isEmpty(param.getDeptId())) {
            param.setDeptId(ContextUtil.subDeptId(null));
        }
        List<InoutRecord> inoutRecords = inoutRecordService.listInout(param);
        if (null == inoutRecords || inoutRecords.isEmpty()) {
            return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(), "获取到数据信息为空");
        }
        return new PageResponse<>(RespCodeEnum.CODE_0000, inoutRecords);
    }
    /**
     * æŸ¥è¯¢æ•°æ®
     *
     * @param param
     * @return
     */
    public PageResponse<InoutRecord> inoutQuery(InoutParam param) {
        if (StringUtils.isEmpty(param.getId())) {
        if (StringUtils.isEmpty(param.getId()) && StringUtils.isEmpty(param.getPlateNum())) {
            return new PageResponse<>(RespCodeEnum.CODE_1007.getCode(), "查询参数不完整,查询失败!");
        }
        if (StringUtils.isEmpty(param.getCompanyId())) {
            param.setCompanyId(ContextUtil.getCompanyId());
        }
        if (StringUtils.isEmpty(param.getDeptId())) {
            param.setDeptId(ContextUtil.subDeptId(null));
        }
        InoutRecord result = inoutRecordService.selectById(param.getId());
        if(Constant.PROGRESS_WEIGHT_EMPTY.equals(param.getProgress()) || Constant.PROGRESS_WEIGHT_FULL.equals(param.getProgress())){
            //设置查询待称重的
            param.setProgress(null);
            //设置称重流程标记
            param.setWeightTag("WEIGHT");
        }
        InoutRecord result = inoutRecordService.selectOne(param);
        if (null == result) {
            return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(),
                    "系统未查询到执行中的单据信息", null);
@@ -459,6 +482,7 @@
    /**
     * åˆ†é¡µèŽ·å–åŒºåˆ’ä¿¡æ¯
     *
     * @param param
     * @return
     */
@@ -475,7 +499,6 @@
    }
    /**
     *
     * @param param
     * @return
     */
@@ -486,8 +509,8 @@
            param.setCompanyId(user.getCompanyId());
        }
        param.setDeptId(ContextUtil.subDeptId(user));
        List<InoutNoticeIn> list = inoutNoticeService.getNoticeIn(param.getCompanyId(), param.getDeptId(),Constant.COMPLETE_STATUS_NONE);
        param.setCompleteStatus(Constant.COMPLETE_STATUS_NONE);
        List<InoutNoticeIn> list = inoutNoticeService.getNoticeIn(param);
        if (null == list || list.isEmpty()) {
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "查询结果为空!");
@@ -497,7 +520,6 @@
    }
    /**
     *
     * @param param
     * @return
     */
@@ -507,8 +529,8 @@
            param.setCompanyId(user.getCompanyId());
        }
        param.setDeptId(ContextUtil.subDeptId(user));
        List<InoutNoticeOut> list = inoutNoticeService.getNoticeOut(param.getCompanyId(), param.getDeptId(),Constant.COMPLETE_STATUS_NONE);
        param.setCompleteStatus(Constant.COMPLETE_STATUS_NONE);
        List<InoutNoticeOut> list = inoutNoticeService.getNoticeOut(param);
        if (null == list || list.isEmpty()) {
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "查询结果为空!");
fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/print/PrintManager.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,40 @@
package com.fzzy.sys.manager.print;
import com.fzzy.igds.domain.InoutRecord;
import com.fzzy.igds.service.InoutRecordService;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/**
 * @Description å•据打印
 * @Author CZT
 * @Date 2025/12/4 9:27
 */
@Component
public class PrintManager {
    @Resource
    private InoutRecordService inoutRecordService;
    /**
     * èŽ·å–å…¥åº“è¿‡ç£…å•æ•°æ®ä¿¡æ¯
     *
     * @param data
     * @return
     */
    public String inWeightBill(InoutRecord data) {
        return inoutRecordService.inWeightBill( data);
    }
    /**
     * èŽ·å–å‡ºåº“è¿‡ç£…å•
     *
     * @param data
     * @return
     */
    public String outWeightBill(InoutRecord data) {
        return inoutRecordService.outWeightBill( data);
    }
}
fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/snapRecord/SnapRecordManager.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,42 @@
package com.fzzy.sys.manager.snapRecord;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fzzy.igds.data.IgdsBaseParam;
import com.fzzy.igds.domain.SnapRecord;
import com.fzzy.igds.service.SnapRecordService;
import com.fzzy.igds.utils.ContextUtil;
import com.ruoyi.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.ArrayList;
@Slf4j
@Component
public class SnapRecordManager {
    @Resource
    private SnapRecordService snapRecordService;
    /**
     * åˆ†é¡µæŸ¥è¯¢æ•°æ®
     *
     * @param param
     * @return
     */
    public Page<SnapRecord> pageData(IgdsBaseParam param) {
        if (StringUtils.isEmpty(param.getCompanyId())) {
            param.setCompanyId(ContextUtil.getCompanyId());
        }
        Page<SnapRecord> corePage = new Page<>(param.getPage(), param.getLimit());
        snapRecordService.listPage(corePage, param);
        if (null == corePage.getRecords() || corePage.getRecords().isEmpty()) {
            return corePage.setRecords(new ArrayList<>());
        }
        return corePage;
    }
}
fzzy-igdss-web/src/main/resources/static/eventInfo/eventInfo-style.css
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,201 @@
/* å›¾ç‰‡é¢„览层样式 */
.img-preview {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.preview-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}
.preview-img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
.close-preview {
    position: absolute;
    top: -40px;
    right: -10px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}
.close-preview:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}
/* å›¾ç‰‡ç½‘格样式 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 15px;
}
.gallery-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}
.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}
.gallery-img {
    width: 100%;
    height: 195px;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.3s ease;
}
.gallery-img:hover {
    opacity: 0.95;
}
.gallery-info {
    padding: 15px;
}
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.gallery-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gallery-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.meta-item {
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    color: #666;
}
.meta-item i {
    width: 16px;
    margin-right: 6px;
    color: #999;
    font-size: 1.25rem;
}
.gallery-filename i {
    margin-right: 5px;
    font-size: 0.7rem;
}
/* æ ‡ç­¾æ ·å¼ */
.gallery-tags {
    display: flex;
    flex-wrap: wrap;
    /*gap: 8px;*/
    /*margin: 12px 0;*/
}
/* åˆ†é¡µæ ·å¼ */
.pagination-container {
    display: flex;
    justify-content: center;
    /*margin-top: 40px;*/
}
/* ç©ºçŠ¶æ€æ ·å¼ */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
}
.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #ddd;
}
.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #666;
}
/* å“åº”式设计 */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
}
@media (max-width: 768px) {
    .main-nav li {
        margin: 0 10px;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    .gallery-img {
        height: 180px;
    }
}
@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-img {
        height: 200px;
    }
}
fzzy-igdss-web/src/main/resources/static/eventInfo/eventInfo.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,278 @@
var layer;
var laypage;
$(function () {
    // åˆå§‹åŒ–分页
    layui.use(['laypage', 'layer'], function () {
        layer = layui.layer;
        laypage = layui.laypage;
        // åˆå§‹åŒ–分页组件
        initPagination();
    });
    // åˆå§‹åŒ–图片预览功能
    initImagePreview();
});
/**
 * åˆå§‹åŒ–分页组件
 */
function initPagination() {
    laypage.render({
        elem: 'pagination',
        count: typeof totalItems !== 'undefined' ? totalItems : 0,
        limit: typeof pageSize !== 'undefined' ? pageSize : 6,
        curr: typeof currentPage !== 'undefined' ? currentPage : 1,
        layout: ['count', 'prev', 'page', 'next', 'refresh', 'skip'],
        jump: function (obj, first) {
            if (!first) {
                searchRecord(obj.curr, obj.limit)
            }
        }
    });
}
/**
 * é‡æ–°åˆå§‹åŒ–分页组件
 * @param {number} totalCount - æ€»è®°å½•æ•°
 * @param {number} pageSize - æ¯é¡µå¤§å°
 * @param {number} currentPage - å½“前页码
 */
function reinitPagination(totalCount, pageSize, currentPage) {
    laypage.render({
        elem: 'pagination',
        count: totalCount,
        limit: pageSize,
        curr: currentPage,
        layout: ['count', 'prev', 'page', 'next', 'refresh', 'skip'],
        jump: function (obj, first) {
            if (!first) {
                searchRecord(obj.curr, obj.limit)
            }
        }
    });
}
/**
 * èŽ·å–äº‹ä»¶è®°å½•æ•°æ®
 * @param {Object} params - æŸ¥è¯¢å‚数对象
 * @param {Function} callback - å›žè°ƒå‡½æ•°
 */
function fetchEventInfoData(params, callback) {
    $.ajax({
        url: '../../eventInfo/pageData',
        type: 'POST',
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(params),
        success: function (response) {
            if (response.code === '0000') {
                callback(null, response.data);
            } else {
                callback(new Error(response.msg || '数据加载失败'), null);
            }
        },
        error: function (xhr, status, error) {
            callback(new Error('请求失败,请稍后重试'), null);
        }
    });
}
/**
 * æž„建查询参数
 * @param {number} page - é¡µç 
 * @param {number} size - æ¯é¡µå¤§å°
 * @returns {Object} æŸ¥è¯¢å‚数对象
 */
function buildQueryParams(page, size) {
    var params = {
        page: page,
        limit: size
    };
    // æ·»åŠ è¡¨å•æŸ¥è¯¢æ¡ä»¶
    var form = document.getElementById('eventInfo-form');
    if (form) {
        var inputs = form.querySelectorAll('input[name], select[name]');
        inputs.forEach(function(input) {
            if (input.value) { // åªæ·»åŠ éžç©ºå€¼
                params[input.name] = input.value;
            }
        });
    }
    return params;
}
/**
 * æ›´æ–°äº‹ä»¶ç”»å»Šå†…容
 * @param {Array} records - äº‹ä»¶è®°å½•数据
 */
function updateGallery(records) {
    var container = document.getElementById('gallery-container');
    if (!container) return;
    // æ¸…空现有内容
    container.innerHTML = '';
    if (!records || records.length === 0) {
        // æ˜¾ç¤ºç©ºçŠ¶æ€
        container.innerHTML = `
            <div class="empty-state">
                <i class="fa-solid fa-bell-slash"></i>
                <h3>暂无事件记录</h3>
                <p>当前没有可展示的AI事件数据</p>
            </div>
        `;
        // éšè—åˆ†é¡µ
        $('.pagination-container').hide();
        return;
    }
    // æ˜¾ç¤ºåˆ†é¡µ
    $('.pagination-container').show();
    // ç”Ÿæˆäº‹ä»¶å¡ç‰‡
    var html = '';
    records.forEach(function(record) {
        html += `
            <div class="gallery-item">
                <img src="/logo-sm.png" alt="${record.id}"
                     data-url="/logo-sm.png" data-id="${record.id}"
                     class="gallery-img" onclick="showEventInfoPreview(this.getAttribute('data-url'))">
                <div class="gallery-info">
                    <div class="gallery-header">
                        <h3 class="gallery-title">${record.name || record.id}</h3>
                    </div>
                    <div class="gallery-meta">
                        <div class="meta-item">
                            <i class="layui-icon layui-icon-home"></i>
                            <span>${record.deptId || ''}</span>
                        </div>
                        <div class="meta-item">
                            <i class="layui-icon layui-icon-video"></i>
                            <span>${record.serId || ''}</span>
                        </div>
                        <div class="meta-item">
                            <i class="layui-icon layui-icon-date"></i>
                            <span>${formatDate(record.time)}</span>
                        </div>
                    </div>
                    <div class="gallery-tags">
                        <span class="tag-person">
                            <i class="layui-icon layui-icon-face-smile"></i>
                            <span>${record.level || '未知'}</span>
                        </span>
                    </div>
                </div>
            </div>
        `;
    });
    container.innerHTML = html;
}
/**
 * æ ¼å¼åŒ–日期
 * @param {string|number} date - æ—¥æœŸå­—符串或时间戳
 */
function formatDate(date) {
    if (!date) return '';
    var d = new Date(date);
    return d.getFullYear() + '-' +
        String(d.getMonth() + 1).padStart(2, '0') + '-' +
        String(d.getDate()).padStart(2, '0') + ' ' +
        String(d.getHours()).padStart(2, '0') + ':' +
        String(d.getMinutes()).padStart(2, '0') + ':' +
        String(d.getSeconds()).padStart(2, '0');
}
/**
 * åˆå§‹åŒ–图片预览功能
 */
function initImagePreview() {
    var preview = document.getElementById('imgPreview');
    var previewImg = document.getElementById('previewImg');
    var closeBtn = document.getElementById('closePreview');
    // å¦‚果预览元素不存在,则不初始化
    if (!preview || !previewImg) {
        return;
    }
    // å…³é—­æŒ‰é’®ç‚¹å‡»äº‹ä»¶
    if (closeBtn) {
        closeBtn.addEventListener('click', closePreview);
    }
    // ç‚¹å‡»é¢„览区域外关闭
    preview.addEventListener('click', function (e) {
        if (e.target === preview) {
            closePreview();
        }
    });
    // é”®ç›˜äº‹ä»¶ç›‘听
    document.addEventListener('keydown', function (e) {
        if (e.key === 'Escape' && preview.style.display === 'flex') {
            closePreview();
        }
    });
    // å…³é—­é¢„览函数
    function closePreview() {
        preview.style.display = 'none';
        previewImg.src = '';
    }
}
/**
 * æ˜¾ç¤ºå›¾ç‰‡é¢„览
 * @param {string} imgUrl å›¾ç‰‡URL
 */
function showEventInfoPreview(imgUrl) {
    var preview = document.getElementById('imgPreview');
    var previewImg = document.getElementById('previewImg');
    if (preview && previewImg) {
        previewImg.src = imgUrl;
        preview.style.display = 'flex';
    }
}
/**
 * è¯»å–事件记录
 */
function searchRecord(page , size) {
    var pageNumber = 1;
    var sizeNumber = 6;
    if (pageSize && pageSize > 0){
        size = pageSize;
    }
    if (size && size > 0){
        sizeNumber = size;
    }
    if (page && page > 0){
        pageNumber = page;
    }
    // æž„造查询参数,从第一页开始
    var queryParams = buildQueryParams(pageNumber, sizeNumber);
    // æ˜¾ç¤ºloading
    var loadingIndex = layer.load(1, {shade: [0.1, '#fff']});
    // è°ƒç”¨æ•°æ®è¯·æ±‚方法
    fetchEventInfoData(queryParams, function(error, data) {
        // å…³é—­loading
        layer.close(loadingIndex);
        if (error) {
            layer.msg(error.message);
            return;
        }
        // æ›´æ–°é¡µé¢æ•°æ®
        updateGallery(data.records);
        // é‡æ–°åˆå§‹åŒ–分页组件
        reinitPagination(data.total, data.size, data.current);
    });
}
fzzy-igdss-web/src/main/resources/static/inout/inout-check.js
fzzy-igdss-web/src/main/resources/static/inout/inout-handle.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,386 @@
//称重-包括空车和满车称重
var layer;
var form;
var table;
var upload;
var recordData = null;// ä¸šåŠ¡æ•°æ®ä¿¡æ¯
var img1, img2, img3;// é¡µé¢ä¸­çš„图片上传名称
$(function () {
    layui.use(['layer', 'laydate', 'form','table', 'upload'], function () {
        upload = layui.upload;
        layer = layui.layer;
        form = layui.form;
        table = layui.table;
        //监听选择数据事件
        table.on('tool(tableListProgressData)', function (obj) {
            var data = obj.data;
            if (obj.event === 'select') {
                //清空表单
                resetForm();
                flushData(data.id, null);
                $("#listProgressData").css("display", "none");
                layer.closeAll();
            }
        });
        //上传
        upload.render({
            elem: '#kccz-r-btn1',
            url: '/basic/file/update-file', //上传接口
            size: 4 * 1024, //限制文件大小,单位KB, æœ€å¤§ä¸Šä¼ 4MB
            accept: 'images',
            before: function (obj) {
                var plateNum = $("#plateNum").val();
                this.data = {"plateNum": plateNum, "type": "1"};//携带参数
                //预读本地文件示例,不支持ie8
                obj.preview(function (index, file, result) {
                    $('#kccz-r-img1').attr('src', result); //图片链接(base64)
                });
            },
            done: function (res) {
                //如果上传失败
                if (res.code > 0) {
                    layer.msg("图片上传失败!");
                }
                //上传成功
                img1 = res.msg;
                layer.msg("图片上传成功!");
                //console.log(img1);
            }
        });
        upload.render({
            elem: '#kccz-r-btn2',
            url: '/basic/file/update-file', //上传接口
            size: 4 * 1024, //限制文件大小,单位KB, æœ€å¤§ä¸Šä¼ 4MB
            accept: 'images',
            before: function (obj) {
                var plateNum = $("#plateNum").val();
                this.data = {"plateNum": plateNum, "type": "1"};//携带参数
                //预读本地文件示例,不支持ie8
                obj.preview(function (index, file, result) {
                    $('#kccz-r-img2').attr('src', result); //图片链接(base64)
                });
            },
            done: function (res) {
                //如果上传失败
                if (res.code > 0) {
                    layer.msg("图片上传失败!");
                }
                //上传成功
                img2 = res.msg;
                layer.msg("图片上传成功!");
                // console.log(img2);
            }
        });
        upload.render({
            elem: '#kccz-r-btn3',
            url: '/basic/file/update-file', //上传接口
            size: 4 * 1024, //限制文件大小,单位KB, æœ€å¤§ä¸Šä¼ 4MB
            accept: 'images',
            before: function (obj) {
                var plateNum = $("#plateNum").val();
                this.data = {"plateNum": plateNum}; //携带参数
                //预读本地文件示例,不支持ie8
                obj.preview(function (index, file, result) {
                    $('#kccz-r-img3').attr('src', result); //图片链接(base64)
                });
            },
            done: function (res) {
                //如果上传失败
                if (res.code > 0) {
                    layer.msg("图片上传失败!");
                }
                //上传成功
                img3 = res.msg;
                layer.msg("图片上传成功!");
            }
        });
    });
    //显示流程环节
    updateEditAndProgress();
});
/**
 * æ‰‹åŠ¨é€‰æ‹©ï¼ŒèŽ·å–å¾…ç§°é‡çš„æ•°æ®ï¼Œå¼¹å‡ºé€‰æ‹©
 */
function selectByHand() {
    var param = {
        deptId: deptId,
        type: type,
        progress: curProgress,
        timer: Math.random()
    };
    $.ajax({
        type: "POST",
        url: "/basic/inout/list-handle-data",
        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("系统获取数据出现异常,重新尝试");
        }
    });
}
/**
 * è½¦è¾†é€‰æ‹©å¼¹çª—
 * @param list
 */
function renderTableProgressData(list) {
    // æ¸…空数据
    $("#tableListProgressData").empty();
    layer.open({
        type: 1,
        title: "选择值仓中车辆",
        offset: ['240px', '100px'],
        area: ['1000px', '560px'],
        cancel: function (index, layero) {
            $("#listProgressData").css("display", "none");
        },
        shade: 0,
        scrollbar: 0,
        content: $('#listProgressData'),
        closeBtn: 1
    });
    table.render({
        elem: '#tableListProgressData',
        data: list,
        page: false,
        even: true,
        cols: [[
            {
                type: 'numbers',
                title: '序号'
            }, {
                field: 'id',
                title: '单据号',
                align: 'center'
            }, {
                field: 'userName',
                title: '承运人',
                align: 'center'
            }, {
                field: 'plateNum',
                title: '车牌号',
                align: 'center'
            }, {
                field: 'progress',
                title: '流程进度',
                align: 'center',
                style: 'font-weight: bold',
                templet: function (item) {
                    return INOUT_PROGRESS_MSG(item.progress);
                }
            }, {
                fixed: 'right',
                title: '选择操作',
                align: 'center',
                toolbar: '#barSelectProgress'
            }
        ]]
    });
    $("thead tr").css({
        "border-bottom": "2px solid #53adce",
        "background": "#eff4f6"
    });
}
// è¡¨å•清空
function resetForm() {
    $("#form-data")[0].reset();
    $('#kccz-r-img1').removeAttr('src');
    $('#kccz-r-img2').removeAttr('src');
    $('#kccz-r-img3').removeAttr('src');
    form.render();
    recordData = null;
    $("#text-param").val(null);
}
/**
 * é¡µé¢åˆ·æ–°
 */
function flushPage() {
    layer.confirm('确定要刷新页面吗?', {icon: 3, title: '提示'}, function (index) {
        resetForm();
        layer.close(index);
    });
}
/**
 * æŸ¥è¯¢æ•°æ®
 * @param id
 * @param plateNum
 */
function flushData(id, plateNum) {
    var index = layer.load();
    var param = {
        type: type,
        progress: curProgress,
        id: id,
        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 submit() {
    if (!recordData) {
        alertError("没有业务数据信息,执行被拒绝");
        return;
    }
    var data = form.val("form-data");
    //合并数据
    Object.assign(recordData, data);
    // èŽ·å–ç…§ç‰‡
    var files = [{
        fileName: img1
    }, {
        fileName: img2
    }, {
        fileName: img3
    }];
    recordData.files = files;
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "/basic/inout/submit-handle",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(recordData),
        success: function (result) {
            layer.close(index);
            if (result.code != "0000") {
                notify(result.msg, result.data);
            } else {
                notify("数据提交成功", result.data);
                resetForm();
            }
        },
        error: function () {
            layer.close(index);
            alertError("提交失败,请重新尝试");
        }
    });
}
/**
 * æ ¹æ®ä¸šåŠ¡æ•°æ®æ›´æ–°é¡µé¢ä¸­çš„çŠ¶æ€
 */
function updateEditAndProgress() {
    //显示当前流程
    if (type === "IN") {
        $("#rk-progress-register").addClass("active");
        $("#rk-progress-fullWeight").addClass("active");
        $("#rk-progress-hand").addClass("active");
        $("#rk-progress-emptyWeight").removeClass("active");
    }
    if (type === "OUT") {
        $("#ck-progress-register").addClass("active");
        $("#ck-progress-emptyWeight").addClass("active");
        $("#ck-progress-hand").addClass("active");
        $("#ck-progress-fullWeight").removeClass("active");
    }
    //流程显示
    if (inoutProgress) {
        if (inoutProgress.indexOf("REGISTER") === -1) {
            $("#rk-progress-register").css("display", "none");
            $("#ck-progress-register").css("display", "none");
        }
        if (inoutProgress.indexOf("WEIGHT_FULL") === -1) {
            $("#rk-progress-fullWeight").css("display", "none");
            $("#ck-progress-fullWeight").css("display", "none");
        }
        if (inoutProgress.indexOf("HANDLE") === -1) {
            $("#rk-progress-hand").css("display", "none");
            $("#ck-progress-hand").css("display", "none");
        }
        if (inoutProgress.indexOf("WEIGHT_EMPTY") === -1) {
            $("#rk-progress-emptyWeight").css("display", "none");
            $("#ck-progress-emptyWeight").css("display", "none");
        }
        if (inoutProgress.indexOf("CARD_BACK") === -1) {
            $("#rk-progress-cardBack").css("display", "none");
            $("#ck-progress-cardBack").css("display", "none");
        }
        if (type === "IN") {
            $("#rk_progress").css("display", "block");
            $("#ck_progress").css("display", "none");
        }
        if (type === "OUT") {
            $("#ck_progress").css("display", "block");
            $("#rk_progress").css("display", "none");
        }
    }
}
/**
 * å¼¹å‡ºæé†’框
 * @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));
        }
        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-register.js
ÎļþÃû´Ó fzzy-igdss-web/src/main/resources/static/inout/register.js ÐÞ¸Ä
@@ -134,7 +134,7 @@
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "../../inout/api/get-plateNum",
        url: "/inout/api/get-plateNum",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: param,
@@ -143,7 +143,6 @@
                alertError(result.msg);
            } else {
                $("#plateNum").val(result.data.plateNum);
                $("#plateNum2").val(result.data.plateNum);
            }
            layer.close(index);
        },
@@ -161,7 +160,7 @@
    $("#form-data")[0].reset();
    form.render();
    // èº«ä»½è¯é‡ç½®
    $("#id_img_pers").attr("src", "../../static/images/rkbk-photo_03.png");
    $("#id_img_pers").attr("src", "/img/web/inout/rkbk-photo_03.png");
    $("#pz-img").removeClass("kccz-r-img-red");
    $("#pz-text").text("自动抓拍");
}
fzzy-igdss-web/src/main/resources/static/inout/inout-weight.js
@@ -5,10 +5,7 @@
var recordData = null;// ä¸šåŠ¡æ•°æ®ä¿¡æ¯
var snapData;//系统抓拍对象信息
var timerWeight;
var paramIntelCard;//设备识别结果
var paramIdCard;//设备识别结果
var curCheckItems = null;// å½“前数据的检查项信息
var step = 1;
var curProgress = null;
$(function () {
    layui.use(['layer', 'laydate', 'form', 'table', 'util'], function () {
@@ -26,7 +23,8 @@
            if (obj.event === 'select') {
                //清空表单
                resetForm();
                flushData(data.intelCard, null);
                flushData(data.id, null);
                $("#listProgressData").css("display", "none");
                layer.closeAll();
            }
        });
@@ -34,15 +32,12 @@
    });
    //显示流程环节
    showProgress();
    updateEditAndProgress();
    // ç›‘听重量变化
    $(".weight").blur(function () {
        deAutoByIn(this.name);
        deAuto(this.name);
    });
    // åˆå§‹åŒ–WebSocket
    // initInoutWS(companyId, bizType, progress, userId);
});
window.onload = function () {
@@ -68,47 +63,41 @@
    });
};
// socket信息返回處理
function socketOnMessage(packet) {
    //暂无
}
//点击称重
/**
 * ç§°é‡åŠæŠ“拍
 */
function weight() {
    // æ²¡æœ‰ä¸šåŠ¡æ•°æ®ä¸å¯æ‰§è¡Œ
    if (!recordData) {
        alertError("没有查询到业务数据,执行被拒绝!");
        return;
    }
    // å¦‚果是空车称重
    if (InoutProgress.WEIGHT_EMPTY == recordData.progress) {
    if (InoutProgress.WEIGHT_EMPTY === curProgress) {
        form.val("form-data", {
            emptyWeight: weightDto.weight
        });
        form.render();
    }
    // å¦‚果是满车称重
    if (InoutProgress.WEIGHT_FULL == recordData.progress) {
    if (InoutProgress.WEIGHT_FULL === curProgress) {
        form.val("form-data", {
            fullWeight: weightDto.weight
        });
        form.render();
    }
    var data = form.val("form-data");
    if (!data.plateNum) {
        alertError("提示:填写登记车牌信息");
        return;
    }
    // ç‚¹å‡»ç§°é‡è‡ªåŠ¨è°ƒç”¨æŠ“æ‹
    snapData = {
        companyId: companyId,
        deptId: deptId,
        progress: recordData.progress,
        progress: curProgress,
        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
        sort: $("#scaleName").val()
    };
    //当前AJAX服务为同步服务,返回数据包装照片信息
@@ -116,7 +105,7 @@
    $.ajax({
        sync: false,
        type: "POST",
        url: "../../inout/api/snap-img",
        url: "/inout/api/snap-img",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(snapData),
@@ -125,6 +114,7 @@
            if (result.code != "0000") {
                alertError(result.msg);
            } else {
                layer.msg("抓拍成功");
                snapData = result.data;
            }
        },
@@ -133,77 +123,119 @@
            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()
    };
function submit() {
    var data = form.val("form-data");
    if (!data.depotId) {
        alertError("提示:装卸仓库必填");
        return;
    }
    if (!data.customerName) {
        alertError("提示:通知单信息必填");
        return;
    }
    if (!data.foodVariety) {
        alertError("提示:粮食品种必填");
        return;
    }
    // æ ¡éªŒ-入库满车称重
    if (InoutProgress.WEIGHT_FULL === curProgress) {
        if (data.fullWeight <= 0.0) {
            alertError("提示:满车称重信息必填");
            return;
        }
    }
    if (InoutProgress.WEIGHT_EMPTY === curProgress) {
        if (data.emptyWeight <= 0.0) {
            alertError("提示:空车称重信息必填");
            return;
        }
    }
    if(recordData){
        //合并数据
        Object.assign(recordData, data);
    }else {
        recordData = data;
    }
    recordData.progress = curProgress;
    // èŽ·å–ç…§ç‰‡
    var files = [{
        fileName: snapData.fileName1
    }, {
        fileName: snapData.fileName2
    }, {
        fileName: snapData.fileName3
    }];
    recordData.files = files;
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "/basic/inout/list-weight-data",
        url: "/basic/inout/submit-weight",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(param),
        data: JSON.stringify(recordData),
        success: function (result) {
            if (result.code != "0000") {
                layer.msg(result.msg);
                alertError(result.msg);
            } else {
                renderTableProgressData(result.data);
                notify("数据提交成功", result.data);
                //第一次称重后,刷新页面
                if (recordData.recordWeight <= 0.0) {
                    resetForm();
                }
            }
            layer.close(index);
        },
        error: function () {
            layer.msg("系统获取数据出现异常,重新尝试");
            layer.close(index);
            alertError("提交失败,请重新尝试");
        }
    });
}
/**
 * ç‚¹å‡»æ‰“印,系统判断是否已经执行完成,如果已经完成,直接打印,如果未完成则先执行完成
 */
function printBill() {
    if (!recordData) {
        alertError("没有获取到业务数据,打印被拒绝!");
        return;
    }
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "/basic/print/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 flushWeight() {
    var ip = "127.0.0.1";
    if (weightDto.ip) {
@@ -240,46 +272,102 @@
    });
}
// ç‚¹å‡»æ‰“印,系统判断是否已经执行完成,如果已经完成,直接打印,如果未完成则先执行完成
function printBill() {
    if (!recordData) {
        alertError("没有获取到业务数据,打印被拒绝!");
        return;
    }
    // ä»ŽåŽå°èŽ·å–æ¨¡ç‰ˆå¹¶æ‰“å°
    var data = form.val("form-data");
    // åˆå¹¶æ›´æ–°ç•¶å‰ç¼–辑数据
    Object.assign(recordData, data);
/**
 * è¯»å–身份证
 */
function flushIdCard() {
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "../../basic/inout/report/bill-weight",
        type: "GET",
        async: true,
        url: "http://127.0.0.1:9111/IDCARD",
        data: {},
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(recordData),
        success: function (result) {
        success: function (json) {
            layer.close(index);
            if (result.code != "0000") {
                alertError(result.msg);
            var data = json;
            if (data.code === "200" || data.code == 200) {
                // ä¸´æ—¶èµ‹å€¼
                $("#userName").val(data.cnName);
                $("#userAddress").val(data.address);
                $("#userId").val(data.idNum);
            } else {
                layer.msg("开始渲染打印单……");
                printWeight(result.data);
                alertError("没有获取到身份证信息!");
                return;
            }
        },
        error: function () {
            layer.alert("身份证读取失败!", {
                offset: ['300px', '300px']
            });
            layer.close(index);
            alertError("获取打印模版失败,请联系管理员查看原因");
        }
    });
}
// è¡¨å•清空
/**
 * è¯»å–车牌号
 */
function flushPlateNum() {
    var param = JSON.stringify(snapDto1);
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "/inout/api/get-plateNum",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: param,
        success: function (result) {
            if (result.code != "0000") {
                alertError(result.msg);
            } else {
                $("#plateNum").val(result.data.plateNum);
            }
            layer.close(index);
        },
        error: function () {
            layer.close(index);
            alertError("车牌识别失败!");
        }
    });
}
/**
 * æ‰‹åŠ¨é€‰æ‹©ï¼ŒèŽ·å–å¾…ç§°é‡çš„æ•°æ®ï¼Œå¼¹å‡ºé€‰æ‹©
 */
function selectByHand() {
    var param = {
        deptId: deptId,
        type: type,
        timer: Math.random()
    };
    $.ajax({
        type: "POST",
        url: "/basic/inout/list-weight-data",
        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 resetForm() {
    $("#form-data")[0].reset();
    form.render();
    recordData = null;
    curProgress = null;
    weightDto.weight = 0.0;
    $("#weightValue").text("0.0");
    $("#img_scale_statule").attr("src", "/img/web/inout/icon-red.png");
@@ -287,6 +375,9 @@
    $("#text-param").val(null);
}
/**
 * é¡µé¢åˆ·æ–°
 */
function flushPage() {
    layer.confirm('确定要刷新页面吗?', {icon: 3, title: '提示'}, function (index) {
        resetForm();
@@ -294,31 +385,22 @@
    });
}
//监听表单里的数值变化
document.getElementById('intelCard').addEventListener('input', function (event) {
    var intelCard = $("#intelCard").val();
    if (intelCard.length == 10) {
        flushData(intelCard, null);
    }
});
// --查询方法,获取身份证号、卡号、车牌号,进行查询
function flushData(intelCard, userIdCard) {
/**
 * æŸ¥è¯¢æ•°æ®
 * @param id
 * @param plateNum
 */
function flushData(id, plateNum) {
    var index = layer.load();
    var userIdCard = userIdCard;
    var intelCard = intelCard;
    var plateNum = $("#plateNum").val();
    var param = {
        type: type,
        progress: progress,
        intelCard: intelCard,
        userId: userIdCard,
        progress: curProgress,
        id: id,
        plateNum: plateNum
    };
    $.ajax({
        type: "POST",
        url: "../../basic/inout/inout-query",
        url: "/basic/inout/inout-query",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(param),
@@ -328,6 +410,7 @@
                notifyProgress(result.msg, result.data);
            } else {
                recordData = result.data;
                curProgress = recordData.progress;
                // è¿”回的数据进行赋值
                form.val("form-data", recordData);
                form.render();
@@ -342,41 +425,109 @@
    });
}
/**
 * æ ¹æ®ä¸šåŠ¡æ•°æ®æ›´æ–°é¡µé¢ä¸­çš„çŠ¶æ€
 */
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 (curProgress == null) {
        if (type === "IN") {
            curProgress = "WEIGHT_FULL";
        }
        if (InoutProgress.WEIGHT_FULL == recordData.progress) {
        if (type === "OUT") {
            curProgress = "WEIGHT_EMPTY";
        }
    }
    //显示当前流程
    if (type === "IN") {
        $("#rk-progress-register").addClass("active");
        if (curProgress === InoutProgress.WEIGHT_FULL) {
            $("#rk-progress-fullWeight").addClass("active");
            $("#rk-progress-hand").removeClass("active");
            $("#rk-progress-emptyWeight").removeClass("active");
            //满车重量可编辑
            $("#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);
        if (curProgress === InoutProgress.WEIGHT_EMPTY) {
            $("#rk-progress-fullWeight").addClass("active");
            $("#rk-progress-hand").addClass("active");
            $("#rk-progress-emptyWeight").addClass("active");
        $("#emptyWeight").addClass("rkbk-search-input");
        $("#emptyWeight").attr("disabled", true);
            //满车重量不能编辑
            $("#fullWeight").addClass("rkbk-search-input");
            $("#fullWeight").attr("disabled", true);
        $("#progress-hand").removeClass("active");
        $("#progress-emptyWeight").removeClass("active");
            //空车重量可编辑
            $("#emptyWeight").removeClass("rkbk-search-input");
            $("#emptyWeight").attr("disabled", false);
        }
    }
    if (type === "OUT") {
        $("#ck-progress-register").addClass("active");
        if (curProgress === InoutProgress.WEIGHT_EMPTY) {
            $("#ck-progress-emptyWeight").addClass("active");
            $("#ck-progress-hand").removeClass("active");
            $("#ck-progress-fullWeight").removeClass("active");
            //满车重量不能编辑
            $("#fullWeight").addClass("rkbk-search-input");
            $("#fullWeight").attr("disabled", true);
            //空车重量可编辑
            $("#emptyWeight").removeClass("rkbk-search-input");
            $("#emptyWeight").attr("disabled", false);
        }
        if (curProgress === InoutProgress.WEIGHT_FULL) {
            $("#ck-progress-emptyWeight").addClass("active");
            $("#ck-progress-hand").addClass("active");
            $("#ck-progress-fullWeight").addClass("active");
            //满车重量可编辑
            $("#fullWeight").removeClass("rkbk-search-input");
            $("#fullWeight").attr("disabled", false);
            //空车重量不能编辑
            $("#emptyWeight").addClass("rkbk-search-input");
            $("#emptyWeight").attr("disabled", true);
        }
    }
    //流程显示
    if (inoutProgress) {
        if (inoutProgress.indexOf("REGISTER") === -1) {
            $("#rk-progress-register").css("display", "none");
            $("#ck-progress-register").css("display", "none");
        }
        if (inoutProgress.indexOf("WEIGHT_FULL") === -1) {
            $("#rk-progress-fullWeight").css("display", "none");
            $("#ck-progress-fullWeight").css("display", "none");
        }
        if (inoutProgress.indexOf("HANDLE") === -1) {
            $("#rk-progress-hand").css("display", "none");
            $("#ck-progress-hand").css("display", "none");
        }
        if (inoutProgress.indexOf("WEIGHT_EMPTY") === -1) {
            $("#rk-progress-emptyWeight").css("display", "none");
            $("#ck-progress-emptyWeight").css("display", "none");
        }
        if (inoutProgress.indexOf("CARD_BACK") === -1) {
            $("#rk-progress-cardBack").css("display", "none");
            $("#ck-progress-cardBack").css("display", "none");
        }
        if (type === "IN") {
            $("#rk_progress").css("display", "block");
            $("#ck_progress").css("display", "none");
        }
        if (type === "OUT") {
            $("#ck_progress").css("display", "block");
            $("#rk_progress").css("display", "none");
        }
    }
    //根据配置信息设置地磅是否可编辑
    if (weightEditTag && weightEditTag == 'N') {
@@ -386,87 +537,6 @@
        $("#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("提交失败,请重新尝试");
        }
    });
}
/**
@@ -504,6 +574,10 @@
    }
}
/**
 * è½¦è¾†é€‰æ‹©å¼¹çª—
 * @param list
 */
function renderTableProgressData(list) {
    // æ¸…空数据
    $("#tableListProgressData").empty();
fzzy-igdss-web/src/main/resources/static/inout/inout-weight2.js
@@ -5,10 +5,9 @@
var page = 1;
var limit = 15;
var recordData = null;
var selectData = null;  //单选的信息
var snapData;//系统抓拍对象信息
var timerWeight;
var img1, img2, img3;// é¡µé¢ä¸­çš„图片上传名称
var curProgress = null;
$(function () {
    layui.use(['layer', 'laydate', 'form', 'table'], function () {
@@ -43,28 +42,14 @@
            }
        });
        // ç›‘听仓库选择,选择后自动调用仓库的粮品种和产地信息
        form.on('select(select_depotId)', function (obj) {
            updateFoodVarietyByDepot(obj.value);
        });
        // åˆå§‹åŒ–表单数据
        renderTable();
    });
    //显示称重弹窗流程
    showProgress();
    // ç›‘听比例值填写
    $(".per").blur(function () {
        deAutoByPer();
    });
    // ç›‘听比例值填写
    // ç›‘听重量变化
    $(".weight").blur(function () {
        deAutoByWeight();
        deAuto(this.name);
    });
    //初始化WebSocket
    // initWS(deptId, bizType, progress, userId);
});
window.onload = function () {
@@ -75,7 +60,7 @@
    }, 2500);
    // åŠ è½½è§†é¢‘
    initVideo(lprDto, snapDto1, snapDto2);
    initVideo(snapDto1, snapDto2, snapDto3);
    //设置地磅
    $("#scaleName").val(weightDto.sort);
@@ -94,6 +79,7 @@
function flushData() {
    var index = layer.load();
    var param = form.val("form-param");
    param.weightTag = "WEIGHT";
    table.reload('tableData', {
        url: "/basic/inout/page-inout-data",
        where: param
@@ -108,6 +94,7 @@
// æ¸²æŸ“表单数据
function renderTable() {
    var param = form.val("form-param");
    param.weightTag = "WEIGHT";
    // æ¸…空数据
    $("#tableData").empty();
    table.render({
@@ -162,8 +149,8 @@
            templet: function (item) {
                var result = item.foodVariety;
                $.each(listFoodVariety, function (index, data) {
                    if (item.foodVariety == data.code) {
                        result = data.name;
                    if (item.foodVariety == data.dictValue) {
                        result = data.dictLabel;
                        return true;
                    }
                });
@@ -206,17 +193,19 @@
    });
}
/*-----------------------弹窗显示渲染-开始------------------------------*/
//操作前,重新流水数据当前信息
/**
 * ç§°é‡å¼¹çª—重新查询数据
 * @param obj
 */
function afreshGetData(obj) {
    var index = layer.load();
    recordData = null;
    var data = obj.data;
    var param = {
        userId: data.userId,
        plateNum: data.plateNum,
        id: data.id
        type: data.type,
        progress: data.progress,
        id: data.id,
        plateNum: data.plateNum
    };
    $.ajax({
        type: "POST",
@@ -229,7 +218,8 @@
                layer.alert("请刷新页面后,重新操作!!");
            } else {
                recordData = result.data;
                showWindows(recordData.progress);
                curProgress = recordData.progress;
                showWindows();
            }
            layer.close(index);
        },
@@ -240,13 +230,18 @@
    });
}
//显示流程操作弹窗
/**
 * ç™»è®°å¼¹çª—
 */
function quickRegister() {
    $("#form-data")[0].reset();
    form.render();
    //登记按钮放开
    $("#btn_register").css("display", "block");
    $("#text-info").removeClass("text-info");
    //称重操作弹窗
    var pro = '登记';
    var pro = '登记称重';
    recordData = null;
    updateEditAndProgress();
    flushPage();
    layer.open({
@@ -263,15 +258,19 @@
    });
}
//显示流程操作弹窗
function showWindows(progress) {
    //登记按钮放开
/**
 * ç§°é‡å¼¹çª—
 * @param progress
 */
function showWindows() {
    $("#form-data")[0].reset();
    form.render();
    //登记按钮隐藏
    $("#btn_register").css("display", "none");
    $("#text-info").addClass("text-info");
    //称重操作弹窗
    var pro = '空车称重';
    if (progress == 'WEIGHT_FULL') {
    if (curProgress == 'WEIGHT_FULL') {
        pro = '满车称重';
    }
    updateEditAndProgress();
@@ -290,61 +289,117 @@
    });
}
//称重弹窗中流程环节显示
function showProgress() {
    if (!inoutProgress) {
        return;
    }
    if (inoutProgress.indexOf("REGISTER") == -1) {
        $("#progress-register").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 updateEditAndProgress() {
    if (recordData) {
        if (InoutProgress.WEIGHT_EMPTY == recordData.progress) {
            $("#emptyWeight").removeClass("rkbk-search-input");
            $("#emptyWeight").attr("disabled", false);
            $("#progress-hand").removeClass("active");
            $("#progress-fullWeight").removeClass("active");
            $("#fullWeight").addClass("rkbk-search-input");
            $("#fullWeight").attr("disabled", true);
    //当前流程节点
    if (curProgress == null) {
        if (type === "IN") {
            curProgress = "WEIGHT_FULL";
        }
        if (type === "OUT") {
            curProgress = "WEIGHT_EMPTY";
        }
    }
    //显示当前流程
    if (type === "IN") {
        $("#rk-progress-register").addClass("active");
        if (curProgress === InoutProgress.WEIGHT_FULL) {
            $("#rk-progress-fullWeight").addClass("active");
            $("#rk-progress-hand").removeClass("active");
            $("#rk-progress-emptyWeight").removeClass("active");
        if (InoutProgress.WEIGHT_FULL == recordData.progress) {
            //满车重量可编辑
            $("#fullWeight").removeClass("rkbk-search-input");
            $("#fullWeight").attr("disabled", false);
            $("#progress-hand").addClass("active");
            $("#progress-fullWeight").addClass("active");
            //空车重量不能编辑
            $("#emptyWeight").addClass("rkbk-search-input");
            $("#emptyWeight").attr("disabled", true);
        }
    } else {
        if (curProgress === InoutProgress.WEIGHT_EMPTY) {
            $("#rk-progress-fullWeight").addClass("active");
            $("#rk-progress-hand").addClass("active");
            $("#rk-progress-emptyWeight").addClass("active");
            //满车重量不能编辑
            $("#fullWeight").addClass("rkbk-search-input");
            $("#fullWeight").attr("disabled", true);
            //空车重量可编辑
            $("#emptyWeight").removeClass("rkbk-search-input");
            $("#emptyWeight").attr("disabled", false);
        }
    }
    if (type === "OUT") {
        $("#ck-progress-register").addClass("active");
        if (curProgress === InoutProgress.WEIGHT_EMPTY) {
            $("#ck-progress-emptyWeight").addClass("active");
            $("#ck-progress-hand").removeClass("active");
            $("#ck-progress-fullWeight").removeClass("active");
            //满车重量不能编辑
            $("#fullWeight").addClass("rkbk-search-input");
            $("#fullWeight").attr("disabled", true);
            //空车重量可编辑
            $("#emptyWeight").removeClass("rkbk-search-input");
            $("#emptyWeight").attr("disabled", false);
        }
        if (curProgress === InoutProgress.WEIGHT_FULL) {
            $("#ck-progress-emptyWeight").addClass("active");
            $("#ck-progress-hand").addClass("active");
            $("#ck-progress-fullWeight").addClass("active");
            //满车重量可编辑
            $("#fullWeight").removeClass("rkbk-search-input");
            $("#fullWeight").attr("disabled", false);
            //空车重量不能编辑
            $("#emptyWeight").addClass("rkbk-search-input");
            $("#emptyWeight").attr("disabled", true);
        }
    }
    //流程显示
    if (inoutProgress) {
        if (inoutProgress.indexOf("REGISTER") === -1) {
            $("#rk-progress-register").css("display", "none");
            $("#ck-progress-register").css("display", "none");
        }
        if (inoutProgress.indexOf("WEIGHT_FULL") === -1) {
            $("#rk-progress-fullWeight").css("display", "none");
            $("#ck-progress-fullWeight").css("display", "none");
        }
        if (inoutProgress.indexOf("HANDLE") === -1) {
            $("#rk-progress-hand").css("display", "none");
            $("#ck-progress-hand").css("display", "none");
        }
        if (inoutProgress.indexOf("WEIGHT_EMPTY") === -1) {
            $("#rk-progress-emptyWeight").css("display", "none");
            $("#ck-progress-emptyWeight").css("display", "none");
        }
        if (inoutProgress.indexOf("CARD_BACK") === -1) {
            $("#rk-progress-cardBack").css("display", "none");
            $("#ck-progress-cardBack").css("display", "none");
        }
        if (type === "IN") {
            $("#rk_progress").css("display", "block");
            $("#ck_progress").css("display", "none");
        }
        if (type === "OUT") {
            $("#ck_progress").css("display", "block");
            $("#rk_progress").css("display", "none");
        }
    }
    //根据配置信息设置地磅是否可编辑
    if (weightEditTag && weightEditTag == 'N') {
        $("#fullWeight").addClass("rkbk-search-input");
        $("#fullWeight").attr("disabled", true);
        $("#emptyWeight").addClass("rkbk-search-input");
        $("#emptyWeight").attr("disabled", true);
        $("#progress-hand").removeClass("active");
        $("#progress-fullWeight").removeClass("active");
    }
}
@@ -399,308 +454,135 @@
//点击称重
function weight() {
    // æ²¡æœ‰ä¸šåŠ¡æ•°æ®ä¸å¯æ‰§è¡Œ
    if (!recordData) {
        layer.alert("没有查询到业务数据,执行被拒绝!!");
        return;
    }
    // å¦‚果是空车称重
    if (InoutProgress.WEIGHT_EMPTY == recordData.progress) {
        form.val("form-weight", {
    if (InoutProgress.WEIGHT_EMPTY === curProgress) {
        form.val("form-data", {
            emptyWeight: weightDto.weight
        });
        form.render();
    }
    // å¦‚果是满车称重
    if (InoutProgress.WEIGHT_FULL == recordData.progress) {
        form.val("form-weight", {
    if (InoutProgress.WEIGHT_FULL === curProgress) {
        form.val("form-data", {
            fullWeight: weightDto.weight
        });
        form.render();
    }
    form.render();
    snapData == null;
    //点击称重时候自动抓拍数据
    layer.msg("系统自动抓拍保留记录……");
    var data = form.val("form-data");
    if (!data.plateNum) {
        alertError("提示:填写登记车牌信息");
        return;
    }
    // ç‚¹å‡»ç§°é‡è‡ªåŠ¨è°ƒç”¨æŠ“æ‹
    snapData = {
        companyId: companyId,
        deptId: deptId,
        bizTag: recordData.progress,
        bizType: bizType,
        plateNum: recordData.plateNum + "-" + recordData.carNum,
        id1: (null != lprDto) ? lprDto.id : null,
        id2: (null != snapDto1) ? snapDto1.id : null,
        id3: (null != snapDto2) ? snapDto2.id : null
        progress: curProgress,
        bizType: type,
        id1: snapDto1.id,
        id2: snapDto2.id,
        id3: snapDto3.id,
        sort: $("#scaleName").val()
    };
    console.log(snapData);
    //当前AJAX服务为同步服务,返回数据包装照片信息
    var index = layer.load();
    $.ajax({
        sync: false,
        type: "POST",
        url: "../../basic/inout/snap-img",
        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") {
                layer.alert(result.msg);
                alertError(result.msg);
            } else {
                layer.msg("抓拍成功");
                snapData = result.data;
            }
        },
        error: function () {
            layer.close(index);
            layer.msg("后台调用截图失败,请重新尝试!!");
            alertError("后台调用截图失败,请重新尝试");
        }
    });
    //二次称重后,自动调用下自动计算
    if (InoutProgress.WEIGHT_EMPTY == recordData.progress) {
        deAutoByPer();
    }
    flushBtn("btn-weight");
}
// è‡ªåŠ¨è®¡ç®—ï¼Œæ³¨æ„ï¼šå‡ºåº“æ°´åˆ†æ˜¯ +,入库水分需要 -
function deAutoByPer() {
    var curData = form.val("form-weight");
    var netWeight = 0, deImpurity = 0, deWet = 0, deSum = 0, settleWeight = 0;
    if (curData.fullWeight == 0 || curData.emptyWeight == 0) {
        return;
    }
    // è®¡ç®—净重
    netWeight = curData.fullWeight - curData.emptyWeight;
    if (netWeight <= 0) {
        layer.msg("净重小于等于0,当前计算不正确!");
        return;
    }
    // æ‚质扣重
    if (curData.impurity > 0) {
        deImpurity = (netWeight * curData.impurity / 100.00).toFixed(0);
    }
    // æ°´åˆ†å¢žé‡
    if (curData.wet > 0) {
        deWet = (netWeight * curData.wet / 100.00).toFixed(0);
    }
    // æ€»æ‰£é‡
    deSum = Number(deImpurity) + Number(curData.deOther)
        + Number(curData.deHandle);
    deSum = deSum.toFixed(0);
    // ç»“算净重,把水分添加近来
    settleWeight = Number(netWeight) - Number(deSum) + Number(deWet);
    settleWeight = settleWeight.toFixed(0);
    form.val("form-weight", {
        netWeight: netWeight,
        deImpurity: deImpurity,
        deWet: deWet,
        deSum: deSum,
        settleWeight: settleWeight
    });
    form.render();
}
// è‡ªåŠ¨è®¡ç®—
function deAutoByWeight() {
    var curData = form.val("form-weight");
    var netWeight = 0, impurity = 0, wet = 0, deSum = 0, settleWeight = 0;
    if (curData.fullWeight == 0 || curData.emptyWeight == 0) {
        return;
    }
    // å‡€é‡
    netWeight = curData.fullWeight - curData.emptyWeight;
    if (netWeight <= 0) {
        layer.msg("净重小于等于0,当前计算不正确!");
        return;
    }
    // æ‚è´¨-百分比
    if (curData.deImpurity > 0) {
        impurity = (curData.deImpurity / netWeight * 100).toFixed(2);
    }
    // æ°´åˆ† -百分比
    if (curData.deWet > 0) {
        wet = (curData.deWet / netWeight * 100).toFixed(2);
    }
    // æ€»æ‰£é‡= æ‚质扣重 + ä¸å®Œå–„扣重 + æ°”体扣重 + å€¼ä»“扣重 + åŒ…装扣重
    deSum = Number(curData.deImpurity)
        + Number(curData.deOther) + Number(curData.deHandle);
    deSum = deSum.toFixed(0);
    // ç»“算净重,把水分添加近来
    settleWeight = Number(netWeight) - Number(deSum) + Number(curData.deWet);
    settleWeight = settleWeight.toFixed(0);
    form.val("form-weight", {
        netWeight: netWeight,
        impurity: impurity,
        wet: wet,
        deSum: deSum,
        settleWeight: settleWeight
    });
    form.render();
}
//根据当前操作的按钮ID更新其他按钮状态
function flushBtn(btnId) {
    if ("btn-weight" == btnId) {// ç§°é‡åŽå¯ä»¥ç‚¹å‡»å®Œæˆç§°é‡
        $("#btn-submit").removeClass("layui-btn-disabled");
        $("#btn-submit").attr("disabled", false);
    }
    if ("btn-submit" == btnId) {
        $("#btn-submit").addClass("layui-btn-disabled");
        $("#btn-submit").attr("disabled", true);
        flushData();
        if (InoutProgress.WEIGHT_EMPTY == recordData.progress) {// å‡ºåº“,如果是空车称重,完成收直接刷新页面
            layer.closeAll();
        } else {
            // å®Œæˆç§°é‡åŽæŽ§åˆ¶æŒ‰é’®
            $("#btn-weight").addClass("layui-btn-disabled");
            $("#btn-weight").attr("disabled", true);
            $("#btn-printBill").removeClass("layui-btn-disabled");
            $("#btn-printBill").attr("disabled", false);
            addDisabled();
        }
    }
    if ("btn-printBill" == btnId) {// æ‰“印过磅单,说明业务完成
        $("#btn-weight").removeClass("layui-btn-disabled");
        $("#btn-weight").attr("disabled", false);
        $("#btn-submit").addClass("layui-btn-disabled");
        $("#btn-submit").attr("disabled", true);
        $("#btn-printBill").addClass("layui-btn-disabled");
        $("#btn-printBill").attr("disabled", true);
        layer.closeAll();
        flushData();
    }
}
//更改扣重信息框不可编辑
function addDisabled() {
    //杂质
    $("#impurity").attr("disabled", true);
    $("#deImpurity").attr("disabled", true);
    //水分
    $("#wet").attr("disabled", true);
    $("#deWet").attr("disabled", true);
    //值仓
    $("#deHandle").attr("disabled", true);
    //其他
    $("#deOther").attr("disabled", true);
}
//恢复扣重信息框编辑状态
function delDisabled() {
    //杂质
    $("#impurity").attr("disabled", false);
    $("#deImpurity").attr("disabled", false);
    //水分
    $("#wet").attr("disabled", false);
    $("#deWet").attr("disabled", false);
    //值仓
    $("#deHandle").attr("disabled", false);
    //其他
    $("#deOther").attr("disabled", false);
}
// ç‚¹å‡»æ‰“印,系统判断是否已经执行完成,如果已经完成,直接打印,如果未完成则先执行完成
/**
 * ç‚¹å‡»æ‰“印,系统判断是否已经执行完成,如果已经完成,直接打印,如果未完成则先执行完成
 */
function printBill() {
    if (!recordData) {
        layer.alert("没有获取到业务数据,不支持打印!");
        alertError("没有获取到业务数据,打印被拒绝!");
        return;
    }
    // ä»ŽåŽå°èŽ·å–æ¨¡ç‰ˆå¹¶æ‰“å°
    var data = form.val("form-weight");
    // åˆå¹¶æ›´æ–°ç•¶å‰ç¼–辑数据
    Object.assign(recordData, data);
    printBillStep2();
};
// ç‚¹å‡»æ‰“印,先执行系统默认执行完成卡回收
function printBillStep2() {
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "../../basic/inout-report/inout-bill-weight",
        url: "/basic/print/bill-weight",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(recordData),
        success: function (result) {
            layer.close(index);
            if (result.code != "0000") {
                layer.msg(result.msg);
                alertError(result.msg);
            } else {
                layer.msg("开始渲染打印单……");
                printWeight(result.data);
                // åˆ·æ–°æŒ‰é’®
                flushBtn("btn-printBill");
            }
        },
        error: function () {
            layer.close(index);
            layer.msg("获取打印模版失败,请联系管理员查看原因!!");
            alertError("获取打印模版失败,请联系管理员查看原因");
        }
    });
};
}
/**
 * ç§°é‡æäº¤
 */
function submit() {
//完成称重
function submitWeight() {
    if (null == recordData) {
        notify("没有数据可以提交", null);
        return;
    }
    var data = form.val("form-weight");
    var data = form.val("form-data");
    if (!data.depotId) {
        notify("装卸仓库必须填写", null);
        alertError("提示:装卸仓库必填");
        return;
    }
    // æ ¡éªŒ-出库空车
    if (InoutProgress.WEIGHT_EMPTY == recordData.progress) {
        if (data.emptyWeight <= 0.0) {
            notify("空车称重信息必填", null);
            return;
        }
        if (!data.customerName) {
            notify("往来单位信息必填", null);
            return;
        }
    } else {
    if (!data.customerName) {
        alertError("提示:通知单信息必填");
        return;
    }
    if (!data.foodVariety) {
        alertError("提示:粮食品种必填");
        return;
    }
    // æ ¡éªŒ-入库满车称重
    if (InoutProgress.WEIGHT_FULL === curProgress) {
        if (data.fullWeight <= 0.0) {
            notify("满车称重信息必填", null);
            return;
        }
        if (!data.foodVariety) {
            notify("粮食品种必填", null);
            return;
        }
        if (!data.foodLocation) {
            notify("粮食产地必填", null);
            return;
        }
        if (!data.settleWeight || data.settleWeight <= 0.0) {
            notify("扣重后净信息不正确,请核实计算", null);
            alertError("提示:满车称重信息必填");
            return;
        }
    }
    // åˆå¹¶æ›´æ–°ç•¶å‰ç¼–辑数据
    Object.assign(recordData, data);
    if (InoutProgress.WEIGHT_EMPTY === curProgress) {
        if (data.emptyWeight <= 0.0) {
            alertError("提示:空车称重信息必填");
            return;
        }
    }
    if(recordData){
        //合并数据
        Object.assign(recordData, data);
    }else {
        recordData = data;
    }
    recordData.progress = curProgress;
    // èŽ·å–ç…§ç‰‡
    var files = [{
@@ -711,69 +593,106 @@
        fileName: snapData.fileName3
    }];
    recordData.files = files;
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "../../basic/inout/inout-next-step",
        url: "/basic/inout/submit-weight",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(recordData),
        success: function (result) {
            if (result.code != "0000") {
                layer.alert("数据提交失败,请重试!!");
                alertError(result.msg);
            } else {
                curProgress = null;
                clearInterval(timerWeight);
                layer.alert("数据提交成功!!");
                // æ›´æ–°æŒ‰é’®æ˜¾ç¤º
                flushBtn("btn-submit");
                notify("数据提交成功", result.data);
                //第一次称重后,刷新页面
                if (recordData.recordWeight <= 0.0) {
                    $("#form-data")[0].reset();
                    form.render();
                }
            }
            layer.close(index);
        },
        error: function () {
            layer.close(index);
            layer.alert("提交失败,请重新尝试!!");
            alertError("提交失败,请重新尝试");
        }
    });
}
//重新称重时,表单不清空,按钮重置
function flushPage() {
    weightDto.weight = 0.0;
    $("#weightValue").text("0.0");
    $("#img_scale_statule").attr("src", "/img/web/inout/icon-red.png");
    timerGetWeight();
    //扣重信息框恢复为可编辑
    delDisabled();
    //表单数据重置
    form.val("form-weight", recordData);
    form.val("form-data", recordData);
    form.render();
}
//根据选择的仓库信息,更新粮食品种
function updateFoodVarietyByDepot(selectId) {
    var selectDepot;
    $.each(listDepot, function (index, data) {
        if (data.id === selectId) {
            selectDepot = data;
            return false;
/**
 * è¯»å–身份证
 */
function flushIdCard() {
    var index = layer.load();
    $.ajax({
        type: "GET",
        async: true,
        url: "http://127.0.0.1:9111/IDCARD",
        data: {},
        dataType: "json",
        success: function (json) {
            layer.close(index);
            var data = json;
            if (data.code === "200" || data.code == 200) {
                // ä¸´æ—¶èµ‹å€¼
                $("#userName").val(data.cnName);
                $("#userAddress").val(data.address);
                $("#userId").val(data.idNum);
            } else {
                alertError("没有获取到身份证信息!");
                return;
            }
        },
        error: function () {
            layer.alert("身份证读取失败!", {
                offset: ['300px', '300px']
            });
            layer.close(index);
        }
    });
    if (selectDepot) {
        form.val("form-weight", {
            foodVariety: selectDepot.foodVariety,
            foodLocation: selectDepot.foodLocation,
            foodLevel: selectDepot.foodLevel,
            noticeId: selectDepot.noticeId
        });
        form.render();
    }
}
/*-----------------------称重操作-结束------------------------------*/
/**
 * è¯»å–车牌号
 */
function flushPlateNum() {
    var param = JSON.stringify(snapDto1);
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "/inout/api/get-plateNum",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: param,
        success: function (result) {
            if (result.code != "0000") {
                alertError(result.msg);
            } else {
                $("#plateNum").val(result.data.plateNum);
            }
            layer.close(index);
        },
        error: function () {
            layer.close(index);
            alertError("车牌识别失败!");
        }
    });
}
/**
 * å¼¹å‡ºæé†’框
@@ -793,7 +712,7 @@
        }
        $("#resultIntelCard").text(data.intelCard);
        layer.open({
        var indexNotify = layer.open({
            type: 1,
            offset: ['150px', '200px'],
            area: '450px;',
@@ -802,7 +721,7 @@
            btn: ['确定'],
            content: $('#dialog-from-notify'),
            yes: function (index) {
                layer.closeAll();
                layer.close(indexNotify);
            }
        });
    } else {
fzzy-igdss-web/src/main/resources/static/inout/weight.js
@@ -2,7 +2,7 @@
 * å…¥åº“-称重自动计算
 * @param name è§¦å‘事件的属性名称
 */
function deAutoByIn(name) {
function deAuto(name) {
    var curData = form.val("form-data");
    if (curData.fullWeight == 0 || curData.emptyWeight == 0) {
        return;
@@ -14,10 +14,9 @@
        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);
    var deOther = curData.deOther, settleWeight = 0, recordWeight = 0;
    recordWeight = Number(netWeight) - Number(deOther);
    settleWeight = Number(recordWeight);
    netWeight = netWeight.toFixed(1);
    recordWeight = recordWeight.toFixed(1);
fzzy-igdss-web/src/main/resources/static/snapRecord/snapRecord-style.css
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,201 @@
/* å›¾ç‰‡é¢„览层样式 */
.img-preview {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.preview-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}
.preview-img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
.close-preview {
    position: absolute;
    top: -40px;
    right: -10px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}
.close-preview:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}
/* å›¾ç‰‡ç½‘格样式 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 15px;
}
.gallery-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}
.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}
.gallery-img {
    width: 100%;
    height: 195px;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.3s ease;
}
.gallery-img:hover {
    opacity: 0.95;
}
.gallery-info {
    padding: 15px;
}
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.gallery-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gallery-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.meta-item {
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    color: #666;
}
.meta-item i {
    width: 16px;
    margin-right: 6px;
    color: #999;
    font-size: 1.25rem;
}
.gallery-filename i {
    margin-right: 5px;
    font-size: 0.7rem;
}
/* æ ‡ç­¾æ ·å¼ */
.gallery-tags {
    display: flex;
    flex-wrap: wrap;
    /*gap: 8px;*/
    /*margin: 12px 0;*/
}
/* åˆ†é¡µæ ·å¼ */
.pagination-container {
    display: flex;
    justify-content: center;
    /*margin-top: 40px;*/
}
/* ç©ºçŠ¶æ€æ ·å¼ */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
}
.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #ddd;
}
.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #666;
}
/* å“åº”式设计 */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
}
@media (max-width: 768px) {
    .main-nav li {
        margin: 0 10px;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    .gallery-img {
        height: 180px;
    }
}
@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-img {
        height: 200px;
    }
}
fzzy-igdss-web/src/main/resources/static/snapRecord/snapRecord.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,278 @@
var layer;
var laypage;
$(function () {
    // åˆå§‹åŒ–分页
    layui.use(['laypage', 'layer'], function () {
        layer = layui.layer;
        laypage = layui.laypage;
        // åˆå§‹åŒ–分页组件
        initPagination();
    });
    // åˆå§‹åŒ–图片预览功能
    initImagePreview();
});
/**
 * åˆå§‹åŒ–分页组件
 */
function initPagination() {
    laypage.render({
        elem: 'pagination',
        count: typeof totalItems !== 'undefined' ? totalItems : 0,
        limit: typeof pageSize !== 'undefined' ? pageSize : 6,
        curr: typeof currentPage !== 'undefined' ? currentPage : 1,
        layout: ['count', 'prev', 'page', 'next', 'refresh', 'skip'],
        jump: function (obj, first) {
            if (!first) {
                searchRecord(obj.curr, obj.limit)
            }
        }
    });
}
/**
 * é‡æ–°åˆå§‹åŒ–分页组件
 * @param {number} totalCount - æ€»è®°å½•æ•°
 * @param {number} pageSize - æ¯é¡µå¤§å°
 * @param {number} currentPage - å½“前页码
 */
function reinitPagination(totalCount, pageSize, currentPage) {
    laypage.render({
        elem: 'pagination',
        count: totalCount,
        limit: pageSize,
        curr: currentPage,
        layout: ['count', 'prev', 'page', 'next', 'refresh', 'skip'],
        jump: function (obj, first) {
            if (!first) {
                searchRecord(obj.curr, obj.limit)
            }
        }
    });
}
/**
 * èŽ·å–æŠ“æ‹è®°å½•æ•°æ®
 * @param {Object} params - æŸ¥è¯¢å‚数对象
 * @param {Function} callback - å›žè°ƒå‡½æ•°
 */
function fetchSnapRecordData(params, callback) {
    $.ajax({
        url: '../../snapRecord/pageData',
        type: 'POST',
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(params),
        success: function (response) {
            if (response.code === '0000') {
                callback(null, response.data);
            } else {
                callback(new Error(response.msg || '数据加载失败'), null);
            }
        },
        error: function (xhr, status, error) {
            callback(new Error('请求失败,请稍后重试'), null);
        }
    });
}
/**
 * æž„建查询参数
 * @param {number} page - é¡µç 
 * @param {number} size - æ¯é¡µå¤§å°
 * @returns {Object} æŸ¥è¯¢å‚数对象
 */
function buildQueryParams(page, size) {
    var params = {
        page: page,
        limit: size
    };
    // æ·»åŠ è¡¨å•æŸ¥è¯¢æ¡ä»¶
    var form = document.getElementById('snapRecord-form');
    if (form) {
        var inputs = form.querySelectorAll('input[name], select[name]');
        inputs.forEach(function(input) {
            if (input.value) { // åªæ·»åŠ éžç©ºå€¼
                params[input.name] = input.value;
            }
        });
    }
    return params;
}
/**
 * æ›´æ–°å›¾ç‰‡ç”»å»Šå†…容
 * @param {Array} records - æŠ“拍记录数据
 */
function updateGallery(records) {
    var container = document.getElementById('gallery-container');
    if (!container) return;
    // æ¸…空现有内容
    container.innerHTML = '';
    if (!records || records.length === 0) {
        // æ˜¾ç¤ºç©ºçŠ¶æ€
        container.innerHTML = `
            <div class="empty-state">
                <i class="fa-solid fa-camera-slash"></i>
                <h3>暂无抓拍记录</h3>
                <p>当前没有可展示的抓拍记录数据</p>
            </div>
        `;
        // éšè—åˆ†é¡µ
        $('.pagination-container').hide();
        return;
    }
    // æ˜¾ç¤ºåˆ†é¡µ
    $('.pagination-container').show();
    // ç”Ÿæˆå›¾ç‰‡å¡ç‰‡
    var html = '';
    records.forEach(function(record) {
        html += `
            <div class="gallery-item">
                <img src="/logo-sm.png" alt="${record.id}"
                     data-url="/logo-sm.png" data-id="${record.id}"
                     class="gallery-img" onclick="showSnapRecordPreview(this.getAttribute('data-url'))">
                <div class="gallery-info">
                    <div class="gallery-header">
                        <h3 class="gallery-title">${record.id}</h3>
                    </div>
                    <div class="gallery-meta">
                        <div class="meta-item">
                            <i class="layui-icon layui-icon-home"></i>
                            <span>${record.deptId || ''}</span>
                        </div>
                        <div class="meta-item">
                            <i class="layui-icon layui-icon-video"></i>
                            <span>${record.cameraId || ''}</span>
                        </div>
                        <div class="meta-item">
                            <i class="layui-icon layui-icon-date"></i>
                            <span>${formatDate(record.snapTime)}</span>
                        </div>
                    </div>
                    <div class="gallery-tags">
                        <span class="tag-person">
                            <i class="layui-icon layui-icon-face-smile"></i>
                            <span>测试标签</span>
                        </span>
                    </div>
                </div>
            </div>
        `;
    });
    container.innerHTML = html;
}
/**
 * æ ¼å¼åŒ–日期
 * @param {string|number} date - æ—¥æœŸå­—符串或时间戳
 */
function formatDate(date) {
    if (!date) return '';
    var d = new Date(date);
    return d.getFullYear() + '-' +
        String(d.getMonth() + 1).padStart(2, '0') + '-' +
        String(d.getDate()).padStart(2, '0') + ' ' +
        String(d.getHours()).padStart(2, '0') + ':' +
        String(d.getMinutes()).padStart(2, '0') + ':' +
        String(d.getSeconds()).padStart(2, '0');
}
/**
 * åˆå§‹åŒ–图片预览功能
 */
function initImagePreview() {
    var preview = document.getElementById('imgPreview');
    var previewImg = document.getElementById('previewImg');
    var closeBtn = document.getElementById('closePreview');
    // å¦‚果预览元素不存在,则不初始化
    if (!preview || !previewImg) {
        return;
    }
    // å…³é—­æŒ‰é’®ç‚¹å‡»äº‹ä»¶
    if (closeBtn) {
        closeBtn.addEventListener('click', closePreview);
    }
    // ç‚¹å‡»é¢„览区域外关闭
    preview.addEventListener('click', function (e) {
        if (e.target === preview) {
            closePreview();
        }
    });
    // é”®ç›˜äº‹ä»¶ç›‘听
    document.addEventListener('keydown', function (e) {
        if (e.key === 'Escape' && preview.style.display === 'flex') {
            closePreview();
        }
    });
    // å…³é—­é¢„览函数
    function closePreview() {
        preview.style.display = 'none';
        previewImg.src = '';
    }
}
/**
 * æ˜¾ç¤ºå›¾ç‰‡é¢„览
 * @param {string} imgUrl å›¾ç‰‡URL
 */
function showSnapRecordPreview(imgUrl) {
    var preview = document.getElementById('imgPreview');
    var previewImg = document.getElementById('previewImg');
    if (preview && previewImg) {
        previewImg.src = imgUrl;
        preview.style.display = 'flex';
    }
}
/**
 * è¯»å–车牌号
 */
function searchRecord(page , size) {
    var pageNumber = 1;
    var sizeNumber = 6;
    if (pageSize && pageSize > 0){
        size = pageSize;
    }
    if (size && size > 0){
        sizeNumber = size;
    }
    if (page && page > 0){
        pageNumber = page;
    }
    // æž„造查询参数,从第一页开始
    var queryParams = buildQueryParams(pageNumber, sizeNumber);
    // æ˜¾ç¤ºloading
    var loadingIndex = layer.load(1, {shade: [0.1, '#fff']});
    // è°ƒç”¨æ•°æ®è¯·æ±‚方法
    fetchSnapRecordData(queryParams, function(error, data) {
        // å…³é—­loading
        layer.close(loadingIndex);
        if (error) {
            layer.msg(error.message);
            return;
        }
        // æ›´æ–°é¡µé¢æ•°æ®
        updateGallery(data.records);
        // é‡æ–°åˆå§‹åŒ–分页组件
        reinitPagination(data.total, data.size, data.current);
    });
}
fzzy-igdss-web/src/main/resources/templates/eventInfo/eventInfo.html
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,103 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<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">
    <th:block th:include="include :: header('AI事件管理')" />
    <link rel="stylesheet" type="text/css" th:href="@{/ajax/libs/layui-ruoyi/css/layui.css}"/>
    <link rel="stylesheet" th:href="@{/eventInfo/eventInfo-style.css}">
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="eventInfo-form">
                <div class="select-list">
                    <ul>
                        <li>
                            æ‰€å±žåº“区:<input type="text" name="deptId"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="searchRecord()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>
        <div class="col-sm-12 " style="padding-top: 10px;">
            <!-- äº‹ä»¶ç½‘æ ¼ -->
            <div class="gallery-grid" id="gallery-container">
                <!-- äº‹ä»¶ä¸ºç©ºæ—¶æ˜¾ç¤º -->
                <div th:if="${#lists.isEmpty(eventInfoList)}" class="empty-state">
                    <i class="fa-solid fa-bell-slash"></i>
                    <h3>暂无事件记录</h3>
                    <p>当前没有可展示的AI事件数据</p>
                </div>
                <!-- äº‹ä»¶å¡ç‰‡ -->
                <div th:each="eventInfo : ${eventInfoList}" class="gallery-item">
                    <img th:src="@{/logo-sm.png}" th:alt="${eventInfo.id}"
                         th:data-url="@{/logo-sm.png}" th:data-id="${eventInfo.id}"
                         class="gallery-img" onclick="showEventInfoPreview(this.getAttribute('data-url'))">
                    <div class="gallery-info">
                        <div class="gallery-header">
                            <h3 class="gallery-title" th:text="${eventInfo.name}"></h3>
                        </div>
                        <div class="gallery-meta">
                            <div class="meta-item">
                                <i class="layui-icon layui-icon-home"></i>
                                <span th:text="${eventInfo.deptId}"></span>
                            </div>
                            <div class="meta-item">
                                <i class="layui-icon layui-icon-video"></i>
                                <span th:text="${eventInfo.serId}"></span>
                            </div>
                            <div class="meta-item">
                                <i class="layui-icon layui-icon-date"></i>
                                <span th:text="${#dates.format(eventInfo.time, 'yyyy-MM-dd HH:mm:ss')}"></span>
                            </div>
                        </div>
                        <!-- æ ‡ç­¾åˆ—表 -->
                        <div class="gallery-tags">
                            <span class="tag-person">
                                <i class="layui-icon layui-icon-face-smile"></i>
                                <span th:text="${eventInfo.level}"></span>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
            <!-- åˆ†é¡µæŽ§ä»¶ -->
            <div class="pagination-container" th:if="${not #lists.isEmpty(eventInfoList)}">
                <div id="pagination"></div>
            </div>
        </div>
    </div>
    <!-- å›¾ç‰‡é¢„览层 -->
    <div class="img-preview" id="imgPreview">
        <div class="preview-content">
            <img src="" alt="预览图片" class="preview-img" id="previewImg">
            <div class="close-preview" id="closePreview">
                <i class="layui-icon layui-icon-clear"></i>
            </div>
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<script th:src="@{/ajax/libs/layui-ruoyi/layui.js}"></script>
<script th:src="@{/eventInfo/eventInfo.js}"></script>
<script th:inline="javascript">
    var currentPage = [[${currentPage}]];
    var totalItems = [[${totalItems}]];
    var pageSize = [[${pageSize}]];
</script>
</body>
</html>
fzzy-igdss-web/src/main/resources/templates/inout/check.html
@@ -304,7 +304,7 @@
<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/check.js}"></script>
<script th:src="@{/inout/inout-check.js}"></script>
<script type="text/html" id="barControl">
    <a class="layui-btn control-btn" lay-event="edit">结果录入</a>
fzzy-igdss-web/src/main/resources/templates/inout/handle.html
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,632 @@
<!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" th:href="@{/ajax/libs/layui/css/layui.css}"/>
    <link rel="stylesheet" th:href="@{/inout/inout-style.css}">
    <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-240 {
            right: 240px;
        }
        .r-120 {
            right: 120px;
        }
        .rkbk-search-input.bg-date {
            background: #FFF !important;
        }
        .kccz-left-box2 {
            height: 741px;
        }
        #scaleName {
            width: 130px;
            height: 28px;
        }
        .kccz-r-item {
            height: 240px;
        }
        .kccz-r-con {
            height: 190px;
        }
        .kccz-r-vedio {
             background: unset;
            height: 190px;
        }
        .kccz-r-vedio img{
            width: 80%;
            height: 100%;
            background: #dee6ec;
        }
    </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" onclick="selectByHand()">
                    <i><img th:src="@{/img/web/inout/icon-hyd.png}"/></i>选择值仓
                </button>
                <button id="btn-submit" class="rkbk-quick-btn layui-btn btn-green" onclick="submit()">
                    <i><img th:src="@{/img/web/inout/icon-ok.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" id="rk_progress" style="display: none;">
                    <li id="rk-progress-register" class="rk-step-first">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-dengji.png}"/>
                        </span>
                        <p>入库登记</p>
                    </li>
                    <li id="rk-progress-fullWeight">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-chengzhong.png}"/>
                        </span>
                        <p>满车称重</p>
                    </li>
                    <li id="rk-progress-hand">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-xiehuo.png}"/>
                        </span>
                        <p>入库值仓</p>
                    </li>
                    <li id="rk-progress-emptyWeight">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-chengzhong.png}"/>
                        </span>
                        <p>空车称重</p>
                    </li>
                    <li id="rk-progress-cardBack">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-banli.png}"/>
                        </span>
                        <p>离库确认</p>
                    </li>
                </ul>
                <ul class="rk-step" id="ck_progress" style="display: none;">
                    <li id="ck-progress-register" class="rk-step-first">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-dengji.png}"/>
                        </span>
                        <p>出库登记</p>
                    </li>
                    <li id="ck-progress-emptyWeight">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-chengzhong.png}"/>
                        </span>
                        <p>空车称重</p>
                    </li>
                    <li id="ck-progress-hand">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-xiehuo.png}"/>
                        </span>
                        <p>出库值仓</p>
                    </li>
                    <li id="ck-progress-fullWeight">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-chengzhong.png}"/>
                        </span>
                        <p>满车称重</p>
                    </li>
                    <li id="ck-progress-cardBack">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-banli.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-box2 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="foodLocationId">
                            </div>
                            <div class="layui-form-item display-none">
                                <input type="text" name="noticeId">
                            </div>
                            <div class="layui-form-item display-none">
                                <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 class="layui-form-item display-none">
                                <label class="layui-form-label">隐藏-流程节点</label>
                                <div class="layui-input-block">
                                    <input type="text" name="progress" 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="noticeId" 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="foodLocationId"
                                           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="type" th:value="${type}"
                                           autocomplete="off" class="layui-input rkbk-search-input">
                                </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="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="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 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">
                                        <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">æ°´&nbsp;&nbsp;&nbsp;&nbsp;分</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">扣&nbsp;&nbsp;&nbsp;&nbsp;重</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">单&nbsp;&nbsp;&nbsp;&nbsp;ä»·</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">杂&nbsp;&nbsp;&nbsp;&nbsp;è´¨</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>
                            <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">
                                    </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="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">
                                        <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">联系电话</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>
                </div>
                <!--kccz-left-box2 end-->
            </div>
            <!--kccz-left end-->
            <div class="kccz-right fr bg-ef">
                <div class="kccz-r-item radius-6">
                    <div class="kccz-r-box">
                        <div class="rkbk-tit">
                            <i></i>
                            <h3>值仓记录1</h3>
                        </div>
                        <div class="kccz-r-con">
                            <div class="kccz-r-vedio"><img id="kccz-r-img1"></div>
                            <div class="kccz-r-btnbox">
                                <a href="javascript:;" class="kccz-r-btn" id="kccz-r-btn1"> <span
                                        class="kccz-r-img"></span>
                                    <p>上传图片</p>
                                </a>
                            </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></i>
                            <h3>值仓记录2</h3>
                        </div>
                        <div class="kccz-r-con">
                            <div class="kccz-r-vedio"><img id="kccz-r-img2"></div>
                            <div class="kccz-r-btnbox">
                                <a href="javascript:;" class="kccz-r-btn" id="kccz-r-btn2"> <span
                                        class="kccz-r-img"></span>
                                    <p>上传图片</p>
                                </a>
                            </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></i>
                            <h3>值仓记录3</h3>
                        </div>
                        <div class="kccz-r-con">
                            <div class="kccz-r-vedio"><img id="kccz-r-img3"></div>
                            <div class="kccz-r-btnbox">
                                <a href="javascript:;" class="kccz-r-btn" id="kccz-r-btn3"> <span
                                        class="kccz-r-img"></span>
                                    <p>上传图片</p>
                                </a>
                            </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 curProgress = [[${progress}]];
    var deptId = [[${deptId}]];
    var listDepot = [[${listDepot}]];
    //出入库类型
    var type = [[${type}]];
    var companyId = [[${loginUser.companyId}]];
</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-handle.js}"></script>
</body>
<!-- å¼¹å‡ºç²®é£Ÿäº§åœ° -->
<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="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 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>
        </tbody>
    </table>
</div>
<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/register.html
@@ -334,7 +334,7 @@
<script th:src="@{/common/igds-common.js}"></script>
<script th:src="@{/inout/inout-common.js}"></script>
<script th:src="@{/inout/video-play.js}"></script>
<script th:src="@{/inout/register.js}"></script>
<script th:src="@{/inout/inout-register.js}"></script>
<!-- å¼¹å‡ºæ¡†çš„信息 -->
<div class="layui-tab-content" id="dialog-from-notify" style="display: none;">
fzzy-igdss-web/src/main/resources/templates/inout/weight.html
@@ -7,7 +7,7 @@
    <meta name="renderer" content="webkit">
    <title>出入库管理-入库称重</title>
    <link rel="stylesheet" type="text/css" th:href="@{/ajax/libs/layui-ruoyi/css/layui.css}"/>
    <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}">
    <!--使用打印插件 éšè—å½“前插件 -->
@@ -17,9 +17,11 @@
        .kccz-r-btnbox {
            width: 86px !important;
        }
        .layui-table-body {
            max-height: 400px;
        }
        .kccz-r-btn {
            width: 86px !important;
        }
@@ -120,11 +122,7 @@
        }
        .rkbk-search-input {
            background: #FFF !important;
        }
        .rkbk-search-input.bg-date {
            background: #FFF !important;
            background: #e7eaec !important;
        }
        #scaleName {
@@ -218,41 +216,67 @@
            </div>
            <!-- æµç¨‹å¼•导 -->
            <div class="rk-step-wrap fr">
                <ul class="rk-step">
                    <li id="progress-register" class="active rk-step-first">
                <ul class="rk-step" id="rk_progress" style="display: none;">
                    <li id="rk-progress-register" class="rk-step-first">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-dengji.png}"/>
                        </span>
                        <p>入库登记</p>
                    </li>
                    <li id="rk-progress-fullWeight">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-chengzhong.png}"/>
                        </span>
                        <p>满车称重</p>
                    </li>
                    <li id="rk-progress-hand">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-xiehuo.png}"/>
                        </span>
                        <p>入库值仓</p>
                    </li>
                    <li id="rk-progress-emptyWeight">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-chengzhong.png}"/>
                        </span>
                        <p>空车称重</p>
                    </li>
                    <li id="rk-progress-cardBack">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-banli.png}"/>
                        </span>
                        <p>离库确认</p>
                    </li>
                </ul>
                <ul class="rk-step" id="ck_progress" style="display: none;">
                    <li id="ck-progress-register" class="rk-step-first">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-dengji.png}"/>
                        </span>
                        <p>入库登记</p>
                        <p>出库登记</p>
                    </li>
                    <li id="progress-check" class="active">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-zhijian.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="">
                    <li id="ck-progress-emptyWeight">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-chengzhong.png}"/>
                        </span>
                        <p>空车称重</p>
                    </li>
                    <li id="progress-cardBack">
                    <li id="ck-progress-hand">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-xiehuo.png}"/>
                        </span>
                        <p>出库值仓</p>
                    </li>
                    <li id="ck-progress-fullWeight">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-chengzhong.png}"/>
                        </span>
                        <p>满车称重</p>
                    </li>
                    <li id="ck-progress-cardBack">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-banli.png}"/>
                        </span>
                        </span>
                        <p>离库确认</p>
                    </li>
                </ul>
@@ -311,24 +335,40 @@
                        <form class="layui-form" action="" id="form-data"
                              lay-filter="form-data">
                            <div class="layui-form-item display-none">
                                <input type="text" name="id">
                                <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 class="layui-form-item display-none">
                                <input type="text" name="progress">
                                <label class="layui-form-label">隐藏-流程节点</label>
                                <div class="layui-input-block">
                                    <input type="text" name="progress" autocomplete="off"
                                           class="layui-input rkbk-search-input">
                                </div>
                            </div>
                            <div class="layui-form-item display-none">
                                <input type="text" name="type">
                                <label class="layui-form-label">隐藏-通知单号</label>
                                <div class="layui-input-block">
                                    <input type="text" name="noticeId" autocomplete="off"
                                           class="layui-input rkbk-search-input">
                                </div>
                            </div>
                            <div class="layui-form-item display-none">
                                <input type="text" name="foodLocationId">
                                <label class="layui-form-label">隐藏-产地</label>
                                <div class="layui-input-block">
                                    <input type="text" name="foodLocationId"
                                           autocomplete="off" class="layui-input rkbk-search-input">
                                </div>
                            </div>
                            <div class="layui-form-item display-none">
                                <input type="text" name="noticeId">
                                <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">
                                <input type="text" name="foodType">
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label  color-red" id="depotIdLabel">装卸仓库</label>
@@ -346,7 +386,7 @@
                                    <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"
                                               placeholder="地磅自动带入" class="layui-input weight rkbk-search-input"
                                               disabled>
                                        <em
                                                class="kccz-data-dw">KG</em>
@@ -409,7 +449,7 @@
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">水分</label>
                                    <label class="layui-form-label">æ°´&nbsp;&nbsp;&nbsp;&nbsp;分</label>
                                    <div class="layui-input-block">
                                        <input id="perWet" type="text" name="perWet" autocomplete="off"
                                               placeholder="请输入" class="layui-input weight"> <em
@@ -419,7 +459,7 @@
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">扣重</label>
                                    <label class="layui-form-label">扣&nbsp;&nbsp;&nbsp;&nbsp;重</label>
                                    <div class="layui-input-block">
                                        <input id="deOther" type="text" name="deOther" autocomplete="off"
                                               placeholder="请输入" class="layui-input weight"> <em
@@ -429,7 +469,7 @@
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">单价</label>
                                    <label class="layui-form-label">单&nbsp;&nbsp;&nbsp;&nbsp;ä»·</label>
                                    <div class="layui-input-block">
                                        <input id="price" type="text" name="price" autocomplete="off"
                                               placeholder="请输入" class="layui-input weight"> <em
@@ -439,7 +479,7 @@
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">杂质</label>
                                    <label class="layui-form-label">杂&nbsp;&nbsp;&nbsp;&nbsp;è´¨</label>
                                    <div class="layui-input-block">
                                        <input id="perImpurity" type="text" name="perImpurity" autocomplete="off"
                                               placeholder="请输入" class="layui-input weight"> <em
@@ -451,7 +491,7 @@
                                <div class="layui-form-item">
                                    <label class="layui-form-label">入库重量</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="recordWeight" placeholder="自动计算"
                                        <input type="text" name="recordWeight" placeholder="自动计算,不可编辑"
                                               autocomplete="off" class="layui-input rkbk-search-input"
                                               disabled> <em class="kccz-data-dw">KG</em>
                                    </div>
@@ -470,7 +510,7 @@
                                <div class="layui-form-item">
                                    <label class="layui-form-label">结算重量</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="settleWeight" placeholder="自动计算"
                                        <input type="text" name="settleWeight" placeholder="自动计算,不可编辑"
                                               autocomplete="off" class="layui-input rkbk-search-input"
                                               disabled> <em class="kccz-data-dw">KG</em>
                                    </div>
@@ -487,17 +527,18 @@
                            </div>
                            <div class="layui-col-xs12">
                                <div style="height: 40px">
                                    <input type="button" value="读身份证" style="height: 34px;line-height: 34px;right: 120px;"
                                    <input type="button" value="读身份证"
                                           style="height: 34px;line-height: 34px;right: 120px;"
                                           class="rkbk-search-btn layui-btn" onclick="flushIdCard()">
                                    <input type="button" value="读车牌" style="height: 34px;line-height: 34px"
                                           class="rkbk-search-btn layui-btn" onclick="flushData(null,null)">
                                           class="rkbk-search-btn layui-btn" onclick="flushPlateNum()">
                                </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="userName1" placeholder="请输入" class="layui-input">
                                        <input type="text" name="userName" placeholder="请输入" class="layui-input">
                                    </div>
                                </div>
                            </div>
@@ -505,7 +546,7 @@
                                <div class="layui-form-item">
                                    <label class="layui-form-label color-red">身份证号</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="userId1" id="userId1" placeholder="请输入"
                                        <input type="text" name="userId" id="userId" placeholder="请输入"
                                               autocomplete="off" class="layui-input">
                                    </div>
                                </div>
@@ -514,7 +555,7 @@
                                <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="请输入"
                                        <input type="text" name="plateNum" id="plateNum" placeholder="请输入"
                                               autocomplete="off" class="layui-input">
                                    </div>
                                </div>
@@ -641,7 +682,7 @@
</script>
<script th:src="@{/ajax/libs/layui-ruoyi/layui.js}"></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>
fzzy-igdss-web/src/main/resources/templates/inout/weight2.html
@@ -8,7 +8,7 @@
    <meta name="renderer" content="webkit">
    <title>出入库管理-出库简易操作</title>
    <link rel="stylesheet" type="text/css" th:href="@{/ajax/libs/layui-ruoyi/css/layui.css}"/>
    <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}">
    <!--使用打印插件 éšè—å½“前插件 -->
@@ -113,13 +113,13 @@
        }
        .rkbk-search-input {
            background: #FFFFFF;
            background: #e7eaec !important;
        }
        .kccz-left-box1 {
            padding: 1px 20px 10px 20px;
        }
        .kccz-left-box2 {
            height: 512px;
            height: 520px;
        }
        .text-info{
            margin: 0 0 20px 0;
@@ -312,8 +312,33 @@
</div>
<!--l-container end-->
<script th:inline="javascript">
    //流程环节
    var inoutProgress = [[${inoutProgress}]];
    var progress = [[${progress}]];
    var deptId = [[${deptId}]];
    var listDepot = [[${listDepot}]];
    var weightEditTag = [[${weightEditTag}]];
    var listFoodVariety = [[${listFoodVariety}]];
    //userId
    var userId = [[${loginUser.loginName}]];
    //出入库类型
    var type = [[${type}]];
    var companyId = [[${loginUser.companyId}]];
<script th:src="@{/ajax/libs/layui-ruoyi/layui.js}"></script>
    //地磅信息
    var weightDto = [[${weightDto}]];
    //过程摄像头
    var snapDto1 = [[${snapDto1}]];
    var snapDto2 = [[${snapDto2}]];
    var snapDto3 = [[${snapDto3}]];
    //默认查询时间
    var startTime = [[${startTime}]];
    var endTime = [[${endTime}]];
</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>
@@ -322,36 +347,6 @@
<script th:src="@{/inout/video-play.js}"></script>
<script th:src="@{/inout/weight.js}"></script>
<script th:src="@{/inout/inout-weight2.js}"></script>
<script th:inline="javascript">
    //流程环节
    var inoutProgress = [[${inoutProgress}]];
    //库区编码
    var deptId = [[${deptId}]];
    //仓库列表
    var listDepot = [[${listDepot}]];
    //业务步骤
    var bizType = [[${bizType}]];
    //userId
    var userId = [[${loginUser.loginName}]];
    //出入库类型
    var type = [[${type}]];
    var companyId = [[${loginUser.companyId}]];
    //品种
    var listFoodVariety = [[${listFoodVariety}]];
    //当前流程
    var progress = [[${progress}]];
    //地磅信息
    var weightDto = [[${weightDto}]];
    //抓拍摄像机
    var snapDto1 = [[${snapDto1}]];
    var snapDto2 = [[${snapDto2}]];
    var snapDto3 = [[${snapDto3}]];
    //默认查询时间
    var startTime = [[${startTime}]];
    var endTime = [[${endTime}]];
</script>
<!-- å¼¹å‡ºé€šçŸ¥å• -->
<div class="layui-tab-content" id="listNotice" style="display: none;">
@@ -427,30 +422,68 @@
            </div>
            <!-- æµç¨‹å¼•导 -->
            <div class="rk-step-wrap fr" style="padding: unset;border-bottom: unset">
                <ul class="rk-step">
                    <li id="progress-register" class="active rk-step-first">
                <ul class="rk-step" id="rk_progress" style="display: none;">
                    <li id="rk-progress-register" class="rk-step-first">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-dengji.png}"/>
                        </span>
                        <p>入库登记</p>
                    </li>
                    <li id="rk-progress-fullWeight">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-chengzhong.png}"/>
                        </span>
                        <p>满车称重</p>
                    </li>
                    <li id="rk-progress-hand">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-xiehuo.png}"/>
                        </span>
                        <p>入库值仓</p>
                    </li>
                    <li id="rk-progress-emptyWeight">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-chengzhong.png}"/>
                        </span>
                        <p>空车称重</p>
                    </li>
                    <li id="rk-progress-cardBack">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-banli.png}"/>
                        </span>
                        <p>离库确认</p>
                    </li>
                </ul>
                <ul class="rk-step" id="ck_progress" style="display: none;">
                    <li id="ck-progress-register" class="rk-step-first">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-dengji.png}"/>
                        </span>
                        <p>入库登记</p>
                        <p>出库登记</p>
                    </li>
                    <li id="progress-fullWeight">
                    <li id="ck-progress-emptyWeight">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-chengzhong.png}"/>
                        </span>
                        <p>空车称重</p>
                    </li>
                    <li id="ck-progress-hand">
                        <span class="rk-step-span">
                            <img th:src="@{/img/web/inout/icon-xiehuo.png}"/>
                        </span>
                        <p>出库值仓</p>
                    </li>
                    <li id="ck-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="">
                    <li id="ck-progress-cardBack">
                        <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>
                            <img th:src="@{/img/web/inout/icon-banli.png}"/>
                        </span>
                        <p>离库确认</p>
                    </li>
                </ul>
            </div>
@@ -507,24 +540,40 @@
                        <form class="layui-form" action="" id="form-data"
                              lay-filter="form-data">
                            <div class="layui-form-item display-none">
                                <input type="text" name="id">
                                <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 class="layui-form-item display-none">
                                <input type="text" name="progress">
                                <label class="layui-form-label">隐藏-流程节点</label>
                                <div class="layui-input-block">
                                    <input type="text" name="progress" autocomplete="off"
                                           class="layui-input rkbk-search-input">
                                </div>
                            </div>
                            <div class="layui-form-item display-none">
                                <input type="text" name="type">
                                <label class="layui-form-label">隐藏-通知单号</label>
                                <div class="layui-input-block">
                                    <input type="text" name="noticeId" autocomplete="off"
                                           class="layui-input rkbk-search-input">
                                </div>
                            </div>
                            <div class="layui-form-item display-none">
                                <input type="text" name="foodLocationId">
                                <label class="layui-form-label">隐藏-产地</label>
                                <div class="layui-input-block">
                                    <input type="text" name="foodLocationId"
                                           autocomplete="off" class="layui-input rkbk-search-input">
                                </div>
                            </div>
                            <div class="layui-form-item display-none">
                                <input type="text" name="noticeId">
                                <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">
                                <input type="text" name="foodType">
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label  color-red" id="depotIdLabel">装卸仓库</label>
@@ -542,7 +591,7 @@
                                    <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"
                                               placeholder="地磅自动带入" class="layui-input weight rkbk-search-input"
                                               disabled>
                                        <em
                                                class="kccz-data-dw">KG</em>
@@ -605,7 +654,7 @@
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">水分</label>
                                    <label class="layui-form-label">æ°´&nbsp;&nbsp;&nbsp;&nbsp;分</label>
                                    <div class="layui-input-block">
                                        <input id="perWet" type="text" name="perWet" autocomplete="off"
                                               placeholder="请输入" class="layui-input weight"> <em
@@ -615,7 +664,7 @@
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">扣重</label>
                                    <label class="layui-form-label">扣&nbsp;&nbsp;&nbsp;&nbsp;重</label>
                                    <div class="layui-input-block">
                                        <input id="deOther" type="text" name="deOther" autocomplete="off"
                                               placeholder="请输入" class="layui-input weight"> <em
@@ -625,7 +674,7 @@
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">单价</label>
                                    <label class="layui-form-label">单&nbsp;&nbsp;&nbsp;&nbsp;ä»·</label>
                                    <div class="layui-input-block">
                                        <input id="price" type="text" name="price" autocomplete="off"
                                               placeholder="请输入" class="layui-input weight"> <em
@@ -635,7 +684,7 @@
                            </div>
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">杂质</label>
                                    <label class="layui-form-label">杂&nbsp;&nbsp;&nbsp;&nbsp;è´¨</label>
                                    <div class="layui-input-block">
                                        <input id="perImpurity" type="text" name="perImpurity" autocomplete="off"
                                               placeholder="请输入" class="layui-input weight"> <em
@@ -647,7 +696,7 @@
                                <div class="layui-form-item">
                                    <label class="layui-form-label">入库重量</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="recordWeight" placeholder="自动计算"
                                        <input type="text" name="recordWeight" placeholder="自动计算,不可编辑"
                                               autocomplete="off" class="layui-input rkbk-search-input"
                                               disabled> <em class="kccz-data-dw">KG</em>
                                    </div>
@@ -666,7 +715,7 @@
                                <div class="layui-form-item">
                                    <label class="layui-form-label">结算重量</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="settleWeight" placeholder="自动计算"
                                        <input type="text" name="settleWeight" placeholder="自动计算,不可编辑"
                                               autocomplete="off" class="layui-input rkbk-search-input"
                                               disabled> <em class="kccz-data-dw">KG</em>
                                    </div>
@@ -683,17 +732,19 @@
                            </div>
                            <div class="layui-col-xs12">
                                <div style="height: 40px" id="btn_register">
                                    <input type="button" value="读身份证" style="height: 34px;line-height: 34px;right: 120px;width: 100px"
                                    <input type="button" value="读身份证"
                                           style="height: 34px;line-height: 34px;right: 120px;width: 100px;"
                                           class="rkbk-search-btn layui-btn" onclick="flushIdCard()">
                                    <input type="button" value="读车牌" style="height: 34px;line-height: 34px;width: 100px"
                                           class="rkbk-search-btn layui-btn" onclick="flushData(null,null)">
                                    <input type="button" value="读车牌"
                                           style="height: 34px;line-height: 34px;width: 100px;"
                                           class="rkbk-search-btn layui-btn" onclick="flushPlateNum()">
                                </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="userName1" placeholder="请输入" class="layui-input">
                                        <input type="text" name="userName" placeholder="请输入" class="layui-input">
                                    </div>
                                </div>
                            </div>
@@ -701,7 +752,7 @@
                                <div class="layui-form-item">
                                    <label class="layui-form-label color-red">身份证号</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="userId1" id="userId1" placeholder="请输入"
                                        <input type="text" name="userId" id="userId" placeholder="请输入"
                                               autocomplete="off" class="layui-input">
                                    </div>
                                </div>
@@ -710,7 +761,7 @@
                                <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="请输入"
                                        <input type="text" name="plateNum" id="plateNum" placeholder="请输入"
                                               autocomplete="off" class="layui-input">
                                    </div>
                                </div>
@@ -734,9 +785,11 @@
                                </div>
                            </div>
                            <div class="layui-col-xs8" style="padding-left: 50px;color: #2ab5ad;margin-top: -5px">
                            <div class="layui-col-xs8" style="padding-left: 50px;color: #2ab5ad;">
                                è¯´æ˜Žï¼š
                                <span style="color: #2ab5ad;">1. å‡€é‡=毛重-皮重;入库重量=结算重量=净重-扣重;</span>
                                <span style="color: #2ab5ad;">
                                        1. å‡€é‡=毛重-皮重;入库重量=结算重量=净重-扣重;
                                    </span>
                            </div>
                        </form>
                    </div>
fzzy-igdss-web/src/main/resources/templates/snapRecord/snapRecord.html
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,105 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<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">
    <th:block th:include="include :: header('智能抓拍')" />
    <link rel="stylesheet" type="text/css" th:href="@{/ajax/libs/layui-ruoyi/css/layui.css}"/>
    <link rel="stylesheet" th:href="@{/snapRecord/snapRecord-style.css}">
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="snapRecord-form">
                <div class="select-list">
                    <ul>
                        <li>
                            æ‰€å±žä»“库:<input type="text" name="deptId"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="searchRecord()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>
        <div class="col-sm-12 " style="padding-top: 10px;">
            <!-- å›¾ç‰‡ç½‘æ ¼ -->
            <div class="gallery-grid" id="gallery-container">
                <!-- å›¾ç‰‡ä¸ºç©ºæ—¶æ˜¾ç¤º -->
                <div th:if="${#lists.isEmpty(snapRecordList)}" class="empty-state">
                    <i class="fa-solid fa-camera-slash"></i>
                    <h3>暂无抓拍记录</h3>
                    <p>当前没有可展示的抓拍记录数据</p>
                </div>
                <!-- å›¾ç‰‡å¡ç‰‡ -->
                <div th:each="snapRecord : ${snapRecordList}" class="gallery-item">
<!--                    <img th:src="${snapRecord.imgPath}" th:alt="${snapRecord.id}"-->
<!--                         th:data-url="${snapRecord.imgPath}" th:data-id="${snapRecord.id}"-->
                    <img th:src="@{/logo-sm.png}" th:alt="${snapRecord.id}"
                         th:data-url="@{/logo-sm.png}" th:data-id="${snapRecord.id}"
                         class="gallery-img" onclick="showSnapRecordPreview(this.getAttribute('data-url'))">
                    <div class="gallery-info">
                        <div class="gallery-header">
                            <h3 class="gallery-title" th:text="${snapRecord.id}"></h3>
                        </div>
                        <div class="gallery-meta">
                            <div class="meta-item">
                                <i class="layui-icon layui-icon-home"></i>
                                <span th:text="${snapRecord.deptId}"></span>
                            </div>
                            <div class="meta-item">
                                <i class="layui-icon layui-icon-video"></i>
                                <span th:text="${snapRecord.cameraId}"></span>
                            </div>
                            <div class="meta-item">
                                <i class="layui-icon layui-icon-date"></i>
                                <span th:text="${#dates.format(snapRecord.snapTime, 'yyyy-MM-dd HH:mm:ss')}"></span>
                            </div>
                        </div>
                        <!-- æ ‡ç­¾åˆ—表 -->
                        <div class="gallery-tags">
                            <span class="tag-person">
                                <i class="layui-icon layui-icon-face-smile"></i>
                                <span>测试标签</span>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
            <!-- åˆ†é¡µæŽ§ä»¶ -->
            <div class="pagination-container" th:if="${not #lists.isEmpty(snapRecordList)}">
                <div id="pagination"></div>
            </div>
        </div>
    </div>
    <!-- å›¾ç‰‡é¢„览层 -->
    <div class="img-preview" id="imgPreview">
        <div class="preview-content">
            <img src="" alt="预览图片" class="preview-img" id="previewImg">
            <div class="close-preview" id="closePreview">
                <i class="layui-icon layui-icon-clear"></i>
            </div>
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<script th:src="@{/ajax/libs/layui-ruoyi/layui.js}"></script>
<script th:src="@{/snapRecord/snapRecord.js}"></script>
<script th:inline="javascript">
    var currentPage = [[${currentPage}]];
    var totalItems = [[${totalItems}]];
    var pageSize = [[${pageSize}]];
</script>
</body>
</html>