|
@@ -35,17 +35,12 @@ public class ZhcxCommissionCheckParameterSetDetalServiceImpl extends ServiceImpl
|
|
|
if(StringUtils.isEmpty(masterId)){
|
|
|
return R.error("试车主表ID不能为空");
|
|
|
}
|
|
|
- /*LambdaQueryWrapper<ZhcxCommissionCheckParameterSetDetalDo> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper.eq(ZhcxCommissionCheckParameterSetDetalDo::getDeleted,"0")
|
|
|
- .eq(ZhcxCommissionCheckParameterSetDetalDo::getCheckid,masterId);
|
|
|
- List<ZhcxCommissionCheckParameterSetDetalDo> list = this.list(queryWrapper);*/
|
|
|
List<ZhcxCommissionCheckParameterSetDetalDo> list = baseMapper.getAllByCheckidOrId(masterId);
|
|
|
if (list.size() != 1){
|
|
|
- //return R.error("试车参数数据异常");
|
|
|
- return R.ok();
|
|
|
+ return R.ok("试车参数数据异常");
|
|
|
}
|
|
|
ZhcxCommissionCheckParameterSetDetalDo parameterSetDetalDo = list.get(0);
|
|
|
- // 前端已经计算了
|
|
|
+ // 前端已经计算了 填入开始时间
|
|
|
if(Objects.isNull(parameterSetDetalDo.getBegindate())){
|
|
|
parameterSetDetalDo.setBegindate(parameterSetDetalDo.getRecentlyTime());
|
|
|
}
|
|
@@ -57,9 +52,8 @@ public class ZhcxCommissionCheckParameterSetDetalServiceImpl extends ServiceImpl
|
|
|
return R.ok("每天试车时间为空");
|
|
|
}
|
|
|
if(StringUtils.isEmpty(parameterSetDetalDo.getEESIDUALTIME())){
|
|
|
- return R.ok("剩余试车时间(min)为空");
|
|
|
+ return R.ok("剩余试车时间(min)为空,该试车检查内容已全部完成");
|
|
|
}
|
|
|
- // let days = Math.ceil((eesidualtime / (dailyTime * 60)) ;
|
|
|
double eesidualtime = Double.parseDouble(parameterSetDetalDo.getEESIDUALTIME());
|
|
|
double dailytime = Double.parseDouble(parameterSetDetalDo.getDailytime());
|
|
|
int days = (int) Math.ceil(eesidualtime / (dailytime * 60));
|