You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

148 lines
5.0 KiB

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.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.IcEpidemicSpecialAttentionDTO;
import com.epmet.dto.form.*;
import com.epmet.service.IcEpidemicSpecialAttentionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
/**
* 疫情特别关注
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-28
*/
@RestController
@RequestMapping("icEpidemicSpecialAttention")
public class IcEpidemicSpecialAttentionController {
@Autowired
private IcEpidemicSpecialAttentionService icEpidemicSpecialAttentionService;
/**
* Desc: 【疫苗接种关注名单,疫苗接种关注名单】列表
* @param formDTO
* @author zxc
* @date 2022/3/28 10:29
*/
@PostMapping("list")
public Result<PageData> vaccinationList(@RequestBody VaccinationListFormDTO formDTO, @LoginUser TokenDto tokenDto){
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class, VaccinationListFormDTO.VaccinationListForm.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
return new Result<PageData>().ok(icEpidemicSpecialAttentionService.vaccinationList(formDTO));
}
/**
* Desc:【疫苗接种关注名单,核酸检测关注名单】新增
* @param formDTO
* @param tokenDto
* @author zxc
* @date 2022/3/28 13:35
*/
@PostMapping("vaccination-add")
@NoRepeatSubmit
public Result vaccinationAdd(@RequestBody VaccinationAddFormDTO formDTO,@LoginUser TokenDto tokenDto){
ValidatorUtils.validateEntity(formDTO, IcEpidemicSpecialAttentionDTO.IcEpidemicSpecialAttentionAdd.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
icEpidemicSpecialAttentionService.vaccinationAdd(formDTO);
return new Result();
}
/**
* Desc:【疫苗接种关注名单,核酸检测关注名单】修改
* @param formDTO
* @author zxc
* @date 2022/3/28 13:45
*/
@PostMapping("vaccination-update")
@NoRepeatSubmit
public Result vaccinationUpdate(@RequestBody IcEpidemicSpecialAttentionDTO formDTO){
ValidatorUtils.validateEntity(formDTO, IcEpidemicSpecialAttentionDTO.IcEpidemicSpecialAttentionUpdate.class);
icEpidemicSpecialAttentionService.vaccinationUpdate(formDTO);
return new Result();
}
/**
* Desc: 取消关注
* @param formDTO
* @author zxc
* @date 2022/3/28 13:51
*/
@PostMapping("cancel-attention")
@NoRepeatSubmit
public Result cancelAttention(@RequestBody CancelAttentionPackageFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, CancelAttentionPackageFormDTO.CancelAttentionPackageForm.class);
icEpidemicSpecialAttentionService.cancelAttention(formDTO);
return new Result();
}
/**
* Desc: 【疫苗接种关注名单】导入
* @param
* @author zxc
* @date 2022/3/28 13:40
*/
@PostMapping("vaccination-import")
public Result vaccinationImport(@LoginUser TokenDto tokenDTO, @RequestParam("file") MultipartFile file){
return new Result();
}
/**
* Desc: 【疫苗接种关注名单】导出
* @param response
* @param formDTO
* @param tokenDto
* @author zxc
* @date 2022/3/28 13:57
*/
@PostMapping("vaccination-export")
public void vaccinationExport(HttpServletResponse response,@RequestBody VaccinationListFormDTO formDTO, @LoginUser TokenDto tokenDto){
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
}
/**
* Desc: 【核酸检测关注名单】导入
* @param
* @author zxc
* @date 2022/3/28 13:40
*/
@PostMapping("nat-import")
public Result natImport(@LoginUser TokenDto tokenDTO, @RequestParam("file") MultipartFile file){
return new Result();
}
/**
* Desc: 【核酸检测关注名单】导出
* @param response
* @param formDTO
* @param tokenDto
* @author zxc
* @date 2022/3/28 13:59
*/
@PostMapping("nat-export")
public void natExport(HttpServletResponse response,@RequestBody NatListFormDTO formDTO,@LoginUser TokenDto tokenDto){
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
}
}