三只松鼠 4 anni fa
parent
commit
1fb74b4be8
1 ha cambiato i file con 7 aggiunte e 3 eliminazioni
  1. +7
    -3
      src/main/java/com/taauav/app/service/impl/InspectAppServiceImpl.java

+ 7
- 3
src/main/java/com/taauav/app/service/impl/InspectAppServiceImpl.java Vedi File

@@ -99,7 +99,7 @@ public class InspectAppServiceImpl extends ServiceImpl<InspectAppMapper, TauvIns
entity.setDriverId(inspectAppDto.getDriverId());
entity.setBeginTime(DateUtil.now());
entity.setStatus(1);
entity.setLength(Double.valueOf(driver.getLength()));
entity.setLength(!StringUtils.isEmpty(driver.getLength()) ? Double.valueOf(driver.getLength()) : 0);
entity.setFrom(inspectAppDto.getFrom());
entity.setAppVersion(inspectAppDto.getAppVersion());
entity.setCreateUser(ShiroUtils.getAdminId());
@@ -126,8 +126,12 @@ public class InspectAppServiceImpl extends ServiceImpl<InspectAppMapper, TauvIns
inspectDriver.setSource(2);
inspectDriver.setDriverName(driver.getName());
inspectDriver.setDriverArea(driver.getDriverArea());
BigDecimal bigDecimal = new BigDecimal(driver.getLength());
inspectDriver.setDriverLength(bigDecimal);
if (!StringUtils.isEmpty(driver.getLength())) {
BigDecimal bigDecimal = new BigDecimal(driver.getLength());
inspectDriver.setDriverLength(bigDecimal);
} else {
inspectDriver.setDriverLength(null);
}
inspectDriver.setDriverStart(driver.getStartPoint());
inspectDriver.setDriverEnd(driver.getEndPoint());
inspectDriver.setInspectNo(entity.getInspectNo());

Loading…
Annulla
Salva