Преглед изворни кода

合同新增 增加中选单位必填 是否是系统内部单位、 验收时间、延期时间 等级联限制功能

ly пре 5 месеци
родитељ
комит
84967f346e

+ 0 - 1
src/main/java/com/liang/controller/StaBudgetapprovalController.java

@@ -1350,7 +1350,6 @@ public class StaBudgetapprovalController extends BaseController {
1350 1350
 
1351 1351
         List<FeeManagemant> list = prjProjectService.getFyglList(paraMap);
1352 1352
         return BaseResult.success("导出成功",list);
1353
-
1354 1353
     }
1355 1354
 
1356 1355
     /**

+ 8 - 138
src/main/java/com/liang/entity/PrjContract.java

@@ -57,6 +57,7 @@ public class PrjContract implements Serializable {
57 57
     /**
58 58
      * 中选单位
59 59
      */
60
+
60 61
     private String zxdw;
61 62
 
62 63
     /**
@@ -78,148 +79,17 @@ public class PrjContract implements Serializable {
78 79
      */
79 80
     private String spzt;
80 81
 
81
-    public Double getZq() {
82
-        return zq;
83
-    }
84
-
85
-    public void setZq(Double zq) {
86
-        this.zq = zq;
87
-    }
88
-
89
-    public Date getKssj() {
90
-        return kssj;
91
-    }
92
-
93
-    public void setKssj(Date kssj) {
94
-        this.kssj = kssj;
95
-    }
96
-
97
-    public Date getJssj() {
98
-        return jssj;
99
-    }
100
-
101
-    public void setJssj(Date jssj) {
102
-        this.jssj = jssj;
103
-    }
104
-
105
-    public String getZwmc() {
106
-        return zwmc;
107
-    }
108
-
109
-    public void setZwmc(String zwmc) {
110
-        this.zwmc = zwmc;
111
-    }
112
-
113
-    public String getErpbh() {
114
-        return erpbh;
115
-    }
116
-
117
-    public void setErpbh(String erpbh) {
118
-        this.erpbh = erpbh;
119
-    }
120
-
121
-    public Integer getId() {
122
-        return id;
123
-    }
124
-
125
-    public void setId(Integer id) {
126
-        this.id = id;
127
-    }
128
-
129
-    public String getHtmc() {
130
-        return htmc;
131
-    }
132
-
133
-    public void setHtmc(String htmc) {
134
-        this.htmc = htmc;
135
-    }
136
-
137
-    public String getWj() {
138
-        return wj;
139
-    }
140
-
141
-    public void setWj(String wj) {
142
-        this.wj = wj;
143
-    }
144
-
145
-    public Double getHtje() {
146
-        return htje;
147
-    }
148
-
149
-    public void setHtje(Double htje) {
150
-        this.htje = htje;
151
-    }
152
-
153
-    public Integer getCjr() {
154
-        return cjr;
155
-    }
156
-
157
-    public void setCjr(Integer cjr) {
158
-        this.cjr = cjr;
159
-    }
160
-
161
-    public Date getCjsj() {
162
-        return cjsj;
163
-    }
164
-
165
-    public void setCjsj(Date cjsj) {
166
-        this.cjsj = cjsj;
167
-    }
168
-
169
-    public Integer getRws() {
170
-        return rws;
171
-    }
172
-
173
-    public void setRws(Integer rws) {
174
-        this.rws = rws;
175
-    }
176
-
177
-    public String getCjrxm() {
178
-        return cjrxm;
179
-    }
180
-
181
-    public void setCjrxm(String cjrxm) {
182
-        this.cjrxm = cjrxm;
183
-    }
184
-
185
-    public String getRwsmc() {
186
-        return rwsmc;
187
-    }
188
-
189
-    public void setRwsmc(String rwsmc) {
190
-        this.rwsmc = rwsmc;
191
-    }
192
-
193
-    public String getYszl() {
194
-        return yszl;
195
-    }
196
-
197
-    public void setYszl(String yszl) {
198
-        this.yszl = yszl;
199
-    }
200
-
201
-    public String getZbpc() {
202
-        return zbpc;
203
-    }
82
+    /**
83
+     * 已付金额
84
+     */
85
+    private Double yfje;
204 86
 
