Browse Source

补充查询房主接口

feature/codemove
wanggongfeng 3 years ago
parent
commit
cd45dc85dc
  1. 9
      epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/controller/EpidemicUserInfoController.java
  2. 11
      epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/dao/EpidemicUserInfoDao.java
  3. 11
      epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/EpidemicUserInfoService.java
  4. 6
      epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/impl/EpidemicUserInfoServiceImpl.java
  5. 25
      epdc-cloud-vim-yushan/src/main/resources/mapper/epidemic/EpidemicUserInfoDao.xml

9
epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/controller/EpidemicUserInfoController.java

@ -11,6 +11,7 @@ import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.dto.personroom.EpidemicUnitOwnerDTO;
import com.elink.esua.epdc.vaccine.epidemic.dao.EpidemicUserInfoDao;
import com.elink.esua.epdc.vaccine.epidemic.dto.*;
import com.elink.esua.epdc.vaccine.epidemic.dto.result.EpidemicPageResultDTO;
@ -19,6 +20,7 @@ import com.elink.esua.epdc.vaccine.epidemic.entity.EpidemicUserInfoEntity;
import com.elink.esua.epdc.vaccine.epidemic.excel.EpidecmicUserNewExcel;
import com.elink.esua.epdc.vaccine.epidemic.service.EpidemicUserInfoService;
import com.elink.esua.epdc.vaccine.epidemic.service.impl.EpidemicUserInfoExportServer;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -187,4 +189,11 @@ public class EpidemicUserInfoController {
public Result resetUserCheckState() {
return epidemicUserInfoService.resetUserCheckState();
}
@GetMapping("getOwner")
@ApiOperation("查询房主")
@LogOperation("查询房主")
public Result<EpidemicUnitOwnerDTO> getOwner(@RequestParam Map<String, Object> params) {
return epidemicUserInfoService.getOwner(params);
}
}

11
epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/dao/EpidemicUserInfoDao.java

@ -2,6 +2,7 @@ package com.elink.esua.epdc.vaccine.epidemic.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.personroom.EpidemicUnitOwnerDTO;
import com.elink.esua.epdc.vaccine.epidemic.dto.EpidemicRecordDetailDTO;
import com.elink.esua.epdc.vaccine.epidemic.dto.EpidemicRecordListDTO;
import com.elink.esua.epdc.vaccine.epidemic.dto.EpidemicUserDeptInfoDTO;
@ -242,4 +243,14 @@ public interface EpidemicUserInfoDao extends BaseDao<EpidemicUserInfoEntity> {
* @date 2022/4/25 15:59
*/
void deleteByIds(Long[] ids);
/**
* 查询房主
*
* @param params
* @return io.pingyin.common.utils.Result<io.pingyin.modules.personroom.dto.EpidemicUnitOwnerDTO>
* @author wgf
* @date 2022/5/30 9:27
*/
EpidemicUnitOwnerDTO getOwner(Map<String, Object> params);
}

11
epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/EpidemicUserInfoService.java

@ -4,6 +4,7 @@ package com.elink.esua.epdc.vaccine.epidemic.service;
import com.elink.esua.epdc.commons.mybatis.service.CrudService;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.personroom.EpidemicUnitOwnerDTO;
import com.elink.esua.epdc.vaccine.epidemic.dto.*;
import com.elink.esua.epdc.vaccine.epidemic.dto.result.EpidemicPageResultDTO;
import com.elink.esua.epdc.vaccine.epidemic.dto.result.EpidemicPageResultV2DTO;
@ -184,4 +185,14 @@ public interface EpidemicUserInfoService extends CrudService<EpidemicUserInfoEnt
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
Result resetUserCheckState();
/**
* 查询房主
*
* @param params
* @return io.pingyin.common.utils.Result<io.pingyin.modules.personroom.dto.EpidemicUnitOwnerDTO>
* @author wgf
* @date 2022/5/30 9:27
*/
Result<EpidemicUnitOwnerDTO> getOwner(Map<String, Object> params);
}

6
epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/impl/EpidemicUserInfoServiceImpl.java

@ -23,6 +23,7 @@ import com.elink.esua.epdc.dto.SysSimpleDictDTO;
import com.elink.esua.epdc.dto.house.SysPopulationSimpleDictDTO;
import com.elink.esua.epdc.dto.house.form.SysPopulationSimpleDictFormDTO;
import com.elink.esua.epdc.dto.house.result.EpdcPopulationErrorResultDTO;
import com.elink.esua.epdc.dto.personroom.EpidemicUnitOwnerDTO;
import com.elink.esua.epdc.vaccine.constant.ImageConstant;
import com.elink.esua.epdc.vaccine.epidemic.dao.EpidemicUserInfoDao;
import com.elink.esua.epdc.vaccine.epidemic.dao.EpidemicUserInoutRecordDao;
@ -1586,4 +1587,9 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf
vaccinationInfoDao.updateDeptInfo(vaccinationInfoEntity);
}
@Override
public Result<EpidemicUnitOwnerDTO> getOwner(Map<String, Object> params) {
return new Result<EpidemicUnitOwnerDTO>().ok(baseDao.getOwner(params));
}
}

25
epdc-cloud-vim-yushan/src/main/resources/mapper/epidemic/EpidemicUserInfoDao.xml

@ -627,4 +627,29 @@
#{id}
</foreach>
</delete>
<select id="getOwner" resultType="com.elink.esua.epdc.dto.personroom.EpidemicUnitOwnerDTO">
SELECT
i.ID_CARD,
i.USER_NAME as ownerName,
r.MOBILE,
CONCAT_WS(
'/',
'平阴县',
r.LIVE_ADDRESS_NAME,
r.COMMUNITY,
r.GRID_NAME,
r.PLOT,
r.BUILDING_NO,
r.UNIT,
r.ROOM_NO
) AS address
FROM
epidemic_user_info i
INNER JOIN epidemic_user_inout_record r ON i.ID_CARD = r.ID_CARD
WHERE
i.DEL_FLAG = '0'
AND i.ID_CARD = #{idCard}
LIMIT 1
</select>
</mapper>

Loading…
Cancel
Save