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

bug

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