Kaynağa Gözat

2019-09-05:13:13

xs 6 yıl önce
ebeveyn
işleme
be5e1e6501

+ 0 - 6
src/main/java/com/jeeplus/modules/sg/project/web/ProjectController.java

@@ -71,12 +71,6 @@ public class ProjectController extends BaseController {
     @RequestMapping("/save")
     public AjaxJson save(WbsProject wbsProject, Model model, RedirectAttributes redirectAttributes){
         AjaxJson j = new AjaxJson();
-        List<WbsProject> projects =  projectService.findByName(wbsProject.getProjectName());
-        if (projects!=null&&!projects.isEmpty()){
-           j.setSuccess(false);
-           j.setMsg("添加失败! 工程名称:"+wbsProject.getProjectName()+" 已存在");
-           return j;
-        }
         //数据验证
         String errMsg = beanValidator(wbsProject);
         if (StringUtils.isNotBlank(errMsg)){

+ 13 - 19
src/main/java/com/jeeplus/modules/sg/project/web/ProjectTemController.java

@@ -63,12 +63,6 @@ public class ProjectTemController extends BaseController {
     @RequestMapping("/import")
     public HashMap importFile(@RequestParam(value = "file")MultipartFile[] file,String projectName,String[] itemNames,String[] itemTypes)  {
         HashMap map = new HashMap();
-        List<WbsProject> projects =  projectService.findByName(projectName);
-        if (projects!=null&&!projects.isEmpty()){
-            map.put("code",0);
-            map.put("msg","添加失败! 工程名称: "+projectName+" 已存在");
-            return map;
-        }
         WbsProject wbsProject = new WbsProject();
         wbsProject.setProjectName(projectName);
         projectService.save(wbsProject);
@@ -191,18 +185,18 @@ public class ProjectTemController extends BaseController {
         return newDate+result;
     }
 
-    @RequestMapping("/verfiy")
-    @ResponseBody
-    public HashMap getVerfiy(String projectName,String projectId){
-        HashMap map = new HashMap();
-        List<WbsItem> wbsItemList = itemService.findItemByName(projectName,projectId);
-        if (wbsItemList!=null&&!wbsItemList.isEmpty()){
-            map.put("code",1);
-            map.put("msg","导入失败! 项目名称:"+projectName+" 已存在");
-            return map;
-        }
-        map.put("msg","导入成功");
-        return map;
-    }
+//    @RequestMapping("/verfiy")
+//    @ResponseBody
+//    public HashMap getVerfiy(String projectName,String projectId){
+//        HashMap map = new HashMap();
+//        List<WbsItem> wbsItemList = itemService.findItemByName(projectName,projectId);
+//        if (wbsItemList!=null&&!wbsItemList.isEmpty()){
+//            map.put("code",1);
+//            map.put("msg","导入失败! 项目名称:"+projectName+" 已存在");
+//            return map;
+//        }
+//        map.put("msg","导入成功");
+//        return map;
+//    }
 
 }

+ 12 - 14
src/main/java/com/jeeplus/modules/sg/substation/service/SubstationService.java

@@ -163,6 +163,7 @@ public class SubstationService {
         ImportExcel gf = new ImportExcel(file,1,SubstationInfo.SHEET_GFQD);  //规费项目清单计价表
         ImportExcel qt = new ImportExcel(file,1,SubstationInfo.SHEET_QTFY);  //其他项目清单计价表
         ImportExcel fbrcg = new ImportExcel(file,1,SubstationInfo.SHEET_ZBRCGSB );   //招标人采购材料设备计价表
+        ImportExcel tbrsb = new ImportExcel(file,1,SubstationInfo.SHEET_TBRCGSB);//投标人采购设备计价表
         double jzgc = ExcelUtil.getDouble(total,SubstationInfo.HZ_JZGC,1,2);//汇总表建筑金额
         double azgc = ExcelUtil.getDouble(total,SubstationInfo.HZ_AZGC,1,2);//汇总表安装金额
         double texRate = ExcelUtil.getTexRate(total); //获取税率
@@ -175,28 +176,25 @@ public class SubstationService {
         double gcjsFee = BashInfo.getGcjsFee(total);  //获取工程结算价
 
         //变电站 结算汇总
-        List<Settlement> settlementList =  SettementUtil.getComparison(total);
-        double cbperson = 0.0;
+        List<Settlement> settlementsBdz =  SettementUtil.getComparison(total);
+        double cbperson = ExcelUtil.getDouble(tbrsb,BashInfo.QT_HJ,0,6);//获取投标人设备表合计
         double word1total =  ExcelUtil.getDouble(csqd1,BashInfo.QT_HJ,0,4);//获取措施费清单计价表一
-        double word2total=0.0;
-        double otherDlTotal =  ExcelUtil.getDouble(qt,BashInfo.QT_HJ,0,2);//获取其他项目费合计
-        double feesDlCount =  ExcelUtil.getDouble(gf,BashInfo.QT_HJ,0,4);//获取规费合计
-
-
-        //--------------------------
+        double word2total=ExcelUtil.getDouble(csqd2,SubstationInfo.CS_JZ,0,10);//获取措施费二表措施项目合计金额
+        double otherBdzTotal =  ExcelUtil.getDouble(qt,BashInfo.QT_HJ,0,2);//获取其他项目费合计
+        double feesBdzCount =  ExcelUtil.getDouble(gf,BashInfo.QT_HJ,0,4);//获取规费合计
         if(jzgc !=0.00 && azgc != 0.00){
             ImportExcel jzqd = new ImportExcel(file, 1, SubstationInfo.SHEET_JZFBFXJJ);  //建筑分部分项工程量清单计价表
             ImportExcel azqd = new ImportExcel(file, 1, SubstationInfo.SHEET_AZFBFXJJ);  //安装分部分项工程量清单计价表
             ImportExcel jzhz = new ImportExcel(file, 1, SubstationInfo.SHEET_JZHZB);   //建筑工程费用汇总表
             ImportExcel azhz = new ImportExcel(file, 1, SubstationInfo.SHEET_HZHZB);   //安装工程费用汇总表
-            //架空结算汇总
+            //变电站结算汇总
             int[] comlumn2 = {12,15};//定义所要数组
-            double built1Total = ExcelUtil.getDouble(jzqd,SubstationInfo.JZMX_BJZ,0,2);//建筑分部分项工程量清单计价表合计
-            double[] builtTotal={built1Total,0.00};
-            double[] division1total=ExcelUtil.getDoubleArray(azqd,SubstationInfo.AZMX_BDZAZ,0,comlumn2);//安装分部分项比对数据清单合计
+            double built1Total = ExcelUtil.getDouble(jzqd,SubstationInfo.JZMX_BJZ,2,0);//建筑分部分项工程量清单计价表合计
+            double[] builtTotal={built1Total,0.0};
+            double[] division1total=ExcelUtil.getDoubleArray(azqd,SubstationInfo.AZMX_BDZAZ,1,comlumn2);//安装分部分项比对数据清单合计
             double[] division = {division1total[0],division1total[1],0.00,0.00};
-            List<Settlement> settlements = SettementUtil.getDLComparison(settlementList,builtTotal,division,word1total,word2total,otherDlTotal,feesDlCount,cbperson);
-            settlementService.save(settlements,id);
+            List<Settlement> settlementBdzs = SettementUtil.getDLComparison(settlementsBdz,builtTotal,division,word1total,word2total,otherBdzTotal,feesBdzCount,cbperson);
+            settlementService.save(settlementBdzs,id);
             double zjgcJzTotal = ExcelUtil.getDouble(jzhz,SubstationInfo.QT_HJ,0,3);//建筑直接工程费合计
             double zjgcAzTotal = ExcelUtil.getDouble(azhz,SubstationInfo.QT_HJ,0,3);//安装直接工程费合计
             double csJzFee = SubstationInfo.getCsJzFee(csqd2);//建筑措施分摊费

+ 1 - 1
src/main/webapp/webpage/modules/sg/free/alongst.jsp

@@ -25,7 +25,7 @@
             <span id="readid2">200</span>
         </div>
         <div class="" style="margin-left: 10px;">
-            <input type="radio" name="mydiv" value="1" title="增加">
+            <input type="radio" name="mydiv" value="1" title="增加" checked="">
             <input type="radio" name="mydiv" value="2" title="减少">
         </div>
     </div>

+ 2 - 2
src/main/webapp/webpage/modules/sg/free/avgpage.jsp

@@ -33,8 +33,8 @@
             <%--<input type="text" value="5000" id="readid" readonly="readonly" class="layui-input" style="width:20%;border:none;">--%>
         <%--</div>--%>
         <div class="layui-input-block">
-            <input  type="radio" name="state" value="1" title="增加" checked="checked"/>
-            <input  type="radio" name="state" value="2" title="减少" checked=""/>
+            <input  type="radio" name="state" value="1" title="增加" checked=""/>
+            <input  type="radio" name="state" value="2" title="减少" />
         </div>
     </div>
     <div class="layui-form-item">

+ 61 - 73
src/main/webapp/webpage/modules/sg/free/wbslist.js

@@ -20,7 +20,7 @@
     treeDefaultClose: false,
     treeLinkage: false,
     elem: '#table1',
-    <%--url: '${ctxp}/webpage/modules/sys/free/selfwbs.json',--%>
+    // <%--url: '${ctxp}/webpage/modules/sys/free/selfwbs.json',--%>
     page: false,
     cols: [[
     {type:'numbers',title: '序号', rowspan: 2, totalRowText: "合计",},
@@ -80,8 +80,8 @@
         "fbrcg2":"${data.fbrCost}",
         "jxf2": "${data.jxCost}",
 
-        <%--"rgf3": "${data.rgFtFee}",--%>
-                    "rgf3": "<c:if test="${ empty data.rgFtFee and not empty data.originalTotalCost}">0.0</c:if><c:if test="${ not empty data.rgFtFee}">${data.rgFtFee}</c:if> ",
+        // <%--"rgf3": "${data.rgFtFee}",--%>
+        //             "rgf3": "<c:if test="${ empty data.rgFtFee and not empty data.originalTotalCost}">0.0</c:if><c:if test="${ not empty data.rgFtFee}">${data.rgFtFee}</c:if> ",
         "cbrcg3": "<c:if test="${ empty data.cbrFtFee and not empty data.originalTotalCost}">0.0</c:if><c:if test="${ not empty data.cbrFtFee}">${data.cbrFtFee}</c:if>",
         "fbrcg3": "<c:if test="${ empty data.fbrFtFee and not empty data.originalTotalCost}">0.0</c:if><c:if test="${ not empty data.fbrFtFee}">${data.fbrFtFee}</c:if>",
         "jxf3": "<c:if test="${ empty data.jxFtFee and not empty data.originalTotalCost}">0.0</c:if><c:if test="${ not empty data.jxFtFee}">${data.jxFtFee}</c:if>",
@@ -108,8 +108,6 @@
 
     renderTable1();
 });
-</script>
-<script>
 layui.use(['table', 'form', 'element', 'treetable'], function () {
     var $ = layui.jquery;
     var table = layui.table;
@@ -126,15 +124,15 @@ layui.use(['table', 'form', 'element', 'treetable'], function () {
             treeIdName: 'd_id',
             treePidName: 'd_pid',
             elem: '#table2',
-        <%--url: '${ctxp}/webpage/modules/sys/free/other.json',--%>
-    page: false,
-    cols: [[
-    {type: 'numbers'},
-    {field: 'wbsys', title: 'WBS要素'},
-    {field: 'wbssbm', title: 'WBS识别码'},
-    {field: 'money', title: '金额'},
-    ]]
-    ,data: [
+        {/*<%--url: '${ctxp}/webpage/modules/sys/free/other.json',--%>*/}
+            page: false,
+            cols: [[
+                {type: 'numbers'},
+                {field: 'wbsys', title: 'WBS要素'},
+                {field: 'wbssbm', title: 'WBS识别码'},
+                {field: 'money', title: '金额'},
+             ]]
+            ,data: [
                 <c:if test="${ not empty map.list}">
                     <c:forEach items="${map.list}" var="data" varStatus="index">
                         <c:if test="${data.feeType eq '0'}">
@@ -149,60 +147,54 @@ layui.use(['table', 'form', 'element', 'treetable'], function () {
                         </c:if>
                     </c:forEach>
                 </c:if>
-    ],
-        done: function () {
-            layer.closeAll('loading');
-        }
-    });
-    };
+            ],
+                done: function () {
+                    layer.closeAll('loading');
+                }
+            });
+            };
 
-    renderTable2();
-});
-</script>
-<script>
-layui.use('table', function(){
-    var table = layui.table;
-});
-</script>
-<script>
-layui.use('table', function(){
-    var table = layui.table;
+            renderTable2();
+            });
+        layui.use('table', function(){
+            var table = layui.table;
+        });
+        layui.use('table', function(){
+            var table = layui.table;
 
-    table.render({
-        elem: '#xmmc'
-        ,title: '未标识'
-        ,cols: [[
-            {field:'xmmc', width:200,title:'项目名称'}
-            ,{field:'fyje', width:178,title:'费用金额'}
-            ,{width:178,  toolbar: '#barDemo',title:'操作'}
-        ]]
-        ,data:[
-            <c:if test="${ not empty map.list}">
-                <c:forEach items="${map.list2}" var="data" varStatus="index">
-                    {
-                        "id":"${data.id}",
-                        "xmmc": "${data.type}",
-                        "fyje": "${data.fee}"
-                    },
-                </c:forEach>
-            </c:if>
-        ]
-        ,page: false
-    });
-    //监听工具条
-    table.on('tool(freestr)', function(obj){
-        var datacount="";
-        var data = obj.data;
-        if(obj.event === 'fttz'){
-            sureradio(data);
-        } else if(obj.event === 'ddtz'){
-            sureradio2(data,'${ctx}/jkxl/getft?id='+data.id);
-        }
-        // alert(datacount);
-    });
-});
-</script>
-<script>
+            table.render({
+                elem: '#xmmc'
+                ,title: '未标识'
+                ,cols: [[
+                    {field:'xmmc', width:200,title:'项目名称'}
+                    ,{field:'fyje', width:178,title:'费用金额'}
+                    ,{width:178,  toolbar: '#barDemo',title:'操作'}
+                ]]
+                ,data:[
+                    <c:if test="${ not empty map.list}">
+                        <c:forEach items="${map.list2}" var="data" varStatus="index">
+                            {
+                                "id":"${data.id}",
+                                "xmmc": "${data.type}",
+                                "fyje": "${data.fee}"
+                            },
+                        </c:forEach>
+                    </c:if>
+                ]
+                ,page: false
+            });
+            //监听工具条
+            table.on('tool(freestr)', function(obj){
+                var datacount="";
+                var data = obj.data;
+                if(obj.event === 'fttz'){
+                    sureradio(data);
+                } else if(obj.event === 'ddtz'){
+                    sureradio2(data,'${ctx}/jkxl/getft?id='+data.id);
+                }
+                // alert(datacount);
+            });
+        });
 function sureradio2(data,url){
     var newid = data.id;
     var xmmc = data.xmmc;
@@ -219,9 +211,9 @@ function sureradio2(data,url){
             shade: 0.8,
             maxmin: true,
             shadeClose: true,
-        <%--content: '${ctxp}/webpage/modules/sg/free/alongst.jsp'--%>
-    content: url
-    , btn: ['确定','关闭']
+        {/*<%--content: '${ctxp}/webpage/modules/sg/free/alongst.jsp'--%>*/}
+            content: url
+            , btn: ['确定','关闭']
                 ,yes: function(index, layero){
                     var bodyparent = layer.getChildFrame('body', index);
                     bodyparent.find('#freenl').click();
@@ -233,8 +225,6 @@ function sureradio2(data,url){
             })
         })
     }
-</script>
-<script>
     function sureradio(data,target){
         var newid = data.id;
         var xmmc = data.xmmc;
@@ -272,8 +262,6 @@ function sureradio2(data,url){
             })
         })
     }
