diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActDetailResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActDetailResultDTO.java index 4ee734f45e..a232ebdf33 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActDetailResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActDetailResultDTO.java @@ -175,4 +175,25 @@ public class ResiActDetailResultDTO implements Serializable { * 取消活动的时间(yyyy-MM-dd HH:mm) */ private String cancelTime; + + /** + * 活动类型爱心活动heart 联建活动party + */ + private String actType; + + /** + * 联建单位 + */ + private String unitId; + private String unitName; + /** + * 活动目标 + */ + private String target; + + /** + * 服务事项 + */ + private String serviceMatter; + private String serviceMatterName; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java index 9855cee625..ce1d187bf2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java @@ -169,4 +169,9 @@ public interface ActConstant { * 活动类型-联建活动 */ String PARTY = "party"; + + /** + * 服务事项code + */ + String SERVICE_MATTER_CODE = "1010"; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java index eb2cd42af7..983c4834a2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java @@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; @@ -33,12 +34,17 @@ import com.epmet.dao.ActInfoDao; import com.epmet.dao.ActUserRelationDao; import com.epmet.dao.HeartUserInfoDao; import com.epmet.dto.ActInfoDTO; +import com.epmet.dto.IcPartyUnitDTO; +import com.epmet.dto.form.demand.SubCodeFormDTO; import com.epmet.dto.form.resi.*; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.dto.result.resi.*; import com.epmet.entity.ActInfoEntity; import com.epmet.entity.ActUserRelationEntity; import com.epmet.service.ActInfoService; import com.epmet.service.ActUserRelationService; +import com.epmet.service.IcPartyUnitService; +import com.epmet.service.IcResiDemandDictService; import com.epmet.utils.CaculateDistance; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; @@ -47,7 +53,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import javax.annotation.Resource; import java.util.*; +import java.util.stream.Collectors; /** * 活动信息 @@ -68,6 +76,10 @@ public class ActInfoServiceImpl extends BaseServiceImpl page(Map params) { @@ -245,6 +257,20 @@ public class ActInfoServiceImpl extends BaseServiceImpl categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + detailResultDTO.setServiceMatterName(categoryMap.get(detailResultDTO.getServiceMatter())); + } + if (StringUtils.isNotBlank(detailResultDTO.getUnitId())) { + //获取单位名称 + IcPartyUnitDTO unitDTO = icPartyUnitService.get(detailResultDTO.getUnitId()); + detailResultDTO.setUnitName(null != unitDTO ? unitDTO.getUnitName() : StrConstant.EPMETY_STR); + } return new Result().ok(detailResultDTO); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java index a54b43cce2..e113d72019 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java @@ -103,10 +103,7 @@ public class WorkActServiceImpl implements WorkActService { @Resource private IcPartyUnitService icPartyUnitService; - /** - * 服务事项code - */ - private static final String SERVICE_MATTER_CODE = "1010"; + /** * @author yinzuomei @@ -787,7 +784,7 @@ public class WorkActServiceImpl implements WorkActService { //获取服务事项 SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); codeFormDTO.setCustomerId(customerId); - codeFormDTO.setParentCategoryCode(SERVICE_MATTER_CODE); + codeFormDTO.setParentCategoryCode(ActConstant.SERVICE_MATTER_CODE); Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); canceledActDetailResultDTO.setServiceMatterName(categoryMap.get(canceledActDetailResultDTO.getServiceMatter())); } @@ -845,7 +842,7 @@ public class WorkActServiceImpl implements WorkActService { //获取服务事项 SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); codeFormDTO.setCustomerId(formDTO.getCustomerId()); - codeFormDTO.setParentCategoryCode(SERVICE_MATTER_CODE); + codeFormDTO.setParentCategoryCode(ActConstant.SERVICE_MATTER_CODE); Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); resultDTO.setServiceMatterName(categoryMap.get(resultDTO.getServiceMatter())); } @@ -926,7 +923,7 @@ public class WorkActServiceImpl implements WorkActService { //获取服务事项 SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); codeFormDTO.setCustomerId(customerId); - codeFormDTO.setParentCategoryCode(SERVICE_MATTER_CODE); + codeFormDTO.setParentCategoryCode(ActConstant.SERVICE_MATTER_CODE); Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); resultDTO.setServiceMatterName(categoryMap.get(resultDTO.getServiceMatter())); } @@ -1322,7 +1319,7 @@ public class WorkActServiceImpl implements WorkActService { //获取服务事项 SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); codeFormDTO.setCustomerId(customerId); - codeFormDTO.setParentCategoryCode(SERVICE_MATTER_CODE); + codeFormDTO.setParentCategoryCode(ActConstant.SERVICE_MATTER_CODE); Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); resultDTO.setServiceMatterName(categoryMap.get(resultDTO.getServiceMatter())); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml index f2054d890f..6d3b77e446 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml @@ -445,7 +445,10 @@ IF(aur.SIGN_IN_FLAG = 'signed_in', true , false ) as isSignUp, -- 是否已签到(true已签到,false未签到) i.ACT_STATUS actStatus, i.CANCEL_REASON cancelReason, - DATE_FORMAT(i.CANCEL_TIME,'%Y-%m-%d %H:%i') cancelTime + DATE_FORMAT(i.CANCEL_TIME,'%Y-%m-%d %H:%i') cancelTime, + i.UNIT_ID AS unitId, + i.SERVICE_MATTER AS serviceMatter, + i.TARGET AS target FROM act_info i LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' AND re.`STATUS` != 'refused' AND re.`STATUS` != 'canceled' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID