| | |
| | | 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())); |
| | | } |
| | | } |
| | | } |