| | |
| | | package com.yuanchu.limslaboratory.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.limslaboratory.pojo.Instrument; |
| | | import com.yuanchu.limslaboratory.pojo.MeteringPlan; |
| | | import com.yuanchu.limslaboratory.pojo.dto.AddPlanDto; |
| | | import com.yuanchu.limslaboratory.pojo.dto.GetPlanMeasureInstrumentDto; |
| | | import com.yuanchu.limslaboratory.pojo.dto.SelectMeasurementLedgerDto; |
| | | import com.yuanchu.limslaboratory.pojo.dto.SelectMeteringPlanDto; |
| | | import com.yuanchu.limslaboratory.service.MeteringPlanService; |
| | | import com.yuanchu.limslaboratory.service.UserService; |
| | | import com.yuanchu.limslaboratory.utils.JackSonUtil; |
| | | import com.yuanchu.limslaboratory.utils.RedisUtil; |
| | | import com.yuanchu.limslaboratory.utils.ServletUtils; |
| | | import com.yuanchu.limslaboratory.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Autowired |
| | | private MeteringPlanService meteringPlanService; |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | |
| | | @ApiOperation("添加计量计划") |
| | | @PostMapping("/add") |
| | | public Result<?> addMeteringPlanInformation(@RequestBody MeteringPlan meteringPlan) { |
| | |
| | | } |
| | | return Result.fail("添加计量计划失败! "); |
| | | } |
| | | |
| | | @ApiOperation("计量计划分页查询") |
| | | @GetMapping("/plan_page_list") |
| | | public Result<?> pagingQueryOfMeteringPlan(SelectMeteringPlanDto dto) { |
| | | return Result.success(meteringPlanService.pagingQueryOfMeteringPlan(dto)); |
| | | } |
| | | |
| | | @ApiOperation("计量台账分页查询") |
| | | @GetMapping("/standing_page_list") |
| | | public Result<?> pagingQueryOfMeasurementLedger(SelectMeasurementLedgerDto selectMeasurementLedgerDto) { |
| | | IPage<Map<String, Object>> page = meteringPlanService.pagingQueryOfMeasurementLedger(selectMeasurementLedgerDto); |
| | | return Result.success(page); |
| | | } |
| | | |
| | | @ApiOperation("单询计划信息") |
| | | @GetMapping("/getPlanMeasureInstrument") |
| | | public Result<?> getPlanMeasureInstrument(GetPlanMeasureInstrumentDto dto){ |
| | | return Result.success(meteringPlanService.getPlanMeasureInstrument(dto)); |
| | | } |
| | | |
| | | @ApiOperation("计划信息之下分页") |
| | | @GetMapping("/limitGetPlanMeasureInstrument") |
| | | public Result<?> limitGetPlanMeasureInstrument(GetPlanMeasureInstrumentDto dto){ |
| | | return Result.success(meteringPlanService.limitGetPlanMeasureInstrument(dto)); |
| | | } |
| | | |
| | | @ApiOperation("获取user列表和仪器列表") |
| | | @GetMapping("/getListUserAndListIns") |
| | | public Result<?>getListUserAndListIns(){ |
| | | return Result.success(meteringPlanService.getListUserAndListIns(userService.getUserNameAndId())); |
| | | } |
| | | |
| | | @PostMapping("/addPlanAndMeasure") |
| | | public Result<?>addPlanAndMeasure(@RequestBody AddPlanDto addPlanDto){ |
| | | return Result.success(meteringPlanService.addPlanAndMeasure(userService.getUserInfo(ServletUtils.getRequest().getHeader("X-Token")),addPlanDto)); |
| | | } |
| | | } |