Browse Source

Merge branch 'dev' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev_govorg

 Conflicts:
	epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
	epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
dev_shibei_match
wxz 5 years ago
parent
commit
3b1a4bb067
  1. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  2. 2
      epmet-module/gov-access/gov-access-server/docker-compose.yml
  3. 2
      epmet-module/gov-access/gov-access-server/pom.xml
  4. 5
      epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/CertifiedDetailResultDTO.java
  5. 2
      epmet-module/gov-grid/gov-grid-server/docker-compose.yml
  6. 2
      epmet-module/gov-grid/gov-grid-server/pom.xml
  7. 2
      epmet-module/gov-mine/gov-mine-server/docker-compose.yml
  8. 2
      epmet-module/gov-mine/gov-mine-server/pom.xml
  9. 4
      epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/controller/StaffAgencyController.java
  10. 48
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/UserIdAndPidDTO.java
  11. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddDepartmentStaffFormDTO.java
  12. 2
      epmet-module/gov-org/gov-org-server/docker-compose.yml
  13. 2
      epmet-module/gov-org/gov-org-server/pom.xml
  14. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
  15. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerDepartmentDao.java
  16. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java
  17. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java
  18. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallBack.java
  19. 26
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
  20. 14
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/DepartmentServiceImpl.java
  21. 11
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
  22. 11
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerDepartmentDao.xml
  23. 14
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml
  24. 2
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffDepartmentDao.xml
  25. 36
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java
  26. 11
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/utils/ModuleConstant.java
  27. 5
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/CertifiedDetailResultDTO.java
  28. 2
      epmet-module/resi-partymember/resi-partymember-server/docker-compose.yml
  29. 2
      epmet-module/resi-partymember/resi-partymember-server/pom.xml
  30. 6
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/PartymemberBaseInfoController.java
  31. 18
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java
  32. 17
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberBaseInfoDao.xml
  33. 3
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberInfoDao.xml
  34. 2
      epmet-user/epmet-user-server/docker-compose.yml
  35. 2
      epmet-user/epmet-user-server/pom.xml
  36. 35
      epmet-user/epmet-user-server/src/main/java/com/epmet/constant/UserRoleConstant.java
  37. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java
  38. 3
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffGridVisitedController.java
  39. 3
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserInvitationController.java
  40. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java
  41. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java
  42. 24
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java
  43. 6
      epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml
  44. 2
      epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml

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

@ -15,7 +15,7 @@ public enum EpmetErrorCode {
CANNOT_JOIN_GROUP(8001, "只有认证党员和居民才可以加入小组,请选择您的身份"),
CANNOT_CREATE_GROUP(8002, "只有党员和热心居民才能创建小组,请选择您的身份"),
GROUP_ALREADY_EXISTED(8003,"组名已存在"),
GOV_STAFF_NOT_EXISTS(8004,"未找到您所属的组织,请联系您单位的管理员,确认其录入的手机号和您注册的号码一致。"),
GOV_STAFF_NOT_EXISTS(8004,"手机号未注册,请联系贵单位管理员,确认其录入手机与您所持手机号相同"),
GOV_STAFF_DISABLED(8005,"您好,您的账户已被冻结,请联系管理员。"),
LOSE_EFFICACY(8006,"此邀请链接已过期"),
ERROR_PHONE(8007,"请输入正确的手机号"),

2
epmet-module/gov-access/gov-access-server/docker-compose.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-access-server:
container_name: gov-access-server-dev
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/gov-access-server:0.3.2
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/gov-access-server:0.3.3
ports:
- "8099:8099"
network_mode: host # 使用现有网络

2
epmet-module/gov-access/gov-access-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<version>0.3.2</version>
<version>0.3.3</version>
<parent>
<artifactId>gov-access</artifactId>
<groupId>com.epmet</groupId>

5
epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/CertifiedDetailResultDTO.java

@ -69,4 +69,9 @@ public class CertifiedDetailResultDTO implements Serializable {
*/
private String contactMobile;
/**
* 居住地址
*/
private String address;
}

2
epmet-module/gov-grid/gov-grid-server/docker-compose.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-grid-server:
container_name: gov-grid-server-dev
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/gov-grid-server:0.3.5
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/gov-grid-server:0.3.6
ports:
- "8097:8097"
network_mode: host # 使用现有网络

2
epmet-module/gov-grid/gov-grid-server/pom.xml

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.5</version>
<version>0.3.6</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>gov-grid</artifactId>

2
epmet-module/gov-mine/gov-mine-server/docker-compose.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-mine-server:
container_name: gov-mine-server-dev
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/gov-mine-server:0.3.3
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/gov-mine-server:0.3.4
ports:
- "8098:8098"
network_mode: host # 使用现有网络

2
epmet-module/gov-mine/gov-mine-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<version>0.3.3</version>
<version>0.3.4</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>gov-mine</artifactId>

4
epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/controller/StaffAgencyController.java

@ -77,10 +77,12 @@ public class StaffAgencyController {
* @Date 2020/4/23 10:34
**/
@PostMapping("switchgrid")
public Result switchGrid(@LoginUser TokenDto tokenDto, @RequestBody @Valid SwitchGridFormDTO switchGridFormDTO) {
public Result switchGrid(@LoginUser TokenDto tokenDto, @RequestBody SwitchGridFormDTO switchGridFormDTO) {
switchGridFormDTO.setStaffId(tokenDto.getUserId());
ValidatorUtils.validateEntity(switchGridFormDTO);
return staffAgencyService.switchGrid(switchGridFormDTO);
}
/**
* @Description 得到工作人员最后一次登录的网格
* @Param TokenDto -> userId/staffId

48
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/UserIdAndPidDTO.java

@ -0,0 +1,48 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 网格人员关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20
*/
@Data
public class UserIdAndPidDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 用户id, user.id
*/
private String userId;
/**
* pid 所属机关id
*/
private String pid;
}

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddDepartmentStaffFormDTO.java

@ -26,6 +26,6 @@ public class AddDepartmentStaffFormDTO implements Serializable {
* 选中人员id
*/
@NotBlank(message = "选中人员不能为空")
private List selectedList;
private List<String> selectedList;
}

2
epmet-module/gov-org/gov-org-server/docker-compose.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-org-server:
container_name: gov-org-server-dev
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/gov-org-server:0.3.10
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/gov-org-server:0.3.20
ports:
- "8092:8092"
network_mode: host # 使用现有网络

2
epmet-module/gov-org/gov-org-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.10</version>
<version>0.3.20</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>gov-org</artifactId>

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

@ -79,4 +79,12 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
List<CustomerAgencyDTO> selectFindList(CustomerAgencyDTO customerAgencyDTO);
CustomerAgencyEntity getAgencyByStaffId(@Param("staffId") String staffId);
/**
* @Description 根据agencyId查询地区编码
* @param agencyId 所属机关id
* @author zxc
* @date 2020/4/28 15:50
*/
String selectAreaCodeByAgencyId(@Param("agencyId") String agencyId);
}

9
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerDepartmentDao.java

@ -18,6 +18,7 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.CustomerIdDTO;
import com.epmet.dto.result.DepartmentListResultDTO;
import com.epmet.dto.result.SubListResultDTO;
import com.epmet.entity.CustomerDepartmentEntity;
@ -56,4 +57,12 @@ public interface CustomerDepartmentDao extends BaseDao<CustomerDepartmentEntity>
* @return
*/
List<DepartmentListResultDTO> listDepartmentListByStaffId(@Param("staffId") String staffId);
/**
* @Description 根据departmentId查询customerId
* @param departmentId
* @author zxc
* @date 2020/4/28 12:26
*/
CustomerIdDTO selectCustomerIdByDepartmentId(@Param("departmentId") String departmentId);
}