205
-    public void setZbpc(String zbpc) {
206
-        this.zbpc = zbpc;
207
-    }
87
+    private Date yssj;
208 88
 
209
-    public String getZxdw() {
210
-        return zxdw;
211
-    }
89
+    private Integer sfsxtndw;
212 90
 
213
-    public void setZxdw(String Zxdw) {
214
-        this.zxdw = zxdw;
215
-    }
91
+    private Date yqrq;
216 92
 
217
-    public Integer getZT() {
218
-        return zt;
219
-    }
220 93
 
221
-    public void setZT(Integer zt) {
222
-        this.zt = zt;
223
-    }
224 94
 }
225 95
 

+ 22 - 8
src/main/resources/mapper/PrjContractDao.xml

@@ -17,6 +17,11 @@
17 17
         <result property="jssj" column="JSSJ" jdbcType="VARCHAR"/>
18 18
         <result property="zq" column="ZQ" jdbcType="VARCHAR"/>
19 19
         <result property="spzt" column="SPZT" jdbcType="VARCHAR"/>
20
+        <result property="yfje" column="YFJE" jdbcType="DOUBLE"/>
21
+        <result property="yssj" column="YSSJ" jdbcType="VARCHAR"/>
22
+        <result property="sfsxtndw" column="SFSXTNDW" jdbcType="INTEGER"/>
23
+        <result property="yqrq" column="YQRQ" jdbcType="VARCHAR"/>
24
+
20 25
     </resultMap>
21 26
 
22 27
     <!--查询单个-->
@@ -108,8 +113,8 @@
108 113
 
109 114
     <!--新增所有列-->
110 115
     <insert id="insert" keyProperty="id" useGeneratedKeys="true">
111
-        insert into prj_Contract(HTMC, WJ, HTJE, CJR, CJSJ, RWS, ZBPC, ZXDW, YSZL,KSSJ,JSSJ,SPZT)
112
-        values (#{htmc}, #{wj}, #{htje}, #{cjr}, GETDATE(), #{rws}, #{zbpc}, #{zxdw}, #{yszl},#{kssj},#{jssj},#{spzt})
116
+        insert into prj_Contract(HTMC, WJ, HTJE, CJR, CJSJ, RWS, ZBPC, ZXDW, YSZL,KSSJ,JSSJ,SPZT,SFSXTNDW,YSSJ,YQRQ)
117
+        values (#{htmc}, #{wj}, #{htje}, #{cjr}, GETDATE(), #{rws}, #{zbpc}, #{zxdw}, #{yszl},#{kssj},#{jssj},#{spzt},#{sfsxtndw},#{yssj},#{yqrq})
113 118
     </insert>
114 119
 
115 120
     <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
@@ -202,12 +207,21 @@
202 207
 
203 208
     <!--合同列表-->
204 209
     <select id="getContractList" resultMap="PrjContractMap" parameterType="map">
205
-        select c.*, x.ZWMC as RWSMC, u.name as CJRXM,x.ZWMC,x.ERPBH, DATEDIFF(MONTH, c.kssj, c.jssj) AS ZQ
206
-        from prj_Contract c
207
-        left join prj_Project x on x.ID = c.RWS
208
-        left join sys_user_info u on u.user_id = c.CJR
209
-        where 1 = 1
210
-        and c.zt = 1
210
+        SELECT
211
+        c.*,
212
+        x.ZWMC AS RWSMC,
213
+        u.name AS CJRXM,
214
+        x.ZWMC,
215
+        x.ERPBH,
216
+        COALESCE((select SUM(BCFKJE) FROM sta_PayApproval sp WHERE sp.HT = c.ID AND sp.SPZT != '作废'),0.00) AS YFJE,
217
+        DATEDIFF( MONTH, c.kssj, c.jssj ) AS ZQ
218
+        FROM
219
+        prj_Contract c
220
+        LEFT JOIN prj_Project x ON x.ID = c.RWS
221
+        LEFT JOIN sys_user_info u ON u.user_id = c.CJR
222
+        WHERE
223
+        1 = 1
224
+        AND c.zt = 1
211 225
         <if test="htmc != null and htmc != ''">
212 226
             and c.HTMC like '%'+#{htmc}+'%'
213 227
         </if>

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

@@ -332,7 +332,7 @@ where
332 332
             COALESCE(a.BZJE, 0) / 10000 AS BZJE
333 333
         FROM sta_Reimbursement a
334 334
         left  JOIN sta_PayApproval b ON a.FYSQ = b.FYSQ
335
-        WHERE a.FYSQ = #{fysq}
335
+        WHERE a.FYSQ = #{fysq} and b.SPZT != '作废'
336 336
         GROUP BY a.BZJE
337 337
 
338 338
     </select>

+ 1 - 1
src/main/resources/templates/payapply/adds.html

@@ -557,7 +557,7 @@
557 557
                     bzje = result.bzje
558 558
                     }
559 559
                 })
