Commit 336b258c61eb42fceb62cecc7755418934294a09

Authored by 潘钊
2 parents 90ef1850 8f19eb25

Merge branch 'minhang' of http://222.66.0.204:8090/panzhaov5/bsth_control into minhang

Too many changes to show.

To preserve performance only 4 of 10 files are displayed.

src/main/java/com/bsth/data/pinyin/PersionPinYin.java
... ... @@ -9,6 +9,11 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
9 9 public class PersionPinYin {
10 10  
11 11 /**
  12 + * Id
  13 + */
  14 + private Integer id;
  15 +
  16 + /**
12 17 * 工号
13 18 */
14 19 private String workId;
... ... @@ -87,4 +92,12 @@ public class PersionPinYin {
87 92 public void setFgsCompanyId(String fgsCompanyId) {
88 93 this.fgsCompanyId = fgsCompanyId;
89 94 }
  95 +
  96 + public Integer getId() {
  97 + return id;
  98 + }
  99 +
  100 + public void setId(Integer id) {
  101 + this.id = id;
  102 + }
90 103 }
... ...
src/main/java/com/bsth/data/pinyin/PersionPinYinBuffer.java
... ... @@ -36,6 +36,7 @@ public class PersionPinYinBuffer {
36 36 Collection<Personnel> list = BasicData.perMap.values();
37 37 for(Personnel p : list){
38 38 ppy = new PersionPinYin();
  39 + ppy.setId(p.getId());
39 40 ppy.setCompanyId(p.getCompanyCode());
40 41 ppy.setFgsCompanyId(p.getBrancheCompanyCode());
41 42 ppy.setName(p.getPersonnelName());
... ...
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&lt;CarDevice, Long&gt; 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&lt;TTInfoDetail, Long&gt; 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&lt;TTInfoDetail, Long&gt; 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())) {
... ...