Commit 488f06a0324137530734ef0d87ca17277ac00c11
1 parent
31632d32
Update
Showing
2 changed files
with
11 additions
and
3 deletions
Too many changes to show.
To preserve performance only 2 of 4 files are displayed.
src/main/java/com/bsth/service/schedule/impl/CarDeviceServiceImpl.java
| @@ -7,6 +7,8 @@ import com.bsth.service.schedule.CarDeviceService; | @@ -7,6 +7,8 @@ import com.bsth.service.schedule.CarDeviceService; | ||
| 7 | import com.bsth.service.schedule.exception.ScheduleException; | 7 | import com.bsth.service.schedule.exception.ScheduleException; |
| 8 | import org.springframework.beans.factory.annotation.Autowired; | 8 | import org.springframework.beans.factory.annotation.Autowired; |
| 9 | import org.springframework.stereotype.Service; | 9 | import org.springframework.stereotype.Service; |
| 10 | +import org.springframework.transaction.annotation.Isolation; | ||
| 11 | +import org.springframework.transaction.annotation.Propagation; | ||
| 10 | import org.springframework.transaction.annotation.Transactional; | 12 | import org.springframework.transaction.annotation.Transactional; |
| 11 | import org.springframework.util.CollectionUtils; | 13 | import org.springframework.util.CollectionUtils; |
| 12 | 14 | ||
| @@ -21,7 +23,7 @@ public class CarDeviceServiceImpl extends BServiceImpl<CarDevice, Long> implemen | @@ -21,7 +23,7 @@ public class CarDeviceServiceImpl extends BServiceImpl<CarDevice, Long> implemen | ||
| 21 | @Autowired | 23 | @Autowired |
| 22 | private CarsService carsService; | 24 | private CarsService carsService; |
| 23 | 25 | ||
| 24 | - @Transactional | 26 | + @Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.READ_COMMITTED) |
| 25 | @Override | 27 | @Override |
| 26 | public CarDevice save(CarDevice carDevice) { | 28 | public CarDevice save(CarDevice carDevice) { |
| 27 | // 查找对应的车辆基础信息,更新设备编号数据 | 29 | // 查找对应的车辆基础信息,更新设备编号数据 |
src/main/java/com/bsth/service/schedule/impl/TTInfoDetailServiceImpl.java
| @@ -144,6 +144,11 @@ public class TTInfoDetailServiceImpl extends BServiceImpl<TTInfoDetail, Long> im | @@ -144,6 +144,11 @@ public class TTInfoDetailServiceImpl extends BServiceImpl<TTInfoDetail, Long> im | ||
| 144 | return ttInfoDetailForEdit.getEditInfo(xlid, ttid, maxfcno); | 144 | return ttInfoDetailForEdit.getEditInfo(xlid, ttid, maxfcno); |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | + public static void main(String[] args) { | ||
| 148 | + String test = "中1中111"; | ||
| 149 | + System.out.println(test.replaceAll("(\\d+)$", "")); | ||
| 150 | + } | ||
| 151 | + | ||
| 147 | @Override | 152 | @Override |
| 148 | public void validateExcelSheet(String filename, String sheetname, Integer lineid, String linename) throws ScheduleException { | 153 | public void validateExcelSheet(String filename, String sheetname, Integer lineid, String linename) throws ScheduleException { |
| 149 | try { | 154 | try { |
| @@ -162,8 +167,9 @@ public class TTInfoDetailServiceImpl extends BServiceImpl<TTInfoDetail, Long> im | @@ -162,8 +167,9 @@ public class TTInfoDetailServiceImpl extends BServiceImpl<TTInfoDetail, Long> im | ||
| 162 | if (StringUtils.isEmpty(cell_con)) { | 167 | if (StringUtils.isEmpty(cell_con)) { |
| 163 | throw new Exception(String.format("第1行,第%d列数据不能为空", i + 1)); | 168 | throw new Exception(String.format("第1行,第%d列数据不能为空", i + 1)); |
| 164 | } else { | 169 | } else { |
| 165 | - // 正则表达式去除数字 | ||
| 166 | - cell_con = cell_con.replaceAll("[\\d+]", ""); | 170 | + // 正则表达式去除右侧数字 |
| 171 | +// cell_con = cell_con.replaceAll("[\\d+]", ""); | ||
| 172 | + cell_con = cell_con.replaceAll("(\\d+)$", ""); | ||
| 167 | 173 | ||
| 168 | if (i == 0) { // 第一列必须是路牌2个字 | 174 | if (i == 0) { // 第一列必须是路牌2个字 |
| 169 | if (!"路牌".equals(cell_con.trim())) { | 175 | if (!"路牌".equals(cell_con.trim())) { |