Browse Source

草稿箱

master
PoffyZhang 1 year ago
parent
commit
2cd610333a
1 changed files with 3 additions and 5 deletions
  1. +3
    -5
      pmapi/src/test/java/com/ningdatech/pmapi/projectCollection/ProjectCollectionTest.java

+ 3
- 5
pmapi/src/test/java/com/ningdatech/pmapi/projectCollection/ProjectCollectionTest.java View File

@@ -75,7 +75,7 @@ public class ProjectCollectionTest extends AppTests {

@Test
public void test(){
List<String> baseProjIds = Lists.newArrayList("33112300020230100032");
List<String> baseProjIds = Lists.newArrayList("33110000020210100193");
for(String baseProjId : baseProjIds){
GovBizProjectBaseinfo baseinfo = baseinfoService.getOne(Wrappers.lambdaQuery(GovBizProjectBaseinfo.class)
.eq(GovBizProjectBaseinfo::getBaseProjId, baseProjId)
@@ -183,10 +183,8 @@ public class ProjectCollectionTest extends AppTests {
}

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);
Temporal temporal1 = baseProjStartTime.toLocalDate();
Temporal temporal2 = baseProjEndTime.toLocalDate();
// 方法返回为相差月份
Long ll = ChronoUnit.MONTHS.between(temporal1, temporal2);
return ll.toString();


Loading…
Cancel
Save