whyclxw
2025-05-29 118cca4d605d7305ec81b5b1a375f8020a17d177
src/main/java/com/whyc/service/BOMFeedbakService.java
@@ -232,14 +232,17 @@
                Integer productId = mapper.selectById(id).getProductId();
                Product product = productService.getById(productId);
                //解锁产品时解锁锁定时的版本号
                int nowVersion=feedbackDB.getNowVersion();
                QueryWrapper<BOMFeedback> query = Wrappers.query();
                query.eq("id",id).last(" limit 1");
                BOMFeedback feed = mapper.selectOne(query);
                int nowVersion=feed.getNowVersion();
                if(product!=null){
                    if(nowVersion!=-1){
                        phisService.setpHistoryEnable(product.getParentCode(),product.getCustomCode(),nowVersion,1,"问题反馈后"+ username +"确认不需要修改bom,系统执行产品解锁",DateUtil.YYYY_MM_DD_HH_MM_SS.format(product.getVersionTime()));
                    }
                }else{
                    ProductHistory phis = phisService.getById(productId);
                    phisService.setpHistoryEnable(phis.getParentCode(),phis.getCustomCode(),nowVersion,1,"问题反馈后"+ username +"确认不需要修改bom,系统执行产品解锁",DateUtil.YYYY_MM_DD_HH_MM_SS.format(phis.getVersionTime()));
                    phisService.setpHistoryEnable(phis.getParentCode(),phis.getCustomCode(),phis.getVersion(),1,"问题反馈后"+ username +"确认不需要修改bom,系统执行产品解锁",DateUtil.YYYY_MM_DD_HH_MM_SS.format(phis.getVersionTime()));
                }
            }
        }