Browse Source

Merge remote-tracking branch 'origin/dev_govgrid' into dev

dev_shibei_match
yinzuomei 6 years ago
parent
commit
7bba82cf2b
  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. 17
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberBaseInfoDao.xml
  7. 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;
}

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

Loading…
Cancel
Save