Commit c6fd0660 authored by 李腾威's avatar 李腾威

bug 3808

parent cd4b3fbc
......@@ -536,6 +536,12 @@ public class CommandController extends BaseController {
String str = jsonObject.get("buildDate").toString();
Date date = new Date(Long.parseLong(str));
jsonObject.put("buildDate", DateUtils.convertDateToString(date,DateUtils.DATE_TIME_PATTERN));
} else {
jsonObject.put("buildDate", "");
}
if(ValidationUtil.isEmpty(jsonObject.get("intakeHeight"))) {
jsonObject.put("intakeHeight", "");
}
return ResponseHelper.buildResponse(jsonObject);
......
......@@ -31,6 +31,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.annotation.Condition;
import org.typroject.tyboot.core.rdbms.annotation.Operator;
import org.typroject.tyboot.core.rdbms.service.BaseService;
......@@ -204,6 +205,28 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
WaterResourceDto waterResourceDto = this.queryBySeq(sequenceNbr);
waterResourceDto.setRealityImgList(JSONArray.parseArray(waterResourceDto.getRealityImg(), Object.class));
waterResourceDto.setOrientationImgList(JSONArray.parseArray(waterResourceDto.getOrientationImg()));
if(ValidationUtil.isEmpty(waterResourceDto.getContactUser())) {
waterResourceDto.setContactUser("");
}
if(ValidationUtil.isEmpty(waterResourceDto.getContactPhone())) {
waterResourceDto.setContactPhone("");
}
if(ValidationUtil.isEmpty(waterResourceDto.getManagementUnit())) {
waterResourceDto.setManagementUnit("");
}
if(ValidationUtil.isEmpty(waterResourceDto.getSection())) {
waterResourceDto.setSection("");
}
if(ValidationUtil.isEmpty(waterResourceDto.getWaterSupplyName())) {
waterResourceDto.setWaterSupplyName("");
}
Boolean isDelete = waterResourceDto.getIsDelete();
// 查询属性信息
String resourceType = waterResourceDto.getResourceType();
......@@ -214,20 +237,27 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
waterResourceHydrantService.getOne(new QueryWrapper<WaterResourceHydrant>().eq(
"resource_id",
sequenceNbr));
BeanUtils.copyProperties(waterResourceHydrant, waterResourceDto);
if(null != waterResourceHydrant) {
BeanUtils.copyProperties(waterResourceHydrant, waterResourceDto);
}
break;
case "crane":
WaterResourceCrane waterResourceCrane =
waterResourceCraneService.getOne(new QueryWrapper<WaterResourceCrane>().eq("resource_id",
sequenceNbr));
BeanUtils.copyProperties(waterResourceCrane, waterResourceDto);
if(null != waterResourceCrane) {
BeanUtils.copyProperties(waterResourceCrane, waterResourceDto);
}
break;
case "natural":
WaterResourceNatural waterResourceNatural =
waterResourceNaturalService.getOne(new QueryWrapper<WaterResourceNatural>().eq(
"resource_id",
sequenceNbr));
BeanUtils.copyProperties(waterResourceNatural, waterResourceDto);
if(null != waterResourceNatural) {
BeanUtils.copyProperties(waterResourceNatural, waterResourceDto);
}
break;
case "pool":
WaterResourcePool waterResourcePool =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment