JiangPengLi 4 сар өмнө
parent
commit
7221214f95

+ 17 - 2
projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInfoMapper.xml

@@ -170,6 +170,9 @@
             <if test="vo.subName!=null and vo.subName!=''">
                 and sub_name like CONCAT('%', #{vo.subName}, '%')
             </if>
+            <if test="vo.subjects!=null and vo.subjects!=''">
+                and subject_id = #{vo.subjects}
+            </if>
             <if test="vo.subjectId!=null and vo.subjectId!=''">
                 and subject_id = #{vo.subjectId}
             </if>
@@ -182,12 +185,24 @@
             <if test="vo.endAmt!=null and vo.endAmt!=''">
                 and amt_total &lt;= #{vo.endAmt}
             </if>
-            <if test="vo.beginDate!=null and vo.beginDate!=''">
+            <if test="vo.status=='2' and vo.beginDate!=null and vo.beginDate!=''">
                 and begin_date >= #{vo.beginDate}
             </if>
-            <if test="vo.endDate!=null and vo.endDate!=''">
+            <if test="vo.status=='2' and vo.endDate!=null and vo.endDate!=''">
                 and begin_date &lt;= #{vo.endDate}
             </if>
+            <if test="vo.status=='3' and vo.beginDate!=null and vo.beginDate!=''">
+                and end_date >= #{vo.beginDate}
+            </if>
+            <if test="vo.status=='3' and vo.endDate!=null and vo.endDate!=''">
+                and end_date &lt;= #{vo.endDate}
+            </if>
+            <if test="vo.status=='9' and vo.beginDate!=null and vo.beginDate!=''">
+                and rg_date >= #{vo.beginDate}
+            </if>
+            <if test="vo.status=='9' and vo.endDate!=null and vo.endDate!=''">
+                and rg_date &lt;= #{vo.endDate}
+            </if>
             <if test="vo.sbdw!=null and vo.sbdw!=''">
                 and unit_desc = #{vo.sbdw}
             </if>

+ 2 - 1
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubInfoQueryServiceImpl.java

@@ -178,10 +178,11 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
         if (StringUtils.isNotBlank(queryVO.getEndAmt())) {
             queryVO.setEndAmt(new BigDecimal(queryVO.getEndAmt()).multiply(new BigDecimal("10000")).toString());
         }
-        List<SubInfoGxj> data = subInfoMapper.queryPage(queryVO);
 
+        List<SubInfoGxj> data = subInfoMapper.queryPage(queryVO);
         PageInfo<SubInfoGxj> pageInfo = new PageInfo<>(data);
         page.setList(data);
+
         List<TSystable> byKind = tSysTableService.getByKind(SysTableKind.JSDD);
         if (CollectionUtil.isNotEmpty(data)) {
             for (SubInfoGxj e : data) {

+ 3 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/SubInfoQueryTzVO.java

@@ -350,4 +350,7 @@ public class SubInfoQueryTzVO {
 
 	//建设地点
 	private   String  subjects;
+	// 年度投资查询
+	private   String  yearMixAmt;
+	private   String  yearMaxAmt;
 }

+ 2 - 4
projects/src/main/webapp/vmodules/subject/subInfo/tz/cb.jsp

@@ -215,14 +215,14 @@
                 </div>
                 <div style="display: flex;margin-bottom: 3px">
                     <label class="juli"
-                           @click="levelList('subjects',item.split(',')[1],item.split(',')[0])"
+                           @click="levelList('subjects',item.name,item.code)"
                            v-for="(item, index) in beginRate.jsddList" :key="index">
                         {{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])"
+                           @click="levelList('indusKinds',item.name?item.name:item.code,item.split(',')[3])"
                            v-for="(item, index) in beginRate.hyflList" :key="index">
                         {{item.name?item.name:item.code}}
                         <span class="lanse-first">{{item.num}}</span>
@@ -548,7 +548,6 @@
             init: function () {
                 let self = this;
                 layui.form.on("select(moveStatus)", function (data) {
-                    console.log(data.value,"===========")
                     self.moveDbParam.status = data.value;
                 });
 
@@ -745,7 +744,6 @@
             },
             getSearchParams: function () {
                 var param = layui.form.getValue("searchForm");
-                console.log(param)
                 if (param.rangeDate) {
                     param.beginDate = param.rangeDate.split(" ~ ")[0];
                     param.endDate = param.rangeDate.split(" ~ ")[1];

+ 7 - 15
projects/src/main/webapp/vmodules/subject/subInfo/tz/end.jsp

@@ -200,13 +200,9 @@
                                 <div class="layui-col-xs3 layui-col-sm3 layui-col-md3 hiddenParam">
                                     <div class="layui-form-item">
                                         <label class="layui-form-label required label-longers" style="width: 100px;">升规入统时间</label>
-                                        <div class="layui-input-block time_box">
-                                            <input type="number" name="startAmt" placeholder="请输入最小金额"
-                                                   autocomplete="off"
-                                                   class="layui-input">
-                                            <span class="split_txt">至</span>
-                                            <input type="number" name="endAmt" placeholder="请输入最大金额" autocomplete="off"
-                                                   class="layui-input">
+                                        <div class="layui-input-block time_box" style="margin-left:120px">
+                                            <input type="text" id="startTime" name="rangeDate" placeholder="请选择时间段"
+                                                   autocomplete="off" class="layui-input" style="margin-left: 20px;">
                                         </div>
                                     </div>
                                 </div>
@@ -749,7 +745,7 @@
                     content: '<div class="layui-form" style="padding: 20px;">' +
                         '<div class="layui-form-item">' +
                             '<label class="layui-form-label">入规日期:</label>' +
-                            '<input class="layui-form-label" type="date" id="rgDate">' +
+                            '<input class="layui-form-input" type="text" id="rgDate" placeholder="请选择入规日期">'+
                         '</div>' +
                         '<div class="layui-form-item" style="text-align: center;margin-top: 50px">' +
                             '<button type="button" class="layui-btn moveConfirm" onclick="vm.confirmMove()">确认</button>' +
@@ -758,17 +754,13 @@
                     '</div>',
                     area: ['350px', '300px'],
                     success: function(layero, index){
-                        layui.form.render();
+                        layui.laydate.render({
+                            elem: '#rgDate'
+                        });
                     }
                 });
             },
             init: function () {
-                layui.form.on("select(rgDate)", function (data) {
-                    console.log(data,data.value)
-                    console.log("=========")
-
-                    self.rgParam.rgDate = data.value;
-                });
                 this.winH = document.body.clientHeight;
                 var nowdate = new Date();
                 nowdate.setMonth(nowdate.getMonth() + 1);

+ 60 - 11
projects/src/main/webapp/vmodules/subject/subInfo/tz/main.jsp

@@ -163,13 +163,9 @@
                                 <div class="layui-col-xs3 layui-col-sm3 layui-col-md3 hiddenParam">
                                     <div class="layui-form-item">
                                         <label class="layui-form-label required label-longers" style="width: 100px;">建成投产时间</label>
-                                        <div class="layui-input-block time_box">
-                                            <input type="number" name="startAmt" placeholder="请输入最小金额"
-                                                   autocomplete="off"
-                                                   class="layui-input">
-                                            <span class="split_txt"> - </span>
-                                            <input type="number" name="endAmt" placeholder="请输入最大金额" autocomplete="off"
-                                                   class="layui-input">
+                                        <div class="layui-input-block time_box" style="margin-left:120px">
+                                            <input type="text" id="startTime" name="rangeDate" placeholder="请选择时间段"
+                                                   autocomplete="off" class="layui-input" style="margin-left: 20px;">
                                         </div>
                                     </div>
                                 </div>
@@ -177,11 +173,11 @@
                                     <div class="layui-form-item">
                                         <label class="layui-form-label required label-longers" style="width: 100px;">年度投资</label>
                                         <div class="layui-input-block time_box">
-                                            <input type="number" name="startAmt" placeholder="请输入最小金额"
+                                            <input type="number" name="yearMixAmt" placeholder="请输入最小金额"
                                                    autocomplete="off"
                                                    class="layui-input">
                                             <span class="split_txt"> - </span>
-                                            <input type="number" name="endAmt" placeholder="请输入最大金额" autocomplete="off"
+                                            <input type="number" name="yearMaxAmt" placeholder="请输入最大金额" autocomplete="off"
                                                    class="layui-input">
                                         </div>
                                     </div>
@@ -690,7 +686,7 @@
     </div>
 </script>
 <script>
-    new Vue({
+    let vm = new Vue({
         el: "#app",
         template: "#template",
         data: {
@@ -712,13 +708,66 @@
                          field: 'amtTotal',
                          type: null
                      },*/
-            showExport: false
+            showExport: false,
+            moveDbParam: {
+                id:null,
+                status:null
+            }
         },
         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 () {
+                let self = this;
+                layui.form.on("select(moveStatus)", function (data) {
+                    self.moveDbParam.status = data.value;
+                });
                 this.winH = document.body.clientHeight;
                 layui.laydate.render({
                     elem: '#startTime',

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

@@ -309,7 +309,7 @@
                            v-for="(item, index) in beginRate.tzlxList" :key="index">
                         {{item.name}}<span class="lanse-first">{{item.num}}</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.name}}<span class="lanse-first">{{item.num}}</span>
                     </label>

+ 57 - 40
projects/src/main/webapp/vmodules/subject/subInfo/tz/new_sum.jsp

@@ -478,18 +478,18 @@
 
                     <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">
                     <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?item.name:item.code}}<span class="lanse-first">{{item.num}}</span>
                     </label>
                 </div>
             </div>
@@ -1069,52 +1069,69 @@
                 param.orderBy = this.sort.field;
                 param.orderType = this.sort.type || "asc";
                 param = Object.assign(param, ${sumParams});
-                App.postJson("/api/subInfo/query/all", param, function (res) {
+
+                // 表格分页数据
+                param.status = 2;
+                App.postJson("/api/subInfo/query/queryPage", param, function (res) {
                     self.dataList = res.rows;
                     self.loadPage(res.total);
                     self.loadTable();
                 });
 
-                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.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;
+                        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;
+                //     }
+                // });
             },
             loadTable: function () {
                 for (var i = 0; i < this.dataList.length; i++) {