地质所 沉降监测网建设项目
zmk
2024-05-17 8722d2bb39c6c0697647e77a879d14b28d3ef0f5
Merge branch 'master' of ssh://117.78.1.188:29418/dkyChenJiang
22个文件已修改
3个文件已添加
963 ■■■■ 已修改文件
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/HoleController.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/ProjectDataController.java 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/DeviceLog.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/ProjectPerson.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IHoleService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IProjectDataService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/DeviceLogServiceImpl.java 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleServiceImpl.java 136 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/ProjectDataServiceImpl.java 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/DeviceLogMapper.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/ProjectPersonMapper.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/deviceLog/add.html 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/deviceLog/deviceLog.html 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/deviceLog/edit.html 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/hole/hole.html 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/navigate.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/add.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/edit.html 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/image_view.html 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/projectData.html 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/projectData2.html 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/upload.html 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectPerson/add.html 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectPerson/edit.html 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectPerson/projectPerson.html 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/HoleController.java
@@ -6,11 +6,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import com.javaweb.common.annotation.Log;
import com.javaweb.common.enums.BusinessType;
import com.javaweb.geo.domain.Hole;
@@ -19,6 +15,7 @@
import com.javaweb.common.core.domain.AjaxResult;
import com.javaweb.common.utils.poi.ExcelUtil;
import com.javaweb.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/**
 * 钻孔Controller
@@ -121,4 +118,16 @@
        return toAjax(holeService.deleteHoleByIds(ids));
    }
    /**
     * 导入钻孔
     */
    @RequiresPermissions("geo:hole:import")
    @Log(title = "导入钻孔")
    @PostMapping( "/importHole/{projectId}")
    @ResponseBody
    public AjaxResult importHole(@PathVariable("projectId") String projectId, @RequestParam("file") MultipartFile file, boolean updateSupport){
        String message = holeService.importHole(projectId,file,updateSupport);
        return AjaxResult.success(message);
    }
}
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/ProjectDataController.java
@@ -6,11 +6,8 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import com.javaweb.common.annotation.Log;
import com.javaweb.common.enums.BusinessType;
import com.javaweb.geo.domain.ProjectData;
@@ -19,6 +16,9 @@
import com.javaweb.common.core.domain.AjaxResult;
import com.javaweb.common.utils.poi.ExcelUtil;
import com.javaweb.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
/**
 * 项目资料Controller
@@ -42,7 +42,35 @@
        return prefix + "/projectData";
    }
    @RequiresPermissions("geo:projectData:view")
    @GetMapping("/2")
    public String projectData2(String id, String type, ModelMap mmap) {
        mmap.put("projectId", id);
        mmap.put("type", type);
        return prefix + "/projectData2";
    }
    /**
     * 导入压缩包
     */
    @GetMapping("/importImg")
    public String importPdf(){
        return prefix + "/upload";
    }
    /**
     * 图片展示
     */
    @GetMapping("/viewImage")
    public String viewImage(ModelMap mmap, @RequestParam("id") String id){
        ProjectData data = projectDataService.selectProjectDataById(id);
        String path = "";
        if (!ObjectUtils.isEmpty(data)){
            path = data.getDataUrl();
        }
        mmap.put("urlAddress",path);
        return  prefix + "/image_view";
    }
    /**
     * 查询项目资料列表
@@ -121,4 +149,14 @@
    public AjaxResult remove(String ids) {
        return toAjax(projectDataService.deleteProjectDataByIds(ids));
    }
    /**
     * 上传压缩包
     */
    @PostMapping("/uploadZIP")
    @ResponseBody
    public AjaxResult uploadZIP(MultipartFile file, HttpServletRequest request){
        return projectDataService.uploadZIP(file,request);
    }
}
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/DeviceLog.java
@@ -40,20 +40,24 @@
    @Excel(name = "设备名称")
    private String deviceName;
    /** 出入库类型(in /out) */
    @Excel(name = "出入库类型", readConverterExp = "i=n,/=out")
    /** 类型(设备,材料) */
    @Excel(name = "出入库类型", readConverterExp = "类型(设备,材料)")
    private String type;
    /** 出入库时间 */
    @Excel(name = "出入库时间")
    private String transactionDate;
    /** 出库时间 */
    @Excel(name = "出库时间")
    private String outboundDate;
    /** 入库时间 */
    @Excel(name = "入库时间")
    private String inboundDate;
    /** 经办人 */
    @Excel(name = "经办人")
    private String optUser;
    /** 使用人 */
    @Excel(name = "使用人")
    @Excel(name = "负责人")
    private String applyUser;
    /** 出入库数量 */
