Browse Source

Merge branch 'master' of http://121.42.41.42:7070/r/epmet-cloud into dev_tripreport

master
yinzuomei 3 years ago
parent
commit
fe27805d9d
  1. 6
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java
  2. 1
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java
  3. 1
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java
  4. 5
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitFormDTO.java
  5. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java
  6. 18
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java
  7. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java
  8. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java
  9. 13
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java
  10. 39
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml
  11. 31
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml
  12. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcEnterpriseChangeRecordEntity.java

6
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java

@ -55,8 +55,12 @@ public class IcPartyActivityDTO implements Serializable {
/** /**
* 组织ID * 组织ID
*/ */
@JsonIgnore // @JsonIgnore
private String agencyId; private String agencyId;
/**
* 组织名称
*/
private String agencyName;
private String gridId; private String gridId;
private String gridName; private String gridName;
/** /**

1
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java

@ -51,6 +51,7 @@ public class IcPartyUnitDTO implements Serializable {
* 组织ID * 组织ID
*/ */
private String agencyId; private String agencyId;
private String agencyName;
/** /**
* *

1
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java

@ -29,4 +29,5 @@ public class PartyActivityFormDTO implements Serializable {
private String serviceMatter; private String serviceMatter;
private Integer pageNo; private Integer pageNo;
private Integer pageSize; private Integer pageSize;
private String customerId;
} }

5
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitFormDTO.java

@ -24,4 +24,9 @@ public class PartyUnitFormDTO implements Serializable {
private String contactMobile; private String contactMobile;
private Integer pageNo; private Integer pageNo;
private Integer pageSize; private Integer pageSize;
/**
* 工作端当前登录人员
*/
private String currentStaffId;
} }

8
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java

@ -71,8 +71,14 @@ public class IcPartyActivityController {
@Resource @Resource
private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient;
/**
* 联建活动-列表
* @param formDTO
* @return
*/
@PostMapping("search") @PostMapping("search")
public Result<PageData<IcPartyActivityDTO>> page(@RequestBody PartyActivityFormDTO formDTO){ public Result<PageData<IcPartyActivityDTO>> page(@LoginUser TokenDto tokenDto,@RequestBody PartyActivityFormDTO formDTO){
formDTO.setCustomerId(formDTO.getCustomerId());
PageData<IcPartyActivityDTO> page = icPartyActivityService.search(formDTO); PageData<IcPartyActivityDTO> page = icPartyActivityService.search(formDTO);
return new Result<PageData<IcPartyActivityDTO>>().ok(page); return new Result<PageData<IcPartyActivityDTO>>().ok(page);
} }

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

@ -3,6 +3,7 @@ package com.epmet.controller;
import com.epmet.commons.rocketmq.messages.ServerSatisfactionCalFormDTO; import com.epmet.commons.rocketmq.messages.ServerSatisfactionCalFormDTO;
import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.dto.result.OptionDataResultDTO; import com.epmet.commons.tools.dto.result.OptionDataResultDTO;
import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.exception.RenException;
@ -16,10 +17,6 @@ import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.constants.ImportTaskConstants; import com.epmet.constants.ImportTaskConstants;
import com.epmet.dto.IcPartyUnitDTO; import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.form.ImportTaskCommonFormDTO;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.form.PartyUnitFormDTO;
import com.epmet.dto.form.PartyUnitListFormDTO;
import com.epmet.dto.form.*; import com.epmet.dto.form.*;
import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.*; import com.epmet.dto.result.*;
@ -37,12 +34,10 @@ import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -70,9 +65,20 @@ public class IcPartyUnitController {
private Path IC_PARTY_UNIT_UPLOAD_DIR; private Path IC_PARTY_UNIT_UPLOAD_DIR;
/**
* 联建单位-列表查询
* 本组织及下级数据
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("list") @PostMapping("list")
public Result<PageData<IcPartyUnitDTO>> search(@LoginUser TokenDto tokenDto, @RequestBody PartyUnitFormDTO formDTO) { public Result<PageData<IcPartyUnitDTO>> search(@LoginUser TokenDto tokenDto, @RequestBody PartyUnitFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setCustomerId(tokenDto.getCustomerId());
//工作端调用的话,赋值当前登录用户id
if(AppClientConstant.APP_GOV.equals(tokenDto.getApp())){
formDTO.setCurrentStaffId(tokenDto.getUserId());
}
PageData<IcPartyUnitDTO> page = icPartyUnitService.search(formDTO); PageData<IcPartyUnitDTO> page = icPartyUnitService.search(formDTO);
return new Result<PageData<IcPartyUnitDTO>>().ok(page); return new Result<PageData<IcPartyUnitDTO>>().ok(page);
} }

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

@ -19,6 +19,7 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.commons.tools.dto.result.OptionDataResultDTO; import com.epmet.commons.tools.dto.result.OptionDataResultDTO;
import com.epmet.dto.form.PartyUnitFormDTO;
import com.epmet.dto.form.PartyUnitListbriefFormDTO; import com.epmet.dto.form.PartyUnitListbriefFormDTO;
import com.epmet.dto.result.PartyTypepercentResultDTO; import com.epmet.dto.result.PartyTypepercentResultDTO;
import com.epmet.dto.result.PartyUnitDistributionResultDTO; import com.epmet.dto.result.PartyUnitDistributionResultDTO;
@ -116,4 +117,11 @@ public interface IcPartyUnitDao extends BaseDao<IcPartyUnitEntity> {
@Param("customerId") String customerId); @Param("customerId") String customerId);
List<IcPartyUnitEntity> selectByIds(@Param("partyUnitIds") List<String> partyUnitIds); List<IcPartyUnitEntity> selectByIds(@Param("partyUnitIds") List<String> partyUnitIds);
/**
* 联建单位-分页列表查询
* @param formDTO
* @return
*/
List<IcPartyUnitEntity> pageList(PartyUnitFormDTO formDTO);
} }

