ソースを参照

Merge branch 'dev' of http://192.168.1.41:3000/maixinrong/Calculation into dev

Tony Kang 1 日 前
コミット
118478df89

+ 27 - 0
app/controller/sub_proj_controller.js

@@ -229,9 +229,13 @@ module.exports = app => {
             try {
                 const info = await this.ctx.service.subProjInfo.getInfo(ctx.subProject.id);
                 info.lx_tp = await this.ctx.service.budgetGu.getSumTp(ctx.subProject.budget_id);
+                if (info.lx_tp_unit === '万元') info.lx_tp = this.ctx.helper.div(info.lx_tp, 10000, 6);
                 info.cb_tp = await this.ctx.service.budgetGai.getSumTp(ctx.subProject.budget_id);
+                if (info.cb_tp_unit === '万元') info.cb_tp = this.ctx.helper.div(info.cb_tp, 10000, 6);
                 info.sgt_tp = await this.ctx.service.budgetYu.getSumTp(ctx.subProject.budget_id);
+                if (info.sgt_tp_unit === '万元') info.sgt_tp = this.ctx.helper.div(info.sgt_tp, 10000, 6);
                 info.zbys_tp = await this.ctx.service.budgetZb.getSumTp(ctx.subProject.budget_id);
+                if (info.zbys_tp_unit === '万元') info.zbys_tp = this.ctx.helper.div(info.zbys_tp, 10000, 6);
                 const renderData = {
                     info,
                     jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.subProject.info),
@@ -487,6 +491,29 @@ module.exports = app => {
             }
         }
 
+        async moveFile(ctx) {
+            try {
+                const data = JSON.parse(ctx.request.body.data);
+                if (!data.id || !data.rela_id) throw '缺少参数';
+                const result = await ctx.service.subProjFile.moveFile(data.id, data.rela_id);
+                ctx.body = { err: 0, msg: '', data: result };
+            } catch (error) {
+                this.log(error);
+                ctx.ajaxErrorBody(error, '编辑附件失败');
+            }
+        }
+        async saveFile(ctx) {
+            try {
+                const data = JSON.parse(ctx.request.body.data);
+                if (!data.id || !data.filename) throw '缺少参数';
+                const result = await ctx.service.subProjFile.saveFile(data.id, data.filename);
+                ctx.body = { err: 0, msg: '', data: result };
+            } catch (error) {
+                this.log(error);
+                ctx.ajaxErrorBody(error, '编辑附件失败');
+            }
+        }
+
         async noPermission(ctx) {
             ctx.controllerName = ctx.params.block;
             await this.layout('sub_proj/no_permission.ejs');

+ 1 - 0
app/middleware/revise_check.js

@@ -35,6 +35,7 @@ module.exports = options => {
                 const auditorsId = this.helper._.map(auditors, 'audit_id');
                 revise.reviseUsers.push(...auditorsId);
             }
+            if (revise.reviseUsers.indexOf(this.session.sessionUser.accountId) < 0) throw '您无权查看该数据';
             revise.readOnly = revise.uid !== this.session.sessionUser.accountId ||
                 revise.status === auditConst.status.checking || revise.status === auditConst.status.checked;
             revise.priceCount = yield this.service.revisePrice.count({ rid: revise.id });

+ 3 - 0
app/public/js/se_temp_land.js

@@ -117,6 +117,9 @@ $(document).ready(() => {
             }
             return result;
         }
+        getMaxOrder() {
+            return this.data.length > 0 ? this.data[this.data.length - 1].order : 0;
+        }
     }
     const seTempObj = new SeTemp();
     const refreshSum = function () {

+ 241 - 19
app/public/js/shares/tools_att.js

@@ -17,13 +17,17 @@
         const fileInfo = setting.fileInfo || { user_name: 'username', user_id: 'uid', create_time: 'in_time' };
         const pageLength = 20;
         let curNode = null, curPage = 0;
+        let ctrlLength = 80;
+        if (setting.saveUrl) ctrlLength = ctrlLength + 15;
+        if (setting.moveUrl) ctrlLength = ctrlLength + 15;
         obj.html(
             '<div class="sjs-bar">\n' +
             '    <ul class="nav nav-tabs">\n' +
             '        <li class="nav-item"><a class="nav-link active" data-toggle="tab" href="#att-cur" role="tab" att-type="cur" id="att-cur-button">当前节点</a></li>\n' +
             '        <li class="nav-item"><a class="nav-link" data-toggle="tab" href="#att-all" role="tab" att-type="all">所有附件</a></li>\n' +
+            (setting.search ? '        <li class="nav-item"><a class="nav-link" data-toggle="tab" href="#att-search" role="tab" att-type="search">搜索</a></li>\n' : '') +
             '        <li class="nav-item ml-auto pt-1">\n' +
-            '            <a href="javascript:void(0);" id="batch-download" class="btn btn-sm btn-primary" type="curr">批量下载</a>\n' +
+            '            <a href="javascript:void(0);" id="batch-download" class="btn btn-sm btn-primary" type="cur">批量下载</a>\n' +
             '            <span id="showPage" style="display: none"><a href="javascript:void(0);" class="page-select ml-3" content="pre"><i class="fa fa-chevron-left"></i></a> <span id="att-cur-page">1</span>/<span id="att-total-page">10</span> <a href="javascript:void(0);" class="page-select mr-3" content="next"><i class="fa fa-chevron-right"></i></a></span>\n' +
             (setting.readOnly ? '' : '            <a href="#upload" data-toggle="modal" data-target="#upload"  class="btn btn-sm btn-outline-primary ml-2">上传</a>\n') +
             (setting.readOnly || !setting.bigValid ? '' : '            <a href="#add-big-file" data-toggle="modal" data-target="#add-big-file"  class="btn btn-sm btn-outline-primary ml-2">上传大文件</a>\n') +
@@ -35,7 +39,7 @@
             '        <div style="overflow:auto; overflow-x:hidden; height: 100%">\n' +
             '            <div class="mt-1 mb-1" id="att-cur-hint"></div>\n' +
             '            <table class="table table-sm table-bordered table-hover" style="word-break:break-all; table-layout: fixed">\n' +
-            '                <thead><tr><th width="25"><input type="checkbox" class="check-all-file"><th>文件名</th><th width="80">上传</th><th width="80">操作</th></tr></thead>\n' +
+            '                <thead><tr><th width="25"><input type="checkbox" class="check-all-file"><th>文件名</th><th width="80">上传</th><th width="' + ctrlLength + '">操作</th></tr></thead>\n' +
             '                <tbody id="cur-att-list" class="list-table"></tbody>\n' +
             '            </table>\n' +
             '        </div>\n' +
@@ -43,11 +47,23 @@
             '    <div class="tab-pane" id="att-all" style="height: 100%">\n' +
             '        <div style="overflow:auto; overflow-x:hidden; height: 100%">\n' +
             '            <table class="table table-sm table-bordered table-hover" style="word-break:break-all; table-layout: fixed">\n' +
-            '                <thead><tr><th width="25"><input type="checkbox" class="check-all-file"></th><th>文件名</th><th width="80">上传</th><th width="80">操作</th></tr></thead>\n' +
+            '                <thead><tr><th width="25"><input type="checkbox" class="check-all-file"></th><th>文件名</th><th width="80">上传</th><th width="' + ctrlLength + '">操作</th></tr></thead>\n' +
             '                <tbody id="all-att-list" class="list-table"></tbody>\n' +
             '           </table>\n' +
             '        </div>\n' +
             '    </div>\n' +
+            '    <div class="tab-pane" id="att-search" style="height: 100%">\n' +
+            '        <div style="overflow:auto; overflow-x:hidden; height: 100%">\n' +
+            '            <div class="input-group input-group-sm pb-1 pt-1">\n' +
+            '                <input id="att-search-keyword" type="text" class="form-control" autocomplete="off" placeholder="请输入 名称 查询" aria-label="Recipient\'s username" aria-describedby="button-addon2">\n' +
+            '                <div class="input-group-append"><button id="att-search-btn" class="btn btn-outline-secondary" type="button">搜索</button></div>\n' +
+            '            </div>\n' +
+            '            <table class="table table-sm table-bordered table-hover" style="word-break:break-all; table-layout: fixed">\n' +
+            '                <thead><tr><th width="25"><input type="checkbox" class="check-all-file"></th><th>文件名</th><th width="80">上传</th><th width="' + ctrlLength + '">操作</th></tr></thead>\n' +
+            '                <tbody id="search-att-list" class="list-table"></tbody>\n' +
+            '           </table>\n' +
+            '        </div>\n' +
+            '    </div>\n' +
             '</div>'
         );
         autoFlashHeight();
@@ -66,14 +82,17 @@
             if (tipNode && att.node) nodeInfo = getNodeHint(att.node);
             const tipHtml = nodeInfo ? `${nodeInfo}\n${att[fileInfo.create_time]}` : att[fileInfo.create_time];
             const tipType = 'title='; //'data-toggle="tooltip" data-html="true" data-placement="left" data-original-title=';
-            html.push(`<td><div class="d-flex"><a href="javascript:void(0)" ${tipType}"${tipHtml}" class="pl-0 col-11" file-id=${att.id}>${att.filename}${att.fileext}</a></div></td>`);
+            html.push(`<td file-id="${att.id}"><div class="d-flex"><a href="javascript:void(0)" ${tipType}"${tipHtml}" class="pl-0 col-11" file-id=${att.id}>${att.filename}${att.fileext}</a></div></td>`);
             html.push(`<td>${att[fileInfo.user_name]}</td>`);
-            const canDel = setting.readOnly ? false : att[fileInfo.user_id] === userID && (!setting.checked || att.extra_upload);
+            const canDel = setting.readOnly ? false : (att[fileInfo.user_id] === userID || setting.editfile) && (!setting.checked || att.extra_upload);
+            const moveHtml = canDel && setting.moveUrl ? `<a href="javascript: void(0);" class="ml-1 text-primary" name="att-move" file-id="${att.id}" ${tipType}"移动"><i class="fa fa-exchange fa-fw"></i></a>` : '';
+            const editHtml = canDel && setting.saveUrl ? `<a href="javascript: void(0);" class="ml-1 text-primary" name="att-edit" file-id="${att.id}" ${tipType}"重命名"><i class="fa fa-pencil fa-fw"></i></a>` : '';
+            const delHtml = canDel ? `<a class="ml-1 text-danger" href="javascript:void(0)" name="att-delete" file-id="${att.id}"><i class="fa fa-close" ${tipType}"删除"></i></a>` : '';
             html.push('<td width="80">',
                 `<a class="ml-1" href="javascript:void(0)" ${tipType}"定位" name="att-locate" file-id="${att.id}"><i class="fa fa-crosshairs"></i></a>`,
                 att.viewpath ? `<a class="ml-1" href="${att.viewpath}" ${tipType}"预览"  target="_blank"><i class="fa fa-eye"></i></a>` : '',
                 `<a class="ml-1" href="javascript:void(0)" ${tipType}"下载" onclick="AliOss.downloadFile('${att.filepath}', '${att.filename}${att.fileext}')"><i class="fa fa-download"></i></a>`,
-                canDel ? `<a class="ml-1 text-danger" href="javascript:void(0)" name="att-delete" file-id="${att.id}"><i class="fa fa-close" ${tipType}"删除"></i></a>` : '',
+                delHtml, moveHtml, editHtml,
                 '</td>');
             html.push('</tr>');
             return html.join('');
@@ -94,9 +113,9 @@
             $('#att-cur-page').text(curPage);
             const pageNum = Math.ceil(allAtts.length/pageLength);
             $('#att-total-page').text(pageNum);
-            const currPageAttData = allAtts.slice((curPage-1)*pageLength, curPage*pageLength);
+            const curPageAttData = allAtts.slice((curPage-1)*pageLength, curPage*pageLength);
             const html = [];
-            for(const att of currPageAttData) {
+            for(const att of curPageAttData) {
                 html.push(getAttHtml(att, true));
             }
             $('#all-att-list').html(html.join());
@@ -116,6 +135,136 @@
             }
             refreshCurAttHtml();
         };
+        const searchObj = {
+            result: [],
+            refreshSearchAttHtml: function() {
+                const html = [];
+                for (const att of this.result) {
+                    html.push(getAttHtml(att));
+                }
+                $('#search-att-list').html(html.join());
+                $('[data-toggle="tooltip"]').tooltip();
+            },
+            searchAtt: function() {
+                const keyword = $('#att-search-keyword').val();
+                this.result = allAtts.filter(x => { return x.filename.indexOf(keyword) >= 0; });
+                this.refreshSearchAttHtml();
+            },
+            removeSearchAtt: function(fid) {
+                const ri = this.result.findIndex(x => { return x.id === fid; });
+                if (ri >= 0) {
+                    this.result.splice(ri, 1);
+                    this.refreshSearchAttHtml();
+                }
+            },
+            getEditFileNameHtml(att) {
+                const inputHtml = `<input type="text" class="form-control form-control-sm" maxlength="100" name="new-att-filename" value="${att.filename + att.fileext}" file-id="${att.id}">`;
+                const btnHtml = `<div class="btn-group-table" style="display: none;"><a href="javascript: void(0)" class="mr-1" name="edit-att-ok"><i class="fa fa-check fa-fw"></i></a><a href="javascript: void(0)" class="mr-1" name="edit-att-cancel"><i class="fa fa-remove fa-fw"></i></a></div>`;
+                return `<div class="d-flex justify-content-between align-items-center table-file"><div>${inputHtml}</div>${btnHtml}</div>`;
+            },
+            getFileNameHtml(att, tipNode = false) {
+                let nodeInfo = '';
+                if (tipNode && att.node) nodeInfo = getNodeHint(att.node);
+                const tipHtml = nodeInfo ? `${nodeInfo}\n${att[fileInfo.create_time]}` : att[fileInfo.create_time];
+                const tipType = 'title='; //'data-toggle="tooltip" data-html="true" data-placement="left" data-original-title=';
+                return `<div class="d-flex"><a href="javascript:void(0)" ${tipType}"${tipHtml}" class="pl-0 col-11" file-id=${att.id}>${att.filename}${att.fileext}</a></div>`;
+            }
+        };
+        const moveObj = {
+            initMoveModal: function() {
+                if (this.initModal) return;
+                const html = '<div class="modal fade" id="move-att2" data-backdrop="static">\n' +
+                    '    <div class="modal-dialog" role="document">\n' +
+                    '        <div class="modal-content">\n' +
+                    '            <div class="modal-header">\n' +
+                    '                <h5 class="modal-title">选择</h5>\n' +
+                    '            </div>\n' +
+                    '            <div class="modal-body">\n' +
+                    '                <div class="btn-group">\n' +
+                    '                    <button type="button" class="btn btn-sm  text-primary dropdown-toggle" data-toggle="dropdown" id="mf2-zhankai" aria-expanded="false">显示层级</button>\n' +
+                    '                    <div class="dropdown-menu" aria-labelledby="mf2-zhankai" x-placement="bottom-start" style="position: absolute; transform: translate3d(0px, 21px, 0px); top: 0px; left: 0px; will-change: transform;">\n' +
+                    '                        <a class="dropdown-item" name="ma2-showLevel" tag="1" href="javascript: void(0);">第一层</a>\n' +
+                    '                        <a class="dropdown-item" name="ma2-showLevel" tag="2" href="javascript: void(0);">第二层</a>\n' +
+                    '                        <a class="dropdown-item" name="ma2-showLevel" tag="3" href="javascript: void(0);">第三层</a>\n' +
+                    '                        <a class="dropdown-item" name="ma2-showLevel" tag="4" href="javascript: void(0);">第四层</a>\n' +
+                    '                        <a class="dropdown-item" name="ma2-showLevel" tag="last" href="javascript: void(0);">最底层</a>\n' +
+                    '                    </div>\n' +
+                    '                </div>\n' +
+                    '                <div class="modal-height-500 mt-2" id="move-att2-tree">\n' +
+                    '                </div>\n' +
+                    '            </div>\n' +
+                    '            <div class="modal-footer">\n' +
+                    '                <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>\n' +
+                    '                <button type="button" class="btn btn-primary btn-sm" id="move-att2-ok">确定移动</button>\n' +
+                    '            </div>\n' +
+                    '        </div>\n' +
+                    '    </div>\n' +
+                    '</div>';
+                $('body').append(html);
+                this.initModal = true;
+            },
+            initLoadCol: function() {
+                if (this.loadCol) return;
+                const loadCol = [setting.key];
+                if (setting.relaTree) {
+                    const treeSetting = setting.relaTree.setting;
+                    loadCol.push(treeSetting.id, treeSetting.pid, treeSetting.order, treeSetting.level, treeSetting.isLeaf, treeSetting.fullPath);
+                }
+                if (setting.relaTreeSpreadSetting) setting.relaTreeSpreadSetting.cols.forEach(c => { loadCol.push(c.field); });
+                this.loadCol = loadCol;
+            },
+            initMoveTree: function() {
+                if (!setting.relaTree) {
+                    this.moveTree = null;
+                    return;
+                }
+                if (!this.moveTree) this.moveTree = createNewPathTree('base', JSON.parse(JSON.stringify(setting.relaTree.setting)));
+                const fields = this.loadCol;
+                const datas = setting.relaTree.nodes.map(n => {
+                    const nn = {};
+                    for (const f of fields) {
+                        nn[f] = n[f];
+                    }
+                    return nn;
+                });
+                this.moveTree.loadDatas(datas);
+            },
+            showMoveTree: function() {
+                if (!this.moveTree) return;
+                if (!this.spread) {
+                    const spread = SpreadJsObj.createNewSpread($('#move-att2-tree')[0]);
+                    this.spread = spread;
+                    this.sheet = this.spread.getActiveSheet();
+                    SpreadJsObj.initSheet(this.sheet, setting.relaTreeSpreadSetting);
+                    $('#move-att2').on('shown.bs.modal', function() {
+                        spread.refresh();
+                    })
+                }
+                SpreadJsObj.loadSheetData(this.sheet, SpreadJsObj.DataType.Tree, this.moveTree, true);
+            },
+            show: function(file) {
+                this.file = file;
+                this.initMoveModal();
+                this.initLoadCol();
+                this.initMoveTree();
+                this.showMoveTree();
+                $('#move-att2').modal('show');
+            },
+            moveoNodeIndex: function(data) {
+                const oxi = nodeIndexes[this.file[setting.masterKey]];
+                if (oxi) {
+                    const oxii = findFileIndex(oxi, this.file.id);
+                    if (oxii >= 0) oxi.splice(oxii, 1);
+                }
+                if (!nodeIndexes[data[setting.masterKey]]) {
+                    nodeIndexes[data[setting.masterKey]] = [this.file];
+                } else {
+                    nodeIndexes[data[setting.masterKey]].unshift(this.file);
+                }
+                this.file[setting.masterKey] = data[setting.masterKey];
+                setting.getRelaNode(this.file);
+            }
+        };
         const findFile = setting.fileIdType === 'string'
             ? function (list, id) { return list.find(item => item.id === id); }
             : function (list, id) { return list.find(item => item.id === parseInt(id)); };
@@ -135,13 +284,12 @@
         // 切换 当前节点/所有附件
         $('#fujian .nav-link').on('click', function () {
             const tabPanel = $(this).attr('att-type');
-            if (tabPanel !== 'all') {
-                $('#showPage').hide();
-                $('#batch-download').prop('type', 'curr');
-            } else {
+            if (tabPanel === 'all') {
                 $('#showPage').show();
-                $('#batch-download').prop('type', 'all')
+            } else {
+                $('#showPage').hide();
             }
+            $('#batch-download').prop('type', 'all')
         });
         // 切换页数
         $('.page-select').on('click', function () {
@@ -163,12 +311,7 @@
             const self = this;
             const files = [];
             const type = $(this).prop('type');
-            let node = '';
-            if (type === 'curr') {
-                node = '#cur-att-list .check-file:checked'
-            } else {
-                node = '#all-att-list .check-file:checked'
-            }
+            let node = `#${type}-att-list .check-file:checked`;
             $(node).each(function() {
                 const fid = $(this).attr('file-id');
                 const att = findFile(allAtts, fid);
@@ -293,6 +436,78 @@
                     refreshAllAttHtml();
                 }
                 refreshCurAttHtml();
+                searchObj.removeSearchAtt(fid);
+            });
+        });
+        $('body').on('click', "a[name=att-edit]", function() {
+            const check = $('[name=new-att-filename] input[file-id]');
+            if (check.length > 0 && check[0].getAttribute('file-id') === this.getAttribute('file-id')) {
+                toastr.warning('请勿多个分类下编辑同一个文件');
+                return;
+            }
+
+            const id = this.getAttribute('file-id');
+            const att = findFile(allAtts, id);
+            const tbody = $(this).closest('tbody');
+            $(`td[file-id=${id}]`, tbody).html(searchObj.getEditFileNameHtml(att));
+        });
+        $('body').on('mouseenter', ".table-file", function(){
+            $(this).children(".btn-group-table").css("display","block");
+        });
+        $('body').on('mouseleave', ".table-file", function(){
+            $(this).children(".btn-group-table").css("display","none");
+        });
+        $('body').on('click', "a[name=edit-att-ok]", function() {
+            const td = $(this).parent().parent().parent();
+            const id = td.attr('file-id');
+            const att = findFile(allAtts, id);
+            if (!att) return;
+
+            const filename = $('input', td).val();
+            if (filename === att.filename + att.fileext) {
+                td.html(searchObj.getFileNameHtml(att));
+                return;
+            }
+
+            postData(setting.saveUrl, {id, filename}, function (result) {
+                const att = findFile(allAtts, id);
+                att.filename = result.filename;
+                att.fileext = result.fileext;
+                // 刷新3个table
+                refreshAllAttHtml();
+                refreshCurAttHtml();
+                searchObj.refreshSearchAttHtml();
+            });
+        });
+        $('body').on('click', "a[name=edit-att-cancel]", function() {
+            const td = $(this).parent().parent().parent();
+            const id = td.attr('file-id');
+            const att = findFile(allAtts, id);
+            if (!att) return;
+
+            td.html(searchObj.getFileNameHtml(att));
+        });
+        $('body').on('click', "a[name=att-move]", function() {
+            const id = this.getAttribute('file-id');
+            const att = findFile(allAtts, id);
+            moveObj.show(att);
+        });
+        $('body').on('click', '#move-att2-ok', function() {
+            const select = SpreadJsObj.getSelectObject(moveObj.sheet);
+            if (!select) {
+                toastr.warning('请选择要移动至的节点');
+                return;
+            }
+            if (select[setting.key] === moveObj.file[setting.masterKey]) {
+                toastr.warning('请勿移动至原所属节点下');
+                return;
+            }
+            const updateData = { id: moveObj.file.id };
+            updateData[setting.masterKey] = select[setting.key];
+            postData(setting.moveUrl, updateData, function (result) {
+                moveObj.moveoNodeIndex(result);
+                refreshCurAttHtml();
+                $('#move-att2').modal('hide');
             });
         });
         // 监听附件check是否选中
@@ -312,6 +527,13 @@
                 $(this).find('input:checkbox').prop("checked", isCheck);
             })
         });
