Browse Source

Merge branches 'dev_change_communitySelfOrganization' and 'master' of http://121.42.41.42:7070/r/epmet-cloud into dev_change_communitySelfOrganization

 Conflicts:
	epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java
master
yinzuomei 3 years ago
parent
commit
a1d9c6b677
  1. 10
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java
  2. BIN
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/templates/self_org_import_template.xlsx
  3. 13
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/MapAddAreaFormDTO.java
  4. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
  5. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java
  6. 7
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

10
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java

@ -540,8 +540,8 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo
//社会自组织名称重复
communitySeltOrgList.forEach(org -> {
if (obj.getOrganizationName().equals(org.getOrganizationName())) {
log.warn(String.format("当前客户下的社自组织名称已存在,社会自组织名称->%s,行号->%s", obj.getOrganizationName(), obj.getRowNum()));
errMsg.append("客户下社自组织名称已存在;");
log.warn(String.format("当前客户下的社自组织名称已存在,社会自组织名称->%s,行号->%s", obj.getOrganizationName(), obj.getRowNum()));
errMsg.append("客户下社自组织名称已存在;");
bl.set(true);
}
});
@ -574,12 +574,16 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo
e.setOrgType(IcCommunitySelfOrganizationConstant.ORG_TYPE_AGENCY);
e.setPid(agencyInfo.getPid());
e.setPids(agencyInfo.getPids());
// e.setOrganizationCreatedTime(StringUtils.isNotBlank(l.getOrganizationCreatedTime()) ? DateUtils.parse(l.getOrganizationCreatedTime(), DATE_PATTERN) : new Date());
e.setOrganizationCreatedTime(DateUtils.stringToDate(l.getOrganizationCreatedTime(), DATE_PATTERN));
//赋值分类编码,excel输入的是分类名称,需要找到admin字典库中的key
for (String key : categoryMap.keySet()) {
log.info("*******key="+key+";categoryMap.get(key)="+categoryMap.get(key)+";e.getCategoryCode()="+e.getCategoryCode());
if (StringUtils.isNotBlank(categoryMap.get(key)) && categoryMap.get(key).equals(e.getCategoryCode())) {
e.setCategoryCode(categoryMap.get(key));
e.setCategoryCode(key);
break;
}else{
e.setCategoryCode(StrConstant.EPMETY_STR);
}
}
List<IcCommunitySelfOrganizationPersonnelEntity> persons = new ArrayList<>();

BIN
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/templates/self_org_import_template.xlsx

Binary file not shown.

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

@ -3,6 +3,7 @@ package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
/**
@ -28,4 +29,16 @@ public class MapAddAreaFormDTO implements Serializable {
@NotBlank(message = "coordinates不能为空",groups = MapAddAreaForm.class)
private String coordinates;
/**
* 中心位置经度 经纬度同时填写才更新
*/
@Pattern(regexp = "^([-+])?\\d+(\\.\\d+)?$", message = "请输入正确的经度值",groups = MapAddAreaForm.class)
private String longitude;
/**
* 中心位置纬度
*/
@Pattern(regexp = "^([-+])?\\d+(\\.\\d+)?$", message = "请输入正确的纬度值",groups = MapAddAreaForm.class)
private String latitude;
}

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java

@ -273,7 +273,7 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
* @author zxc
* @date 2021/10/25 9:59 上午
*/
void addMapArea(@Param("orgId") String orgId, @Param("level") String level, @Param("coordinates") String coordinates);
void addMapArea(@Param("orgId") String orgId, @Param("level") String level, @Param("coordinates") String coordinates, @Param("latitude") String latitude, @Param("longitude") String longitude);
/**
* @param pid

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java

@ -711,7 +711,7 @@ public class AgencyServiceImpl implements AgencyService {
*/
@Override
public void mapAddArea(MapAddAreaFormDTO formDTO) {
customerAgencyDao.addMapArea(formDTO.getOrgId(), formDTO.getLevel(), formDTO.getCoordinates());
customerAgencyDao.addMapArea(formDTO.getOrgId(), formDTO.getLevel(), formDTO.getCoordinates(), formDTO.getLatitude(), formDTO.getLongitude());
}
/**

7
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

@ -37,7 +37,12 @@
ic_neighbor_hood
</if>
SET
COORDINATES = #{coordinates},
<if test="latitude != null and latitude.trim() != '' and longitude != null and longitude.trim() != ''">
LATITUDE = #{latitude},LONGITUDE = #{longitude},
</if>
<if test="coordinates != null and coordinates.trim() != ''">
COORDINATES = #{coordinates},
</if>
UPDATED_TIME = NOW()
WHERE ID = #{orgId}
AND DEL_FLAG = '0'

Loading…
Cancel
Save