Browse Source

新冠病毒疫苗接种人员信息台账

master
wanggongfeng 3 years ago
parent
commit
789678a217
  1. 32
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinePrarmeterListFormDTO.java
  2. 27
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccinePrarmeterController.java
  3. 11
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVaccinePrarmeterDao.java
  4. 51
      epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccinePrarmeterDao.xml

32
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinePrarmeterListFormDTO.java

@ -0,0 +1,32 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import java.io.Serializable;
/**
* @Author wgf
* @DateTime 2022/8/22 10:30
* @DESC
*/
@Data
public class VaccinePrarmeterListFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = -498378993902522370L;
/**
* 手机号
*/
private String mobile;
/**
* 地点名称
*/
private String name;
/**
* user所属组织ID
*/
private String orgId;
}

27
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccinePrarmeterController.java

@ -1,7 +1,10 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
@ -9,7 +12,12 @@ import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dao.IcVaccinePrarmeterDao;
import com.epmet.dto.IcPointNucleicMonitoringDTO;
import com.epmet.dto.IcVaccinePrarmeterDTO;
import com.epmet.dto.form.PointHSYMFormDTO;
import com.epmet.dto.form.VaccinePrarmeterListFormDTO;
import com.epmet.excel.IcPointNucleicMonitoringExcel;
import com.epmet.excel.IcVaccinePrarmeterExcel;
import com.epmet.service.IcVaccinePrarmeterService;
import org.springframework.beans.factory.annotation.Autowired;
@ -33,6 +41,9 @@ public class IcVaccinePrarmeterController {
@Autowired
private IcVaccinePrarmeterService icVaccinePrarmeterService;
@Autowired
private IcVaccinePrarmeterDao icVaccinePrarmeterDao;
@RequestMapping("page")
public Result<PageData<IcVaccinePrarmeterDTO>> page(@RequestParam Map<String, Object> params){
PageData<IcVaccinePrarmeterDTO> page = icVaccinePrarmeterService.page(params);
@ -77,6 +88,22 @@ public class IcVaccinePrarmeterController {
ExcelUtils.exportExcelToTarget(response, null, list, IcVaccinePrarmeterExcel.class);
}
/**
* Desc: 新冠病毒疫苗接种人员信息台账导出
* @param response
* @param formDTO
* @param tokenDto
* @author wgf
* @date 2022/6/24 13:57
*/
@PostMapping("vaccine-export")
public void vaccineExport(HttpServletResponse response, @RequestBody VaccinePrarmeterListFormDTO formDTO, @LoginUser TokenDto tokenDto) throws Exception {
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class);
List<IcVaccinePrarmeterDTO> list = icVaccinePrarmeterDao.vaccineExport(formDTO);
ExcelUtils.exportExcelToTarget(response, null, list, IcVaccinePrarmeterExcel.class);
}
}

11
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVaccinePrarmeterDao.java

@ -1,9 +1,14 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IcPointNucleicMonitoringDTO;
import com.epmet.dto.IcVaccinePrarmeterDTO;
import com.epmet.dto.form.VaccinePrarmeterListFormDTO;
import com.epmet.entity.IcVaccinePrarmeterEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 新冠病毒疫苗接种人员信息台账
*
@ -12,5 +17,7 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface IcVaccinePrarmeterDao extends BaseDao<IcVaccinePrarmeterEntity> {
}
List<IcVaccinePrarmeterDTO> vaccineExport(VaccinePrarmeterListFormDTO formDTO);
}

51
epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccinePrarmeterDao.xml

@ -39,5 +39,54 @@
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="vaccineExport" resultType="com.epmet.dto.IcVaccinePrarmeterDTO" parameterType="com.epmet.dto.form.VaccinePrarmeterListFormDTO">
select
ID,
CUSTOMER_ID,
GRID_ID,
GRID_NAME,
AGENCY_ID,
PIDS,
VILLAGE_ID,
VILLAGE_NAME,
BUILD_ID,
BUILD_NAME,
UNIT_ID,
UNIT_NAME,
HOME_ID,
HOME_NAME,
HOUSEHOLD_TYPE,
NAME,
MOBILE,
ID_CARD,
IS_VACCINATION,
FIRST_VAC_TIME,
FIRST_VAC_SITE,
SECOND_VAC_TIME,
SECOND_VAC_SITE,
THIRD_VAC_TIME,
THIRD_VAC_SITE,
REASON,
NOTE,
DEL_FLAG,
REVISION,
CREATED_BY,
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME
from ic_vaccine_prarmeter
where DEL_FLAG = 0
<if test="name != null and name != ''">
and NAME like CONCAT('%' ,#{name}, '%')
</if>
<if test="mobile != null and mobile != ''">
and MOBILE like CONCAT('%', #{mobile}, '%')
</if>
<if test="orgId != null and orgId != ''">
and (AGENCY_ID = #{orgId} or PIDS like CONCAT('%',#{orgId},'%'))
</if>
order by CREATED_TIME desc
</select>
</mapper>
</mapper>

Loading…
Cancel
Save