@@ -130,25 +134,31 @@
        this.type = type;
    }
    public String getType()
    {
    public String getType() {
        return type;
    }
    public void setTransactionDate(String transactionDate)
    {
        this.transactionDate = transactionDate;
    public String getOutboundDate() {
        return outboundDate;
    }
    public String getTransactionDate()
    {
        return transactionDate;
    public void setOutboundDate(String outboundDate) {
        this.outboundDate = outboundDate;
    }
    public void setOptUser(String optUser)
    {
    public String getInboundDate() {
        return inboundDate;
    }
    public void setInboundDate(String inboundDate) {
        this.inboundDate = inboundDate;
    }
    public void setOptUser(String optUser) {
        this.optUser = optUser;
    }
    public String getOptUser()
    public String getOptUser()
    {
        return optUser;
    }
@@ -190,8 +200,6 @@
            .append("deviceId", getDeviceId())
            .append("deviceCode", getDeviceCode())
            .append("deviceName", getDeviceName())
            .append("type", getType())
            .append("transactionDate", getTransactionDate())
            .append("optUser", getOptUser())
            .append("applyUser", getApplyUser())
            .append("number", getNumber())
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/ProjectPerson.java
@@ -36,9 +36,13 @@
    @Excel(name = "手机号")
    private String phone;
    /** 地址 */
    @Excel(name = "地址")
    private String address;
    /** 身份证号 */
    @Excel(name = "身份证号")
    private String idCard;
    /** 人员分组 */
    @Excel(name = "人员分组")
    private String personGroup;
    /** 职责 */
    @Excel(name = "职责")
@@ -100,20 +104,28 @@
        this.phone = phone;
    }
    public String getPhone()
    public String getPhone()
    {
        return phone;
    }
    public void setAddress(String address)
    {
        this.address = address;
    public String getIdCard() {
        return idCard;
    }
    public String getAddress()
    {
        return address;
    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }
    public void setResponsibility(String responsibility)
    public String getPersonGroup() {
        return personGroup;
    }
    public void setPersonGroup(String personGroup) {
        this.personGroup = personGroup;
    }
    public void setResponsibility(String responsibility)
    {
        this.responsibility = responsibility;
    }
@@ -150,7 +162,6 @@
            .append("name", getName())
            .append("type", getType())
            .append("phone", getPhone())
            .append("address", getAddress())
            .append("responsibility", getResponsibility())
            .append("status", getStatus())
            .append("isDeleted", getIsDeleted())
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IHoleService.java
@@ -1,6 +1,8 @@
package com.javaweb.geo.service;
import com.javaweb.geo.domain.Hole;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
/**
@@ -58,4 +60,9 @@
     * @return 结果
     */
    public int deleteHoleById(String ids);
    /**
     * 导入钻孔
     */
    String importHole(String projectId, MultipartFile file, boolean updateSupport);
}
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IProjectDataService.java
@@ -1,6 +1,10 @@
package com.javaweb.geo.service;
import com.javaweb.common.core.domain.AjaxResult;
import com.javaweb.geo.domain.ProjectData;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
@@ -58,4 +62,9 @@
     * @return 结果
     */
    public int deleteProjectDataById(String id);
    /**
     * 上传压缩包
     */
    AjaxResult uploadZIP(MultipartFile file, HttpServletRequest request);
}
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/DeviceLogServiceImpl.java
@@ -38,9 +38,6 @@
    @Autowired
    private IProjectService projectService;
    @Autowired
    private IDeviceService deviceService;
    private String fileSaveDir = Global.getProfile() + "\\template\\" ;
    /**
@@ -130,24 +127,6 @@
                item.setProjectId(projectId);
                item.setProjectName(project.getFullName());
                // 转换出入库类型
                String proTypeCode = RecordType.getKeyByName(item.getType());
                item.setType(proTypeCode);
                // 转换设备编码
                String deviceCode = item.getDeviceCode();
                if (!ObjectUtils.isEmpty(deviceCode)){
                    Device param = new Device();
                    param.setCode(deviceCode);
                    List<Device> devices = deviceService.selectDeviceList(param);
                    if (!ObjectUtils.isEmpty(devices)){
                        Device device = devices.get(0);
                        item.setDeviceId(device.getId());
                        item.setDeviceCode(device.getCode());
                        item.setDeviceName(device.getName());
                    }
                }
                item.setCreateDate(DateUtils.getNowDate());
                insertDeviceLog(item);
            }
@@ -176,11 +155,12 @@
    private List<DeviceLog> readData(String filepath) {
        ExcelReader reader = ExcelUtil.getReader(filepath, 0);
        reader.addHeaderAlias("出入库单子号", "code");
        reader.addHeaderAlias("设备编码", "deviceCode");
        reader.addHeaderAlias("出入库类型", "type");
        reader.addHeaderAlias("出入库时间", "transactionDate");
        reader.addHeaderAlias("设备名称", "deviceName");
        reader.addHeaderAlias("类型", "type");
        reader.addHeaderAlias("入库时间", "inboundDate");
        reader.addHeaderAlias("出库时间", "outboundDate");
        reader.addHeaderAlias("经办人", "optUser");
        reader.addHeaderAlias("使用人", "applyUser");
        reader.addHeaderAlias("负责人", "applyUser");
        reader.addHeaderAlias("出入库数量", "number");
        reader.addHeaderAlias("备注", "remark");
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleServiceImpl.java
@@ -1,7 +1,11 @@
package com.javaweb.geo.service.impl;
import java.io.File;
import java.util.List;
import cn.hutool.poi.excel.ExcelReader;
import cn.hutool.poi.excel.ExcelUtil;
import com.javaweb.common.config.Global;
import com.javaweb.common.utils.DateUtils;
import com.javaweb.common.utils.IdGenerate;
import com.javaweb.geo.domain.*;
@@ -11,6 +15,7 @@
import org.springframework.stereotype.Service;
import com.javaweb.common.core.text.Convert;
import org.springframework.util.ObjectUtils;
import org.springframework.web.multipart.MultipartFile;
/**
 * 钻孔Service业务层处理
@@ -41,6 +46,12 @@
    @Autowired
    private HoleYantuMapper holeYantuMapper;
    @Autowired
    private IProjectService projectService;
    private String fileSaveDir = Global.getProfile() + "\\template\\" ;
    /**
     * 查询钻孔
@@ -99,44 +110,43 @@
     */
    @Override
    public int deleteHoleByIds(String ids) {
        // 批量删除钻孔下面的关联数据
        String[] strings = Convert.toStrArray(ids);
        if (!ObjectUtils.isEmpty(strings)) {
            for (String holeId : strings) {
                // =======标贯==========
                List<HoleBiaoguan> biaoguans = holeBiaoguanMapper.selectHoleBiaoguanByHoleId(holeId);
                String[] biaoguanIds = biaoguans.stream().map(HoleBiaoguan::getIds).toArray(String[]::new);
                // =======回次==========
                List<HoleHuici> holeHuicis = holeHuiciMapper.selectHoleHuiciByHoleId(holeId);
                String[] huiCiIds = holeHuicis.stream().map(HoleHuici::getIds).toArray(String[]::new);
                // =======人员==========
                List<HolePerson> persons = holePersonMapper.selectHolePersonByHoleId(holeId);
                String[] personIds = persons.stream().map(HolePerson::getIds).toArray(String[]::new);
                // =======取土==========
                List<HoleQutu> qutus = holeQutuMapper.selectHoleQutuByHoleId(holeId);
                String[] qutuIds = qutus.stream().map(HoleQutu::getIds).toArray(String[]::new);
                // =======水位==========
                List<HoleShuiwei> shuiweis = holeShuiweiMapper.selectHoleShuiWeiByHoleId(holeId);
                String[] shuiweiIds = shuiweis.stream().map(HoleShuiwei::getIds).toArray(String[]::new);
                // =======岩土==========
                List<HoleYantu> yantus = holeYantuMapper.selectHoleYantuListByHoleId(holeId);
                String[] yantusIds = yantus.stream().map(HoleYantu::getIds).toArray(String[]::new);
                holeBiaoguanMapper.deleteHoleBiaoguanByIds(biaoguanIds);
                holeHuiciMapper.deleteHoleHuiciByIds(huiCiIds);
                holePersonMapper.deleteHolePersonByIds(personIds);
                holeQutuMapper.deleteHoleQutuByIds(qutuIds);
                holeShuiweiMapper.deleteHoleShuiweiByIds(shuiweiIds);
                holeYantuMapper.deleteHoleYantuByIds(yantusIds);
            }
        }
//        String[] strings = Convert.toStrArray(ids);
//        if (!ObjectUtils.isEmpty(strings)) {
//            for (String holeId : strings) {
//
//                // =======标贯==========
//                List<HoleBiaoguan> biaoguans = holeBiaoguanMapper.selectHoleBiaoguanByHoleId(holeId);
//                String[] biaoguanIds = biaoguans.stream().map(HoleBiaoguan::getIds).toArray(String[]::new);
//
//                // =======回次==========
//                List<HoleHuici> holeHuicis = holeHuiciMapper.selectHoleHuiciByHoleId(holeId);
//                String[] huiCiIds = holeHuicis.stream().map(HoleHuici::getIds).toArray(String[]::new);
//
//                // =======人员==========
//                List<HolePerson> persons = holePersonMapper.selectHolePersonByHoleId(holeId);
//                String[] personIds = persons.stream().map(HolePerson::getIds).toArray(String[]::new);
//
//                // =======取土==========
//                List<HoleQutu> qutus = holeQutuMapper.selectHoleQutuByHoleId(holeId);
//                String[] qutuIds = qutus.stream().map(HoleQutu::getIds).toArray(String[]::new);
//
//                // =======水位==========
//                List<HoleShuiwei> shuiweis = holeShuiweiMapper.selectHoleShuiWeiByHoleId(holeId);
//                String[] shuiweiIds = shuiweis.stream().map(HoleShuiwei::getIds).toArray(String[]::new);
//
//                // =======岩土==========
//                List<HoleYantu> yantus = holeYantuMapper.selectHoleYantuListByHoleId(holeId);
//                String[] yantusIds = yantus.stream().map(HoleYantu::getIds).toArray(String[]::new);
//
//                holeBiaoguanMapper.deleteHoleBiaoguanByIds(biaoguanIds);
//                holeHuiciMapper.deleteHoleHuiciByIds(huiCiIds);
//                holePersonMapper.deleteHolePersonByIds(personIds);
//                holeQutuMapper.deleteHoleQutuByIds(qutuIds);
//                holeShuiweiMapper.deleteHoleShuiweiByIds(shuiweiIds);
//                holeYantuMapper.deleteHoleYantuByIds(yantusIds);
//            }
//        }
        return holeMapper.deleteHoleByIds(Convert.toStrArray(ids));
    }
@@ -151,4 +161,56 @@
    public int deleteHoleById(String ids) {
        return holeMapper.deleteHoleById(ids);
    }
    /**
     * 导入钻孔
     */
    @Override
    public String importHole(String projectId, MultipartFile file, boolean updateSupport) {
        try {
            String dest = saveExcel(file);
            List<Hole> list = readData(dest);
            if(!ObjectUtils.isEmpty(list)){
                for (Hole item : list) {
                    item.setProjectId(projectId);
                    insertHole(item);
                }
            }
        } catch (Exception e) {
            return e.toString();
        }
        return "导入完毕" ;
    }
    private String saveExcel(MultipartFile file) {
        String filename = file.getOriginalFilename();
        File dir = new File(fileSaveDir);
        if (!dir.exists()) {
            dir.mkdir();
        }
        String addr = fileSaveDir + filename;
        try {
            File dest = new File(addr);
            file.transferTo(dest);
        } catch (Exception e) {
            return null;
        }
        return addr;
    }
    private List<Hole> readData(String filepath) {
        ExcelReader reader = ExcelUtil.getReader(filepath, 0);
        reader.addHeaderAlias("钻孔编号", "code");
        reader.addHeaderAlias("孔口高程", "elevation");
        reader.addHeaderAlias("设计孔深", "depth");
        reader.addHeaderAlias("钻孔经度", "longitude");
        reader.addHeaderAlias("钻孔纬度", "latitude");
        reader.addHeaderAlias("进度", "pic1");
        List<Hole> list = reader.readAll(Hole.class);
        return list;
    }
}
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/ProjectDataServiceImpl.java
@@ -1,9 +1,17 @@
package com.javaweb.geo.service.impl;
import java.io.File;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.ZipUtil;
import com.javaweb.common.config.Global;
import com.javaweb.common.core.domain.AjaxResult;
import com.javaweb.common.utils.DateUtils;
import com.javaweb.common.utils.IdGenerate;
import com.javaweb.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.javaweb.geo.mapper.ProjectDataMapper;
@@ -11,6 +19,9 @@
import com.javaweb.geo.service.IProjectDataService;
import com.javaweb.common.core.text.Convert;
import org.springframework.util.ObjectUtils;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
/**
 * 项目资料Service业务层处理
@@ -20,6 +31,12 @@
 */
@Service
public class ProjectDataServiceImpl implements IProjectDataService {
    private static String manUploadPath = "imgupload";
    private static String imgUploadPath = Global.getProfile() + "\\" + manUploadPath + "\\";
    @Autowired
    private ProjectDataMapper projectDataMapper;
@@ -42,8 +59,8 @@
     */
    @Override
    public List<ProjectData> selectProjectDataList(ProjectData projectData) {
        if (!ObjectUtils.isEmpty(projectData.getDataType()) && projectData.getDataType().endsWith(",")){
            projectData.setDataType(projectData.getDataType().substring(0,1));
        if (!ObjectUtils.isEmpty(projectData.getDataType()) && projectData.getDataType().endsWith(",")) {
            projectData.setDataType(projectData.getDataType().substring(0, 1));
        }
        return projectDataMapper.selectProjectDataList(projectData);
    }
@@ -96,4 +113,84 @@
    public int deleteProjectDataById(String id) {
        return projectDataMapper.deleteProjectDataById(id);
    }
    @Override
    public AjaxResult uploadZIP(MultipartFile file, HttpServletRequest request) {
        String uploadPath = Global.getProfile() + "\\";
        String originalFilename = file.getOriginalFilename();
        String fieldname = request.getParameter("fieldname");
        if (StringUtils.isEmpty(fieldname)) {
            fieldname = "filename";
        }
        //获取后缀.zip  保存的文件名
        String substring = originalFilename.substring(originalFilename.lastIndexOf("."));
        String UID = IdGenerate.nextId();
        String dFileName = UID + substring;
        File file2 = new File(uploadPath + dFileName);
        try {
            file.transferTo(file2);
        } catch (Exception e) {
            return AjaxResult.warn("附件上传失败!");
        }
        //解压缩
        try {
            ZipUtil.unzip(file2, Charset.forName("GBK"));
        } catch (Exception e) {
            return AjaxResult.warn("附件解压缩失败!");
        }
        String moveDir = Global.getProfile() + "\\" + UID + "\\" + originalFilename.replace(substring, "");
        List<String> movedFiles = moveFile(moveDir);
        updateFilePath(fieldname, movedFiles);
        FileUtil.del(new File(uploadPath + UID));
        FileUtil.del(file2);
        return AjaxResult.success("上传成功");
    }
    //移动 文件
    private List<String> moveFile(String moveDir) {
        List<String> list = new ArrayList<>();
        File file = new File(moveDir);
        String detpath = imgUploadPath;
        if (file.isDirectory()) {
            File[] files = file.listFiles();
            int len = files.length;
            for (int i = 0; i < len; i++) {
                String filename = files[i].getName();
                list.add(filename);
                FileUtil.copy(files[i], new File(detpath + filename), true);
            }
        }
        return list;
    }
    private void updateFilePath(String filedname, List<String> filesPath) {
        for (String fileName : filesPath) {
            String substring = fileName.substring(fileName.lastIndexOf("."));
            String docFileName = fileName.replace(substring, "").trim();
            ProjectData param = new ProjectData();
            if (filedname.equals("filename")) {
                param.setName(docFileName);
            }
            List<ProjectData> list = projectDataMapper.selectProjectDataList(param);
            if (!ObjectUtils.isEmpty(list)) {
                for (ProjectData item : list) {
                    ProjectData entity = new ProjectData();
                    entity.setId(item.getId());
                    entity.setDataUrl(manUploadPath + "/" + fileName);
                    projectDataMapper.updateProjectData(entity);
                }
            }
        }
    }
}
javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/DeviceLogMapper.xml
@@ -13,7 +13,8 @@
        <result property="deviceCode"    column="device_code"    />
        <result property="deviceName"    column="device_name"    />
        <result property="type"    column="type"    />
        <result property="transactionDate"    column="transaction_date"    />
        <result property="outboundDate"    column="outbound_date"    />
        <result property="inboundDate"    column="inbound_date"    />
        <result property="optUser"    column="opt_user"    />
        <result property="applyUser"    column="apply_user"    />
        <result property="number"    column="number"    />
@@ -22,7 +23,7 @@
    </resultMap>
    <sql id="selectDeviceLogVo">
        select id, code, project_id, project_name, device_id, device_code, device_name, type, transaction_date, opt_user, apply_user, number, create_date, remark from js_device_log
        select id, code, project_id, project_name, device_id, device_code, device_name, type, outbound_date, inbound_date, opt_user, apply_user, number, create_date, remark from js_device_log
    </sql>
    <select id="selectDeviceLogList" parameterType="DeviceLog" resultMap="DeviceLogResult">
@@ -57,7 +58,8 @@
            <if test="deviceCode != null  and deviceCode != ''">device_code,</if>
            <if test="deviceName != null  and deviceName != ''">device_name,</if>
            <if test="type != null  and type != ''">type,</if>
            <if test="transactionDate != null  and transactionDate != ''">transaction_date,</if>
            <if test="outboundDate != null  and outboundDate != ''">outbound_date,</if>
            <if test="inboundDate != null  and inboundDate != ''">inbound_date,</if>
            <if test="optUser != null  and optUser != ''">opt_user,</if>
            <if test="applyUser != null  and applyUser != ''">apply_user,</if>
            <if test="number != null  and number != ''">number,</if>
@@ -73,7 +75,8 @@
            <if test="deviceCode != null  and deviceCode != ''">#{deviceCode},</if>
            <if test="deviceName != null  and deviceName != ''">#{deviceName},</if>
            <if test="type != null  and type != ''">#{type},</if>
            <if test="transactionDate != null  and transactionDate != ''">#{transactionDate},</if>
            <if test="outboundDate != null  and outboundDate != ''">#{outboundDate},</if>
            <if test="inboundDate != null  and inboundDate != ''">#{inboundDate},</if>
            <if test="optUser != null  and optUser != ''">#{optUser},</if>
            <if test="applyUser != null  and applyUser != ''">#{applyUser},</if>
            <if test="number != null  and number != ''">#{number},</if>
@@ -92,7 +95,8 @@
            <if test="deviceCode != null  and deviceCode != ''">device_code = #{deviceCode},</if>
            <if test="deviceName != null  and deviceName != ''">device_name = #{deviceName},</if>
            <if test="type != null  and type != ''">type = #{type},</if>
            <if test="transactionDate != null  and transactionDate != ''">transaction_date = #{transactionDate},</if>
            <if test="outboundDate != null  and outboundDate != ''">outbound_date = #{outboundDate},</if>
            <if test="inboundDate != null  and inboundDate != ''">inbound_date = #{inboundDate},</if>
            <if test="optUser != null  and optUser != ''">opt_user = #{optUser},</if>
            <if test="applyUser != null  and applyUser != ''">apply_user = #{applyUser},</if>
            <if test="number != null  and number != ''">number = #{number},</if>
javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/ProjectPersonMapper.xml
@@ -11,7 +11,8 @@
        <result property="name"    column="name"    />
        <result property="type"    column="type"    />
        <result property="phone"    column="phone"    />
        <result property="address"    column="address"    />
        <result property="idCard"    column="id_card"    />
        <result property="personGroup"    column="person_group"    />
        <result property="responsibility"    column="responsibility"    />
        <result property="status"    column="status"    />
        <result property="isDeleted"    column="is_deleted"    />
@@ -23,7 +24,7 @@
    </resultMap>
    <sql id="selectProjectPersonVo">
        select ids, project_id, hole_id, name, type, phone, address, responsibility, status, is_deleted, create_by, create_time, update_by, update_time, remark from js_project_person
        select ids, project_id, hole_id, name, type, phone, id_card , person_group , responsibility, status, is_deleted, create_by, create_time, update_by, update_time, remark from js_project_person
    </sql>
    <select id="selectProjectPersonList" parameterType="ProjectPerson" resultMap="ProjectPersonResult">
@@ -51,7 +52,8 @@
            <if test="name != null  and name != ''">name,</if>
            <if test="type != null  and type != ''">type,</if>
            <if test="phone != null  and phone != ''">phone,</if>
            <if test="address != null  and address != ''">address,</if>
            <if test="idCard != null  and idCard != ''">id_card,</if>
            <if test="personGroup != null  and personGroup != ''">person_group,</if>
            <if test="responsibility != null  and responsibility != ''">responsibility,</if>
            <if test="status != null  and status != ''">status,</if>
            <if test="isDeleted != null  and isDeleted != ''">is_deleted,</if>
@@ -68,7 +70,8 @@
            <if test="name != null  and name != ''">#{name},</if>
            <if test="type != null  and type != ''">#{type},</if>
            <if test="phone != null  and phone != ''">#{phone},</if>
            <if test="address != null  and address != ''">#{address},</if>
            <if test="idCard != null and idCard != ''">#{idCard},</if>
            <if test="personGroup != null  and personGroup != ''">#{personGroup},</if>
            <if test="responsibility != null  and responsibility != ''">#{responsibility},</if>
            <if test="status != null  and status != ''">#{status},</if>
            <if test="isDeleted != null  and isDeleted != ''">#{isDeleted},</if>
@@ -88,7 +91,8 @@
            <if test="name != null  and name != ''">name = #{name},</if>
            <if test="type != null  and type != ''">type = #{type},</if>
            <if test="phone != null  and phone != ''">phone = #{phone},</if>
            <if test="address != null  and address != ''">address = #{address},</if>
            <if test="idCard != null  and idCard != ''">id_card = #{idCard},</if>
            <if test="personGroup != null  and personGroup != ''">person_group = #{personGroup},</if>
            <if test="responsibility != null  and responsibility != ''">responsibility = #{responsibility},</if>
            <if test="status != null  and status != ''">status = #{status},</if>
            <if test="isDeleted != null  and isDeleted != ''">is_deleted = #{isDeleted},</if>
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/deviceLog/add.html
@@ -12,26 +12,14 @@
                    <input name="code" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">项目名称:</label>
                <div class="col-sm-8">
                    <input name="projectName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">设备编号:</label>
                <div class="col-sm-8">
                    <input name="deviceCode" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">设备名称:</label>
                <label class="col-sm-3 control-label">名称:</label>
                <div class="col-sm-8">
                    <input name="deviceName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">出入库类型:</label>
                <label class="col-sm-3 control-label">类型:</label>
                <div class="col-sm-8">
                    <select name="type" class="form-control m-b" th:with="type=${@dict.getType('device_log_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
@@ -39,9 +27,15 @@
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">出入库时间:</label>
                <label class="col-sm-3 control-label">入库时间:</label>
                <div class="col-sm-8">
                    <input name="transactionDate" class="form-control" type="text">
                    <input name="inboundDate" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">出库时间:</label>
                <div class="col-sm-8">
                    <input name="outboundDate" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
@@ -51,7 +45,7 @@
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">使用人:</label>
                <label class="col-sm-3 control-label">负责人:</label>
                <div class="col-sm-8">
                    <input name="applyUser" class="form-control" type="text">
                </div>
@@ -62,6 +56,12 @@
                    <input name="number" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注:</label>
                <div class="col-sm-8">
                    <textarea id="remark" name="remark" class="form-control"></textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/deviceLog/deviceLog.html
@@ -15,15 +15,11 @@
                                <input type="text" name="code"/>
                            </li>
                            <li>
                                <p>项目名称:</p>
                                <input type="text" name="projectName"/>
                            </li>
                            <li>
                                <p>设备名称:</p>
                                <p>名称:</p>
                                <input type="text" name="deviceName"/>
                            </li>
                            <li>
                                <p>出入库类型:</p>
                                <p>设备/材料类型:</p>
                                <select name="type" th:with="type=${@dict.getType('device_log_type')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
@@ -34,7 +30,7 @@
                                <input type="text" name="optUser"/>
                            </li>
                            <li>
                                <p>使用人:</p>
                                <p>负责人:</p>
                                <input type="text" name="applyUser"/>
                            </li>
                            <li>
@@ -99,26 +95,32 @@
                },
                {
                    field : 'projectName',
                    title : '项目名称'
                    title : '场地名称',
                    visible: false
                },
                    {
                        field : 'deviceCode',
                        title : '设备编码'
                        title : '编号',
                        visible: false
                    },
                    {
                        field : 'deviceName',
                        title : '名称'
                    },
                {
                    field : 'deviceName',
                    title : '设备名称'
                },
                {
                    field : 'type',
                    title : '出入库类型',
                    title : '设备/材料类型',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(typeDatas, value);
                    }
                },
                    {
                        field : 'inboundDate',
                        title : '入库时间'
                    },
                {
                    field : 'transactionDate',
                    title : '出入库时间'
                    field : 'outboundDate',
                    title : '出库时间'
                },
                {
                    field : 'optUser',
@@ -126,11 +128,11 @@
                },
                {
                    field : 'applyUser',
                    title : '使用人'
                    title : '负责人'
                },
                {
                    field : 'number',
                    title : '出入库数量'
                    title : '数量'
                },
                {
                    field : 'remark',
@@ -164,7 +166,7 @@
        <div class="col-xs-offset-1">
            <input type="file" id="file" name="file"/>
            <div class="mt10 pt5">
                <input type="checkbox" id="updateSupport" name="updateSupport" title="导入设备出入库信息信息"> 是否更新已经存在的数据
                <input type="checkbox" id="updateSupport" name="updateSupport" title="导入设备出入库信息"> 是否更新已经存在的数据
                <a onclick="importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
            </div>
            <font color="red" class="pull-left mt10">
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/deviceLog/edit.html
@@ -13,26 +13,14 @@
                    <input name="code" th:field="*{code}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">项目名称:</label>
                <div class="col-sm-8">
                    <input name="projectName" th:field="*{projectName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">设备编号:</label>
                <div class="col-sm-8">
                    <input name="deviceCode" th:field="*{deviceCode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">设备名称:</label>
                <label class="col-sm-3 control-label">名称:</label>
                <div class="col-sm-8">
                    <input name="deviceName" th:field="*{deviceName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">出入库类型:</label>
                <label class="col-sm-3 control-label">类型:</label>
                <div class="col-sm-8">
                    <select name="type" class="form-control m-b" th:with="type=${@dict.getType('device_log_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{type}"></option>
@@ -40,9 +28,15 @@
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">出入库时间:</label>
                <label class="col-sm-3 control-label">入库时间:</label>
                <div class="col-sm-8">
                    <input name="transactionDate" th:field="*{transactionDate}" class="form-control" type="text">
                    <input name="inboundDate" th:field="*{inboundDate}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">出库时间:</label>
                <div class="col-sm-8">
                    <input name="outboundDate" th:field="*{outboundDate}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
@@ -52,7 +46,7 @@
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">使用人:</label>
                <label class="col-sm-3 control-label">负责人:</label>
                <div class="col-sm-8">
                    <input name="applyUser" th:field="*{applyUser}" class="form-control" type="text">
                </div>
@@ -63,6 +57,13 @@
                    <input name="number" th:field="*{number}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注:</label>
                <div class="col-sm-8">
                    <textarea id="remark" th:field="*{remark}" name="remark" class="form-control"></textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/hole/hole.html
@@ -45,6 +45,9 @@
                 <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="geo:hole:remove">
                     <i class="fa fa-remove"></i> 删除
                 </a>
                 <a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="geo:hole:import">
                     <i class="fa fa-upload"></i> 导入
                 </a>
             </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
@@ -67,6 +70,7 @@
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                importUrl: prefix + "/importHole/"+projectId,
                modalName: "钻孔",
                columns: [{
                    checkbox: true
@@ -123,6 +127,29 @@
            };
            $.table.init(options);
        });
        //下载
        function importTemplate() {
            var filename="钻孔模板.xls";
            window.location.href = ctx + "common/download?fileName=" + encodeURI(filename) + "&delete=" + false;
        }
    </script>
