diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridDetailResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridDetailResultDTO.java index 22d4951210..ab9256c1b2 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridDetailResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridDetailResultDTO.java @@ -96,4 +96,6 @@ public class GridDetailResultDTO implements Serializable { */ private Integer gridSort = 0; + private String coordinates; + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java index fcb04db161..04d8dfb98b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java @@ -166,6 +166,7 @@ public class AgencyServiceImpl implements AgencyService { originalEntity.setCode(formDTO.getCode()); originalEntity.setContacts(formDTO.getContacts()); originalEntity.setMobile(formDTO.getMobile()); + originalEntity.setRemark(formDTO.getRemark()); //利用mybatis 拦截器填充值 originalEntity.setUpdatedTime(null); originalEntity.setUpdatedBy(null); diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml index 9febecf227..fcd7f78600 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml @@ -197,7 +197,8 @@ grid_type AS 'gridType', contacts AS 'contacts', mobile AS 'mobile', - sort AS gridSort + sort AS gridSort, + COORDINATES AS coordinates FROM customer_grid WHERE diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinePieFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinePieFormDTO.java new file mode 100644 index 0000000000..f1374ada46 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinePieFormDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.form;/** + * @author ZhaoQiFeng + * @date 2023/2/2 + * @apiNote + */ + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2023/2/2 15:20 + */ +@Data +public class VaccinePieFormDTO implements Serializable { + private static final long serialVersionUID = 1L; + private String customerId; + private String agencyId; + private String gridId; + /** + * 接种次数 + */ + private String vaccineCount; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinePieResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinePieResultDTO.java new file mode 100644 index 0000000000..c3844c18c3 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinePieResultDTO.java @@ -0,0 +1,22 @@ +package com.epmet.dto.result;/** + * @author ZhaoQiFeng + * @date 2023/2/2 + * @apiNote + */ + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2023/2/2 15:20 + */ +@Data +public class VaccinePieResultDTO implements Serializable { + private static final long serialVersionUID = 1L; + private String code; + private String value; + private String label; +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java index e00f730bfc..db0fa3b6c0 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java @@ -23,9 +23,12 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.form.EpidemicPreventionFormDTO; +import com.epmet.dto.form.VaccinePieFormDTO; import com.epmet.dto.result.EpidemicPreventionInfoDTO; import com.epmet.dto.result.EpidemicPreventionResultDTO; +import com.epmet.dto.result.VaccinePieResultDTO; import com.epmet.service.IcResiUserService; +import com.epmet.service.IcVaccineService; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -35,6 +38,7 @@ import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import java.util.List; /** @@ -50,6 +54,8 @@ public class IcEpidemicPreventionController{ @Resource private IcResiUserService icResiUserService; + @Resource + private IcVaccineService icVaccineService; /** @@ -112,4 +118,8 @@ public class IcEpidemicPreventionController{ return new Result().ok(result); } + @PostMapping("vaccinePie") + public Result> getVaccinePie(@LoginUser TokenDto tokenDto, @RequestBody VaccinePieFormDTO formDTO) { + return new Result>().ok(icVaccineService.getVaccinePie(tokenDto, formDTO)); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVaccineDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVaccineDao.java index a479866fea..ec6a1e07b6 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVaccineDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVaccineDao.java @@ -6,9 +6,11 @@ import com.epmet.dto.IcVaccineDTO; import com.epmet.dto.YTVaccineListDTO; import com.epmet.dto.form.MyNatListFormDTO; import com.epmet.dto.form.VaccineListFormDTO; +import com.epmet.dto.form.VaccinePieFormDTO; import com.epmet.dto.result.IcVaccineListResultDTO; import com.epmet.dto.result.MyNatListResultDTO; import com.epmet.dto.result.RelationAndNatResultDTO; +import com.epmet.dto.result.VaccinePieResultDTO; import com.epmet.entity.IcVaccineEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -91,4 +93,6 @@ public interface IcVaccineDao extends BaseDao { List setDeleteByIdCard(@Param("idCard") String idCard,@Param("customerId") String customerId); + List getVaccinePieData(VaccinePieFormDTO formDTO); + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVaccineService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVaccineService.java index 609297b255..37e64b8f35 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVaccineService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVaccineService.java @@ -2,12 +2,15 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcVaccineDTO; import com.epmet.dto.form.AddIcVaccineFormDTO; import com.epmet.dto.form.IcVaccineFormDTO; import com.epmet.dto.form.VaccineListFormDTO; +import com.epmet.dto.form.VaccinePieFormDTO; import com.epmet.dto.result.IcVaccineListResultDTO; import com.epmet.dto.result.VaccineListDTO; +import com.epmet.dto.result.VaccinePieResultDTO; import com.epmet.entity.IcVaccineEntity; import java.nio.file.Path; @@ -70,4 +73,15 @@ public interface IcVaccineService extends BaseService { void del(IcVaccineFormDTO formDTO); void initVaccineLocal(); + + /** + * 辖区疫苗接种情况 + * + * @Param tokenDto + * @Param formDTO + * @Return {@link List} + * @Author zhaoqifeng + * @Date 2023/2/2 15:35 + */ + List getVaccinePie(TokenDto tokenDto, VaccinePieFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java index 0d6b3418bd..549ca8ddfe 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java @@ -16,6 +16,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.*; import com.epmet.constants.ImportTaskConstants; import com.epmet.dao.IcNatDao; @@ -601,6 +602,38 @@ public class IcVaccineServiceImpl extends BaseServiceImpl} + * @Author zhaoqifeng + * @Date 2023/2/2 15:35 + */ + @Override + public List getVaccinePie(TokenDto tokenDto, VaccinePieFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + if(org.apache.commons.lang3.StringUtils.isBlank(formDTO.getAgencyId())){ + //没有指定查询某个组织时,默认查询当前用户所属组织及下级 + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); + if (null != staffInfo) { + formDTO.setAgencyId(staffInfo.getAgencyId()); + } + } + List list = baseDao.getVaccinePieData(formDTO); + list.forEach(item -> { + if (NumConstant.ZERO_STR.equals(item.getValue())) { + item.setLabel("未接种人数"); + } else { + item.setLabel("接种" + item.getValue() + "针人数"); + } + }); + return list; + } + @Transactional(rollbackFor = Exception.class) public void updateRelation(List list,String type){ if (NumConstant.ONE_STR.equals(type)){ diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml index ea56bb20b6..882a0c421e 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml @@ -252,4 +252,43 @@ select ID from ic_vaccine where CUSTOMER_ID = #{customerId} and ID_CARD = #{idCard} +