Browse Source

/gov/org/grid/editgrid修改网格,增加中心点位

master
yinzuomei 4 years ago
parent
commit
1282927f0f
  1. 13
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditGridFormDTO.java
  2. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
  3. 6
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml

13
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditGridFormDTO.java

@ -59,4 +59,17 @@ public class EditGridFormDTO implements Serializable {
*/
private String mobile;
//02.21新增需求:小程序工作端添加组织增加中心点位置入口,点击进入地图选择点位,可以搜索,中心点为必填
//该接口为通用接口,后端暂时先不限制必填。由前端控制
/**
* 中心位置经度
*/
// @NotBlank(message = "请选择网格中心点位", groups = AddGridFormDTO.AddGrid.class)
private String longitude;
/**
* 中心位置纬度
*/
// @NotBlank(message = "请选择网格中心点位", groups = AddGridFormDTO.AddGrid.class)
private String latitude;
}

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java

@ -316,6 +316,12 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
customerGridDTO.setGridType(editGridFormDTO.getGridType());
customerGridDTO.setContacts(editGridFormDTO.getContacts());
customerGridDTO.setMobile(editGridFormDTO.getMobile());
if(StringUtils.isNotBlank(editGridFormDTO.getLongitude())){
customerGridDTO.setLongitude(editGridFormDTO.getLongitude());
}
if(StringUtils.isNotBlank(editGridFormDTO.getLatitude())){
customerGridDTO.setLatitude(editGridFormDTO.getLatitude());
}
baseDao.editGrid(customerGridDTO);
return new Result();

6
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml

@ -242,6 +242,12 @@
contacts = #{contacts},
mobile = #{mobile},
updated_by = #{updatedBy},
<if test="longitude != null and longitude !=''">
LONGITUDE= #{longitude},
</if>
<if test="latitude != null and latitude !=''">
LATITUDE= #{latitude},
</if>
UPDATED_TIME=NOW()
where
id = #{id}

Loading…
Cancel
Save