|
@@ -651,4 +651,39 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
|
|
}
|
|
}
|
|
return "OK";
|
|
return "OK";
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 换仓
|
|
|
|
+ * @param
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
|
+ public String changeWarehouse(WeighingManagement weighingManagement) {
|
|
|
|
+ //查询检斤信息
|
|
|
|
+ WeighingManagement weighingManagement1 = this.selectById(weighingManagement.getId());
|
|
|
|
+ if (weighingManagement1 != null){
|
|
|
|
+ weighingManagement1.setBinNumber(weighingManagement.getChangeBinNumer());
|
|
|
|
+ weighingManagement1.setPositionId(weighingManagement.getChangePositionId());
|
|
|
|
+ this.updateById(weighingManagement1);
|
|
|
|
+ }
|
|
|
|
+ //查询质检信息
|
|
|
|
+ QualityInspectionManagement qualityInspectionManagement = qualityInspectionManagementService.selectOne(new EntityWrapper<QualityInspectionManagement>()
|
|
|
|
+ .eq("relation_id",weighingManagement1.getRelationId())
|
|
|
|
+ .eq("delete_flag","0"));
|
|
|
|
+ if (qualityInspectionManagement != null){
|
|
|
|
+ qualityInspectionManagement.setBinNumber(weighingManagement.getChangeBinNumer());
|
|
|
|
+ qualityInspectionManagementService.updateById(qualityInspectionManagement);
|
|
|
|
+ }
|
|
|
|
+ //查询出入库信息
|
|
|
|
+ WarehouseInOutInfo warehouseInOutInfo = warehouseInOutInfoService.selectOne(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
|
+ .eq("id",weighingManagement1.getWarehouseInOutId())
|
|
|
|
+ .eq("delete_flag","0"));
|
|
|
|
+ if (warehouseInOutInfo != null){
|
|
|
|
+ warehouseInOutInfo.setBinNumber(weighingManagement.getChangeBinNumer());
|
|
|
|
+ warehouseInOutInfo.setPositionId(weighingManagement.getChangePositionId());
|
|
|
|
+ warehouseInOutInfoService.updateById(warehouseInOutInfo);
|
|
|
|
+ }
|
|
|
|
+ return "ok";
|
|
|
|
+ }
|
|
}
|
|
}
|