| | |
| | | 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 org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private MeteringPlanService meteringPlanService; |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | |
| | | @ApiOperation("添加计量计划") |
| | | @PostMapping("/add") |
| | |
| | | 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)); |
| | | } |
| | | } |