| | |
| | | QualityInspect qualityInspect = new QualityInspect(); |
| | | BeanUtils.copyProperties(qualityInspectDto, qualityInspect); |
| | | if (qualityInspectDto.getInspectType() != 0) { |
| | | qualityInspectDto.setCustomer("长治市轴承制造有限公司"); |
| | | qualityInspectDto.setCustomer("长治市健齿齿科器材有限公司"); |
| | | } |
| | | qualityInspect.setInspectState(0);//默认未提交 |
| | | qualityInspectMapper.insert(qualityInspect); |
| | |
| | | ProductWorkOrder productWorkOrder = productWorkOrderMapper.selectById(productionProductMain.getWorkOrderId()); |
| | | ProductOrder productOrder = productOrderMapper.selectById(productWorkOrder.getProductOrderId()); |
| | | batchNo = productOrder.getBatchNo(); |
| | | customer = "长治市轴承制造有限公司"; |
| | | customer = "长治市健齿齿科器材有限公司"; |
| | | } else { |
| | | batchNo = qualityInspect.getBatchNo(); |
| | | customer = qualityInspect.getSupplier(); |
| | |
| | | String text = inspectParams.stream().map(QualityInspectParam::getParameterItem).collect(Collectors.joining(",")); |
| | | qualityUnqualified.setDefectivePhenomena(text + "这些指标中存在不合格");//不合格现象 |
| | | qualityUnqualified.setInspectId(qualityInspect.getId()); |
| | | qualityUnqualified.setProductionDate(inspect.getProductionDate()); |
| | | qualityUnqualified.setBatchNo(inspect.getBatchNo()); |
| | | qualityUnqualified.setProductionDate(qualityInspect.getProductionDate()); |
| | | qualityUnqualified.setBatchNo(batchNo); |
| | | qualityUnqualifiedMapper.insert(qualityUnqualified); |
| | | } else { |
| | | //合格直接入库 |
| | | stockUtils.addStock(qualityInspect.getProductModelId(), qualityInspect.getQuantity(), StockInQualifiedRecordTypeEnum.QUALITYINSPECT_STOCK_IN.getCode(), |
| | | qualityInspect.getId(), batchNo, customer,inspect.getProductionDate() |
| | | qualityInspect.getId(), batchNo, customer != null ? customer : "长治市健齿齿科器材有限公司", inspect.getProductionDate() |
| | | ); |
| | | } |
| | | qualityInspect.setInspectState(1);//已提交 |