-</script>
-<script>
     layui.use('table', function(){
         var table = layui.table;
         table.render({

+ 6 - 8
src/main/webapp/webpage/modules/sg/project/management.js

@@ -64,7 +64,7 @@ layui.config({
                         return xml;
                     }}
             ]],
-            "data": [
+            data: [
                 <c:if test="${ not empty list}">
                     <c:forEach items="${list}" var="data" varStatus="index">
                         {
@@ -94,11 +94,10 @@ layui.config({
                 "type":"${items.type}",
                 "gcmc":"${items.itemName}",
                 "xmsl": "某施工单位一",
-        <%--"cjsq": <c:if test="${items.type eq '1'}">"架空线路"</c:if><c:if test="${items.type eq '2'}">"电缆线路"</c:if>,--%>
-                        "cjsq":<c:if test="${items.type eq '1'}">"架空线路"</c:if><c:if test="${items.type eq '2'}">"电缆线路"</c:if>,
-                        "djr":"<fmt:formatDate value="${items.createDate}" pattern="yyyy/MM/dd"/>",
-        "status":"3",
-            "pid": "${items.projectId}"
+                "cjsq":"<c:if test="${items.type eq '1'}">架空线路</c:if><c:if test="${items.type eq '2'}">电缆线路</c:if>",
+                "djr":"<fmt:formatDate value="${items.createDate}" pattern="yyyy/MM/dd"/>",
+                "status":"3",
+                "pid": "${items.projectId}"
     },
     </c:forEach>
     </c:forEach>
@@ -172,7 +171,6 @@ function addProject(){
                 }
             }
         });
-
     });
 }
 function look(url) {
@@ -212,7 +210,7 @@ function update(url) {
 $(document).ready(function(e) {
 
     $("#noneBtn").click(function(e) {
-        $("#noneDiv").toggle(400);
+        $("#noneDiv").toggle();
     });
 });
 </script>

+ 2 - 1
src/main/webapp/webpage/modules/sg/project/management.jsp

@@ -9,7 +9,7 @@
     <link rel="stylesheet" href="${ctxp}/static/plugin/assets/vermeit.css">
     <script type="text/javascript" src="${ctxp}/static/plugin/assets/jquery-3.2.1.min.js"></script>
     <script src="${ctxp}/static/plugin/assets/layui/layui.js"></script>
-    <%@include file="management.js"%>
+
 </head>
 <style>
     .layui-input{height: 28px;margin-top: 5px;width: 260px;}
@@ -128,4 +128,5 @@
     </div>
 </div>
 </body>
+<%@include file="management.js"%>
 </html>

+ 12 - 12
src/main/webapp/webpage/modules/sg/projecttem/addItem.js

@@ -19,18 +19,18 @@ function doSubmit(obj){
     var project_name=$("#inputwrite").val();
     //获取工程id
     var project_id=$("#newText1").val();
-    $.ajax({
-        url: "${ctx}/project/tem/verfiy",
-        type: "post",
-        data: {"projectName":project_name,"projectId":project_id},
-        success:function (result) {
-            if (result.code == 1){
-                layer.msg(result.msg,{icon:5});
-            }else {
-                $("#inputForm").submit();
-            }
-        }
-    });
+    // $.ajax({
+    //     url: "${ctx}/project/tem/verfiy",
+    //     type: "post",
+    //     data: {"projectName":project_name,"projectId":project_id},
+    //     success:function (result) {
+    //         if (result.code == 1){
+    //             layer.msg(result.msg,{icon:5});
+    //         }else {
+    //             $("#inputForm").submit();
+    //         }
+    //     }
+    // });
 }
 $("#btnxz").click(function(){
     $("#myfile").trigger("click");

+ 1 - 1
src/main/webapp/webpage/modules/sg/projecttem/addItem2Form.js

@@ -23,7 +23,7 @@ layui.use('upload', function(){
                 var tr = $(['<tr id='+index+'>'
                     ,'<td hidden><div class="td_id">'+index+'</div></td>'
                     ,'<td>'+ file.name +'</td>'
-                    ,'<td><div contenteditable="true" class="mydiv1" placeholder="请输入项目名称"></div></td>'
+                    ,'<td><div contenteditable="true" class="mydiv1" placeholder="请输入项目名称">'+file.name.split(".")[0]+'</div></td>'
                     ,'<td>'
                     ,' <select name="type" class="myselect"><option value="">请选择项目类型</option><option value="1">架空线路工程</option><option value="2">电缆工程</option><option value="3">变电站工程</option></select>'
                     ,'<td style="text-align: center">'

+ 2 - 2
src/main/webapp/webpage/modules/sg/projecttem/addItem2Form.jsp

@@ -49,8 +49,8 @@
                                         <thead>
                                         <tr>
                                             <th width="35%">文件名</th>
-                                            <th width="20%">项目名称</th>
-                                            <th width="20%">项目类型</th>
+                                            <th width="35%">项目名称</th>
+                                            <th width="15%">项目类型</th>
                                             <th width="15%" style="text-align: center">操作</th>
                                         </tr></thead>
                                         <tbody id="demoList">