5
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java

@ -18,6 +18,7 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.UserIdAndPidDTO;
import com.epmet.dto.form.ListCustomerGridFormDTO;
import com.epmet.dto.form.SelectGridNameByGridIdFormDTO;
import com.epmet.dto.result.*;
@ -93,11 +94,11 @@ public interface CustomerGridDao extends BaseDao<CustomerGridEntity> {
GridDetailResultDTO griddetail(CustomerGridFormDTO customerGridFormDTO);
/**
* 根据gridId查询uerId
* 根据gridId查询uerId和pid
* @param customerGridFormDTO
* @return
*/
List<CustomerStaffGridDTO> selectUserIdByGridId(CustomerGridFormDTO customerGridFormDTO);
List<UserIdAndPidDTO> selectUserIdByGridId(CustomerGridFormDTO customerGridFormDTO);
/**
* 根据userId查询customerId

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java

@ -51,7 +51,7 @@ public interface EpmetUserFeignClient {
* @return
*/
@PostMapping("/epmetuser/customerstaff/selectstaffgridlistbyuserid")
Result<List<StaffGridListDTO>> getStaffGridList(@RequestBody List<CustomerStaffGridDTO> customerStaffGridDTOS);
Result<List<StaffGridListDTO>> getStaffGridList(@RequestBody List<UserIdAndPidDTO> customerStaffGridDTOS);
/**
* 组织首页-工作人员列表

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallBack.java

@ -37,7 +37,7 @@ public class EpmetUserFeignClientFallBack implements EpmetUserFeignClient {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getCustomerStaffInfoByUserId", formDTO);
}
@Override
public Result<List<StaffGridListDTO>> getStaffGridList(List<CustomerStaffGridDTO> customerStaffGridDTOS) {
public Result<List<StaffGridListDTO>> getStaffGridList(List<UserIdAndPidDTO> customerStaffGridDTOS) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getStaffGridList", customerStaffGridDTOS);
}

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

@ -29,6 +29,7 @@ import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.CustomerGridConstant;
import com.epmet.dao.CustomerAgencyDao;
import com.epmet.dao.CustomerGridDao;
import com.epmet.dao.CustomerStaffGridDao;
import com.epmet.dto.*;
@ -70,6 +71,8 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
private CustomerStaffGridService customerStaffGridService;
@Autowired
private CustomerStaffGridDao customerStaffGridDao;
@Autowired
private CustomerAgencyDao customerAgencyDao;
@Override
public PageData<CustomerGridDTO> page(Map<String, Object> params) {
@ -186,7 +189,7 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
@Override
public Result<GridDetailResultDTO> griddetail(CustomerGridFormDTO customerGridFormDTO) {
GridDetailResultDTO griddetail = baseDao.griddetail(customerGridFormDTO);
List<CustomerStaffGridDTO> customerStaffGridDTOS = baseDao.selectUserIdByGridId(customerGridFormDTO);
List<UserIdAndPidDTO> customerStaffGridDTOS = baseDao.selectUserIdByGridId(customerGridFormDTO);
//获取人员具体信息(头像、名字...)
Result<List<StaffGridListDTO>> staffGridList = epmetUserFeignClient.getStaffGridList(customerStaffGridDTOS);
griddetail.setStaffGridList(staffGridList.getData());
@ -196,21 +199,22 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
@Override
@Transactional(rollbackFor = Exception.class)
public Result<AddGridResultDTO> addGrid(TokenDto tokenDto, AddGridFormDTO addGridFormDTO) {
//查询是否重名
String checkGridName = baseDao.selectGridIdByGridName(addGridFormDTO.getGridName(),addGridFormDTO.getAgencyId(),null);
if (checkGridName!=null){
return new Result().error(EpmetErrorCode.NOT_ADD_GRID.getCode());
}
//查询地区编码
String areaCode = customerAgencyDao.selectAreaCodeByAgencyId(addGridFormDTO.getAgencyId());
CustomerGridEntity customerGridEntity = new CustomerGridEntity();
customerGridEntity.setCustomerId(baseDao.selectCustomerIdByUserId(tokenDto.getUserId()));
customerGridEntity.setAreaCode(areaCode);
customerGridEntity.setCustomerId(baseDao.selectCustomerIdByUserId(tokenDto.getUserId()));//查询customerId
customerGridEntity.setGridName(addGridFormDTO.getGridName());
customerGridEntity.setDelFlag("0");
customerGridEntity.setCreatedBy(tokenDto.getUserId());
customerGridEntity.setUpdatedBy(tokenDto.getUserId());
customerGridEntity.setTotalUser(0);
customerGridEntity.setManageDistrict(addGridFormDTO.getManageDistrict());
customerGridEntity.setPid(addGridFormDTO.getAgencyId());
customerGridEntity.setPids(baseDao.selectPidsByPid(addGridFormDTO.getAgencyId()));
customerGridEntity.setPids(baseDao.selectPidsByPid(addGridFormDTO.getAgencyId()));//查询所有上级组织id
baseDao.insert(customerGridEntity);
//查询刚刚添加的gridId
String gridId = baseDao.selectGridIdByGridName(addGridFormDTO.getGridName(),addGridFormDTO.getAgencyId(),null);
AddGridResultDTO addGridResultDTO = new AddGridResultDTO();
addGridResultDTO.setGridId(gridId);
@ -243,12 +247,16 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
public Result deleteGrid(TokenDto tokenDto,DeleteGridFormDTO deleteGridFormDTO) {
List<UserIdDTO> userIdDTOS = baseDao.selectUserIdByGrid(deleteGridFormDTO.getGridId());
deleteGridFormDTO.setUserId(tokenDto.getUserId());
Result<GridStaffCountDTO> gridStaffCountDTOResult = epmetUserFeignClient.selectGridStaffCountByUserId(userIdDTOS);
if (gridStaffCountDTOResult.getData().getEnableCount()==0){
if (userIdDTOS.size()==0){
baseDao.deleteGrid(deleteGridFormDTO);
}else {
Result<GridStaffCountDTO> gridStaffCountDTOResult = epmetUserFeignClient.selectGridStaffCountByUserId(userIdDTOS);
if (gridStaffCountDTOResult.getData().getEnableCount() == 0) {
baseDao.deleteGrid(deleteGridFormDTO);
} else {
return new Result().error(EpmetErrorCode.NOT_DEL_GRID.getCode());
}
}
return new Result();
}

14
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/DepartmentServiceImpl.java

@ -222,20 +222,16 @@ public class DepartmentServiceImpl implements DepartmentService {
@Override
@Transactional(rollbackFor = Exception.class)
public Result addDepartmentStaff(TokenDto tokenDto,AddDepartmentStaffFormDTO addDepartmentStaffFormDTO) {
CustomerIdDTO customerIdDTO = customerDepartmentDao.selectCustomerIdByDepartmentId(addDepartmentStaffFormDTO.getDepartmentId());
for (String userId : addDepartmentStaffFormDTO.getSelectedList()) {
CustomerStaffDepartmentEntity customerStaffDepartmentEntity = new CustomerStaffDepartmentEntity();
Result<List<CustomerIdDTO>> listResult = epmetUserFeignClient.selectCustomerIdByUserId(addDepartmentStaffFormDTO);
List<CustomerIdDTO> data = listResult.getData();
customerStaffDepartmentEntity.setDepartmentId(addDepartmentStaffFormDTO.getDepartmentId());
customerStaffDepartmentEntity.setCreatedBy(tokenDto.getUserId());
customerStaffDepartmentEntity.setUpdatedBy(tokenDto.getUserId());
customerStaffDepartmentEntity.setDelFlag("0");
customerStaffDepartmentEntity.setRevision(0);
for (CustomerIdDTO customerIdDTO : data) {
customerStaffDepartmentEntity.setUserId(customerIdDTO.getUserId());
customerStaffDepartmentEntity.setCustomerId(customerIdDTO.getCustomerId());
customerStaffDepartmentEntity.setUserId(userId);
customerStaffDepartmentDao.insert(customerStaffDepartmentEntity);
}
customerStaffDepartmentDao.updateDepartmentStaffCount(data.size(),addDepartmentStaffFormDTO.getDepartmentId());
customerStaffDepartmentDao.updateDepartmentStaffCount(addDepartmentStaffFormDTO.getSelectedList().size(),addDepartmentStaffFormDTO.getDepartmentId());
return new Result();
}

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

@ -85,6 +85,17 @@
</if>
</select>
<!-- 根据所属机构id查询地区编码 -->
<select id="selectAreaCodeByAgencyId" resultType="string">
SELECT
area_code AS areaCode
FROM
customer_agency
WHERE
id = #{agencyId}
AND del_flag = 0
</select>
<select id="getAgencyByStaffId" resultType="com.epmet.entity.CustomerAgencyEntity">
SELECT ca.*
FROM customer_staff_agency csa

11
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerDepartmentDao.xml

@ -33,4 +33,15 @@
inner join customer_department cd on (csd.DEPARTMENT_ID = cd.ID)
where csd.USER_ID = #{staffId}
</select>
<!-- 根据部门id查询customerId -->
<select id="selectCustomerIdByDepartmentId" resultType="com.epmet.dto.CustomerIdDTO">
SELECT
customer_id AS customerId
FROM
customer_department
WHERE
id = #{departmentId}
AND del_flag = 0
</select>
</mapper>

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

@ -139,15 +139,17 @@
ORDER BY created_by DESC
</select>
<!--根据gridId查询userId-->
<select id="selectUserIdByGridId" resultType="com.epmet.dto.CustomerStaffGridDTO">
<!--根据gridId查询userId和pid-->
<select id="selectUserIdByGridId" resultType="com.epmet.dto.UserIdAndPidDTO">
SELECT
user_id
csg.user_id AS userId,
cg.pid
FROM
customer_staff_grid
customer_staff_grid csg
LEFT JOIN customer_grid cg ON cg.id = csg.grid_id
WHERE
del_flag = 0
AND grid_id = #{gridId}
csg.del_flag = 0
AND csg.grid_id = #{gridId}
</select>
<!-- 根据userId查询customerId -->

2
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffDepartmentDao.xml

@ -34,7 +34,7 @@
<if test='null != updatedBy and "" != updatedBy'>
UPDATED_BY = #{updatedBy},
</if>
UPDATED_DATE = NOW()
UPDATED_TIME = NOW()
</set>
WHERE
DEL_FLAG = '0'

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

@ -310,11 +310,39 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
//2、插入一条待审核的组信息
ResiGroupEntity resiGroupEntity = this.structureResiGroupEntity(applyCreateGroupFormDTO);
insert(resiGroupEntity);
//3、插入一条待审核的操作记录
//3.1、查询当前申请人的身份,生成对应格式的消息内容
UserRoleDTO userRoleDTO = this.checkPartyMemberOrWarmHeated(applyCreateGroupFormDTO.getApp(),
applyCreateGroupFormDTO.getUserId(),
applyCreateGroupFormDTO.getCustomerId(),
applyCreateGroupFormDTO.getGridId());
if (!NumConstant.ONE_STR.equals(userRoleDTO.getPartymemberFlag()) && !NumConstant.ONE_STR.equals(userRoleDTO.getWarmHeartedFlag())) {
return new Result().error(EpmetErrorCode.CANNOT_CREATE_GROUP.getCode());
}
String roleName = "";
if(NumConstant.ONE_STR.equals(userRoleDTO.getPartymemberFlag())){
roleName = ModuleConstant.PARTYMEMBER;
}else if(NumConstant.ONE_STR.equals(userRoleDTO.getWarmHeartedFlag())){
roleName = ModuleConstant.WAREMHEARTED_RESI;
}
UserResiInfoFormDTO resiParam = new UserResiInfoFormDTO();
resiParam.setCustomerId(applyCreateGroupFormDTO.getCustomerId());
resiParam.setUserId(applyCreateGroupFormDTO.getUserId());
Result<UserResiInfoResultDTO> resiResult =
epmetUserFeignClient.getUserResiInfoDTO(resiParam);
String userName = "";
if(resiResult.success() && null != resiResult.getData()){
userName = (StringUtils.isBlank(resiResult.getData().getSurname()) ? "" : resiResult.getData().getSurname())
+ (StringUtils.isBlank(resiResult.getData().getName()) ? "" :resiResult.getData().getName());
}
userName = StringUtils.isBlank(userName) ? ModuleConstant.UNKNOWN : userName;
String msg = String.format(ModuleConstant.CREATION_OF_GROUP_MESSAGE_TEMPLATE,roleName,userName,applyCreateGroupFormDTO);
//3.2、插入一条待审核的操作记录
ResiGroupOperationDTO resiGroupOperation = new ResiGroupOperationDTO();
resiGroupOperation.setResiGroupId(resiGroupEntity.getId());
resiGroupOperation.setState(GroupStateConstant.GROUP_UNDER_AUDITTING);
resiGroupOperation.setOperateUserId(applyCreateGroupFormDTO.getUserId());
resiGroupOperation.setMessageText(msg);
resiGroupOperation.setReadFlag(ModuleConstant.UNREAD);
resiGroupOperationService.save(resiGroupOperation);
//4、插入一群成员信息(群主)
ResiGroupMemberDTO resiGroupMemberDTO = new ResiGroupMemberDTO();
@ -333,10 +361,10 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
groupMemeberOperationDTO.setEnterGroupType(EnterGroupTypeConstant.CREATED);
groupMemeberOperationService.save(groupMemeberOperationDTO);
//6、群初始统计记录
UserRoleDTO userRoleDTO = this.checkPartyMemberOrWarmHeated(applyCreateGroupFormDTO.getApp(),
/*UserRoleDTO userRoleDTO = this.checkPartyMemberOrWarmHeated(applyCreateGroupFormDTO.getApp(),
applyCreateGroupFormDTO.getUserId(),
applyCreateGroupFormDTO.getCustomerId(),
applyCreateGroupFormDTO.getGridId());
applyCreateGroupFormDTO.getGridId());*/
ResiGroupStatisticalDTO resiGroupStatisticalDTO = new ResiGroupStatisticalDTO();
resiGroupStatisticalDTO.setResiGroupId(resiGroupEntity.getId());
resiGroupStatisticalDTO.setTotalMembers(NumConstant.ONE);
@ -354,6 +382,8 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
resiGroupStatisticalDTO.setTotalEarnestMemebers(NumConstant.ZERO);
}
resiGroupStatisticalService.save(resiGroupStatisticalDTO);
//8.发送一条建组审核消息给当前网格的管理员,给当前网格数据的机构下所有的管理员发送消息
return new Result();
}