</body>
<!-- 导入区域 -->
<script id="importTpl" type="text/template">
    <form enctype="multipart/form-data" class="mt20 mb10">
        <div class="col-xs-offset-1">
            <input type="file" id="file" name="file"/>
            <div class="mt10 pt5">
                <input type="checkbox" id="updateSupport" name="updateSupport" title="导入钻孔信息"> 是否更新已经存在的数据
                <a onclick="importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
            </div>
            <font color="red" class="pull-left mt10">
                提示:仅允许导入“xls”或“xlsx”格式文件!
            </font>
        </div>
    </form>
</script>
</html>
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/navigate.html
@@ -51,7 +51,7 @@
            </div>
            <div class="box-header ">
                <div class="box-title">
                    <i class="glyphicon glyphicon-th-list"></i> <a class="afont" th:href="@{/geo/projectData(id=${project.ids},type='3')}" target="mainFrame" onclick="selected(this)">施工现场管理</a>
                    <i class="glyphicon glyphicon-th-list"></i> <a class="afont" th:href="@{/geo/projectData/2(id=${project.ids},type='3')}" target="mainFrame" onclick="selected(this)">施工现场管理</a>
                </div>
            </div>
            <div class="box-header ">
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/add.html
@@ -20,8 +20,8 @@
<!--                    </select>-->
<!--                </div>-->
<!--            </div>-->
            <div class="form-group">
                <label class="col-sm-3 control-label">文件类型:</label>
            <div th:if="${dataType}=='3'" class="form-group">
                <label class="col-sm-3 control-label">业务类型:</label>
                <div class="col-sm-8">
                    <select name="fileType" class="form-control m-b" th:with="type=${@dict.getType('project_data_file_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/edit.html
