| | |
| | | public void addTypeSize(FieldSetEntity fs) throws BaseException {
|
| | | String tableName = fs.getTableName();
|
| | | String yearNo = fs.getString("no01");
|
| | | |
| | |
|
| | | //查询同字数据中最大的号
|
| | | FieldSetEntity fseMax =baseDao.getFieldSetEntityBySQL("SELECT IFNULL(MAX(no02),0)+1 no02 FROM "+tableName+" WHERE no01=?", new Object[] {yearNo}, false);
|
| | | FieldSetEntity fseMax =baseDao.getFieldSetEntityBySQL("SELECT CONVERT(IFNULL(MAX(no02),0)+1,UNSIGNED INT ) no02 FROM "+tableName+" WHERE no01=?", new Object[] {yearNo}, false);
|
| | | if (fseMax!=null) {
|
| | | Integer maxNo = fseMax.getInteger("no02");
|
| | | |
| | |
|
| | | //格式化号
|
| | | Format format = new DecimalFormat("000");
|
| | | String finalNo= format.format(maxNo);
|
| | | |
| | |
|
| | | //修改数据
|
| | | baseDao.executeUpdate("UPDATE "+ tableName +" SET no02 =? WHERE uuid=?", new Object[] {finalNo, fs.getUUID()});
|
| | | }
|