Browse Source

Merge branch 'dev_bugfix' into dev_temp

dev_shibei_match
wxz 5 years ago
parent
commit
7add925bff
  1. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  2. 12
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java
  3. 2
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java

@ -68,6 +68,7 @@ public enum EpmetErrorCode {
NOT_DEL_AGENCY(8202, "该机关存在下级机关,不允许删除"),
NOT_DEL_AGENCY_PER(8205, "该机关存在工作人员,不允许删除"),
NOT_DEL_DEPARTMENT(8206, "该部门存在工作人员,不允许删除"),
NOT_DEL_AGENCY_GRID(8207, "该机关存在网格,不允许删除"),
REQUIRE_PERMISSION(8301, "您没有足够的操作权限"),

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

@ -26,6 +26,7 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.CustomerAgencyConstant;
import com.epmet.constant.RoleKeyConstants;
import com.epmet.dao.CustomerAgencyDao;
import com.epmet.dao.CustomerGridDao;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.GovStaffRoleDTO;
import com.epmet.dto.form.*;
@ -64,6 +65,8 @@ public class AgencyServiceImpl implements AgencyService {
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Autowired
private StaffServiceImpl staffServiceImpl;
@Autowired
private CustomerGridDao customerGridDao;
/**
* @param formDTO
@ -188,7 +191,14 @@ public class AgencyServiceImpl implements AgencyService {
result.setMsg(EpmetErrorCode.NOT_DEL_AGENCY_PER.getMsg());
return result;
}
//3:删除当前机关组织(逻辑删)
//3:组织下有网格,不允许删除
int gridCount = customerGridDao.selectGridCountByAgencyId(formDTO.getAgencyId());
if (gridCount > NumConstant.ZERO) {
result.setCode(EpmetErrorCode.NOT_DEL_AGENCY_GRID.getCode());
result.setMsg(EpmetErrorCode.NOT_DEL_AGENCY_GRID.getMsg());
return result;
}
//4:删除当前机关组织(逻辑删)
if (customerAgencyDao.deleteById(formDTO.getAgencyId()) < NumConstant.ONE) {
log.error(CustomerAgencyConstant.DEL_EXCEPTION);
throw new RenException(CustomerAgencyConstant.DEL_EXCEPTION);

2
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java

@ -1259,7 +1259,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
isPartymember = true;
}
}
if (!isWarmhearted && isPartymember) {
if (!isWarmhearted && !isPartymember) {
throw new RenException(EpmetErrorCode.CANNOT_CREATE_GROUP.getCode(), "只有党员和热心居民才能创建和编辑小组");
}
String roleName = "";

Loading…
Cancel
Save