| | |
| | | qualityInspect.setProductMainId(productionProductMain.getId()); |
| | | qualityInspect.setProductModelId(productModel.getId()); |
| | | qualityInspectMapper.insert(qualityInspect); |
| | | List<QualityTestStandard> qualityTestStandard = qualityTestStandardMapper.getQualityTestStandardByProductId(product.getId(), inspectType, process); |
| | | List<QualityTestStandard> qualityTestStandard = qualityTestStandardMapper.getQualityTestStandardByProductId(product.getId(), inspectType); |
| | | if (qualityTestStandard.size() > 0) { |
| | | qualityInspect.setTestStandardId(qualityTestStandard.get(0).getId()); |
| | | qualityInspectMapper.updateById(qualityInspect); |
| | |
| | | qualityInspect.setUnqualifiedQuantity(BigDecimal.ZERO); |
| | | qualityInspect.setPassRate(BigDecimal.valueOf(100).setScale(2, RoundingMode.HALF_UP)); |
| | | qualityInspectMapper.insert(qualityInspect); |
| | | List<QualityTestStandard> qualityTestStandard = qualityTestStandardMapper.getQualityTestStandardByProductId(saleProduct.getProductId(), 0, null); |
| | | List<QualityTestStandard> qualityTestStandard = qualityTestStandardMapper.getQualityTestStandardByProductId(saleProduct.getProductId(), 0); |
| | | if (qualityTestStandard.size() > 0) { |
| | | qualityInspect.setTestStandardId(qualityTestStandard.get(0).getId()); |
| | | qualityInspectMapper.updateById(qualityInspect); |
| | |
| | | import com.ruoyi.quality.pojo.QualityTestStandardParam; |
| | | import com.ruoyi.quality.service.IQualityTestStandardService; |
| | | import com.ruoyi.quality.service.QualityTestStandardParamService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/getQualityTestStandardByProductId") |
| | | public AjaxResult getQualityTestStandardByProductId(@Nonnull Long productId, @Nonnull Integer inspectType, String process) { |
| | | return AjaxResult.success(qualityTestStandardService.getQualityTestStandardByProductId(productId,inspectType,process)); |
| | | @ApiOperation(value = "根据产品id获取标准信息") |
| | | public AjaxResult getQualityTestStandardByProductId(@Nonnull Long productId, @Nonnull Integer inspectType) { |
| | | return AjaxResult.success(qualityTestStandardService.getQualityTestStandardByProductId(productId,inspectType)); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | IPage<QualityTestStandard> qualityTestStandardListPage(Page page, @Param("c") QualityTestStandard qualityTestStandard); |
| | | |
| | | List<QualityTestStandard> getQualityTestStandardByProductId(@Param("productId") Long productId, @Param("inspectType") Integer inspectType, @Param("process") String process); |
| | | List<QualityTestStandard> getQualityTestStandardByProductId(@Param("productId") Long productId, @Param("inspectType") Integer inspectType); |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("类别(0:原材料检验;1:过程检验;2:出厂检验)") |
| | | private Integer inspectType; |
| | | |
| | | @ApiModelProperty("工序id") |
| | | private Integer processId; |
| | | } |
| | |
| | | |
| | | int copyParam(QualityTestStandard qualityTestStandard); |
| | | |
| | | List<QualityTestStandard> getQualityTestStandardByProductId(Long productId, Integer inspectType,String process); |
| | | List<QualityTestStandard> getQualityTestStandardByProductId(Long productId, Integer inspectType); |
| | | |
| | | int delQualityTestStandard(List<Integer> ids); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<QualityTestStandard> getQualityTestStandardByProductId(Long productId, Integer inspectType, String process) { |
| | | return qualityTestStandardMapper.getQualityTestStandardByProductId(productId, inspectType, process); |
| | | public List<QualityTestStandard> getQualityTestStandardByProductId(Long productId, Integer inspectType) { |
| | | return qualityTestStandardMapper.getQualityTestStandardByProductId(productId, inspectType); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | QualityTestStandard selectedStandard = null; |
| | | if (dbProduct.getProductId() != null) { |
| | | List<QualityTestStandard> standards = qualityTestStandardMapper.getQualityTestStandardByProductId(dbProduct.getProductId(), 2, null); |
| | | List<QualityTestStandard> standards = qualityTestStandardMapper.getQualityTestStandardByProductId(dbProduct.getProductId(), 2); |
| | | if (CollectionUtils.isNotEmpty(standards)) { |
| | | selectedStandard = standards.get(0); |
| | | qualityInspect.setTestStandardId(selectedStandard.getId()); |
| | |
| | | |
| | | QualityTestStandard selectedStandard = null; |
| | | if (dbProduct.getProductId() != null) { |
| | | List<QualityTestStandard> standards = qualityTestStandardMapper.getQualityTestStandardByProductId(dbProduct.getProductId(), 2, null); |
| | | List<QualityTestStandard> standards = qualityTestStandardMapper.getQualityTestStandardByProductId(dbProduct.getProductId(), 2); |
| | | if (CollectionUtils.isNotEmpty(standards)) { |
| | | selectedStandard = standards.get(0); |
| | | qualityInspect.setTestStandardId(selectedStandard.getId()); |
| | |
| | | and dr.maintenance_time like concat('%',#{deviceRepairDto.maintenanceTimeStr},'%') |
| | | </if> |
| | | </where> |
| | | order by repair_time desc |
| | | </select> |
| | | <select id="detailById" resultType="com.ruoyi.device.dto.DeviceRepairDto"> |
| | | select dr.id, |
| | |
| | | AND p.no LIKE CONCAT('%',#{productProcessDto.no},'%') |
| | | </if> |
| | | </where> |
| | | order by p.id asc |
| | | order by p.id desc |
| | | </select> |
| | | |
| | | <select id="calculateProductionStatistics" resultType="com.ruoyi.home.dto.processDataProductionStatisticsDto"> |
| | |
| | | SELECT qts.* |
| | | FROM quality_test_standard qts |
| | | left join quality_test_standard_binding qtsb on qtsb.test_standard_id = qts.id |
| | | left join product_process pp on qts.process_id = pp.id |
| | | WHERE qtsb.product_id = #{productId} |
| | | AND qts.inspect_type = #{inspectType} |
| | | <if test="process!='' and process!=null"> |
| | | and pp.name = #{process} |
| | | </if> |
| | | order by qts.id desc |
| | | </select> |
| | | </mapper> |
| | |
| | | sl.supplier_name, |
| | | pm.thickness |
| | | ORDER BY |
| | | slp.product_category |
| | | sl.entry_date desc |
| | | </select> |
| | | |
| | | <select id="procurementBusinessSummaryStatistics" |