多单位版国产化地质资料管理系统
1、提交验收按钮新增判断是否关联附件
2、借阅暂存添加不可外借新增提醒
3、成果表单借阅管理修改为借阅记录
4、合格资料模块,导出文件按钮需要添加日志
5、装盒按钮调整:需要一个确认按钮并且可以更改盒号,调整盒号时能同步展示盒号容量
6、对接斑马打印机
7、利用用户修改
22个文件已修改
3个文件已添加
1079 ■■■■ 已修改文件
src/main/java/com/zbooksoft/gdmis/common/ZT411RFIDPrintService.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zbooksoft/gdmis/common/ZipUtil.java 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zbooksoft/gdmis/common/operate/UtilizationUserOperate.java 158 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zbooksoft/gdmis/controller/CatAjjxxController.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zbooksoft/gdmis/controller/CatYswjxxController.java 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zbooksoft/gdmis/controller/CommonController.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zbooksoft/gdmis/controller/ScanPrintController.java 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zbooksoft/gdmis/controller/UtilizationUserController.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zbooksoft/gdmis/controller/UtlStatisticsController.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zbooksoft/gdmis/dao/UtilizationUserMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zbooksoft/gdmis/dao/UtilizationUserMapper.xml 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zbooksoft/gdmis/data/entity/PackingManage.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zbooksoft/gdmis/operate/TransferOperate.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zbooksoft/gdmis/service/UtilizationUserService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zbooksoft/gdmis/service/impl/PhysicalDetailServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zbooksoft/gdmis/service/impl/UtilizationUserServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zbooksoft/gdmis/service/impl/XmlServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/WEB-INF/view/gh/borrow/index.jsp 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/WEB-INF/view/gh/catAjjxx/boxIndex.jsp 227 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/WEB-INF/view/gh/catAjjxx/checkIndex.jsp 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/WEB-INF/view/gh/catAjjxx/importXmlIndex.jsp 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/WEB-INF/view/gh/utilizationUser/register3.jsp 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/WEB-INF/view/gh/utlStatistics/utlStatisticsByDept.jsp 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/WEB-INF/view/gh/utlStatistics/utlStatisticsByUser.jsp 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/WEB-INF/view/scanPrint/scanInPrint.jsp 106 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zbooksoft/gdmis/common/ZT411RFIDPrintService.java
@@ -5,7 +5,7 @@
import com.ruili.wcp.common.SpringContextUtil;
import com.zbooksoft.gdmis.config.ArchivesCustomConfig;
import com.zbooksoft.gdmis.data.entity.CatAjjxx;
import com.zbooksoft.gdmis.data.entity.CatYswjxx;
import com.zbooksoft.gdmis.data.entity.PackingManage;
import com.zbooksoft.gdmis.service.CatAjjxxService;
import com.zbooksoft.gdmis.service.CatYswjxxService;
@@ -68,6 +68,7 @@
        }
    }
    private String buildZPLForRFID(CatAjjxx catAjjxx, PackingManage packingManage, int num) {
        StringBuilder zpl = new StringBuilder();
@@ -104,43 +105,6 @@
        return zpl.toString();
    }
//    private String buildZPLForRFID(CatAjjxx catAjjxx, PackingManage packingManage, int num) {
//
//        StringBuilder zpl = new StringBuilder();
//
//        String xmmc = catAjjxx.getXmkyqmc();
//        List<String> wrappedLines = wrapText(xmmc, 40, 3); // 每行最大宽度20
//        String dh = catAjjxx.getDh();
//        String boxNumber = packingManage.getBoxNumber();
//        // 开始标签格式
//        zpl.append("^XA\n");
//        // 设置打印速度和浓度
//        zpl.append("^PRB\n"); // 设置为默认速度
//        zpl.append("^MD50\n"); // 设置浓度
//        zpl.append("^CW1,E:SIMSUN.TTF\n"); //设置字体
//        zpl.append("^CI28\n"); //设置编码
//        // 写入RFID数据
//        String newBarCode = "A" + boxNumber;
//        String epcDataNew = String.format("%24s", newBarCode).replace(' ', '0');
//        zpl.append("^RFW,H,2,12,1^FD").append(epcDataNew).append("^FS\n");
//        zpl.append("^FO133,59^A1N,40,40^FD").append("档号:").append(dh).append("^FS\n");
//        zpl.append("^FO133,129^A1N,40,40^FD").append("类别:地1、样1").append("^FS\n");
//        zpl.append("^FO133,200^A1N,40,40^FD").append("件数:").append(num).append("^FS\n");
//        for (int i = 0; i < wrappedLines.size(); i++) {
//            if (i == 0) {
//                zpl.append("^FO133,279^A1N,40,40^FD").append("题名:").append(wrappedLines.get(i)).append("^FS\n");
//            } else {
//                zpl.append("^FO261,").append(80 * i).append("^A1N,40,40^FD").append(wrappedLines.get(i)).append("^FS\n");
//            }
//        }
//        // 条形码
//        zpl.append("^FO500,550^BY2^BCN,200,Y,N,N^FD").append(boxNumber).append("^FS\n");
//        // 结束标签格式
//        zpl.append("^XZ\n");
//
//        return zpl.toString();
//    }
    public static void main(String[] args) {
        String all = "南海珠江口盆地海洋工程地质调查(珠五井幅)(珠江口盆地珠五副海洋工程地质调查报)";
src/main/java/com/zbooksoft/gdmis/common/ZipUtil.java
@@ -1,11 +1,18 @@
package com.zbooksoft.gdmis.common;
import com.ruili.wcp.configsettting.SystemConfig;
import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.multipart.MultipartFile;
import java.io.*;
import java.nio.charset.Charset;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Enumeration;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import java.util.zip.ZipOutputStream;
/**
@@ -134,4 +141,68 @@
        boolean directory = path.isDirectory();
        System.out.println(directory);
    }
    /**
     * 解压zip文件
     *
     * @param multipartFile
     */
    private String unzip(MultipartFile multipartFile, String dataSource) throws Exception {
        try {
            //metaBusActivity
            String fileName = multipartFile.getOriginalFilename();
            SystemConfig config = SystemConfig.getInstance();
            Date date = new Date();
            SimpleDateFormat formatter = new SimpleDateFormat("yyyyMM");
            SimpleDateFormat formatterYear = new SimpleDateFormat("yyyy");
            String strDate = formatter.format(date);
            String formatYear = formatterYear.format(date);
            // 待接收 /部门编号/年度/年度月份/
            String destDir = config.getAttachUploadPath() + "待接收" + File.separator + formatYear + File.separator + strDate + File.separator + dataSource;
            String filePath = destDir + File.separator + fileName.substring(0, fileName.indexOf('.'));
            File fileFolder = new File(destDir);
            // 存入文件夹
            if (!fileFolder.exists() && !fileFolder.isDirectory()) {
                fileFolder.mkdirs();
            }
            File targetFile = new File(fileFolder, fileName);
            multipartFile.transferTo(targetFile);
            ZipFile zp = null;
            //指定编码,否则压缩包里面不能有中文目录
            zp = new ZipFile(targetFile, Charset.forName("gbk"));
            //遍历里面的文件及文件夹
            Enumeration entries = zp.entries();
            while (entries.hasMoreElements()) {
                ZipEntry entry = (ZipEntry) entries.nextElement();
                String zipEntryName = entry.getName();
                InputStream in = zp.getInputStream(entry);
                String outpath = (filePath + File.separator + zipEntryName).replace("/", File.separator);
                //判断路径是否存在,不存在则创建文件路径
                File file = new File(outpath.substring(0, outpath.lastIndexOf(File.separator)));
                if (!file.exists()) {
                    file.mkdirs();
                }
                //判断文件全路径是否为文件夹,如果是,不需要解压
                if (new File(outpath).isDirectory()) {
                    continue;
                }
                OutputStream out = new FileOutputStream(outpath);
                byte[] bf = new byte[2048];
                int len;
                while ((len = in.read(bf)) > 0) {
                    out.write(bf, 0, len);
                }
                in.close();
                out.close();
            }
            zp.close();
            return filePath;
        } catch (Exception e) {
            throw new Exception("解压失败");
        }
    }
}
src/main/java/com/zbooksoft/gdmis/common/operate/UtilizationUserOperate.java
New file
@@ -0,0 +1,158 @@
package com.zbooksoft.gdmis.common.operate;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruili.wcp.common.EncryptUtil;
import com.ruili.wcp.common.SpringContextUtil;
import com.ruili.wcp.data.entity.management.Dept;
import com.ruili.wcp.data.entity.management.Role;
import com.ruili.wcp.data.entity.management.User;
import com.ruili.wcp.engine.form.IFormData;
import com.ruili.wcp.service.management.DeptService;
import com.ruili.wcp.service.management.RoleService;
import com.ruili.wcp.service.management.UserService;
import com.ruili.wcp.web.model.AjaxResponse;
import com.ruili.wcp.web.model.ErrorInfo;
import com.zbooksoft.gdmis.data.entity.UtilizationUser;
import com.zbooksoft.gdmis.service.UtilizationUserService;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.core.JdbcTemplate;
import java.lang.reflect.InvocationTargetException;
import java.text.SimpleDateFormat;
import java.util.*;
/**
 * @Description:利用审批用户操作
 * @Author: zhai
 * @Date: 2024/8/26
 **/
