diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/CommunityCareController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/CommunityCareController.java index 4acb8dc7cc..0b0c6e0893 100755 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/CommunityCareController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/CommunityCareController.java @@ -2,18 +2,23 @@ package com.epmet.controller; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.EpmetRequestHolder; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.dao.IcResiDemandDictDao; import com.epmet.dto.CommunityCareDTO; import com.epmet.dto.form.CommunityCareFormDTO; +import com.epmet.dto.result.demand.DemandPageResDTO; import com.epmet.service.CommunityCareService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import java.util.List; import java.util.Map; @@ -30,6 +35,9 @@ public class CommunityCareController { @Autowired private CommunityCareService communityCareService; + @Resource + private IcResiDemandDictDao icResiDemandDictDao; + @RequestMapping("page") public Result> page(@RequestParam Map params) { PageData page = communityCareService.page(params); @@ -70,7 +78,22 @@ public class CommunityCareController { @PostMapping("search") public Result> search(@RequestBody CommunityCareFormDTO dto) { - return new Result().ok(communityCareService.search(dto)); + PageData pageList = communityCareService.search(dto); + List resDTOList = icResiDemandDictDao.pageSelect(EpmetRequestHolder.getLoginUserCustomerId(), ""); + if (null != resDTOList && resDTOList.size() > 0) { + resDTOList.forEach(demand -> { + if (demand.getCategoryName().equals("服务类型")) { + demand.getChildren().forEach(child -> { + for (CommunityCareDTO care : pageList.getList()) { + if (care.getServiceType().equals(child.getCategoryCode())) { + care.setServiceType(child.getCategoryName()); + } + } + }); + } + }); + } + return new Result().ok(pageList); } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/CommunityCareDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/CommunityCareDao.java index d6f0e465da..12b60e74d0 100755 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/CommunityCareDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/CommunityCareDao.java @@ -19,5 +19,6 @@ public interface CommunityCareDao extends BaseDao { List search(@Param("title") String title, @Param("unitName") String unitName, @Param("attn") String attn, @Param("onsite") String onsite, - @Param("startTime") String startTime, @Param("endTime") String endTime); + @Param("startTime") String startTime, @Param("endTime") String endTime, + @Param("orgIdPath") String orgIdPath); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/PhysicianManageDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/PhysicianManageDao.java index 7212c0b5c5..d80871f9e2 100755 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/PhysicianManageDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/PhysicianManageDao.java @@ -19,5 +19,5 @@ public interface PhysicianManageDao extends BaseDao { List search(@Param("name") String name, @Param("idCard") String idCard, @Param("level") String level, @Param("subOrg") String subOrg, - @Param("orgLevel") String orgLevel); + @Param("orgLevel") String orgLevel, @Param("orgIdPath") String orgIdPath); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/RecreationSportDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/RecreationSportDao.java index ffc0bafb93..1f8b78075d 100755 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/RecreationSportDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/RecreationSportDao.java @@ -19,5 +19,5 @@ public interface RecreationSportDao extends BaseDao { List search(@Param("title") String title, @Param("type") String type, @Param("apply") String apply, @Param("startTime") String startTime, - @Param("endTime") String endTime); + @Param("endTime") String endTime, @Param("orgIdPath") String orgIdPath); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/CommunityCareEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/CommunityCareEntity.java index 95fffeb490..ea5d7a293f 100755 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/CommunityCareEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/CommunityCareEntity.java @@ -70,4 +70,6 @@ public class CommunityCareEntity extends BaseEpmetEntity { */ private String imgUrl; + private String orgIdPath; + } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/PhysicianManageEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/PhysicianManageEntity.java index 17f6231939..d3ae5fef70 100755 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/PhysicianManageEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/PhysicianManageEntity.java @@ -12,45 +12,50 @@ import lombok.EqualsAndHashCode; * @since v1.0.0 2023-06-20 */ @Data -@EqualsAndHashCode(callSuper=false) +@EqualsAndHashCode(callSuper = false) @TableName("physician_manage") public class PhysicianManageEntity extends BaseEpmetEntity { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; /** * 医师姓名 */ - private String name; + private String name; /** * 医师证件号 */ - private String idCard; + private String idCard; /** * 电话 */ - private String mobile; + private String mobile; /** * 级别(职称) */ - private String level; + private String level; /** * 隶属机构 */ - private String subOrg; + private String subOrg; /** * 机构级别 */ - private String orgLevel; + private String orgLevel; /** * 识别码(医师执业证号码) */ - private String imsi; + private String imsi; + + /** + * 组织ID路径 + */ + private String orgIdPath; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/RecreationSportEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/RecreationSportEntity.java index 20b0c4220f..08fe6bbc21 100755 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/RecreationSportEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/RecreationSportEntity.java @@ -14,55 +14,59 @@ import java.util.Date; * @since v1.0.0 2023-06-20 */ @Data -@EqualsAndHashCode(callSuper=false) +@EqualsAndHashCode(callSuper = false) @TableName("recreation_sport") public class RecreationSportEntity extends BaseEpmetEntity { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; /** * 标题 */ - private String title; + private String title; /** * 类型 */ - private String type; + private String type; /** * 内容 */ - private String content; + private String content; /** * 地址 */ - private String address; + private String address; /** * 开始时间 */ - private Date startTime; + private Date startTime; /** * 结束时间 */ - private Date endTime; + private Date endTime; /** * 是否报名 */ - private String apply; + private String apply; /** * 报名开始时间 */ - private Date applyStart; + private Date applyStart; /** * 报名结束时间 */ - private Date applyEnd; + private Date applyEnd; + /** + * 组织ID路径 + */ + private String orgIdPath; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/CommunityCareServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/CommunityCareServiceImpl.java index be2947cbf4..73f8320073 100755 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/CommunityCareServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/CommunityCareServiceImpl.java @@ -10,14 +10,19 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.CommunityCareDao; import com.epmet.dto.CommunityCareDTO; import com.epmet.dto.form.CommunityCareFormDTO; +import com.epmet.dto.result.LoginUserDetailsResultDTO; import com.epmet.entity.CommunityCareEntity; +import com.epmet.remote.EpmetUserRemoteService; import com.epmet.service.CommunityCareService; +import com.epmet.service.IcResiDemandDictService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import org.apache.commons.lang3.StringUtils; +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.ArrayList; import java.util.Arrays; import java.util.List; @@ -32,6 +37,12 @@ import java.util.Map; @Service public class CommunityCareServiceImpl extends BaseServiceImpl implements CommunityCareService { + @Resource + private EpmetUserRemoteService remoteService; + + @Autowired + private IcResiDemandDictService icResiDemandDictService; + @Override public PageData page(Map params) { IPage page = baseDao.selectPage( @@ -74,6 +85,9 @@ public class CommunityCareServiceImpl extends BaseServiceImpl search(CommunityCareFormDTO dto) { + LoginUserDetailsResultDTO userDetails = remoteService.getLoginUserDetails(); + String orgIdPath = userDetails.getOrgIdPath();//社区级别的orgIdPath PageInfo pageInfo = PageHelper.startPage(dto.getPageNo(), dto.getPageSize(), dto.getIsPage()) - .doSelectPageInfo(() -> baseDao.search(dto.getTitle(), dto.getUnitName(), dto.getAttn(), dto.getOnsiteServices(), dto.getStartTime(), dto.getEndTime())); + .doSelectPageInfo(() -> baseDao.search(dto.getTitle(), dto.getUnitName(), dto.getAttn(), dto.getOnsiteServices(), + dto.getStartTime(), dto.getEndTime(), orgIdPath)); if (null != pageInfo.getList() && pageInfo.getList().size() > 0) { buildDate(pageInfo.getList()); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/PhysicianManageServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/PhysicianManageServiceImpl.java index 540332f752..435bc56010 100755 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/PhysicianManageServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/PhysicianManageServiceImpl.java @@ -9,7 +9,9 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.PhysicianManageDao; import com.epmet.dto.PhysicianManageDTO; import com.epmet.dto.form.PhysicianManageFormDTO; +import com.epmet.dto.result.LoginUserDetailsResultDTO; import com.epmet.entity.PhysicianManageEntity; +import com.epmet.remote.EpmetUserRemoteService; import com.epmet.service.PhysicianManageService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -17,6 +19,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import javax.annotation.Resource; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -31,6 +34,9 @@ import java.util.Map; @Service public class PhysicianManageServiceImpl extends BaseServiceImpl implements PhysicianManageService { + @Resource + private EpmetUserRemoteService remoteService; + @Override public PageData page(Map params) { IPage page = baseDao.selectPage( @@ -49,10 +55,10 @@ public class PhysicianManageServiceImpl extends BaseServiceImpl getWrapper(Map params) { String id = (String) params.get(FieldConstant.ID_HUMP); - + String orgPath = remoteService.getLoginUserDetails().getOrgIdPath(); QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); - + wrapper.likeRight(StringUtils.isNotBlank(orgPath), "ORG_ID_PATH", orgPath); return wrapper; } @@ -66,6 +72,9 @@ public class PhysicianManageServiceImpl extends BaseServiceImpl search(PhysicianManageFormDTO dto) { + LoginUserDetailsResultDTO userDetails = remoteService.getLoginUserDetails(); + String orgIdPath = userDetails.getOrgIdPath();//社区级别的orgIdPath PageInfo pageInfo = PageHelper.startPage(dto.getPageNo(), dto.getPageSize(), dto.getIsPage()) - .doSelectPageInfo(() -> baseDao.search(dto.getName(), dto.getIdCard(), dto.getLevel(), dto.getSubOrg(), dto.getOrgLevel())); + .doSelectPageInfo(() -> baseDao.search(dto.getName(), dto.getIdCard(), dto.getLevel(), dto.getSubOrg(), + dto.getOrgLevel(), orgIdPath)); return new PageData<>(pageInfo.getList() == null ? new ArrayList<>() : pageInfo.getList(), pageInfo.getTotal()); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/RecreationSportServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/RecreationSportServiceImpl.java index 83be2360f6..004034bc24 100755 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/RecreationSportServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/RecreationSportServiceImpl.java @@ -10,7 +10,9 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.RecreationSportDao; import com.epmet.dto.RecreationSportDTO; import com.epmet.dto.form.RecreationSportFormDTO; +import com.epmet.dto.result.LoginUserDetailsResultDTO; import com.epmet.entity.RecreationSportEntity; +import com.epmet.remote.EpmetUserRemoteService; import com.epmet.service.RecreationSportService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -18,6 +20,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import javax.annotation.Resource; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -32,6 +35,9 @@ import java.util.Map; @Service public class RecreationSportServiceImpl extends BaseServiceImpl implements RecreationSportService { + @Resource + private EpmetUserRemoteService remoteService; + @Override public PageData page(Map params) { IPage page = baseDao.selectPage( @@ -50,10 +56,11 @@ public class RecreationSportServiceImpl extends BaseServiceImpl getWrapper(Map params) { String id = (String) params.get(FieldConstant.ID_HUMP); - + LoginUserDetailsResultDTO userDetails = remoteService.getLoginUserDetails(); + String orgIdPath = userDetails.getOrgIdPath();//社区级别的orgIdPath QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); - + wrapper.likeRight(StringUtils.isNotBlank(orgIdPath), "ORG_ID_PATH", orgIdPath); return wrapper; } @@ -67,6 +74,9 @@ public class RecreationSportServiceImpl extends BaseServiceImpl search(RecreationSportFormDTO dto) { + LoginUserDetailsResultDTO userDetails = remoteService.getLoginUserDetails(); + String orgIdPath = userDetails.getOrgIdPath();//社区级别的orgIdPath PageInfo pageInfo = PageHelper.startPage(dto.getPageNo(), dto.getPageSize(), dto.getIsPage()) .doSelectPageInfo(() -> baseDao.search(dto.getTitle(), dto.getType(), dto.getApply(), - DateUtil.formatDateTime(dto.getStartTime()), DateUtil.formatDateTime(dto.getEndTime()))); + DateUtil.formatDateTime(dto.getStartTime()), DateUtil.formatDateTime(dto.getEndTime()), orgIdPath)); return new PageData<>(pageInfo.getList() == null ? new ArrayList<>() : pageInfo.getList(), pageInfo.getTotal()); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/CommunityCareDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/CommunityCareDao.xml index a47c6c9dae..cc8e73d69e 100755 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/CommunityCareDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/CommunityCareDao.xml @@ -15,6 +15,7 @@ + @@ -39,7 +40,7 @@ cc.IMG_URL FROM community_care cc - cc.DEL_FLAG = 0 + cc.DEL_FLAG = 0 AND cc.ORG_ID_PATH LIKE concat(#{orgIdPath},'%') AND cc.TITLE LIKE concat('%',#{title},'%') diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/PhysicianManageDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/PhysicianManageDao.xml index 4faad5940e..17709badaf 100755 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/PhysicianManageDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/PhysicianManageDao.xml @@ -12,6 +12,7 @@ + @@ -34,7 +35,7 @@ FROM physician_manage pm - pm.DEL_FLAG = 0 + pm.DEL_FLAG = 0 AND pm.ORG_ID_PATH LIKE concat(#{orgIdPath}, '%') AND pm.NAME LIKE concat('%',#{name},'%') @@ -44,7 +45,7 @@ AND pm.SUB_ORG LIKE concat('%',#{subOrg},'%') - + AND pm.LEVEL = #{level} @@ -53,5 +54,4 @@ - diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/RecreationSportDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/RecreationSportDao.xml index 3888d15b7e..f52bc7cb14 100755 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/RecreationSportDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/RecreationSportDao.xml @@ -14,6 +14,7 @@ + @@ -40,7 +41,7 @@ FROM recreation_sport rs - rs.DEL_FLAG = 0 + rs.DEL_FLAG = 0 AND rs.ORG_ID_PATH LIKE concat(#{orgIdPath},'%') AND rs.TITLE LIKE concat('%',#{title},'%')