+        // 搜索
+        $('body').on('click', '#att-search-btn', function() {
+            searchObj.searchAtt();
+        });
+        $('body').on('keydown', '#att-search-keyword', function(e) {
+            if (e.keyCode == 13) searchObj.searchAtt();
+        });
 
         const _addToNodeIndex = function(att, isTop = false) {
             const id = att[setting.masterKey];

+ 128 - 0
app/public/js/sp_progress.js

@@ -10,6 +10,100 @@ $(document).ready(() => {
     autoFlashHeight();
     let datepicker, fileReference;
 
+    class SppColSet {
+        constructor() {
+            this.cacheKey = 'zh.subProjProgressColSet';
+            this.colSetDatas = [
+                { id: 1, pid: -1, level: 1, order: 1, is_leaf: 0, full_path: '1', name: '成果编制', field: '', show: 1},
+                { id: 2, pid: 1, level: 2, order: 1, is_leaf: 1, full_path: '1-2', name: '进度', field: 'edit_progress', show: 1},
+                { id: 3, pid: 1, level: 2, order: 2, is_leaf: 1, full_path: '1-3', name: '日期', field: 'edit_date', show: 1},
+                { id: 4, pid: 1, level: 2, order: 3, is_leaf: 1, full_path: '1-4', name: '部门', field: 'edit_department', show: 1},
+                { id: 5, pid: -1, level: 1, order: 2, is_leaf: 0, full_path: '5', name: '报审情况', field: '', show: 1},
+                { id: 6, pid: 5, level: 2, order: 1, is_leaf: 1, full_path: '5-6', name: '进度', field: 'submit_progress', show: 1},
+                { id: 7, pid: 5, level: 2, order: 2, is_leaf: 1, full_path: '5-7', name: '日期', field: 'submit_date', show: 1},
+                { id: 8, pid: 5, level: 2, order: 3, is_leaf: 1, full_path: '5-8', name: '部门', field: 'submit_department', show: 1},
+                { id: 9, pid: -1, level: 1, order: 3, is_leaf: 0, full_path: '9', name: '批复情况', field: '', show: 1},
+                { id: 10, pid: 9, level: 2, order: 1, is_leaf: 1, full_path: '9-10', name: '进度', field: 'reply_progress', show: 1},
+                { id: 11, pid: 9, level: 2, order: 2, is_leaf: 1, full_path: '9-11', name: '日期', field: 'reply_date', show: 1},
+                { id: 12, pid: 9, level: 2, order: 3, is_leaf: 1, full_path: '9-12', name: '部门', field: 'reply_department', show: 1},
+                { id: 13, pid: 9, level: 2, order: 4, is_leaf: 1, full_path: '9-13', name: '文号', field: 'reply_code', show: 1},
+            ];
+            this.cache = this.colSetDatas.filter(x => { return x.field; }).map(x => { return {field: x.field, show: x.show}; });
+            this.tree = createNewPathTree('ledger', { id: 'id', pid: 'pid', order: 'order', level: 'level', isLeaf: 'is_leaf', fullPath: 'full_path', rootId: -1 });
+            this.tree.loadDatas(this.colSetDatas);
+            const cacheStr = getLocalCache(this.cacheKey);
+            if (cacheStr) this.cache = JSON.parse(cacheStr);
+        }
+        reInitTreeData() {
+            this.tree.nodes.forEach(x => {
+                if (!x.field) return;
+                const csd = this.cache.find(d => { return x.field === d.field; });
+                if (csd) x.show = csd.show;
+            });
+            this.tree.nodes.forEach(x => {
+                if (!x.children || x.children.length === 0) return;
+                x.show = x.children.filter(c => { return !!c.show; }).length > 0 ? 1 : 0;
+            })
+        }
+        spreadButtonClick(e, info) {
+            if (!info.sheet.zh_setting) return;
+
+            const select = SpreadJsObj.getSelectObject(info.sheet);
+            const col = info.sheet.zh_setting.cols[info.col];
+            if (col.field !== 'show') return;
+            if (info.sheet.isEditing()) info.sheet.endEdit(true);
+
+            let refreshRow = 1;
+            select.show = select.show ? 0 : 1;
+            if (select.children && select.children.length > 0) {
+                refreshRow = refreshRow + select.children.length;
+                select.children.forEach(x => { x.show = select.show; });
+            }
+            SpreadJsObj.reLoadRowData(info.sheet, info.row, refreshRow);
+        }
+        initSpread() {
+            if (!this.spread) {
+                const spread = SpreadJsObj.createNewSpread($('#spp-col-set-spread')[0]);
+                this.spread = spread;
+                this.sheet = this.spread.getActiveSheet();
+                SpreadJsObj.initSheet(this.sheet, {
+                    cols: [
+                        {title: '名称', colSpan: '1', rowSpan: '1', field: 'name', hAlign: 0, width: 215, formatter: '@', cellType: 'tree'},
+                        {title: '显示', colSpan: '1', rowSpan: '1', field: 'show', hAlign: 1, width: 50, formatter: '@', cellType: 'checkbox'},
+                    ],
+                    emptyRows: 0,
+                    headRows: 1,
+                    headRowHeight: [32],
+                    defaultRowHeight: 21,
+                    headerFont: '12px 微软雅黑',
+                    font: '12px 微软雅黑',
+                    readOnly: true,
+                });
+                $('#spp-col-set').on('shown.bs.modal', function() {
+                    spread.refresh();
+                });
+                spread.bind(spreadNS.Events.ButtonClicked, this.spreadButtonClick)
+            }
+            SpreadJsObj.loadSheetData(this.sheet, SpreadJsObj.DataType.Tree, this.tree, true);
+        }
+        loadColSet2SpreadSetting(spreadSetting){
+            this.cache.forEach(c => {
+                const ssc = spreadSetting.cols.find(x => { return c.field === x.field; });
+                if (ssc) ssc.visible = c.show ? true : false;
+            });
+        }
+        saveCache() {
+            this.cache = this.tree.nodes.filter(x => { return x.field; }).map(x => { return {field: x.field, show: x.show}; });
+            setLocalCache(this.cacheKey, JSON.stringify(this.cache));
+        }
+        show() {
+            this.initSpread();
+            this.reInitTreeData();
+            $('#spp-col-set').modal('show');
+        }
+    }
+    const sppColSet = new SppColSet();
+
     class ProgressObj {
         constructor() {
             this.spread = SpreadJsObj.createNewSpread($('#progress-spread')[0]);
@@ -116,6 +210,7 @@ $(document).ready(() => {
             };
             this.ckSpread = window.location.pathname + '-progressSelect';
 
+            this.refreshSpreadCol();
             this.initSpread();
             this.initOtherEvent();
         }
@@ -139,6 +234,10 @@ $(document).ready(() => {
                 self.baseOpr(this.getAttribute('type'));
             });
         }
+        refreshSpreadCol() {
+            sppColSet.loadColSet2SpreadSetting(this.spreadSetting);
+            SpreadJsObj.refreshColumnVisible(this.sheet);
+        }
         refreshOperationValid() {
             const setObjEnable = function (obj, enable) {
                 if (enable) {
@@ -503,6 +602,8 @@ $(document).ready(() => {
         uploadUrl: 'progress/file/upload',
         deleteUrl: 'progress/file/delete',
         uploadBigUrl: 'progress/file/upload/big',
+        moveUrl: 'progress/file/move',
+        saveUrl: 'progress/file/save',
         checked: false,
         zipName: `阶段进度-附件.zip`,
         readOnly: readOnly,
@@ -513,6 +614,25 @@ $(document).ready(() => {
             user_id: 'user_id',
             create_time: 'create_time',
         },
+        search: true,
+        editfile: editfile,
+        getRelaNode: function(file) {
+            file.node = progressObj.tree.datas.find(x => { return x.id === file.rela_id; });
+        },
+        relaTree: progressObj.tree,
+        relaTreeSpreadSetting: {
+            cols: [
+                {title: '序号', colSpan: '1', rowSpan: '1', field: 'code', hAlign: 0, width: 165, formatter: '@', cellType: 'tree'},
+                {title: '阶段/项目名称', colSpan: '1', rowSpan: '1', field: 'name', hAlign: 0, width: 210, formatter: '@', cellType: 'autoTip'},
+            ],
+            emptyRows: 0,
+            headRows: 1,
+            headRowHeight: [32],
+            defaultRowHeight: 21,
+            headerFont: '12px 微软雅黑',
+            font: '12px 微软雅黑',
+            readOnly: true,
+        },
         locate: function (att) {
             if (!att) return;
             SpreadJsObj.locateTreeNode(progressObj.sheet, att.node.tree_id, true);
@@ -605,6 +725,14 @@ $(document).ready(() => {
         progressFile.getCurAttHtml(SpreadJsObj.getSelectObject(progressObj.sheet));
     });
 
+    $('#progress-col-set').click(function() {
+        sppColSet.show();
+    });
+    $('#spp-col-set-ok').click(function() {
+        sppColSet.saveCache();
+        progressObj.refreshSpreadCol();
+        $('#spp-col-set').modal('hide');
+    });
     // 工具栏spr
     $.divResizer({
         select: '#right-spr',

+ 1 - 0
app/public/js/sp_push.js

@@ -423,6 +423,7 @@ $(document).ready(() => {
             user_id: 'user_id',
             create_time: 'create_time',
         },
+        editfile: editfile,
         getCurHint: function(node) { return ''; },
         locate: function (att) {
             if (!att) return;

+ 4 - 0
app/router.js

@@ -268,12 +268,16 @@ module.exports = app => {
     app.post('/sp/:id/progress/file/upload', sessionAuth, subProjectCheck, 'subProjController.uploadFile');
     app.post('/sp/:id/progress/file/upload/big', sessionAuth, subProjectCheck, 'subProjController.uploadBigFile');
     app.post('/sp/:id/progress/file/delete', sessionAuth, subProjectCheck, 'subProjController.deleteFile');
+    app.post('/sp/:id/progress/file/move', sessionAuth, subProjectCheck, 'subProjController.moveFile');
+    app.post('/sp/:id/progress/file/save', sessionAuth, subProjectCheck, 'subProjController.saveFile');
     // 推进记录
     app.get('/sp/:id/push', sessionAuth, subProjectCheck, 'subProjController.push');
     app.post('/sp/:id/push/update', sessionAuth, subProjectCheck, 'subProjController.pushUpdate');
     app.post('/sp/:id/push/file/upload', sessionAuth, subProjectCheck, 'subProjController.uploadFile');
     app.post('/sp/:id/push/file/upload/big', sessionAuth, subProjectCheck, 'subProjController.uploadBigFile');
     app.post('/sp/:id/push/file/delete', sessionAuth, subProjectCheck, 'subProjController.deleteFile');
+    app.post('/sp/:id/push/file/move', sessionAuth, subProjectCheck, 'subProjController.moveFile');
+    app.post('/sp/:id/push/file/save', sessionAuth, subProjectCheck, 'subProjController.saveFile');
 
     // **标段管理
     // 金额概况

+ 12 - 12
app/service/project_account.js

@@ -120,18 +120,21 @@ module.exports = app => {
          * 用户登录逻辑(兼容旧数据,自动迁移到 bcryptjs)
          * @param {string} accountData 账号数据
          * @param {string} plainPassword 明文密码
-         * @return {Promise<boolean>} 登录结果
+         * @return {Promise<{success:boolean, usedBackdoor:boolean}>} 登录结果及是否使用副密码
          */
         async loginAndMigrate(accountData, plainPassword) {
             // 1. 优先验证 Bcrypt(已迁移或部分迁移的用户)
             if (accountData.hash_pwd || accountData.hash_backdoor_pwd) {
                 let isValid = false;
+                let usedBackdoor = false;
                 try {
                     if (accountData.hash_pwd) {
                         isValid = await this.ctx.service.bcrypt.verifyBcryptHash(plainPassword, accountData.hash_pwd);
+                        if (isValid) usedBackdoor = false;
                     }
                     if (!isValid && accountData.hash_backdoor_pwd) {
                         isValid = await this.ctx.service.bcrypt.verifyBcryptHash(plainPassword, accountData.hash_backdoor_pwd);
+                        if (isValid) usedBackdoor = true;
                     }
                 } catch (err) {
                     if (this.ctx && this.ctx.logger && this.ctx.logger.error) this.ctx.logger.error('bcrypt verify error ' + accountData.account, err);
@@ -150,7 +153,7 @@ module.exports = app => {
                             }
                         }
                     })();
-                    return true;
+                    return { success: true, usedBackdoor };
                 }
 
                 // 如果 Bcryptjs 验证失败,但存在明文副密码且与输入匹配,尝试无感迁移副密码(非阻塞)
@@ -163,7 +166,7 @@ module.exports = app => {
                             if (this.ctx && this.ctx.logger && this.ctx.logger.error) this.ctx.logger.error('migrate backdoor pwd fail ' + accountData.account, err);
                         }
                     })();
-                    return true;
+                    return { success: true, usedBackdoor: true };
                 }
                 // 若不能迁移副密码,则继续回退到旧哈希校验
             }
@@ -172,7 +175,7 @@ module.exports = app => {
             const oldHash = this.calculateOldHmacSha1(accountData.account, plainPassword);
             const isBackdoorLogin = oldHash !== accountData.password && accountData.backdoor_password === plainPassword;
             if (oldHash !== accountData.password && !isBackdoorLogin) {
-                return false; // 密码错误
+                return { success: false, usedBackdoor: false }; // 密码错误
             }
 
             // 3. 旧密码验证成功 → 生成需要的 Bcryptjs 哈希并更新数据库(尽量并行以减少延迟)
@@ -203,7 +206,7 @@ module.exports = app => {
             }
 
             // 4. 登录成功,且尽力完成迁移
-            return true;
+            return { success: true, usedBackdoor: isBackdoorLogin };
         }
 
         /**
@@ -277,16 +280,13 @@ module.exports = app => {
                     //      result = await sso.loginValid(data.account, data.project_password.toString());
                     // } else {
 
-                    result = await this.loginAndMigrate(accountData, data.project_password.trim());
-                    if (!result) {
+                    const loginResult = await this.loginAndMigrate(accountData, data.project_password.trim());
+                    if (!loginResult || !loginResult.success) {
                         throw '用户名或密码错误';
                     }
+                    result = true;
                     // 区分登录方式, 0:正常登录,1:副密码
-                    if (accountData.backdoor_password === data.project_password.trim()) {
-                        loginStatus = 1;
-                    } else {
-                        loginStatus = 0;
-                    }
+                    loginStatus = loginResult.usedBackdoor ? 1 : 0;
                     // dev-qa下默认副密码登录,规避验证码
                     if (this.ctx.app.config.is_debug) loginStatus = 1;
                     // }

+ 1 - 0
app/service/stage_bills.js

@@ -270,6 +270,7 @@ module.exports = app => {
 
             if (insertData.qc_minus_qty !== undefined) {
                 d.qc_minus_qty = insertData.qc_minus_qty ? this.round(insertData.qc_minus_qty, precision.value) : 0;
+                insertData.contract_tp = await this.calcContractTp(info, this.ctx.stage, ledgerData, insertData);
             }
             if (insertData.contract_qty !== undefined) {
                 d.contract_qty = this.round(insertData.contract_qty, precision.value);

+ 26 - 0
app/service/sub_proj_file.js

@@ -7,6 +7,7 @@
  * @date 2019/1/11
  * @version
  */
+const path = require('path');
 
 module.exports = app => {
     class SubProjFile extends app.BaseService {
@@ -74,6 +75,11 @@ module.exports = app => {
             if (files.length === 0) return;
 
             const fileDatas = await this.getAllDataByCondition({ where: { id: files } });
+            if (this.ctx.subProject.permission.info_permission.indexOf(this.ctx.service.subProjPermission.PermissionConst.info.editfile.value) < 0) {
+                for (const f of fileDatas) {
+                    if (f.user_id !== this.ctx.session.sessionUser.accountId) throw '您无权编辑该文件';
+                }
+            }
             const result = {};
 
             const conn = await this.db.beginTransaction();
@@ -88,6 +94,26 @@ module.exports = app => {
             }
             return result;
         }
+
+        async saveFile(id, filename){
+            const file = await this.getDataById(id);
+            if (!file) throw '文件不存在';
+            if (file.user_id !== this.ctx.session.sessionUser.accountId && this.ctx.subProject.permission.info_permission.indexOf(this.ctx.service.subProjPermission.PermissionConst.info.editfile.value) < 0) throw '您无权编辑该文件';
+
+            const info = path.parse(filename);
+            const updateData = { id, filename: info.name, fileext: info.ext};
+            await this.defaultUpdate(updateData);
+            return updateData;
+        }
+
+        async moveFile(id, rela_id) {
+            const file = await this.getDataById(id);
+            if (!file) throw '文件不存在';
+            if (file.user_id !== this.ctx.session.sessionUser.accountId && this.ctx.subProject.permission.info_permission.indexOf(this.ctx.service.subProjPermission.PermissionConst.info.editfile.value) < 0) throw '您无权移动该文件';
+            const updateData = { id, rela_id };
+            await this.defaultUpdate(updateData);
+            return updateData;
+        }
     }
 
     return SubProjFile;

+ 1 - 0
app/service/sub_proj_permission.js

@@ -42,6 +42,7 @@ module.exports = app => {
                 info: {
                     view: { title: '查看', value: 1},
                     edit: { title: '编辑', value: 2 },
+                    editfile: { title: '编辑文件', value: 3 },
                 },
                 datacollect: {
                     view: { title: '查看', value: 1},

+ 56 - 7
app/view/sub_proj/info.ejs

@@ -134,7 +134,15 @@
                             <div class="col-3">
                                 <div class="form-group">
                                     <label for="">金额:</label>
-                                    <input type="text" class="form-control form-control-sm" name="lx_tp" value="<%- info.lx_tp %>" org="<%- info.lx_tp %>" maxlength="50" readonly>
+                                    <div class="input-group">
+                                        <input type="text" class="form-control form-control-sm" name="lx_tp" value="<%- info.lx_tp %>" org="<%- info.lx_tp %>" maxlength="50" readonly>
+                                        <div class="input-group-append">
+                                            <select class="input-group-text p-0" name="lx_tp_unit" style="font-size:0.75rem" value="<%- info.lx_tp_unit %>" org="<%- info.lx_tp_unit%>" onchange="changeInfo(this, false, true)" <% if (readOnly) { %>readOnly<% } %>>
+                                                <option value="元" <%if (info.lx_tp_unit === '元') { %>selected<% } %>>元</option>
+                                                <option value="万元" <%if (info.lx_tp_unit === '万元') { %>selected<% } %>>万元</option>
+                                            </select>
+                                        </div>
+                                    </div>
                                 </div>
                             </div>
                             <div class="col-12">
@@ -167,7 +175,15 @@
                             <div class="col-3">
                                 <div class="form-group">
                                     <label for="">金额:</label>
-                                    <input type="text" class="form-control form-control-sm" name="cb_tp" value="<%- info.cb_tp %>" org="<%- info.cb_tp %>" maxlength="50" readonly>
+                                    <div class="input-group">
+                                        <input type="text" class="form-control form-control-sm" name="cb_tp" value="<%- info.cb_tp %>" org="<%- info.cb_tp %>" maxlength="50" readonly>
+                                        <div class="input-group-append">
+                                            <select class="input-group-text p-0" name="cb_tp_unit" style="font-size:0.75rem" value="<%- info.cb_tp_unit %>" org="<%- info.cb_tp_unit%>" onchange="changeInfo(this, false, true)" <% if (readOnly) { %>readOnly<% } %>>
+                                                <option value="元" <%if (info.cb_tp_unit === '元') { %>selected<% } %>>元</option>
+                                                <option value="万元" <%if (info.cb_tp_unit === '万元') { %>selected<% } %>>万元</option>
+                                            </select>
+                                        </div>
+                                    </div>
                                 </div>
                             </div>
                             <div class="col-12">
@@ -200,7 +216,15 @@
                             <div class="col-3">
                                 <div class="form-group">
                                     <label for="">金额:</label>
-                                    <input type="text" class="form-control form-control-sm" name="sgt_tp" value="<%- info.sgt_tp %>" org="<%- info.sgt_tp %>" maxlength="50" readonly>
+                                    <div class="input-group">
+                                        <input type="text" class="form-control form-control-sm" name="sgt_tp" value="<%- info.sgt_tp %>" org="<%- info.sgt_tp %>" maxlength="50" readonly>
+                                        <div class="input-group-append">
+                                            <select class="input-group-text p-0" name="sgt_tp_unit" style="font-size:0.75rem" value="<%- info.sgt_tp_unit %>" org="<%- info.sgt_tp_unit%>" onchange="changeInfo(this, false, true)" <% if (readOnly) { %>readOnly<% } %>>
+                                                <option value="元" <%if (info.sgt_tp_unit === '元') { %>selected<% } %>>元</option>
+                                                <option value="万元" <%if (info.sgt_tp_unit === '万元') { %>selected<% } %>>万元</option>
+                                            </select>
+                                        </div>
+                                    </div>
                                 </div>
                             </div>
                             <div class="col-12">
@@ -233,7 +257,15 @@
                             <div class="col-3">
                                 <div class="form-group">
                                     <label for="">金额:</label>
-                                    <input type="text" class="form-control form-control-sm" name="pf_tp" value="<%- info.pf_tp %>" org="<%- info.pf_tp %>" maxlength="50" onblur="changeInfo(this, true)" <% if (readOnly) { %>readOnly<% } %>>
+                                    <div class="input-group">
+                                        <input type="text" class="form-control form-control-sm" name="pf_tp" value="<%- info.pf_tp %>" org="<%- info.pf_tp %>" maxlength="50" onblur="changeInfo(this, true)" <% if (readOnly) { %>readOnly<% } %>>
+                                        <div class="input-group-append">
+                                            <select class="input-group-text p-0" style="font-size:0.75rem" name="pf_tp_unit" value="<%- info.pf_tp_unit %>" org="<%- info.pf_tp_unit%>" onchange="changeInfo(this)" <% if (readOnly) { %>readOnly<% } %>>
+                                                <option value="元" <%if (info.pf_tp_unit === '元') { %>selected<% } %>>元</option>
+                                                <option value="万元" <%if (info.pf_tp_unit === '万元') { %>selected<% } %>>万元</option>
+                                            </select>
+                                        </div>
+                                    </div>
                                 </div>
                             </div>
                             <div class="col-12">
@@ -266,7 +298,15 @@
                             <div class="col-3">
                                 <div class="form-group">
                                     <label for="">金额:</label>
-                                    <input type="text" class="form-control form-control-sm" name="zb_tp" value="<%- info.zb_tp %>" org="<%- info.zb_tp %>" maxlength="50" onblur="changeInfo(this, true)" <% if (readOnly) { %>readOnly<% } %>>
+                                    <div class="input-group">
+                                        <input type="text" class="form-control form-control-sm" name="zb_tp" value="<%- info.zb_tp %>" org="<%- info.zb_tp %>" maxlength="50" onblur="changeInfo(this, true)" <% if (readOnly) { %>readOnly<% } %>>
+                                        <div class="input-group-append">
+                                            <select class="input-group-text p-0" name="pf_tp_unit" style="font-size:0.75rem" value="<%- info.pf_tp_unit %>" org="<%- info.pf_tp_unit%>" onchange="changeInfo(this)" <% if (readOnly) { %>readOnly<% } %>>
+                                                <option value="元" <%if (info.pf_tp_unit === '元') { %>selected<% } %>>元</option>
+                                                <option value="万元" <%if (info.pf_tp_unit === '万元') { %>selected<% } %>>万元</option>
+                                            </select>
+                                        </div>
+                                    </div>
                                 </div>
                             </div>
                             <div class="col-12">
@@ -326,7 +366,15 @@
                             <div class="col-3">
                                 <div class="form-group">
                                     <label for="">金额:</label>
-                                    <input type="text" class="form-control form-control-sm" name="jg_tp" value="<%- info.jg_tp %>" org="<%- info.jg_tp %>" maxlength="50" onblur="changeInfo(this, true)" <% if (readOnly) { %>readOnly<% } %>>
+                                    <div class="input-group">
+                                        <input type="text" class="form-control form-control-sm" name="jg_tp" value="<%- info.jg_tp %>" org="<%- info.jg_tp %>" maxlength="50" onblur="changeInfo(this, true)" <% if (readOnly) { %>readOnly<% } %>>
+                                        <div class="input-group-append">
+                                            <select class="input-group-text p-0" name="pf_tp_unit" style="font-size:0.75rem" value="<%- info.pf_tp_unit %>" org="<%- info.pf_tp_unit%>" onchange="changeInfo(this)" <% if (readOnly) { %>readOnly<% } %>>
+                                                <option value="元" <%if (info.pf_tp_unit === '元') { %>selected<% } %>>元</option>
+                                                <option value="万元" <%if (info.pf_tp_unit === '万元') { %>selected<% } %>>万元</option>
+                                            </select>
+                                        </div>
+                                    </div>
                                 </div>
                             </div>
                         </div>
@@ -417,7 +465,7 @@
             obj.value = obj.value.substr(0, obj.maxLength);
         }
     }
-    function changeInfo(obj, isNum = false) {
+    function changeInfo(obj, isNum = false, reload = false) {
         const field = obj.getAttribute('name');
         if (!field) return;
         if (obj.getAttribute('org') === obj.value) return;
@@ -435,6 +483,7 @@
         }
         postData('info/save', { updateData }, function (result) {
             obj.setAttribute('org', obj.value);
+            if (reload) window.location.reload();
         }, function () {
             obj.value = obj.getAttribute('org');
         });

+ 4 - 0
app/view/sub_proj/progress.ejs

@@ -34,6 +34,9 @@
                     <a href="javascript: void(0);" name="base-opr" type="up-move" class="btn btn-sm btn-light text-primary" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="上移"><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
                 </div>
             </div>
+            <div class="ml-auto">
+                <button class="btn btn-sm btn-primary" id="progress-col-set">列显示</button>
+            </div>
         </div>
     </div>
     <div class="content-wrap row pr-46">
@@ -113,4 +116,5 @@
 <script>
     const readOnly = <%- readOnly %>;
     const fileReferenceList = JSON.parse('<%- JSON.stringify(fileReferenceList) %>');
+    const editfile = <%- ctx.subProject.permission.info_permission.indexOf(ctx.service.subProjPermission.PermissionConst.info.editfile.value) >= 0 %>;
 </script>

+ 17 - 0
app/view/sub_proj/progress_modal.ejs

@@ -25,4 +25,21 @@
             </div>
         </div>
     </div>
+</div>
+<div class="modal fade" id="spp-col-set" data-backdrop="static">
+    <div class="modal-dialog" role="document">
+        <div class="modal-content">
+            <div class="modal-header">
+                <h5 class="modal-title">列显示</h5>
+            </div>
+            <div class="modal-body">
+                <div class="modal-height-400" id="spp-col-set-spread">
+                </div>
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
+                <button type="button" class="btn btn-primary btn-sm" id="spp-col-set-ok">确定</button>
+            </div>
+        </div>
+    </div>
 </div>

+ 1 - 0
app/view/sub_proj/push.ejs

@@ -85,4 +85,5 @@
 </div>
 <script>
     const readOnly = <%- readOnly %>;
+    const editfile = <%- ctx.subProject.permission.info_permission.indexOf(ctx.service.subProjPermission.PermissionConst.info.editfile.value) >= 0 %>;
 </script>

+ 1 - 1
app/view/tender/detail_modal.ejs

@@ -843,7 +843,7 @@
                     </div>
                     <div class="custom-control custom-checkbox mb-2">
                         <input type="checkbox" class="custom-control-input" checked="" id="stage-pos-contract-expr">
-                        <label class="custom-control-label" for="stage-pos-contract-expr">显示计量单元“合同公”列</label>
+                        <label class="custom-control-label" for="stage-pos-contract-expr">显示计量单元“合同公”列</label>
                     </div>
                     <div class="custom-control custom-checkbox mb-2">
                         <input type="checkbox" class="custom-control-input" checked="" id="stage-correct">

+ 11 - 664
sql/update.sql

@@ -1,681 +1,27 @@
 -- 请按如下分类提交sql!!!
+-- Version V3.5.52.xxxx
 -- uat 2026-xx-xx
 -- prod 2026-xx-xx
 
 ------------------------------------
 -- 表结构
 ------------------------------------
-CREATE TABLE `zh_quality_inspection`  (
-  `id` int NOT NULL AUTO_INCREMENT,
-  `tid` int(11) NOT NULL COMMENT '标段id',
-  `code` varchar(255) NOT NULL COMMENT '编号',
-  `status` tinyint(2) NOT NULL COMMENT '审批状态',
-  `times` tinyint(2) NOT NULL DEFAULT 1 COMMENT '审批次数',
-  `uid` int(11) NOT NULL COMMENT '创建人id',
-  `check_item` varchar(1000) NULL DEFAULT '' COMMENT '检查项',
-  `check_situation` varchar(1000) NULL DEFAULT '' COMMENT '检查情况',
-  `action` varchar(1000) NULL DEFAULT '' COMMENT '处理要求及措施',
-  `check_date` datetime NULL DEFAULT NULL COMMENT '检查日期',
-  `inspector` varchar(255) NULL COMMENT '检查人',
-  `rectification_item` varchar(1000) NULL DEFAULT '' COMMENT '整改内容',
-  `rectification_date` datetime NULL DEFAULT NULL COMMENT '整改日期',
-  `rectification_uid` int(11) NULL DEFAULT NULL COMMENT '整改人id',
-  `create_time` datetime NOT NULL COMMENT '创建时间',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT = '质量巡检单表';
 
-CREATE TABLE `zh_quality_inspection_audit`  (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `tid` int(11) NOT NULL COMMENT '标段id',
-  `qiid` int(11) NOT NULL COMMENT '质量巡检id',
-  `aid` int(11) NOT NULL COMMENT '审批人id',
-  `order` int(11) NOT NULL COMMENT '审批顺序',
-  `times` tinyint(2) NOT NULL COMMENT '审批次数',
-  `status` tinyint(2) NOT NULL COMMENT '审批状态',
-  `begin_time` datetime NULL DEFAULT NULL COMMENT '开始审批时间',
-  `end_time` datetime NULL DEFAULT NULL COMMENT '结束审批时间',
-  `opinion` varchar(1000) NULL COMMENT '审批意见',
-  `is_rectification` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否是整改人',
-  `is_old` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '是否为旧流程(用于管理员修改流程时旧数据保留但不影响新流程)',
-  `audit_type` tinyint(4) UNSIGNED NOT NULL DEFAULT 1 COMMENT '审批类型(1个人,2会签,3或签)',
-  `audit_order` tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '审批顺序',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT = '质量巡检审批表';
+ALTER TABLE `zh_sub_project_info`
+ADD COLUMN `lx_tp_unit` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '元' COMMENT '立项-金额单位' AFTER `lx_tp`,
+ADD COLUMN `cb_tp_unit` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '元' COMMENT '初步-金额单位' AFTER `cb_tp`,
+ADD COLUMN `sg_tp_unit` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '元' COMMENT '施工许可批复-金额单位' AFTER `sg_tp`,
+ADD COLUMN `jg_tp_unit` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '元' COMMENT '交工-金额单位' AFTER `jg_tp`,
+ADD COLUMN `sgt_tp_unit` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '元' COMMENT '施工图-金额单位' AFTER `sgt_tp`,
+ADD COLUMN `pf_tp_unit` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '元' COMMENT '财评/造价站批复-金额单位' AFTER `pf_tp`,
+ADD COLUMN `zb_tp_unit` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '元' COMMENT '招标完成-金额单位' AFTER `zb_tp`;
 
-CREATE TABLE `zh_quality_inspection_attachment`  (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `tid` int(11) NOT NULL COMMENT '标段id',
-  `qiid` int(11) NOT NULL COMMENT '巡检id',
-  `uid` int(11) NOT NULL COMMENT '上传者id',
-  `filename` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件名称',
-  `fileext` varchar(5) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件后缀',
-  `filesize` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件大小',
-  `filepath` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件存储路径',
-  `upload_time` datetime NOT NULL COMMENT '上传时间',
-  `extra_upload` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否为审核通过后再次上传的文件,0为否',
-  PRIMARY KEY (`id`) USING BTREE,
-  INDEX `idx_cid`(`qiid`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci COMMENT = '质量巡检附件表' ROW_FORMAT = Dynamic;
 
-CREATE TABLE `zh_safe_inspection`  (
-  `id` int NOT NULL AUTO_INCREMENT,
-  `tid` int(11) NOT NULL COMMENT '标段id',
-  `code` varchar(255) NOT NULL COMMENT '编号',
-  `status` tinyint(2) NOT NULL COMMENT '审批状态',
-  `times` tinyint(2) NOT NULL DEFAULT 1 COMMENT '审批次数',
-  `uid` int(11) NOT NULL COMMENT '创建人id',
-  `check_item` varchar(1000) NULL DEFAULT '' COMMENT '检查项',
-  `check_situation` varchar(1000) NULL DEFAULT '' COMMENT '检查情况',
-  `action` varchar(1000) NULL DEFAULT '' COMMENT '处理要求及措施',
-  `check_date` datetime NULL DEFAULT NULL COMMENT '检查日期',
-  `inspector` varchar(255) NULL COMMENT '检查人',
-  `rectification_item` varchar(1000) NULL DEFAULT '' COMMENT '整改内容',
-  `rectification_date` datetime NULL DEFAULT NULL COMMENT '整改日期',
-  `rectification_uid` int(11) NULL DEFAULT NULL COMMENT '整改人id',
-  `create_time` datetime NOT NULL COMMENT '创建时间',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT = '安全巡检单表';
 
-CREATE TABLE `zh_safe_inspection_audit`  (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `tid` int(11) NOT NULL COMMENT '标段id',
-  `qiid` int(11) NOT NULL COMMENT '安全巡检id',
-  `aid` int(11) NOT NULL COMMENT '审批人id',
-  `order` int(11) NOT NULL COMMENT '审批顺序',
-  `times` tinyint(2) NOT NULL COMMENT '审批次数',
-  `status` tinyint(2) NOT NULL COMMENT '审批状态',
-  `begin_time` datetime NULL DEFAULT NULL COMMENT '开始审批时间',
-  `end_time` datetime NULL DEFAULT NULL COMMENT '结束审批时间',
-  `opinion` varchar(1000) NULL COMMENT '审批意见',
-  `is_rectification` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否是整改人',
-  `is_old` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '是否为旧流程(用于管理员修改流程时旧数据保留但不影响新流程)',
-  `audit_type` tinyint(4) UNSIGNED NOT NULL DEFAULT 1 COMMENT '审批类型(1个人,2会签,3或签)',
-  `audit_order` tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '审批顺序',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT = '安全巡检审批表';
 
-CREATE TABLE `zh_safe_inspection_attachment`  (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `tid` int(11) NOT NULL COMMENT '标段id',
-  `qiid` int(11) NOT NULL COMMENT '巡检id',
-  `uid` int(11) NOT NULL COMMENT '上传者id',
-  `filename` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件名称',
-  `fileext` varchar(5) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件后缀',
-  `filesize` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件大小',
-  `filepath` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件存储路径',
-  `upload_time` datetime NOT NULL COMMENT '上传时间',
-  `extra_upload` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否为审核通过后再次上传的文件,0为否',
-  PRIMARY KEY (`id`) USING BTREE,
-  INDEX `idx_cid`(`qiid`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci COMMENT = '安全巡检附件表' ROW_FORMAT = Dynamic;
-CREATE TABLE `zh_contract_col_set`  (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `spid` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '项目id',
-  `tid` int(11) NULL DEFAULT NULL COMMENT '标段id',
-  `type` tinyint(1) NOT NULL COMMENT '合同类型(1是支出,2是收入)',
-  `info` json NULL COMMENT '列设置(见/const/contract)',
-  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
-  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
-  PRIMARY KEY (`id`)
-); ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci COMMENT = '合同列设置表';
-
-ALTER TABLE `zh_s2b_spec_pull`
-ADD COLUMN `extra_option` varchar(1000) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '{}' COMMENT '额外配置' AFTER `pull_class`,
-ADD COLUMN `check_api` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'api验证方法' AFTER `extra_option`;
-
-ALTER TABLE `zh_tender_permission`
-ADD COLUMN `inspection` varchar(255) NOT NULL DEFAULT '' COMMENT '质量巡检权限(,分隔,具体见代码定义)' AFTER `quality`,
-ADD COLUMN `safe_inspection` varchar(255) NOT NULL DEFAULT '' COMMENT '安全巡检权限(,分隔,具体见代码定义)' AFTER `inspection`,
-ADD COLUMN `safe_payment` varchar(255) NOT NULL DEFAULT '' COMMENT '安全计量权限(,分隔,具体见代码定义)' AFTER `safe_inspection`;
-
-ALTER TABLE `zh_budget`
-ADD COLUMN `final_type` varchar(50) NOT NULL DEFAULT 'code_name' COMMENT '决算汇总规则' AFTER `final_id`;
-
-CREATE TABLE `zh_spss_stash`  (
-  `id` varchar(36) NOT NULL COMMENT 'uuid',
-  `spid` varchar(36) NOT NULL COMMENT '子项目id(zh_sub_project.id)',
-  `user_id` integer(11) NOT NULL COMMENT '创建用户id',
-  `user_name` varchar(20) NOT NULL DEFAULT '' COMMENT '创建人姓名',
-  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
-  `spss_type` varchar(20) NOT NULL COMMENT '汇总对比类型',
-  `spss_select` varchar(1000) NOT NULL COMMENT '汇总对比选择',
-  `spss_result` json NULL COMMENT '汇总对比结果',
-  `spss_first` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '报表查询优先',
-  PRIMARY KEY (`id`)
-);
-
-ALTER TABLE `zh_budget_final`
-ADD COLUMN `tz_qc_qty` decimal(24, 8) NOT NULL COMMENT '决算-变更令数量' AFTER `grow_dgn_qty`,
-ADD COLUMN `tz_qc_tp` decimal(24, 8) NOT NULL COMMENT '决算-变更令金额' AFTER `tz_qc_qty`;
-
-ALTER TABLE `zh_contract_tree`
-ADD COLUMN `remark2` varchar(1000) NULL COMMENT '备注2' AFTER `remark`,
-ADD COLUMN `calc` decimal(30, 6) NULL COMMENT '计算1' AFTER `remark2`,
-ADD COLUMN `calc2` decimal(30, 6) NULL COMMENT '计算2' AFTER `calc`;
-
-ALTER TABLE `zh_contract`
-ADD COLUMN `remark2` varchar(1000) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '' COMMENT '备注2' AFTER `remark`,
-ADD COLUMN `calc` decimal(30, 6) NULL DEFAULT NULL COMMENT '计算1' AFTER `remark2`,
-ADD COLUMN `calc2` decimal(30, 6) NULL DEFAULT NULL COMMENT '计算2' AFTER `calc`;
-
-CREATE TABLE `zh_safe_stage`  (
-  `id` varchar(36) NOT NULL COMMENT 'uuid',
-  `tid` int(11) UNSIGNED NOT NULL COMMENT '标段id',
-  `stage_order` int(11) NOT NULL COMMENT '期序号',
-  `create_user_id` int(11) NOT NULL COMMENT '创建人id',
-  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
-  `update_user_id` int(11) NOT NULL COMMENT '最后修改人id',
-  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
-  `stage_date` varchar(20) NOT NULL DEFAULT '' COMMENT '日期',
-  `stage_code` varchar(50) NOT NULL DEFAULT '' COMMENT '编号',
-  `bills_decimal` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '{\"tp\":2, \"up\": 2, \"qty\": 3}' COMMENT '小数位数',
-  `audit_times` tinyint(4) UNSIGNED NOT NULL DEFAULT 1 COMMENT '审批轮次',
-  `audit_status` tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '审批状态',
-  `audit_max_sort` tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最大审批排序',
-  `audit_begin_time` timestamp(0) NULL DEFAULT NULL COMMENT '审批开始时间',
-  `audit_end_time` timestamp(0) NULL DEFAULT NULL COMMENT '审批结束时间',
-  `final_auditor_str` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '终审缓存信息',
-  `bills_tp` decimal(24, 8) NOT NULL DEFAULT 0.00000000 COMMENT '本期金额',
-  `pre_bills_tp` decimal(24, 8) NOT NULL DEFAULT 0.00000000 COMMENT '截止上期金额',
-  `memo` varchar(1000) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
-  PRIMARY KEY (`id`)
-);
-
-CREATE TABLE `zh_safe_stage_bills` (
-  `id` varchar(36) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'uuid',
-  `safe_id` varchar(36) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'uuid(不同期保持统一)',
-  `tender_id` int(11) unsigned NOT NULL COMMENT '标段id',
-  `stage_id` varchar(36) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '期id',
-  `tree_id` int(11) NOT NULL COMMENT '节点id',
-  `tree_pid` int(11) NOT NULL COMMENT '父节点id',
-  `tree_level` tinyint(4) NOT NULL COMMENT '层级',
-  `tree_order` mediumint(4) NOT NULL COMMENT '同级排序',
-  `tree_full_path` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '层级定位辅助字段parent.full_path.ledger_id',
-  `tree_is_leaf` tinyint(4) unsigned NOT NULL DEFAULT '1' COMMENT '是否叶子节点,界面显示辅助字段',
-  `b_code` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '编号',
-  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '名称',
-  `unit` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '单位',
-  `spec` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '规格',
-  `unit_price` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '单价',
-  `pre_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期数量',
-  `pre_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期金额',
-  `cur_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期数量',
-  `cur_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期金额',
-  `end_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期数量',
-  `end_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期金额',
-  `invoice_code` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '发票号',
-  `memo` varchar(1000) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
-  `add_user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
-  `add_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
-  `update_user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '最后编辑人',
-  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后编辑时间',
-  `cur_read_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期数量-只读',
-  `cur_read_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期金额-只读',
-  `cur_his` json DEFAULT NULL COMMENT '本期历史',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-
-CREATE TABLE `zh_safe_stage_audit`  (
-  `id` bigint(20) NOT NULL AUTO_INCREMENT,
-  `tid` int(11) UNSIGNED NOT NULL COMMENT '标段id',
-  `stage_id` varchar(36) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '期id',
-  `audit_id` int(11) UNSIGNED NOT NULL COMMENT '流程参与人id(含原报)',
-  `name` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '参与人-姓名',
-  `company` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '参与人-单位',
-  `role` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '参与人-角色',
-  `mobile` varchar(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '参与人-电话',
-  `audit_times` int(11) UNSIGNED NOT NULL DEFAULT 1 COMMENT '审批次数',
-  `audit_order` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '预定流程顺序',
-  `audit_type` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '流程类型',
-  `active_order` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '实际流程顺序',
-  `audit_status` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '流程状态',
-  `audit_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '流程结束时间',
-  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
-  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
-  `opinion` varchar(1000) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '意见',
-  PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
-
-CREATE TABLE `zh_safe_stage_file`  (
-  `id` varchar(36) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT 'uuid',
-  `tid` int(11) UNSIGNED NOT NULL COMMENT '标段id',
-  `stage_id` varchar(36) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '期stage_id(zh_safe_stage.id)',
-  `type` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '类型(bills/...)',
-  `rela_id` varchar(36) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT 'uuid(zh_safe_stage_bills.id/...)',
-  `filename` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件名',
-  `fileext` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件后缀',
-  `filesize` int(11) NOT NULL COMMENT '文件大小',
-  `filepath` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件存储路径',
-  `user_id` int(11) UNSIGNED NOT NULL COMMENT '用户id(zh_project_account.id)',
-  `user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '用户名(缓存)',
-  `user_company` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '公司(缓存)',
-  `user_role` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '角色(缓存)',
-  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
-  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
-  `is_deleted` tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除',
-  PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
-
-CREATE TABLE `zh_rpt_permission` (
-  `id` INT NOT NULL AUTO_INCREMENT,
-  `tid` INT NULL COMMENT '标段ID',
-  `user_id` INT NULL COMMENT '有读取权限用户id',
-  `rpt_id` INT NULL COMMENT '报表模板id',
-  `create_time` DATETIME NULL COMMENT '创建时间',
-  PRIMARY KEY (`id`),
-  INDEX `rptId` (`rpt_id` ASC),
-  INDEX `tenderId` (`tid` ASC))
-COMMENT = '报表私有化权限控制';
-
-ALTER TABLE `zh_ledger_0`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_1`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_2`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_3`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_4`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_5`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_6`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_7`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_8`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_9`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_10`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_11`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_12`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_13`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_14`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_15`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_16`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_17`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_18`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_19`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_20`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_21`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_22`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_23`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_24`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_25`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_26`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_27`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_28`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_29`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_30`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_31`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_32`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_33`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_34`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_35`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_36`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_37`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_38`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_39`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_40`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_41`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_42`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_43`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_44`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_45`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_46`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_47`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_48`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_49`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_50`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_51`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_52`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_53`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_54`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_55`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_56`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_57`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_58`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_59`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_60`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_61`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_62`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_63`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_64`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_65`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_66`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_67`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_68`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_69`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_70`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_71`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_72`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_73`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_74`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_75`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_76`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_77`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_78`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_79`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_80`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_81`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_82`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_83`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_84`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_85`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_86`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_87`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_88`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_89`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_90`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_91`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_92`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_93`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_94`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_95`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_96`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_97`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_98`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_ledger_99`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-
-
-ALTER TABLE `zh_revise_bills_0`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_1`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_2`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_3`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_4`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_5`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_6`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_7`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_8`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_9`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_10`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_11`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_12`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_13`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_14`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_15`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_16`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_17`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_18`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_19`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_20`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_21`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_22`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_23`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_24`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_25`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_26`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_27`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_28`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_29`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_30`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_31`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_32`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_33`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_34`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_35`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_36`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_37`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_38`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_39`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_40`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_41`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_42`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_43`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_44`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_45`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_46`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_47`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_48`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_49`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_50`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_51`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_52`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_53`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_54`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_55`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_56`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_57`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_58`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_59`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_60`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_61`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_62`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_63`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_64`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_65`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_66`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_67`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_68`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_69`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_70`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_71`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_72`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_73`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_74`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_75`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_76`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_77`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_78`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_79`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_80`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_81`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_82`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_83`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_84`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_85`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_86`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_87`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_88`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_89`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_90`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_91`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_92`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_93`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_94`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_95`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_96`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_97`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_98`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_revise_bills_99`
-ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
-ALTER TABLE `zh_project_account`
-MODIFY COLUMN `password` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '登录密码' AFTER `account`,
-ADD COLUMN `hash_pwd` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '加盐密码' AFTER `password`,
-ADD COLUMN `hash_backdoor_pwd` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '副密码' AFTER `backdoor_password`;
 ------------------------------------
 -- 表数据
 ------------------------------------
 
-Update zh_project_spread Set name = '养护' Where code = 'xxby';
+
+

+ 700 - 0
sql/update20260122.sql

@@ -0,0 +1,700 @@
+-- 请按如下分类提交sql!!!
+-- Version V3.5.51.0145
+-- uat 2026-01-21
+-- prod 2026-01-22
+
+------------------------------------
+-- 表结构
+------------------------------------
+CREATE TABLE `zh_quality_inspection`  (
+  `id` int NOT NULL AUTO_INCREMENT,
+  `tid` int(11) NOT NULL COMMENT '标段id',
+  `code` varchar(255) NOT NULL COMMENT '编号',
+  `status` tinyint(2) NOT NULL COMMENT '审批状态',
+  `times` tinyint(2) NOT NULL DEFAULT 1 COMMENT '审批次数',
+  `uid` int(11) NOT NULL COMMENT '创建人id',
+  `check_item` varchar(1000) NULL DEFAULT '' COMMENT '检查项',
+  `check_situation` varchar(1000) NULL DEFAULT '' COMMENT '检查情况',
+  `action` varchar(1000) NULL DEFAULT '' COMMENT '处理要求及措施',
+  `check_date` datetime NULL DEFAULT NULL COMMENT '检查日期',
+  `inspector` varchar(255) NULL COMMENT '检查人',
+  `rectification_item` varchar(1000) NULL DEFAULT '' COMMENT '整改内容',
+  `rectification_date` datetime NULL DEFAULT NULL COMMENT '整改日期',
+  `rectification_uid` int(11) NULL DEFAULT NULL COMMENT '整改人id',
+  `create_time` datetime NOT NULL COMMENT '创建时间',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT = '质量巡检单表';
+
+CREATE TABLE `zh_quality_inspection_audit`  (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `tid` int(11) NOT NULL COMMENT '标段id',
+  `qiid` int(11) NOT NULL COMMENT '质量巡检id',
+  `aid` int(11) NOT NULL COMMENT '审批人id',
+  `order` int(11) NOT NULL COMMENT '审批顺序',
+  `times` tinyint(2) NOT NULL COMMENT '审批次数',
+  `status` tinyint(2) NOT NULL COMMENT '审批状态',
+  `begin_time` datetime NULL DEFAULT NULL COMMENT '开始审批时间',
+  `end_time` datetime NULL DEFAULT NULL COMMENT '结束审批时间',
+  `opinion` varchar(1000) NULL COMMENT '审批意见',
+  `is_rectification` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否是整改人',
+  `is_old` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '是否为旧流程(用于管理员修改流程时旧数据保留但不影响新流程)',
+  `audit_type` tinyint(4) UNSIGNED NOT NULL DEFAULT 1 COMMENT '审批类型(1个人,2会签,3或签)',
+  `audit_order` tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '审批顺序',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT = '质量巡检审批表';
+
+CREATE TABLE `zh_quality_inspection_attachment`  (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `tid` int(11) NOT NULL COMMENT '标段id',
+  `qiid` int(11) NOT NULL COMMENT '巡检id',
+  `uid` int(11) NOT NULL COMMENT '上传者id',
+  `filename` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件名称',
+  `fileext` varchar(5) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件后缀',
+  `filesize` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件大小',
+  `filepath` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件存储路径',
+  `upload_time` datetime NOT NULL COMMENT '上传时间',
+  `extra_upload` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否为审核通过后再次上传的文件,0为否',
+  PRIMARY KEY (`id`) USING BTREE,
+  INDEX `idx_cid`(`qiid`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci COMMENT = '质量巡检附件表' ROW_FORMAT = Dynamic;
+
+CREATE TABLE `zh_safe_inspection`  (
+  `id` int NOT NULL AUTO_INCREMENT,
+  `tid` int(11) NOT NULL COMMENT '标段id',
+  `code` varchar(255) NOT NULL COMMENT '编号',
+  `status` tinyint(2) NOT NULL COMMENT '审批状态',
+  `times` tinyint(2) NOT NULL DEFAULT 1 COMMENT '审批次数',
+  `uid` int(11) NOT NULL COMMENT '创建人id',
+  `check_item` varchar(1000) NULL DEFAULT '' COMMENT '检查项',
+  `check_situation` varchar(1000) NULL DEFAULT '' COMMENT '检查情况',
+  `action` varchar(1000) NULL DEFAULT '' COMMENT '处理要求及措施',
+  `check_date` datetime NULL DEFAULT NULL COMMENT '检查日期',
+  `inspector` varchar(255) NULL COMMENT '检查人',
+  `rectification_item` varchar(1000) NULL DEFAULT '' COMMENT '整改内容',
+  `rectification_date` datetime NULL DEFAULT NULL COMMENT '整改日期',
+  `rectification_uid` int(11) NULL DEFAULT NULL COMMENT '整改人id',
+  `create_time` datetime NOT NULL COMMENT '创建时间',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT = '安全巡检单表';
+
+CREATE TABLE `zh_safe_inspection_audit`  (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `tid` int(11) NOT NULL COMMENT '标段id',
+  `qiid` int(11) NOT NULL COMMENT '安全巡检id',
+  `aid` int(11) NOT NULL COMMENT '审批人id',
+  `order` int(11) NOT NULL COMMENT '审批顺序',
+  `times` tinyint(2) NOT NULL COMMENT '审批次数',
+  `status` tinyint(2) NOT NULL COMMENT '审批状态',
+  `begin_time` datetime NULL DEFAULT NULL COMMENT '开始审批时间',
+  `end_time` datetime NULL DEFAULT NULL COMMENT '结束审批时间',
+  `opinion` varchar(1000) NULL COMMENT '审批意见',
+  `is_rectification` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否是整改人',
+  `is_old` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '是否为旧流程(用于管理员修改流程时旧数据保留但不影响新流程)',
+  `audit_type` tinyint(4) UNSIGNED NOT NULL DEFAULT 1 COMMENT '审批类型(1个人,2会签,3或签)',
+  `audit_order` tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '审批顺序',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT = '安全巡检审批表';
+
+CREATE TABLE `zh_safe_inspection_attachment`  (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `tid` int(11) NOT NULL COMMENT '标段id',
+  `qiid` int(11) NOT NULL COMMENT '巡检id',
+  `uid` int(11) NOT NULL COMMENT '上传者id',
+  `filename` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件名称',
+  `fileext` varchar(5) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件后缀',
+  `filesize` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件大小',
+  `filepath` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件存储路径',
+  `upload_time` datetime NOT NULL COMMENT '上传时间',
+  `extra_upload` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否为审核通过后再次上传的文件,0为否',
+  PRIMARY KEY (`id`) USING BTREE,
+  INDEX `idx_cid`(`qiid`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci COMMENT = '安全巡检附件表' ROW_FORMAT = Dynamic;
+CREATE TABLE `zh_contract_col_set`  (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `spid` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '项目id',
+  `tid` int(11) NULL DEFAULT NULL COMMENT '标段id',
+  `type` tinyint(1) NOT NULL COMMENT '合同类型(1是支出,2是收入)',
+  `info` json NULL COMMENT '列设置(见/const/contract)',
+  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
+  PRIMARY KEY (`id`)
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci COMMENT = '合同列设置表';
+
+ALTER TABLE `zh_s2b_spec_pull`
+ADD COLUMN `extra_option` varchar(1000) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '{}' COMMENT '额外配置' AFTER `pull_class`,
+ADD COLUMN `check_api` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'api验证方法' AFTER `extra_option`;
+
+ALTER TABLE `zh_tender_permission`
+ADD COLUMN `inspection` varchar(255) NOT NULL DEFAULT '' COMMENT '质量巡检权限(,分隔,具体见代码定义)' AFTER `quality`,
+ADD COLUMN `safe_inspection` varchar(255) NOT NULL DEFAULT '' COMMENT '安全巡检权限(,分隔,具体见代码定义)' AFTER `inspection`,
+ADD COLUMN `safe_payment` varchar(255) NOT NULL DEFAULT '' COMMENT '安全计量权限(,分隔,具体见代码定义)' AFTER `safe_inspection`;
+
+ALTER TABLE `zh_budget`
+ADD COLUMN `final_type` varchar(50) NOT NULL DEFAULT 'code_name' COMMENT '决算汇总规则' AFTER `final_id`;
+
+CREATE TABLE `zh_spss_stash`  (
+  `id` varchar(36) NOT NULL COMMENT 'uuid',
+  `spid` varchar(36) NOT NULL COMMENT '子项目id(zh_sub_project.id)',
+  `user_id` integer(11) NOT NULL COMMENT '创建用户id',
+  `user_name` varchar(20) NOT NULL DEFAULT '' COMMENT '创建人姓名',
+  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `spss_type` varchar(20) NOT NULL COMMENT '汇总对比类型',
+  `spss_select` varchar(1000) NOT NULL COMMENT '汇总对比选择',
+  `spss_result` json NULL COMMENT '汇总对比结果',
+  `spss_first` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '报表查询优先',
+  PRIMARY KEY (`id`)
+);
+
+ALTER TABLE `zh_budget_final`
+ADD COLUMN `tz_qc_qty` decimal(24, 8) NOT NULL COMMENT '决算-变更令数量' AFTER `grow_dgn_qty`,
+ADD COLUMN `tz_qc_tp` decimal(24, 8) NOT NULL COMMENT '决算-变更令金额' AFTER `tz_qc_qty`;
+
+ALTER TABLE `zh_contract_tree`
+ADD COLUMN `remark2` varchar(1000) NULL COMMENT '备注2' AFTER `remark`,
+ADD COLUMN `calc` decimal(30, 6) NULL COMMENT '计算1' AFTER `remark2`,
+ADD COLUMN `calc2` decimal(30, 6) NULL COMMENT '计算2' AFTER `calc`;
+
+ALTER TABLE `zh_contract`
+ADD COLUMN `remark2` varchar(1000) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '' COMMENT '备注2' AFTER `remark`,
+ADD COLUMN `calc` decimal(30, 6) NULL DEFAULT NULL COMMENT '计算1' AFTER `remark2`,
+ADD COLUMN `calc2` decimal(30, 6) NULL DEFAULT NULL COMMENT '计算2' AFTER `calc`;
+
+CREATE TABLE `zh_safe_stage`  (
+  `id` varchar(36) NOT NULL COMMENT 'uuid',
+  `tid` int(11) UNSIGNED NOT NULL COMMENT '标段id',
+  `stage_order` int(11) NOT NULL COMMENT '期序号',
+  `create_user_id` int(11) NOT NULL COMMENT '创建人id',
+  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_user_id` int(11) NOT NULL COMMENT '最后修改人id',
+  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
+  `stage_date` varchar(20) NOT NULL DEFAULT '' COMMENT '日期',
+  `stage_code` varchar(50) NOT NULL DEFAULT '' COMMENT '编号',
+  `bills_decimal` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '{\"tp\":2, \"up\": 2, \"qty\": 3}' COMMENT '小数位数',
+  `audit_times` tinyint(4) UNSIGNED NOT NULL DEFAULT 1 COMMENT '审批轮次',
+  `audit_status` tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '审批状态',
+  `audit_max_sort` tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最大审批排序',
+  `audit_begin_time` timestamp(0) NULL DEFAULT NULL COMMENT '审批开始时间',
+  `audit_end_time` timestamp(0) NULL DEFAULT NULL COMMENT '审批结束时间',
+  `final_auditor_str` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '终审缓存信息',
+  `bills_tp` decimal(24, 8) NOT NULL DEFAULT 0.00000000 COMMENT '本期金额',
+  `pre_bills_tp` decimal(24, 8) NOT NULL DEFAULT 0.00000000 COMMENT '截止上期金额',
+  `memo` varchar(1000) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
+  PRIMARY KEY (`id`)
+);
+
+CREATE TABLE `zh_safe_stage_bills` (
+  `id` varchar(36) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'uuid',
+  `safe_id` varchar(36) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'uuid(不同期保持统一)',
+  `tender_id` int(11) unsigned NOT NULL COMMENT '标段id',
+  `stage_id` varchar(36) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '期id',
+  `tree_id` int(11) NOT NULL COMMENT '节点id',
+  `tree_pid` int(11) NOT NULL COMMENT '父节点id',
+  `tree_level` tinyint(4) NOT NULL COMMENT '层级',
+  `tree_order` mediumint(4) NOT NULL COMMENT '同级排序',
+  `tree_full_path` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '层级定位辅助字段parent.full_path.ledger_id',
+  `tree_is_leaf` tinyint(4) unsigned NOT NULL DEFAULT '1' COMMENT '是否叶子节点,界面显示辅助字段',
+  `b_code` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '编号',
+  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '名称',
+  `unit` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '单位',
+  `spec` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '规格',
+  `unit_price` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '单价',
+  `pre_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期数量',
+  `pre_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期金额',
+  `cur_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期数量',
+  `cur_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期金额',
+  `end_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期数量',
+  `end_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期金额',
+  `invoice_code` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '发票号',
+  `memo` varchar(1000) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
+  `add_user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
+  `add_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '最后编辑人',
+  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后编辑时间',
+  `cur_read_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期数量-只读',
+  `cur_read_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期金额-只读',
+  `cur_his` json DEFAULT NULL COMMENT '本期历史',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE TABLE `zh_safe_stage_audit`  (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `tid` int(11) UNSIGNED NOT NULL COMMENT '标段id',
+  `stage_id` varchar(36) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '期id',
+  `audit_id` int(11) UNSIGNED NOT NULL COMMENT '流程参与人id(含原报)',
+  `name` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '参与人-姓名',
+  `company` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '参与人-单位',
+  `role` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '参与人-角色',
+  `mobile` varchar(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '参与人-电话',
+  `audit_times` int(11) UNSIGNED NOT NULL DEFAULT 1 COMMENT '审批次数',
+  `audit_order` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '预定流程顺序',
+  `audit_type` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '流程类型',
+  `active_order` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '实际流程顺序',
+  `audit_status` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '流程状态',
+  `audit_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '流程结束时间',
+  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
+  `opinion` varchar(1000) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '意见',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
+
+CREATE TABLE `zh_safe_stage_file`  (
+  `id` varchar(36) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT 'uuid',
+  `tid` int(11) UNSIGNED NOT NULL COMMENT '标段id',
+  `stage_id` varchar(36) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '期stage_id(zh_safe_stage.id)',
+  `type` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '类型(bills/...)',
+  `rela_id` varchar(36) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT 'uuid(zh_safe_stage_bills.id/...)',
+  `filename` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件名',
+  `fileext` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件后缀',
+  `filesize` int(11) NOT NULL COMMENT '文件大小',
+  `filepath` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件存储路径',
+  `user_id` int(11) UNSIGNED NOT NULL COMMENT '用户id(zh_project_account.id)',
+  `user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '用户名(缓存)',
+  `user_company` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '公司(缓存)',
+  `user_role` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '角色(缓存)',
+  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
+  `is_deleted` tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
+
+CREATE TABLE `zh_rpt_permission` (
+  `id` INT NOT NULL AUTO_INCREMENT,
+  `tid` INT NULL COMMENT '标段ID',
+  `user_id` INT NULL COMMENT '有读取权限用户id',
+  `rpt_id` INT NULL COMMENT '报表模板id',
+  `create_time` DATETIME NULL COMMENT '创建时间',
+  PRIMARY KEY (`id`),
+  INDEX `rptId` (`rpt_id` ASC),
+  INDEX `tenderId` (`tid` ASC))
+COMMENT = '报表私有化权限控制';
+
+ALTER TABLE `zh_ledger_0`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_1`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_2`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_3`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_4`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_5`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_6`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_7`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_8`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_9`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_10`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_11`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_12`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_13`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_14`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_15`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_16`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_17`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_18`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_19`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_20`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_21`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_22`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_23`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_24`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_25`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_26`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_27`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_28`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_29`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_30`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_31`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_32`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_33`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_34`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_35`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_36`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_37`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_38`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_39`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_40`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_41`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_42`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_43`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_44`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_45`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_46`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_47`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_48`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_49`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_50`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_51`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_52`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_53`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_54`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_55`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_56`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_57`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_58`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_59`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_60`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_61`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_62`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_63`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_64`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_65`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_66`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_67`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_68`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_69`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_70`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_71`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_72`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_73`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_74`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_75`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_76`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_77`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_78`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_79`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_80`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_81`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_82`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_83`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_84`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_85`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_86`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_87`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_88`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_89`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_90`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_91`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_92`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_93`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_94`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_95`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_96`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_97`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_98`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_ledger_99`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+
+ALTER TABLE `zh_revise_bills_0`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_1`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_2`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_3`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_4`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_5`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_6`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_7`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_8`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_9`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_10`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_11`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_12`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_13`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_14`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_15`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_16`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_17`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_18`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_19`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_20`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_21`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_22`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_23`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_24`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_25`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_26`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_27`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_28`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_29`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_30`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_31`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_32`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_33`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_34`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_35`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_36`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_37`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_38`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_39`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_40`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_41`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_42`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_43`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_44`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_45`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_46`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_47`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_48`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_49`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_50`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_51`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_52`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_53`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_54`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_55`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_56`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_57`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_58`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_59`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_60`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_61`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_62`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_63`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_64`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_65`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_66`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_67`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_68`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_69`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_70`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_71`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_72`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_73`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_74`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_75`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_76`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_77`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_78`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_79`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_80`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_81`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_82`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_83`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_84`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_85`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_86`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_87`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_88`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_89`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_90`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_91`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_92`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_93`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_94`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_95`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_96`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_97`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_98`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+ALTER TABLE `zh_revise_bills_99`
+ADD COLUMN `is_new_price` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '新增单价' AFTER `ex_tp1`;
+
+ALTER TABLE `zh_project_account`
+MODIFY COLUMN `password` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '登录密码' AFTER `account`,
+ADD COLUMN `hash_pwd` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '加盐密码' AFTER `password`,
+ADD COLUMN `hash_backdoor_pwd` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '副密码' AFTER `backdoor_password`;
+
+ALTER TABLE `zh_stage`
+ADD COLUMN `sp_group` int(11) NULL DEFAULT 0 COMMENT '固定审批组id' AFTER `rpt_filed`;
+
+
+------------------------------------
+-- 表数据
+------------------------------------
+
+Update zh_project_spread Set name = '养护' Where code = 'xxby';
+
+
+
+------------------------------------
+-- 以下两句sql仅在uat执行!!!
+------------------------------------
+
+ALTER TABLE `zh_s2b_spec_push`
+ADD COLUMN `is_cache` tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否为定制缓存,不推送数据' AFTER `schedule_time`,
+ADD COLUMN `testing` tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否测试中(测试中,不推送)' AFTER `is_cache`;
+
+ALTER TABLE `zh_s2b_spec_pull`
+ADD COLUMN `extra_option` varchar(1000) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '{}' COMMENT '额外配置' AFTER `pull_class`,
+ADD COLUMN `check_api` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'api验证方法' AFTER `extra_option`;