| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.InsOderDto; |
| | | import com.yuanchu.mom.pojo.InsOrder; |
| | | import com.yuanchu.mom.pojo.InsSample; |
| | | import com.yuanchu.mom.service.InsOrderService; |
| | | import com.yuanchu.mom.service.InsSampleService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | |
| | | private InsOrderService insOrderService; |
| | | |
| | | private InsSampleService insSampleService; |
| | | |
| | | //获取检验下单数据 |
| | | @ApiOperation(value = "查询检验下单") |
| | | @ApiOperation(value = "查询检验下单数据") |
| | | @PostMapping("/selectInsOrderParameter") |
| | | public Result selectInsOrderParameter(@RequestBody Map<String, Object> data) throws Exception { |
| | | System.out.println(1); |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | InsOrder itemParameter = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), InsOrder.class); |
| | | return Result.success(insOrderService.selectInsOrderParameter(page, itemParameter)); |
| | | } |
| | | |
| | | @ApiOperation(value = "添加检验下单数据") |
| | | @PostMapping("/addInsOrderParameter") |
| | | public Result addInsOrderParameter(@RequestBody InsOrder itemParameter) { |
| | | return Result.success(insOrderService.addInsOrderParameter(itemParameter)); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除检验下单数据") |
| | | @PostMapping("/delInsOrderParameter") |
| | | public Result<?> delInsOrderParameter(Integer id) { |
| | | return Result.success(insOrderService.delInsOrderParameter(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改检验下单数据") |
| | | @PostMapping("/upInsOrderParameter") |
| | | public Result<?> upInsOrderParameter(@RequestBody InsOrder itemParameter) { |
| | | return Result.success(insOrderService.upInsOrderParameter(itemParameter)); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改检验下发数据") |
| | | @PostMapping("/updateInsOrder") |
| | | public Result updateInsOrder(@RequestBody InsOderDto insOderDto) { |
| | | InsSample insSample = new InsSample(); |
| | | insSample.setId(insOderDto.getId()); |
| | | insSample.setCreateTime(insOderDto.getDate()); |
| | | insSample.setCreateUser(insOderDto.getOrderName()); |
| | | return Result.success(insSampleService.updateById(insSample)); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增检验下发数据") |
| | | @PostMapping("/addInsOrder") |
| | | public Result addInsOrder(@RequestBody InsSample insSample) { |
| | | return Result.success(insSampleService.save(insSample)); |
| | | } |
| | | |
| | | } |