|
|
@@ -50,7 +50,11 @@ import java.io.File; |
|
|
|
import java.io.FileOutputStream; |
|
|
|
import java.io.IOException; |
|
|
|
import java.lang.reflect.Field; |
|
|
|
import java.time.LocalDate; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.time.format.DateTimeFormatter; |
|
|
|
import java.time.temporal.ChronoUnit; |
|
|
|
import java.time.temporal.Temporal; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
@@ -440,6 +444,11 @@ public class GovProjectCollectionManage { |
|
|
|
}else{ |
|
|
|
saveApply.setTongTime(LocalDateTime.now()); |
|
|
|
} |
|
|
|
if(Objects.nonNull(saveApply.getBaseProjStartTime()) && |
|
|
|
Objects.nonNull(saveApply.getBaseProjEndTime())){ |
|
|
|
saveApply.setBaseProjDuration(convertMonth(saveApply.getBaseProjStartTime(), |
|
|
|
saveApply.getBaseProjEndTime())); |
|
|
|
} |
|
|
|
saveApply.setAreaCode(RegionConst.RC_LS); |
|
|
|
saveApply.setBizTime(LocalDateTime.now()); |
|
|
|
saveApply.setUpdateBy(user.getUsername()); |
|
|
@@ -577,6 +586,22 @@ public class GovProjectCollectionManage { |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 计算2个时间的月份 |
|
|
|
* @param baseProjStartTime |
|
|
|
* @param baseProjEndTime |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public static String convertMonth(LocalDateTime baseProjStartTime, LocalDateTime baseProjEndTime) { |
|
|
|
String start = baseProjStartTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); |
|
|
|
String end = baseProjEndTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); |
|
|
|
Temporal temporal1 = LocalDate.parse(start); |
|
|
|
Temporal temporal2 = LocalDate.parse(end); |
|
|
|
// 方法返回为相差月份 |
|
|
|
Long ll = ChronoUnit.MONTHS.between(temporal1, temporal2); |
|
|
|
return ll.toString(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 暂存草稿箱 |
|
|
|
* @param saveDTO |
|
|
|
* @param user |
|
|
|