public class UtilizationUserOperate {
    private static final Logger logger = LoggerFactory.getLogger(UtilizationUserOperate.class);
    JdbcTemplate jdbcTemplate = (JdbcTemplate) SpringContextUtil.getBean("jdbcTemplate");
    UtilizationUserService utilizationUserService = (UtilizationUserService) SpringContextUtil.getBean("utilizationUserServiceImpl");
    UserService userService = (UserService) SpringContextUtil.getBean("userServiceImpl");
    DeptService deptService = (DeptService) SpringContextUtil.getBean("deptServiceImpl");
    RoleService roleService = (RoleService) SpringContextUtil.getBean("roleServiceImpl");
    IFormData iform = (IFormData) SpringContextUtil.getBean("iFormData");
    /**
     * 审批通过
     *
     * @param viewId
     * @param idList
     * @return
     * @throws InvocationTargetException
     * @throws IllegalAccessException
     */
    public AjaxResponse registrationApproval(Long viewId, ArrayList<Long> idList) {
        Subject currentUser = SecurityUtils.getSubject();
        Session session = currentUser.getSession();
        User user = (User) session.getAttribute("user");
        try {
            String approval = user.getTrueName();
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
            String approvalDate = sdf.format(new Date());
            Long approvalId = user.getUserId();
//            String updateSql = "UPDATE UTL_UTILIZATION_USER SET APPROVAL_DATE ='" + approvalDate + "',APPROVAL_ID =" + approvalId + " , APPROVAL = '" + approval + "' WHERE  ID IN (" + StringUtils.join(idList, ",") + ")";
//            String strSql = "update " + view.getMainTableName() + " set fbzt = 1 , FBRQ = TO_DATE('" + formattedDate + "', 'YYYY-MM-DD')";
            String updateSql = "UPDATE UTL_UTILIZATION_USER SET APPROVAL_DATE = TO_DATE('" + approvalDate + "', 'YYYY-MM-DD'),APPROVAL_ID =" + approvalId + " , APPROVAL = '" + approval + "' WHERE  ID IN (" + StringUtils.join(idList, ",") + ")";
            jdbcTemplate.update(updateSql);
            return new AjaxResponse(true);
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
            return new AjaxResponse(new ErrorInfo(e.getMessage()), false);
        }
    }
    /**
     * 删除后事件
     *
     * @param viewId
     * @param idList
     * @return
     */
    public AjaxResponse afterDelete(Long viewId, ArrayList<Long> idList) {
        for (int i = 0; i < idList.size(); i++) {
            try {
                UtilizationUser utilizationUser = utilizationUserService.getById(idList.get(i));
                Long userId = utilizationUser.getUserId();
                userService.removeById(userId);
            } catch (Exception e) {
                logger.error(e.getMessage(), e);
                return new AjaxResponse(new ErrorInfo(e.getMessage()), false);
            }
        }
        return new AjaxResponse(true);
    }
    /**
     * 人工添加利用用户保存后事件
     *
     * @param formId
     * @param keyId
     * @param formData
     * @return
     */
    public AjaxResponse afterSave(Long formId, Long keyId, Map<String, Object> formData) {
        String utilizationUserId = formData.get("USER_ID") == null ? "" : formData.get("USER_ID").toString();
        String cardId = formData.get("ID_CARD").toString();
        String mobile = formData.get("MOBILE").toString();
        String userName = formData.get("USER_NAME").toString();
        String pwd = cardId.substring(cardId.length() - 6, cardId.length());
        String md5Pwd = EncryptUtil.getInstance().MD5(pwd);
        User user = new User();
        if (StringUtils.isNotEmpty(utilizationUserId)) {
            user = userService.getUserById(Long.parseLong(utilizationUserId));
            //登录名为身份证号,唯一性
            user.setUserName(cardId);
            //默认取身份证后六位作为密码
            user.setPassword(md5Pwd);
            user.setTrueName(userName);
            user.setMobilePhone(mobile);
            userService.saveOrUpdate(user);
        } else {
            //登录名为身份证号,唯一性
            user.setUserName(cardId);
            //默认取身份证后六位作为密码
            user.setPassword(md5Pwd);
            user.setTrueName(userName);
            Byte enableLogin = 1;
            user.setEnableLogin(enableLogin);
            user.setUserType(1);
            user.setMobilePhone(mobile);
            user.setCreateTime(new Date());
            //用户设置为外部用户
            LambdaQueryWrapper<Dept> wrapper = new LambdaQueryWrapper<>();
            wrapper.eq(Dept::getDeptName, "外部用户");
            Dept dept = deptService.getOne(wrapper);
            user.setDeptId(dept.getDeptId());
            user.setDeptName("外部用户");
            //插入系统用户表
            userService.saveUser(user);
            Long userId = user.getUserId();
            HashMap<String, Object> insertMap = new HashMap<>();
            insertMap.put("ENABLE_LOGIN", 1);
            insertMap.put("PASSWORD", pwd);
            insertMap.put("LOGIN_NAME", cardId);
            insertMap.put("USER_ID", userId);
            iform.update(1826177548856377345L, insertMap, keyId);
            //初始化用户默认角色
            List<Role> roles = roleService.addUserToDefaultRole(user.getUserId());
        }
        return new AjaxResponse(true);
    }
}
src/main/java/com/zbooksoft/gdmis/controller/CatAjjxxController.java
@@ -37,7 +37,9 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.zip.ZipFile;
import static cn.hutool.core.util.ZipUtil.unzip;
import static com.zbooksoft.gdmis.common.XmlUtil.getDocument;
@@ -101,10 +103,34 @@
    @RequiresUser
    public Object importXML(@RequestParam(value = "file", required = false) MultipartFile file, String startData, String endData) {
        try {
            Document document = getDocument(file);
            Element rootElement = document.getRootElement();
            String rootName = rootElement.getName();
            ArchivesCustomConfig archivesCustomConfig = customConfigUtil.getConfigObj(ArchivesCustomConfig.class);
            String uploadPath = archivesCustomConfig.getOriginalPath();
            //判断传过来的文件是不是压缩包
            if (file.getOriginalFilename().endsWith(".zip")) {
                String tempDir = System.getProperty("java.io.tmpdir");
                String extractPath = tempDir + File.separator + "temp_" + System.currentTimeMillis();
                File extractDir = new File(extractPath);
                extractDir.mkdirs();
                String originalFilename = file.getOriginalFilename().substring(0, file.getOriginalFilename().lastIndexOf("."));
                try {
                    // 保存上传的 ZIP 文件到临时位置
                    File zipFile = new File(extractPath + File.separator + file.getOriginalFilename());
                    file.transferTo(zipFile);
                    // 解压 ZIP 文件
                    unzip(zipFile.getAbsolutePath(), uploadPath);
                    String xmlPath = uploadPath + File.separator + originalFilename + File.separator + "管理性文件" + File.separator + "资料文件目录.xml";
                    Document document = getDocument(xmlPath);
            xmlService.readXml(document, startData, endData);
                } finally {
                    // 清理临时文件
                    deleteDir(extractDir);
                }
            } else {
                Document document = getDocument(file);
                xmlService.readXml(document, startData, endData);
            }
            return new AjaxResponse(true);
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
@@ -603,5 +629,17 @@
        }
        return totalSize;
    }
    private void deleteDir(File dir) {
        if (dir.isDirectory()) {
            File[] files = dir.listFiles();
            if (files != null) {
                for (File file : files) {
                    deleteDir(file);
                }
            }
        }
        dir.delete();
    }
}
src/main/java/com/zbooksoft/gdmis/controller/CatYswjxxController.java
@@ -1,7 +1,9 @@
package com.zbooksoft.gdmis.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruili.wcp.common.CustomConfigUtil;
import com.ruili.wcp.common.LogUtils;
import com.ruili.wcp.common.StringUtil;
import com.ruili.wcp.common.excel.PoiUtil;
import com.ruili.wcp.configsettting.SystemConfig;
@@ -12,7 +14,10 @@
import com.ruili.wcp.service.config.ViewService;
import com.ruili.wcp.web.model.AjaxResponse;
import com.ruili.wcp.web.model.ErrorInfo;
import com.zbooksoft.gdmis.common.*;
import com.zbooksoft.gdmis.common.PdfUtil;
import com.zbooksoft.gdmis.common.UsbSyncExampleWindows;
import com.zbooksoft.gdmis.common.UsbSyncExampleWindowsItem;
import com.zbooksoft.gdmis.common.UsbSyncExampleWindowsItemCg;
import com.zbooksoft.gdmis.data.entity.CatYswjxx;
import com.zbooksoft.gdmis.data.entity.PackingManage;
import com.zbooksoft.gdmis.service.CatCheckService;
@@ -37,12 +42,12 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.text.DecimalFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import static com.zbooksoft.gdmis.common.ZipUtil.copyFile;
import static com.zbooksoft.gdmis.common.ZipUtil.zipFile;
@@ -287,12 +292,14 @@
                                cddzwjlj = newCddzwjlj;
                            }
                            copyFile(cddzwjlj, newSavePath + File.separator + name);
                            //添加导出日志
                            LogUtils.insertLog("合格资料", "导出", "导出合格资料", "导出资料名称:" + wjm, "", request);
                        }
                    }
                }
                // 压缩文件
                generatePath = zipFile(new File(filePath), "rar");
            } catch (Exception ex) {
                logger.error(ex.getMessage(), ex);
            }
