|
|
@@ -262,7 +262,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
}else {
|
|
|
int ty=Integer.parseInt(max.substring(max.indexOf("-")+1, max.length()-4));
|
|
|
int no=Integer.parseInt(max.substring(max.length()-4, max.length()));
|
|
|
- no++;
|
|
|
+
|
|
|
//得出字符串
|
|
|
sno = countNo(dep.getAbbreviation(), sno, ty, no);
|
|
|
//迭代得出最后编码
|
|
|
@@ -280,7 +280,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
|
|
|
private String iterationNo(String sno ,Object mp, int ty, int no) {
|
|
|
if (tOrderNewMapper.checkContractNo(sno)>0) {
|
|
|
- int i=Integer.parseInt(sno.substring(sno.indexOf("-")+2, sno.length()-4));
|
|
|
+ int i=Integer.parseInt(sno.substring(sno.indexOf("-")+4, sno.length()-4));
|
|
|
sno=countNo(mp, sno, ty, i);
|
|
|
iterationNo(sno,mp,ty,i);
|
|
|
}
|
|
|
@@ -290,6 +290,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
|
|
|
|
|
|
private String countNo(Object object, String sno, int ty, int no) {
|
|
|
+ no++;
|
|
|
if (no>0&&no<10) {
|
|
|
sno=object+"-"+ty+"000"+no;
|
|
|
}else if (no>9&&no<100) {
|