|
|
@@ -245,7 +245,7 @@ public class AnnualPlanLibManage { |
|
|
|
String buildCycle = w.getBuildCycle(); |
|
|
|
int index = buildCycle.indexOf(CommonConst.MONTH); |
|
|
|
if (-1 == index){ |
|
|
|
throw new BizException("项目ID为%s的建设起止年限格式不正确,请按照"); |
|
|
|
throw new BizException("项目ID为:" + w.getProjectId() + "的建设起止年限格式不正确,请按照xx年xx月至xx年xx月的格式输入!"); |
|
|
|
} |
|
|
|
String beginTime = buildCycle.substring(0, index + 1); |
|
|
|
project.setBeginTime(beginTime); |
|
|
@@ -356,14 +356,4 @@ public class AnnualPlanLibManage { |
|
|
|
} |
|
|
|
return user; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
|
String a = "2023年3月至2023年11月"; |
|
|
|
int index = a.indexOf("-"); |
|
|
|
String b = a.substring(0, index + 1); |
|
|
|
System.out.println(b); |
|
|
|
String c = a.substring(index + 2); |
|
|
|
System.out.println(c); |
|
|
|
} |
|
|
|
} |