| | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.ltkj.common.annotation.Log; |
| | | import com.ltkj.common.core.controller.BaseController; |
| | | import com.ltkj.common.core.domain.AjaxResult; |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(TjHarmType tjHarmType) { |
| | | startPage(); |
| | | List<TjHarmType> list = tjHarmTypeService.list(); |
| | | LambdaQueryWrapper<TjHarmType> wq=new LambdaQueryWrapper<>(); |
| | | if (tjHarmType.getHarmCode()!=null){ |
| | | wq.like(TjHarmType::getHarmCode,tjHarmType.getHarmCode()); |
| | | } |
| | | if (tjHarmType.getHarmType()!=null){ |
| | | wq.like(TjHarmType::getHarmType,tjHarmType.getHarmType()); |
| | | } |
| | | if (tjHarmType.getHarmPinYin()!=null){ |
| | | wq.like(TjHarmType::getHarmPinYin,tjHarmType.getHarmPinYin()); |
| | | } |
| | | List<TjHarmType> list = tjHarmTypeService.list(wq); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | |
| | | * 删除职业病 |
| | | */ |
| | | @Log(title = "职业病", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{aids}") |
| | | public AjaxResult remove(@PathVariable String[] aids) { |
| | | @DeleteMapping("/remove") |
| | | public AjaxResult remove(@RequestBody String[] aids) { |
| | | return toAjax(tjHarmTypeService.removeByIds(Arrays.asList(aids))); |
| | | } |
| | | } |