package com.yuanchu.mom.controller; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.yuanchu.mom.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 com.yuanchu.mom.service.InspectUnacceptedService; import java.util.HashMap; import java.util.Map; /** * 不合格品检验表(InspectUnaccepted)表控制层 * * @author zss * @since 2023-08-07 10:04:01 */ @Api(tags = "QMS管理-->不合格品") @RestController @RequestMapping("/inspectUnaccepted") public class InspectUnacceptedController { @Autowired private InspectUnacceptedService inspectUnacceptedService; @ApiOperation(value = "查询原材料不合格品检验单列表") @ApiImplicitParams(value = { @ApiImplicitParam(name = "pageSize",value = "页数",dataTypeClass = Integer.class,required = true), @ApiImplicitParam(name = "countSize",value = "条数/页",dataTypeClass = Integer.class,required = true), @ApiImplicitParam(name = "formTime",value = "来料日期",dataTypeClass = String.class), @ApiImplicitParam(name = "dealState",value = "处理状态(为空=全部)",dataTypeClass = Integer.class), @ApiImplicitParam(name = "type",value = "类型(为空=原材料2)",dataTypeClass = Integer.class) }) @GetMapping("/selectUnRawInspectsList") public Result selectUnRawInspectsList(int pageSize, int countSize, String formTime, Integer dealState,Integer type){ IPage> inspectionPage = inspectUnacceptedService.selectUnRawInspectsList(new Page(pageSize, countSize), formTime,dealState,type); Map map = new HashMap<>(); map.put("total", inspectionPage.getTotal()); map.put("row", inspectionPage.getRecords()); return Result.success(map); } }