11
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/utils/ModuleConstant.java

@ -218,4 +218,15 @@ public interface ModuleConstant extends Constant {
* 审核信息已读
* */
String READ = "read";
String PARTYMEMBER = "党员";
String WAREMHEARTED_RESI = "热心居民";
String UNKNOWN = "未知";
/**
* 申请组时的消息模板
*/
String CREATION_OF_GROUP_MESSAGE_TEMPLATE = "%s%s申请创建小组【%s】,请审核。";
}

5
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/CertifiedDetailResultDTO.java

@ -74,4 +74,9 @@ public class CertifiedDetailResultDTO implements Serializable {
*/
private String contactMobile;
/**
* 居住地址
*/
private String address;
}

2
epmet-module/resi-partymember/resi-partymember-server/docker-compose.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
resi-partymember-server:
container_name: resi-partymember-server-dev
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/resi-partymember-server:0.3.4
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/resi-partymember-server:0.3.6
ports:
- "8096:8096"
network_mode: host # 使用现有网络

2
epmet-module/resi-partymember/resi-partymember-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.4</version>
<version>0.3.6</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>resi-partymember</artifactId>

6
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/PartymemberBaseInfoController.java

@ -104,7 +104,8 @@ public class PartymemberBaseInfoController {
* @Date 2020/4/26 20:35
**/
@PostMapping("auditing")
public Result<List<UnderReviewParyMemberResultDTO>> auditing(@RequestBody @Valid UnderReviewParyMemberFormDTO formDTO){
public Result<List<UnderReviewParyMemberResultDTO>> auditing(@RequestBody UnderReviewParyMemberFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
return partymemberBaseInfoService.auditing(formDTO);
}
@ -116,7 +117,8 @@ public class PartymemberBaseInfoController {
* @Date 2020/4/26 23:40
**/
@PostMapping("audited")
public Result<List<ReviewedParyMemberResultDTO>> audited(@RequestBody @Valid ReviewedParyMemberFormDTO formDTO){
public Result<List<ReviewedParyMemberResultDTO>> audited(@RequestBody ReviewedParyMemberFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
return partymemberBaseInfoService.audited(formDTO);
}
}

18
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java

@ -217,8 +217,8 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService
//将自动认证结果存入党员认证自动审核表
if (confirmAutoDTO != null) {
PartymemberConfirmAutoDTO partymemberConfirmAutoDTO =
partymemberConfirmAutoService.getInfoByPartyMemberInfoId(partyMemberInfoEntity.getPartymemberVisitId());
confirmAutoDTO.setPartymemberInfoId(partyMemberInfoEntity.getPartymemberVisitId());
partymemberConfirmAutoService.getInfoByPartyMemberInfoId(partyMemberInfoEntity.getId());
confirmAutoDTO.setPartymemberInfoId(partyMemberInfoEntity.getId());
if (null == partymemberConfirmAutoDTO) {
partymemberConfirmAutoService.insert(ConvertUtils.sourceToTarget(confirmAutoDTO,
PartymemberConfirmAutoEntity.class));
@ -313,7 +313,7 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService
resultDTO.setUserId(partyMemberInfoEntity.getUserId());
resultDTO.setRealName(partyMemberInfoEntity.getSurname() + partyMemberInfoEntity.getName());
resultDTO.setIdCard(partyMemberInfoEntity.getIdCard());
resultDTO.setMobile(resultDTO.getMobile());
resultDTO.setMobile(partyMemberInfoEntity.getMobile());
resultDTO.setAddress(partyMemberInfoEntity.getStreet() + partyMemberInfoEntity.getEstate() + partyMemberInfoEntity.getBuilding());
resultDTO.setCertifyTime(manualEntity.getCreatedTime().getTime());
@ -352,9 +352,9 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService
Result<GridInfoResultDTO> gridInfoResult = govOrgFeignClient.queryGridInfo(partyMemberInfoEntity.getGridId());
String gridFullPath = "";
if (gridInfoResult.success() && null != gridInfoResult.getData()) {
gridFullPath = String.format("%s-%s-%s", gridInfoResult.getData().getStreetName(),
gridInfoResult.getData().getCommnuityName(),
gridInfoResult.getData().getGridName());
gridFullPath = String.format("%s-%s-%s", gridInfoResult.getData().getStreetName() == null?"":gridInfoResult.getData().getStreetName(),
gridInfoResult.getData().getCommnuityName() == null?"":gridInfoResult.getData().getCommnuityName(),
gridInfoResult.getData().getGridName() == null?"":gridInfoResult.getData().getGridName());
gridFullPath = gridFullPath.replaceAll("--", "").trim();
}
resultDTO.setGridFullPath(gridFullPath);
@ -370,7 +370,7 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService
resultDTO.setUserId(partyMemberInfo.getUserId());
resultDTO.setRealName(partyMemberInfo.getSurname() + partyMemberInfo.getName());
resultDTO.setIdCard(partyMemberInfo.getIdCard());
resultDTO.setMobile(resultDTO.getMobile());
resultDTO.setMobile(partyMemberInfo.getMobile());
resultDTO.setAddress(partyMemberInfo.getStreet() + partyMemberInfo.getEstate() + partyMemberInfo.getBuilding());
String failedReason = "";
if (null != fromDTO.getAutoId() && !fromDTO.getAutoId().isEmpty()) {
@ -418,7 +418,7 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService
resultDTO.setUserId(partyMemberInfo.getUserId());
resultDTO.setRealName(partyMemberInfo.getSurname() + partyMemberInfo.getName());
resultDTO.setIdCard(partyMemberInfo.getIdCard());
resultDTO.setMobile(resultDTO.getMobile());
resultDTO.setMobile(partyMemberInfo.getMobile());
resultDTO.setAddress(partyMemberInfo.getStreet() + partyMemberInfo.getEstate() + partyMemberInfo.getBuilding());
resultDTO.setExtraOrganization(partyMemberInfo.getExtraOrganization());
resultDTO.setContactMobile(partyMemberInfo.getExtraCertifierMobile() == null ? "" : partyMemberInfo.getExtraCertifierMobile());
@ -448,7 +448,7 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService
//获取人工审核信息
PartymemberConfirmManualEntity manualEntity = partymemberConfirmManualService.selectById(fromDTO.getManualId());
resultDTO.setCertifyTime(manualEntity.getCreatedTime().getTime());
resultDTO.setFailedReason(manualEntity.getRefuseReason());
resultDTO.setRejectedReason(manualEntity.getRefuseReason());
//查询网格信息
Result<GridInfoResultDTO> gridInfoResult = govOrgFeignClient.queryGridInfo(partyMemberInfo.getGridId());
String gridFullPath = "";

17
epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberBaseInfoDao.xml

@ -67,14 +67,11 @@
pcm.id as manualId
FROM
partymember_info pi
LEFT JOIN partymember_confirm_manual pcm ON ( pi.id = pcm.PARTYMEMBER_INFO_ID )
LEFT JOIN partymember_confirm_auto pca ON(pi.id=pca.PARTYMEMBER_INFO_ID)
LEFT JOIN partymember_confirm_manual pcm ON ( pi.id = pcm.PARTYMEMBER_INFO_ID AND pcm.DEL_FLAG = '0'and pcm.AUDIT_STATUS='under_auditting')
LEFT JOIN partymember_confirm_auto pca ON(pi.id=pca.PARTYMEMBER_INFO_ID AND pca.del_flag='0')
WHERE
pi.DEL_FLAG = '0'
AND pcm.DEL_FLAG = '0'
AND pca.del_flag='0'
AND pi.CONFIRM_RESULT = 'auto_confirm_failed'
and pcm.AUDIT_STATUS='under_auditting'
AND pi.EXTRA_ORGANIZATION IS NOT NULL
AND pi.GRID_ID = #{gridId}
ORDER BY
@ -95,10 +92,9 @@
'' as manualId
FROM
partymember_info pi
LEFT JOIN partymember_confirm_auto pca ON(pi.id=pca.PARTYMEMBER_INFO_ID)
LEFT JOIN partymember_confirm_auto pca ON(pi.id=pca.PARTYMEMBER_INFO_ID AND pca.del_flag='0')
WHERE
pi.DEL_FLAG = '0'
AND pca.del_flag='0'
AND pi.CONFIRM_RESULT ='auto_confirm_failed'
AND (pi.EXTRA_ORGANIZATION is null or trim(pi.EXTRA_ORGANIZATION)='')
AND pi.GRID_ID = #{gridId}
@ -113,14 +109,11 @@
pcm.id as manualId
FROM
partymember_info pi
LEFT JOIN partymember_confirm_manual pcm ON ( pi.id = pcm.PARTYMEMBER_INFO_ID )
LEFT JOIN partymember_confirm_auto pca ON(pi.id=pca.PARTYMEMBER_INFO_ID)
LEFT JOIN partymember_confirm_manual pcm ON ( pi.id = pcm.PARTYMEMBER_INFO_ID AND pcm.del_flag='0' and pcm.AUDIT_STATUS='rejected')
LEFT JOIN partymember_confirm_auto pca ON(pi.id=pca.PARTYMEMBER_INFO_ID AND pca.del_flag='0')
WHERE
pi.DEL_FLAG = '0'
AND pcm.del_flag='0'
AND pca.del_flag='0'
AND pi.CONFIRM_RESULT ='rejected'
and pcm.AUDIT_STATUS='rejected'
AND pi.EXTRA_ORGANIZATION IS NOT NULL
AND pi.GRID_ID = #{gridId}
ORDER BY

3
epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberInfoDao.xml

@ -93,7 +93,8 @@
UNIX_TIMESTAMP(pi.created_time) AS applyTime,
organization_type AS extraOrganization,
extra_certifier_name AS contactPeople,
extra_certifier_mobile AS contactMobile
extra_certifier_mobile AS contactMobile,
CONCAT(street,estate,building) AS address
FROM
partymember_info pi
WHERE

2
epmet-user/epmet-user-server/docker-compose.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-user-server:
container_name: epmet-user-server-dev
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/epmet-user-server:0.3.8
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/epmet-user-server:0.3.16
ports:
- "8087:8087"
network_mode: host # 不会创建新的网络

2
epmet-user/epmet-user-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.8</version>
<version>0.3.16</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-user</artifactId>

35
epmet-user/epmet-user-server/src/main/java/com/epmet/constant/UserRoleConstant.java

@ -17,4 +17,39 @@ public interface UserRoleConstant {
*/
String DEPT_LEADER = "dept_leader";
/**
* 单位领导
*/
String AGENCY_LEADER = "agency_leader";
/**
* 党建负责人
*/
String PARTY_PRINCIPALS = "party_principals";
/**
* 管理员
*/
String MANAGER = "manager";
/**
* 工作人员
*/
String STAFF = "staff";
/**
* 网格长
*/
String GRID_MANAGER = "grid_manager";
/**
* 网格党建指导员
*/
String GRID_PARTY_DIRECTOR = "grid_party_director";
/**
* 网格员
*/
String GRID_MEMBER = "grid_member";
}

2
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java

@ -132,7 +132,7 @@ public class CustomerStaffController {
* @return
*/
@PostMapping(value = "selectstaffgridlistbyuserid")
public Result<List<StaffGridListDTO>> selectStaffGridListByUserId(@RequestBody List<CustomerStaffGridDTO> customerStaffGridDTOS){
public Result<List<StaffGridListDTO>> selectStaffGridListByUserId(@RequestBody List<UserIdAndPidDTO> customerStaffGridDTOS){
Result<List<StaffGridListDTO>> listResult = customerStaffService.selectStaffGridListByUserId(customerStaffGridDTOS);
return listResult;
}

3
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffGridVisitedController.java

@ -67,7 +67,8 @@ public class StaffGridVisitedController {
* @Date 2020/4/23 11:19
**/
@PostMapping("savestaffgridvisitedrecord")
public Result saveStaffGridVisitedRecord(@RequestBody @Valid StaffGridVisitedFormDTO staffGridVisitedFormDTO) {
public Result saveStaffGridVisitedRecord(@RequestBody StaffGridVisitedFormDTO staffGridVisitedFormDTO) {
ValidatorUtils.validateEntity(staffGridVisitedFormDTO);
return staffGridVisitedService.saveStaffGridVisitedRecord(staffGridVisitedFormDTO);
}
}

3
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserInvitationController.java

@ -101,7 +101,8 @@ public class UserInvitationController {
* @Date 2020/4/10 0:28
**/
@PostMapping("saveuserinvitation")
public Result saveUserInvitation(@RequestBody @Valid UserInvitationFormDTO formDTO) {
public Result saveUserInvitation(@RequestBody UserInvitationFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return userInvitationService.saveUserInvitation(formDTO);
}
}

2
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java

@ -71,7 +71,7 @@ public interface CustomerStaffDao extends BaseDao<CustomerStaffEntity> {
* @param customerStaffGridDTOS
* @return
*/
List<StaffGridListDTO> selectStaffGridListByUserId(List<CustomerStaffGridDTO> customerStaffGridDTOS);
List<StaffGridListDTO> selectStaffGridListByUserId(List<UserIdAndPidDTO> customerStaffGridDTOS);
/**
* 根据用户ID列表获取用户信息

2
epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java

@ -139,7 +139,7 @@ public interface CustomerStaffService extends BaseService<CustomerStaffEntity> {
* @param customerStaffGridDTOS
* @return
*/
Result<List<StaffGridListDTO>> selectStaffGridListByUserId(List<CustomerStaffGridDTO> customerStaffGridDTOS);
Result<List<StaffGridListDTO>> selectStaffGridListByUserId(List<UserIdAndPidDTO> customerStaffGridDTOS);
/**
* 组织首页-工作人员列表

24
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java

@ -178,8 +178,18 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao,
}
@Override
public Result<List<StaffGridListDTO>> selectStaffGridListByUserId(List<CustomerStaffGridDTO> customerStaffGridDTOS) {
public Result<List<StaffGridListDTO>> selectStaffGridListByUserId(List<UserIdAndPidDTO> customerStaffGridDTOS) {
List<GovStaffRoleResultDTO> gridManager = staffRoleService.listStaffsInRole(UserRoleConstant.GRID_MANAGER, customerStaffGridDTOS.get(0).getPid(), DataScope.getDefault());
List<StaffGridListDTO> staffGridListDTOS = baseDao.selectStaffGridListByUserId(customerStaffGridDTOS);
for (GovStaffRoleResultDTO govStaffRoleResultDTO : gridManager) {
if (govStaffRoleResultDTO.getRoleKey().equals(UserRoleConstant.GRID_MANAGER)){
for (StaffGridListDTO staffGridListDTO : staffGridListDTOS) {
if (staffGridListDTO.getStaffId().equals(govStaffRoleResultDTO.getStaffId())){
staffGridListDTO.setRoleName(govStaffRoleResultDTO.getRoleName());
}
}
}
}
return new Result<List<StaffGridListDTO>>().ok(staffGridListDTOS);
}
@ -243,6 +253,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao,
StaffRoleResultDTO staffRoleResultDTO = new StaffRoleResultDTO();
staffRoleResultDTO.setRoleId(p.getId());
staffRoleResultDTO.setRoleName(p.getRoleName());
staffRoleResultDTO.setFullTimeOnly(p.getFullTimeOnly());
staffRoleResultDTO.setSelected(false);
return staffRoleResultDTO;
}).collect(Collectors.toList());
@ -303,7 +314,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao,
customerStaffFormDTO.setCustomerId(fromDTO.getCustomerId());
customerStaffFormDTO.setMobile(fromDTO.getMobile());
CustomerStaffDTO customerStaffDTO = baseDao.selectListCustomerStaffInfo(customerStaffFormDTO);
if (!fromDTO.getStaffId().equals(customerStaffDTO.getUserId())) {
if (null != customerStaffDTO && !fromDTO.getStaffId().equals(customerStaffDTO.getUserId())){
return new Result<CustomerStaffDTO>().error(EpmetErrorCode.MOBILE_USED.getCode(), EpmetErrorCode.MOBILE_USED.getMsg());
}
@ -383,10 +394,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao,
//1:根据userId集合查询人员基本信息
List<DepartInStaffListResultDTO> staffList = baseDao.selectDepartmentStaffList(formDTO);
//2:根据组织Id查询部门下是领导角色的用户
StaffRoleFormDTO staffRoleFormDTO = new StaffRoleFormDTO();
staffRoleFormDTO.setOrgId(formDTO.getAgencyId());
staffRoleFormDTO.setRoleKey(UserRoleConstant.DEPT_LEADER);
List<GovStaffRoleResultDTO> staffRoleDTOS = staffRoleService.listStaffsInRole(UserRoleConstant.DEPT_LEADER, formDTO.getDepartmentId(), DataScope.getDefault());
List<GovStaffRoleResultDTO> staffRoleDTOS = staffRoleService.listStaffsInRole(UserRoleConstant.DEPT_LEADER, formDTO.getAgencyId(), DataScope.getDefault());
staffRoleDTOS.forEach(roleDto -> {
staffList.stream().filter(staffDto ->
roleDto.getStaffId().equals(staffDto.getStaffId())).findAny().ifPresent(result ->
@ -405,9 +413,9 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao,
}
/**
* @return Result<List < CommonStaffInfoResultDTO>>
* @Description 通过userId列表查询未被禁用的用户信息
* @Param CommonUserIdListFormDTO :: getUserIdList
* @return Result<List<CommonStaffInfoResultDTO>>
* @Author wangc
* @Date 2020.04.24 15:44
**/
@ -417,7 +425,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao,
return new Result<List<CommonStaffInfoResultDTO>>().ok(new ArrayList<>());
}
return new Result<List<CommonStaffInfoResultDTO>>().ok(baseDao.selectEnableStaffMsg(userIdList.getUserIdList(),userIdList.getCustomerId()));
return new Result<List<CommonStaffInfoResultDTO>>().ok(baseDao.selectEnableStaffMsg(userIdList.getUserIdList(), userIdList.getCustomerId()));
}
}

6
epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml

@ -27,10 +27,10 @@
<!-- 根据userId查询网格下的用户信息 -->
<select id="selectStaffGridListByUserId" parameterType="com.epmet.dto.CustomerStaffGridDTO" resultType="com.epmet.dto.StaffGridListDTO">
SELECT
cs.id AS staffId,
cs.user_id AS staffId,
cs.real_name AS staffName,
cs.head_photo AS staffHeadPhoto,
gsr.role_name AS roleName,
IFNULL(cs.head_photo,'') AS staffHeadPhoto,
IFNULL(gsr.role_name,'') AS roleName,
cs.gender
FROM
customer_staff cs

2
epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml

@ -34,7 +34,7 @@
WHERE
r.ROLE_KEY = #{roleKey}
AND sr.ORG_ID = #{orgId}
AND r.DEL_FLAG = '0'
AND sr.DEL_FLAG = '0'
AND r.DEL_FLAG = '0'
</select>

Loading…
Cancel
Save