Bläddra i källkod

Merge remote-tracking branch 'origin/master'

梁世豪 11 månader sedan
förälder
incheckning
74e58a5ed2

+ 1 - 1
src/main/java/com/liang/ServletInitializer.java

@@ -9,5 +9,5 @@ public class ServletInitializer extends SpringBootServletInitializer {
9 9
     protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
10 10
         return application.sources(KYGKApplication.class);
11 11
     }
12
-
12
+    //提交1
13 13
 }

+ 2 - 2
src/main/java/com/liang/common/advice/ExceptionHandlerAdvice.java

@@ -39,8 +39,8 @@ public class ExceptionHandlerAdvice {
39 39
     @ExceptionHandler({CustomDivException.class})
40 40
     @ResponseBody
41 41
     public String customDivException(RuntimeException exception) {
42
-        return " <div class='grid-demo layui-bg-red'>" + exception.getMessage() +
43
-                "</div>";
42
+        return " <h1 class='grid-demo layui-bg-red'>" + exception.getMessage() +
43
+                "</h1>";
44 44
     }
45 45
 
46 46
     @ExceptionHandler({IllegalArgumentException.class})

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 247 - 238
src/main/java/com/liang/controller/StaBudgetapprovalController.java


+ 3 - 1
src/main/java/com/liang/dao/PrjAnnualbudgetdetailDao.java

@@ -96,7 +96,7 @@ public interface PrjAnnualbudgetdetailDao {
96 96
      */
97 97
     List<PrjAnnualbudgetdetail> getFysqBudgetList(Integer nys);
98 98
 
99
-    List<PrjAnnualbudgetdetail> getSubNode(Integer nys);
99
+    List<PrjAnnualbudgetdetail> getSubNode(@Param("nys") Integer nys, @Param("page") Integer page, @Param("limit") Integer limit, String mc);
100 100
 
101 101
     /**
102 102
      * 批量删除年度预算明细
@@ -125,5 +125,7 @@ public interface PrjAnnualbudgetdetailDao {
125 125
     BigDecimal selectXMZYS_SX(Integer rws);
126 126
 
127 127
     int updateRWSYS_SX(Integer rws);
128
+
129
+    Integer getSubNodeCount(@Param("nys") Integer nys, @Param("page") Integer page, @Param("limit") Integer limit);
128 130
 }
129 131
 

+ 8 - 0
src/main/java/com/liang/entity/StaPayapproval.java

@@ -78,7 +78,15 @@ public class StaPayapproval implements Serializable {
78 78
      * @return
79 79
      */
80 80
     private String sqmc;
81
+    private String bh;
81 82
 
83
+    public String getBh() {
84
+        return bh;
85
+    }
86
+
87
+    public void setBh(String bh) {
88
+        this.bh = bh;
89
+    }
82 90
 
83 91
     public Integer getId() {
84 92
         return id;

+ 3 - 5
src/main/java/com/liang/service/PrjAnnualbudgetdetailService.java

@@ -1,14 +1,11 @@
1 1
 package com.liang.service;
2 2
 
3
-import com.liang.entity.PrjAnnualbudget;
4 3
 import com.liang.entity.PrjAnnualbudgetdetail;
5
-import com.liang.entity.PrjBudget;
6
-import com.liang.entity.StaBudget;
4
+import org.apache.ibatis.annotations.Param;
7 5
 import org.springframework.data.domain.Page;
8 6
 import org.springframework.data.domain.PageRequest;
9 7
 
10 8
 import java.util.List;
11
-import java.util.Map;
12 9
 
13 10
 /**
14 11
  * 年度预算明细(PrjAnnualbudgetdetail)表服务接口
@@ -80,7 +77,7 @@ public interface PrjAnnualbudgetdetailService {
80 77
      */
81 78
     List<PrjAnnualbudgetdetail> getFysqBudgetList(Integer nys);
82 79
 
83
-    List<PrjAnnualbudgetdetail> getSubNode(Integer nys);
80
+    List<PrjAnnualbudgetdetail> getSubNode(Integer nys, Integer page, Integer limit, String mc);
84 81
 
85 82
     /**
86 83
      * 更新预算
@@ -91,4 +88,5 @@ public interface PrjAnnualbudgetdetailService {
91 88
     int updateBatch(List<PrjAnnualbudgetdetail> budgetDetails);
92 89
 
93 90
 
91
+    Integer getSubNodeCount(@Param("nys") Integer nys, @Param("page") Integer page, @Param("limit") Integer limit);
94 92
 }

+ 7 - 2
src/main/java/com/liang/service/impl/PrjAnnualbudgetdetailServiceImpl.java

@@ -211,8 +211,8 @@ public class PrjAnnualbudgetdetailServiceImpl implements PrjAnnualbudgetdetailSe
211 211
     }
212 212
 
213 213
     @Override
214
-    public List<PrjAnnualbudgetdetail> getSubNode(Integer nys) {
215
-        return this.prjAnnualbudgetdetailDao.getSubNode(nys);
214
+    public List<PrjAnnualbudgetdetail> getSubNode(Integer nys, Integer page, Integer limit, String mc) {
215
+        return this.prjAnnualbudgetdetailDao.getSubNode(nys,page,limit,mc);
216 216
     }
217 217
 
218 218
     @Override
@@ -224,4 +224,9 @@ public class PrjAnnualbudgetdetailServiceImpl implements PrjAnnualbudgetdetailSe
224 224
         return count;
225 225
     }
226 226
 
227
+    @Override
228
+    public Integer getSubNodeCount(Integer nys, Integer page, Integer limit) {
229
+        return this.prjAnnualbudgetdetailDao.getSubNodeCount(nys,page,limit);
230
+    }
231
+
227 232
 }

+ 72 - 0
src/main/java/com/liang/vo/Page.java

@@ -0,0 +1,72 @@
1
+package com.liang.vo;
2
+
3
+import com.fasterxml.jackson.annotation.JsonInclude;
4
+import com.github.pagehelper.PageInfo;
5
+import io.swagger.annotations.ApiModel;
6
+import io.swagger.annotations.ApiModelProperty;
7
+import lombok.Getter;
8
+import lombok.NoArgsConstructor;
9
+import lombok.Setter;
10
+
11
+import javax.validation.Valid;
12
+import java.io.Serializable;
13
+import java.util.List;
14
+import java.util.Map;
15
+
16
+@Getter
17
+@Setter
18
+@NoArgsConstructor
19
+@ApiModel
20
+@JsonInclude(JsonInclude.Include.NON_NULL)
21
+public class Page<T> implements Serializable {
22
+    private static final long serialVersionUID = -880132266597087829L;
23
+
24
+    /**
25
+     * 包装Page对象
26
+     *
27
+     * @param list
28
+     */
29
+    public Page(List<? extends T> list) {
30
+        PageInfo<? extends T> page = new PageInfo<>(list);
31
+        this.total = page.getTotal();
32
+        this.pageNum = page.getPageNum();
33
+        this.pageSize = page.getPageSize();
34
+        this.rows = page.getList();
35
+    }
36
+
37
+    /**
38
+     * 包装Page对象
39
+     *
40
+     * @param list
41
+     */
42
+    public Page(List<? extends T> list, Map<String,Object> other) {
43
+        PageInfo<? extends T> page = new PageInfo<>(list);
44
+        this.total = page.getTotal();
45
+        this.pageNum = page.getPageNum();
46
+        this.pageSize = page.getPageSize();
47
+        this.rows = page.getList();
48
+        this.other = other;
49
+    }
50
+    //当前页
51
+    @ApiModelProperty(value = "当前页数",required = true)
52
+    private int pageNum =1;
53
+    //每页的数量
54
+    @ApiModelProperty(value = "每页显示数",required = true)
55
+    private int pageSize = 10;
56
+
57
+    private long total = 0;
58
+
59
+    /**
60
+     * 列表查询入参实体类
61
+     */
62
+    @ApiModelProperty(value = "列表查询返回附加数据实体类",dataType = "java.util.HashMap",hidden = true)
63
+    private Map<String,Object> other;
64
+    /**
65
+     * 列表查询入参实体类
66
+     */
67
+    @ApiModelProperty(value = "列表查询入参实体类")
68
+    @Valid
69
+    private transient T data;
70
+    @ApiModelProperty(hidden = true)
71
+    private  List<? extends T> rows;
72
+}

+ 24 - 5
src/main/resources/mapper/PrjAnnualbudgetdetailDao.xml

@@ -536,11 +536,22 @@
536 536
 
537 537
     <!--获取费用申请年度预算-->
538 538
     <select id="getSubNode" resultMap="PrjAnnualbudgetdetailMap">
539
-        select (select FYMC from prj_AnnualBudgetDetail where BM = b.FJ and NYS = b.NYS) as FJMC, b.*
540
-        from prj_AnnualBudgetDetail b
541
-        where NYS = #{nys}
542
-          and BM not in (select distinct FJ from prj_AnnualBudgetDetail where FJ != ''
543
-          AND NYS=#{nys})
539
+        select top ${limit} *
540
+        from (
541
+            select
542
+            (select FYMC from prj_AnnualBudgetDetail where BM = b.FJ and NYS = b.NYS) as FJMC,
543
+              b.*,
544
+              row_number() over (order by b.id asc) as rownumber
545
+                 from prj_AnnualBudgetDetail b
546
+                 where NYS = #{nys}
547
+                   and BM not in (select distinct FJ from prj_AnnualBudgetDetail where FJ != ''
548
+                   AND NYS=#{nys})
549
+                 <if test="mc != null and mc != ''">
550
+                   AND b.FYMC LIKE  CONCAT('%',#{mc},'%')
551
+                  </if>
552
+
553
+                   ) temp_row
554
+        where rownumber  > ((${page} - 1) * ${limit})
544 555
     </select>
545 556
     <select id="selectWWYJZCF_GW" resultType="java.math.BigDecimal">
546 557
         select ((SELECT SUM(SKJE)
@@ -573,5 +584,13 @@
573 584
         from prj_feescheme
574 585
         where ZB = #{id}
575 586
     </select>
587
+    <select id="getSubNodeCount" resultType="java.lang.Integer">
588
+        select
589
+        count(*)
590
+        from prj_AnnualBudgetDetail b
591
+        where NYS = #{nys}
592
+        and BM not in (select distinct FJ from prj_AnnualBudgetDetail where FJ != ''
593
+        AND NYS=#{nys})
594
+    </select>
576 595
 </mapper>
577 596
 

+ 2 - 1
src/main/resources/mapper/PrjApproverecordDao.xml

@@ -518,9 +518,10 @@
518 518
         </if>
519 519
         <choose>
520 520
             <when test="sortName != null and sortName != '' and sortOrder != null and sortOrder != ''">
521
-                order by ${sortName} ${sortOrder}
521
+                order by ${sortName} ${sortOrder} DESC
522 522
             </when>
523 523
         </choose>
524
+        order by a.TJSJ DESC
524 525
     </select>
525 526
 
526 527
     <update id="updateRevokeRecord">

+ 2 - 1
src/main/resources/mapper/StaPayapprovalDao.xml

@@ -15,6 +15,7 @@
15 15
         <result property="yszl" column="YSZL" jdbcType="VARCHAR"/>
16 16
         <result property="fkjh" column="FKJH" jdbcType="INTEGER"/>
17 17
         <result property="sqmc" column="SQMC" jdbcType="VARCHAR"/>
18
+        <result property="bh" column="BH" jdbcType="VARCHAR"/>
18 19
     </resultMap>
19 20
 
20 21
     <!--查询单个-->
@@ -201,7 +202,7 @@
201 202
 
202 203
     <!--获取付款申请列表-->
203 204
     <select id="getFksqList" resultMap="StaPayapprovalMap" parameterType="map">
204
-        select b.*, u.name as CJRXM, FORMAT(b.CJSJ, 'yyyy-MM-dd') as CJRQ, c.HTMC, c.WJ as HTWJ, p.JHMC as FKJHMC,
205
+        select b.*,g.bh, u.name as CJRXM, FORMAT(b.CJSJ, 'yyyy-MM-dd') as CJRQ, c.HTMC, c.WJ as HTWJ, p.JHMC as FKJHMC,
205 206
         g.SQMC as FYSQMC, g.XMMC as RWSMC
206 207
         from sta_PayApproval b
207 208
         left join prj_PayPlan p on p.ID = b.FKJH

+ 2 - 1
src/main/resources/templates/annualbudget/add_apply.html

@@ -651,7 +651,7 @@
651 651
             searchPlaceholder: '搜索费用名称',
652 652
             table: {
653 653
                 url: AjaxUtil.ctx + 'staBudgetapproval/getSubNode/' + ysId,
654
-                method: 'post',
654
+                method: 'get',
655 655
                 cols: [
656 656
                     [
657 657
                         {type: "radio", fixed: 'left'},
@@ -776,6 +776,7 @@
776 776
                         }
777 777
                         ybzjeOne = parseFloat(dataTj[0].ybzje);
778 778
                         currTable_tj.reload();
779
+                        $("#sqmc").val('费用申请-'+$("#xmmc").val()+"-"+$("#fylbmc").val());
779 780
                     }
780 781
                 });
781 782
             }

+ 3 - 2
src/main/resources/templates/payapply/list.html

@@ -25,7 +25,7 @@
25 25
                         <div class="layui-input-inline"  style="width: 200px">
26 26
                             <input type="text" name="erpbh" autocomplete="off" class="layui-input">
27 27
                         </div>
28
-                        <label class="layui-form-label" style="width: 60px;left: 5px">申请编号</label>
28
+                        <label class="layui-form-label" style="width: 90px;left: 5px">费用申请编号</label>
29 29
                         <div class="layui-input-inline"  style="width: 225px">
30 30
                             <input type="text" name="bh" autocomplete="off" class="layui-input">
31 31
                         </div>
@@ -51,7 +51,7 @@
51 51
 
52 52
 
53 53
                             <div class="layui-inline">
54
-                                <label class="layui-form-label" style="width: 60px">创建时间</label>
54
+                                <label class="layui-form-label" style="width: 90px">创建时间</label>
55 55
                                 <div class="layui-input-inline" style="width: 100px">
56 56
                                     <input type="text" name="cjsj1" id="cjsj1" placeholder="开始日期" class="layui-input" readonly>
57 57
                                 </div>
@@ -146,6 +146,7 @@
146 146
                     {type: 'numbers', fixed: 'left'},
147 147
                     {field: 'spzt', width: '11%',title: '审批状态', fixed: 'left'},
148 148
                     {field: 'rwsmc', width: '11%', title: '项目名称'},
149
+                    {field: 'bh', width: '11%', title: '费用申请编号'},
149 150
                     {field: 'htmc', width: '11%', title: '合同'},
150 151
                     {field: 'fysqmc', width: '15%',title: '费用申请'},
151 152
                     {field: 'bcfkje', width: '10%', title: '本次付款金额(万元)'},

+ 26 - 24
src/main/resources/templates/prjapproverecord/list.html

@@ -648,31 +648,33 @@
648 648
                         url: AjaxUtil.ctx + "prjApproverecord/doUpdateApproveFksq",
649 649
                         data: bathUpdateRes.approveInfo,
650 650
                         success: function (res) {
651
-                            //更新审批状态
652
-                            var project = {
653
-                                "id": xmApprovalBath.xmid,
654
-                                "spzt": ''
655
-                            }
656
-                            if (bathUpdateRes.approveInfo.spcz == '返回修改') {
657
-                                project.spzt = '未提交(返回)';
658
-                            } else if (bathUpdateRes.approveInfo.zt == '科技项目管理专责1审批') {
659
-                                project.spzt = '科技项目管理专责2审批';
660
-                            } else if (bathUpdateRes.approveInfo.zt == '科技项目管理专责2审批') {
661
-                                project.spzt = '科技部部门主任审批';
662
-                            } else if (bathUpdateRes.approveInfo.zt === '科技部部门主任审批') {
663
-                                project.spzt = '审批结束';
664
-                            }
665
-
666
-                            AjaxUtil.post({
667
-                                url: AjaxUtil.ctx + "staPayapproval/updateSpzt",
668
-                                contentType: "application/json",
669
-                                data: JSON.stringify(project),
670
-                                success: function (res) {
671
-                                    return true;
672
-                                },
673
-                                error: function (error) {
651
+                            if (res.code == 0) {
652
+                                //更新审批状态
653
+                                var project = {
654
+                                    "id": xmApprovalBath.xmid,
655
+                                    "spzt": ''
674 656
                                 }
675
-                            });
657
+                                if (bathUpdateRes.approveInfo.spcz == '返回修改') {
658
+                                    project.spzt = '未提交(返回)';
659
+                                } else if (bathUpdateRes.approveInfo.zt == '科技项目管理专责1审批') {
660
+                                    project.spzt = '科技项目管理专责2审批';
661
+                                } else if (bathUpdateRes.approveInfo.zt == '科技项目管理专责2审批') {
662
+                                    project.spzt = '科技部部门主任审批';
663
+                                } else if (bathUpdateRes.approveInfo.zt === '科技部部门主任审批') {
664
+                                    project.spzt = '审批结束';
665
+                                }
666
+
667
+                                AjaxUtil.post({
668
+                                    url: AjaxUtil.ctx + "staPayapproval/updateSpzt",
669
+                                    contentType: "application/json",
670
+                                    data: JSON.stringify(project),
671
+                                    success: function (res) {
672
+                                        return true;
673
+                                    },
674
+                                    error: function (error) {
675
+                                    }
676
+                                });
677
+                            }
676 678
                         },
677 679
                         error: function (error) {
678 680
                         }

+ 1 - 1
src/main/resources/templates/stafeemanage/list_allapply.html

@@ -30,7 +30,7 @@
30 30
                             </div>
31 31
                         </div>
32 32
                         <div class="layui-inline">
33
-                            <label class="layui-form-label" style="width: 90px">费用申请编号</label>
33
+                            <label class="layui-form-label" style="width: 90px">编号</label>
34 34
                             <div class="layui-input-inline" style="width: 150px">
35 35
                                 <input type="text" id="bh" name="bh" autocomplete="off" class="layui-input">
36 36
                             </div>