浏览代码

更新

master
三只松鼠 4 年前
父节点
当前提交
1fb74b4be8
共有 1 个文件被更改,包括 7 次插入3 次删除
  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 查看文件

@@ -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());

正在加载...
取消
保存