JiangPengLi 4 сар өмнө
parent
commit
66b8358a52

+ 3 - 1
projects-service/src/main/java/com/rtrh/projects/modules/projects/po/SubInfoGxj.java

@@ -155,5 +155,7 @@ public class SubInfoGxj extends TableBaseColomn implements Serializable {
     // 投资类型: 1政府类、2 投资类
     private String kindNature;
 
-
+    // 前期手续数量
+    private String preProceNum;
+    private String preEndNum;
 }

+ 10 - 4
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubInfoQueryServiceImpl.java

@@ -199,7 +199,10 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
                         .ifPresent(k -> e.setSubjectName(k.getTitle()));
                 if ("2".equals(e.getStatus())){
                     // 新建库查询前期手续
-
+                    List<SubPreNewResultVO> preList = subPreNewService.listBySubId(e.getSubId());
+                    Map<String, Long> numMap = preList.stream().collect(Collectors.groupingBy(SubPreNewResultVO::getStatusConf, Collectors.counting()));
+                    e.setPreProceNum(numMap.getOrDefault("1", 0L) + "");
+                    e.setPreEndNum(numMap.getOrDefault("2", 0L) + "");
                 }
             }
         }
@@ -210,8 +213,10 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
     @Override
     public StatisticsVO queryStatistics(SubInfoQueryTzVO queryVO, LoginUserVO loginUser) {
         List<SubInfoGxj> list = subInfoMapper.queryStatistics(queryVO);
-        // 储备项目总数
-        long cbNum = list.stream().filter(e -> "1".equals(e.getStatus())).count();
+        long num = 0;
+        if(StringUtils.isNotBlank(queryVO.getStatus())){
+            num = list.stream().filter(e -> queryVO.getStatus().equals(e.getStatus())).count();
+        }
         // abc类统计
         Map<String, Long> abc = list.stream().filter(e -> StringUtils.isNotBlank(e.getAbc())).collect(Collectors.groupingBy(SubInfoGxj::getAbc, Collectors.counting()));
         // 建设地点统计
@@ -246,7 +251,8 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
                     });
         });
         return new StatisticsVO()
-                .setCbNum(cbNum)
+                .setCbNum(num)
+                .setNum(num)
                 .setANum(abc.getOrDefault("A", 0L))
                 .setBNum(abc.getOrDefault("B", 0L))
                 .setCNum(abc.getOrDefault("C", 0L))

+ 9 - 2
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubInfoServiceImpl.java

