diff --git a/epdc-cloud-admin/pom.xml b/epdc-cloud-admin/pom.xml index f58495f..57c40a2 100644 --- a/epdc-cloud-admin/pom.xml +++ b/epdc-cloud-admin/pom.xml @@ -175,9 +175,9 @@ false - 47.104.224.45:8848 + mse-7be164015-p.nacos-ans.mse.aliyuncs.com:8848 - de000340-5fc4-45aa-bdbc-dd96852012ad + 95aea863-dcc6-4f75-b256-9a6061a30a40 http://localhost:9411 diff --git a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/controller/EpidemicReportUserInfoController.java b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/controller/EpidemicReportUserInfoController.java index 27fa171..25c0421 100644 --- a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/controller/EpidemicReportUserInfoController.java +++ b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/controller/EpidemicReportUserInfoController.java @@ -97,7 +97,7 @@ public class EpidemicReportUserInfoController { * 根据县账号 -查询下方所有街道 * * @param level - * @return java.util.List + * @return java.util.List * @author wk * @date 2021-01-19 20:32 */ diff --git a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/controller/EpidemicUserInfoController.java b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/controller/EpidemicUserInfoController.java index 7418678..06be1a9 100644 --- a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/controller/EpidemicUserInfoController.java +++ b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/controller/EpidemicUserInfoController.java @@ -2,7 +2,6 @@ package com.elink.esua.epdc.vaccine.epidemic.controller; import com.elink.esua.epdc.commons.tools.annotation.LogOperation; -import com.elink.esua.epdc.commons.tools.constant.Constant; import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; import com.elink.esua.epdc.commons.tools.utils.Result; @@ -21,6 +20,7 @@ import com.elink.esua.epdc.vaccine.epidemic.excel.EpidecmicUserNewExcel; import com.elink.esua.epdc.vaccine.epidemic.service.EpidemicUserInfoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; + import javax.servlet.http.HttpServletResponse; import java.util.List; import java.util.Map; @@ -53,13 +53,11 @@ public class EpidemicUserInfoController { @PostMapping @LogOperation("保存") - public Result save(@RequestBody EpidemicUserInfoDTO dto) { + public Result save(@RequestBody EpidemicReportUserInfoDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - epidemicUserInfoService.save(dto); - - return new Result(); + return epidemicUserInfoService.saveNew(dto); } @PutMapping @@ -89,7 +87,7 @@ public class EpidemicUserInfoController { /** - * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @return io.pingyin.common.utils.Result> * @describe: 接种信息列表 * @author wangtong * @date 2021/4/15 16:40 @@ -115,7 +113,6 @@ public class EpidemicUserInfoController { // dto.setIsInoculate("1"); //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - ; epidemicUserInfoService.update(dto); return new Result(); } diff --git a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/dao/SelectAreaDao.java b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/dao/SelectAreaDao.java index 08dbc38..fbd432b 100644 --- a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/dao/SelectAreaDao.java +++ b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/dao/SelectAreaDao.java @@ -15,7 +15,7 @@ public interface SelectAreaDao { * 查询省市接口数据 * @author wk * @date 2021-01-19 15:20 - * @return java.util.List + * @return java.util.List */ List getAreaList(); @@ -23,6 +23,8 @@ public interface SelectAreaDao { List getLiveAreaList(); + AreaNewDto getLiveArea(@Param("areaCode") String areaCode); + List getAppLiveAreaList(); /* @@ -31,7 +33,7 @@ public interface SelectAreaDao { * @param countyCode * @author wk * @date 2021-01-21 20:00 - * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @return io.pingyin.common.utils.Result> */ Integer[] selectPeoPleNumber(@Param("countyCode") String countyCode); diff --git a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/EpidemicReportUserInfoService.java b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/EpidemicReportUserInfoService.java index 7568429..c07a4e8 100644 --- a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/EpidemicReportUserInfoService.java +++ b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/EpidemicReportUserInfoService.java @@ -27,7 +27,7 @@ public interface EpidemicReportUserInfoService extends CrudService + * @return io.pingyin.common.page.PageData */ PageData page(Map params); @@ -36,28 +36,28 @@ public interface EpidemicReportUserInfoService extends CrudService + * @return java.util.List */ List list(Map params); - /* + /** * * 更新数据信息 * @param dto * @author wk * @date 2021-01-19 17:46 - * @return com.elink.esua.epdc.commons.tools.utils.Result + * @return io.pingyin.common.utils.Result */ Result updateUserInfo(EpidemicUserInfoUpdateDTO dto); - /* + /** * * 查询 县下面的街道信息 * @param level * @author wk * @date 2021-01-19 19:54 - * @return java.util.List + * @return java.util.List */ List getStreetByLevel(String level); /** @@ -65,7 +65,7 @@ public interface EpidemicReportUserInfoService extends CrudService + * @return io.pingyin.common.page.PageData * @describe: 人员信息列表 * @author wangtong * @date 2021/1/19 17:45 @@ -53,7 +63,7 @@ public interface EpidemicUserInfoService extends CrudService getPageList(Map params); /** - * @return com.elink.esua.epdc.vaccine.epidemic.dto.EpidemicRecordDetailDTO + * @return io.pingyin.modules.epidemic.dto.EpidemicRecordDetailDTO * @describe: 查询详情 * @author wangtong * @date 2021/1/26 21:01 @@ -62,7 +72,7 @@ public interface EpidemicUserInfoService extends CrudService + * @return java.util.List * @describe: 导出人员信息数据 * @author wangtong * @date 2021/1/28 15:13 @@ -74,14 +84,14 @@ public interface EpidemicUserInfoService extends CrudService> + * @return io.pingyin.common.utils.Result> * @describe: 接种信息列表 * @author wangtong * @date 2021/4/15 16:40 @@ -93,7 +103,7 @@ public interface EpidemicUserInfoService extends CrudService getWrapper(Map params) { @@ -226,7 +238,7 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl deleteIdCardArr = new ArrayList<>(); + deleteIdCardArr.add(dto.getIdCard()); + + EpidemicUserInfoEntity userEntity = ConvertUtils.sourceToTarget(dto, EpidemicUserInfoEntity.class); + EpidemicUserInoutRecordEntity userRecordEntity = ConvertUtils.sourceToTarget(dto, EpidemicUserInoutRecordEntity.class); + + if (StringUtils.isNotBlank(dto.getDestinationAddressCode()) && StringUtils.isNotBlank(dto.getDestinationAddressName())) { + userRecordEntity.setOutLiveAddressName("在境外"); + userRecordEntity.setOutLiveAddressCode("1"); + } + if (StringUtils.isNotBlank(dto.getLiveAddressCode())) { + userRecordEntity.setLiveAddressName(selectAreaDao.getLiveArea(dto.getLiveAddressCode()).getLabel()); + } + + epidemicUserInfoService.insert(userEntity); + epidemicUserInoutRecordService.insert(userRecordEntity); + } catch (RenException e) { + return new Result().error(e.getMsg()); + } + return new Result(); + } + + /** + * 根据省名称查询code + * + * @param orgName + * @param flag (0:非必填项;1:必填项) + * @return + */ + private List getProvinceCodeByName(int flag, String orgName) { + List list = new ArrayList<>(); + list = epidemicReportUserInfoDao.getProvinceCodeByName(orgName); + if (flag == 1 && list.size() != 1) { + // 必填 + list = new ArrayList<>(); + } else if (list.size() != 1) { + // 非必填 + list = new ArrayList<>(); + OrgDto od = new OrgDto(); + od.setOrgCode(""); + od.setOrgName(""); + list.add(od); + } + + return list; + } + + @Override public Result updateVaccinationInfo(VaccinationInfoDTO dto) { // 查询实际接种的次数 @@ -353,7 +433,7 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl> getCompantyList() { List vaccineTypeDTOList = vaccineCompanyService.compantyList(); diff --git a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/service/VaccinationInfoService.java b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/service/VaccinationInfoService.java index 627e4a8..9e8dc4e 100644 --- a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/service/VaccinationInfoService.java +++ b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/service/VaccinationInfoService.java @@ -19,9 +19,19 @@ public interface VaccinationInfoService extends CrudService + * @return java.util.List * @author zhy * @date 2021/4/22 18:35 */ List checkVaccination(VaccinationInfoDTO dto); + + /** + * 删除前校验 + * + * @param dto + * @return boolean + * @author zhy + * @date 2021/5/6 9:53 + */ + boolean beforeDelete(VaccinationInfoDTO dto); } \ No newline at end of file diff --git a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/service/impl/VaccinationInfoServiceImpl.java b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/service/impl/VaccinationInfoServiceImpl.java index e5077c3..ced0137 100644 --- a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/service/impl/VaccinationInfoServiceImpl.java +++ b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/service/impl/VaccinationInfoServiceImpl.java @@ -1,7 +1,10 @@ package com.elink.esua.epdc.vaccine.vim.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.elink.esua.epdc.commons.mybatis.service.impl.CrudServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.vaccine.vim.dao.VaccinationInfoDao; import com.elink.esua.epdc.vaccine.vim.dto.VaccinationInfoDTO; import com.elink.esua.epdc.vaccine.vim.entity.VaccinationInfoEntity; @@ -11,6 +14,7 @@ import org.springframework.stereotype.Service; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * 接种信息 @@ -34,8 +38,27 @@ public class VaccinationInfoServiceImpl extends CrudServiceImpl page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, VaccinationInfoDTO.class); + } + @Override public List checkVaccination(VaccinationInfoDTO dto) { return baseDao.checkVaccination(dto); } + + @Override + public boolean beforeDelete(VaccinationInfoDTO dto) { + int dose = dto.getDose(); + // 根据身份证查询处该人员的所有接种记录 + dto.setDose(null); + List checkInfoList = checkVaccination(dto); + int maxDose = checkInfoList.stream().collect(Collectors.summarizingInt(VaccinationInfoEntity::getDose)).getMax(); + return maxDose <= dose; + } } \ No newline at end of file diff --git a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/service/impl/VaccinationSiteServiceImpl.java b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/service/impl/VaccinationSiteServiceImpl.java index a379536..5666076 100644 --- a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/service/impl/VaccinationSiteServiceImpl.java +++ b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/service/impl/VaccinationSiteServiceImpl.java @@ -1,10 +1,15 @@ package com.elink.esua.epdc.vaccine.vim.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.elink.esua.epdc.commons.mybatis.service.impl.CrudServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.vaccine.vim.dao.VaccinationSiteDao; +import com.elink.esua.epdc.vaccine.vim.dto.VaccinationInfoDTO; import com.elink.esua.epdc.vaccine.vim.dto.VaccinationSiteDTO; import com.elink.esua.epdc.vaccine.vim.dto.result.VaccineDto; +import com.elink.esua.epdc.vaccine.vim.entity.VaccinationInfoEntity; import com.elink.esua.epdc.vaccine.vim.entity.VaccinationSiteEntity; import com.elink.esua.epdc.vaccine.vim.service.VaccinationSiteService; import org.apache.commons.lang3.StringUtils; @@ -34,6 +39,14 @@ public class VaccinationSiteServiceImpl extends CrudServiceImpl page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, VaccinationSiteDTO.class); + } @Override public List getSiteList() { diff --git a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/service/impl/VaccineCompanyServiceImpl.java b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/service/impl/VaccineCompanyServiceImpl.java index 3433a9f..05d953f 100644 --- a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/service/impl/VaccineCompanyServiceImpl.java +++ b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/service/impl/VaccineCompanyServiceImpl.java @@ -1,10 +1,15 @@ package com.elink.esua.epdc.vaccine.vim.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.elink.esua.epdc.commons.mybatis.service.impl.CrudServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.vaccine.vim.dao.VaccineCompanyDao; +import com.elink.esua.epdc.vaccine.vim.dto.VaccinationSiteDTO; import com.elink.esua.epdc.vaccine.vim.dto.VaccineCompanyDTO; import com.elink.esua.epdc.vaccine.vim.dto.result.VaccineDto; +import com.elink.esua.epdc.vaccine.vim.entity.VaccinationSiteEntity; import com.elink.esua.epdc.vaccine.vim.entity.VaccineCompanyEntity; import com.elink.esua.epdc.vaccine.vim.service.VaccineCompanyService; import org.apache.commons.lang3.StringUtils; @@ -33,6 +38,14 @@ public class VaccineCompanyServiceImpl extends CrudServiceImpl page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, VaccineCompanyDTO.class); + } @Override public List compantyList() { diff --git a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/service/impl/VaccineTypeServiceImpl.java b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/service/impl/VaccineTypeServiceImpl.java index c831a1c..1923cb5 100644 --- a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/service/impl/VaccineTypeServiceImpl.java +++ b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/service/impl/VaccineTypeServiceImpl.java @@ -1,10 +1,15 @@ package com.elink.esua.epdc.vaccine.vim.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.elink.esua.epdc.commons.mybatis.service.impl.CrudServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.vaccine.vim.dao.VaccineTypeDao; +import com.elink.esua.epdc.vaccine.vim.dto.VaccineCompanyDTO; import com.elink.esua.epdc.vaccine.vim.dto.VaccineTypeDTO; import com.elink.esua.epdc.vaccine.vim.dto.result.VaccineDto; +import com.elink.esua.epdc.vaccine.vim.entity.VaccineCompanyEntity; import com.elink.esua.epdc.vaccine.vim.entity.VaccineTypeEntity; import com.elink.esua.epdc.vaccine.vim.service.VaccineTypeService; import org.apache.commons.lang3.StringUtils; @@ -33,6 +38,14 @@ public class VaccineTypeServiceImpl extends CrudServiceImpl page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, VaccineTypeDTO.class); + } @Override public List vaccineList() { diff --git a/epdc-cloud-vim-yushan/src/main/resources/mapper/epidemic/SelectAreaDao.xml b/epdc-cloud-vim-yushan/src/main/resources/mapper/epidemic/SelectAreaDao.xml index a39da7b..6f157be 100644 --- a/epdc-cloud-vim-yushan/src/main/resources/mapper/epidemic/SelectAreaDao.xml +++ b/epdc-cloud-vim-yushan/src/main/resources/mapper/epidemic/SelectAreaDao.xml @@ -89,6 +89,18 @@ LEFT join area_code_child b on a.county_code = b.p_code + +