560
-            if (fkje+bcfkje>bzje){
560
+            if ( (fkje+bcfkje) > bzje){
561 561
                 Message.warning('该报账下付款申请已申请总金额已超出报账金额!',2000);
562 562
                 return ;
563 563
             }

+ 1 - 1
src/main/resources/templates/payapply/list_projects.html

@@ -89,7 +89,7 @@
89 89
                     {field: 'xmmc', width: '25%', title: '项目名称'},
90 90
                     {field: 'sqje',width: '10%',title: '申请金额(元)',align: 'right'},
91 91
                     {field: 'bzje',width: '10%',title: '报账金额(元)',align: 'right'},
92
-                    {field: 'yfje',width: '10%',title: '已付款金额(元)',align: 'right'},
92
+                    {field: 'yfje',width: '13%',title: '已付款金额(元)',align: 'right'},
93 93
                     {field: 'erpbh', width: '15%', title: 'ERP编号'},
94 94
                     {field: 'mc', width: '25%', title: '报账名称'},
95 95
                     {field: 'fysqmc', width: '25%', title: '费用申请'},

+ 93 - 3
src/main/resources/templates/prjcontract/add.html

@@ -52,14 +52,16 @@
52 52
                         <div class="layui-form-item layui-inline" style="width: 100%">
53 53
                             <label class="layui-form-label required" style="width: 10%">招标批次</label>
54 54
                             <div class="layui-input-inline" style="width: 25%">
55
-                                <input type="text" id="zbpc" name="zbpc" autocomplete="off" class="layui-input" lay-verify="required" lay-reqtext="招标批次不能为空">
55
+                                <input type="text" id="zbpc" name="zbpc" autocomplete="off" class="layui-input" lay-verify="required" lay-reqtext="招标批次不能为空">
56 56
                             </div>
57
-                            <label class="layui-form-label " style="width: 15%">中选单位</label>
57
+                            <label class="layui-form-label required " style="width: 15%">中选单位</label>
58 58
                             <div class="layui-input-inline" style="width: 35%">
59
-                                <input type="text" id="zxdw" name="zxdw" class="layui-input" autocomplete="off">
59
+                                <input type="text" id="zxdw" name="zxdw" class="layui-input"
60
+                                       autocomplete="off" lay-verify="required" lay-reqtext="中标单位不能为空!">
60 61
                             </div>
61 62
                         </div>
62 63
 
64
+
63 65
                         <div class="layui-form-item layui-inline" style="width: 100%">
64 66
                             <label class="layui-form-label required" style="width: 10%">执行周期</label>
65 67
                             <div class="layui-input-inline" style="width: 25%">
@@ -70,6 +72,25 @@
70 72
                                 <input type="text" name="jssj" id="jssj" placeholder="终止时间" class="layui-input" lay-verify="required" lay-reqtext="结束不能为空" readonly>
71 73
                             </div>
72 74
                         </div>
75
+                        <div class="layui-form-item layui-inline" style="width: 100%">
76
+                            <label class="layui-form-label required" style="width: 10%">验收时间</label>
77
+                            <div class="layui-input-inline" style="width: 25%">
78
+                                <input type="text" id="yssj" name="yssj" autocomplete="off" class="layui-input" lay-verify="required" lay-reqtext="招标批次不能为空!">
79
+                            </div>
80
+                            <label class="layui-form-label required" style="width: 15%">是否是系统内单位</label>
81
+                            <div class="layui-input-inline" style="width: 10%">
82
+                                <select name="sfsxtndw" id="sfsxtndw">
83
+                                    <option value="0">是</option>
84
+                                    <option value="1">否</option>
85
+                                </select>
86
+                            </div>
87
+                        </div>
88
+                        <div class="layui-form-item layui-inline" style="width: 100%;display: none" id="yqrqs" >
89
+                            <label class="layui-form-label" style="width: 10%">延期日期</label>
90
+                            <div class="layui-input-inline" style="width: 25%">
91
+                                <input type="text" id="yqrq" name="yqrq" autocomplete="off" class="layui-input">
92
+                            </div>
93
+                        </div>
73 94
 
74 95
                         <div class="layui-form-item layui-inline" style="width: 100%">
75 96
                             <label class="layui-form-label" style="width: 10%">合同文件</label>
@@ -171,6 +192,8 @@
171 192
         var htId = -1;
172 193
         var kssj = '',
173 194
             jssj = '';
195
+            yssj = '';
196
+            yqrq = '';
174 197
 
175 198
         //申请时间
176 199
         laydate.render({
@@ -178,6 +201,18 @@
178 201
             done: function (value, date, endDate) {
179 202
                 sqsj1 = $("#kssj").val();
180 203
                 sqsj2 = $("#jssj").val();
204
+                yssj = $("#yssj").val();
205
+                if (sqsj1 == sqsj2){
206
+                    layer.msg('执行周期开始时间与结束时间不能为同一天!',{icon:2});
207
+                    $("#kssj").val("");
208
+
209
+                }
210
+                if (yssj != ''){
211
+                    if (sqsj1 > yssj){
212
+                        layer.msg('验收时间不能早于或等于合同开始时间!',{icon:2});
213
+                        $("#yssj").val("");
214
+                    }
215
+                }
181 216
                 if (sqsj1 != "" && sqsj2 != "") {
182 217
                     if (sqsj1 > sqsj2) {
183 218
                         Message.warning("起始时间不能晚于终止时间!", 1500);
@@ -192,6 +227,19 @@
192 227
             done: function (value, date, endDate) {
193 228
                 sqsj1 = $("#kssj").val();
194 229
                 sqsj2 = $("#jssj").val();
230
+                const currentDate = new Date();
231
+                const sqsj3 = new Date(sqsj2);
232
+                console.log('时间:'+ currentDate);
233
+                console.log('时间:'+ sqsj3);
234
+                if (sqsj3 < currentDate){
235
+                 $("#yqrqs").css('display','block');
236
+                }else {
237
+                    $("#yqrqs").css('display','none');
238
+                }
239
+                if (sqsj1 == sqsj2){
240
+                    layer.msg('执行周期开始时间与结束时间不能为同一天!',{icon:2});
241
+                    $("#jssj").val("");
242
+                }
195 243
                 if (sqsj1 != "" && sqsj2 != "") {
196 244
                     if (sqsj1 > sqsj2) {
197 245
                         Message.warning("终止时间不能早于开始时间!", 1500);
@@ -199,6 +247,48 @@
199 247
 
200 248
                     }
201 249
                 }
250
+
251
+            }
252
+        });
253
+
254
+        laydate.render({
255
+            elem: '#yssj',
256
+            done: function (value, date, endDate) {
257
+                sqsj1 = $("#kssj").val();
258
+                sqsj2 = $("#jssj").val();
259
+                yssj = $("#yssj").val();
260
+                if (sqsj1 != '' && yssj != ''){
261
+                    if (yssj <= sqsj1){
262
+                        layer.msg('验收时间不能早于或等于合同开始时间!',{icon:2});
263
+                        $("#yssj").val("");
264
+
265
+                    }
266
+                }
267
+
268
+            }
269
+        });
270
+        laydate.render({
271
+            elem: '#yqrq',
272
+            done: function (value, date, endDate) {
273
+                sqsj1 = $("#kssj").val();
274
+                sqsj2 = $("#jssj").val();
275
+                yssj = $("#yssj").val();
276
+                yqrq = $("#yqrq").val();
277
+                // 大于项目执行周期 不能等于
278
+                if (sqsj1 == '' && yssj == ''){
279
+                    layer.msg('请先录入执行周期!',{icon:2});
280
+                    $("#yqrq").val("");
281
+                }
282
+                if (yqrq <= sqsj2 ){
283
+                    layer.msg('延期时间不能小于或等于合同执行结束时间!',{icon:2});
284
+                    $("#yqrq").val("");
285
+                }
286
+                if (yqrq <= sqsj1){
287
+                    layer.msg('延期时间不能小于或等于合同执行开始时间',{icon:2});
288
+                    $("#yqrq").val("");
289
+                }
290
+
291
+
202 292
             }
203 293
         });
204 294
         //任务书

+ 3 - 3
src/main/resources/templates/prjcontract/list.html

@@ -163,13 +163,13 @@
163 163
                     {field: 'zwmc',width: '20%',title:'项目名称',fixed: 'left'},
164 164
                     {field: 'spzt',width: '10%',title: '审批状态',align: 'left'},
165 165
                     {field: 'erpbh',width: '10%',title: 'ERP编号',align: 'left'},
166
-                    {field: 'htmc', width: '20%', title: '合同名称', align: 'left'},
167
-                    /*{field: 'rwsmc', width: '30%', title: '任务书', align: 'left'},*/
168 166
                     {field: 'htje', width: '8%', title: '合同金额(万元)', align: 'right'},
169
-                    {field: 'cjrxm', width: '8%', title: '创建人', align: 'center'},
167
+                    {field: 'yfje',width: '10%',title: '已付金额(万元)',align: 'right'},
168
+                    {field: 'htmc', width: '20%', title: '合同名称'},
170 169
                     {field: 'zq', width: '6%',title: '周期(月)',align: 'left'},
171 170
                     {field: 'kssj',width: '10%',title: '执行周期(开始)',align: 'center'},
172 171
                     {field: 'jssj',width: '10%',title: '执行周期(结束)',align: 'center'},
172
+                    {field: 'cjrxm', width: '8%', title: '创建人', align: 'center'},
173 173
                     {field: 'cjsj', width: '10%', title: '创建时间', align: 'center'},
174 174
                     {title: '操作',width: '5%',toolbar:'#cz',align: 'center',fixed: 'right'}
175 175
                 ]

+ 2 - 2
src/main/resources/templates/prjcontract/update.html

@@ -99,9 +99,9 @@
99 99
                             <div class="layui-input-inline" style="width: 25%">
100 100
                                 <input type="text" id="zbpc" name="zbpc" autocomplete="off" class="layui-input" lay-verify="required" lay-reqtext="招标批次不能为空" th:value="${contract.zbpc}">
101 101
                             </div>
102
-                            <label class="layui-form-label " style="width: 15%">中选单位</label>
102
+                            <label class="layui-form-label required" style="width: 15%">中选单位</label>
103 103
                             <div class="layui-input-inline" style="width: 35%">
104
-                                <input type="text" id="zxdw" name="zxdw" class="layui-input" autocomplete="off" th:value="${contract.zxdw}">
104
+                                <input type="text" id="zxdw" name="zxdw" class="layui-input" autocomplete="off" th:value="${contract.zxdw}" lay-verify="required" lay-reqtext="中选单位不能为空" >
105 105
                             </div>
106 106
                         </div>
107 107