Ver código fonte

同步已执行按钮

梁世豪 11 meses atrás
pai
commit
cb88b2209b

+ 3 - 1
src/main/java/com/liang/service/impl/PrjAnnualbudgetServiceImpl.java

@@ -1,5 +1,6 @@
1 1
 package com.liang.service.impl;
2 2
 
3
+import com.liang.common.base.BaseResult;
3 4
 import com.liang.dao.PrjAnnualbudgetDao;
4 5
 import com.liang.dao.PrjAnnualbudgetdetailDao;
5 6
 import com.liang.entity.PrjAnnualbudget;
@@ -158,7 +159,7 @@ public class PrjAnnualbudgetServiceImpl implements PrjAnnualbudgetService {
158 159
     }
159 160
     @GetMapping("/updateSJYZXAndXTJSYZX/{rwsId}/{nysId}")
160 161
     @Transactional(rollbackFor = Exception.class)
161
-    public void updateSJYZXAndXTJSYZX(@PathVariable("rwsId")Integer rwsId, @PathVariable("nysId")Integer nysId) {
162
+    public BaseResult updateSJYZXAndXTJSYZX(@PathVariable("rwsId")Integer rwsId, @PathVariable("nysId")Integer nysId) {
162 163
         List<PrjAnnualbudget> prjAnnualbudgets = prjAnnualbudgetDao.listByRws(rwsId);
163 164
         //第一年的年度预算不需要更新
164 165
         if (!Collections.isEmpty(prjAnnualbudgets) && !prjAnnualbudgets.get(0).getId().equals(nysId)) {
@@ -170,6 +171,7 @@ public class PrjAnnualbudgetServiceImpl implements PrjAnnualbudgetService {
170 171
             //更新已执行总计
171 172
             prjAnnualbudgetDao.updateSJYZXSumByNysId(rwsId,annualbudget.getNf(),annualbudget.getId());
172 173
         }
174
+        return BaseResult.success("已执行数据同步成功");
173 175
     }
174 176
 
175 177
     @Override

+ 6 - 5
src/main/resources/templates/annualbudget/add_annualbudget.html

@@ -332,12 +332,13 @@
332 332
                     Message.error(nf + "不在项目起止时间内!", 1500);
333 333
                     return false;
334 334
                 }
335
-            } else {
336
-                if (nf < qs) {
337
-                    Message.error(nf + "不在项目起始时间内!", 1500);
338
-                    return false;
339
-                }
340 335
             }
336
+            // else {
337
+            //     if (nf < qs) {
338
+            //         Message.error(nf + "不在项目起始时间内!", 1500);
339
+            //         return false;
340
+            //     }
341
+            // }
341 342
             var url = AjaxUtil.ctx;
342 343
             if (ysId == -1) {
343 344
                 url += "prjAnnualbudget/doAdd";