@@ -4748,8 +4748,15 @@ public class SubInfoServiceImpl implements SubInfoService {
     @Override
     public boolean moveDb(MoveDbParamVo vo) {
         SubInfo subinfo = subInfoDao.findById(vo.getId());
-        int i = subInfoDao.updateBySql("update sub_info set status='" + vo.getStatus() + "' where id='" + vo.getId() + "'");
-        return i > 0;
+        if (StringUtils.isNotBlank(subinfo.getStatus())){
+            if (Integer.parseInt(vo.getStatus()) < Integer.parseInt(vo.getStatus())){
+                int i = subInfoDao.updateBySql("update sub_info set status='" + vo.getStatus() + "' where id='" + vo.getId() + "'");
+                return i > 0;
+            }else {
+                return false;
+            }
+        }
+        return false;
     }
 
 

+ 2 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/StatisticsVO.java

@@ -16,6 +16,8 @@ public class StatisticsVO {
      */
     private Long cbNum;
 
+    private Long num;
+
     /**
      * A类数量
      */

+ 81 - 0
projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoController.java

@@ -1144,7 +1144,88 @@ public class SubInfoController extends BaseController {
 
         return begin + "~" + end;
     }
+    @GetMapping("detailView2")
+    public ModelAndView viewDetail(Model model, String subId, String lastUrl, Boolean layer, String queryYear, Boolean isCt) {
+        // Map<String, Object> subInfo = subInfoService.getSubInfoById(subId, queryYear);
+        model.addAttribute("subId",subId);
+        model.addAttribute("layer",layer);
+        model.addAttribute("lastUrl",lastUrl);
+        model.addAttribute("queryYear",queryYear);
+
+/*        String status = String.valueOf(subInfo.get("status"));
+        //判断是否项目已经竣工
+        model.addAttribute("completeCheck", ProjectStatusEnum.END.getKey().equals(status));
+
+        model.addAttribute("sunInfo", subInfo);
+
+        int currYear = DateUtil.thisYear();
+        model.addAttribute("currYear", currYear);
+        model.addAttribute("lastUrl", lastUrl);
+
+        model.addAttribute("layer", Boolean.TRUE.equals(layer));
+        model.addAttribute("canPrint", false);
+        model.addAttribute("queryYear", queryYear);
 
+        //当前状态
+        if (Boolean.TRUE.equals(isCt)) {
+            return new ModelAndView("/vmodules/statics/layer/subInfo/projectInfo.jsp");
+        }
+
+        //总完成投资
+        BigDecimal allEndAmt = BigDecimal.ZERO;
+        // BigDecimal totalAmt = (BigDecimal) (subInfo.get("amt_total"));
+        BigDecimal totalAmt = new BigDecimal(100);
+        List<RptCont> allRpt = subRptContService.getListBySub(subId, null, RptContKindEnum.MONTH);
+        if (CollectionUtil.isNotEmpty(allRpt)) {
+            double sum = allRpt.stream().mapToDouble(new ToDoubleFunction<RptCont>() {
+                @Override
+                public double applyAsDouble(RptCont value) {
+                    if (value.getAmt() != null) {
+                        return value.getAmt().doubleValue();
+                    }
+                    return 0;
+                }
+            }).sum();
+            allEndAmt = BigDecimal.valueOf(sum);
+        }
+        if (totalAmt == null) {
+            totalAmt = BigDecimal.ZERO;
+        }
+        model.addAttribute("totalAmt", totalAmt.divide(BigDecimal.valueOf(10000), 2, RoundingMode.HALF_UP));
+        model.addAttribute("allEndAmt", allEndAmt.divide(BigDecimal.valueOf(10000), 2, RoundingMode.HALF_UP));
+        if (BigDecimal.ZERO.compareTo(totalAmt) != 0) {
+            model.addAttribute("allEndAmtRate", allEndAmt.divide(totalAmt, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_HALF_UP));
+        } else {
+            model.addAttribute("allEndAmtRate", "0");
+        }
+        BigDecimal yearAmt = BigDecimal.ZERO;
+        List<SubAmtPlan> currYearAmtPlanList = subAmtPlanDao.getBySubId(subId, String.valueOf(currYear));
+        if (CollectionUtil.isNotEmpty(currYearAmtPlanList)) {
+            for (SubAmtPlan amt : currYearAmtPlanList) {
+                if (amt.getAmt() != null) {
+                    yearAmt = yearAmt.add(amt.getAmt());
+                }
+            }
+        }
+
+        BigDecimal yearAmtSj = (BigDecimal) subInfo.get("yearAmtSj");
+        if (yearAmtSj == null) {
+            yearAmtSj = BigDecimal.ZERO;
+        }
+
+
+        model.addAttribute("yearPlanAmt", (yearAmt).divide(new BigDecimal(10000), 2, BigDecimal.ROUND_HALF_UP));
+        model.addAttribute("yearAmt", yearAmt.divide(new BigDecimal(10000), 2, BigDecimal.ROUND_HALF_UP));
+        model.addAttribute("yearAmtSj", yearAmtSj.divide(new BigDecimal(10000), 2, BigDecimal.ROUND_HALF_UP));
+        if (BigDecimal.ZERO.compareTo(yearAmt) != 0) {
+            model.addAttribute("yearEndAmtRate", yearAmtSj.divide(yearAmt, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_HALF_UP));
+        } else {
+            model.addAttribute("yearEndAmtRate", 0);
+        }*/
+
+        return new ModelAndView("/vmodules/subject/subInfo/detailView.jsp");
+
+    }
 
     @GetMapping("detailView")
     public ModelAndView detailView(Model model, String subId, String lastUrl, Boolean layer, String queryYear, Boolean isCt) {

+ 3 - 0
projects/src/main/java/com/rtrh/projects/web/controller/subject/api/SubInfoApiController.java

@@ -6,6 +6,7 @@ import java.util.stream.Collectors;
 
 import cn.afterturn.easypoi.excel.ExcelImportUtil;
 import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.lang.Assert;
 import com.rtrh.common.util.Identities;
 import com.rtrh.projects.modules.projects.dao.*;
 import com.rtrh.projects.modules.projects.enums.StatusEnum;
@@ -1222,6 +1223,8 @@ public class SubInfoApiController extends BaseController {
     public Message moveDb(@RequestBody MoveDbParamVo vo) {
         Message message = new Message();
         try {
+            Assert.notBlank(vo.getId(), "项目ID不能为空");
+            Assert.notBlank(vo.getStatus(), "状态不能为空");
             boolean isSuccess = subInfoService.moveDb(vo);
             message.add(isSuccess ? "移入成功" : "移入失败");
         } catch (Exception e) {

+ 1 - 1
projects/src/main/webapp/vmodules/leftMenu.jsp

@@ -94,7 +94,7 @@
                             }
                         },
                         {
-                            txt: '竣工项目库',
+                            txt: '投产项目库',
                             code: '403',
                             url: 'subject/subInfo/projTz?type=4',
                             before: function () {

+ 7 - 7
projects/src/main/webapp/vmodules/subject/subInfo/editSubInfo.jsp

@@ -150,7 +150,7 @@
                             <div class="layui-form-item">
                                 <label class="layui-form-label required">建设性质</label>
                                 <div class="layui-input-block">
-                                    <select lay-verify="required" lay-filter="status" v-model="subInfo.status">
+                                    <select lay-verify="required" v-model="subInfo.status" lay-filter="status" disabled>
                                         <option value="">请选择</option>
                                         <c:forEach items="${JSXZ}" var="js">
                                             <option value="${js.code }">${js.title }</option>
@@ -402,7 +402,7 @@
                     <div class="layui-row">
                         <div class="layui-col-xs12 layui-col-sm12">
                             <div class="layui-form-item">
-                                <label class="layui-form-label required"
+                                <label class="layui-form-label"
                                 >项目进展情况</label>
                                 <div class="layui-input-block">
                                     <textarea required lay-verify="required" autocomplete="off" class="layui-textarea"
@@ -441,7 +441,7 @@
                     <div class="layui-row">
                         <div class="layui-col-xs6 layui-col-sm6 layui-col-md4">
                             <div class="layui-form-item">
-                                <label class="layui-form-label required">状态</label>
+                                <label class="layui-form-label">状态</label>
                                 <div class="layui-input-block">
                                     <select v-model="subInfo.cbStatus" lay-filter="cbStatus" lay-verify="required">
                                         <option value="">请选择</option>
@@ -458,7 +458,7 @@
                     <div class="layui-row">
                         <div class="layui-col-xs6 layui-col-sm6 layui-col-md4">
                             <div class="layui-form-item">
-                                <label class="layui-form-label required">签约日期</label>
+                                <label class="layui-form-label">签约日期</label>
                                 <div class="layui-input-block">
                                     <input type="text" id=qyDate readonly="readonly" required lay-verify="required"
                                            placeholder="请输入" autocomplete="off" class="layui-input"
@@ -470,7 +470,7 @@
                     <div class="layui-row">
                         <div class="layui-col-xs6 layui-col-sm6 layui-col-md4">
                             <div class="layui-form-item">
-                                <label class="layui-form-label required">储备转新建周期</label>
+                                <label class="layui-form-label">储备转新建周期</label>
                                 <div class="layui-input-block">
                                     <input type="number" name="cbNum" id="cbNum" placeholder="请输入"
                                            autocomplete="off" required lay-verify="required" class="layui-input"
@@ -482,7 +482,7 @@
                     <div class="layui-row">
                         <div class="layui-col-xs6 layui-col-sm6 layui-col-md4">
                             <div class="layui-form-item">
-                                <label class="layui-form-label required">新建转在建周期</label>
+                                <label class="layui-form-label">新建转在建周期</label>
                                 <div class="layui-input-block">
                                     <input type="number" name="xjNum" id="xjNum" placeholder="请输入"
                                            autocomplete="off" required lay-verify="required" class="layui-input"
@@ -494,7 +494,7 @@
                     <div class="layui-row">
                         <div class="layui-col-xs6 layui-col-sm6 layui-col-md4">
                             <div class="layui-form-item">
-                                <label class="layui-form-label required">在建转投产周期</label>
+                                <label class="layui-form-label">在建转投产周期</label>
                                 <div class="layui-input-block">
                                     <input type="number" name="zjNum" id="zjNum" placeholder="请输入"
                                            autocomplete="off" required lay-verify="required" class="layui-input"

+ 7 - 6
projects/src/main/webapp/vmodules/subject/subInfo/tz/cb.jsp

@@ -194,7 +194,7 @@
                     <label class="juli" onclick="levelList('abcs','A类','A')">
                         储备项目总数
                         <span class="info-icon" title="A类项目:成熟类项目,可研或初设已编制并完成初审,达到项目等资金的进度">?</span>
-                        <span class="lanse-first">{{beginRate.cbNum}}</span>
+                        <span class="lanse-first">{{beginRate.num}}</span>
                     </label>
                     <label class="juli" onclick="levelList('abcs','A类','A')">
                         A类项目数
@@ -611,8 +611,8 @@
             pageSize: 10,
             showExport: false,
             moveDbParam:{
-                moveStatus: "",
-                moveId: ""
+                status: "",
+                id: ""
             }
         },
         mounted: function () {
@@ -624,6 +624,7 @@
             },
             confirmMove: function () {
                 let param = this.moveDbParam
+                console.log(param,"==============")
                 App.postJson("/api/subject/subInfo/moveDb",param, (res)=>{
                     App.msg.success(res.msg);
                 })
@@ -632,7 +633,7 @@
             init: function () {
                 let self = this;
                 layui.form.on("select(moveStatus)", function (data) {
-                    self.moveStatus = data.value;
+                    self.moveDbParam.status = data.value;
                 });
 
                 App.postJson("/api/dict/query/index", {}, function (res) {
@@ -1037,8 +1038,8 @@
             },
 
             move (obj) {
-                this.moveDbParam.moveId = obj.data.id
-                this.moveDbParam.moveStatus = obj.data.cbStatus
+                this.moveDbParam.id = obj.data.id
+                this.moveDbParam.status = obj.data.cbStatus
                 layer.open({
                     type: 1,
                     title: '标题',

+ 74 - 56
projects/src/main/webapp/vmodules/subject/subInfo/tz/end.jsp

@@ -862,68 +862,86 @@
                 param.orderType = this.sort.type || null;
                 ;
 
-                App.postJson("/api/subInfo/query/all", param, function (res) {
+                // 表格分页数据
+                param.status = 9;
+                App.postJson("/api/subInfo/query/queryPage", param, function (res) {
                     self.dataList = res.rows;
+                    console.log(res.rows,"============")
                     self.loadPage(res.total);
                     self.loadTable();
-                    var ids = res.rows.map(function(row) {
-                        return row.id;  // 假设每个 row 中有一个 id 属性
-                    });
-                    if (ids.length > 0) {
-                        // 发送请求获取额外数据
-                        App.postJson("/api/subInfo/query/getSubCompletedPicBySubId", ids, function(res) {
-                            if (res.success) {
-                                // 处理返回的额外数据
-                                console.log('额外数据:', res.rows);
-                                // 根据需要处理 `res.data`
-                                self.dataList.forEach(function (project) {
-                                    // 查找该项目的验收报告文件信息(按 subId 匹配)
-                                    var reports = res.rows.filter(function (report) {
-                                        return report.subId === project.id;  // 通过 subId 和 id 进行匹配
-                                    });
-
-                                    if (reports.length > 0) {
-                                        // 将所有相关的验收报告文件信息绑定到该项目
-                                        project.acceptanceReports = reports.map(function (report) {
-                                            return {
-                                                picName: report.picName,  // 报告文件名
-                                                picAddre: report.picAddre   // 报告地址
-                                            };
-                                        });
-                                    } else {
-                                        project.acceptanceReports = [];  // 如果没有匹配的报告文件,设为空数组
-                                    }
-                                });
-                            } else {
-                                console.error('获取额外数据失败');
-                            }
-                        });
-                    }
                 });
-                App.postJson("/api/subInfo/query/beginRate", param, function (res) {
+
+                // 统计数据
+                App.postJson("/api/subInfo/query/statistics", param, function (res) {
                     if (res.success) {
                         self.beginRate = res.data;
-                        self.endData=res.data.total;
-                        self.beginRate.hyflList = self.beginRate.hyflData.split(";");
-                        self.beginRate.tzlxList = self.beginRate.tzlxData.split(";");
-                        self.beginRate.jsddList = self.beginRate.jsddData.split(";");
-                        if (res.data.total != 0) {
-                            self.beginRate.beginRate = (res.data.beginNum * 100 / res.data.total).toFixed(2);
-                        } else {
-                            self.beginRate.beginRate = 0;
-                        }
-                        if (res.data.yearAmt != 0) {
-                            self.beginRate.amtRate = (res.data.yearAmtSj * 100 / res.data.yearAmt).toFixed(2);
-                        } else if (res.data.yearAmtSj != 0) {
-                            self.beginRate.amtRate = 100;
-                        } else {
-                            self.beginRate.amtRate = 0;
-                        }
-                    } else {
-                        self.beginRate.beginRate = 0;
-                        self.beginRate.amtRate = 0;
+                        self.beginRate.hyflList = self.beginRate.hyflData;
+                        self.beginRate.jsddList = self.beginRate.jsddData;
                     }
                 });
+
+                // App.postJson("/api/subInfo/query/all", param, function (res) {
+                //     self.dataList = res.rows;
+                //     self.loadPage(res.total);
+                //     self.loadTable();
+                //     var ids = res.rows.map(function(row) {
+                //         return row.id;  // 假设每个 row 中有一个 id 属性
+                //     });
+                //     if (ids.length > 0) {
+                //         // 发送请求获取额外数据
+                //         App.postJson("/api/subInfo/query/getSubCompletedPicBySubId", ids, function(res) {
+                //             if (res.success) {
+                //                 // 处理返回的额外数据
+                //                 console.log('额外数据:', res.rows);
+                //                 // 根据需要处理 `res.data`
+                //                 self.dataList.forEach(function (project) {
+                //                     // 查找该项目的验收报告文件信息(按 subId 匹配)
+                //                     var reports = res.rows.filter(function (report) {
+                //                         return report.subId === project.id;  // 通过 subId 和 id 进行匹配
+                //                     });
+                //
+                //                     if (reports.length > 0) {
+                //                         // 将所有相关的验收报告文件信息绑定到该项目
+                //                         project.acceptanceReports = reports.map(function (report) {
+                //                             return {
+                //                                 picName: report.picName,  // 报告文件名
+                //                                 picAddre: report.picAddre   // 报告地址
+                //                             };
+                //                         });
+                //                     } else {
+                //                         project.acceptanceReports = [];  // 如果没有匹配的报告文件,设为空数组
+                //                     }
+                //                 });
+                //             } else {
+                //                 console.error('获取额外数据失败');
+                //             }
+                //         });
+                //     }
+                // });
+                // App.postJson("/api/subInfo/query/beginRate", param, function (res) {
+                //     if (res.success) {
+                //         self.beginRate = res.data;
+                //         self.endData=res.data.total;
+                //         self.beginRate.hyflList = self.beginRate.hyflData.split(";");
+                //         self.beginRate.tzlxList = self.beginRate.tzlxData.split(";");
+                //         self.beginRate.jsddList = self.beginRate.jsddData.split(";");
+                //         if (res.data.total != 0) {
+                //             self.beginRate.beginRate = (res.data.beginNum * 100 / res.data.total).toFixed(2);
+                //         } else {
+                //             self.beginRate.beginRate = 0;
+                //         }
+                //         if (res.data.yearAmt != 0) {
+                //             self.beginRate.amtRate = (res.data.yearAmtSj * 100 / res.data.yearAmt).toFixed(2);
+                //         } else if (res.data.yearAmtSj != 0) {
+                //             self.beginRate.amtRate = 100;
+                //         } else {
+                //             self.beginRate.amtRate = 0;
+                //         }
+                //     } else {
+                //         self.beginRate.beginRate = 0;
+                //         self.beginRate.amtRate = 0;
+                //     }
+                // });
             },
             loadTable: function () {
 
@@ -969,7 +987,7 @@
 <%--                        // {field: 'score', title: '得分', width: 70, templet: '#scoreTem'},--%>
 <%--                        {field: 'assessReason', title: '项目后评价', minWidth: 150, templet: '#assessReasonTem'},--%>
 <%--                        </c:if>--%>
-                        {field: 'subjectId', title: '项目所在地', minWidth: 150},
+                        {field: 'subjectName', title: '项目所在地', minWidth: 150},
                         {field: 'content', title: '项目基本情况', minWidth: 150},
                         {field: 'rgDate', title: '升规入统时间', minWidth: 150},
                         {field: 'progress', title: '进展情况', minWidth: 150},
@@ -1213,7 +1231,7 @@
                     type: 2,
                     title: '',
                     area: ['1000px', '800px'],
-                    content: App.getUrl("/subject/subInfo/detailView?layer=true&subId=" + obj.data.id + "&lastUrl=" + window.location.href),
+                    content: App.getUrl("/subject/subInfo/detailView2?layer=true&subId=" + obj.data.id + "&lastUrl=" + window.location.href),
                 });
                 layui.layer.full(index);
             },

+ 67 - 51
projects/src/main/webapp/vmodules/subject/subInfo/tz/main.jsp

@@ -329,16 +329,16 @@
                            v-for="(item, index) in beginRate.tzlxList" :key="index">
                         {{item.split(",")[1]}}<span class="lanse-first">{{item.split(",")[2]}}</span>
                     </label>
-                    <label class="juli" @click="levelList('subjects',item.split(',')[1],item.split(',')[0])"
+                    <label class="juli" @click="levelList('subjects',item.name,item.code)"
                            v-for="(item, index) in beginRate.jsddList" :key="index">
-                        {{item.split(",")[1]}}<span class="lanse-first">{{item.split(",")[2]}}</span>
+                        {{item.name}}<span class="lanse-first">{{item.num}}</span>
                     </label>
                 </div>
                 <div style="margin-bottom: 3px">
                     <label class="juli"
                            @click="levelList('indusKinds',item.split(',')[1]?item.split(',')[1]:item.split(',')[0],item.split(',')[3])"
                            v-for="(item, index) in beginRate.hyflList" :key="index">
-                        {{item.split(",")[1]?item.split(",")[1]:item.split(",")[0]}}<span class="lanse-first">{{item.split(",")[2]}}</span>
+                        {{item.name}}<span class="lanse-first">{{item.num}}</span>
                     </label>
                 </div>
             </div>
@@ -666,7 +666,7 @@
 
 <script type="text/html" id="date">
     <div title="">
-        <div class="line"><span class="shense">{{d.tcDate}}</span>
+        <div class="line"><span class="shense">{{d.tcDate?d.tcDate:"--"}}</span>
 
         </div>
 <%--        <div class="line"><span class="qianse">计划开工:</span><span class="shense">{{d.beginDate}}</span>--%>
@@ -913,58 +913,74 @@
                 param.orderBy = this.sort.field;
                 param.orderType = this.sort.type || null;
 
-                App.postJson("/api/subInfo/query/all", param, function (res) {
+                // 表格分页数据
+                param.status = 3;
+                App.postJson("/api/subInfo/query/queryPage", param, function (res) {
                     self.dataList = res.rows;
-                    console.log(res.rows)
                     self.loadPage(res.total);
-                    self.loadTable(param);
+                    self.loadTable();
                 });
 
-                App.postJson("/api/subInfo/query/beginRate", param, function (res) {
+                // App.postJson("/api/subInfo/query/all", param, function (res) {
+                //     self.dataList = res.rows;
+                //     console.log(res.rows)
+                //     self.loadPage(res.total);
+                //     self.loadTable(param);
+                // });
+
+                // 统计数据
+                App.postJson("/api/subInfo/query/statistics", param, function (res) {
                     if (res.success) {
                         self.beginRate = res.data;
-                        res.data.yearAmtSj = (res.data.yearAmtSj ? res.data.yearAmtSj : 0);
-                        res.data.yearAmtAssign = (res.data.yearAmtAssign ? res.data.yearAmtAssign : 0);
-                        res.data.yearAmt = (res.data.yearAmt ? res.data.yearAmt : 0);
-                        self.beginRate.yearAmtSj = res.data.monthAmtSj
-                        self.beginRate.yearAmtAssign = res.data.monthAmtAssign
-                        self.beginRate.yearAmt = res.data.monthAmt
-                        self.beginRate.hyflList = self.beginRate.hyflData.split(";");
-                        self.beginRate.tzlxList = self.beginRate.tzlxData.split(";");
-                        self.beginRate.jsddList = self.beginRate.jsddData.split(";");
-                        //  alert(JSON.stringify( self.beginRate.hyflList));
-                        if (res.data.total != 0) {
-                            self.beginRate.beginRate = (res.data.beginNum * 100 / res.data.total).toFixed(2);
-                            self.beginRate.endRate = (res.data.endNum * 100 / res.data.total).toFixed(2);
-                        } else {
-                            self.beginRate.beginRate = 0;
-                            self.beginRate.endRate = 0;
-                        }
-                        if (res.data.yearAmt != 0) {
-                            self.beginRate.amtRate = (res.data.yearAmtSj * 100 / res.data.yearAmt).toFixed(2);
-                        } else if (res.data.yearAmtSj != 0) {
-                            self.beginRate.amtRate = 100;
-                        } else {
-                            self.beginRate.amtRate = 0;
-                        }
-                        if (res.data.total != 0) {
-                            self.beginRate.noRate = (res.data.noNum * 100 / res.data.total).toFixed(2) + '%';
-                            self.beginRate.beginRate = (res.data.beginNum * 100 / res.data.total).toFixed(2) + '%';
-                            self.beginRate.endRate = (res.data.endNum * 100 / res.data.total).toFixed(2) + '%';
-                            self.beginRate.stopRate = (res.data.stopNum * 100 / res.data.total).toFixed(2) + '%';
-                        } else {
-                            self.beginRate.noRate = "0%";
-                            self.beginRate.beginRate = "0%";
-                            self.beginRate.endRate = "0%";
-                            self.beginRate.stopRate = "0%";
-                        }
-
-                    } else {
-                        self.beginRate.beginRate = 0;
-                        self.beginRate.amtRate = 0;
-                        self.beginRate.endRate = 0;
+                        self.beginRate.hyflList = self.beginRate.hyflData;
+                        self.beginRate.jsddList = self.beginRate.jsddData;
                     }
                 });
+                // App.postJson("/api/subInfo/query/beginRate", param, function (res) {
+                //     if (res.success) {
+                //         self.beginRate = res.data;
+                //         res.data.yearAmtSj = (res.data.yearAmtSj ? res.data.yearAmtSj : 0);
+                //         res.data.yearAmtAssign = (res.data.yearAmtAssign ? res.data.yearAmtAssign : 0);
+                //         res.data.yearAmt = (res.data.yearAmt ? res.data.yearAmt : 0);
+                //         self.beginRate.yearAmtSj = res.data.monthAmtSj
+                //         self.beginRate.yearAmtAssign = res.data.monthAmtAssign
+                //         self.beginRate.yearAmt = res.data.monthAmt
+                //         self.beginRate.hyflList = self.beginRate.hyflData.split(";");
+                //         self.beginRate.tzlxList = self.beginRate.tzlxData.split(";");
+                //         self.beginRate.jsddList = self.beginRate.jsddData.split(";");
+                //         //  alert(JSON.stringify( self.beginRate.hyflList));
+                //         if (res.data.total != 0) {
+                //             self.beginRate.beginRate = (res.data.beginNum * 100 / res.data.total).toFixed(2);
+                //             self.beginRate.endRate = (res.data.endNum * 100 / res.data.total).toFixed(2);
+                //         } else {
+                //             self.beginRate.beginRate = 0;
+                //             self.beginRate.endRate = 0;
+                //         }
+                //         if (res.data.yearAmt != 0) {
+                //             self.beginRate.amtRate = (res.data.yearAmtSj * 100 / res.data.yearAmt).toFixed(2);
+                //         } else if (res.data.yearAmtSj != 0) {
+                //             self.beginRate.amtRate = 100;
+                //         } else {
+                //             self.beginRate.amtRate = 0;
+                //         }
+                //         if (res.data.total != 0) {
+                //             self.beginRate.noRate = (res.data.noNum * 100 / res.data.total).toFixed(2) + '%';
+                //             self.beginRate.beginRate = (res.data.beginNum * 100 / res.data.total).toFixed(2) + '%';
+                //             self.beginRate.endRate = (res.data.endNum * 100 / res.data.total).toFixed(2) + '%';
+                //             self.beginRate.stopRate = (res.data.stopNum * 100 / res.data.total).toFixed(2) + '%';
+                //         } else {
+                //             self.beginRate.noRate = "0%";
+                //             self.beginRate.beginRate = "0%";
+                //             self.beginRate.endRate = "0%";
+                //             self.beginRate.stopRate = "0%";
+                //         }
+                //
+                //     } else {
+                //         self.beginRate.beginRate = 0;
+                //         self.beginRate.amtRate = 0;
+                //         self.beginRate.endRate = 0;
+                //     }
+                // });
             },
             levelList: function (field, title, val) {
                 //详情
@@ -981,7 +997,7 @@
             loadTable: function (params) {
                 for (var i = 0; i < this.dataList.length; i++) {
                     var tem = this.dataList[i];
-                    tem.queryYear = params.year;
+                    // tem.queryYear = params.year;
                     switch (tem.status) {
                         case '0':
                             tem.statusName = '暂存';
@@ -1062,7 +1078,7 @@
                         // {field: 'mainName', title: '日常责任监管单位', minWidth: 100},
                         // {field: 'unitName', title: '项目单位', minWidth: 110},
                         // // { field: 'openLight', title: '开工红黄灯', minWidth: 150, templet: '#openLight' },
-                        {title: '操作', width: 180, toolbar: '#toolBar', fixed: 'right',},
+                        {title: '操作', width: 180, toolbar: '#toolBar', fixed: 'right'},
                     ]],
                     fixed: true,
                     height: window.screen.availHeight - 470,
@@ -1255,7 +1271,7 @@
                     type: 2,
                     title: "",
                     area: ['1000px', '800px'],
-                    content: App.getUrl("/subject/subInfo/detailView?layer=true&subId=" + obj.data.id + "&lastUrl=" + window.location.href + "&queryYear=" + obj.data.queryYear),
+                    content: App.getUrl("/subject/subInfo/detailView2?layer=true&subId=" + obj.data.id + "&lastUrl=" + window.location.href + "&queryYear=" + obj.data.queryYear),
                 });
                 layui.layer.full(index);
             },

+ 102 - 44
projects/src/main/webapp/vmodules/subject/subInfo/tz/new.jsp

@@ -417,7 +417,7 @@
             <div class="layui-row">
                 <div style="display: flex">
                     <label class="juli">
-                        新建项目总数<span class="lanse-first">{{beginRate.total}}</span>
+                        新建项目总数<span class="lanse-first">{{beginRate.cbNum}}</span>
                         <div class="progress-div">
                             <div class="layui-progress">
                                 <div class="layui-progress-bar"></div>
@@ -517,11 +517,11 @@
 
                     <label @click="levelList('kindNatures',item.split(',')[1],item.split(',')[0])" class="juli"
                            v-for="(item, index) in beginRate.tzlxList" :key="index">
-                        {{item.split(",")[1]}}<span class="lanse-first">{{item.split(",")[2]}}</span>
+                        {{item.name}}<span class="lanse-first">{{item.num}}</span>
                     </label>
                     <label class="juli" @click="levelList('subjects',item.split(',')[1],item.split(',')[0])"
                            v-for="(item, index) in beginRate.jsddList" :key="index">
-                        {{item.split(",")[1]}}<span class="lanse-first">{{item.split(",")[2]}}</span>
+                        {{item.name}}<span class="lanse-first">{{item.num}}</span>
                     </label>
                 </div>
                 <div style="margin-bottom: 3px">
@@ -852,12 +852,61 @@
             light: null,
             sort: {field: "amtTotal", type: ""},
             pageSize: 10,
-            showExport: false
+            showExport: false,
+            moveDbParam:{
+                id: "",
+                status: ""
+            }
         },
         mounted: function () {
             this.init()
         },
         methods: {
+            closeAllLayers() {
+                layui.layer.closeAll();
+            },
+            confirmMove: function () {
+                let param = this.moveDbParam
+                App.postJson("/api/subject/subInfo/moveDb",param, (res)=>{
+                    App.msg.success(res.msg);
+                })
+                this.closeAllLayers();
+            },
+            move (obj) {
+                this.moveDbParam.id = obj.data.id
+                this.moveDbParam.status = obj.data.cbStatus
+                layer.open({
+                    type: 1,
+                    title: '标题',
+                    content: '<div class="layui-form" style="padding: 20px;">' +
+                        '<div class="layui-form-item">' +
+                        '<label class="layui-form-label">当前状态:</label>' +
+                        '<div class="layui-input-block">' +
+                        '<input type="text" name="currentState" value="储备库" disabled class="layui-input">' +
+                        '</div>' +
+                        '</div>' +
+                        '<div class="layui-form-item">' +
+                        '<label class="layui-form-label">移入到:</label>' +
+                        '<div class="layui-input-block">' +
+                        '<select v-model="subInfo.status" lay-filter="moveStatus" lay-verify="required">' +
+                        '<option value="">请选择</option>' +
+                        '<option value="2">新建</option>' +
+                        '<option value="3">在建</option>' +
+                        '<option value="9">投产</option>' +
+                        '</select>' +
+                        '</div>' +
+                        '</div>' +
+                        '<div class="layui-form-item" style="text-align: right;">' +
+                        '<button type="button" class="layui-btn layui-btn-primary layui-border" onclick="vm.closeAllLayers()">取消</button>' +
+                        '<button type="button" class="layui-btn moveConfirm" onclick="vm.confirmMove()">确认移入</button>' +
+                        '</div>' +
+                        '</div>',
+                    area: ['350px', '300px'],
+                    success: function(layero, index){
+                        layui.form.render();
+                    }
+                });
+            },
             init: function () {
                 this.winH = document.body.clientHeight;
                 var nowdate = new Date();
@@ -1078,52 +1127,61 @@
                     self.loadPage(res.total);
                     self.loadTable();
                 });
+                App.postJson("/api/subInfo/query/statistics", param, function (res) {
+                    if (res.success) {
+                        console.log(res.data,"========")
+                        self.beginRate = res.data;
+                        self.beginRate.hyflList = self.beginRate.hyflData;
+                        self.beginRate.jsddList = self.beginRate.jsddData;
+                    }
+                })
+
                 // App.postJson("/api/subInfo/query/all", param, function (res) {
                 //     self.dataList = res.rows;
                 //     self.loadPage(res.total);
                 //     self.loadTable();
                 // });
 
-                App.postJson("/api/subInfo/query/beginRate", param, function (res) {
-                    if (res.success) {
-                        self.beginRate = res.data;
-                        self.beginRate.hyflList = self.beginRate.hyflData.split(";");
-                        self.beginRate.tzlxList = self.beginRate.tzlxData.split(";");
-                        self.beginRate.jsddList = self.beginRate.jsddData.split(";");
-                        if (res.data.total != 0) {
-                            self.beginRate.beginRate = (res.data.beginNum * 100 / res.data.total).toFixed(2);
-                        } else {
-                            self.beginRate.beginRate = 0;
-                        }
-                        if (res.data.yearAmt != 0) {
-                            self.beginRate.amtRate = (res.data.yearAmtSj * 100 / res.data.yearAmt).toFixed(2);
-                        } else if (res.data.yearAmtSj != 0) {
-                            self.beginRate.amtRate = 100;
-                        } else {
-                            self.beginRate.amtRate = 0;
-                        }
-                        if (res.data.total != 0) {
-                            self.beginRate.noRate = (res.data.noNum * 100 / res.data.total).toFixed(2) + '%';
-                            self.beginRate.beginRate = (res.data.beginNum * 100 / res.data.total).toFixed(2) + '%';
-                            self.beginRate.endRate = (res.data.endNum * 100 / res.data.total).toFixed(2) + '%';
-                            self.beginRate.stopRate = (res.data.stopNum * 100 / res.data.total).toFixed(2) + '%';
-                            self.beginRate.aRate = (res.data.aNum * 100 / res.data.total).toFixed(2) + '%';
-                            self.beginRate.bRate = (res.data.bNum * 100 / res.data.total).toFixed(2) + '%';
-                            self.beginRate.cRate = (res.data.cNum * 100 / res.data.total).toFixed(2) + '%';
-                        } else {
-                            self.beginRate.noRate = "0%";
-                            self.beginRate.beginRate = "0%";
-                            self.beginRate.endRate = "0%";
-                            self.beginRate.stopRate = "0%";
-                            self.beginRate.aRate = "0%";
-                            self.beginRate.bRate = "0%";
-                            self.beginRate.cRate = "0%";
-                        }
-                    } else {
-                        self.beginRate.beginRate = 0;
-                        self.beginRate.amtRate = 0;
-                    }
-                });
+                // App.postJson("/api/subInfo/query/beginRate", param, function (res) {
+                //     if (res.success) {
+                //         self.beginRate = res.data;
+                //         self.beginRate.hyflList = self.beginRate.hyflData.split(";");
+                //         self.beginRate.tzlxList = self.beginRate.tzlxData.split(";");
+                //         self.beginRate.jsddList = self.beginRate.jsddData.split(";");
+                //         if (res.data.total != 0) {
+                //             self.beginRate.beginRate = (res.data.beginNum * 100 / res.data.total).toFixed(2);
+                //         } else {
+                //             self.beginRate.beginRate = 0;
+                //         }
+                //         if (res.data.yearAmt != 0) {
+                //             self.beginRate.amtRate = (res.data.yearAmtSj * 100 / res.data.yearAmt).toFixed(2);
+                //         } else if (res.data.yearAmtSj != 0) {
+                //             self.beginRate.amtRate = 100;
+                //         } else {
+                //             self.beginRate.amtRate = 0;
+                //         }
+                //         if (res.data.total != 0) {
+                //             self.beginRate.noRate = (res.data.noNum * 100 / res.data.total).toFixed(2) + '%';
+                //             self.beginRate.beginRate = (res.data.beginNum * 100 / res.data.total).toFixed(2) + '%';
+                //             self.beginRate.endRate = (res.data.endNum * 100 / res.data.total).toFixed(2) + '%';
+                //             self.beginRate.stopRate = (res.data.stopNum * 100 / res.data.total).toFixed(2) + '%';
+                //             self.beginRate.aRate = (res.data.aNum * 100 / res.data.total).toFixed(2) + '%';
+                //             self.beginRate.bRate = (res.data.bNum * 100 / res.data.total).toFixed(2) + '%';
+                //             self.beginRate.cRate = (res.data.cNum * 100 / res.data.total).toFixed(2) + '%';
+                //         } else {
+                //             self.beginRate.noRate = "0%";
+                //             self.beginRate.beginRate = "0%";
+                //             self.beginRate.endRate = "0%";
+                //             self.beginRate.stopRate = "0%";
+                //             self.beginRate.aRate = "0%";
+                //             self.beginRate.bRate = "0%";
+                //             self.beginRate.cRate = "0%";
+                //         }
+                //     } else {
+                //         self.beginRate.beginRate = 0;
+                //         self.beginRate.amtRate = 0;
+                //     }
+                // });
             },
             loadTable: function () {
                 for (var i = 0; i < this.dataList.length; i++) {