@@ -13,16 +13,16 @@
                    <input name="name" th:field="*{name}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">资料类型:</label>
                <div class="col-sm-8">
                    <select name="dataType" class="form-control m-b" th:with="type=${@dict.getType('project_data_type')}" required>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{dataType}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">文件类型:</label>
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">资料类型:</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <select name="dataType" class="form-control m-b" th:with="type=${@dict.getType('project_data_type')}" required>-->
<!--                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{dataType}"></option>-->
<!--                    </select>-->
<!--                </div>-->
<!--            </div>-->
            <div th:if="${dataType}=='3'"  class="form-group">
                <label class="col-sm-3 control-label">业务类型类型:</label>
                <div class="col-sm-8">
                    <select name="fileType" class="form-control m-b" th:with="type=${@dict.getType('project_data_file_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{fileType}"></option>
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/image_view.html
New file
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('查看图片')" />
    <th:block th:include="include :: bootstrap-fileinput-css" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <img id="imgId" style="margin-left: 50%;transform: translateX(-50%)" >
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var urlAddress = [[${urlAddress}]];
        $(document).ready(function(){
            $("#imgId").attr("src","/bjfw/profile/" + urlAddress);
        })
    </script>
</body>
</html>
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/projectData.html
@@ -8,33 +8,7 @@
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <!--        条件表达式            -->
                    <div th:if="${type}=='3'" class="select-list">
                        <ul>
                            <li>
                                <p>资料名称:</p>
                                <input type="text" name="name"/>
                            </li>
                            <li>
                                <p>业务类型:</p>
                                <select name="fileType" th:with="type=${@dict.getType('project_data_file_type')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <p>标签:</p>
                                <input type="text" name="labels"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><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>
                    <!--        条件表达式            -->
                    <div th:if="${type}!='3'" class="select-list">
                    <div class="select-list">
                        <ul>
                            <li>
                                <p>资料名称:</p>