@@ -367,6 +374,112 @@
    }
    /**
     * 装盒管理
     *
     * @param type 0:从转孔基本信息进入 1:从钻孔图幅进入
     */
    @RequestMapping({"/boxIndex"})
    @RequiresUser
    public ModelAndView boxIndex() {
        String box = "0001";
        String maxBoxSql = "select max(box_number) from BUS_PACKING_MANAGE WHERE TYPE = 1";
        String boxNum = jdbcTemplate.queryForObject(maxBoxSql, String.class);
        if (boxNum != null || "".equals(boxNum)) {
            int num = Integer.parseInt(boxNum);
            num += 1;
            DecimalFormat df = new DecimalFormat("0000");
            box = df.format(num);
        }
        ModelAndView mv = new ModelAndView("gh/catAjjxx/boxIndex");
        mv.addObject("boxNum", box);
        return mv;
    }
    /**
     * 获取盒内文件数量
     *
     * @return
     */
    @RequestMapping(value = "/getBoxPageNum")
    @ResponseBody
    @RequiresUser
    public Object getBoxPageNum(String boxNum) {
        try {
            String pageNum = "0";
            String selectSql = "select  max(PAGE_NMU) as nmu from BUS_PACKING_MANAGE WHERE box_number = '" + boxNum + "'";
            List<Map<String, Object>> mapList = jdbcTemplate.queryForList(selectSql);
            if (mapList.size() > 0) {
                pageNum = mapList.get(0).get("nmu") == null ? "0" : mapList.get(0).get("nmu").toString();
            }
            return new AjaxResponse(pageNum);
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
            return new AjaxResponse(new ErrorInfo(e.getMessage()), false);
        }
    }
    /**
     * 原始文件装盒
     *
     * @return
     */
    @RequestMapping(value = "/packagingBoxYs")
    @ResponseBody
    @RequiresUser
    public Object packagingBoxYs(String boxNum, @RequestBody ArrayList<Long> idList) {
        try {
            String box = boxNum;
            String pageNum = "0";
            String selectSqlPage = "select max(PAGE_NMU) as nmu from BUS_PACKING_MANAGE WHERE box_number = '" + boxNum + "'";
            List<Map<String, Object>> mapList = jdbcTemplate.queryForList(selectSqlPage);
            if (mapList.size() > 0) {
                pageNum = mapList.get(0).get("nmu") == null ? "0" : mapList.get(0).get("nmu").toString();
            }
            int newPage = Integer.parseInt(pageNum);
            for (int i = 0; i < idList.size(); i++) {
                String selectSql = "select * from CAT_ITEM_YSWJXX  where id = " + idList.get(i);
                Map<String, Object> map = jdbcTemplate.queryForMap(selectSql);
                String itemNum = StringUtil.nullToEmpty(map.get("DH")).trim();
                String id = StringUtil.nullToEmpty(map.get("ID")).trim();
                String ajId = StringUtil.nullToEmpty(map.get("AJ_ID")).trim();
                QueryWrapper<PackingManage> packingManageQueryWrapper = new QueryWrapper<>();
                packingManageQueryWrapper.eq("item_id", idList.get(i));
                PackingManage packingManage = new PackingManage();
                List<PackingManage> packingManageList = packingManageService.list(packingManageQueryWrapper);
                if (packingManageList.size() > 0) {
                    packingManage = packingManageList.get(0);
                }
                packingManage.setItemId(id);
                packingManage.setAjId(ajId);
                packingManage.setCreateTime(new java.util.Date());
                packingManage.setType(1);
                String zzys = map.get("ZZYS") == null ? "0" : map.get("ZZYS").toString();
                if (newPage + Integer.parseInt(zzys) > 500) {
                    int num = Integer.parseInt(box);
                    num += 1;
                    DecimalFormat df = new DecimalFormat("0000");
                    String newBox = df.format(num);
                    box = newBox;
                    newPage = Integer.parseInt(zzys);
                } else {
                    newPage = newPage + Integer.parseInt(zzys);
                }
                packingManage.setPageNmu(newPage);
                packingManage.setItemNum(itemNum + "-" + box);
                packingManage.setBoxNumber(box);
                packingManageService.saveOrUpdate(packingManage);
                String updateSql = "update CAT_ITEM_YSWJXX set HH = '" + box + "' where id = " + idList.get(i);
                jdbcTemplate.update(updateSql);
            }
            return new AjaxResponse(true);
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
            return new AjaxResponse(new ErrorInfo(e.getMessage()), false);
        }
    }
    /**
     * @param type 0 是成果 1 是原始
     * @return
     */
