| | |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.project.domain.BaseAnnextype; |
| | | import com.ruoyi.project.domain.GiLink; |
| | | import com.ruoyi.project.service.IBaseAnnextypeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.ruoyi.project.service.IGiLinkService; |
| | | import io.swagger.annotations.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Random; |
| | | |
| | | @Slf4j |
| | |
| | | @RequestMapping("/GiLink") |
| | | public class GiLinkController { |
| | | @Autowired |
| | | private IBaseAnnextypeService baseAnnextypeService; |
| | | private IGiLinkService giLinkService; |
| | | |
| | | @ApiOperation("新增") |
| | | @ApiOperation("外链新增") |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody BaseAnnextype baseAnnextype) { |
| | | Random rand = new Random(4); |
| | | String hexString = String.format("%x", rand.nextInt()); |
| | | boolean save = baseAnnextypeService.save(baseAnnextype); |
| | | return AjaxResult.success(baseAnnextype); |
| | | public AjaxResult add(@RequestBody GiLink model) { |
| | | |
| | | return AjaxResult.success(giLinkService.Add(model)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("代码获取信息") |
| | | @ApiOperation("外链代码获取信息") |
| | | @GetMapping(value = "/getCode") |
| | | public AjaxResult getCode(Long id) { |
| | | public AjaxResult getCode(String code) { |
| | | Map<String, Object> columnMap = new HashMap<>(); |
| | | columnMap.put("code", code); |
| | | List<GiLink> links = giLinkService.listByMap(columnMap); |
| | | if (links.size() > 0) |
| | | return AjaxResult.success(links.get(0)); |
| | | else |
| | | return AjaxResult.success(""); |
| | | } |
| | | |
| | | return AjaxResult.success(baseAnnextypeService.getById(id)); |
| | | @ApiOperation("上报发送短信") |
| | | @GetMapping("/sendReport") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "上报id", dataType = "Long", required = true), |
| | | @ApiImplicitParam(name = "coordinatorNo", value = "协调员编号", dataType = "String", required = true), |
| | | @ApiImplicitParam(name = "toHospital", value = "上报医院", dataType = "String", required = true) |
| | | }) |
| | | public AjaxResult SendReport(Long id,String coordinatorNo,String toHospital) { |
| | | |
| | | return AjaxResult.success(giLinkService.SendReport(id,coordinatorNo,toHospital)); |
| | | } |
| | | |
| | | @ApiOperation("专家发送短信") |
| | | @GetMapping("/sendExpert") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "专家意见id", dataType = "Long", required = true), |
| | | @ApiImplicitParam(name = "expertNo", value = "专家编号", dataType = "String", required = true), |
| | | @ApiImplicitParam(name = "infoId", value = "案例id", dataType = "String", required = true) |
| | | }) |
| | | public AjaxResult SendExpert(String id,String expertNo,String infoId) { |
| | | |
| | | return AjaxResult.success(giLinkService.SendExpert(id,expertNo,infoId)); |
| | | } |
| | | |
| | | } |