地质所 沉降监测网建设项目
suerwei
2024-05-21 a5133cfb07e81a983101028e27bd0237b416cfb5
钻孔管理跟钻孔日志,联动
5个文件已修改
1个文件已添加
127 ■■■■■ 已修改文件
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/HoleLogController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/HoleLogMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/hole/hole.html 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/holeLog/add.html 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/holeLog/holeLog.html 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/holeLog/holeLog2.html 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/HoleLogController.java
@@ -41,6 +41,14 @@
        return prefix + "/holeLog";
    }
    @RequiresPermissions("geo:holeLog:view")
    @GetMapping("/viewHoleLog")
    public String holeLog2(String projectId, String holeCode, ModelMap mmap) {
        mmap.put("projectId", projectId);
        mmap.put("holeCode", holeCode);
        return prefix + "/holeLog2";
    }
    /**
     * 查询钻孔日志列表
     */
@@ -70,8 +78,9 @@
     * 新增钻孔日志
     */
    @GetMapping("/add")
    public String add(String projectId, ModelMap mmap) {
    public String add(String projectId, String holeCode, ModelMap mmap) {
        mmap.put("projectId", projectId);
        mmap.put("holeCode", holeCode);
        return prefix + "/add";
    }
javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/HoleLogMapper.xml
@@ -32,11 +32,11 @@
            <if test="recordPerson != null  and recordPerson != ''"> and record_person = #{recordPerson}</if>
            <if test="description != null  and description != ''"> and description = #{description}</if>
            <!-- 开始时间检索 -->
            <if test="params.beginTime != null and params.beginTime != ''">
            <if test="params.beginCreateTime != null and params.beginCreateTime != ''">
                and date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginCreateTime},'%y%m%d')
            </if>
            <!-- 结束时间检索 -->
            <if test="params.endTime != null and params.endTime != ''">
            <if test="params.endCreateTime != null and params.endCreateTime != ''">
                and date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endCreateTime},'%y%m%d')
            </if>
        </where>
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/hole/hole.html
@@ -58,9 +58,11 @@
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('geo:hole:edit')}]];
        var removeFlag = [[${@permission.hasPermi('geo:hole:remove')}]];
        var holeLogAddFlag = [[${@permission.hasPermi('geo:holeLog:add')}]];
        var typeDatas = [[${@dict.getType('hole_type')}]];
        var statusDatas = [[${@dict.getType('hole_status')}]];
        var prefix = ctx + "geo/hole";
        var prefix2 = ctx + "geo/holeLog";
        var projectId=[[${projectId}]];
        $(function() {
@@ -87,7 +89,12 @@
                }, {
                        field : 'type',
                        title : '钻孔类型',
                        sortable:true
                        sortable:true,
                        formatter: function (value, row, index) {
                            var actions=[];
                            actions.push('<a href="javascript:void(0)" style="color:#1E9FFF;" onclick="preview(\'' + row.code + '\')">'+value+'</a>');
                            return actions.join('');
                        }
                    },
                {
                    field : 'elevation', 
@@ -139,6 +146,7 @@
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-info btn-xs ' + holeLogAddFlag + '" href="javascript:void(0)" onclick="holeLogSave(\'' + row.code + '\')"><i class="glyphicon glyphicon-th-list"></i>钻孔进度</a> ');
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.ids + '\')"><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.ids + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
@@ -154,6 +162,18 @@
            var filename="钻孔模板.xls";
            window.location.href = ctx + "common/download?fileName=" + encodeURI(filename) + "&delete=" + false;
        }
        //保存记录
        function holeLogSave(holeCode) {
            const url = prefix2 + "/add?projectId=" + projectId + "&holeCode=" + holeCode;
            $.modal.open("钻孔进度记录",url);
        }
        //查看钻孔列表
        function preview(code) {
            const url = prefix2 + "/viewHoleLog?projectId=" + projectId + "&holeCode=" + code;
            $.modal.open("钻孔进度记录列表", url , 1100, 750);
        }
    </script>
</body>
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/holeLog/add.html
@@ -10,7 +10,7 @@
            <div class="form-group">    
                <label class="col-sm-3 control-label">钻孔编号:</label>
                <div class="col-sm-8">
                    <input name="code" class="form-control" type="text">
                    <input name="code" th:value="${holeCode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
@@ -53,6 +53,7 @@
    <script th:inline="javascript">
        var prefix = ctx + "geo/holeLog"
        var projectId = [[${projectId}]];
        var holeCode = [[${holeCode}]];
        $("#form-holeLog-add").validate({
            focusCleanup: true
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/holeLog/holeLog.html
@@ -58,11 +58,12 @@
        var removeFlag = [[${@permission.hasPermi('geo:holeLog:remove')}]];
        var prefix = ctx + "geo/holeLog";
        var projectId=[[${projectId}]];
        var holeCode = "";
        $(function() {
            var options = {
                url: prefix + "/list?projectId=" + projectId,
                createUrl: prefix + "/add?projectId=" + projectId,
                createUrl: prefix + "/add?projectId=" + projectId + "&holeCode=" + holeCode,
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/holeLog/holeLog2.html
New file
@@ -0,0 +1,84 @@
<!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 class="select-list">
                        <ul>
<!--                            <li>-->
<!--                                <p>钻孔编号:</p>-->
<!--                                <input type="text" name="code"/>-->
<!--                            </li>-->
                            <li class="select-time">
                                <p>记录保存时间:</p>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
                            </li>
                            <li>
                                <p>描述员:</p>
                                <input type="text" name="recordPerson"/>
                            </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="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 prefix = ctx + "geo/holeLog";
        var projectId=[[${projectId}]];
        var holeCode = [[${holeCode}]];
        $(function() {
            var options = {
                url: prefix + "/list?projectId=" + projectId + "&code=" + holeCode,
                modalName: "钻孔日志",
                columns: [{
                    field : 'code',
                    title : '钻孔编号'
                },
                {
                    field : 'beginDepth',
                    title : '起始深度',
                    sortable: true
                },
                {
                    field : 'endDepth',
                    title : '终止深度',
                    sortable: true
                },
                {
                    field : 'createTime',
                    title : '记录保存时间',
                    sortable: true
                },
                {
                    field : 'recordPerson',
                    title : '描述员'
                },
                {
                    field : 'description',
                    title : '描述备注'
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>