Browse Source

网格添加:添加地区编码

已认证党员详情:添加address字段
dev_shibei_match
zxc 5 years ago
parent
commit
a8c4f77272
  1. 5
      epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/CertifiedDetailResultDTO.java
  2. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
  3. 16
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
  4. 11
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
  5. 5
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/CertifiedDetailResultDTO.java
  6. 3
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberInfoDao.xml

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;
}

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

@ -77,4 +77,12 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
* @Description 查询当前组织的所有下级组织列表
**/
List<CustomerAgencyDTO> selectFindList(CustomerAgencyDTO customerAgencyDTO);
/**
* @Description 根据agencyId查询地区编码
* @param agencyId 所属机关id
* @author zxc
* @date 2020/4/28 15:50
*/
String selectAreaCodeByAgencyId(@Param("agencyId") String agencyId);
}

16
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.*;
@ -71,6 +72,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) {
@ -197,21 +200,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);

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

@ -84,4 +84,15 @@
AND ca.pids LIKE concat('%', #{pids}, '%')
</if>
</select>
<!-- 根据所属机构id查询地区编码 -->
<select id="selectAreaCodeByAgencyId" resultType="string">
SELECT
area_code AS areaCode
FROM
customer_agency
WHERE
pid = #{agencyId}
AND del_flag = 0
</select>
</mapper>

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;
}

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

Loading…
Cancel
Save