src/main/java/com/zbooksoft/gdmis/controller/CommonController.java
@@ -1,6 +1,9 @@
package com.zbooksoft.gdmis.controller;
import com.ruili.wcp.service.config.ModuleService;
import com.ruili.wcp.web.model.AjaxResponse;
import com.ruili.wcp.web.model.ErrorInfo;
import com.zbooksoft.gdmis.data.vo.UserInfo;
import com.zbooksoft.gdmis.service.*;
import org.apache.shiro.authz.annotation.RequiresUser;
import org.slf4j.Logger;
@@ -9,7 +12,12 @@
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
@@ -36,8 +44,8 @@
//    @Autowired
//    ProcessingDetailService processingDetailService;
//
//    @Autowired
//    UtilizationUserService utilizationUserService;
    @Autowired
    UtilizationUserService utilizationUserService;
    private static final Logger logger = LoggerFactory.getLogger(CommonController.class);
@@ -77,4 +85,26 @@
        mav.addObject("ysFailed", ysFailed);
        return mav;
    }
    @RequestMapping(value = "/getUserInfo", produces = "application/json; charset=utf-8", method = RequestMethod.POST)
    @ResponseBody
    @RequiresUser
    public Object getUserInfo(String userId) {
        try {
            Date date = new Date();
            // 创建一个 SimpleDateFormat 对象,指定日期格式
            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
            // 将 Date 对象转换为字符串
            String dateString = dateFormat.format(date);
            UserInfo userInfo = utilizationUserService.selectUtilizationUser(Long.parseLong(userId), dateString);
            if (userInfo == null) {
                return new AjaxResponse(new ErrorInfo("未查询到用户登记信息"), false);
            }
            return new AjaxResponse(userInfo);
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
            return new AjaxResponse(new ErrorInfo(e.getMessage()), false);
        }
    }
}
src/main/java/com/zbooksoft/gdmis/controller/ScanPrintController.java
@@ -24,10 +24,7 @@
import org.springframework.web.servlet.ModelAndView;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
 * @Description
