|
@@ -235,6 +235,9 @@ public class BizArchiveInputServiceImpl extends ServiceImpl<BizArchiveInputMappe
|
|
|
v.setServiceId(v.getServiceId() == null ? userId : v.getServiceId());
|
|
|
if (v.getStartMonth() != null) {
|
|
|
DateTime startMonth = DateTime.of(v.getStartMonth());
|
|
|
+ if(v.getTaskTypeId() != 1L){
|
|
|
+ monthNum = monthNum-1;
|
|
|
+ }
|
|
|
v.setEndMonth(startMonth.offset(DateField.MONTH, monthNum).toSqlDate());
|
|
|
}
|
|
|
changeWorkOrders.add(v);
|
|
@@ -259,6 +262,9 @@ public class BizArchiveInputServiceImpl extends ServiceImpl<BizArchiveInputMappe
|
|
|
l.setMonthNum(monthNum);
|
|
|
if (l.getStartMonth() != null) {
|
|
|
DateTime startMonth = DateTime.of(l.getStartMonth());
|
|
|
+ if(l.getTaskTypeId() != 1L){
|
|
|
+ monthNum = monthNum-1;
|
|
|
+ }
|
|
|
l.setEndMonth(startMonth.offset(DateField.MONTH, monthNum).toSqlDate());
|
|
|
}
|
|
|
changeWorkOrders.add(l);
|
|
@@ -612,6 +618,12 @@ public class BizArchiveInputServiceImpl extends ServiceImpl<BizArchiveInputMappe
|
|
|
} else {
|
|
|
// 不停止工单 只修改工单完成时间
|
|
|
l.setMonthNum(months);
|
|
|
+ // 获取当前日期的 LocalDate 对象
|
|
|
+ LocalDate now = LocalDate.now();
|
|
|
+ // 将 LocalDate 对象的日期设置为当前月份的第一天
|
|
|
+ LocalDate firstDayOfMonth = now.withDayOfMonth(1);
|
|
|
+ // 将 LocalDate 对象转换为 Date 对象
|
|
|
+ endDate = Date.from(firstDayOfMonth.atStartOfDay(ZoneId.systemDefault()).toInstant());
|
|
|
l.setEndMonth(endDate);
|
|
|
l.setIsContinue(0);
|
|
|
updateMonth(bizArchiveInput, l, details);
|