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

fix:修改合同审核时结束月减一的情况

ly пре 10 месеци
родитељ
комит
29ed25687c

+ 2 - 2
src/main/java/cn/ezhizao/project/business/order/service/impl/BizArchiveInputServiceImpl.java

@@ -235,7 +235,7 @@ public class BizArchiveInputServiceImpl extends ServiceImpl<BizArchiveInputMappe
                                 v.setServiceId(v.getServiceId() == null ? userId : v.getServiceId());
                                 if (v.getStartMonth() != null) {
                                     DateTime startMonth = DateTime.of(v.getStartMonth());
-                                    v.setEndMonth(startMonth.offset(DateField.MONTH, monthNum - 1).toSqlDate());
+                                    v.setEndMonth(startMonth.offset(DateField.MONTH, monthNum).toSqlDate());
                                 }
                                 changeWorkOrders.add(v);
                             });
@@ -259,7 +259,7 @@ public class BizArchiveInputServiceImpl extends ServiceImpl<BizArchiveInputMappe
                                 l.setMonthNum(monthNum);
                                 if (l.getStartMonth() != null) {
                                     DateTime startMonth = DateTime.of(l.getStartMonth());
-                                    l.setEndMonth(startMonth.offset(DateField.MONTH, monthNum - 1).toSqlDate());
+                                    l.setEndMonth(startMonth.offset(DateField.MONTH, monthNum).toSqlDate());
                                 }
                                 changeWorkOrders.add(l);
                             }