| | |
| | | @Autowired |
| | | private InspectUnacceptedService inspectUnacceptedService; |
| | | |
| | | @Autowired |
| | | private Jwt jwt; |
| | | |
| | | @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 = "productCategories", value = "产品大类", dataTypeClass = Integer.class), |
| | | }) |
| | | @GetMapping("/selectUnRawInspectsList") |
| | | public Result<?> selectUnRawInspectsList(int pageSize, int countSize, String formTime, Integer dealState, Integer productCategories) { |
| | | IPage<Map<String, Object>> inspectionPage = inspectUnacceptedService.selectUnRawInspectsList(new Page<Object>(pageSize, countSize), formTime, dealState, productCategories); |
| | | 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 = "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 = "productName", value = "产品名称", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "supplier", value = "供应商", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "processingStatus", value = "处理状态", dataTypeClass = Integer.class) |
| | | }) |
| | | @GetMapping("/selectURawMaterials") |
| | | public Result<?> selectUnqualifiedRawMaterials(int pageSize, |
| | | int countSize, |
| | | String formTime, |
| | | String productName, |
| | | String supplier, |
| | | Integer processingStatus) { |
| | | IPage<Map<String, Object>> inspectionPage = inspectUnacceptedService.selectUnqualifiedRawMaterials( |
| | | new Page<Object>(pageSize, countSize), |
| | | formTime, |
| | | productName, |
| | | supplier, |
| | | processingStatus); |
| | | 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 = "rawId", value = "原材料Id", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "passOrNo", value = "是否通过:0:不通过;1:通过", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/evaluatePassOrNo") |
| | | public Result<?> rawEvaluate(Integer rawId, Integer passOrNo) { |
| | | if (inspectUnacceptedService.getById(rawId).getDealState() == 1) { |
| | | return Result.fail("已经评审过了不能再次评审!"); |
| | | } |
| | | Integer integer = inspectUnacceptedService.rawEvaluate(rawId, passOrNo); |
| | | if (integer >= 1) { |
| | | return Result.success("评审成功!"); |
| | | } |
| | | return Result.fail("评审失败!"); |
| | | } |
| | | |
| | | @ApiOperation(value = "不合格品分页列表", tags = "QMS管理-->不合格品处置") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "pageSize", value = "页数", dataTypeClass = Integer.class, required = true), |
| | |
| | | @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), |
| | | @ApiImplicitParam(name = "type", value = "不合格类型", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/editDisposalOpinion") |
| | | public Result<?> editDisposalOpinionConfirmation(Integer rawUnacceptedId, String opinionTell, Integer way, Integer type) { |