Browse Source

年度预算-新建年度预算时同步实际已执行

lgl 1 year ago
parent
commit
342c166cab

+ 2 - 2
src/main/java/com/liang/controller/StaReimbursementController.java

@@ -410,8 +410,8 @@ public class StaReimbursementController extends BaseController {
410 410
         int num = staReimbursementService.updateSpzt(fybz);
411 411
         if (StringUtils.isNotBlank(fybz.getSpzt()) && "审批结束".equals(fybz.getSpzt())) {
412 412
             Integer rwsId = staReimbursementDao.getRwsIdByBzId(fybz.getId());
413
-            BigDecimal nysSum = prjAnnualbudgetDao.getNYSSum(fybz.getId(), rwsId);
414
-            prjAnnualbudgetDao.updateSJYZXByBZID(fybz.getId(),nysSum);
413
+//            BigDecimal nysSum = prjAnnualbudgetDao.getNYSSum(fybz.getId(), rwsId);
414
+            prjAnnualbudgetDao.updateSJYZXByBZID(fybz.getId(),null);
415 415
         }
416 416
         if (num > 0) {
417 417
             return BaseResult.success("保存成功!");

+ 2 - 0
src/main/java/com/liang/service/impl/PrjAnnualbudgetServiceImpl.java

@@ -144,6 +144,8 @@ public class PrjAnnualbudgetServiceImpl implements PrjAnnualbudgetService {
144 144
         if (!Collections.isEmpty(prjAnnualbudgets)) {
145 145
             //更新 系统计算已执行
146 146
             prjAnnualbudgetDao.updateXTJSYZX(rws);
147
+            //更新 历史年度预算的实际已执行
148
+            prjAnnualbudgetDao.updateSJYZX(rws);
147 149
 
148 150
         }
149 151
     }

+ 2 - 2
src/main/resources/mapper/PrjAnnualbudgetDao.xml

@@ -438,7 +438,7 @@
438 438
 		where	nys in (
439 439
 			select	id
440 440
 			from prj_AnnualBudget
441
-			where rws = 513)) sb
441
+			where rws = #{rws})) sb
442 442
 	left join sta_Reimbursement sa on sa.fysq = sb.id
443 443
 	LEFT join prj_AnnualBudgetDetail pa on pa.id = sb.fylb
444 444
 	group by pa.fymc ) B
@@ -447,7 +447,7 @@
447 447
             NYS = (
448 448
             SELECT top 1 ID from
449 449
             prj_AnnualBudget
450
-            where RWS = 513 order by nf desc )
450
+            where RWS = #{rws} order by nf desc )
451 451
     </update>
452 452
     <update id="updateSJYZXByBZID">
453 453
         update A