| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.utils.Jwt; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | import com.yuanchu.mom.service.InspectUnacceptedService; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | * @author zss |
| | | * @since 2023-08-07 10:04:01 |
| | | */ |
| | | @Api(tags = "QMS管理-->不合格品") |
| | | @RestController |
| | | @Api(tags = "QMS管理-->不合格品处置") |
| | | @RequestMapping("/inspectUnaccepted") |
| | | public class InspectUnacceptedController { |
| | | |
| | | @Autowired |
| | | private InspectUnacceptedService inspectUnacceptedService; |
| | | |
| | | |
| | | @ApiOperation(value = "查询原材料不合格品检验单列表") |
| | | @ApiOperation(value = "不合格品分页列表", tags = "QMS管理-->不合格品处置") |
| | | @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) |
| | | @ApiImplicitParam(name = "pageSize", value = "页数", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "countSize", value = "条数/页", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "specificationModel", value = "规格型号", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "productName", value = "产品名称", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "productCategories", value = "产品大类", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "state", value = "状态", dataTypeClass = Integer.class) |
| | | }) |
| | | @GetMapping("/selectUnRawInspectsList") |
| | | public Result selectUnRawInspectsList(int pageSize, int countSize, String formTime, Integer dealState,Integer type){ |
| | | IPage<Map<String, Object>> inspectionPage = inspectUnacceptedService.selectUnRawInspectsList(new Page<Object>(pageSize, countSize), formTime,dealState,type); |
| | | @GetMapping("/selectDisposal") |
| | | public Result<?> selectDisposal(int pageSize, |
| | | int countSize, |
| | | String specificationModel, |
| | | String productName, |
| | | Integer productCategories, |
| | | Integer state) { |
| | | IPage<Map<String, Object>> inspectionPage = inspectUnacceptedService.selectDisposal( |
| | | new Page<Object>(pageSize, countSize), |
| | | specificationModel, |
| | | productName, |
| | | productCategories, |
| | | state); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("total", inspectionPage.getTotal()); |
| | | map.put("row", inspectionPage.getRecords()); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @ApiOperation(value = "失焦更新现像描述", tags = "QMS管理-->不合格品处置") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "rawUnacceptedId", value = "不合格品处置Id", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "tell", value = "现象描述", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @GetMapping("/descriptionUpdate") |
| | | public Result<?> descriptionUpdate(Integer rawUnacceptedId, String tell) { |
| | | Integer isUpdateSuccess = inspectUnacceptedService.descriptionUpdate(rawUnacceptedId, tell); |
| | | if (isUpdateSuccess == 1) { |
| | | return Result.success("更新成功"); |
| | | } |
| | | return Result.fail("更新失败"); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑处置意见确定按钮", tags = "QMS管理-->不合格品处置") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "rawUnacceptedId", value = "不合格品处置Id", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "opinionTell", value = "处置意见", dataTypeClass = String.class, required = true), |
| | | @ApiImplicitParam(name = "way", value = "处理方式", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "type", value = "不合格类型", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/editDisposalOpinion") |
| | | public Result<?> editDisposalOpinionConfirmation(Integer rawUnacceptedId, String opinionTell, Integer way, Integer type) { |
| | | Integer isUpdateSuccess = inspectUnacceptedService.editDisposalOpinionConfirmation(rawUnacceptedId, opinionTell, way, type); |
| | | if (isUpdateSuccess == 1) { |
| | | return Result.success("编辑成功"); |
| | | } |
| | | return Result.fail("编辑失败"); |
| | | } |
| | | } |
| | | |