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

bug

3817 3815
parent 285cb763
......@@ -533,9 +533,8 @@ public class CommandController extends BaseController {
JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(iWaterResourceService.selectBySequenceNbr(id)));
if(!ValidationUtil.isEmpty(jsonObject.get("buildDate"))) {
LocalDateTime dateTime = (LocalDateTime) jsonObject.get("buildDate");
Date date = Date.from(dateTime.toInstant(ZoneOffset.of("+8")));
jsonObject.remove("buildDate");
String str = jsonObject.get("buildDate").toString();
Date date = new Date(Long.parseLong(str));
jsonObject.put("buildDate", DateUtils.convertDateToString(date,DateUtils.DATE_TIME_PATTERN));
}
......
......@@ -134,6 +134,15 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat
model.setBizCompany(orgUsr.getBizOrgName());
model.setBizCompanyCode(orgUsr.getBizOrgCode());
}
// 地址处理
if (model.getAddress() != null) {
JSONObject address = WaterResourceServiceImpl.getLongLatFromAddress(model.getAddress());
model.setAddress(address.getString(BizConstant.ADDRESS));
model.setLongitude(Double.valueOf(address.getString(BizConstant.LONGITUDE)));
model.setLatitude(Double.valueOf(address.getString(BizConstant.LATITUDE)));
}
FireStation entity = this.prepareEntity(model);
this.updateById(entity);
return Bean.toModel(entity, model);
......
......@@ -233,7 +233,9 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
WaterResourcePool waterResourcePool =
waterResourcePoolService.getOne(new QueryWrapper<WaterResourcePool>().eq("resource_id",
sequenceNbr));
BeanUtils.copyProperties(waterResourcePool, waterResourceDto);
if(null != waterResourcePool) {
BeanUtils.copyProperties(waterResourcePool, waterResourceDto);
}
break;
}
}
......
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