| | |
| | | import com.kidgrow.common.controller.BaseController; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.common.utils.ExcelUtil; |
| | | import com.kidgrow.oprationcenter.model.HospitalScreening; |
| | | import com.kidgrow.oprationcenter.model.ScreeningHospitalDataExcel; |
| | | import com.kidgrow.oprationcenter.service.IHospitalScreeningService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.BindingResult; |
| | | import org.springframework.validation.ObjectError; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * |
| | | * @Description: 筛查医院信息表-未完待续 |
| | | * @Project: 运营中心 |
| | | * @CreateDate: Created in 2020-04-02 18:25:34 <br> |
| | |
| | | } |
| | | } |
| | | boolean v= hospitalScreeningService.saveOrUpdate(hospitalScreening); |
| | | //更新redis |
| | | hospitalScreeningService.updateRedisById(hospitalScreening); |
| | | |
| | | if(v) { |
| | | return ResultBody.ok().data(hospitalScreening).msg("保存成功"); |
| | | } |
| | | else { |
| | | } else { |
| | | return ResultBody.failed().msg("保存失败"); |
| | | } |
| | | } |
| | |
| | | boolean v= hospitalScreeningService.removeById(id); |
| | | if(v) { |
| | | return ResultBody.ok().msg("删除成功"); |
| | | } |
| | | else { |
| | | } else { |
| | | return ResultBody.failed().msg("删除失败"); |
| | | } |
| | | } |
| | |
| | | return ResultBody.ok().data(null).msg(""); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "导出") |
| | | @PostMapping("/export") |
| | | public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws IOException { |
| | | List<ScreeningHospitalDataExcel> list = hospitalScreeningService.export(params); |
| | | //导出操作 |
| | | if (list != null && list.size() > 0) { |
| | | String name = MapUtils.getString(params, "hospitalName"); |
| | | ExcelUtil.exportExcel(list, null, name, ScreeningHospitalDataExcel.class, name, response); |
| | | } |
| | | } |
| | | } |