@@ -105,15 +102,8 @@
    @RequiresUser
    @ResponseBody
    public Object saveScanPrintData(@RequestBody List<Map<String, Object>> data, int printType, Long viewId, String boxNum) {
        Subject currentUser = SecurityUtils.getSubject();
        Session session = currentUser.getSession();
        User user = (User) session.getAttribute("user");
        try {
            View view = viewService.getViewById(viewId);
            String mainTableName = view.getMainTableName();
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            if (data != null && data.size() > 0) {
                if (printType == 0) { //入库扫描
                    updateWarehousing(data, boxNum);
@@ -140,6 +130,38 @@
            logger.error(e.getMessage());
        }
        return data;
    }
    /**
     * @Description 保存扫描枪数据
     * @Date 2020/12/12
     * printType 扫描类型 1.出 0. 进
     * operationType 操作类型 1 出入库  2 销毁
     **/
    @RequestMapping(value = "/getBoxNum")
    @RequiresUser
    @ResponseBody
    public Object getBoxNum(@RequestBody List<Map<String, Object>> data) {
        ArrayList<String> boxNumList = new ArrayList<>();
        try {
            for (int i = 0; i < data.size(); i++) {
                String archivalCode = (String) data.get(i).get("archival_code");
                String sqlSelect = "select * from BUS_PACKING_MANAGE where ITEM_NUM = '" + archivalCode + "'";
                Map<String, Object> packingMap = jdbcTemplate.queryForMap(sqlSelect);
                long itemId = Long.parseLong(packingMap.get("ITEM_ID").toString());
                String sql = "select * from BUS_WAREHOUSING where item_id =" + itemId + " and IN_STATUS_CODE =2";
                List<Map<String, Object>> mapList = jdbcTemplate.queryForList(sql);
                if (mapList.size() > 0) {
                    String sqlUpdateBox = "SELECT BOX_NUMBER FROM  BUS_PACKING_MANAGE   WHERE ID=" + packingMap.get("ID");
                    String boxNum = jdbcTemplate.queryForObject(sqlUpdateBox, String.class);
                    boxNumList.add(boxNum);
                }
            }
            return new AjaxResponse(boxNumList);
        } catch (Exception e) {
            return new AjaxResponse(false);
        }
    }
    /**
@@ -180,6 +202,9 @@
     * @Date 2020/12/13
     **/
    private void returnWarehousing(List<Map<String, Object>> data) {
        Subject currentUser = SecurityUtils.getSubject();
        Session session = currentUser.getSession();
        User user = (User) session.getAttribute("user");
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        //更新出库状态
        for (int i = 0; i < data.size(); i++) {
@@ -194,9 +219,8 @@
                Map<String, Object> map = mapList.get(0);
                Date date = new Date();
                String format = sdf.format(date);
                String sqlUpdate = "update BUS_WAREHOUSING SET IN_STATUS_CODE=2, OUT_STATUS='待入库', IN_TIME='" + format + "' WHERE ID=" + map.get("ID");
                String sqlUpdate = "update BUS_WAREHOUSING SET ACCEPT_USER = '" + user.getTrueName() + "', IN_STATUS_CODE=2, OUT_STATUS='待入库', IN_TIME='" + format + "' WHERE ID=" + map.get("ID");
                jdbcTemplate.update(sqlUpdate);
                String sqlUpdateBox = "update BUS_PACKING_MANAGE SET ITEM_STATE='已归还'  WHERE ID=" + packingMap.get("ID");
                jdbcTemplate.update(sqlUpdateBox);
            }
src/main/java/com/zbooksoft/gdmis/controller/UtilizationUserController.java
@@ -137,10 +137,10 @@
            User user = new User();
            String userName = formData.get("USER_NAME").toString();
            String sex = formData.get("SEX").toString();
            String province = formData.get("PROVINCE").toString();
            String city = formData.get("CITY").toString();
//            String province = formData.get("PROVINCE").toString();
//            String city = formData.get("CITY").toString();
            String deptNames = formData.get("DEPT").toString();
            String deptNature = formData.get("DEPT_NATURE").toString();
//            String deptNature = formData.get("DEPT_NATURE").toString();
            String deptAddress = formData.get("DEPT_ADDRESS").toString();
            String postCode = formData.get("POST_CODE").toString();
            String certificateNumber = formData.get("CERTIFICATE_NUMBER").toString();
@@ -198,8 +198,8 @@
            mapData.put("USER_NAME", userName);
            mapData.put("SEX", sex);
            mapData.put("ID_CARD", cardId);
            mapData.put("PROVINCE", province);
            mapData.put("CITY", city);
//            mapData.put("PROVINCE", province);
//            mapData.put("CITY", city);
            mapData.put("DEPT", deptNames);
            mapData.put("POST_CODE", postCode);
            mapData.put("DEPT_ADDRESS", deptAddress);
@@ -212,7 +212,7 @@
            mapData.put("MATERIAL_PURPOSE", materialPurpose);
            mapData.put("JOB", job);
            mapData.put("PROJECT_NAME", projectName);
            mapData.put("DEPT_NATURE", deptNature);
//            mapData.put("DEPT_NATURE", deptNature);
            mapData.put("TRADE", trade);
            mapData.put("CERTIFICATE_NUMBER", certificateNumber);
            mapData.put("USER_ID", userId);
src/main/java/com/zbooksoft/gdmis/controller/UtlStatisticsController.java
@@ -148,18 +148,18 @@
        try {
            List<Map<String, Object>> mapList = new ArrayList<>();
            if (year == null || year.equals("")) {
                String yearSQL = "SELECT DISTINCT YEAR(DATE_TIME) AS YEAR FROM  UTL_VIEW_FORM ";
                String yearSQL = "SELECT DISTINCT EXTRACT(YEAR FROM DATE_TIME) AS YEAR FROM UTL_VIEW_FORM";
                jdbcTemplate.queryForList(yearSQL).forEach(map -> {
                    String years = map.get("YEAR").toString().replace(".0", "");
                    Map<String, Object> hashMap = getCount("YEAR(DATE_TIME)", years);
                    Map<String, Object> hashMap = getCount(" EXTRACT(YEAR FROM DATE_TIME)", years);
                    hashMap.put("year", years);
                    mapList.add(hashMap);
                });
            } else {
                String yearSQL = "SELECT DISTINCT MONTH(DATE_TIME) AS MONTH FROM  UTL_VIEW_FORM where YEAR(DATE_TIME) = '" + year + "'";
                String yearSQL = "SELECT DISTINCT EXTRACT(MONTH FROM DATE_TIME) AS MONTH FROM  UTL_VIEW_FORM where EXTRACT(YEAR FROM DATE_TIME) = '" + year + "'";
                jdbcTemplate.queryForList(yearSQL).forEach(map -> {
                    String month = map.get("MONTH").toString().replace(".0", "");
                    Map<String, Object> hashMap = getCount(" MONTH(DATE_TIME)", month);
                    Map<String, Object> hashMap = getCount(" EXTRACT(MONTH FROM DATE_TIME)", month);
                    hashMap.put("year", year);
                    hashMap.put("month", month);
                    mapList.add(hashMap);
@@ -478,19 +478,22 @@
    public Object getCount() {
        try {
            HashMap<Object, Object> counMap = new HashMap<>();
            String dzzlCountSql = "select count(1) from CAT_FILE_AJJXX where fbzt = 1";
//            String dzzlCountSql = "select count(1) from CAT_FILE_AJJXX where fbzt = 1";
            String dzzlCountSql = "select count(1) from CAT_FILE_AJJXX";
            Integer dzzlCount = jdbcTemplate.queryForObject(dzzlCountSql, Integer.class);
            counMap.put("dzzlCount", dzzlCount);
            String yzCountSql = "select count(1) from CAT_ITEM_YSWJXX where AJ_ID IN (select ID from CAT_FILE_AJJXX where fbzt = 1)";
            String yzCountSql = "select count(1) from CAT_ITEM_YSWJXX";
//            String yzCountSql = "select count(1) from CAT_ITEM_YSWJXX where AJ_ID IN (select ID from CAT_FILE_AJJXX where fbzt = 1)";
            Integer yzCount = jdbcTemplate.queryForObject(yzCountSql, Integer.class);
            counMap.put("yzCount", yzCount);
            String cgCountSql = "select count(1) from CAT_ITEM_CGWJXX where AJ_ID IN (select ID from CAT_FILE_AJJXX where fbzt = 1)";
            String cgCountSql = "select count(1) from CAT_ITEM_CGWJXX ";
//            String cgCountSql = "select count(1) from CAT_ITEM_CGWJXX where AJ_ID IN (select ID from CAT_FILE_AJJXX where fbzt = 1)";
            Integer cgCount = jdbcTemplate.queryForObject(cgCountSql, Integer.class);
            counMap.put("cgCount", cgCount);
            String swCountSql = "select count(1) from CAT_FILE_SWAJXX ";
            String swCountSql = "select count(1) from CAT_FILE_SWYP ";
            Integer swCount = jdbcTemplate.queryForObject(swCountSql, Integer.class);
            counMap.put("swCount", swCount);
src/main/java/com/zbooksoft/gdmis/dao/UtilizationUserMapper.java
@@ -3,6 +3,9 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zbooksoft.gdmis.data.entity.UtilizationUser;
import com.zbooksoft.gdmis.data.vo.UserInfo;
import java.util.Map;
/**
@@ -11,4 +14,5 @@
 * @Date 2024/7/31
 **/
public interface UtilizationUserMapper extends BaseMapper<UtilizationUser> {
    UserInfo selectUtilizationUser(Map<String, Object> params);
}
src/main/java/com/zbooksoft/gdmis/dao/UtilizationUserMapper.xml
New file
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zbooksoft.gdmis.dao.UtilizationUserMapper">
    <select id="selectUtilizationUser" parameterType="map"  resultType="com.zbooksoft.gdmis.data.vo.UserInfo">
    SELECT a.*,
           b.CERTIFICATE_NUM,
           b.PROJECT_TYPE as PROJECT_TYPES,
           b.PROJECT_NAME AS PROJECT_NAMES,
           b.PURPOSE
    FROM UTL_UTILIZATION_USER a
         INNER
             JOIN UTL_USER_CHECK b ON
                     a.id = b.utilization_user_id
                 AND a.user_id = #{userId}
                 AND b.VALID_END >= #{newData}
    </select>
    <select id="selectUtilizationUser" parameterType="map"  resultType="com.zbooksoft.gdmis.data.vo.UserInfo" databaseId="oracle">
        SELECT a.*,
               b.CERTIFICATE_NUM,
               b.PROJECT_TYPE,
               b.PROJECT_NAME,
               b.PURPOSE
        FROM UTL_UTILIZATION_USER a
                 INNER
                     JOIN UTL_USER_CHECK b ON
                    a.id = b.utilization_user_id
                AND a.user_id = #{userId}
                AND b.VALID_END >= TO_DATE(#{newData}, 'YYYY-MM-DD HH24:MI:SS')
    </select>
</mapper>
src/main/java/com/zbooksoft/gdmis/data/entity/PackingManage.java
@@ -64,4 +64,9 @@
     * 资料类型 0:成果资料,1:原始资料
     */
    private Integer type;
    /**
     * 盒内文件页数
     */
    private Integer pageNmu;
}
src/main/java/com/zbooksoft/gdmis/operate/TransferOperate.java
@@ -41,6 +41,11 @@
        try {
            String strSql = "update " + view.getMainTableName() + " set yszt = " + state + " where id = " + idList.get(0);
            jdbcTemplate.execute(strSql);
            String selectCountSql = "select count(*) from CAT_ITEM_YSWJXX where YJ_ID = " + idList.get(0) + " and (WJLJ = '' or  WJLJ is null)";
            int count = jdbcTemplate.queryForObject(selectCountSql, Integer.class);
            if (count > 0) {
                return new AjaxResponse(new ErrorInfo("存在未关联文件,请先关联附件!"), false);
            }
            String updateSql = "update CAT_ITEM_YSWJXX set yszt = " + state + " where  YJ_ID =" + idList.get(0);
            jdbcTemplate.execute(updateSql);
            return new AjaxResponse(true);
src/main/java/com/zbooksoft/gdmis/service/UtilizationUserService.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.extension.service.IService;
import com.zbooksoft.gdmis.data.entity.UtilizationUser;
import com.zbooksoft.gdmis.data.vo.UserInfo;
/**
@@ -10,4 +11,5 @@
 * @Date 2024/7/31
 **/
public interface UtilizationUserService extends IService<UtilizationUser> {
    UserInfo selectUtilizationUser(Long userId, String newData);
}
src/main/java/com/zbooksoft/gdmis/service/impl/PhysicalDetailServiceImpl.java
@@ -109,7 +109,11 @@
        for (Long id : idList) {
            CatSwyp catSwyp = catSwypService.getById(id);
            PhysicalDetail physicalDetail = new PhysicalDetail();
            physicalDetail.setFileId(catSwyp.getAjId());
            Long ajId = catSwyp.getAjId();
            if (ajId == null) {
                ajId = 0L;
            }
            physicalDetail.setFileId(ajId);
            physicalDetail.setItemId(catSwyp.getId());
            physicalDetail.setProjectName(catSwyp.getXmmc());
src/main/java/com/zbooksoft/gdmis/service/impl/UtilizationUserServiceImpl.java
@@ -3,8 +3,12 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zbooksoft.gdmis.dao.UtilizationUserMapper;
import com.zbooksoft.gdmis.data.entity.UtilizationUser;
import com.zbooksoft.gdmis.data.vo.UserInfo;
import com.zbooksoft.gdmis.service.UtilizationUserService;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.Map;
/**
@@ -14,4 +18,11 @@
 **/
@Service
public class UtilizationUserServiceImpl extends ServiceImpl<UtilizationUserMapper, UtilizationUser> implements UtilizationUserService {
    @Override
    public UserInfo selectUtilizationUser(Long userId, String newData) {
        Map<String, Object> params = new HashMap<>();
        params.put("userId", userId);
        params.put("newData", newData);
        return this.baseMapper.selectUtilizationUser(params);
    }
}
src/main/java/com/zbooksoft/gdmis/service/impl/XmlServiceImpl.java
@@ -234,7 +234,7 @@
            map.put("ZZYS", zzys);
            map.put("WJDX", wjdx);
            map.put("WJLX", wjlb);
            map.put("WJLJ", wjlj);
//            map.put("WJLJ", wjlj);
            map.put("GDZTXS", ztxs);
            map.put("QZY", qzy);
            map.put("FTHXBLC", hxblc);
src/main/webapp/WEB-INF/view/gh/borrow/index.jsp
@@ -63,7 +63,10 @@
            <li><a href="javascript:;"><span>3</span>成功提交利用单</a></li>
        </ul>
        <p><span>注意:</span>如果您还需同时借阅其他案件,请先关闭该窗口,继续在查询界面将所需要的案卷添加到借阅单,再一并提交。
            如果您无法勾选,可能这份档案暂不提供外借服务。
        </p>
<%--        <p>如果您无法勾选,可能这份档案暂不提供外借服务,详情请联系相关人员进行咨询。--%>
<%--        </p>--%>
    </div>
    <c:if test="${borrowInfoList.size()==0}">
        <div class="noadd">
@@ -141,6 +144,7 @@
                                                <input type="checkbox" class="flat"
                                                       name="original_no_cg_${borrowInfo.parentBorrowInfo.fileId}"
                                                       id="original_no_${borrowDetail.detailId}" disabled/>调阅原件
                                                <span class="not-borrowable-note" style="color: red">不外借</span>
                                            </c:if>
                                            <c:if test="${ borrowDetail.paperBorrow == 0|| borrowDetail.paperBorrow == null}">
                                                <input type="checkbox" class="flat"
src/main/webapp/WEB-INF/view/gh/catAjjxx/boxIndex.jsp
New file
@@ -0,0 +1,227 @@
<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE HTML>
<html>
<head>
    <base href="<%=basePath%>">
    <meta name="viewport" charset="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>装盒管理</title>
    <!--[if !IE]><!-->
    <link href="static/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css">
    <!--<![endif]-->
    <!--[if gt IE 8]>
    <link href="static/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css">
    <![endif]-->
    <link href="static/plugins/jquery-easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="static/styles/initialize.css" type="text/css">
    <link rel="stylesheet" href="static/styles/common.css" type="text/css">
    <link rel="stylesheet" href="static/plugins/layer/skin/default/layer.css" type="text/css">
    <link rel="stylesheet" href="static/plugins/webuploader/webuploader.css" type="text/css">
    <script type="text/javascript" src="static/plugins/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="static/plugins/jquery-easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="static/plugins/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="static/scripts/easyuiExtend.js"></script>
    <script type="text/javascript" src="static/scripts/jquery-extend.js"></script>
    <script type="text/javascript" src="static/plugins/layer/layer.js"></script>
    <script type="text/javascript" src="static/plugins/slimScroll/jquery.slimscroll.min.js"></script>
    <script type="text/javascript" src="static/plugins/jquery-easyui-datagrid-dnd/datagrid-dnd.js"></script>
    <script src="static/plugins/jquery.redirect.js" type="text/javascript"></script>
    <script type="text/javascript" src="static/plugins/webuploader/webuploader.js"></script>
    <!-- 弹窗加载组件 -->
    <script type="text/javascript" src="static/plugins/layer/layer.js"></script>
    <script type="text/javascript" src="static/plugins/spinjs/spin.js"></script>
    <script type="text/javascript" src="static/plugins/spinjs/jquery.spin.js"></script>
    <script type="text/javascript" src="static/plugins/jquery.blockUI.js"></script>
    <!-- wcp组件 -->
    <script type="text/javascript" src="static/wcp/scripts/wcp.js"></script>
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.layer.js"></script>
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.blockUI.js"></script>
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.spin.js"></script>
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.jquery.js"></script>
    <!--[if lt IE 9]>
    <script type="text/javascript" src="static/plugins/json2.js"></script>
    <![endif]-->
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.infoPicker.js"></script>
    <style>
        .combobox-group {
            clear: both;
        }
        .combobox-gitem {
            float: left;
            padding-right: 10px;
        }
        .progress {
            border: 1px solid #1483d8;
            width: 100%;
            background: #fff;
            height: 18px;
            /*line-height: 20px;*/
            display: inline-block;
            text-align: center;
            color: #6dbfff;
            position: absolute;
            margin-right: 10px;
            top: 290px;
        }
        .progress span.percentage {
            width: 0;
            height: 100%;
            left: 0;
            top: 0;
            background: #1483d8;
            position: absolute;
        }
        .progress span.text {
            position: relative;
            z-index: 10;
        }
    </style>
</head>
<body>
<div class="margin-lr">
    <div class="pt-main-top clear">
        <div class="pt-nav">
                <span class="pt-title-icon"> <i class="fa fa-upload"></i>
                </span>
            <div class="pt-title">
                <div>
                    <h4>打印标签</h4>
                </div>
            </div>
        </div>
    </div>
    <div class="pt-form">
        <form id="formImportTemplate">
            <div class="ptbody">
                <table style="width: 100%;">
                    <tr>
                        <td class="tbtitle">盒号:</td>
                        <td>
                            <div>
                                <input class="easyui-textbox" id="boxNum"
                                       name="boxNum" type="text"
                                       style="height:30px;text-align: left; width: 200px;"
                                       value="${boxNum}"/>
                                <a id="download_but" class="pt-btn pt-btn-primary">查询</a>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="tbtitle">盒内页数:</td>
                        <td>
                            <div>
                                <input class="easyui-textbox" id="boxNumPage"
                                       name="boxNumPage" type="text"
                                       style="height:30px;text-align: left; width: 200px;" value=""/>
                            </div>
                        </td>
                    </tr>
                </table>
                <div class="progress" style="display: none;">
                    <span class="text">0%</span>
                    <span class="percentage"></span>
                </div>
            </div>
            <div class="pt-form-btn">
                <div class="form-group">
                    <a id="btnSave" class="pt-btn pt-btn-primary">确定</a>
                    <a id="btnClose" class="pt-btn pt-btn-default">关闭</a>
                </div>
            </div>
        </form>
    </div>
</div>
</body>
<script type="text/javascript" src="static/scripts/ResizeScroll.js"></script>
<script>
    //窗口参数,用于弹窗传递
    var params = {
        callBack: null
    };
    var type = "${type}";
    $(function () {
        initSelectProject();
        new ResizeScroll({
            "id": ".ptbody",
            fun: function () {
                var wh = $(window).height();
                $("body").height(wh);
                return (wh - 69 - 62);
            }
        });
        $("#download_but").click(function () {
            var boxNum = $("#boxNum").textbox("getValue");
            wcp.ui.setBusy("body", wcp.ajax({
                url: "catYswjxx/getBoxPageNum?boxNum=" + boxNum
            }).done(function (result) {
                debugger;
                $("#boxNumPage").textbox("setValue",result);
            }));
        });
        $("#btnSave").click(function () {
            var boxNum = $("#boxNum").textbox("getValue");
            var idList = params.ids;
            wcp.ui.setBusy("body", wcp.ajax({
                url: "catYswjxx/packagingBoxYs?boxNum=" + boxNum ,
                data: JSON.stringify(idList)
            }).done(function (result) {
                //判断是否需要执行回调函数
                if (params.callBack) {
                    params.callBack();
                }
                //关闭窗口
                closeWindow();
                top.wcp.notify.success("保存成功!");
            }));
        });
        $("#btnClose").click(function () {
            closeWindow();
        });
    });
    function initSelectProject() {
        var data = [
            {
                id: "盒子",
                name: "盒子"
            }, {
                id: "文件",
                name: "文件"
            }
        ];
        $('#WJLX').combobox('loadData', data);
        // 绑定选中事件
        $('#WJLX').combobox({
            onSelect: function (record) {
            }
        });
    }
    function closeWindow() {
        var index = top.layer.getFrameIndex(window.name); //获取窗口索引
        top.layer.close(index);
    }
</script>
</html>
src/main/webapp/WEB-INF/view/gh/catAjjxx/checkIndex.jsp
@@ -232,7 +232,6 @@
            fixed: false,
            content: "gdMisManage/selectCheckQuestion",
            success: function (layero, index) {
                console.log("layero", layero)
                var body = window.top.layer.getChildFrame('body', index);
                var iframeWin = window.top[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
@@ -247,6 +246,7 @@
    }
    window.selectQuestionCallBack = function (selectMineral) {
        $("input[radiobuttonName='isOk'][value='-1']").radiobutton('check');
        checkQuestion = selectMineral;
    };
src/main/webapp/WEB-INF/view/gh/catAjjxx/importXmlIndex.jsp
@@ -167,8 +167,8 @@
    var fileName;
    var uploader;
    var falg = false;
    var _extensions = "xml";
    var _mimeTypes = ".xml";
    var _extensions = "xml,zip";
    var _mimeTypes = ".xml,.zip";
    var _mountFileFlag = false;
    var _importLogId;
    $(function () {
@@ -220,8 +220,8 @@
            },
            accept: {
                title: '选择文件',
                extensions: "xml",
                mimeTypes: '.xml'
                extensions: "xml,zip",
                mimeTypes: '.xml,.zip'
            },
            auto: false,
            duplicate: true
src/main/webapp/WEB-INF/view/gh/utilizationUser/register3.jsp
@@ -160,29 +160,12 @@
                                                    label: '1',
                                                    value: '女'
                                                }]"/></p>
                <p><span>所属省份:</span><input class="easyui-combobox" id="PROVINCE"
                                                name="PROVINCE" type="text"
                                                style="height:30px;text-align: left; width: 486px;"
                                                value=""
                                                data-options=" editable: false, panelHeight: '200',valueField:'id', textField:'name'"
                /></p>
                <p><span>所属城市:</span><input class="easyui-combobox" id="CITY"
                                                name="CITY" type="text"
                                                style="height:30px;text-align: left; width: 486px;"
                                                value=""
                                                data-options=" editable: false,panelHeight: '200',valueField:'id', textField:'name'"/>
                </p>
                <p><span>单位:</span><input class="easyui-combobox" id="DEPT"
                                            name="DEPT" type="text"
                                            style="height:30px;text-align: left; width: 486px;"
                                            value=""
                                            data-options=" editable: true, required:true,panelHeight: '200',valueField:'id', textField:'name'"/>
                </p>
                <p><span>单位性质:</span><input class="easyui-combobox" id="DEPT_NATURE"
                                                name="DEPT_NATURE" type="text"
                                                style="height:30px;text-align: left; width: 486px;"
                                                value=""
                                                data-options=" editable: false, panelHeight: '200',valueField:'id', textField:'name'"/>
                </p>
                <p><span>单位地址:</span><input class="easyui-textbox" id="DEPT_ADDRESS"
                                                name="DEPT_ADDRESS" type="text"
@@ -318,10 +301,10 @@
                wcp.notify.warn("手机号格式不正确!");
                return;
            }
            obj.PROVINCE = $("#PROVINCE").combobox("getText");
            // obj.PROVINCE = $("#PROVINCE").combobox("getText");
            obj.DEPT = $("#DEPT").combobox("getText");
            obj.CITY = $("#CITY").combobox("getText");
            obj.DEPT_NATURE = $("#DEPT_NATURE").combobox("getText");
            // obj.CITY = $("#CITY").combobox("getText");
            // obj.DEPT_NATURE = $("#DEPT_NATURE").combobox("getText");
            obj.TRADE = $("#TRADE").combobox("getText");
            obj.SEX = $("#SEX").combobox("getText");
            obj.JOB = $("#JOB").combobox("getText");
@@ -336,7 +319,7 @@
                }
                //关闭窗口
                closeWindow();
                top.wcp.notify.success("注册成功,等待管理员审批!");
                top.wcp.notify.success("注册成功");
            }));
        });
@@ -345,14 +328,15 @@
        });
        addProvince();
        bindChangeEvent();
        initDept();
        initDeptType();
        // initDept();
        // initDeptType();
        initTrade()
    })
    setTimeout(function () {
    })
    function addProvince() {
        var data = [];
        $.ajax({
src/main/webapp/WEB-INF/view/gh/utlStatistics/utlStatisticsByDept.jsp
@@ -167,19 +167,21 @@
                    field: 'borrowItemCount',
                    title: '借阅件数',
                    width: 100,
                }, {
                    field: 'process',
                    title: '加工人次',
                    width: 100,
                }, {
                    field: 'processFileCount',
                    title: '加工份数',
                    width: 100,
                }, {
                    field: 'processItemCount',
                    title: '加工件数',
                    width: 100,
                }, {
                },
                // {
                //     field: 'process',
                //     title: '加工人次',
                //     width: 100,
                // }, {
                //     field: 'processFileCount',
                //     title: '加工份数',
                //     width: 100,
                // }, {
                //     field: 'processItemCount',
                //     title: '加工件数',
                //     width: 100,
                // },
                {
                    field: 'physical',
                    title: '实物利用人次',
                    width: 100,
src/main/webapp/WEB-INF/view/gh/utlStatistics/utlStatisticsByUser.jsp
@@ -151,19 +151,21 @@
                        field: 'borrowItemCount',
                        title: '借阅件数',
                        width: 100,
                    }, {
                        field: 'process',
                        title: '加工人次',
                        width: 100,
                    }, {
                        field: 'processFileCount',
                        title: '加工份数',
                        width: 100,
                    }, {
                        field: 'processItemCount',
                        title: '加工件数',
                        width: 100,
                    }, {
                    },
                    // {
                    //     field: 'process',
                    //     title: '加工人次',
                    //     width: 100,
                    // }, {
                    //     field: 'processFileCount',
                    //     title: '加工份数',
                    //     width: 100,
                    // }, {
                    //     field: 'processItemCount',
                    //     title: '加工件数',
                    //     width: 100,
                    // },
                    {
                        field: 'physical',
                        title: '实物利用人次',
                        width: 100,
@@ -213,19 +215,22 @@
                        field: 'borrowItemCount',
                        title: '借阅件数',
                        width: 100,
                    }, {
                        field: 'process',
                        title: '加工人次',
                        width: 100,
                    }, {
                        field: 'processFileCount',
                        title: '加工份数',
                        width: 100,
                    }, {
                        field: 'processItemCount',
                        title: '加工件数',
                        width: 100,
                    }, {
                    },
                    // {
                    //     field: 'process',
                    //     title: '加工人次',
                    //     width: 100,
                    // },
                    // {
                    //     field: 'processFileCount',
                    //     title: '加工份数',
                    //     width: 100,
                    // }, {
                    //     field: 'processItemCount',
                    //     title: '加工件数',
                    //     width: 100,
                    // },
                    {
                        field: 'physical',
                        title: '实物利用人次',
                        width: 100,
src/main/webapp/WEB-INF/view/scanPrint/scanInPrint.jsp
@@ -270,24 +270,77 @@
    //保存数据
    function saveScanPrintData(rows) {
        layer.confirm("已扫描" + rows.length + "条数据,确认入库?", {
            icon: 3,
            title: '提示'
        }, function (index) {
            wcp.ui.setBusy("body", wcp.ajax({
                url: 'scanPrintController/saveScanPrintData?printType=' + '${printType}' + '&viewId=' + '${viewId}',
                data: JSON.stringify(rows),
            }).done(function (result) {
                params.callBack();
                //关闭窗口
                closeWindow();
            }));
        })
    }
    <%--function saveScanPrintData(rows) {--%>
    <%--    layer.confirm("已扫描" + rows.length + "条数据,确认入库?", {--%>
    <%--        icon: 3,--%>
    <%--        title: '提示'--%>
    <%--    }, function (index) {--%>
    <%--        wcp.ui.setBusy("body", wcp.ajax({--%>
    <%--            url: 'scanPrintController/saveScanPrintData?printType=' + '${printType}' + '&viewId=' + '${viewId}',--%>
    <%--            data: JSON.stringify(rows),--%>
    <%--        }).done(function (result) {--%>
    <%--            params.callBack();--%>
    <%--            //关闭窗口--%>
    <%--            closeWindow();--%>
    <%--        }));--%>
    <%--    })--%>
    <%--}--%>
    <%--//保存数据--%>
    <%--function saveScanPrintData(rows) {--%>
    <%--    // getBoxNum(rows);--%>
    <%--    layer.prompt({--%>
    <%--        formType: 2,--%>
    <%--        value: '',--%>
    <%--        title: '请添加盒号'--%>
    <%--    }, function (value, index, elem) {--%>
    <%--        wcp.ui.setBusy("body", wcp.ajax({--%>
    <%--            url: 'scanPrintController/saveScanPrintData?printType=' + '${printType}' + '&viewId=' + '${viewId}' + '&boxNum=' + value,--%>
    <%--            data: JSON.stringify(rows),--%>
    <%--        }).done(function (result) {--%>
    <%--            params.callBack();--%>
    <%--            //关闭窗口--%>
    <%--            closeWindow();--%>
    <%--        }));--%>
    <%--    });--%>
    <%--}--%>
    //保存数据
    function saveScanPrintData(rows) {
        // 首先获取已存在的盒号
        wcp.ui.setBusy("body", wcp.ajax({
            url: 'scanPrintController/getBoxNum',
            data: JSON.stringify(rows),
        }).done(function (result) {
            debugger;
            var boxNumList = result || []; // 假设AjaxResponse的data字段包含实际数据
            var existingBoxNum = boxNumList.length > 0 ? boxNumList[0] : ''; // 取第一个盒号或空字符串
            layer.prompt({
                formType: 2,
                title: '请添加盒号'
            }, function (inputBoxNum, index, elem) {
                // 如果已存在盒号且与输入的盒号不同,则提示用户确认
                if (existingBoxNum && existingBoxNum !== inputBoxNum) {
                    layer.confirm('当前档案已存在盒号 "' + existingBoxNum + '",您输入的是 "' + inputBoxNum + '",是否要更改盒号?', {
                        icon: 3,
                        title: '确认更改盒号'
                    }, function (confirmIndex) {
                        // 确认更改,执行保存
                        performSave(inputBoxNum, rows);
                        layer.close(confirmIndex);
                    }, function () {
                        // 取消更改,重新打开输入框
                        layer.close(index);
                    });
                } else {
                    // 盒号相同或不存在已存在的盒号,直接保存
                    performSave(inputBoxNum, rows);
                }
            });
        })).fail(function () {
            // 获取盒号失败时,直接让用户输入
        layer.prompt({
            formType: 2,
            value: '',
@@ -302,6 +355,29 @@
                closeWindow();
            }));
        });
        });
    }
    // 执行保存操作的辅助函数
    function performSave(boxNum, rows) {
        wcp.ui.setBusy("body", wcp.ajax({
            url: 'scanPrintController/saveScanPrintData?printType=' + '${printType}' + '&viewId=' + '${viewId}' + '&boxNum=' + boxNum,
            data: JSON.stringify(rows),
        }).done(function (result) {
            params.callBack();
            //关闭窗口
            closeWindow();
        }));
    }
    function getBoxNum(rows) {
        wcp.ui.setBusy("body", wcp.ajax({
            url: 'scanPrintController/getBoxNum',
            data: JSON.stringify(rows),
        }).done(function (result) {
            console.log(result);
        }));
    }
</script>
</html>