|
|
@@ -249,7 +249,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
throw new BusinessException(new Error( "该部门缩写不存在","该部门缩写不存在"));
|
|
|
}
|
|
|
//根据前缀查询最大编号
|
|
|
- String max=organizationManagementMapper.getMaxAbbreviation(dep.getAbbreviation());
|
|
|
+ String max=organizationManagementMapper.getMaxAbbreviation(dep.getAbbreviation()+"-");
|
|
|
//获取日期年份
|
|
|
Calendar c=Calendar.getInstance();
|
|
|
int y=c.getWeekYear();
|
|
|
@@ -276,6 +276,19 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public static void main(String[] args) {
|
|
|
+ String max="GZKD1-20190001";
|
|
|
+ int ty=Integer.parseInt(max.substring(max.indexOf("-")+1, max.length()-4));
|
|
|
+ int no=Integer.parseInt(max.substring(max.length()-4, max.length()));
|
|
|
+ System.out.println("ty:"+ty+",no:"+no);
|
|
|
+ no++;
|
|
|
+ String s="GZKD"+"-"+ty+"000"+no;
|
|
|
+ System.out.println(s);
|
|
|
+
|
|
|
+ int i=Integer.parseInt(s.substring(s.indexOf("-")+5, s.length()));
|
|
|
+ System.out.println(i);
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
|
|
|
private String iterationNo(String sno ,Object mp, int ty, int no) {
|