Commit 488f06a0324137530734ef0d87ca17277ac00c11

Authored by 徐烜
1 parent 31632d32

Update

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 7 import com.bsth.service.schedule.exception.ScheduleException;
8 8 import org.springframework.beans.factory.annotation.Autowired;
9 9 import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Isolation;
  11 +import org.springframework.transaction.annotation.Propagation;
10 12 import org.springframework.transaction.annotation.Transactional;
11 13 import org.springframework.util.CollectionUtils;
12 14  
... ... @@ -21,7 +23,7 @@ public class CarDeviceServiceImpl extends BServiceImpl<CarDevice, Long> implemen
21 23 @Autowired
22 24 private CarsService carsService;
23 25  
24   - @Transactional
  26 + @Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.READ_COMMITTED)
25 27 @Override
26 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 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 152 @Override
148 153 public void validateExcelSheet(String filename, String sheetname, Integer lineid, String linename) throws ScheduleException {
149 154 try {
... ... @@ -162,8 +167,9 @@ public class TTInfoDetailServiceImpl extends BServiceImpl<TTInfoDetail, Long> im
162 167 if (StringUtils.isEmpty(cell_con)) {
163 168 throw new Exception(String.format("第1行,第%d列数据不能为空", i + 1));
164 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 174 if (i == 0) { // 第一列必须是路牌2个字
169 175 if (!"路牌".equals(cell_con.trim())) {
... ...