3
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java

@ -128,7 +128,8 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD
if (StringUtils.isNotEmpty(dto.getGridId())) { if (StringUtils.isNotEmpty(dto.getGridId())) {
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId()); GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId());
if (null != gridInfo) { if (null != gridInfo) {
dto.setGridName(gridInfo.getGridName()); dto.setGridName(gridInfo.getGridNamePath());
dto.setAgencyName(gridInfo.getAgencyName());
} }
} }
}); });

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

@ -77,7 +77,6 @@ import org.apache.http.entity.ContentType;
import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.commons.CommonsMultipartFile; import org.springframework.web.multipart.commons.CommonsMultipartFile;
@ -119,7 +118,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
@Override @Override
public PageData<IcPartyUnitDTO> search(PartyUnitFormDTO formDTO) { public PageData<IcPartyUnitDTO> search(PartyUnitFormDTO formDTO) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
LambdaQueryWrapper<IcPartyUnitEntity> wrapper = new LambdaQueryWrapper<>(); /*LambdaQueryWrapper<IcPartyUnitEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(IcPartyUnitEntity::getAgencyId, formDTO.getAgencyId()); wrapper.eq(IcPartyUnitEntity::getAgencyId, formDTO.getAgencyId());
wrapper.like(StringUtils.isNotBlank(formDTO.getUnitName()), IcPartyUnitEntity::getUnitName, formDTO.getUnitName()); wrapper.like(StringUtils.isNotBlank(formDTO.getUnitName()), IcPartyUnitEntity::getUnitName, formDTO.getUnitName());
wrapper.like(StringUtils.isNotBlank(formDTO.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, formDTO.getServiceMatter()); wrapper.like(StringUtils.isNotBlank(formDTO.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, formDTO.getServiceMatter());
@ -127,7 +126,13 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
wrapper.like(StringUtils.isNotBlank(formDTO.getContact()), IcPartyUnitEntity::getContact, formDTO.getContact()); wrapper.like(StringUtils.isNotBlank(formDTO.getContact()), IcPartyUnitEntity::getContact, formDTO.getContact());
wrapper.like(StringUtils.isNotBlank(formDTO.getContactMobile()), IcPartyUnitEntity::getContactMobile, formDTO.getContactMobile()); wrapper.like(StringUtils.isNotBlank(formDTO.getContactMobile()), IcPartyUnitEntity::getContactMobile, formDTO.getContactMobile());
wrapper.orderByDesc(IcPartyUnitEntity::getCreatedTime); wrapper.orderByDesc(IcPartyUnitEntity::getCreatedTime);
List<IcPartyUnitEntity> list = baseDao.selectList(wrapper); List<IcPartyUnitEntity> list = baseDao.selectList(wrapper);*/
//本组织及下级
if(StringUtils.isNotBlank(formDTO.getCurrentStaffId())&&StringUtils.isBlank(formDTO.getAgencyId())){
CustomerStaffInfoCacheResult staffInfo=CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(),formDTO.getCurrentStaffId());
formDTO.setAgencyId(staffInfo.getAgencyId());
}
List<IcPartyUnitEntity> list = baseDao.pageList(formDTO);
PageInfo<IcPartyUnitEntity> pageInfo = new PageInfo<>(list); PageInfo<IcPartyUnitEntity> pageInfo = new PageInfo<>(list);
List<IcPartyUnitDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class); List<IcPartyUnitDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class);
Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode());
@ -150,6 +155,8 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
item.setSatisfaction(new BigDecimal(item.getSatisfaction()).setScale(2, BigDecimal.ROUND_HALF_UP).toString()); item.setSatisfaction(new BigDecimal(item.getSatisfaction()).setScale(2, BigDecimal.ROUND_HALF_UP).toString());
} }
item.setScore(null == pointMap.get(item.getId()) ? NumConstant.ZERO : pointMap.get(item.getId())); item.setScore(null == pointMap.get(item.getId()) ? NumConstant.ZERO : pointMap.get(item.getId()));
AgencyInfoCache agencyInfoCache = CustomerOrgRedis.getAgencyInfo(item.getAgencyId());
item.setAgencyName(null != agencyInfoCache ? agencyInfoCache.getOrganizationName() : StrConstant.EPMETY_STR);
}); });
return new PageData<>(dtoList, pageInfo.getTotal()); return new PageData<>(dtoList, pageInfo.getTotal());
} }

