Browse Source

Merge remote-tracking branch 'origin/dev_zhili' into dev_zhili

dev
yinzuomei 3 years ago
parent
commit
2e6fd2b31f
  1. 5
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java
  2. 12
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java
  3. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java
  4. 9
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java
  5. 15
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java
  6. 23
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml

5
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java

@ -24,4 +24,9 @@ public class PartyUnitListResultDTO implements Serializable {
* 协办单位名字
*/
private String assistanceUnitName;
/**
* 协办单位类型1社区自组织2联建单位
*/
private String assistanceUnitType;
}

12
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java

@ -264,4 +264,16 @@ public class IcPartyUnitController {
public Result<List<PartyUnitListResultDTO>> getPartyUnitList(@RequestBody PartyUnitListFormDTO formDTO){
return new Result<List<PartyUnitListResultDTO>>().ok(icPartyUnitService.getPartyUnitList(formDTO));
}
/**
* Desc: 协办单位列表
* @param tokenDto
* @author zxc
* @date 2022/5/18 13:37
*/
@PostMapping("assistanceUnitList")
public Result<List<PartyUnitListResultDTO>> getAssistanceUnitList(@LoginUser TokenDto tokenDto){
return new Result<List<PartyUnitListResultDTO>>().ok(icPartyUnitService.getAssistanceUnitList(tokenDto));
}
}

8
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java

@ -84,4 +84,12 @@ public interface IcPartyUnitDao extends BaseDao<IcPartyUnitEntity> {
* @date 2022/5/17 18:51
*/
List<PartyUnitListResultDTO> getCommunitySelfList(@Param("ids") List<String> ids);
/**
* Desc: 协办单位列表
* @param agencyId
* @author zxc
* @date 2022/5/18 13:48
*/
List<PartyUnitListResultDTO> getAssistanceUnitList(@Param("agencyId")String agencyId);
}

9
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java

@ -152,4 +152,13 @@ public interface IcPartyUnitService extends BaseService<IcPartyUnitEntity> {
* @date 2022/5/17 17:53
*/
List<PartyUnitListResultDTO> getPartyUnitList(PartyUnitListFormDTO formDTO);
/**
* Desc: 协办单位列表
* @param tokenDto
* @author zxc
* @date 2022/5/18 13:37
*/
List<PartyUnitListResultDTO> getAssistanceUnitList(TokenDto tokenDto);
}

15
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java

@ -614,6 +614,21 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
return result;
}
/**
* Desc: 协办单位列表
* @param tokenDto
* @author zxc
* @date 2022/5/18 13:37
*/
@Override
public List<PartyUnitListResultDTO> getAssistanceUnitList(TokenDto tokenDto) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId());
if (null == staffInfo){
throw new EpmetException("未查询到此工作人员信息"+tokenDto.getUserId());
}
return baseDao.getAssistanceUnitList(staffInfo.getAgencyId());
}
private String getServiceMatter(Map<String, String> map, String matter) {
List<String> matters = Arrays.asList(matter.split(StrConstant.COLON));
List<String> list = matters.stream().map(map::get).collect(Collectors.toList());

23
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml

@ -102,6 +102,29 @@
)
</select>
<!-- 协办单位列表 -->
<select id="getAssistanceUnitList" resultType="com.epmet.dto.result.PartyUnitListResultDTO">
SELECT t.* FROM (
SELECT
ID AS assistanceUnitId,
UNIT_NAME AS assistanceUnitName,
'2' AS assistanceUnitType,
CREATED_TIME
FROM ic_party_unit
WHERE DEL_FLAG = '0'
AND CONCAT(PIDS,':',AGENCY_ID) LIKE CONCAT('%',#{agencyId},'%')
UNION ALL
SELECT
ID AS assistanceUnitId,
ORGANIZATION_NAME AS assistanceUnitName,
'1' AS assistanceUnitType,
CREATED_TIME
FROM ic_community_self_organization
WHERE DEL_FLAG = '0'
AND CONCAT(PIDS,':',AGENCY_ID) LIKE CONCAT('%',#{agencyId},'%')
) t ORDER BY CREATED_TIME desc
</select>
<update id="updateSatisfaction" parameterType="map">
update ic_party_unit
set SATISFACTION=#{satisfaction},UPDATED_TIME=NOW()

Loading…
Cancel
Save