@@ -67,6 +41,9 @@
<!--                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="geo:projectData:export">-->
<!--                    <i class="fa fa-download"></i> 导出-->
<!--                 </a>-->
                <a class="btn btn-danger" data-toggle="modal" onclick="uploadZIP();">
                    <i class="fa fa-upload"></i>上传附件
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
@@ -101,15 +78,8 @@
                    visible: false
                },
                {
                    field : 'name',
                    field : 'name',
                    title : '资料名称'
                },
                {
                    field : 'fileType',
                    title : '文件类型',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(fileTypeDatas, value);
                    }
                },
                {
                    field : 'labels', 
@@ -125,13 +95,30 @@
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
                        actions.push('<a class="btn btn-info btn-xs ' + '" href="javascript:void(0)" onclick="viewImg(\'' + row.dataUrl + '\' , \'' + row.id + '\')"><i class="glyphicon glyphicon-menu-hamburger"></i>查看附件</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
        // 上传附件
        function uploadZIP(){
            $.modal.open('上传附件', prefix + "/importImg");
        }
        // 查看图片详情
        function viewImg(path, id) {
            if(path === null || path === '' || path === 'null'){
                $.modal.alertSuccess("文件无法打开!");
                return;
            }
            var url = prefix + "/viewImage?id=" + id;
            $.modal.open("查看图片", url, 800, 600);
        }
    </script>
</body>
</html>
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/projectData2.html
New file
@@ -0,0 +1,137 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('项目资料列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div th:if="${type}=='3'" class="select-list">
                        <ul>
                            <li>
                                <p>资料名称:</p>
                                <input type="text" name="name"/>
                            </li>
                            <li>
                                <p>业务类型:</p>
                                <select name="fileType" th:with="type=${@dict.getType('project_data_file_type')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <p>标签:</p>
                                <input type="text" name="labels"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><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="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="geo:projectData:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="geo:projectData:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="geo:projectData:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
<!--                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="geo:projectData:export">-->
<!--                    <i class="fa fa-download"></i> 导出-->
<!--                 </a>-->
                <a class="btn btn-danger" data-toggle="modal" onclick="uploadZIP();">
                    <i class="fa fa-upload"></i>上传附件
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('geo:projectData:edit')}]];
        var removeFlag = [[${@permission.hasPermi('geo:projectData:remove')}]];
        var dataTypeDatas = [[${@dict.getType('project_data_type')}]];
        var fileTypeDatas = [[${@dict.getType('project_data_file_type')}]];
        var projectId=[[${projectId}]];
        var type=[[${type}]];
        var prefix = ctx + "geo/projectData";
        console.log("type",type);
        $(function() {
            var options = {
                url: prefix + "/list?projectId=" + projectId + "&dataType=" + type,
                createUrl: prefix + "/add?projectId=" + projectId + "&dataType=" + type,
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "项目资料",
                columns: [{
                    checkbox: true
                },
                {
                    field : 'id',
                    title : '主键',
                    visible: false
                },
                {
                    field : 'name',
                    title : '资料名称'
                },
                {
                    field : 'fileType',
                    title : '业务类型',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(fileTypeDatas, value);
                    }
                },
                {
                    field : 'labels',
                    title : '标签'
                },
                {
                    field : 'remark',
                    title : '备注'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
                        actions.push('<a class="btn btn-info btn-xs ' + '" href="javascript:void(0)" onclick="viewImg(\'' + row.dataUrl + '\' , \'' + row.id + '\')"><i class="glyphicon glyphicon-menu-hamburger"></i>查看附件</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
        // 上传附件
        function uploadZIP(){
            $.modal.open('上传附件', prefix + "/importImg");
        }
        // 查看图片详情
        function viewImg(path, id) {
            if(path === null || path === '' || path === 'null'){
                $.modal.alertSuccess("文件无法打开!");
                return;
            }
            var url = prefix + "/viewImage?id=" + id;
            $.modal.open("查看图片", url, 800, 600);
        }
    </script>
</body>
</html>
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/upload.html
New file
@@ -0,0 +1,90 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('文档描述列表')" />
       <th:block th:include="include :: select2-css" />
</head>
<body class="gray-bg">
    <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId"  enctype="multipart/form-data">
                    <div class="select-list">
                        <ul>
                            <li>
                                <p>匹配字段:</p>
                                <select id="docId" name="docId" class="form-control m-b">
                                     <option value="filename">图片名称</option>
                                </select>
                            </li>
                             <li>
                                <p>压缩包:</p>
                               <input type="file" id="file" name="file"/>
                             </li>
                             <li>
                                 <a class="btn btn-primary btn-rounded btn-sm" onclick="upload()"><i class="fa fa-search"></i>&nbsp;上传</a>
                             </li>
                        </ul>
                    </div>
                </form>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <span>1、单个或者多个文件请以.ZIP压缩包的形式上传,把单个或者多个文件放到文件夹中,压缩文件夹为zip格式<br> </span>
                <span>1、附件名称需要与系统内的资料名称一致<br> </span>
                <span>2、文件不允许包含特殊字符:空格 、正反斜线、问号、星号等<br> </span>
                <span>3、上传文件经过了 解压 、 移动  、遍历 、更新数据库等多个步骤,请耐心等待<br> </span>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: select2-js" />
    <script th:inline="javascript">
    function upload(){
        var file = $('#file').val();
        if (file == '' || (!$.common.endWith(file, '.zip'))){
            $.modal.msgWarning("请选择压缩包");
            return false;
        }
        var formData = new FormData();
        formData.append("file", $('#file')[0].files[0]);
        formData.append("fieldname", $('#docId').val());
        $.modal.loading("数据上传解析中");
        $.ajax({
            url: ctx + "geo/projectData/uploadZIP",
            data: formData,
            cache: false,
            contentType: false,
            processData: false,
            type: 'POST',
            success: function (result) {
                if (result.code == web_status.SUCCESS) {
                    $.modal.closeLoading();
                    $.modal.alertSuccess(result.msg);
                } else if (result.code == web_status.WARNING) {
                    $.modal.closeLoading();
                    $.modal.alertWarning(result.msg)
                } else {
                    $.modal.closeLoading();
                    $.modal.alertError(result.msg);
                }
            }
        });
    }
    </script>
</body>
</html>
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectPerson/add.html
@@ -27,9 +27,15 @@
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">地址:</label>
                <label class="col-sm-3 control-label">身份证号:</label>
                <div class="col-sm-8">
                    <input name="address" class="form-control" type="text">
                    <input name="idCard" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">人员分组:</label>
                <div class="col-sm-8">
                    <input name="personGroup" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectPerson/edit.html
@@ -28,9 +28,15 @@
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">地址:</label>
                <label class="col-sm-3 control-label">身份证号:</label>
                <div class="col-sm-8">
                    <input name="address" th:field="*{address}" class="form-control" type="text">
                    <input name="idCard" th:field="*{idCard}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">人员分组:</label>
                <div class="col-sm-8">
                    <input name="personGroup" th:field="*{personGroup}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectPerson/projectPerson.html
@@ -93,9 +93,13 @@
                    title : '手机号'
                },
                {
                    field : 'address',
                    title : '地址'
                    field : 'idCard',
                    title : '身份证号'
                },
                    {
                        field : 'personGroup',
                        title : '人员分组'
                    },
                {
                    field : 'responsibility', 
                    title : '职责'