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.
60 lines
1.7 KiB
60 lines
1.7 KiB
package com.epmet.controller;
|
|
|
|
import com.epmet.commons.tools.annotation.LoginUser;
|
|
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.commons.tools.validator.group.AddGroup;
|
|
import com.epmet.commons.tools.validator.group.DefaultGroup;
|
|
import com.epmet.dto.form.MapInfoFormDTO;
|
|
import com.epmet.dto.result.MapInfoResultDTO;
|
|
import com.epmet.service.IcPointAppService;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* 核酸监测点
|
|
*
|
|
* @author generator generator@elink-cn.com
|
|
* @since v1.0.0 2022-06-20
|
|
*/
|
|
@RestController
|
|
@RequestMapping("appPoint")
|
|
@Slf4j
|
|
public class IcPointAppController {
|
|
|
|
@Autowired
|
|
private IcPointAppService icPointAppService;
|
|
|
|
/**
|
|
* 根据地点类型获取地图数据
|
|
* @param formDTO
|
|
* @return
|
|
*/
|
|
@PostMapping("getMapInfoByPointType")
|
|
public Result<List<MapInfoResultDTO>> getMapInfoByPointType(@RequestBody MapInfoFormDTO formDTO, @LoginUser TokenDto tokenDto){
|
|
// 效验数据
|
|
ValidatorUtils.validateEntity(formDTO, AddGroup.class, DefaultGroup.class);
|
|
formDTO.setCustomerId(tokenDto.getCustomerId());
|
|
|
|
return icPointAppService.getMapInfoByPointType(formDTO);
|
|
}
|
|
|
|
/**
|
|
* Desc: 核酸监测点启用禁用
|
|
* @param id
|
|
* @author zxc
|
|
* @date 2022/9/6 16:39
|
|
*/
|
|
@PostMapping("enableOrDisabled/{id}")
|
|
public Result enableOrDisabled(@PathVariable("id") String id){
|
|
icPointAppService.enableOrDisabled(id);
|
|
return new Result();
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|