39
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml

@ -61,42 +61,49 @@
ADDRESS, ADDRESS,
LONGITUDE, LONGITUDE,
LATITUDE, LATITUDE,
RESULT RESULT,
a.AGENCY_ID
FROM FROM
ic_party_activity a ic_party_activity a
INNER JOIN ( INNER JOIN (
SELECT SELECT
ACTIVITY_ID, ur.ACTIVITY_ID,
GROUP_CONCAT( UNIT_ID ) AS unitId GROUP_CONCAT( ur.UNIT_ID ) AS unitId
FROM FROM
ic_activity_unit_relation ic_activity_unit_relation ur
WHERE WHERE
DEL_FLAG = '0' ur.DEL_FLAG = '0'
AND AGENCY_ID = #{agencyId} <if test='null != agencyId and "" != agencyId'>
AND (ur.AGENCY_ID = #{agencyId} or ur.PIDS like concat('%',#{agencyId},'%'))
</if>
<if test='null != unitId and "" != unitId'> <if test='null != unitId and "" != unitId'>
AND UNIT_ID = #{unitId} AND ur.UNIT_ID = #{unitId}
</if> </if>
GROUP BY GROUP BY
ACTIVITY_ID ur.ACTIVITY_ID
) b ON a.ID = b.ACTIVITY_ID ) b ON a.ID = b.ACTIVITY_ID
INNER JOIN ( INNER JOIN (
SELECT SELECT
ACTIVITY_ID, sr.ACTIVITY_ID,
GROUP_CONCAT( SERVICE_MATTER ) AS serviceMatter GROUP_CONCAT( sr.SERVICE_MATTER ) AS serviceMatter
FROM FROM
ic_activity_service_relation ic_activity_service_relation sr
WHERE WHERE
DEL_FLAG = '0' sr.DEL_FLAG = '0'
AND AGENCY_ID = #{agencyId} <if test='null != agencyId and "" != agencyId'>
AND (sr.AGENCY_ID = #{agencyId} or sr.PIDS like concat('%',#{agencyId},'%'))
</if>
<if test='null != serviceMatter and "" != serviceMatter'> <if test='null != serviceMatter and "" != serviceMatter'>
AND SERVICE_MATTER = #{serviceMatter} AND sr.SERVICE_MATTER = #{serviceMatter}
</if> </if>
GROUP BY GROUP BY
ACTIVITY_ID sr.ACTIVITY_ID
) c ON a.ID = c.ACTIVITY_ID ) c ON a.ID = c.ACTIVITY_ID
WHERE WHERE
a.DEL_FLAG = '0' a.DEL_FLAG = '0'
AND a.AGENCY_ID = #{agencyId} <if test='null != agencyId and "" != agencyId'>
AND (a.AGENCY_ID = #{agencyId} or a.PIDS like concat('%',#{agencyId},'%'))
</if>
<if test='null != gridId and "" != gridId'> <if test='null != gridId and "" != gridId'>
AND a.GRID_ID = #{gridId} AND a.GRID_ID = #{gridId}
</if> </if>

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

@ -193,4 +193,35 @@
</foreach> </foreach>
) )
</select> </select>
<select id="pageList" parameterType="com.epmet.dto.form.PartyUnitFormDTO" resultType="com.epmet.entity.IcPartyUnitEntity">
SELECT
u.*
FROM
ic_party_unit u
WHERE
u.DEL_FLAG = '0'
<if test="null != customerId and customerId != '' ">
AND u.CUSTOMER_ID = #{customerId}
</if>
<if test="null != agencyId and agencyId != '' ">
AND ( u.AGENCY_ID = #{agencyId} OR u.PIDS LIKE concat( '%', #{agencyId}, '%' ))
</if>
<if test="null != unitName and unitName != '' ">
and u.UNIT_NAME like concat( '%', #{unitName}, '%' )
</if>
<if test="null != serviceMatter and serviceMatter != '' ">
and u.SERVICE_MATTER like concat( '%', #{serviceMatter}, '%' )
</if>
<if test="null != type and type != '' ">
and u.TYPE =#{type}
</if>
<if test="null != contact and contact != '' ">
and u.CONTACT like concat( '%', #{contact}, '%' )
</if>
<if test="null != contactMobile and contactMobile != '' ">
and u.CONTACT_MOBILE like concat( '%', #{contactMobile}, '%' )
</if>
order by u.CREATED_TIME desc
</select>
</mapper> </mapper>

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcEnterpriseChangeRecordEntity.java

@ -76,10 +76,6 @@ public class IcEnterpriseChangeRecordEntity extends BaseEpmetEntity {
*/ */
private String scale; private String scale;
/**
* 规模手输数字
*/
private Integer scaleTotal;
/** /**
* 场所负责人 * 场所负责人
*/ */

Loading…
Cancel
Save