| | |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections.MapUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.BindingResult; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.io.IOException; |
| | |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * |
| | | * @Description: 医生的数据需求 |
| | | * @Project: 用户中心 |
| | | * @CreateDate: Created in 2020-04-01 09:37:04 <br> |
| | |
| | | @RestController |
| | | @RequestMapping("/dataneed") |
| | | @Api(tags = "医生的数据需求") |
| | | public class DataNeedController extends BaseController{ |
| | | public class DataNeedController extends BaseController { |
| | | @Autowired |
| | | private IDataNeedService dataNeedService; |
| | | |
| | |
| | | }) |
| | | @GetMapping |
| | | public PageResult list(@RequestParam Map<String, Object> params) { |
| | | if(params.size()==0){ |
| | | params.put("page",1); |
| | | params.put("limit",10); |
| | | if (params.size() == 0) { |
| | | params.put("page", 1); |
| | | params.put("limit", 10); |
| | | } |
| | | return dataNeedService.findList(params); |
| | | } |
| | | |
| | | /** |
| | | * H端列表 需要医院和科室id |
| | | */ |
| | | @ApiOperation(value = "H端列表,需要医院和科室id") |
| | | @GetMapping("/hlist") |
| | | public ResultBody list(@RequestParam Map<String, Object> params, @LoginUser(isFull = true)SysUser sysUser) { |
| | | return dataNeedService.FindAllByHId(params,sysUser); |
| | | public ResultBody list(@RequestParam Map<String, Object> params, @LoginUser(isFull = true) SysUser sysUser) { |
| | | if (params.size() == 0) { |
| | | params.put("page", 1); |
| | | params.put("limit", 10); |
| | | } |
| | | if(MapUtils.getString(params,"page")==null){ |
| | | params.put("page", 1); |
| | | }if(MapUtils.getString(params,"limit")==null){ |
| | | params.put("limit", 10); |
| | | } |
| | | return dataNeedService.FindAllByHId(params, sysUser); |
| | | } |
| | | |
| | | /** |
| | | * 查询 |
| | | */ |
| | |
| | | DataNeed model = dataNeedService.getById(id); |
| | | return ResultBody.ok().data(model).msg("查询成功"); |
| | | } |
| | | |
| | | /** |
| | | *更新状态和文件地址 |
| | | * 更新状态和文件地址 |
| | | */ |
| | | @ApiOperation(value = "查询") |
| | | @ApiOperation(value = "更新状态和文件地址") |
| | | @GetMapping("updateEnabled") |
| | | public ResultBody updateEnabled(@RequestParam Map<String,Object> map) { |
| | | public ResultBody updateEnabled(@RequestParam Map<String, Object> map) { |
| | | return dataNeedService.updateEnabled(map); |
| | | } |
| | | |
| | | /** |
| | | * 更新使用状态 |
| | | */ |
| | | @ApiOperation(value = "更新使用状态") |
| | | @GetMapping("updateDelete") |
| | | public ResultBody updateDelete(@RequestParam Long id, @LoginUser(isFull = true) SysUser sysUser) { |
| | | return dataNeedService.updateDelete(id, sysUser); |
| | | } |
| | | |
| | | /** |
| | |
| | | return ResultBody.ok().data(dataNeed).msg("保存成功"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | |
| | | dataNeedService.removeById(id); |
| | | return ResultBody.ok().msg("删除成功"); |
| | | } |
| | | |
| | | /** |
| | | * 导出excel |
| | | * |