This commit is contained in:
parent
86615ca026
commit
c323536e2d
|
|
@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSONObject;
|
|||
import com.bonus.common.core.constant.UserConstants;
|
||||
import com.bonus.common.core.utils.FastJsonHelper;
|
||||
import com.bonus.common.core.utils.ImportExcelUtils;
|
||||
import com.bonus.common.core.utils.StringHelper;
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
|
|
@ -76,12 +77,14 @@ public class SysOrgServiceImpl implements SysOrgService {
|
|||
|
||||
@Override
|
||||
public int insertOrg(SysOrg org) {
|
||||
// Map<String, BigDecimal> map = AddressCoordinateFormatUtil.addressToCoordinate(org.getAddress());
|
||||
// if (map == null) {
|
||||
// return 3;
|
||||
// }
|
||||
// org.setLon(map.get("longitude"));
|
||||
// org.setLat(map.get("latitude"));
|
||||
if (org.getLat() == null || org.getLon()== null){
|
||||
Map<String, BigDecimal> map = AddressCoordinateFormatUtil.addressToCoordinate(org.getAddress());
|
||||
if (map == null) {
|
||||
return 3;
|
||||
}
|
||||
org.setLon(map.get("longitude"));
|
||||
org.setLat(map.get("latitude"));
|
||||
}
|
||||
int i = orgDao.insertOrg(org);
|
||||
if (i > 0) {
|
||||
msgPush(org);
|
||||
|
|
@ -105,12 +108,14 @@ public class SysOrgServiceImpl implements SysOrgService {
|
|||
|
||||
@Override
|
||||
public int updateOrg(SysOrg org) {
|
||||
// Map<String, BigDecimal> map = AddressCoordinateFormatUtil.addressToCoordinate(org.getAddress());
|
||||
// if (map == null) {
|
||||
// return 3;
|
||||
// }
|
||||
// org.setLon(map.get("longitude"));
|
||||
// org.setLat(map.get("latitude"));
|
||||
if (org.getLat() == null || org.getLon()== null){
|
||||
Map<String, BigDecimal> map = AddressCoordinateFormatUtil.addressToCoordinate(org.getAddress());
|
||||
if (map == null) {
|
||||
return 3;
|
||||
}
|
||||
org.setLon(map.get("longitude"));
|
||||
org.setLat(map.get("latitude"));
|
||||
}
|
||||
int i = orgDao.updateOrg(org);
|
||||
if (i > 0) {
|
||||
if (StringUtils.isNotBlank(org.getOrgHeadUserId())) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue